upload tizen2.0 source 2.0alpha master 2.0_alpha submit/master/20120920.151129
authorBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:01 +0000 (18:04 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:01 +0000 (18:04 +0900)
720 files changed:
bitmap/AUTHORS [deleted file]
bitmap/BitEdit.c [deleted file]
bitmap/Bitmap.c [deleted file]
bitmap/Bitmap.h [deleted file]
bitmap/BitmapP.h [deleted file]
bitmap/COPYING [deleted file]
bitmap/ChangeLog [deleted file]
bitmap/CutPaste.c [deleted file]
bitmap/Dashes [deleted file]
bitmap/Dialog.c [deleted file]
bitmap/Dialog.h [deleted file]
bitmap/Down [deleted file]
bitmap/Excl [deleted file]
bitmap/FlipHoriz [deleted file]
bitmap/FlipVert [deleted file]
bitmap/Fold [deleted file]
bitmap/Graphics.c [deleted file]
bitmap/Handlers.c [deleted file]
bitmap/INSTALL [deleted file]
bitmap/Left [deleted file]
bitmap/Makefile.am [deleted file]
bitmap/Makefile.in [deleted file]
bitmap/NEWS [deleted file]
bitmap/ReqMach.c [deleted file]
bitmap/Requests.h [deleted file]
bitmap/Right [deleted file]
bitmap/RotateLeft [deleted file]
bitmap/RotateRight [deleted file]
bitmap/Stipple [deleted file]
bitmap/Term [deleted file]
bitmap/Up [deleted file]
bitmap/app-defaults/Bitmap [deleted file]
bitmap/app-defaults/Bitmap-color [deleted file]
bitmap/app-defaults/Bitmap-nocase [deleted file]
bitmap/atobm.c [deleted file]
bitmap/autogen.sh [deleted file]
bitmap/bitmap.icon [deleted file]
bitmap/bitmap.man [deleted file]
bitmap/bmtoa.c [deleted file]
bitmap/compile [deleted file]
ico/AUTHORS [deleted file]
ico/ChangeLog [deleted file]
ico/INSTALL [deleted file]
ico/NEWS [deleted file]
ico/README [deleted file]
ico/aclocal.m4 [deleted file]
ico/allobjs.h [deleted file]
ico/config.guess [deleted file]
ico/config.h.in [deleted file]
ico/config.sub [deleted file]
ico/configure [deleted file]
ico/depcomp [deleted file]
ico/ico.c [deleted file]
ico/ico.man [deleted file]
ico/install-sh [deleted file]
ico/missing [deleted file]
ico/objcube.h [deleted file]
ico/objico.h [deleted file]
ico/objocta.h [deleted file]
ico/objplane.h [deleted file]
ico/objpyr.h [deleted file]
ico/polyinfo.h [deleted file]
luit/COPYING [new file with mode: 0644]
luit/ChangeLog [new file with mode: 0644]
luit/INSTALL [moved from xcalc/INSTALL with 100% similarity]
luit/Makefile.am [new file with mode: 0644]
luit/Makefile.in [new file with mode: 0644]
luit/README [new file with mode: 0644]
luit/acinclude.m4 [new file with mode: 0644]
luit/aclocal.m4 [moved from xcalc/aclocal.m4 with 95% similarity]
luit/charset.c [new file with mode: 0644]
luit/charset.h [new file with mode: 0644]
luit/config.guess [moved from xedit/config.guess with 99% similarity, mode: 0644]
luit/config.h.in [new file with mode: 0644]
luit/config.sub [moved from bitmap/config.sub with 93% similarity, mode: 0644]
luit/configure [new file with mode: 0755]
luit/configure.ac [new file with mode: 0644]
luit/depcomp [moved from xman/depcomp with 100% similarity]
luit/install-sh [moved from xman/install-sh with 100% similarity]
luit/iso2022.c [new file with mode: 0644]
luit/iso2022.h [new file with mode: 0644]
luit/locale.c [new file with mode: 0644]
luit/luit.c [new file with mode: 0644]
luit/luit.h [new file with mode: 0644]
luit/man/Makefile.am [new file with mode: 0644]
luit/man/Makefile.in [new file with mode: 0644]
luit/man/luit.man [new file with mode: 0644]
luit/missing [moved from xman/missing with 100% similarity]
luit/other.c [new file with mode: 0644]
luit/other.h [new file with mode: 0644]
luit/parser.c [new file with mode: 0644]
luit/parser.h [new file with mode: 0644]
luit/sys.c [new file with mode: 0644]
luit/sys.h [new file with mode: 0644]
oclock/AUTHORS [deleted file]
oclock/COPYING
oclock/ChangeLog
oclock/Clock.c
oclock/INSTALL
oclock/Makefile.am
oclock/Makefile.in
oclock/NEWS [deleted file]
oclock/README
oclock/aclocal.m4
oclock/app-defaults/Clock-color [moved from oclock/Clock-color.ad with 100% similarity]
oclock/compile [deleted file]
oclock/config.guess
oclock/config.h.in
oclock/config.sub
oclock/configure
oclock/configure.ac
oclock/depcomp
oclock/install-sh
oclock/missing
oclock/mkinstalldirs [deleted file]
oclock/oclock.c
oclock/transform.c
packaging/xorg-x11-apps.spec
x11perf-1.4.1-x11perf-datadir-cleanups.patch [new file with mode: 0644]
x11perf/AUTHORS [deleted file]
x11perf/COPYING [changed mode: 0755->0644]
x11perf/ChangeLog [changed mode: 0755->0644]
x11perf/INSTALL [changed mode: 0755->0644]
x11perf/Makefile.am [changed mode: 0755->0644]
x11perf/Makefile.in [changed mode: 0755->0644]
x11perf/NEWS [deleted file]
x11perf/README [changed mode: 0755->0644]
x11perf/Xmark [changed mode: 0755->0644]
x11perf/Xmark.man [changed mode: 0755->0644]
x11perf/aclocal.m4
x11perf/bitmaps.c [changed mode: 0755->0644]
x11perf/bitmaps.h [changed mode: 0755->0644]
x11perf/config.guess [changed mode: 0755->0644]
x11perf/config.h.in [changed mode: 0755->0644]
x11perf/config.sub [changed mode: 0755->0644]
x11perf/configure
x11perf/configure.ac [changed mode: 0755->0644]
x11perf/do_arcs.c [changed mode: 0755->0644]
x11perf/do_blt.c [changed mode: 0755->0644]
x11perf/do_complex.c [changed mode: 0755->0644]
x11perf/do_dots.c [changed mode: 0755->0644]
x11perf/do_lines.c [changed mode: 0755->0644]
x11perf/do_movewin.c [changed mode: 0755->0644]
x11perf/do_rects.c [changed mode: 0755->0644]
x11perf/do_segs.c [changed mode: 0755->0644]
x11perf/do_simple.c [changed mode: 0755->0644]
x11perf/do_tests.c [changed mode: 0755->0644]
x11perf/do_text.c [changed mode: 0755->0644]
x11perf/do_traps.c [changed mode: 0755->0644]
x11perf/do_tris.c [changed mode: 0755->0644]
x11perf/do_valgc.c [changed mode: 0755->0644]
x11perf/do_windows.c [changed mode: 0755->0644]
x11perf/fillblnk [changed mode: 0755->0644]
x11perf/perfboth [changed mode: 0755->0644]
x11perf/perfratio [changed mode: 0755->0644]
x11perf/x11pcomp.cpp [changed mode: 0755->0644]
x11perf/x11perf.c [changed mode: 0755->0644]
x11perf/x11perf.h [changed mode: 0755->0644]
x11perf/x11perf.man [changed mode: 0755->0644]
x11perf/x11perfcomp.man [changed mode: 0755->0644]
xbiff-1.0.2-xmu-configure.patch [new file with mode: 0644]
xcalc/COPYING [deleted file]
xcalc/ChangeLog [deleted file]
xcalc/actions.c [deleted file]
xcalc/app-defaults/XCalc [deleted file]
xcalc/app-defaults/XCalc-color [deleted file]
xcalc/math.c [deleted file]
xcalc/xcalc.c [deleted file]
xcalc/xcalc.h [deleted file]
xcalc/xcalc.man [deleted file]
xclipboard/AUTHORS [deleted file]
xclipboard/COPYING
xclipboard/ChangeLog
xclipboard/INSTALL
xclipboard/Makefile.am
xclipboard/Makefile.in
xclipboard/NEWS [deleted file]
xclipboard/aclocal.m4
xclipboard/app-defaults/XClipboard
xclipboard/config.guess [changed mode: 0755->0644]
xclipboard/config.h.in
xclipboard/config.sub [changed mode: 0755->0644]
xclipboard/configure
xclipboard/configure.ac
xclipboard/xclipboard.c
xclipboard/xclipboard.man
xclipboard/xcutsel.c
xclipboard/xcutsel.man
xclock/AUTHORS [deleted file]
xclock/COPYING
xclock/ChangeLog
xclock/Clock.c
xclock/INSTALL
xclock/Makefile.am
xclock/Makefile.in
xclock/NEWS [deleted file]
xclock/aclocal.m4
xclock/config.guess [changed mode: 0755->0644]
xclock/config.sub [changed mode: 0755->0644]
xclock/configure
xclock/configure.ac
xclock/xclock.c
xconsole-1.0.3-streams-me-softer.patch [new file with mode: 0644]
xconsole/AUTHORS [deleted file]
xconsole/COPYING
xconsole/ChangeLog
xconsole/INSTALL
xconsole/Makefile.am
xconsole/Makefile.in
xconsole/NEWS [deleted file]
xconsole/README
xconsole/aclocal.m4
xconsole/app-defaults/XConsole [moved from xconsole/XConsole.ad with 100% similarity]
xconsole/config.guess [changed mode: 0755->0644]
xconsole/config.h.in
xconsole/config.sub [changed mode: 0755->0644]
xconsole/configure
xconsole/configure.ac
xconsole/depcomp
xconsole/install-sh
xconsole/missing
xconsole/xconsole.c
xcursorgen/AUTHORS [changed mode: 0755->0644]
xcursorgen/COPYING [changed mode: 0755->0644]
xcursorgen/ChangeLog [changed mode: 0755->0644]
xcursorgen/INSTALL [changed mode: 0755->0644]
xcursorgen/Makefile.am [changed mode: 0755->0644]
xcursorgen/Makefile.in [changed mode: 0755->0644]
xcursorgen/NEWS [deleted file]
xcursorgen/README [changed mode: 0755->0644]
xcursorgen/aclocal.m4 [changed mode: 0755->0644]
xcursorgen/config.guess [changed mode: 0755->0644]
xcursorgen/config.h.in [changed mode: 0755->0644]
xcursorgen/config.sub [changed mode: 0755->0644]
xcursorgen/configure.ac [changed mode: 0755->0644]
xcursorgen/xcursorgen.c [changed mode: 0755->0644]
xcursorgen/xcursorgen.man [changed mode: 0755->0644]
xditview/AUTHORS [deleted file]
xditview/COPYING [deleted file]
xditview/ChangeLog [deleted file]
xditview/Dvi.c [deleted file]
xditview/Dvi.h [deleted file]
xditview/DviChar.c [deleted file]
xditview/DviChar.h [deleted file]
xditview/DviP.h [deleted file]
xditview/Makefile.am [deleted file]
xditview/Makefile.in [deleted file]
xditview/Menu.h [deleted file]
xditview/NEWS [deleted file]
xditview/README [deleted file]
xditview/XFontName.c [deleted file]
xditview/XFontName.h [deleted file]
xditview/Xditview-chrtr.ad [deleted file]
xditview/Xditview.ad [deleted file]
xditview/aclocal.m4 [deleted file]
xditview/compile [deleted file]
xditview/config.guess [deleted file]
xditview/config.h.in [deleted file]
xditview/config.sub [deleted file]
xditview/configure [deleted file]
xditview/depcomp [deleted file]
xditview/draw.c [deleted file]
xditview/font.c [deleted file]
xditview/install-sh [deleted file]
xditview/ldblarrow [deleted file]
xditview/lex.c [deleted file]
xditview/missing [deleted file]
xditview/mkinstalldirs [deleted file]
xditview/page.c [deleted file]
xditview/parse.c [deleted file]
xditview/rdblarrow [deleted file]
xditview/xdit.bm [deleted file]
xditview/xdit_mask.bm [deleted file]
xditview/xditview.c [deleted file]
xditview/xditview.man [deleted file]
xedit/AUTHORS [deleted file]
xedit/COPYING [deleted file]
xedit/ChangeLog [deleted file]
xedit/INSTALL [deleted file]
xedit/Makefile.am [deleted file]
xedit/Makefile.in [deleted file]
xedit/NEWS [deleted file]
xedit/README [deleted file]
xedit/app-defaults/Xedit-color.ad [deleted file]
xedit/app-defaults/Xedit-noxprint.ad [deleted file]
xedit/app-defaults/Xedit-sample [deleted file]
xedit/app-defaults/Xedit-xprint.ad [deleted file]
xedit/commands.c [deleted file]
xedit/compile [deleted file]
xedit/config.h.in [deleted file]
xedit/configure.ac [deleted file]
xedit/hash.c [deleted file]
xedit/hook.c [deleted file]
xedit/ispell.c [deleted file]
xedit/lisp.c [deleted file]
xedit/lisp/README [deleted file]
xedit/lisp/TODO [deleted file]
xedit/lisp/bytecode.c [deleted file]
xedit/lisp/bytecode.h [deleted file]
xedit/lisp/compile.c [deleted file]
xedit/lisp/core.c [deleted file]
xedit/lisp/core.h [deleted file]
xedit/lisp/debugger.c [deleted file]
xedit/lisp/debugger.h [deleted file]
xedit/lisp/env.c [deleted file]
xedit/lisp/format.c [deleted file]
xedit/lisp/format.h [deleted file]
xedit/lisp/hash.c [deleted file]
xedit/lisp/hash.h [deleted file]
xedit/lisp/helper.c [deleted file]
xedit/lisp/helper.h [deleted file]
xedit/lisp/internal.h [deleted file]
xedit/lisp/io.c [deleted file]
xedit/lisp/io.h [deleted file]
xedit/lisp/lisp.c [deleted file]
xedit/lisp/lisp.h [deleted file]
xedit/lisp/lsp.c [deleted file]
xedit/lisp/math.c [deleted file]
xedit/lisp/math.h [deleted file]
xedit/lisp/mathimp.c [deleted file]
xedit/lisp/modules/indent.lsp [deleted file]
xedit/lisp/modules/lisp.lsp [deleted file]
xedit/lisp/modules/progmodes/auto.lsp [deleted file]
xedit/lisp/modules/progmodes/c.lsp [deleted file]
xedit/lisp/modules/progmodes/html.lsp [deleted file]
xedit/lisp/modules/progmodes/imake.lsp [deleted file]
xedit/lisp/modules/progmodes/lisp.lsp [deleted file]
xedit/lisp/modules/progmodes/make.lsp [deleted file]
xedit/lisp/modules/progmodes/man.lsp [deleted file]
xedit/lisp/modules/progmodes/patch.lsp [deleted file]
xedit/lisp/modules/progmodes/perl.lsp [deleted file]
xedit/lisp/modules/progmodes/python.lsp [deleted file]
xedit/lisp/modules/progmodes/rpm.lsp [deleted file]
xedit/lisp/modules/progmodes/sgml.lsp [deleted file]
xedit/lisp/modules/progmodes/sh.lsp [deleted file]
xedit/lisp/modules/progmodes/xconf.lsp [deleted file]
xedit/lisp/modules/progmodes/xlog.lsp [deleted file]
xedit/lisp/modules/progmodes/xrdb.lsp [deleted file]
xedit/lisp/modules/psql.c [deleted file]
xedit/lisp/modules/syntax.lsp [deleted file]
xedit/lisp/modules/x11.c [deleted file]
xedit/lisp/modules/xaw.c [deleted file]
xedit/lisp/modules/xedit.lsp [deleted file]
xedit/lisp/modules/xt.c [deleted file]
xedit/lisp/mp/mp.c [deleted file]
xedit/lisp/mp/mp.h [deleted file]
xedit/lisp/mp/mpi.c [deleted file]
xedit/lisp/mp/mpr.c [deleted file]
xedit/lisp/package.c [deleted file]
xedit/lisp/package.h [deleted file]
xedit/lisp/pathname.c [deleted file]
xedit/lisp/pathname.h [deleted file]
xedit/lisp/private.h [deleted file]
xedit/lisp/re/README [deleted file]
xedit/lisp/re/re.c [deleted file]
xedit/lisp/re/re.h [deleted file]
xedit/lisp/re/rec.c [deleted file]
xedit/lisp/re/reo.c [deleted file]
xedit/lisp/re/rep.h [deleted file]
xedit/lisp/re/tests.c [deleted file]
xedit/lisp/re/tests.txt [deleted file]
xedit/lisp/read.c [deleted file]
xedit/lisp/read.h [deleted file]
xedit/lisp/regex.c [deleted file]
xedit/lisp/regex.h [deleted file]
xedit/lisp/require.c [deleted file]
xedit/lisp/require.h [deleted file]
xedit/lisp/stream.c [deleted file]
xedit/lisp/stream.h [deleted file]
xedit/lisp/string.c [deleted file]
xedit/lisp/string.h [deleted file]
xedit/lisp/struct.c [deleted file]
xedit/lisp/struct.h [deleted file]
xedit/lisp/test/hello.lsp [deleted file]
xedit/lisp/test/list.lsp [deleted file]
xedit/lisp/test/math.lsp [deleted file]
xedit/lisp/test/psql-1.lsp [deleted file]
xedit/lisp/test/psql-2.lsp [deleted file]
xedit/lisp/test/psql-3.lsp [deleted file]
xedit/lisp/test/regex.lsp [deleted file]
xedit/lisp/test/stream.lsp [deleted file]
xedit/lisp/test/widgets.lsp [deleted file]
xedit/lisp/time.c [deleted file]
xedit/lisp/time.h [deleted file]
xedit/lisp/write.c [deleted file]
xedit/lisp/write.h [deleted file]
xedit/lisp/xedit.c [deleted file]
xedit/lisp/xedit.h [deleted file]
xedit/options.c [deleted file]
xedit/print.c [deleted file]
xedit/print.h [deleted file]
xedit/printdialog.c [deleted file]
xedit/printdialog.h [deleted file]
xedit/printdialogprivates.h [deleted file]
xedit/realpath.c [deleted file]
xedit/strcasecmp.c [deleted file]
xedit/tags.c [deleted file]
xedit/util.c [deleted file]
xedit/util.h [deleted file]
xedit/xedit.c [deleted file]
xedit/xedit.h [deleted file]
xedit/xedit.man [deleted file]
xeyes/COPYING
xeyes/ChangeLog
xeyes/Eyes.c
xeyes/Eyes.h
xeyes/EyesP.h
xeyes/INSTALL
xeyes/Makefile.am
xeyes/Makefile.in
xeyes/aclocal.m4
xeyes/config.guess [changed mode: 0755->0644]
xeyes/config.h.in
xeyes/config.sub [changed mode: 0755->0644]
xeyes/configure
xeyes/configure.ac
xeyes/transform.c
xeyes/transform.h
xeyes/xeyes.c
xeyes/xeyes.man
xfd/COPYING [moved from xmore/xmore.h with 70% similarity]
xfd/ChangeLog [new file with mode: 0644]
xfd/INSTALL [moved from xditview/INSTALL with 60% similarity]
xfd/Makefile.am [moved from xman/Makefile.am with 52% similarity]
xfd/Makefile.in [new file with mode: 0644]
xfd/README [moved from xcalc/README with 72% similarity]
xfd/aclocal.m4 [moved from bitmap/aclocal.m4 with 94% similarity]
xfd/app-defaults/Xfd [new file with mode: 0644]
xfd/config.guess [moved from bitmap/config.guess with 93% similarity, mode: 0644]
xfd/config.h.in [moved from bitmap/config.h.in with 90% similarity]
xfd/config.sub [moved from xgc/config.sub with 93% similarity, mode: 0644]
xfd/configure [moved from bitmap/configure with 88% similarity]
xfd/configure.ac [moved from bitmap/configure.ac with 53% similarity]
xfd/depcomp [moved from xgc/depcomp with 100% similarity]
xfd/grid.c [new file with mode: 0644]
xfd/grid.h [new file with mode: 0644]
xfd/gridP.h [new file with mode: 0644]
xfd/install-sh [moved from xgc/install-sh with 100% similarity]
xfd/m4/ax_define_dir.m4 [new file with mode: 0644]
xfd/missing [moved from xgc/missing with 100% similarity]
xfd/xfd.c [new file with mode: 0644]
xfd/xfd.man [new file with mode: 0644]
xfontsel/COPYING [moved from ico/COPYING with 63% similarity]
xfontsel/ChangeLog [new file with mode: 0644]
xfontsel/INSTALL [moved from xmore/INSTALL with 60% similarity]
xfontsel/Makefile.am [moved from xgc/Makefile.am with 50% similarity]
xfontsel/Makefile.in [moved from ico/Makefile.in with 61% similarity]
xfontsel/README [moved from xman/README with 61% similarity]
xfontsel/ULabel.c [new file with mode: 0644]
xfontsel/ULabel.h [new file with mode: 0644]
xfontsel/ULabelP.h [new file with mode: 0644]
xfontsel/aclocal.m4 [new file with mode: 0644]
xfontsel/app-defaults/XFontSel [new file with mode: 0644]
xfontsel/config.guess [new file with mode: 0644]
xfontsel/config.h.in [moved from xcalc/config.h.in with 100% similarity]
xfontsel/config.sub [new file with mode: 0644]
xfontsel/configure [moved from xedit/configure with 79% similarity]
xfontsel/configure.ac [moved from xgc/configure.ac with 77% similarity]
xfontsel/depcomp [moved from xedit/depcomp with 100% similarity]
xfontsel/install-sh [moved from xedit/install-sh with 100% similarity]
xfontsel/missing [moved from xedit/missing with 100% similarity]
xfontsel/xfontsel.c [new file with mode: 0644]
xfontsel/xfontsel.man [new file with mode: 0644]
xgc/AUTHORS [deleted file]
xgc/Bugs [deleted file]
xgc/COPYING [deleted file]
xgc/ChangeLog [deleted file]
xgc/INSTALL [deleted file]
xgc/NEWS [deleted file]
xgc/Written/FilledRects [deleted file]
xgc/Written/Interface [deleted file]
xgc/Written/Jim [deleted file]
xgc/Written/Notes [deleted file]
xgc/Written/Notes2 [deleted file]
xgc/Written/Outline [deleted file]
xgc/Written/Widget [deleted file]
xgc/app-defaults/Xgc [deleted file]
xgc/app-defaults/Xgc-color [deleted file]
xgc/choice.c [deleted file]
xgc/configure [deleted file]
xgc/constants.h [deleted file]
xgc/dashlist.c [deleted file]
xgc/getfile.c [deleted file]
xgc/gram.c [deleted file]
xgc/gram.h [deleted file]
xgc/gram.y [deleted file]
xgc/interpret.c [deleted file]
xgc/lex.c [deleted file]
xgc/lex.l [deleted file]
xgc/main.c [deleted file]
xgc/planemask.c [deleted file]
xgc/record.c [deleted file]
xgc/testfrac.c [deleted file]
xgc/tests.c [deleted file]
xgc/text.c [deleted file]
xgc/tile [deleted file]
xgc/xgc.h [deleted file]
xgc/xgc.man [deleted file]
xgc/ylwrap [deleted file]
xload/AUTHORS [deleted file]
xload/COPYING
xload/ChangeLog
xload/INSTALL
xload/Makefile.am
xload/Makefile.in
xload/NEWS [deleted file]
xload/README
xload/aclocal.m4
xload/app-defaults/XLoad [moved from xload/XLoad.ad with 100% similarity]
xload/compile [deleted file]
xload/config.guess [changed mode: 0755->0644]
xload/config.h.in
xload/config.sub [changed mode: 0755->0644]
xload/configure
xload/configure.ac
xload/depcomp
xload/get_load.c
xload/get_rload.c
xload/install-sh
xload/m4/ax_define_dir.m4 [new file with mode: 0644]
xload/missing
xload/mkinstalldirs [new file with mode: 0755]
xload/xload.c
xload/xload.h
xload/xload.man
xlogo/COPYING
xlogo/ChangeLog
xlogo/Makefile.am
xlogo/Makefile.in
xlogo/aclocal.m4
xlogo/config.guess [changed mode: 0755->0644]
xlogo/config.sub [changed mode: 0755->0644]
xlogo/configure
xlogo/configure.ac
xmag/AUTHORS [deleted file]
xmag/COPYING
xmag/ChangeLog
xmag/CutPaste.c
xmag/CutPaste.h
xmag/INSTALL
xmag/Makefile.am
xmag/Makefile.in
xmag/NEWS [deleted file]
xmag/README
xmag/RootWin.c
xmag/RootWin.h
xmag/RootWinP.h
xmag/Scale.c
xmag/Scale.h
xmag/ScaleP.h
xmag/aclocal.m4
xmag/app-defaults/Xmag
xmag/config.guess [changed mode: 0755->0644]
xmag/config.h.in
xmag/config.sub [changed mode: 0755->0644]
xmag/configure
xmag/configure.ac
xmag/depcomp
xmag/install-sh
xmag/missing
xmag/xmag.c
xmag/xmag.man
xman/AUTHORS [deleted file]
xman/COPYING [deleted file]
xman/ChangeLog [deleted file]
xman/NEWS [deleted file]
xman/ScrollByL.c [deleted file]
xman/ScrollByL.h [deleted file]
xman/ScrollByLP.h [deleted file]
xman/app-defaults/Xman [deleted file]
xman/buttons.c [deleted file]
xman/configure.ac [deleted file]
xman/defs.h [deleted file]
xman/globals.h [deleted file]
xman/handler.c [deleted file]
xman/help.c [deleted file]
xman/icon_help.h [deleted file]
xman/icon_open.h [deleted file]
xman/iconclosed.h [deleted file]
xman/main.c [deleted file]
xman/man.c [deleted file]
xman/man.h [deleted file]
xman/misc.c [deleted file]
xman/search.c [deleted file]
xman/tkfuncs.c [deleted file]
xman/vendor.c [deleted file]
xman/vendor.h [deleted file]
xman/version.h [deleted file]
xman/xman.help [deleted file]
xman/xman.man [deleted file]
xmessage/COPYING [new file with mode: 0644]
xmessage/ChangeLog [new file with mode: 0644]
xmessage/INSTALL [new file with mode: 0644]
xmessage/Makefile.am [moved from xcalc/Makefile.am with 86% similarity]
xmessage/Makefile.in [moved from xcalc/Makefile.in with 96% similarity]
xmessage/README [new file with mode: 0644]
xmessage/aclocal.m4 [moved from xedit/aclocal.m4 with 97% similarity]
xmessage/app-defaults/Xmessage [new file with mode: 0644]
xmessage/app-defaults/Xmessage-color [new file with mode: 0644]
xmessage/config.guess [moved from xcalc/config.guess with 100% similarity]
xmessage/config.h.in [moved from xgc/config.h.in with 93% similarity]
xmessage/config.sub [moved from xcalc/config.sub with 100% similarity]
xmessage/configure [moved from xcalc/configure with 92% similarity]
xmessage/configure.ac [moved from xcalc/configure.ac with 83% similarity]
xmessage/depcomp [moved from xcalc/depcomp with 100% similarity]
xmessage/install-sh [moved from xcalc/install-sh with 100% similarity]
xmessage/makeform.c [new file with mode: 0644]
xmessage/missing [moved from xcalc/missing with 100% similarity]
xmessage/readfile.c [new file with mode: 0644]
xmessage/readfile.h [new file with mode: 0644]
xmessage/xmessage.c [new file with mode: 0644]
xmessage/xmessage.h [new file with mode: 0644]
xmessage/xmessage.man [new file with mode: 0644]
xmore/AUTHORS [deleted file]
xmore/ChangeLog [deleted file]
xmore/Makefile.in [deleted file]
xmore/NEWS [deleted file]
xmore/README [deleted file]
xmore/XMore.ad [deleted file]
xmore/aclocal.m4 [deleted file]
xmore/compile [deleted file]
xmore/config.guess [deleted file]
xmore/config.h.in [deleted file]
xmore/config.sub [deleted file]
xmore/configure [deleted file]
xmore/configure.ac [deleted file]
xmore/depcomp [deleted file]
xmore/install-sh [deleted file]
xmore/missing [deleted file]
xmore/mkinstalldirs [deleted file]
xmore/print.c [deleted file]
xmore/print.h [deleted file]
xmore/printdialog.c [deleted file]
xmore/printdialog.h [deleted file]
xmore/printdialogprivates.h [deleted file]
xmore/xmore.c [deleted file]
xmore/xmore.man [deleted file]
xmore/xmore.sgml [deleted file]
xpr/AUTHORS [moved from xwud/AUTHORS with 100% similarity]
xpr/COPYING [moved from xmore/COPYING with 100% similarity]
xpr/ChangeLog [new file with mode: 0644]
xpr/INSTALL [moved from xman/INSTALL with 100% similarity]
xpr/Makefile.am [moved from ico/Makefile.am with 76% similarity]
xpr/Makefile.in [moved from xman/Makefile.in with 82% similarity]
xpr/NEWS [moved from xwud/NEWS with 100% similarity]
xpr/README [moved from xgc/README with 70% similarity]
xpr/aclocal.m4 [moved from xman/aclocal.m4 with 100% similarity]
xpr/autogen.sh [moved from xcalc/autogen.sh with 100% similarity]
xpr/config.guess [moved from xman/config.guess with 100% similarity]
xpr/config.h.in [new file with mode: 0644]
xpr/config.sub [moved from xman/config.sub with 100% similarity]
xpr/configure [moved from xman/configure with 92% similarity]
xpr/configure.ac [moved from ico/configure.ac with 78% similarity]
xpr/depcomp [moved from bitmap/depcomp with 100% similarity]
xpr/install-sh [moved from bitmap/install-sh with 100% similarity]
xpr/lncmd.h [moved from xman/globals.c with 61% similarity]
xpr/missing [moved from bitmap/missing with 100% similarity]
xpr/pmp.h [new file with mode: 0644]
xpr/x2jet.c [new file with mode: 0644]
xpr/x2pmp.c [new file with mode: 0644]
xpr/xdpr.man [new file with mode: 0644]
xpr/xdpr.script [new file with mode: 0644]
xpr/xpr.c [new file with mode: 0644]
xpr/xpr.h [new file with mode: 0644]
xpr/xpr.man [new file with mode: 0644]
xvidtune/COPYING [new file with mode: 0644]
xvidtune/ChangeLog [new file with mode: 0644]
xvidtune/INSTALL [new file with mode: 0644]
xvidtune/Makefile.am [moved from xmore/Makefile.am with 73% similarity]
xvidtune/Makefile.in [moved from xgc/Makefile.in with 85% similarity]
xvidtune/README [moved from bitmap/README with 71% similarity]
xvidtune/aclocal.m4 [moved from xgc/aclocal.m4 with 96% similarity]
xvidtune/app-defaults/Xvidtune [new file with mode: 0644]
xvidtune/config.guess [moved from xgc/config.guess with 94% similarity]
xvidtune/config.h.in [moved from xman/config.h.in with 70% similarity]
xvidtune/config.sub [moved from xedit/config.sub with 98% similarity]
xvidtune/configure [new file with mode: 0755]
xvidtune/configure.ac [moved from xditview/configure.ac with 65% similarity]
xvidtune/depcomp [new file with mode: 0755]
xvidtune/install-sh [new file with mode: 0755]
xvidtune/missing [new file with mode: 0755]
xvidtune/xvidtune.c [new file with mode: 0644]
xvidtune/xvidtune.man [new file with mode: 0644]
xwd/AUTHORS [deleted file]
xwd/COPYING [changed mode: 0755->0644]
xwd/ChangeLog [changed mode: 0755->0644]
xwd/INSTALL [changed mode: 0755->0644]
xwd/Makefile.am [changed mode: 0755->0644]
xwd/Makefile.in [changed mode: 0755->0644]
xwd/NEWS [deleted file]
xwd/README [changed mode: 0755->0644]
xwd/aclocal.m4 [changed mode: 0755->0644]
xwd/clientwin.c [changed mode: 0755->0644]
xwd/clientwin.h [changed mode: 0755->0644]
xwd/config.guess [changed mode: 0755->0644]
xwd/config.h.in [changed mode: 0755->0644]
xwd/config.sub [changed mode: 0755->0644]
xwd/configure.ac [changed mode: 0755->0644]
xwd/dsimple.c [changed mode: 0755->0644]
xwd/dsimple.h [changed mode: 0755->0644]
xwd/list.c [changed mode: 0755->0644]
xwd/list.h [changed mode: 0755->0644]
xwd/multiVis.c [changed mode: 0755->0644]
xwd/multiVis.h [changed mode: 0755->0644]
xwd/wsutils.h [changed mode: 0755->0644]
xwd/xwd.c [changed mode: 0755->0644]
xwd/xwd.man [changed mode: 0755->0644]
xwud/COPYING [changed mode: 0755->0644]
xwud/ChangeLog [changed mode: 0755->0644]
xwud/INSTALL [changed mode: 0755->0644]
xwud/Makefile.am [changed mode: 0755->0644]
xwud/Makefile.in [changed mode: 0755->0644]
xwud/README [changed mode: 0755->0644]
xwud/aclocal.m4 [changed mode: 0755->0644]
xwud/config.guess [changed mode: 0755->0644]
xwud/config.h.in [changed mode: 0755->0644]
xwud/config.sub [changed mode: 0755->0644]
xwud/configure.ac [changed mode: 0755->0644]
xwud/xwud.c [changed mode: 0755->0644]
xwud/xwud.man [changed mode: 0755->0644]

diff --git a/bitmap/AUTHORS b/bitmap/AUTHORS
deleted file mode 100644 (file)
index 623e682..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-bitmap:                Davor Matic, MIT X Consortium
-atobm/bmtoa:   Jim Fulton, MIT X Consortium
diff --git a/bitmap/BitEdit.c b/bitmap/BitEdit.c
deleted file mode 100644 (file)
index 60ef2ab..0000000
+++ /dev/null
@@ -1,1122 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Paned.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/MenuButton.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/SmeLine.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xmu/SysUtil.h>
-#include "Bitmap.h"
-
-#include <X11/bitmaps/xlogo16>
-
-static char *usage = "[-options ...] filename\n\
-\n\
-where options include all standard toolkit options plus:\n\
-     -size WIDTHxHEIGHT\n\
-     -sw dimension\n\
-     -sh dimension\n\
-     -gt dimension\n\
-     -grid, +grid\n\
-     -axes, +axes\n\
-     -dashed, +dashed\n\
-     -stippled, +stippled\n\
-     -proportional, +proportional\n\
-     -basename basename\n\
-     -dashes filename\n\
-     -stipple filename\n\
-     -hl color\n\
-     -fr color\n\
-\n\
-The default WIDTHxHEIGHT is 16x16.\n";
-
-static XrmOptionDescRec options[] = {
-  { "-axes",       "*bitmap.axes",         XrmoptionNoArg,     "True"},
-  { "+axes",       "*bitmap.axes",         XrmoptionNoArg,     "False"},
-  { "-basename",    "*bitmap.basename",            XrmoptionSepArg,    NULL},
-  { "-dashed",     "*bitmap.dashed",       XrmoptionNoArg,     "True"},
-  { "+dashed",     "*bitmap.dashed",       XrmoptionNoArg,     "False"},
-  { "-dashes",     "*bitmap.dashes",       XrmoptionSepArg,    NULL},
-  { "-fr",         "*bitmap.frame",        XrmoptionSepArg,    NULL},
-  { "-gt",         "*bitmap.gridTolerance",XrmoptionSepArg,    NULL},
-  { "-grid",       "*bitmap.grid",         XrmoptionNoArg,     "True"},
-  { "+grid",       "*bitmap.grid",         XrmoptionNoArg,     "False"},
-  { "-hl",         "*bitmap.highlight",    XrmoptionSepArg,    NULL},
-  { "-proportional","*bitmap.proportional", XrmoptionNoArg,    "True"},
-  { "+proportional","*bitmap.proportional", XrmoptionNoArg,    "False"},
-  { "-size",       "*bitmap.size",         XrmoptionSepArg,    NULL},
-  { "-sh",         "*bitmap.squareHeight", XrmoptionSepArg,    NULL},
-  { "-sw",         "*bitmap.squareWidth",  XrmoptionSepArg,    NULL},
-  { "-stipple",            "*bitmap.stipple",      XrmoptionSepArg,    NULL},
-  { "-stippled",    "*bitmap.stippled",            XrmoptionNoArg,     "True"},
-  { "+stippled",    "*bitmap.stippled",            XrmoptionNoArg,     "False"},
-};
-
-typedef struct {
-  int             id;
-  String          name;
-  Boolean         trap;
-  Widget          widget;
-  } ButtonRec;
-
-static ButtonRec file_menu[] = {
-#define New 101
-  {New, "new", True},
-#define Load 102
-  {Load, "load", True},
-#define Insert 103
-  {Insert, "insert", True},
-#define Save 104
-  {Save, "save", True},
-#define SaveAs 105
-  {SaveAs, "saveAs", True},
-#define Resize 106
-  {Resize, "resize", True},
-#define Rescale 107
-  {Rescale, "rescale", True},
-#define Filename 108
-  {Filename, "filename", True},
-#define Basename 109
-  {Basename, "basename", True},
-#define Dummy -1
-  {Dummy, "line", False},
-#define Quit 110
-  {Quit, "quit", True},
-};
-
-static ButtonRec edit_menu[] = {
-#define Image 201
-  {Image, "image", True},
-#define Grid 203
-  {Grid, "grid", True},
-#define Dashed 204
-  {Dashed, "dashed", True},
-#define Axes 205
-  {Axes, "axes", True},
-#define Stippled 206
-  {Stippled, "stippled", True},
-#define Proportional 207
-  {Proportional, "proportional", True},
-#define Zoom 208
-  {Zoom, "zoom", True},
-/* Dummy */
-  {Dummy, "line", False},
-#define Cut 209
-  {Cut, "cut", True},
-#define Copy 210
-  {Copy, "copy", True},
-#define Paste 211
-  {Paste, "paste", True},
-};
-
-static ButtonRec buttons[] = {
-/*#define Clear 1*/
-  {Clear, "clear", False},
-/*#define Set 2*/
-  {Set, "set", False},
-/*#define Invert 3*/
-  {Invert, "invert", False},
-#define Mark 26
-  {Mark, "mark", True},
-#define Unmark 27
-  {Unmark, "unmark", False},
-#define CopyImm 4
-  {CopyImm, "copy", True},
-#define MoveImm 5
-  {MoveImm, "move", True},
-#define FlipHoriz 6
-  {FlipHoriz, "flipHoriz", False},
-#define Up 7
-  {Up, "up", False},
-#define FlipVert 8
-  {FlipVert, "flipVert", False},
-#define Left 9
-  {Left, "left", False},
-#define Fold 10
-  {Fold, "fold", False},
-#define Right 11
-  {Right, "right", False},
-#define RotateLeft 12
-  {RotateLeft, "rotateLeft", False},
-#define Down 13
-  {Down, "down", False},
-#define RotateRight 14
-  {RotateRight, "rotateRight", False},
-#define Point 15
-  {Point, "point", True},
-#define Curve 16
-  {Curve, "curve", True},
-#define Line 17
-  {Line, "line", True},
-#define Rectangle 18
-  {Rectangle, "rectangle", True},
-#define FilledRectangle 19
-  {FilledRectangle, "filledRectangle", True},
-#define Circle 20
-  {Circle, "circle", True},
-#define FilledCircle 21
-  {FilledCircle, "filledCircle", True},
-#define FloodFill 22
-  {FloodFill, "floodFill", True},
-#define SetHotSpot 23
-  {SetHotSpot, "setHotSpot", True},
-#define ClearHotSpot 24
-  {ClearHotSpot, "clearHotSpot", False},
-#define Undo 25
-  {Undo, "undo", False},
-};
-
-#include "Dialog.h"
-
-static Widget 
-    top_widget, 
-    parent_widget,
-    formy_widget,
-    fileMenu_widget,
-    editMenu_widget,
-    status_widget,
-    pane_widget, 
-    form_widget,
-    bitmap_widget,
-    image_shell,
-    box_widget,
-    normal_image_widget,
-    inverted_image_widget;
-static Boolean image_visible = False;
-static Pixmap check_mark;
-static Dialog input_dialog, error_dialog, qsave_dialog;
-static Time btime;
-static String filename = NULL, base_name = NULL, format;
-static char message[80];
-
-
-void FixMenu ( Widget w, XEvent *event, String *params, Cardinal *num_params );
-void SwitchImage ( void );
-void SwitchGrid( void );
-void SwitchDashed( void );
-void SwitchAxes( void );
-void SwitchStippled( void );
-void SwitchProportional( void );
-void SwitchZoom( void );
-void DoCut( void );
-void DoCopy( void );
-void DoPaste( void );
-void DoNew( void );
-void DoLoad( void );
-void DoInsert( void );
-void DoSave( void );
-void DoSaveAs( void );
-void DoResize( void );
-void DoRescale( void );
-void DoFilename( void );
-void DoBasename( void );
-void DoQuit ( Widget w, XEvent *event, String *params, Cardinal *num_params );
-
-static XtActionsRec actions_table[] = {
-  {"fix-menu", FixMenu},
-  {"switch-image", (XtActionProc)SwitchImage},
-  {"switch-grid", (XtActionProc)SwitchGrid},
-  {"switch-dashed", (XtActionProc)SwitchDashed},
-  {"switch-axes", (XtActionProc)SwitchAxes},
-  {"switch-stippled", (XtActionProc)SwitchStippled},
-  {"switch-proportional", (XtActionProc)SwitchProportional},
-  {"switch-zoom", (XtActionProc)SwitchZoom},
-  {"do-cut", (XtActionProc)DoCut},
-  {"do-copy", (XtActionProc)DoCopy},
-  {"do-paste", (XtActionProc)DoPaste},
-  {"do-new", (XtActionProc)DoNew},
-  {"do-load", (XtActionProc)DoLoad},
-  {"do-insert", (XtActionProc)DoInsert},
-  {"do-save", (XtActionProc)DoSave},
-  {"do-save-as", (XtActionProc)DoSaveAs},
-  {"do-resize", (XtActionProc)DoResize},
-  {"do-rescale", (XtActionProc)DoRescale},
-  {"do-filename", (XtActionProc)DoFilename},
-  {"do-basename", (XtActionProc)DoBasename},
-  {"do-quit", DoQuit}
-};
-
-static Atom wm_delete_window;
-
-static void 
-FixImage(void)
-{
-    Pixmap old_image, image;
-    int n;
-    Arg wargs[2];
-
-    if (!image_visible) return;
-    
-    n=0;
-    XtSetArg(wargs[n], XtNbitmap, &old_image); n++;
-    XtGetValues(normal_image_widget, wargs, n);
-    
-    
-    image = BWGetUnzoomedPixmap(bitmap_widget);
-    
-    n=0;
-    XtSetArg(wargs[n], XtNbitmap, image); n++;
-    XtSetValues(normal_image_widget, wargs, n);
-    XtSetValues(inverted_image_widget, wargs, n);
-
-    if (old_image != XtUnspecifiedPixmap)
-       XFreePixmap(XtDisplay(bitmap_widget), old_image);
-}
-
-static void 
-FixStatus(void)
-{
-    int n;
-    Arg wargs[2];
-    String str, label;
-
-    str = BWUnparseStatus(bitmap_widget);
-
-    n=0;
-    XtSetArg(wargs[n], XtNlabel, &label); n++;
-    XtGetValues(status_widget, wargs, n);
-
-    if (strcmp(str, label)) {
-      n = 0;
-      XtSetArg(wargs[n], XtNlabel, str); n++;
-      XtSetValues(status_widget, wargs, n);
-    }
-
-    /*XtFree(str); */
-}
-
-static void 
-FixUp(void)
-{
-  FixImage();
-  FixStatus();
-}
-
-static void 
-FixEntry(Widget w, int *id)
-{
-    int n;
-    Arg wargs[2];
-    Time dummy = 0;
-
-    n = 0;
-    
-    switch (*id) {
-       
-    case Image:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                image_visible ? check_mark : None); n++;
-       break;
-       
-    case Grid:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                BWQueryGrid(bitmap_widget) ? check_mark : None); n++;
-       break;
-       
-    case Dashed:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                BWQueryDashed(bitmap_widget) ? check_mark : None); n++;
-       break;
-       
-    case Axes:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                BWQueryAxes(bitmap_widget) ? check_mark : None); n++;
-       break;
-       
-    case Stippled:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                BWQueryStippled(bitmap_widget) ? check_mark : None); n++;
-       break;
-       
-    case Proportional:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                BWQueryProportional(bitmap_widget) ? check_mark : None); n++;
-       break;
-       
-    case Zoom:
-       XtSetArg(wargs[n], XtNleftBitmap, 
-                BWQueryZooming(bitmap_widget) ? check_mark : None); n++;
-       break;
-
-    case Copy:
-    case Cut:
-       XtSetArg(wargs[n], XtNsensitive, BWQueryMarked(bitmap_widget)); n++;
-       break;
-
-    case Paste:
-       XtSetArg(wargs[n], XtNsensitive, 
-                BWQuerySelection(bitmap_widget, dummy)); n++;
-       break;
-
-    default:
-       return;
-    }
-    
-    XtSetValues(w, wargs, n);
-}
-
-/* ARGSUSED */
-void FixMenu(Widget w, 
-            XEvent *event, 
-            String *params, 
-            Cardinal *num_params)
-{
-    int i;
-
-    btime = event->xbutton.time;
-    
-    for (i = 0; i < XtNumber(edit_menu); i++)
-       FixEntry(edit_menu[i].widget, &edit_menu[i].id);
-}
-
-static int zero = 0;
-#define Plain  (char *)&zero,sizeof(int)
-/* ARGSUSED */
-static void 
-TheCallback(Widget w,  /* not used */
-           XtPointer clientData, 
-           XtPointer callData)
-{
-    int *id = (int *)clientData;
-    switch (*id) {
-       
-    case New:
-      DoNew();
-      break;
-
-    case Load:
-      DoLoad();
-      break;
-       
-    case Insert:
-      DoInsert();
-      break;
-       
-    case Save:
-      DoSave();
-      break;
-       
-    case SaveAs:
-      DoSaveAs();
-      break;
-       
-    case Resize:
-      DoResize();
-      break;
-
-    case Rescale:
-      DoRescale();
-      break;
-
-    case Filename:
-      DoFilename();
-      break;
-
-    case Basename:
-      DoBasename();
-      break;
-       
-    case Image:
-      SwitchImage();
-      break;
-
-    case Grid:
-      SwitchGrid();
-      break;
-       
-    case Dashed:
-      SwitchDashed();
-      break;
-
-    case Axes:
-      SwitchAxes();
-      break;   
-
-    case Stippled:
-      SwitchStippled();
-      break;
-      
-    case Proportional:
-      SwitchProportional();
-      break;
-               
-    case Zoom:
-      SwitchZoom();
-      break;
-      
-    case Cut:
-      DoCut();
-      break;
-      
-    case Copy:
-      DoCopy();
-      break;
-      
-    case Paste:
-      DoPaste();
-      break;
-       
-    case Clear:
-       BWStoreToBuffer(bitmap_widget);
-       BWClear(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case Set:
-       BWStoreToBuffer(bitmap_widget);
-       BWSet(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-break;
-       
-    case Invert:
-       BWStoreToBuffer(bitmap_widget);
-       BWInvert(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-
-    case Mark:
-        BWRemoveAllRequests(bitmap_widget);
-        BWEngageRequest(bitmap_widget, MarkRequest, True, Plain);
-        break;
-
-    case Unmark:
-        BWUnmark(bitmap_widget);
-        break;
-
-    case CopyImm:
-       BWRemoveAllRequests(bitmap_widget);
-       if (BWQueryMarked(bitmap_widget)) {
-           BWAddRequest(bitmap_widget, MarkRequest, False, Plain);
-           BWEngageRequest(bitmap_widget, CopyRequest, True, Plain);
-       }
-       else {
-           BWEngageRequest(bitmap_widget, MarkRequest, False, Plain);
-           BWAddRequest(bitmap_widget, CopyRequest, True, Plain);
-       }
-       break;
-       
-    case MoveImm:
-       BWRemoveAllRequests(bitmap_widget);
-       if (BWQueryMarked(bitmap_widget)) {
-           BWAddRequest(bitmap_widget, MarkRequest, False, Plain);
-           BWEngageRequest(bitmap_widget, MoveRequest, True, Plain);
-       }
-       else {
-           BWEngageRequest(bitmap_widget, MarkRequest, False, Plain);
-           BWAddRequest(bitmap_widget, MoveRequest, True, Plain);
-       }
-       break;
-               
-    case Up:
-       BWStoreToBuffer(bitmap_widget);
-       BWUp(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case Down:
-       BWStoreToBuffer(bitmap_widget);
-       BWDown(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case Left:
-       BWStoreToBuffer(bitmap_widget);
-       BWLeft(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case Right:
-       BWStoreToBuffer(bitmap_widget);
-       BWRight(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case Fold:
-       BWStoreToBuffer(bitmap_widget);
-       BWFold(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case FlipHoriz:
-       BWStoreToBuffer(bitmap_widget);
-       BWFlipHoriz(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case FlipVert:
-       BWStoreToBuffer(bitmap_widget);
-       BWFlipVert(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case RotateRight:
-       BWStoreToBuffer(bitmap_widget);
-       BWRotateRight(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case RotateLeft:
-       BWStoreToBuffer(bitmap_widget);
-       BWRotateLeft(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-       
-    case Point:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, PointRequest, True, Plain);
-       break;
-
-    case Curve:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, CurveRequest, True, Plain);
-       break;
-       
-    case Line:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, LineRequest, True, Plain);
-       break;
-       
-    case Rectangle:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, RectangleRequest, True, Plain);
-       break;
-       
-    case FilledRectangle:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, FilledRectangleRequest, True, Plain);
-       break;
-       
-    case Circle:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, CircleRequest, True, Plain);
-       break;
-       
-    case FilledCircle:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, FilledCircleRequest, True, Plain);
-       break;
-       
-    case FloodFill:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, FloodFillRequest, True, Plain);
-       break;
-       
-    case SetHotSpot:
-       BWRemoveAllRequests(bitmap_widget);
-       BWEngageRequest(bitmap_widget, HotSpotRequest, True, Plain);
-       break;
-       
-    case ClearHotSpot:
-       BWStoreToBuffer(bitmap_widget);
-       BWClearHotSpot(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;
-
-    case Undo:
-       BWUndo(bitmap_widget);
-       BWChangeNotify(bitmap_widget);
-       BWSetChanged(bitmap_widget);
-       break;  
-
-    case Quit:
-      DoQuit(bitmap_widget, NULL, NULL, NULL);
-      break;   
-    } /* don't add anything below this line */
-}
-
-/* ARGSUSED */
-
-void SwitchImage(void)
-{
-  if (image_visible) {
-    XtPopdown(image_shell);
-    image_visible = False;
-  }
-  else {
-    Position image_x, image_y;
-    int n;
-    Arg wargs[3];
-    
-    XtTranslateCoords(bitmap_widget,
-                     10, 10, &image_x, &image_y);
-    
-    n = 0;
-    XtSetArg(wargs[n], XtNx, image_x); n++;
-    XtSetArg(wargs[n], XtNy, image_y); n++;
-    XtSetValues(image_shell, wargs, n);
-    
-    image_visible = True;
-    
-    FixImage();
-    XtPopup(image_shell, XtGrabNone);
-    FixImage();
-  }
-}
-
-void SwitchGrid(void)
-{
-  BWSwitchGrid(bitmap_widget);
-}
-
-void SwitchDashed(void)
-{
-  BWSwitchDashed(bitmap_widget);
-}
-
-void SwitchAxes(void)
-{
-  BWSwitchAxes(bitmap_widget);
-}
-
-void SwitchStippled(void)
-{
-  BWSwitchStippled(bitmap_widget); 
-}
-
-void SwitchProportional(void)
-{
-  BWSwitchProportional(bitmap_widget);
-}
-
-void SwitchZoom(void)
-{
-  if (BWQueryZooming(bitmap_widget)) {
-    BWZoomOut(bitmap_widget);
-    BWChangeNotify(bitmap_widget);
-  }
-  else {
-    if (BWQueryMarked(bitmap_widget)) {
-      BWStoreToBuffer(bitmap_widget);
-      BWZoomMarked(bitmap_widget);
-      BWChangeNotify(bitmap_widget);
-    }
-    else {
-      BWEngageRequest(bitmap_widget, ZoomInRequest, False, Plain);
-    }
-  }
-}
-
-void DoCut(void)
-{
-  BWStore(bitmap_widget);
-  BWStoreToBuffer(bitmap_widget);
-  BWClearMarked(bitmap_widget);
-  BWUnmark(bitmap_widget);
-  BWChangeNotify(bitmap_widget);
-  BWSetChanged(bitmap_widget);
-}
-
-void DoCopy(void)
-{
-  BWStore(bitmap_widget);
-  BWUnmark(bitmap_widget);
-}
-
-void DoPaste(void)
-{
-  BWRequestSelection(bitmap_widget, btime, TRUE); 
-  BWEngageRequest(bitmap_widget, RestoreRequest, False, Plain);
-}
-
-void DoNew(void)
-{
-  BWGetFilename(bitmap_widget, &filename);
-  if (PopupDialog(input_dialog, "New file:",
-                 filename, &filename, XtGrabExclusive) == Okay) {
-    BWChangeFilename(bitmap_widget, filename);
-    BWChangeBasename(bitmap_widget, filename);
-    BWStoreToBuffer(bitmap_widget);
-    BWClear(bitmap_widget);
-    BWClearHotSpot(bitmap_widget);
-    BWChangeNotify(bitmap_widget);
-    BWClearChanged(bitmap_widget);
-    BWUnmark(bitmap_widget);
-    FixStatus();
-  }
-}
-
-void DoLoad(void)
-{
-  if (BWQueryChanged(bitmap_widget)) {
-    BWGetFilename(bitmap_widget, &filename);
-  RetryLoadSave:
-    switch (PopupDialog(qsave_dialog, "Save file before loading?",
-                       filename, &filename, XtGrabExclusive)) {
-    case Yes:
-      if (BWWriteFile(bitmap_widget, filename, NULL)
-         != BitmapSuccess) {
-       XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
-       if (PopupDialog(error_dialog, message,
-                       NULL, NULL, XtGrabExclusive) == Retry)
-         goto RetryLoadSave;
-      }
-      break;
-      
-    case Cancel:
-      return;
-    }
-  }
-  BWGetFilepath(bitmap_widget, &filename);
- RetryLoad:
-  if (PopupDialog(input_dialog, "Load file:",
-                 filename, &filename, XtGrabExclusive) == Okay) {
-    if (BWReadFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
-      XmuSnprintf(message, sizeof(message), "Can't read file: %s", filename);
-      if (PopupDialog(error_dialog, message,
-                     NULL, NULL, XtGrabExclusive) == Retry)
-       goto RetryLoad;
-    }
-    else {
-      BWChangeNotify(bitmap_widget);
-      BWClearChanged(bitmap_widget);
-      FixStatus();
-    }
-  }
-}
-
-void DoInsert(void)
-{
-  BWGetFilepath(bitmap_widget, &filename);
- RetryInsert:
-  if (PopupDialog(input_dialog, "Insert file:",
-                 filename, &filename, XtGrabExclusive) == Okay) {
-    if (BWStoreFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
-      XmuSnprintf(message, sizeof(message), "Can't read file: %s", filename);
-      if (PopupDialog(error_dialog, message,
-                     NULL, NULL, XtGrabExclusive) == Retry)
-       goto RetryInsert;
-    }
-    else {
-      BWEngageRequest(bitmap_widget, RestoreRequest, False, Plain);
-    }
-  }
-}
-
-void DoSave(void)
-{
-  BWGetFilename(bitmap_widget, &filename);
-  if (!strcmp(filename, "")) 
-    DoSaveAs();
-  else if (BWWriteFile(bitmap_widget, NULL, NULL) != BitmapSuccess) {
-    XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
-    if (PopupDialog(error_dialog, message,
-                   NULL, NULL, XtGrabExclusive) == Retry) 
-      DoSaveAs();
-  }
-  else {
-    BWClearChanged(bitmap_widget);
-  }
-}
-
-void DoSaveAs(void)
-{
-  BWGetFilename(bitmap_widget, &filename);
- RetrySave:
-  if (PopupDialog(input_dialog, "Save file:",
-                 filename, &filename, XtGrabExclusive) == Okay) {
-    if (BWWriteFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
-      XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
-      if (PopupDialog(error_dialog, message,
-                     NULL, NULL, XtGrabExclusive) == Retry)
-       goto RetrySave;
-    }
-    else {
-      BWClearChanged(bitmap_widget);
-      FixStatus();
-    }
-  }
-}
-
-void DoResize(void)
-{
-  Dimension width, height;
-  format = "";
- RetryResize:
-  if (PopupDialog(input_dialog, "Resize to WIDTHxHEIGHT:",
-                 format, &format, XtGrabExclusive) == Okay) {
-    if (BWParseSize(format, &width, &height)) {
-      BWResize(bitmap_widget, width, height);
-      BWChangeNotify(bitmap_widget);
-      BWSetChanged(bitmap_widget);
-      FixStatus();
-    }
-    else {
-      XmuSnprintf(message, sizeof(message), "Wrong format: %s", format);
-      if (PopupDialog(error_dialog, message,
-                     NULL, NULL, XtGrabExclusive) == Retry)
-       goto RetryResize;
-    }
-  }
-}
-
-void DoRescale(void)
-{
-  Dimension width, height;
-
-  format = "";
- RetryRescale:
-  if (PopupDialog(input_dialog, "Rescale to WIDTHxHEIGHT:",
-                 format, &format, XtGrabExclusive) == Okay) {
-    if (BWParseSize(format, &width, &height)) {
-      BWRescale(bitmap_widget, width, height);
-      BWChangeNotify(bitmap_widget);
-      BWSetChanged(bitmap_widget);
-      FixStatus();
-    }
-    else {
-      XmuSnprintf(message, sizeof(message), "Wrong format: %s", format);
-      if (PopupDialog(error_dialog, message,
-                     NULL, NULL, XtGrabExclusive) == Retry)
-       goto RetryRescale;
-    }
-  }
-}
-
-void DoFilename(void)
-{
-  BWGetFilename(bitmap_widget, &filename);
-  if (PopupDialog(input_dialog, "Change filename:",
-                 filename, &filename, XtGrabExclusive) == Okay) {
-    BWChangeFilename(bitmap_widget, filename);
-    FixStatus();
-  }
-}
-
-void DoBasename(void)
-{  
-  BWGetBasename(bitmap_widget, &base_name);
-  if (PopupDialog(input_dialog, "Change basename:",
-                 base_name, &base_name, XtGrabExclusive) == Okay) {
-    BWChangeBasename(bitmap_widget, base_name);
-    FixStatus();
-  }
-}
-
-void DoQuit(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-  if (BWQueryChanged(bitmap_widget)) {
-    BWGetFilename(bitmap_widget, &filename);
-  RetryQuit:
-    switch (PopupDialog(qsave_dialog, "Save file before quitting?",
-                       filename, &filename, XtGrabExclusive)) {
-    case Yes:
-      if (BWWriteFile(bitmap_widget, filename, NULL) 
-         != BitmapSuccess) {
-       XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
-       if (PopupDialog(error_dialog, message, 
-                       NULL, NULL, XtGrabExclusive) == Retry) 
-         goto RetryQuit;
-       else return;
-      }
-      break;
-      
-    case Cancel:
-      return;
-    }
-  }
-  exit(0);
-}
-
-int main(int argc, char *argv[])
-{
-    int i, n;
-    Arg wargs[2];
-    Widget w;
-    Widget radio_group = NULL; 
-    XtPointer radio_data = NULL;
-    
-    top_widget = XtInitialize(NULL, "Bitmap", 
-                             options, XtNumber(options), &argc, argv);
-
-    if (argc > 2) {
-       fprintf(stderr, usage);
-       exit (0);
-    }
-
-    check_mark = XCreateBitmapFromData(XtDisplay(top_widget),
-                                     RootWindowOfScreen(XtScreen(top_widget)),
-                                     (char *) xlogo16_bits, 
-                                     xlogo16_width, 
-                                     xlogo16_height);
-
-    XtAddActions(actions_table, XtNumber(actions_table));
-    XtOverrideTranslations
-      (top_widget,
-       XtParseTranslationTable("<Message>WM_PROTOCOLS: do-quit()"));
-
-    parent_widget = XtCreateManagedWidget("parent", panedWidgetClass,
-                                        top_widget, NULL, 0);
-
-    formy_widget = XtCreateManagedWidget("formy", formWidgetClass,
-                                      parent_widget, NULL, 0);
-
-    fileMenu_widget = XtCreatePopupShell("fileMenu", 
-                                        simpleMenuWidgetClass, 
-                                        formy_widget, NULL, 0);
-    
-    (void) XtCreateManagedWidget("fileButton",
-                                menuButtonWidgetClass, 
-                                formy_widget, NULL, 0);
-
-    for (i = 0; i < XtNumber(file_menu); i++) {
-       w = XtCreateManagedWidget(file_menu[i].name, 
-                                 (file_menu[i].trap ? 
-                                  smeBSBObjectClass : smeLineObjectClass),
-                                 fileMenu_widget, NULL, 0),
-       XtAddCallback(w,
-                     XtNcallback,
-                     TheCallback,
-                     (XtPointer)&file_menu[i].id);
-       
-       file_menu[i].widget = w;
-    }
-        
-    editMenu_widget = XtCreatePopupShell("editMenu", 
-                                        simpleMenuWidgetClass, 
-                                        formy_widget, NULL, 0);
-    
-    (void) XtCreateManagedWidget("editButton", 
-                                menuButtonWidgetClass, 
-                                formy_widget, NULL, 0);
-
-    for (i = 0; i < XtNumber(edit_menu); i++) {
-       w = XtCreateManagedWidget(edit_menu[i].name, 
-                                 (edit_menu[i].trap ? 
-                                  smeBSBObjectClass : smeLineObjectClass),
-                                 editMenu_widget, NULL, 0),
-       XtAddCallback(w,
-                     XtNcallback,
-                     TheCallback,
-                     (XtPointer)&edit_menu[i].id);
-       
-       edit_menu[i].widget = w;
-    }
-
-    status_widget = XtCreateManagedWidget("status", labelWidgetClass,
-                                         formy_widget, NULL, 0);
-
-    pane_widget = XtCreateManagedWidget("pane", panedWidgetClass,
-                                       parent_widget, NULL, 0);
-
-    form_widget = XtCreateManagedWidget("form", formWidgetClass, 
-                                       pane_widget, NULL, 0);
-        
-    for (i = 0; i < XtNumber(buttons); i++) {
-       w = XtCreateManagedWidget(buttons[i].name, 
-                                 (buttons[i].trap ? 
-                                  toggleWidgetClass : commandWidgetClass),
-                                 form_widget, NULL, 0);
-
-       XtAddCallback(w,
-                     XtNcallback,
-                     TheCallback,
-                     (XtPointer)&buttons[i].id);
-
-       buttons[i].widget = w;
-
-       if (buttons[i].id == Point) {
-           radio_group = buttons[i].widget;
-           radio_data  = buttons[i].name;
-       }
-    }
-    bitmap_widget = XtCreateManagedWidget("bitmap", bitmapWidgetClass,
-                                         pane_widget, NULL, 0);
-    XtRealizeWidget(top_widget);
-    if (argc > 1)
-      if (BWReadFile(bitmap_widget, argv[1], NULL)) 
-
-    wm_delete_window = XInternAtom(XtDisplay(top_widget), "WM_DELETE_WINDOW",
-                                  False);
-    (void) XSetWMProtocols (XtDisplay(top_widget), XtWindow(top_widget),
-                            &wm_delete_window, 1);
-
-    
-    image_shell = XtCreatePopupShell("image", transientShellWidgetClass,
-                                    top_widget, NULL, 0);
-
-    box_widget = XtCreateManagedWidget("box", boxWidgetClass,
-                                      image_shell, NULL, 0);
-
-    normal_image_widget = XtCreateManagedWidget("normalImage", 
-                                               labelWidgetClass,
-                                               box_widget, NULL, 0);
-
-    inverted_image_widget = XtCreateManagedWidget("invertedImage", 
-                                                 labelWidgetClass,
-                                                 box_widget, NULL, 0);
-    
-    n=0;
-    XtSetArg(wargs[n], XtNbitmap, BWGetUnzoomedPixmap(bitmap_widget)); n++;
-    XtSetValues(normal_image_widget, wargs, n);
-    XtSetValues(inverted_image_widget, wargs, n);
-    
-    XtRealizeWidget(image_shell);
-
-    BWNotify(bitmap_widget, (XtActionProc)FixUp);
-
-    FixStatus();
-
-    input_dialog = CreateDialog(top_widget, "input", Okay | Cancel);
-    error_dialog = CreateDialog(top_widget, "error", Abort | Retry);    
-    qsave_dialog = CreateDialog(top_widget, "qsave", Yes | No | Cancel);
-
-    XawToggleSetCurrent(radio_group, radio_data);
-    BWEngageRequest(bitmap_widget, PointRequest, True, Plain);
-
-    XtMainLoop();
-    exit(0);
-}
diff --git a/bitmap/Bitmap.c b/bitmap/Bitmap.c
deleted file mode 100644 (file)
index c2fc30e..0000000
+++ /dev/null
@@ -1,1948 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/XawInit.h>
-#include <X11/Xmu/CharSet.h>
-#include <X11/Xmu/Drawing.h>
-#include <X11/Xmu/SysUtil.h>
-#include <X11/Xatom.h>
-#include <X11/Xfuncs.h>
-#include <X11/Xos.h>
-#include "BitmapP.h"
-#include "Bitmap.h"
-    
-#include <stdio.h>
-#include <math.h>
-
-#define min(x, y)                     ((((int)(x)) < (int)(y)) ? (x) : (y))
-#define max(x, y)                     ((((int)(x)) > (int)(y)) ? (x) : (y))
-
-Boolean DEBUG;
-
-#define DefaultGridTolerance 8
-#define DefaultBitmapSize    "16x16"
-#define FallbackBitmapWidth  16
-#define FallbackBitmapHeight 16
-#define DefaultGrid          TRUE
-#define DefaultDashed        TRUE
-#define DefaultStippled      TRUE
-#define DefaultProportional  TRUE
-#define DefaultAxes          FALSE
-#define DefaultMargin        16
-#define DefaultSquareWidth   16
-#define DefaultSquareHeight  16
-#define DefaultFilename      ""
-
-#define Offset(field) XtOffsetOf(BitmapRec, bitmap.field)
-
-static XtResource resources[] = {
-{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
-     Offset(foreground_pixel), XtRString, XtDefaultForeground},
-{XtNhighlight, XtCHighlight, XtRPixel, sizeof(Pixel),
-     Offset(highlight_pixel), XtRString, XtDefaultForeground},
-{XtNframe, XtCFrame, XtRPixel, sizeof(Pixel),
-     Offset(frame_pixel), XtRString, XtDefaultForeground},
-{XtNgridTolerance, XtCGridTolerance, XtRDimension, sizeof(Dimension),
-     Offset(grid_tolerance), XtRImmediate, (XtPointer) DefaultGridTolerance},
-{XtNsize, XtCSize, XtRString, sizeof(String),
-     Offset(size), XtRImmediate, (XtPointer) DefaultBitmapSize},
-{XtNdashed, XtCDashed, XtRBoolean, sizeof(Boolean),
-     Offset(dashed), XtRImmediate, (XtPointer) DefaultDashed},
-{XtNgrid, XtCGrid, XtRBoolean, sizeof(Boolean),
-     Offset(grid), XtRImmediate, (XtPointer) DefaultGrid},
-{XtNstippled, XtCStippled, XtRBoolean, sizeof(Boolean),
-     Offset(stippled), XtRImmediate, (XtPointer) DefaultStippled},
-{XtNproportional, XtCProportional, XtRBoolean, sizeof(Boolean),
-     Offset(proportional), XtRImmediate, (XtPointer) DefaultProportional},
-{XtNaxes, XtCAxes, XtRBoolean, sizeof(Boolean),
-     Offset(axes), XtRImmediate, (XtPointer) DefaultAxes},
-{XtNsquareWidth, XtCSquareWidth, XtRDimension, sizeof(Dimension),
-     Offset(squareW), XtRImmediate, (XtPointer) DefaultSquareWidth},
-{XtNsquareHeight, XtCSquareHeight, XtRDimension, sizeof(Dimension),
-     Offset(squareH), XtRImmediate, (XtPointer) DefaultSquareHeight},
-{XtNmargin, XtCMargin, XtRDimension, sizeof(Dimension),
-     Offset(margin), XtRImmediate, (XtPointer) DefaultMargin},
-{XtNxHot, XtCXHot, XtRPosition, sizeof(Position),
-     Offset(hot.x), XtRImmediate, (XtPointer) NotSet},
-{XtNyHot, XtCYHot, XtRPosition, sizeof(Position),
-     Offset(hot.y), XtRImmediate, (XtPointer) NotSet},
-{XtNbutton1Function, XtCButton1Function, XtRButtonFunction, sizeof(int),
-     Offset(button_function[0]), XtRImmediate, (XtPointer) Set},
-{XtNbutton2Function, XtCButton2Function, XtRButtonFunction, sizeof(int),
-     Offset(button_function[1]), XtRImmediate, (XtPointer) Invert},
-{XtNbutton3Function, XtCButton3Function, XtRButtonFunction, sizeof(int),
-     Offset(button_function[2]), XtRImmediate, (XtPointer) Clear},
-{XtNbutton4Function, XtCButton4Function, XtRButtonFunction, sizeof(int),
-     Offset(button_function[3]), XtRImmediate, (XtPointer) Clear},
-{XtNbutton5Function, XtCButton5Function, XtRButtonFunction, sizeof(int),
-     Offset(button_function[4]), XtRImmediate, (XtPointer) Clear},
-{XtNfilename, XtCFilename, XtRString, sizeof(String),
-     Offset(filename), XtRImmediate, (XtPointer) DefaultFilename},
-{XtNbasename, XtCBasename, XtRString, sizeof(String),
-     Offset(basename), XtRImmediate, (XtPointer) DefaultFilename},
-{XtNdashes, XtCDashes, XtRBitmap, sizeof(Pixmap),
-     Offset(dashes), XtRImmediate, (XtPointer) XtUnspecifiedPixmap},
-{XtNstipple, XtCStipple, XtRBitmap, sizeof(Pixmap),
-     Offset(stipple), XtRImmediate, (XtPointer) XtUnspecifiedPixmap},
-};
-#undef Offset
-
-
-static XtActionsRec actions[] =
-{
-{"mark",               (XtActionProc)BWTMark},
-{"mark-all",           (XtActionProc)BWTMarkAll},
-{"unmark",             (XtActionProc)BWTUnmark},
-{"paste",              (XtActionProc)BWTPaste},
-{"bw-debug",           (XtActionProc)BWDebug},
-{"abort",              (XtActionProc)BWAbort},
-{"store-to-buffer",    (XtActionProc)BWStoreToBuffer},
-{"change-notify",      (XtActionProc)BWChangeNotify},
-{"set-changed",        (XtActionProc)BWSetChanged},
-{"up",                 (XtActionProc)BWUp},
-{"down",               (XtActionProc)BWDown},
-{"left",               (XtActionProc)BWLeft},
-{"right",              (XtActionProc)BWRight},
-{"fold",               (XtActionProc)BWFold},
-{"flip-horiz",         (XtActionProc)BWFlipHoriz},
-{"flip-vert",          (XtActionProc)BWFlipVert},
-{"rotate-right",       (XtActionProc)BWRotateRight},
-{"rotate-left",        (XtActionProc)BWRotateLeft},
-{"set",                (XtActionProc)BWSet},
-{"clear",              (XtActionProc)BWClear},
-{"invert",             (XtActionProc)BWInvert},
-{"undo",               (XtActionProc)BWUndo},
-{"redraw",             (XtActionProc)BWRedraw},
-};
-
-static char translations1[] =
-"\
-Shift<Btn1Down>: mark()\n\
-Shift<Btn2Down>: mark-all()\n\
-Shift<Btn3Down>: unmark()\n\
-Ctrl<BtnDown>:   paste()\n\
-Ctrl<Key>l: redraw()\n\
-<Key>d:     bw-debug()\n\
-<Key>a:     abort()\n\
-<Key>Up:    store-to-buffer()\
-            up()\
-            change-notify()\
-            set-changed()\n\
-<Key>KP_Up: store-to-buffer()\
-            up()\
-            change-notify()\
-            set-changed()\n\
-<Key>Down:  store-to-buffer()\
-            down()\
-            change-notify()\
-            set-changed()\n\
-<Key>KP_Down: store-to-buffer()\
-            down()\
-            change-notify()\
-            set-changed()\n\
-<Key>Left:  store-to-buffer()\
-            left()\
-            change-notify()\
-            set-changed()\n\
-<Key>KP_Left: store-to-buffer()\
-            left()\
-            change-notify()\
-            set-changed()\n\
-<Key>Right: store-to-buffer()\
-            right()\
-            change-notify()\
-            set-changed()\n\
-<Key>KP_Right: store-to-buffer()\
-            right()\
-            change-notify()\
-            set-changed()\n\
-<Key>f:     store-to-buffer()\
-            fold()\
-            change-notify()\
-            set-changed()\n\
-<Key>h:     store-to-buffer()\
-            flip-horiz()\
-            change-notify()\
-            set-changed()\n\
-";
-
-static char translations2[] =
-"<Key>v:     store-to-buffer()\
-            flip-vert()\
-            change-notify()\
-            set-changed()\n\
-<Key>r:     store-to-buffer()\
-            rotate-right()\
-            change-notify()\
-            set-changed()\n\
-<Key>l:     store-to-buffer()\
-            rotate-left()\
-            change-notify()\
-            set-changed()\n\
-<Key>s:     store-to-buffer()\
-            set()\
-            change-notify()\
-            set-changed()\n\
-<Key>c:     store-to-buffer()\
-            clear()\
-            change-notify()\
-            set-changed()\n\
-<Key>i:     store-to-buffer()\
-            invert()\
-            change-notify()\
-            set-changed()\n\
-<Key>u:     undo()\
-            change-notify()\
-            set-changed()\n\
-";
-
-static Atom targets[] = {
-    XA_BITMAP,
-    XA_PIXMAP
-};
-
-#include "Requests.h"
-
-
-static BWRequestRec requests[] = 
-{
-{MarkRequest, sizeof(BWStatus),
-     TwoPointsEngage, (XtPointer) BWDrawRectangle,
-     TwoPointsTerminateTimed, (XtPointer) BWSelect,
-     NULL, (XtPointer) NULL},
-{RestoreRequest, sizeof(BWStatus),
-     OnePointEngage, (XtPointer) BWDragStored,
-     OnePointTerminate, (XtPointer) BWRestore,
-     NULL, (XtPointer) NULL},
-{ImmediateCopyRequest, sizeof(BWStatus),
-     OnePointEngage, (XtPointer) BWDragMarked,
-     OnePointTerminate, (XtPointer) BWCopy,
-     NULL, (XtPointer) NULL},
-{ImmediateMoveRequest, sizeof(BWStatus),
-     OnePointEngage, (XtPointer) BWDragMarked,
-     OnePointTerminate, (XtPointer) BWMove,
-     NULL, (XtPointer) NULL},
-{CopyRequest, sizeof(BWStatus),
-     DragOnePointEngage, (XtPointer) Paste,
-     DragOnePointTerminate, (XtPointer) ImmediateCopyRequest,
-     Interface, (XtPointer) BWUnmark},
-{MoveRequest, sizeof(BWStatus),
-     DragOnePointEngage, (XtPointer) Paste,
-     DragOnePointTerminate, (XtPointer) ImmediateMoveRequest,
-     Interface, (XtPointer) BWUnmark},
-{PointRequest, sizeof(BWStatus),
-     DragOnePointEngage, (XtPointer) BWDrawPoint,
-     DragOnePointTerminate, (XtPointer) BWDrawPoint,
-     NULL, (XtPointer) NULL},
-{CurveRequest, sizeof(BWStatus),
-     DragTwoPointsEngage, (XtPointer) BWBlindLine,
-     DragTwoPointsTerminate, (XtPointer) BWBlindLine,
-     NULL, (XtPointer) NULL},
-{LineRequest, sizeof(BWStatus), 
-     TwoPointsEngage, (XtPointer) BWDrawLine, 
-     TwoPointsTerminate, (XtPointer) BWDrawLine,
-     NULL, (XtPointer) NULL},
-{RectangleRequest, sizeof(BWStatus), 
-     TwoPointsEngage, (XtPointer) BWDrawRectangle,
-     TwoPointsTerminate, (XtPointer) BWDrawRectangle,
-     NULL, (XtPointer) NULL},
-{FilledRectangleRequest, sizeof(BWStatus), 
-     TwoPointsEngage, (XtPointer) BWDrawRectangle,
-     TwoPointsTerminate, (XtPointer) BWDrawFilledRectangle,
-     NULL, (XtPointer) NULL},
-{CircleRequest, sizeof(BWStatus), 
-     TwoPointsEngage, (XtPointer) BWDrawCircle,
-     TwoPointsTerminate, (XtPointer) BWDrawCircle,
-     NULL, (XtPointer) NULL},
-{FilledCircleRequest, sizeof(BWStatus), 
-     TwoPointsEngage, (XtPointer) BWDrawCircle, 
-     TwoPointsTerminate, (XtPointer) BWDrawFilledCircle,
-     NULL, (XtPointer) NULL},
-{FloodFillRequest, sizeof(BWStatus),
-     OnePointEngage, (XtPointer) NULL,
-     OnePointTerminate, (XtPointer) BWFloodFill,
-     NULL, (XtPointer) NULL},
-{HotSpotRequest, sizeof(BWStatus),
-     OnePointEngage, (XtPointer) BWDrawHotSpot,
-     OnePointTerminate, (XtPointer) BWDrawHotSpot,
-     NULL, (XtPointer) NULL},
-{ZoomInRequest, sizeof(BWStatus),
-     TwoPointsEngage, (XtPointer) BWDrawRectangle,
-     TwoPointsTerminate, (XtPointer) BWZoomIn,
-     NULL, (XtPointer) NULL},
-};
-
-static void ClassInitialize(void);
-static void Initialize(Widget wrequest, Widget wnew, 
-                      ArgList argv, Cardinal *argc);
-static void Redisplay(Widget w, XEvent *event, Region region);
-static void Resize(Widget w);
-static void Destroy(Widget w);
-static void Refresh(BitmapWidget BW, Position x, Position y, 
-                   Dimension width, Dimension height);
-static Boolean SetValues(Widget old, Widget request, Widget new,
-                        ArgList args, Cardinal *num_args);
-BitmapClassRec bitmapClassRec = {
-{   /* core fields */
-    /* superclass              */      (WidgetClass) &simpleClassRec,
-    /* class_name              */      "Bitmap",
-    /* widget_size             */      sizeof(BitmapRec),
-    /* class_initialize                */      ClassInitialize,
-    /* class_part_initialize   */      NULL,
-    /* class_inited            */      FALSE,
-    /* initialize              */      Initialize,
-    /* initialize_hook         */      NULL,
-    /* realize                 */      XtInheritRealize,
-    /* actions                 */      actions,
-    /* num_actions             */      XtNumber(actions),
-    /* resources               */      resources,
-    /* num_resources           */      XtNumber(resources),
-    /* xrm_class               */      NULLQUARK,
-    /* compress_motion         */      TRUE,
-    /* compress_exposure       */      FALSE,
-    /* compress_enterleave     */      TRUE,
-    /* visible_interest                */      TRUE,
-    /* destroy                 */      Destroy,
-    /* resize                  */      Resize,
-    /* expose                  */      Redisplay,
-    /* set_values              */      SetValues,
-    /* set_values_hook         */      NULL,
-    /* set_values_almost       */      XtInheritSetValuesAlmost,
-    /* get_values_hook         */      NULL,
-    /* accept_focus            */      NULL,
-    /* version                 */      XtVersion,
-    /* callback_private                */      NULL,
-    /* tm_table                        */      NULL , /* set in code */
-    /* query_geometry          */      XtInheritQueryGeometry,
-    /* display_accelerator     */      XtInheritDisplayAccelerator,
-    /* extension               */      NULL,
-  },
-  { 
-    /* empty                   */      XtInheritChangeSensitive,
-  },
-  {
-    /* targets                  */      targets,
-    /* num_trets                */      XtNumber(targets),
-    /* requests                 */      requests,
-    /* num_requests             */      XtNumber(requests),
-  }
-};
-WidgetClass bitmapWidgetClass = (WidgetClass) &bitmapClassRec;
-    
-/* ARGSUSED */
-
-void 
-BWDebug(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    DEBUG ^= True;
-}
-
-Pixmap 
-BWGetPixmap(Widget w) 
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    return GetPixmap(BW, BW->bitmap.zoom.image);
-}
-
-Pixmap 
-BWGetUnzoomedPixmap(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    GC gc;
-    Pixmap pix;
-    
-    if (BW->bitmap.zooming) {    
-       pix = XCreatePixmap(XtDisplay(w), XtWindow(w), 
-                           BW->bitmap.zoom.image->width, 
-                           BW->bitmap.zoom.image->height, 1);
-       if (!(gc = XCreateGC(XtDisplay(w), pix, 
-                            (unsigned long) 0, (XGCValues *) 0)))
-           return (Pixmap) None;
-       
-       XPutImage(XtDisplay(w), pix, gc, 
-                 BW->bitmap.zoom.image, 
-                 0, 0, 0, 0, 
-                 BW->bitmap.zoom.image->width, 
-                 BW->bitmap.zoom.image->height);
-       XPutImage(XtDisplay(w), pix, gc, 
-                 BW->bitmap.image, 
-                 0, 0, 
-                 BW->bitmap.zoom.at_x,
-                 BW->bitmap.zoom.at_y,
-                 BW->bitmap.image->width, 
-                 BW->bitmap.image->height);
-    }
-    else {
-       pix = XCreatePixmap(XtDisplay(w), XtWindow(w), 
-                           BW->bitmap.image->width, 
-                           BW->bitmap.image->height, 1);
-       if (! (gc = XCreateGC(XtDisplay(w), pix, 
-                             (unsigned long) 0, (XGCValues *) 0)))
-           return (Pixmap) None;
-       
-       XPutImage(XtDisplay(w), pix, gc, 
-                 BW->bitmap.image, 
-                 0, 0, 0, 0,
-                 BW->bitmap.image->width, 
-                 BW->bitmap.image->height);
-    }
-    XFreeGC(XtDisplay(w), gc);
-    return(pix);
-}
-
-
-XImage *
-GetImage(BitmapWidget BW, Pixmap pixmap)
-{
-    Window root;
-    int x, y;
-    unsigned int width, height, border_width, depth;
-    XImage *source, *image;
-
-    XGetGeometry(XtDisplay(BW), pixmap, &root, &x, &y,
-                &width, &height, &border_width, &depth);
-
-    source = XGetImage(XtDisplay(BW), pixmap, x, y, width, height,
-                    1, XYPixmap);
-
-    image = ConvertToBitmapImage(BW, source);
-
-    return image;
-}
-
-XImage *
-CreateBitmapImage(BitmapWidget BW, char *data, 
-                 Dimension width, Dimension height)
-{
-    XImage *image = XCreateImage(XtDisplay(BW),
-                                DefaultVisual(XtDisplay(BW), 
-                                              DefaultScreen(XtDisplay(BW))),
-                                1, XYBitmap, 0, 
-                                data, width, height,
-                                8, ((int)width + 7) / 8);
-
-    image->height = height;
-    image->width = width;
-    image->depth = 1;
-    image->xoffset = 0;
-    image->format = XYBitmap;
-    image->data = (char *)data;
-    image->byte_order = LSBFirst;
-    image->bitmap_unit = 8;
-    image->bitmap_bit_order = LSBFirst;
-    image->bitmap_pad = 8;
-    image->bytes_per_line = ((int)width + 7) / 8;
-
-    return image;
-}
-
-void 
-DestroyBitmapImage(XImage **image)
-{
-    /*XDestroyImage(*image);*/
-    if (image) {
-       if (*image) {
-           if ((*image)->data)
-               XtFree((*image)->data);
-           XtFree((char *)*image);
-       }
-       *image = NULL;
-    }
-}
-
-#if 0
-XImage *
-BWGetImage(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return BW->bitmap.image;
-}
-#endif
-
-void 
-BWChangeNotify(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    if (BW->bitmap.notify)
-       (*BW->bitmap.notify)(w, NULL, NULL, NULL);
-}
-
-void 
-BWNotify(Widget w, XtActionProc proc)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BW->bitmap.notify = proc;
-}
-
-void 
-BWSetChanged(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-       
-    BW->bitmap.changed = True;
-}
-
-Boolean 
-BWQueryChanged(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-       
-    return BW->bitmap.changed;
-}
-
-void 
-BWClearChanged(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    BW->bitmap.changed = False;
-}
-
-Boolean 
-BWQueryStored(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    return (BW->bitmap.storage != NULL);
-}
-
-Boolean 
-BWQueryStippled(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return BW->bitmap.stippled;
-}
-
-static void 
-RedrawStippled(BitmapWidget BW)
-{
-  XExposeEvent event;
-  
-  event.type = Expose;
-  event.display = XtDisplay((Widget)BW);
-  event.window = XtWindow((Widget)BW);
-  event.x = 0;
-  event.y = 0;
-  event.width = BW->core.width;
-  event.height = BW->core.height;
-  event.count = 0;
-  
-  BWRedrawMark((Widget)BW);
-  
-  BW->bitmap.stipple_change_expose_event = True; 
-  
-  XtDispatchEvent((XEvent *)&event);
-  
-  BW->bitmap.stipple_change_expose_event = False;
-}
-
-void 
-BWSwitchStippled(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    RedrawStippled(BW);
-
-    BW->bitmap.stippled ^= True;
-    XSetFillStyle(XtDisplay(BW), BW->bitmap.highlighting_gc,
-                 (BW->bitmap.stippled ? FillStippled : FillSolid));
-
-    RedrawStippled(BW);    
-}
-
-void 
-BWSelect(Widget w, Position from_x, Position from_y, 
-        Position to_x, Position to_y, Time btime)
-{
-    BWMark(w, from_x, from_y, to_x, to_y);
-
-    BWGrabSelection(w, btime);
-}
-
-Boolean 
-BWQueryAxes(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return BW->bitmap.axes;
-}
-
-void 
-BWSwitchAxes(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BW->bitmap.axes ^= True;
-    BWHighlightAxes(w);
-}
-
-void 
-BWAxes(Widget w, Boolean _switch)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.axes != _switch)
-       BWSwitchAxes(w);
-}
-
-void 
-BWRedrawAxes(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.axes)
-       BWHighlightAxes(w);
-}
-
-#if 0
-void 
-BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc, 
-          Position x, Position y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-  XPutImage(display, drawable, gc, BW->bitmap.image,
-           0, 0, x, y, BW->bitmap.image->width, BW->bitmap.image->height);
-}
-#endif
-
-static String 
-StripFilename(String filename)
-{
-    char *begin = strrchr(filename, '/');
-    char *end, *result;
-    int length;
-    
-    if (filename) {
-       begin = (begin ? begin + 1 : filename);
-       end = strchr(begin, '.'); /* change to strrchr to allow longer names */
-       length = (end ? (end - begin) : strlen (begin));
-       result = (char *) XtMalloc (length + 1);
-       strncpy (result, begin, length);
-       result [length] = '\0';
-       return (result);
-    }
-    else
-       return (NULL);
-}
-
-static int 
-XmuWriteBitmapDataToFile(String filename, String basename, 
-                        int width, int height, char *datap, 
-                        int x_hot, int y_hot)
-{
-    FILE *file;
-    int i, data_length;
-    
-    data_length = Length(width, height);
-    
-    if(!filename || !strcmp(filename, "") || !strcmp(filename, "-")) {   
-       file = stdout;
-       filename = "dummy";
-       }
-    else
-       file = fopen(filename, "w+");
-    
-    if (!basename || !strcmp(basename, "") || !strcmp(basename, "-"))
-       basename = StripFilename(filename);
-    
-    if (file) {
-       fprintf(file, "#define %s_width %d\n", basename, width);
-       fprintf(file, "#define %s_height %d\n", basename, height);
-       if (QuerySet(x_hot, y_hot)) {
-           fprintf(file, "#define %s_x_hot %d\n", basename, x_hot);
-           fprintf(file, "#define %s_y_hot %d\n", basename, y_hot);
-       }
-       fprintf(file, "static unsigned char %s_bits[] = {\n   0x%02x",
-               basename, (unsigned char) datap[0]);
-       for(i = 1; i < data_length; i++) {
-           fprintf(file, ",");
-           fprintf(file, (i % 12) ? " " : "\n   ");
-           fprintf(file, "0x%02x", (unsigned char) datap[i]);
-       }
-       fprintf(file, "};\n");
-       
-       if (file != stdout)
-           fclose(file);
-
-       return BitmapSuccess;
-    }
-    
-    return 1;
-}
-
-/*
- *
- */
-
-                               /* ARGSUSED */
-static void 
-CvtStringToButtonFunction(XrmValuePtr args, /* not used */
-                         Cardinal *num_args, /* not used */
-                         XrmValuePtr from_val, 
-                         XrmValuePtr to_val)
-{
-  static int button_function;
-  char lower_name[80];
-  XmuCopyISOLatin1Lowered (lower_name, (char*)from_val->addr);
-  
-  if (!strcmp(lower_name, XtClear)) {
-    button_function = Clear;
-    to_val->addr = (XPointer) &button_function;
-    to_val->size = sizeof(button_function);
-    return;
-  }
-  
-  if (!strcmp(lower_name, XtSet)) {
-    button_function = Set;
-    to_val->addr = (XPointer) &button_function;
-    to_val->size = sizeof(button_function);
-    return;
-  }
-
-  if (!strcmp(lower_name, XtInvert)) {
-    button_function = Invert;
-    to_val->addr = (XPointer) &button_function;
-    to_val->size = sizeof(button_function);
-    return;
-  }
-  
-  XtStringConversionWarning(from_val->addr, XtRButtonFunction);
-  button_function = Clear;
-  to_val->addr = (XPointer) &button_function;
-  to_val->size = sizeof(button_function);
-  
-}
-
-static void 
-ClassInitialize(void)
-{
-  char *tm_table = XtMalloc(strlen(translations1) + strlen(translations2) + 1);
-  strcpy(tm_table, translations1);
-  strcat(tm_table, translations2);
-  bitmapClassRec.core_class.tm_table = tm_table;
-
-  XawInitializeWidgetSet();
-  XtAddConverter(XtRString, XtRButtonFunction, CvtStringToButtonFunction,
-                NULL, 0);
-  DEBUG = False;
-}
-
-static void 
-SetSizeFromSizeResource(BitmapWidget bw)
-{
-  if (BWParseSize(bw->bitmap.size, 
-                 &bw->bitmap.width,
-                 &bw->bitmap.height)
-      ==
-      False) {
-    bw->bitmap.width = FallbackBitmapWidth;
-    bw->bitmap.height = FallbackBitmapHeight;
-    XtWarning("Cannot parse the size resource.  BitmapWidget");
-  }
-}
-
-
-/* ARGSUSED */
-static void 
-Initialize(Widget wrequest, Widget wnew, ArgList argv, Cardinal *argc)
-{
-    BitmapWidget new = (BitmapWidget) wnew;
-
-    XGCValues  values;
-    XtGCMask   mask;
-    char *image_data, *buffer_data;
-
-    new->bitmap.stipple_change_expose_event = False;
-    new->bitmap.notify = NULL;
-    new->bitmap.cardinal = 0;
-    new->bitmap.current = 0;
-    new->bitmap.fold = False;
-    new->bitmap.changed = False;
-    new->bitmap.zooming = False;
-    new->bitmap.selection.own = False;
-    new->bitmap.selection.limbo = False;
-
-    new->bitmap.request_stack = (BWRequestStack *)
-       XtMalloc(sizeof(BWRequestStack));
-
-    new->bitmap.request_stack[0].request = NULL;
-    new->bitmap.request_stack[0].call_data = NULL;
-    new->bitmap.request_stack[0].trap = False;
-
-    SetSizeFromSizeResource(new);
-
-    new->core.width = new->bitmap.width * new->bitmap.squareW + 
-       2 * new->bitmap.margin;
-    new->core.height = new->bitmap.height * new->bitmap.squareH + 
-       2 * new->bitmap.margin;
-  
-    new->bitmap.hot.x = new->bitmap.hot.y = NotSet;
-    new->bitmap.buffer_hot.x = new->bitmap.buffer_hot.y = NotSet;
-  
-    new->bitmap.mark.from_x = new->bitmap.mark.from_y = NotSet;
-    new->bitmap.mark.to_x = new->bitmap.mark.to_y = NotSet;
-    new->bitmap.buffer_mark.from_x = new->bitmap.buffer_mark.from_y = NotSet;
-    new->bitmap.buffer_mark.to_x = new->bitmap.buffer_mark.to_y = NotSet;
-
-    values.foreground = new->bitmap.foreground_pixel;
-    values.background = new->core.background_pixel;
-    values.foreground ^= values.background;
-    values.function = GXxor;
-    mask = GCForeground | GCBackground | GCFunction;
-    new->bitmap.drawing_gc = XCreateGC(XtDisplay(new), 
-                                      RootWindow(XtDisplay(new), 
-                                      DefaultScreen(XtDisplay(new))),
-                                      mask, &values);
-
-    values.foreground = new->bitmap.highlight_pixel;
-    values.background = new->core.background_pixel;
-    values.foreground ^= values.background;
-    values.function = GXxor;
-    mask = GCForeground | GCBackground | GCFunction;
-    if (new->bitmap.stipple != XtUnspecifiedPixmap)
-    {
-       values.stipple = new->bitmap.stipple;
-       mask |= GCStipple | GCFillStyle;
-    }
-    values.fill_style = (new->bitmap.stippled ? FillStippled : FillSolid);
-
-    new->bitmap.highlighting_gc = XCreateGC(XtDisplay(new), 
-                                           RootWindow(XtDisplay(new), 
-                                              DefaultScreen(XtDisplay(new))), 
-                                           mask, &values);
-
-
-    values.foreground = new->bitmap.frame_pixel;
-    values.background = new->core.background_pixel;
-    values.foreground ^= values.background;
-    mask = GCForeground | GCBackground | GCFunction;
-    if (new->bitmap.dashes != XtUnspecifiedPixmap)
-    {
-       values.stipple = new->bitmap.dashes;
-       mask |= GCStipple | GCFillStyle;
-    }
-    values.fill_style = (new->bitmap.dashed ? FillStippled : FillSolid);
-
-    new->bitmap.frame_gc = XCreateGC(XtDisplay(new), 
-                                    RootWindow(XtDisplay(new), 
-                                               DefaultScreen(XtDisplay(new))),
-                                    mask, &values);
-
-    values.foreground = new->bitmap.highlight_pixel;
-    values.background = new->core.background_pixel;
-    values.foreground ^= values.background;
-    mask = GCForeground | GCBackground | GCFunction;
-    new->bitmap.axes_gc = XCreateGC(XtDisplay(new), 
-                                    RootWindow(XtDisplay(new), 
-                                               DefaultScreen(XtDisplay(new))),
-                                    mask, &values);
-
-    image_data = CreateCleanData(Length(new->bitmap.width, 
-                                       new->bitmap.height));
-    buffer_data = CreateCleanData(Length(new->bitmap.width, 
-                                        new->bitmap.height));
-
-    new->bitmap.storage = NULL;
-    
-    new->bitmap.image = CreateBitmapImage(new, 
-                                         image_data,
-                                         new->bitmap.width,
-                                         new->bitmap.height);
-    new->bitmap.buffer = CreateBitmapImage(new, 
-                                          buffer_data,
-                                          new->bitmap.width,
-                                          new->bitmap.height);
-
-    /* Read file */
-    {
-       int status;
-       XImage *image, *buffer;
-       unsigned char *image_data;
-       char *buffer_data;
-       unsigned int width, height;
-       int x_hot, y_hot;
-       
-       status = XmuReadBitmapDataFromFile(new->bitmap.filename, 
-                                          &width, &height, &image_data,
-                                          &x_hot, &y_hot);
-       if (status == BitmapSuccess) {
-           
-           buffer_data = CreateCleanData(Length(width, height));
-           
-           image = CreateBitmapImage(new, (char *)image_data, width, height);
-           buffer = CreateBitmapImage(new, buffer_data, width, height);
-       
-           TransferImageData(new->bitmap.image, buffer);
-       
-           DestroyBitmapImage(&new->bitmap.image);
-           DestroyBitmapImage(&new->bitmap.buffer);
-       
-           new->bitmap.image = image;
-           new->bitmap.buffer = buffer;
-           new->bitmap.width = width;
-           new->bitmap.height = height;
-           
-           new->bitmap.hot.x = x_hot;
-           new->bitmap.hot.y = y_hot;
-           
-           new->bitmap.changed = False;
-           new->bitmap.zooming = False;
-       }
-
-       new->bitmap.filename = XtNewString(new->bitmap.filename);
-       
-       if (!strcmp(new->bitmap.basename, "")) {
-           new->bitmap.basename = StripFilename(new->bitmap.filename);
-       }
-       else
-         new->bitmap.basename = XtNewString(new->bitmap.basename);
-    }
-
-    Resize((Widget)new);
-}
-
-
-/* returns False if the format is wrong */
-Boolean 
-BWParseSize(String size, Dimension *width, Dimension *height)
-{
-  int x, y;
-  unsigned int w, h;
-  int status;
-
-  status = XParseGeometry(size, &x, &y, &w, &h);
-
-  if (status & (WidthValue | HeightValue)) {
-    *width = (Dimension) w;
-    *height = (Dimension) h;
-    return True;
-  }
-  else return False;
-
-}
-
-
-Boolean 
-BWQueryMarked(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y);
-}
-
-static void 
-FixMark(BitmapWidget BW)
-{
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
-       BW->bitmap.mark.from_x = min(BW->bitmap.mark.from_x, 
-                                    BW->bitmap.image->width);
-       BW->bitmap.mark.from_y = min(BW->bitmap.mark.from_y, 
-                                    BW->bitmap.image->height);
-       BW->bitmap.mark.to_x = min(BW->bitmap.mark.to_x, 
-                                  BW->bitmap.image->width);
-       BW->bitmap.mark.to_y = min(BW->bitmap.mark.to_y, 
-                                  BW->bitmap.image->height);
-       
-       if((BW->bitmap.mark.from_x == BW->bitmap.mark.from_y) &&
-          (BW->bitmap.mark.to_x   == BW->bitmap.mark.to_y))
-           BW->bitmap.mark.from_x = 
-               BW->bitmap.mark.from_y =
-                   BW->bitmap.mark.to_x = 
-                       BW->bitmap.mark.to_y = NotSet;
-    }
-}
-
-/* ARGSUSED */
-int 
-BWStoreFile(Widget w, String filename, String *basename)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    int status;
-    unsigned char *storage_data;
-    unsigned int width, height;
-    int x_hot, y_hot;
-    
-    status = XmuReadBitmapDataFromFile(filename, &width, &height,
-                                      &storage_data, &x_hot, &y_hot);
-    if (status == BitmapSuccess) {
-
-       DestroyBitmapImage(&BW->bitmap.storage);
-       
-       BW->bitmap.storage = CreateBitmapImage(BW, (char *)storage_data, width, height);
-
-       return BitmapSuccess;
-    }
-    else
-       XtWarning(" read file failed.  BitmapWidget");
-    
-    return status;
-}
-
-String 
-BWUnparseStatus(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    XmuSnprintf(BW->bitmap.status, sizeof(BW->bitmap.status),
-           "Filename: %s  Basename: %s  Size: %dx%d",
-           (strcmp(BW->bitmap.filename, "") ? BW->bitmap.filename : "<none>"),
-           (strcmp(BW->bitmap.basename, "") ? BW->bitmap.basename : "<none>"),
-           BW->bitmap.width, BW->bitmap.height);
-
-    return BW->bitmap.status;
-}
-
-void 
-BWChangeFilename(Widget w, String str)
-{
-  BitmapWidget BW = (BitmapWidget) w;
-  
-  if (str) {
-    XtFree(BW->bitmap.filename);
-    BW->bitmap.filename = XtNewString( str);
-  }
-}
-
-void 
-BWChangeBasename(Widget w, String str)
-{
-  BitmapWidget BW = (BitmapWidget) w;
-  
-  if (str) {
-    XtFree(BW->bitmap.basename);
-    BW->bitmap.basename = XtNewString(str);
-  }
-}
-
-
-int 
-BWReadFile(Widget w, String filename, String basename) /* ARGSUSED */
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    int status;
-    XImage *image, *buffer;
-    unsigned char *image_data;
-    char *buffer_data;
-    unsigned int width, height;
-    int x_hot, y_hot;
-    
-    if (!filename)
-       filename = BW->bitmap.filename;
-
-    status = XmuReadBitmapDataFromFile(filename, &width, &height, &image_data,
-                                      &x_hot, &y_hot);
-    if (status == BitmapSuccess) {
-       
-       buffer_data = CreateCleanData(Length(width, height));
-       
-       image = CreateBitmapImage(BW, (char *)image_data, width, height);
-       buffer = CreateBitmapImage(BW, buffer_data, width, height);
-       
-       TransferImageData(BW->bitmap.image, buffer);
-       
-       DestroyBitmapImage(&BW->bitmap.image);
-       DestroyBitmapImage(&BW->bitmap.buffer);
-       
-       BW->bitmap.image = image;
-       BW->bitmap.buffer = buffer;
-       BW->bitmap.width = width;
-       BW->bitmap.height = height;
-       
-       BW->bitmap.hot.x = x_hot;
-       BW->bitmap.hot.y = y_hot;
-       
-       BW->bitmap.changed = False;
-       BW->bitmap.zooming = False;
-       
-       XtFree(BW->bitmap.filename);
-       BW->bitmap.filename = XtNewString(filename);
-       XtFree(BW->bitmap.basename);
-       BW->bitmap.basename= XtNewString(StripFilename(filename));
-
-       BWUnmark(w);
-       
-       Resize((Widget)BW);
-
-       if (BW->core.visible) {
-           XClearArea(XtDisplay(BW), XtWindow(BW),
-                      0, 0, 
-                      BW->core.width, BW->core.height,
-                      True);
-       }
-       
-       return BitmapSuccess;
-    }
-    else
-       XtWarning(" read file failed.  BitmapWidget");
-    
-    return status;
-}
-
-#if 0
-void 
-BWSetImage(Widget w, XImage *image)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XImage *buffer;
-    char *buffer_data;
-    
-    buffer_data = CreateCleanData(Length(image->width, image->height));
-    buffer = CreateBitmapImage(BW, buffer_data, 
-                              (Dimension) image->width, 
-                              (Dimension) image->height);
-    
-    TransferImageData(BW->bitmap.image, buffer);
-    
-    DestroyBitmapImage(&BW->bitmap.image);
-    DestroyBitmapImage(&BW->bitmap.buffer);
-    
-    BW->bitmap.image = image;
-    BW->bitmap.buffer = buffer;
-    BW->bitmap.width = image->width;
-    BW->bitmap.height = image->height;
-    
-    Resize((Widget)BW);
-    
-    if (BW->core.visible) {
-       XClearArea(XtDisplay(BW), XtWindow(BW),
-                  0, 0, 
-                  BW->core.width, BW->core.height,
-                  True);    
-    }
-}
-#endif
-
-int 
-BWWriteFile(Widget w, String filename, String basename)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    char *data;
-    XImage *image;
-    XPoint hot;
-    int status;
-    
-    if (BW->bitmap.zooming) {
-        data = XtMalloc(Length(BW->bitmap.zoom.image->width, 
-                              BW->bitmap.zoom.image->height));
-       memmove( data, BW->bitmap.zoom.image->data, 
-             Length(BW->bitmap.zoom.image->width, 
-                    BW->bitmap.zoom.image->height));
-       image = CreateBitmapImage(BW, data,
-                                 (Dimension) BW->bitmap.zoom.image->width,
-                                 (Dimension) BW->bitmap.zoom.image->height);
-       CopyImageData(BW->bitmap.image, image, 
-                     0, 0, 
-                     BW->bitmap.image->width - 1,
-                     BW->bitmap.image->height - 1,
-                     BW->bitmap.zoom.at_x, BW->bitmap.zoom.at_y);
-       
-       if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)) {
-           hot.x = BW->bitmap.hot.x + BW->bitmap.zoom.at_x;
-           hot.y = BW->bitmap.hot.y + BW->bitmap.zoom.at_y;
-       }
-       else
-           hot = BW->bitmap.zoom.hot;
-    }
-    else {
-       image = BW->bitmap.image;
-       hot = BW->bitmap.hot;
-    }
-    
-    if (!filename) filename = BW->bitmap.filename;
-    else {
-       XtFree(BW->bitmap.filename);
-       BW->bitmap.filename = XtNewString(filename);
-       XtFree(BW->bitmap.basename);
-       BW->bitmap.basename= XtNewString(StripFilename(filename));
-    }
-    if (!basename) basename = BW->bitmap.basename;
-    else {
-       XtFree(BW->bitmap.basename);
-       BW->bitmap.basename = XtNewString(basename);
-    }
-
-    if (DEBUG)
-       fprintf(stderr, "Saving filename: %s %s\n", filename, basename);
-
-    status = XmuWriteBitmapDataToFile(filename, basename,
-                                     image->width, image->height, image->data,
-                                     hot.x, hot.y);
-    if (BW->bitmap.zooming)
-       DestroyBitmapImage(&image);
-    
-    if (status == BitmapSuccess)
-       BW->bitmap.changed = False;
-    
-    return status;
-}
-
-String 
-BWGetFilename(Widget w, String *str)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    *str = XtNewString(BW->bitmap.filename);
-
-    return *str;
-}
-
-String 
-BWGetFilepath(Widget w, String *str)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    String end;
-
-    *str = XtNewString(BW->bitmap.filename);
-    end = strrchr(*str, '/');
-
-    if (end)
-       *(end + 1) = '\0';
-    else 
-       **str = '\0';
-
-    return *str;
-}
-
-
-String 
-BWGetBasename(Widget w, String *str)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    *str = XtNewString(BW->bitmap.basename);
-
-    return *str;
-}
-
-static void 
-FixHotSpot(BitmapWidget BW)
-{
-    if (!QueryInBitmap(BW, BW->bitmap.hot.x, BW->bitmap.hot.y))
-       BW->bitmap.hot.x = BW->bitmap.hot.y = NotSet;
-}
-
-static void 
-ZoomOut(BitmapWidget BW)
-{
-    CopyImageData(BW->bitmap.image, BW->bitmap.zoom.image, 
-                 0, 0, 
-                 BW->bitmap.image->width - 1,
-                 BW->bitmap.image->height - 1,
-                 BW->bitmap.zoom.at_x, BW->bitmap.zoom.at_y);
-    
-    DestroyBitmapImage(&BW->bitmap.image);
-    DestroyBitmapImage(&BW->bitmap.buffer);
-    
-    BW->bitmap.image = BW->bitmap.zoom.image;
-    BW->bitmap.buffer = BW->bitmap.zoom.buffer;
-    BW->bitmap.width = BW->bitmap.image->width;
-    BW->bitmap.height = BW->bitmap.image->height;
-    BW->bitmap.fold = BW->bitmap.zoom.fold;
-    BW->bitmap.changed |= BW->bitmap.zoom.changed;
-    BW->bitmap.grid = BW->bitmap.zoom.grid;
-
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)) {
-       BW->bitmap.hot.x += BW->bitmap.zoom.at_x;
-       BW->bitmap.hot.y += BW->bitmap.zoom.at_y;
-    }
-    else
-       BW->bitmap.hot = BW->bitmap.zoom.hot;
-    
-    BW->bitmap.mark.from_x = NotSet;
-    BW->bitmap.mark.from_y = NotSet;
-    BW->bitmap.mark.to_x = NotSet;
-    BW->bitmap.mark.to_y = NotSet;
-    BW->bitmap.zooming = False;
-}    
-
-void 
-BWZoomOut(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.zooming) {
-       ZoomOut(BW);
-       
-       Resize((Widget)BW);
-       if (BW->core.visible)
-           XClearArea(XtDisplay(BW), XtWindow(BW),
-                      0, 0, 
-                      BW->core.width, BW->core.height,
-                      True);
-    }
-}
-
-
-void 
-BWZoomMarked(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BWZoomIn(w, 
-            BW->bitmap.mark.from_x, BW->bitmap.mark.from_y,
-            BW->bitmap.mark.to_x,   BW->bitmap.mark.to_y);
-}
-
-void 
-BWZoomIn(Widget w, 
-        Position from_x, Position from_y, 
-        Position to_x, Position to_y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XImage *image, *buffer;    
-    Dimension width, height;
-    char *image_data, *buffer_data;
-  
-    if (BW->bitmap.zooming)
-       ZoomOut(BW);
-    
-    QuerySwap(from_x, to_x);
-    QuerySwap(from_y, to_y);
-    from_x = max(0, from_x);
-    from_y = max(0, from_y);
-    to_x = min(BW->bitmap.width - 1, to_x);
-    to_y = min(BW->bitmap.height - 1, to_y);
-    
-    width = to_x - from_x + 1;
-    height = to_y - from_y + 1;
-
-    image_data = CreateCleanData(Length(width, height));
-    buffer_data = CreateCleanData(Length(width, height));
-
-    image = CreateBitmapImage(BW, image_data, width, height);
-    buffer = CreateBitmapImage(BW, buffer_data, width, height);
-
-    CopyImageData(BW->bitmap.image, image, from_x, from_y, to_x, to_y, 0, 0);
-    CopyImageData(BW->bitmap.buffer, buffer, from_x, from_y, to_x, to_y, 0, 0);
-    
-    BW->bitmap.zoom.image = BW->bitmap.image;
-    BW->bitmap.zoom.buffer = BW->bitmap.buffer;
-    BW->bitmap.zoom.at_x = from_x;
-    BW->bitmap.zoom.at_y = from_y;
-    BW->bitmap.zoom.fold = BW->bitmap.fold;
-    BW->bitmap.zoom.changed = BW->bitmap.changed;
-    BW->bitmap.zoom.hot = BW->bitmap.hot;
-    BW->bitmap.zoom.grid = BW->bitmap.grid;
-
-    BW->bitmap.image = image;
-    BW->bitmap.buffer = buffer;
-    BW->bitmap.width = width;
-    BW->bitmap.height = height;
-    BW->bitmap.changed = False;
-    BW->bitmap.hot.x -= from_x;
-    BW->bitmap.hot.y -= from_y;
-    BW->bitmap.mark.from_x = NotSet;
-    BW->bitmap.mark.from_y = NotSet;
-    BW->bitmap.mark.to_x = NotSet;
-    BW->bitmap.mark.to_y = NotSet;
-    BW->bitmap.zooming = True;
-    BW->bitmap.grid = True; /* potencially true, could use a resource here */
-
-    FixHotSpot(BW);
-
-    Resize((Widget)BW);
-    if (BW->core.visible)
-       XClearArea(XtDisplay(BW), XtWindow(BW),
-                  0, 0, 
-                  BW->core.width, BW->core.height,
-                  True);
-}
-
-
-void 
-BWRescale(Widget w, Dimension width, Dimension height)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XImage *image, *buffer;
-    char *buffer_data;
-
-    if (BW->bitmap.zooming)
-       ZoomOut(BW);
-        
-    image = ScaleBitmapImage(BW, BW->bitmap.image, 
-                      (double) width / (double) BW->bitmap.image->width,
-                      (double) height / (double) BW->bitmap.image->height);
-
-    buffer_data = CreateCleanData(Length(image->width, image->height));
-    buffer = CreateBitmapImage(BW, buffer_data, 
-                              (Dimension) image->width, 
-                              (Dimension) image->height);
-    
-    TransferImageData(BW->bitmap.buffer, buffer);
-
-    DestroyBitmapImage(&BW->bitmap.image);
-    DestroyBitmapImage(&BW->bitmap.buffer);
-    
-    BW->bitmap.image = image;
-    BW->bitmap.buffer = buffer;
-    BW->bitmap.width = image->width;
-    BW->bitmap.height = image->height;
-    
-    FixHotSpot(BW);
-    FixMark(BW);
-
-    Resize((Widget)BW);
-    if (BW->core.visible)
-       XClearArea(XtDisplay(BW), XtWindow(BW),
-                  0, 0, 
-                  BW->core.width, BW->core.height,
-                  True);
-}
-
-Boolean 
-BWQueryZooming(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return BW->bitmap.zooming;
-}
-
-
-static void 
-ResizeGrid(BitmapWidget BW, Dimension width, Dimension height)
-{
-  XImage *image, *buffer;
-  char *image_data, *buffer_data;
-  
-  if (BW->bitmap.zooming)
-    ZoomOut(BW);
-  
-  image_data = CreateCleanData(Length(width, height));
-  buffer_data = CreateCleanData(Length(width, height));
-  
-  image = CreateBitmapImage(BW, image_data, width, height);
-  buffer = CreateBitmapImage(BW, buffer_data, width, height);
-  
-  TransferImageData(BW->bitmap.image, image);
-  TransferImageData(BW->bitmap.buffer, buffer);
-  
-  DestroyBitmapImage(&BW->bitmap.image);
-  DestroyBitmapImage(&BW->bitmap.buffer);
-  
-  BW->bitmap.image = image;
-  BW->bitmap.buffer = buffer;
-  BW->bitmap.width = width;
-  BW->bitmap.height = height;
-  
-  FixHotSpot(BW);
-  FixMark(BW);
-}
-
-void 
-BWResize(Widget w, Dimension width, Dimension height)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    ResizeGrid(BW, width, height);
-
-    Resize((Widget)BW);
-    if (BW->core.visible)
-       XClearArea(XtDisplay(BW), XtWindow(BW),
-                  0, 0, 
-                  BW->core.width, BW->core.height,
-                  True);
-}
-
-static void 
-Destroy(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    XFreeGC(XtDisplay(w), BW->bitmap.drawing_gc);
-    XFreeGC(XtDisplay(w), BW->bitmap.highlighting_gc);
-    XFreeGC(XtDisplay(w), BW->bitmap.frame_gc);
-    XFreeGC(XtDisplay(w), BW->bitmap.axes_gc);
-    BWRemoveAllRequests(w);
-
-    XtFree(BW->bitmap.filename);
-    XtFree(BW->bitmap.basename);
-}
-
-
-static void 
-Resize(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    Dimension squareW, squareH;
-
-    squareW = max(1, ((int)BW->core.width - 2 * (int)BW->bitmap.margin) / 
-                 (int)BW->bitmap.width);
-    squareH = max(1, ((int)BW->core.height - 2 * (int)BW->bitmap.margin) / 
-                 (int)BW->bitmap.height);
-
-    if (BW->bitmap.proportional)
-       BW->bitmap.squareW = BW->bitmap.squareH = min(squareW, squareH);
-    else {
-       BW->bitmap.squareW = squareW;
-       BW->bitmap.squareH = squareH;
-    }
-    
-    BW->bitmap.horizOffset = max((Position)BW->bitmap.margin, 
-                                (Position)(BW->core.width - 
-                                           BW->bitmap.width * 
-                                           BW->bitmap.squareW) / 2);
-    BW->bitmap.vertOffset = max((Position)BW->bitmap.margin, 
-                               (Position)(BW->core.height - 
-                                          BW->bitmap.height * 
-                                          BW->bitmap.squareH) / 2);
-
-    BW->bitmap.grid &= ((BW->bitmap.squareW > BW->bitmap.grid_tolerance) && 
-                       (BW->bitmap.squareH > BW->bitmap.grid_tolerance));
-}
-
-/* ARGSUSED */
-static void 
-Redisplay(Widget w, XEvent *event, Region region)
-{
-     BitmapWidget BW = (BitmapWidget) w;
-
-  if(event->type == Expose
-     &&
-     BW->core.visible)
-    if (BW->bitmap.stipple_change_expose_event == False)
-      Refresh(BW, 
-             event->xexpose.x, event->xexpose.y,
-             event->xexpose.width, event->xexpose.height);
-}
-
-void 
-BWClip(Widget w, Position x, Position y, Dimension width, Dimension height)
-{
-    Position      from_x, from_y,
-                  to_x, to_y;
-    BitmapWidget BW = (BitmapWidget) w;
-    XRectangle rectangle;
-  
-    from_x = InBitmapX(BW, x);
-    from_y = InBitmapY(BW, y);
-    to_x = InBitmapX(BW, x + width);
-    to_y = InBitmapY(BW, y + height);
-    QuerySwap(from_x, to_x);
-    QuerySwap(from_y, to_y);
-    from_x = max(0, from_x);
-    from_y = max(0, from_y);
-    to_x = min(BW->bitmap.width - 1, to_x);
-    to_y = min(BW->bitmap.height - 1, to_y);
-
-    rectangle.x = InWindowX(BW, from_x);
-    rectangle.y = InWindowY(BW, from_y);
-    rectangle.width = InWindowX(BW, to_x  + 1) - InWindowX(BW, from_x);
-    rectangle.height = InWindowY(BW, to_y + 1) - InWindowY(BW, from_y);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.highlighting_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.drawing_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.frame_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.axes_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-}
-
-void 
-BWUnclip(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XRectangle rectangle;
-  
-    rectangle.x = InWindowX(BW, 0);
-    rectangle.y = InWindowY(BW, 0);
-    rectangle.width = InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0);
-    rectangle.height = InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.highlighting_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.drawing_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.frame_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.axes_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-}
-
-static void 
-Refresh(BitmapWidget BW, Position x, Position y, 
-       Dimension width, Dimension height)
-{
-    XRectangle rectangle;
-
-    rectangle.x = min(x, InWindowX(BW, InBitmapX(BW, x)));
-    rectangle.y = min(y, InWindowY(BW, InBitmapY(BW, y)));
-    rectangle.width = max(x + width,
-                    InWindowX(BW, InBitmapX(BW, x + width)+1)) - rectangle.x;
-    rectangle.height = max(y + height,
-                    InWindowY(BW, InBitmapY(BW, y + height)+1)) - rectangle.y;
-    
-    XClearArea(XtDisplay(BW), XtWindow(BW),
-              rectangle.x, rectangle.y,
-              rectangle.width, rectangle.height,
-              False);
-
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.frame_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-
-    XDrawRectangle(XtDisplay(BW), XtWindow(BW),
-                  BW->bitmap.frame_gc,
-                  InWindowX(BW, 0) - 1, InWindowY(BW, 0) - 1,
-                  InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1, 
-                  InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0) + 1);
-
-    BWClip((Widget) BW, x, y, width, height);
-
-    BWRedrawGrid((Widget) BW, x, y, width, height);
-
-    BWRedrawSquares((Widget) BW, x, y, width, height);
-
-    BWRedrawMark((Widget) BW);
-    BWRedrawHotSpot((Widget) BW);
-    BWRedrawAxes((Widget) BW);
-    BWUnclip((Widget) BW);
-}
-
-Boolean 
-BWQueryGrid(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return BW->bitmap.grid;
-}
-
-void 
-BWSwitchGrid(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    BW->bitmap.grid ^= TRUE;
-    BWDrawGrid(w,
-              0, 0,
-              BW->bitmap.image->width - 1, BW->bitmap.image->height - 1);
-}
-
-void 
-BWGrid(Widget w, Boolean _switch)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.grid != _switch)
-       BWSwitchGrid(w);
-}
-
-Boolean 
-BWQueryDashed(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return (BW->bitmap.dashed);
-}
-
-void 
-BWSwitchDashed(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XRectangle rectangle;
-
-    BWRedrawGrid(w, 0, 0, BW->bitmap.width - 1, BW->bitmap.height - 1);
-
-    rectangle.x = 0;
-    rectangle.y = 0;
-    rectangle.width = BW->core.width;
-    rectangle.height = BW->core.height;
-
-    XSetClipRectangles(XtDisplay(BW),
-                      BW->bitmap.frame_gc,
-                      0, 0,
-                      &rectangle, 1,
-                      Unsorted);
-
-    XDrawRectangle(XtDisplay(BW), XtWindow(BW),
-                  BW->bitmap.frame_gc,
-                  InWindowX(BW, 0) - 1, InWindowY(BW, 0) - 1,
-                  InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1, 
-                  InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0) + 1);
-    
-    BW->bitmap.dashed ^= True;
-    XSetFillStyle(XtDisplay(BW), BW->bitmap.frame_gc,
-                 (BW->bitmap.dashed ? FillStippled : FillSolid));
-    XDrawRectangle(XtDisplay(BW), XtWindow(BW),
-                  BW->bitmap.frame_gc,
-                  InWindowX(BW, 0) - 1, InWindowY(BW, 0) - 1,
-                  InWindowX(BW, BW->bitmap.width) - InWindowX(BW, 0) + 1, 
-                  InWindowY(BW, BW->bitmap.height) - InWindowY(BW, 0) + 1);
-
-    BWUnclip(w);
-   
-    BWRedrawGrid(w, 0, 0, BW->bitmap.width - 1, BW->bitmap.height - 1);
-}
-
-void 
-BWDashed(Widget w, Boolean _switch)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.dashed != _switch)
-       BWSwitchDashed(w);
-}
-
-static Boolean 
-SetValues(Widget old, Widget request, Widget new, 
-         ArgList args, Cardinal *num_args) /* ARGSUSED */
-{
-  BitmapWidget oldbw = (BitmapWidget) old;
-  BitmapWidget newbw = (BitmapWidget) new;
-  Boolean resize = False;
-  Boolean redisplay = False;
-
-#define NE(field) (oldbw->field != newbw->field)
-
-  if (NE(bitmap.grid))
-    BWSwitchGrid(old);
-
-  if (NE(bitmap.dashed))
-    BWSwitchDashed(old);
-
-  if (NE(bitmap.axes))
-    BWSwitchAxes(old);
-
-  if (NE(bitmap.stippled))
-    BWSwitchStippled(old);
-
-  if (NE(bitmap.proportional))
-    resize = True;
-
-  if (NE(bitmap.filename) || NE(bitmap.basename)  || NE(bitmap.size))
-    BWChangeNotify(old);
-
-  if (NE(bitmap.filename)) {
-    if (newbw->bitmap.filename) {
-      XtFree(oldbw->bitmap.filename);
-      newbw->bitmap.filename = XtNewString(newbw->bitmap.filename);
-    }
-    else 
-      newbw->bitmap.filename = oldbw->bitmap.filename;
-  }
-
-  if (NE(bitmap.basename)) {
-    if (newbw->bitmap.basename) {
-      XtFree(oldbw->bitmap.basename);
-      newbw->bitmap.basename = XtNewString(newbw->bitmap.basename);
-    }
-    else 
-      newbw->bitmap.basename = oldbw->bitmap.basename;
-  }
-  
-  if (NE(bitmap.size)) {
-    Dimension width, height;
-    
-    if (BWParseSize(newbw->bitmap.size, &width, &height)) { 
-      ResizeGrid(newbw, width, height);
-      resize = True;
-    }
-  }
-  
-  if (NE(bitmap.margin) || 
-      NE(bitmap.grid_tolerance) ||
-      NE(bitmap.squareW) ||
-      NE(bitmap.squareH) ||
-      NE(core.height) ||
-      NE(core.width))
-    resize = True;
-
-  if (NE(bitmap.hot.x) || NE(bitmap.hot.y))
-    BWSetHotSpot(old, newbw->bitmap.hot.x, newbw->bitmap.hot.y);
-    
-  if (NE(bitmap.foreground_pixel) || NE(core.background_pixel)) {
-    XSetForeground(XtDisplay(new), 
-                  newbw->bitmap.drawing_gc,
-                  newbw->bitmap.foreground_pixel 
-                  ^ 
-                  newbw->core.background_pixel);
-    redisplay = True;
-  }
-
-  if (NE(bitmap.frame_pixel) || NE(core.background_pixel)) {
-    XSetForeground(XtDisplay(new), 
-                  newbw->bitmap.frame_gc,
-                  newbw->bitmap.frame_pixel
-                  ^ 
-                  newbw->core.background_pixel);
-    redisplay = True;
-  }
-
-  if (NE(bitmap.dashes)) {
-    XSetStipple(XtDisplay(new),
-               newbw->bitmap.frame_gc,
-               newbw->bitmap.dashes);
-    redisplay = True;
-  }
-
-  if (NE(bitmap.highlight_pixel) || NE(core.background_pixel)) {
-    RedrawStippled(newbw);
-    XSetForeground(XtDisplay(new), 
-                  newbw->bitmap.highlighting_gc,
-                  newbw->bitmap.highlight_pixel
-                  ^ 
-                  newbw->core.background_pixel);
-    RedrawStippled(newbw);
-  }
-  if (NE(bitmap.stipple)) {
-    RedrawStippled(newbw);
-    XSetStipple(XtDisplay(new),
-               newbw->bitmap.highlighting_gc,
-               newbw->bitmap.stipple);
-    RedrawStippled(newbw);
-  }
-  
-  if (resize) Resize((Widget)newbw);
-
-    return (redisplay || resize);
-
-#undef NE
-}
-
-Boolean 
-BWQueryProportional(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    return (BW->bitmap.proportional);
-}
-
-void 
-BWSwitchProportional(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BW->bitmap.proportional ^= True;
-
-    Resize((Widget)BW);
-    if (BW->core.visible)
-       XClearArea(XtDisplay(BW), XtWindow(BW),
-                  0, 0, 
-                  BW->core.width, BW->core.height,
-                  True);
-}
-
-#if 0
-void 
-BWProportional(Widget w, Boolean _switch)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    if (BW->bitmap.proportional != _switch)
-       BWSwitchProportional(w);
-}
-#endif
-
-void 
-BWTPaste(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BWRequestSelection(w, event->xbutton.time, TRUE);
-
-    if (!BWQueryStored(w))
-       return;
-    
-    BWEngageRequest(w, RestoreRequest, False, 
-                   (char *)&(event->xbutton.state), sizeof(int));
-    
-    OnePointHandler(w,
-              (BWStatus*) BW->bitmap.request_stack[BW->bitmap.current].status,
-              event, NULL);
-}
-
-void 
-BWTMark(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BWEngageRequest(w, MarkRequest, False,
-                   (char *)&(event->xbutton.state), sizeof(int));
-    TwoPointsHandler(w,
-            (BWStatus*) BW->bitmap.request_stack[BW->bitmap.current].status,
-            event, NULL);
-
-}
-
-void 
-BWTMarkAll(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    BWMarkAll(w);
-
-    BWGrabSelection(w, event->xkey.time);
-}
-
-void 
-BWTUnmark(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    BWUnmark(w);
-}
-
-/*****************************************************************************/
diff --git a/bitmap/Bitmap.h b/bitmap/Bitmap.h
deleted file mode 100644 (file)
index 9d6d61e..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-
-#ifndef _Bitmap_h
-#define _Bitmap_h
-
-/****************************************************************
- *
- * Bitmap widget
- *
- ****************************************************************/
-
-#include <X11/Xaw/Simple.h>
-
-/* Resources:
-
- Name               Class              RepType         Default Value
- ----               -----              -------         ------------- 
- background         Background         Pixel           XtDefaultBackground
- foreground          Foredround         Pixel           XtDefaultForeground
- highlight           Highlight          Pixel           XtDefaultForeground
- frame               Frame              Pixel           XtDefaultForeground
- border                     BorderColor        Pixel           XtDefaultForeground
- borderWidth        BorderWidth        Dimension       1
- mappedWhenManaged   MappedWhenManaged Boolean         True
- resize              Resize             Boolean         True
- sensitive          Sensitive          Boolean         True
- width              Width              Dimension       0
- height                     Height             Dimension       0
- size                Size               String          32x32
- squareWidht         SquareWidht        Dimension       16
- squareHeight        SquareHeight       Dimension       16
- x                  Position           Position        320
- y                  Position           Position        320
- xHot                XHot               Position        NotSet
- yHot                YHot               Position        NotSet
- margin              Margin             Dimension       16
- grid                Grid               Boolean         True
- gridTolerance       GridTolerance      Dimension       8
- dashed              Dashed             Boolean         True
- dashes              Dashes             Bitmap          XtUnspecifiedPixmap
- stippled            Stippled           Boolean         True
- stipple             Stipple            Bitmap          XtUnspecifiedPixmap
- proportional        Proportional       Boolean         True
- axes                Axes               Boolean         True
- button1Function     Button1Function    ButtonFunction  Set  
- button2Function     Button2Function    ButtonFunction  Invert
- button3Function     Button3Function    ButtonFunction  Clear
- button4Function     Button4Function    ButtonFunction  Invert
- button5Function     Button5Function    ButtonFunction  Invert
- filename            Filename           String          None
- basename            Basename           String          None
-*/
-
-/* define any special resource names here that are not in <X11/StringDefs.h> */
-
-#define XtNbitmapResource "bitmapResource"
-#define XtNstipple "stipple"
-#define XtNstippled "stippled"
-#define XtNdashes "dashes"
-#define XtNdashed "dashed"
-#define XtNgrid "grid"
-#define XtNgridTolerance "gridTolerance"
-#define XtNaxes "axes"
-#define XtNbitmapSize "bitmapSize"
-#define XtNsize "size"
-#define XtNsquareWidth "squareWidth"
-#define XtNsquareHeight "squareHeight"
-#define XtNxHot "xHot"
-#define XtNyHot "yHot"
-#define XtNbutton1Function "button1Function"
-#define XtNbutton2Function "button2Function"
-#define XtNbutton3Function "button3Function"
-#define XtNbutton4Function "button4Function"
-#define XtNbutton5Function "button5Function"
-#define XtNfilename "filename"
-#define XtNbasename "basename"
-#define XtNmouseForeground "mouseForeground"
-#define XtNmouseBackground "mouseBackground"
-#define XtNframe "frame"
-#define XtNmargin "margin"
-#define XtNproportional "proportional"
-
-#define XtCBitmapResource "BitmapResource"
-#define XtCHighlight "Highlight"
-#define XtCStipple "Stipple"
-#define XtCStippled "Stippled"
-#define XtCDashes "Dashes"
-#define XtCDashed "Dashed"
-#define XtCGrid "Grid"
-#define XtCGridTolerance "GridTolerance"
-#define XtCAxes "Axes"
-#define XtBitmapSize "BitmapSize"
-#define XtCSize "Size"
-#define XtCSquareWidth "SquareWidth"
-#define XtCSquareHeight "SquareHeight"
-#define XtCXHot "XHot"
-#define XtCYHot "YHot"
-#define XtCButton1Function "Button1Function"
-#define XtCButton2Function "Button2Function"
-#define XtCButton3Function "Button3Function"
-#define XtCButton4Function "Button4Function"
-#define XtCButton5Function "Button5Function"
-#define XtCFilename "Filename"
-#define XtCBasename "Basename"
-#define XtCFrame "Frame"
-#ifndef XtCMargin
-#define XtCMargin "Margin"
-#endif
-#define XtCProportional "Proportional"
-
-#define XtRButtonFunction "ButtonFunction"
-
-/* bitmap defines */
-
-#define NotSet   -1
-#define Clear     0
-#define Set       1
-#define Invert    2
-#define Highlight 3
-#define On        True
-#define Off       False
-
-#define XtClear "clear"
-#define XtSet "set"
-#define XtInvert "invert"
-
-#define MarkRequest "MarkRequest"
-#define StoreRequest "StoreRequest"
-#define RestoreRequest "RestoreRequest"
-#define CopyRequest "CopyRequest"
-#define MoveRequest "MoveRequest"
-#define PointRequest "PointRequest"
-#define LineRequest "LineRequest"
-#define CurveRequest "CurveRequest"
-#define RectangleRequest "RectangleRequest"
-#define FilledRectangleRequest "FilledRectangleRequest"
-#define CircleRequest "CircleRequest"
-#define FilledCircleRequest "FilledCircleRequest"
-#define FloodFillRequest "FloodFillRequest"
-#define HotSpotRequest "HotSpotRequest"
-#define ZoomInRequest "ZoomInRequest"
-#define PasteRequest "PasteRequest"
-#define ImmediateCopyRequest "ImmediateCopyRequest"
-#define ImmediateMoveRequest "ImmediateMoveRequest"
-
-/* bitmap exports */
-
-typedef struct _BWRequestRec BWRequestRec;
-typedef char *BWRequest;
-
-/* declare specific BitmapWidget class and instance datatypes */
-
-typedef struct _BitmapClassRec *BitmapWidgetClass;
-typedef struct _BitmapRec      *BitmapWidget;
-/* declare the class constant */
-
-extern WidgetClass bitmapWidgetClass;
-
-extern Boolean BWEngageRequest(Widget w, BWRequest name, Boolean trap, 
-                              XtPointer call_data, Cardinal call_data_size);
-extern Boolean BWTerminateRequest(Widget w, Boolean cont);
-
-extern void BWUp ( Widget w );
-extern void BWDown ( Widget w );
-extern void BWLeft ( Widget w );
-extern void BWRight ( Widget w );
-extern void BWRotateRight ( Widget w );
-extern void BWRotateLeft ( Widget w );
-extern void BWSwitchGrid ( Widget w );
-extern void BWGrid ( Widget w, Boolean _switch );
-extern void BWSwitchDashed ( Widget w );
-extern void BWDashed ( Widget w, Boolean _switch );
-extern void BWSwitchAxes ( Widget w );
-extern void BWAxes ( Widget w, Boolean _switch );
-extern void BWRedrawAxes( Widget w );
-extern void BWDrawLine ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y, int value );
-extern void BWDrawRectangle ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y, int value );
-extern void BWDrawFilledRectangle ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y, int value );
-extern void BWDrawCircle ( Widget w, Position origin_x, Position origin_y, Position point_x, Position point_y, int value );
-extern void BWDrawFilledCircle ( Widget w, Position origin_x, Position origin_y, Position point_x, Position point_y, int value );
-extern void BWFloodFill ( Widget w, Position x, Position y, int value );
-extern void BWMark ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y );
-extern void BWMarkAll ( Widget w );
-extern void BWUnmark ( Widget w );
-extern void BWSelect ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y, Time btime );
-extern void BWStore ( Widget w );
-extern void BWStoreToBuffer ( Widget w );
-extern void BWUndo ( Widget w );
-extern void BWResize ( Widget w, Dimension width, Dimension height );
-extern void BWClip ( Widget w, Position x, Position y, Dimension width, Dimension height );
-extern void BWUnclip ( Widget w );
-extern void BWGrabSelection ( Widget w, Time btime );
-extern void BWRequestSelection ( Widget w, Time btime, Boolean wait );
-extern void BWSetChanged ( Widget w );
-extern Boolean BWQueryChanged ( Widget w );
-extern int BWReadFile ( Widget w, String filename, String basename );
-extern int BWWriteFile ( Widget w, String filename, String basename );
-extern String BWUnparseStatus ( Widget w );
-extern String BWGetFilename ( Widget w, String *str );
-extern String BWGetBasename ( Widget w, String *str );
-extern void BWChangeBasename ( Widget w, String str );
-extern void BWRemoveAllRequests ( Widget w );
-extern void BWClearHotSpot ( Widget w );
-extern Boolean BWQueryMarked ( Widget w );
-extern void BWFold ( Widget w );
-extern void BWClear ( Widget w );
-extern void BWSet ( Widget w );
-extern void BWInvert ( Widget w );
-extern void BWFlipHoriz ( Widget w );
-extern void BWFlipVert ( Widget w );
-extern void BWClearMarked ( Widget w );
-extern Boolean BWAddRequest ( Widget w, BWRequest name, Boolean trap, XtPointer call_data, Cardinal call_data_size );
-extern void BWChangeNotify ( Widget w );
-extern Pixmap BWGetUnzoomedPixmap ( Widget w );
-extern void BWClearChanged ( Widget w );
-extern Boolean BWQueryStored ( Widget w );
-extern Boolean BWQueryStippled ( Widget w );
-extern void BWSwitchStippled ( Widget w );
-extern void BWRedrawMark ( Widget w );
-extern Boolean BWQueryAxes ( Widget w );
-extern void BWHighlightAxes ( Widget w );
-extern String BWGetFilepath ( Widget w, String *str );
-extern void BWZoomOut ( Widget w );
-extern void BWZoomMarked ( Widget w );
-extern void BWRescale ( Widget w, Dimension width, Dimension height );
-extern Boolean BWQueryZooming ( Widget w );
-extern void BWRedrawGrid ( Widget w, Position x, Position y, Dimension width, Dimension height );
-extern void BWRedrawSquares ( Widget w, Position x, Position y, Dimension width, Dimension height );
-extern void BWRedrawHotSpot ( Widget w );
-extern void BWSetHotSpot(Widget w, Position x, Position y);
-extern Boolean BWQueryGrid ( Widget w );
-extern Boolean BWQueryDashed ( Widget w );
-extern Boolean BWQueryProportional ( Widget w );
-extern void BWSwitchProportional ( Widget w );
-extern void BWDrawGrid ( Widget w, Position from_x, Position from_y, Position to_x, Position to_y );
-extern void BWChangeFilename ( Widget w, String str );
-extern Boolean BWParseSize ( String size, Dimension *width, Dimension *height );
-extern Boolean BWQuerySelection ( Widget w, Time btime );
-extern int BWStoreFile ( Widget w, String filename, String *basename );
-extern void BWNotify ( Widget w, XtActionProc proc );
-extern void BWTMark ( Widget w, XEvent *event, String *params, Cardinal *num_params  );
-extern void BWTMarkAll ( Widget w, XEvent *event, String *params, Cardinal *num_params );
-extern void BWTUnmark ( Widget w, XEvent *event, String *params, Cardinal *num_params );
-extern void BWTPaste ( Widget w, XEvent *event, String *params, Cardinal *num_params );
-extern void BWDebug ( Widget w, XEvent *event, String *params, Cardinal *num_params );
-extern void BWAbort ( Widget w );
-extern Boolean BWRemoveRequest ( Widget w );
-extern void BWRedraw ( Widget w );
-extern Pixmap BWGetPixmap( Widget w );
-
-#endif /* _Bitmap_h */
-
-
diff --git a/bitmap/BitmapP.h b/bitmap/BitmapP.h
deleted file mode 100644 (file)
index 7957f23..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-
-
-#ifndef _BitmapP_h
-#define _BitmapP_h
-
-#define bit int
-
-#include "Bitmap.h"
-#include "Requests.h"
-#include <X11/Xaw/SimpleP.h>
-
-typedef struct {
-    Atom           *targets;
-    Cardinal        num_targets;
-    BWRequestRec   *requests;
-    Cardinal        num_requests;
-    BWRequestRec   *request[100];
-  
-} BitmapClassPart;
-
-/* Full class record declaration */
-typedef struct _BitmapClassRec {
-  CoreClassPart          core_class;
-  SimpleClassPart        simple_class;
-  BitmapClassPart        bitmap_class;
-} BitmapClassRec;
-
-extern BitmapClassRec bitmapClassRec;
-
-typedef void (*EngageProc)(Widget, BWStatus *, XtPointer, int *);
-typedef void (*TerminateProc)( Widget, BWStatus *, XtPointer);
-typedef void (*RemoveProc)(Widget w, BWStatus *, XtPointer);
-
-/**********/
-struct _BWRequestRec {
-  char         *name;
-  int           status_size;
-  EngageProc    engage;
-  XtPointer     engage_client_data;
-  TerminateProc terminate;
-  XtPointer     terminate_client_data;
-  RemoveProc    remove;
-  XtPointer     remove_client_data;
-} ;
-
-typedef struct {
-  Position from_x, from_y,
-           to_x, to_y;
-} BWArea;
-
-typedef struct {
-    BWRequestRec *request;
-    XtPointer     status;
-    Boolean       trap;
-    XtPointer     call_data;
-} BWRequestStack;
-
-typedef struct {
-    XImage   *image, *buffer;
-    XPoint    hot;
-    Position  at_x, at_y;
-    Boolean   fold;
-    Boolean   grid;
-    Boolean   changed;
-} BWZoom;
-
-typedef struct {
-    Boolean   own;
-    Boolean   limbo;
-} BWSelection;
-
-/* New fields for the Bitmap widget record */
-typedef struct {
-  /* resources */
-  Pixel            foreground_pixel;
-  Pixel            highlight_pixel;
-  Pixel            frame_pixel;
-  Pixmap           stipple;
-  Boolean          stippled;
-  Boolean          proportional;
-  Boolean          grid;
-  Dimension        grid_tolerance;
-  Pixmap           dashes;
-  Boolean          dashed;
-  Boolean          axes;
-  Boolean          resize;
-  Dimension        margin, squareW, squareH, width, height;
-  XPoint           hot;
-  int              button_function[5];
-  String           filename, basename;
-  /* private state */
-  String           size;
-  Position         horizOffset, vertOffset;
-  XtActionProc     notify;
-  BWRequestStack  *request_stack;
-  Cardinal         cardinal, current;
-  /*Boolean          trapping;*/
-  XImage          *image, *buffer, *storage;
-  XPoint           buffer_hot;
-  BWArea           mark, buffer_mark;
-  GC               drawing_gc;
-  GC               highlighting_gc;
-  GC               frame_gc;
-  GC               axes_gc;
-  Boolean          changed;
-  Boolean          fold;
-  Boolean          zooming;
-  BWZoom           zoom;
-  XtPointer        *value;
-  char             status[80];
-  BWSelection      selection;
-  Boolean          stipple_change_expose_event;
-} BitmapPart;
-
-/* Full instance record declaration */
-typedef struct _BitmapRec {
-  CorePart      core;
-  SimplePart    simple;
-  BitmapPart    bitmap;
-} BitmapRec;
-
-/* Private functions */
-
-#define Length(width, height)\
-        (((int)(width) + 7) / 8 * (height))
-
-#define InBitmapX(BW, x)\
-       (Position)(min((Position)((Dimension)(max(BW->bitmap.horizOffset,x)  -\
-                                  BW->bitmap.horizOffset) /\
-                                  BW->bitmap.squareW), BW->bitmap.width - 1))
-    
-#define InBitmapY(BW, y)\
-       (Position)(min((Position)((Dimension)(max(BW->bitmap.vertOffset, y)  -\
-                                  BW->bitmap.vertOffset) /\
-                                  BW->bitmap.squareH), BW->bitmap.height - 1))
-    
-#define InWindowX(BW, x)\
-       (Position) (BW->bitmap.horizOffset + ((x) * BW->bitmap.squareW))
-
-#define InWindowY(BW, y)\
-       (Position) (BW->bitmap.vertOffset + ((y) * BW->bitmap.squareH))
-     
-#define GetPixmap(BW, image)\
-    XCreateBitmapFromData(XtDisplay(BW), XtWindow(BW),\
-                         image->data, image->width, image->height)
-
-
-#define QuerySet(x, y) (((x) != NotSet) && ((y) != NotSet))
-
-#define bit int
-
-#define QueryZero(x, y) (((x) == 0) || ((y) == 0))
-
-#define Swap(x, y) {Position t; t = x; x = y; y = t;}
-
-#define QuerySwap(x, y) if(x > y) Swap(x, y)
-
-#define QueryInBitmap(BW, x, y)\
-  (((x) >= 0) && ((x) < BW->bitmap.image->width) &&\
-   ((y) >= 0) && ((y) < BW->bitmap.image->height))
-
-#define Value(BW, button)   (BW->bitmap.button_function[button - 1])
-
-#define CreateCleanData(length) XtCalloc(length, sizeof(char))
-XImage *CreateBitmapImage(BitmapWidget BW, char *data, Dimension width, Dimension height);
-void DestroyBitmapImage(XImage **image);
-void  TransferImageData(XImage *source, XImage *destination);
-void CopyImageData(XImage *source, XImage *destination, 
-             Position from_x, Position from_y, 
-             Position to_x, Position to_y, 
-             Position at_x, Position at_y);
-XImage *GetImage(BitmapWidget BW, Pixmap pixmap);
-XImage *ConvertToBitmapImage(BitmapWidget BW, XImage *image);
-XImage *ScaleBitmapImage(BitmapWidget BW, XImage *src, 
-                        double scale_x, double scale_y);
-
-extern Boolean DEBUG;
-
-#endif /* _BitmapP_h */
diff --git a/bitmap/COPYING b/bitmap/COPYING
deleted file mode 100644 (file)
index 7a8c5fc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright 1988, 1993, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
diff --git a/bitmap/ChangeLog b/bitmap/ChangeLog
deleted file mode 100644 (file)
index 772977d..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-commit 7c4c903a1612528e09858554c6fdaab05d2ba095
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Sep 22 19:49:57 2009 -0700
-
-    bitmap 1.0.4
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 4abbf05633f16cae587f9f24881d18c22e43800d
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Sep 22 19:39:08 2009 -0700
-
-    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit fb4778c1a6a114df03f3cefc87e747fab983355f
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Sep 22 19:30:35 2009 -0700
-
-    Strip RCS/CVS ids
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 948a119b19bf2e1822c63c2e6e86482e36df0cc0
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Sep 22 19:25:04 2009 -0700
-
-    Fill in COPYING, README, & AUTHORS
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 8337c277db59b5fb8e13428ab65a43725546bcdb
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Jan 13 14:29:53 2009 -0200
-
-    Rename app-defaults files to match "pattern" used on other applications.
-
-commit e23fbaa033e064efc7fcfa6ec49901c241736340
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Mon Jan 12 16:11:00 2009 -0200
-
-    Ansification and compile warning fixes.
-    
-      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, and corrects
-    make distcheck.
-
-commit 7527b67979d61609bff5bc8c54d2b11874a7bbfa
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Wed Aug 20 10:32:48 2008 -0400
-
-    xaw8 is gone, use xaw7
-
-commit 3dc6744ae0332efc9c4a621401c1257e4d4c3c6d
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Fri May 16 14:22:16 2008 +0200
-
-    $(builddir) is the current directory
-    
-    Apparently automake doesn't always export the builddir variable.
-    This fixes my previous commit.
-
-commit 3154399310460759466d66cb17e723548e205776
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Sun Apr 20 19:25:40 2008 +0200
-
-    Fix build with builddir != srcdir
-
-commit 5d6bff83b62c3c9626503b36d2e5190a602bf43b
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Sun Apr 20 19:22:40 2008 +0200
-
-    Fix typo in bitmap.man
-
-commit 8003d22d2c12fe47d1fc06216c60dc813ed39f98
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Thu Mar 27 19:22:22 2008 -0700
-
-    Build fix for case-insensitive file systems
-
-commit 088006f9bb62db2523117dac568d028bd96db488
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Dec 6 15:51:03 2007 -0500
-
-    Add missing PHONY line for automatic ChangeLog generation
-
-commit d79bd0857961669aff4c155f4c3205af4c89b18e
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Aug 10 15:47:13 2007 -0700
-
-    Add AM_PROG_CC_C_O to configure.ac to make automake-1.10 happier
-    
-    Makefile.am:53: compiling `atobm.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
-
-commit 0fa2f5aa4b0e62ceb4685123182bf018c27e293a
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jan 23 13:42:25 2007 -0800
-
-    Version bump: 1.0.3
-
-commit 4d02bf25b4e64d0a3fb2270491d3dbe4fc18effc
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jan 23 13:42:01 2007 -0800
-
-    Replace static changelog with dist-hook to generate from git log
-
-commit 2c5045d72ee4120c52cfc7e008237a438a1c2d30
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Mon Jan 22 19:45:08 2007 -0800
-
-    Remove on/off form of options from bitmap.man man page
-    
-    Turns out the previous formatting error that hid these was an attempt
-    to comment them out since they aren't implemented, so we'll just delete them.
-
-commit 5c1c01c8222eac13e9a65a36d3b953ae6f75ae6b
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jan 2 14:37:42 2007 -0800
-
-    renamed: .cvsignore -> .gitignore
-
-commit ad55b1108f61ae0e3643bdffe430c71973d3d7ae
-Author: Eric S. Raymond <esr@thyrsus.com>
-Date:   Tue Jan 2 14:34:17 2007 -0800
-
-    Bug 9511: Garbled macro invocation in bitmap.1x manual page.
-    
-    <https://bugs.freedesktop.org/show_bug.cgi?id=9511>
-
-commit 3537d2121dcc68e3ecb93eaa2b341d759b0fbc88
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Fri May 12 16:19:54 2006 +0000
-
-    Bump to 1.0.2
-
-commit d8f719a352cd4d4ace60566b73a077175940a351
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue May 9 21:55:08 2006 +0000
-
-    Bug #5628 <https://bugs.freedesktop.org/show_bug.cgi?id=5628> Shadow pages
-        not created correctly when MANDIR & MANSUFFIX don't match.
-
-commit 545a878fa367a32059b33a21b9253a69ed95ccf6
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:42 2005 +0000
-
-    Update package version for X11R7 release.
-
-commit 038d4cc67674fcecd638489625cedfdc57f4bcea
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:39 2005 +0000
-
-    Stub COPYING files
-
-commit ab8a9596b7c9729914b1444208521e939f35535f
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:01 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit d1ae6091d49c8af843e6895cb438225078a0f797
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 7 16:17:58 2005 +0000
-
-    Change to use the app-defaults default dir configured in libXt.
-
-commit 07cfe6f6de483aefcc18836fd3f03bdc5d6cd823
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:48:16 2005 +0000
-
-    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-commit f0e1e5f67882635777fa9a25496265a661c40a02
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:49:15 2005 +0000
-
-    Update package version number for X11R7 RC3 release.
-
-commit d1dac2d6d7470212e3b2366702923a03950b9834
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:36 2005 +0000
-
-    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
-        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
-
-commit c361bb94796e409437ac71714c9a3746da0136dc
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:34:55 2005 +0000
-
-    Another pass at .cvsignores for apps.
-
-commit eb1544cfc467a48074e11118a85fec3b4980460d
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:47 2005 +0000
-
-    Add/improve .cvsignore files for apps.
-
-commit 0909ff9192c30720ce6a82043d10b4f7ce6fab83
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:47 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit 905ded4a3825727326ccacd48a76ca221ff59a81
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Oct 18 00:32:54 2005 +0000
-
-    Change default install dir for app-default files from
-        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
-        the monolith & allow localization
-
-commit fde7c43f092eba195a4a93391d9518f321ec9e40
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:19 2005 +0000
-
-    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
-        work better with BSD make
-
-commit 0dbcf2d9436b3860ed33563e0f2daf0b2bc78dd9
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 21:13:15 2005 +0000
-
-    Rename .shadows.DONE to shadows.DONE to avoid some make's thinking it's a
-        suffix rule (reported by Matthieu Herrb)
-
-commit 00b3817d8c24dd400ff870bb02bc1c6ba2db1f05
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 01:12:07 2005 +0000
-
-    Add shadow man pages for atobm and bmtoa.
-
-commit ba5f0c8d40af187191bcda8c8e72b3e554f3c50a
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:41 2005 +0000
-
-    Use sed to fill in variables in man page
-
-commit 358ae071207882e6202bfaa4c0dd341f7239c307
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Oct 4 23:15:11 2005 +0000
-
-    Add bitmap.icon to EXTRA_DIST
-
-commit c3f282e1aa6176896089ea79be84b7250888a65c
-Author: Kristian Høgsberg <krh@redhat.com>
-Date:   Thu Sep 29 18:22:01 2005 +0000
-
-    Add Bitmap-nocase app default file to APPDEFAULTFILES.
-
-commit 53c51b2407108d9bcdca53c4d3757449465b3417
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Aug 1 20:25:27 2005 +0000
-
-    Install man pages to section 1 instead of section m (Patch from Donnie
-        Berkholz)
-
-commit 5135ddd5eb135237ea780d7e8c4a4074557ac23c
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:28 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit 6df7e0644c9f0ce2f306331910d8adf903610c1a
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Jul 26 15:44:01 2005 +0000
-
-    Replace more GNU make-ism's with more portable macros
-
-commit 55c2178d52dd695a31676bb7b48c1d19b3c77152
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 16 22:07:12 2005 +0000
-
-    Add #ifdef HAVE_CONFIG_H/#include "config.h" to files that need it to get
-        HAS_MKSTEMP defined in modular builds.
-
-commit 40fc1a66cc817dad40851d61011e0a90fa48fe46
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 16 22:00:11 2005 +0000
-
-    Convert more app-defaults rules to work with non-GNU make
-
-commit 1bef5390ae91148e61c613235e7db3729d7e8781
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 16 21:59:14 2005 +0000
-
-    Define HAS_MKSTEMP if mkstemp() is present (needed for improved protection
-        against tempfile race conditions in many places)
-
-commit cc48a5df41c59071eab0f58818366e10cb1ff4ac
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri Jul 15 16:52:07 2005 +0000
-
-    Add dependency on xbitmaps
-
-commit c6129c090ad25cd2f8b191f503ac6e8cd452a31d
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Wed Jul 6 15:47:38 2005 +0000
-
-    Build system for bitmap
-
-commit 9b6257bdb5461131e42a3d81330c76d7a2bc670a
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:31 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit 5285b60deac481a96007a45bad4da61e8ead2552
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:34:49 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit 9f0d53b85896e1c67f770b45edc0dfa5373110c0
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:12:50 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit 632e06aaad484b25e1c1931a8eb579679372d416
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:15 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit c83dc161b34afe817ed47abacbf5bad132c73888
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:23:53 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit a9a10f80d2b5d444c38eb54e99a6bccb07e0cbd6
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:29:01 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit 5b64274abaf585d108e65cb1dae497e74cad856e
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:57 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 0bd1f9d8ccaf46397745779f5964f3b843186896
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:57 2003 +0000
-
-    Initial revision
-
-commit 9711ac0a780f686806c135045d2db9b99fbe923f
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 15:54:52 2003 +0000
-
-    R6.6 is the Xorg base-line
diff --git a/bitmap/CutPaste.c b/bitmap/CutPaste.c
deleted file mode 100644 (file)
index 3a200ee..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xatom.h>
-#include "BitmapP.h"
-    
-#include <stdio.h>
-#include <math.h>
-
-#define min(x, y)                     (((x) < (y)) ? (x) : (y))
-#define max(x, y)                     (((x) > (y)) ? (x) : (y))
-
-
-
-/*****************************************************************************
- *                               Cut and Paste                               *
- *****************************************************************************/
-
-/* ARGSUSED */
-static Boolean 
-ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, 
-                XtPointer *val_ret, unsigned long *length, int *format)
-{
-    XPointer *value = (XPointer *)val_ret;
-    BitmapWidget BW = (BitmapWidget) w;
-    Pixmap *pixmap;
-    char *data;
-    XImage *image;
-    Dimension width, height;
-    switch (*target) {
-
-/*  XA_TARGETS undefined ?!?
-
-    case XA_TARGETS:
-       *type = XA_ATOM;
-       *value = (XPointer) bitmapClassRec.bitmap_class.targets;
-       *length = bitmapClassRec.bitmap_class.num_targets;
-       *format = 32;
-       return True;
-
-*/
-
-    case XA_BITMAP:
-    case XA_PIXMAP:
-       if (BWQueryMarked(w)) {
-         width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
-         height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-         data = CreateCleanData(Length(width, height));
-         image = CreateBitmapImage(BW, data, width, height);
-         CopyImageData(BW->bitmap.image, image, 
-                       BW->bitmap.mark.from_x, BW->bitmap.mark.from_y,
-                       BW->bitmap.mark.to_x, BW->bitmap.mark.to_y, 0, 0);
-         pixmap = (Pixmap *) XtMalloc(sizeof(Pixmap));
-         *pixmap = GetPixmap(BW, image);
-         DestroyBitmapImage(&image);
-       }
-       else if (BWQueryStored(w)) {
-         pixmap = (Pixmap *) XtMalloc(sizeof(Pixmap));
-         *pixmap = GetPixmap(BW, BW->bitmap.storage);
-       }
-       else return False;
-       *type = XA_PIXMAP;
-       *value = (XPointer) pixmap;
-       *length = 1;
-       *format = 32;
-       return True;
-
-    default:
-       return False;
-    }
-}
-
-/* ARGSUSED */
-static void 
-LoseSelection(Widget w, Atom selection)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    if (DEBUG)
-       fprintf(stderr, "Lost Selection\n");
-    BW->bitmap.selection.own = False;
-
-    BWUnmark(w);
-}
-
-/* ARGSUSED */
-static void 
-SelectionDone(Widget w, Atom *selection, Atom *target)
-{
-/*  Done Automatically ?!?
-
-    BitmapWidget BW = (BitmapWidget) w; 
-
-    if (*target != XA_TARGETS)
-       XtFree(BW->bitmap.value);
-
-*/
-}
-
-void 
-BWGrabSelection(Widget w, Time btime)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BW->bitmap.selection.own = XtOwnSelection(w, XA_PRIMARY, btime,
-                                             ConvertSelection, 
-                                             (XtLoseSelectionProc)LoseSelection, 
-                                             SelectionDone);
-       if (DEBUG && BW->bitmap.selection.own)
-           fprintf(stderr, "Own the selection\n");
-}
-
-
-/* ARGSUSED */
-static void 
-SelectionCallback(Widget w, XtPointer cldat, Atom *selection, Atom *type, 
-                 XtPointer val, unsigned long *length, int *format)
-{
-    XPointer value = (XPointer)val;
-    BitmapWidget BW = (BitmapWidget) w;
-    Pixmap *pixmap;
-
-   switch (*type) {
-       
-    case XA_BITMAP:
-    case XA_PIXMAP:
-       DestroyBitmapImage(&BW->bitmap.storage);
-       pixmap = (Pixmap *) value;
-       BW->bitmap.storage = GetImage(BW, *pixmap);
-       XFree((char *)pixmap);
-       break;
-       
-    default:
-       XtWarning(" selection request failed.  BitmapWidget");
-       break;
-    }
-
-    BW->bitmap.selection.limbo = FALSE;
-}
-
-void 
-BWRequestSelection(Widget w, Time btime, Boolean wait)
-{
-  BitmapWidget BW = (BitmapWidget) w;
-  
-  if (BW->bitmap.selection.own)
-    BWStore(w);
-  else {
-    XtGetSelectionValue(w, XA_PRIMARY, XA_PIXMAP,
-                       SelectionCallback, NULL, btime);
-    
-    BW->bitmap.selection.limbo = TRUE;
-    
-    if (wait)
-      while (BW->bitmap.selection.limbo) {
-       XEvent event;
-       XtNextEvent(&event);
-       XtDispatchEvent(&event);
-      }
-  }
-}
-
-/* ARGSUSED */
-/* Returns true if there is a transferable selection */
-Boolean 
-BWQuerySelection(Widget w, Time btime)
-{
-/* To be written.  XA_TARGETS to be used.  So far undefined ?!? */
-
-  return True;
-}
-/*****************************************************************************/
diff --git a/bitmap/Dashes b/bitmap/Dashes
deleted file mode 100644 (file)
index e81aa02..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#define Dashes_width 2
-#define Dashes_height 2
-static char Dashes_bits[] = {
-   0x01, 0x02};
diff --git a/bitmap/Dialog.c b/bitmap/Dialog.c
deleted file mode 100644 (file)
index 3cd525a..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xmu/CharSet.h>
-    
-#include "Dialog.h"
-
-#define min(x, y)                     (((x) < (y)) ? (x) : (y))
-#define max(x, y)                     (((x) > (y)) ? (x) : (y))
-
-
-static void SetDialogButton(Widget w, XEvent *event, 
-                           String *argv, Cardinal *argc);
-
-static XtActionsRec actions_table[] = {
-  {"set-dialog-button", SetDialogButton},
-};
-
-static DialogButton dialog_buttons[] = {
-    {"yes", Yes},
-    {"no", No},
-    {"maybe", Maybe},
-    {"okay", Okay},
-    {"abort", Abort},
-    {"cancel", Cancel},
-    {"retry", Retry},
-};
-
-static unsigned long selected;
-
-/* ARGSUSED */
-static void 
-SetSelected(Widget w, XtPointer clientData, XtPointer callData) /* ARGSUSED */
-{
-    String name = (String)clientData;
-    int i;
-    
-    for (i = 0; i < XtNumber(dialog_buttons); i++) 
-       if (!strcmp(dialog_buttons[i].name, name)) 
-           selected |= dialog_buttons[i].flag;
-}
-
-/* ARGSUSED */
-static void 
-SetDialogButton(Widget w,      /* not used */
-               XEvent *event,  /* not used */
-               String *argv, 
-               Cardinal *argc)
-{
-  char button_name[80];
-  XtPointer dummy = NULL;
-  int i;
-
-  for (i = 0; i < *argc; i++) {
-    XmuCopyISOLatin1Lowered (button_name, argv[i]);
-    SetSelected(w, button_name, dummy);
-  }
-}
-
-static Boolean firstTime = True;
-
-Dialog 
-CreateDialog(Widget top_widget, String name, unsigned long options)
-{
-    int i;
-    Dialog popup;
-
-    popup = (Dialog) XtMalloc(sizeof(_Dialog));
-
-    if (popup) {
-        if (firstTime) {
-         XtAddActions(actions_table, XtNumber(actions_table));
-         firstTime = False;
-       }
-       popup->top_widget = top_widget;
-       popup->shell_widget = XtCreatePopupShell(name, 
-                                                transientShellWidgetClass, 
-                                                top_widget, NULL, 0);
-       popup->dialog_widget = XtCreateManagedWidget("dialog", 
-                                                    dialogWidgetClass,
-                                                    popup->shell_widget, 
-                                                    NULL, 0);
-       for (i = 0; i < XtNumber(dialog_buttons); i++)
-           if (options & dialog_buttons[i].flag)
-               XawDialogAddButton(popup->dialog_widget, 
-                                  dialog_buttons[i].name, 
-                                  SetSelected, dialog_buttons[i].name);
-       popup->options = options;
-       return popup;
-    }
-    else
-       return NULL;
-}
-
-void 
-PopdownDialog(Dialog popup, String *answer)
-{
-    if (answer)
-       *answer = XawDialogGetValueString(popup->dialog_widget);
-    
-    XtPopdown(popup->shell_widget);
-}
-
-unsigned long 
-PopupDialog(Dialog popup, String message, String suggestion, 
-           String *answer, XtGrabKind grab)
-{
-  Position popup_x, popup_y, top_x, top_y;
-  Dimension popup_width, popup_height, top_width, top_height, border_width;
-  int n;
-  Arg wargs[4];
-
-  n = 0;
-  XtSetArg(wargs[n], XtNlabel, message); n++;
-  XtSetArg(wargs[n], XtNvalue, suggestion); n++;
-  XtSetValues(popup->dialog_widget, wargs, n);
-
-  XtRealizeWidget(popup->shell_widget);
-
-  n = 0;
-  XtSetArg(wargs[n], XtNx, &top_x); n++;
-  XtSetArg(wargs[n], XtNy, &top_y); n++;
-  XtSetArg(wargs[n], XtNwidth, &top_width); n++;
-  XtSetArg(wargs[n], XtNheight, &top_height); n++;
-  XtGetValues(popup->top_widget, wargs, n);
-
-  n = 0;
-  XtSetArg(wargs[n], XtNwidth, &popup_width); n++;
-  XtSetArg(wargs[n], XtNheight, &popup_height); n++;
-  XtSetArg(wargs[n], XtNborderWidth, &border_width); n++;
-  XtGetValues(popup->shell_widget, wargs, n);
-
-  popup_x = max(0, 
-       min(top_x + ((Position)top_width - (Position)popup_width) / 2, 
-           (Position)DisplayWidth(XtDisplay(popup->shell_widget), 
-                  DefaultScreen(XtDisplay(popup->shell_widget))) -
-           (Position)popup_width - 2 * (Position)border_width));
-  popup_y = max(0, 
-       min(top_y + ((Position)top_height - (Position)popup_height) / 2,
-           (Position)DisplayHeight(XtDisplay(popup->shell_widget), 
-                   DefaultScreen(XtDisplay(popup->shell_widget))) -
-           (Position)popup_height - 2 * (Position)border_width));
-  n = 0;
-  XtSetArg(wargs[n], XtNx, popup_x); n++;
-  XtSetArg(wargs[n], XtNy, popup_y); n++;
-  XtSetValues(popup->shell_widget, wargs, n);
-
-  selected = None;
-
-  XtPopup(popup->shell_widget, grab);
-  XWarpPointer(XtDisplay(popup->shell_widget), 
-              XtWindow(popup->top_widget),
-              XtWindow(popup->shell_widget), 
-              0, 0, top_width, top_height,
-              popup_width / 2, popup_height / 2);
-
-  while ((selected & popup->options) == None) {
-      XEvent event;
-      XtNextEvent(&event);
-      XtDispatchEvent(&event);
-  }
-
-  PopdownDialog(popup, answer);
-
-  return (selected & popup->options);
-}
diff --git a/bitmap/Dialog.h b/bitmap/Dialog.h
deleted file mode 100644 (file)
index d5727ff..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-
-/*#define None   0*/
-#define Yes    1<<1
-#define No     1<<2
-#define Maybe  1<<3  /* :-) */
-#define Okay   1<<4
-#define Abort  1<<5
-#define Cancel 1<<6
-#define Retry  1<<7
-
-typedef struct {
-  Widget top_widget, shell_widget, dialog_widget;
-  unsigned long options;
-} _Dialog, *Dialog;
-
-typedef struct {
-    String name;
-    unsigned long flag;
-} DialogButton;
-
-extern Dialog CreateDialog(Widget, String, unsigned long);
-extern unsigned long PopupDialog(Dialog, String, String, String *, XtGrabKind);
-extern void PopdownDialog(Dialog, String *);
diff --git a/bitmap/Down b/bitmap/Down
deleted file mode 100644 (file)
index 9790e27..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define Down_width 30
-#define Down_height 30
-static char Down_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x18, 0x03, 0x00,
-   0x00, 0xb8, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00,
-   0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00,
-   0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00,
-   0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00,
-   0x00, 0x58, 0x03, 0x00, 0xf0, 0xb8, 0xe3, 0x01, 0xf0, 0x59, 0xf3, 0x01,
-   0xb0, 0xbb, 0xbb, 0x01, 0x70, 0x5f, 0xdf, 0x01, 0xe0, 0xbe, 0xef, 0x00,
-   0xc0, 0x5d, 0x77, 0x00, 0x80, 0xab, 0x3a, 0x00, 0x00, 0x57, 0x1d, 0x00,
-   0x00, 0xae, 0x0e, 0x00, 0x00, 0x5c, 0x07, 0x00, 0x00, 0xb8, 0x03, 0x00,
-   0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00};
diff --git a/bitmap/Excl b/bitmap/Excl
deleted file mode 100644 (file)
index b172389..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#define Excl_width 40
-#define Excl_height 32
-static char Excl_bits[] = {
-   0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
-   0x7e, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x00,
-   0x00, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0xc0, 0x99, 0x03, 0x00, 0x00,
-   0xc0, 0x34, 0x03, 0x00, 0x00, 0xe0, 0x6a, 0x07, 0x00, 0x00, 0x70, 0x76,
-   0x0e, 0x00, 0x00, 0x70, 0x6a, 0x0e, 0x00, 0x00, 0x38, 0x76, 0x1c, 0x00,
-   0x00, 0x18, 0x6a, 0x18, 0x00, 0x00, 0x1c, 0x76, 0x38, 0x00, 0x00, 0x0e,
-   0x6a, 0x70, 0x00, 0x00, 0x06, 0x76, 0x60, 0x00, 0x00, 0x07, 0x6a, 0xe0,
-   0x00, 0x80, 0x03, 0x76, 0xc0, 0x01, 0x80, 0x03, 0x6a, 0xc0, 0x01, 0xc0,
-   0x01, 0x76, 0x80, 0x03, 0xc0, 0x00, 0x6a, 0x00, 0x03, 0xe0, 0x00, 0x34,
-   0x00, 0x07, 0x70, 0x00, 0x18, 0x00, 0x0e, 0x70, 0x00, 0x00, 0x00, 0x0e,
-   0x38, 0x00, 0x3c, 0x00, 0x1c, 0x1c, 0x00, 0x76, 0x00, 0x38, 0x1c, 0x00,
-   0x6a, 0x00, 0x38, 0x0e, 0x00, 0x76, 0x00, 0x70, 0x0e, 0x00, 0x3c, 0x00,
-   0x70, 0x1e, 0x00, 0x00, 0x00, 0x78, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xfc,
-   0xff, 0xff, 0xff, 0x3f};
diff --git a/bitmap/FlipHoriz b/bitmap/FlipHoriz
deleted file mode 100644 (file)
index a72da3d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define FlipHoriz_width 30
-#define FlipHoriz_height 30
-static char FlipHoriz_bits[] = {
-   0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x1d, 0x00,
-   0x00, 0x80, 0x3b, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0xee, 0x00,
-   0x00, 0x00, 0xdc, 0x01, 0xc0, 0xff, 0xbf, 0x03, 0xe0, 0xff, 0x5f, 0x07,
-   0xb0, 0xaa, 0xaa, 0x0e, 0x58, 0x55, 0x55, 0x1d, 0xac, 0xaa, 0xaa, 0x0e,
-   0xfe, 0xff, 0x5f, 0x07, 0xff, 0xff, 0xbf, 0x03, 0x6b, 0x00, 0xdc, 0x01,
-   0x77, 0x00, 0xee, 0x00, 0x6b, 0x00, 0x77, 0x00, 0x77, 0x80, 0x3b, 0x00,
-   0x6b, 0x80, 0x1d, 0x00, 0x77, 0x80, 0x0f, 0x00, 0x6b, 0x80, 0x07, 0x00,
-   0xff, 0x1f, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xac, 0x06, 0x00, 0x00,
-   0x58, 0x03, 0x00, 0x00, 0xb0, 0x06, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00,
-   0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/FlipVert b/bitmap/FlipVert
deleted file mode 100644 (file)
index f5df65b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define FlipVert_width 30
-#define FlipVert_height 30
-static char FlipVert_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00,
-   0x00, 0x1f, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0xc0, 0x75, 0x00, 0x00,
-   0xe0, 0xea, 0x00, 0x00, 0x70, 0xd5, 0x01, 0x00, 0xb8, 0xaa, 0x03, 0x00,
-   0xdc, 0x75, 0x07, 0x00, 0xee, 0xfb, 0x0e, 0x00, 0xf7, 0xf5, 0x1d, 0x00,
-   0xbb, 0xbb, 0x1b, 0x00, 0x9f, 0x35, 0x1f, 0x00, 0x8f, 0x3b, 0x1e, 0x00,
-   0x80, 0x35, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x35, 0x20, 0x08,
-   0x80, 0x3b, 0x60, 0x0c, 0x80, 0x35, 0xe0, 0x0e, 0x80, 0x3b, 0xe0, 0x0f,
-   0x80, 0x35, 0x60, 0x0d, 0x80, 0x3b, 0xe0, 0x0e, 0x80, 0xf5, 0x7f, 0x0d,
-   0x00, 0xfb, 0xff, 0x06, 0x00, 0xb6, 0x6a, 0x03, 0x00, 0x7c, 0xf5, 0x01,
-   0x00, 0xb8, 0xea, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, 0x00};
diff --git a/bitmap/Fold b/bitmap/Fold
deleted file mode 100644 (file)
index ea59a19..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define Fold_width 30
-#define Fold_height 30
-static char Fold_bits[] = {
-   0xff, 0x3f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x3f, 0x57, 0xf5, 0xab, 0x3a,
-   0xab, 0xff, 0x7f, 0x35, 0xd7, 0x3f, 0xff, 0x3a, 0xab, 0x03, 0x70, 0x35,
-   0x57, 0x07, 0xb8, 0x3a, 0xbb, 0x0e, 0x5c, 0x37, 0x7f, 0x1d, 0xae, 0x3f,
-   0xfb, 0x3a, 0xd7, 0x37, 0xdf, 0xf5, 0xeb, 0x3e, 0x9b, 0xeb, 0x75, 0x36,
-   0x1f, 0xd7, 0x3a, 0x3e, 0x1f, 0xae, 0x1d, 0x3e, 0x0e, 0xfc, 0x0e, 0x1c,
-   0x0e, 0xdc, 0x0f, 0x1c, 0x1f, 0x6e, 0x1d, 0x3e, 0x1f, 0xd7, 0x3a, 0x3e,
-   0x9b, 0xeb, 0x75, 0x36, 0xdf, 0xf5, 0xeb, 0x3e, 0xfb, 0x3a, 0xd7, 0x37,
-   0x7f, 0x1d, 0xae, 0x3f, 0xbb, 0x0e, 0x5c, 0x37, 0x57, 0x07, 0xb8, 0x3a,
-   0xab, 0x03, 0x70, 0x35, 0xd7, 0x3f, 0xff, 0x3a, 0xab, 0xff, 0x7f, 0x35,
-   0x57, 0xf5, 0xab, 0x3a, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f};
diff --git a/bitmap/Graphics.c b/bitmap/Graphics.c
deleted file mode 100644 (file)
index f09c41b..0000000
+++ /dev/null
@@ -1,1573 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xfuncs.h>
-#include "BitmapP.h"
-#include "Bitmap.h"
-#include "Requests.h"
-    
-#include <stdio.h>
-#include <math.h>
-
-#ifndef abs
-#define abs(x)                        (((x) > 0) ? (x) : -(x))
-#endif
-#define min(x, y)                     (((int)(x) < (int)(y)) ? (x) : (y))
-#define max(x, y)                     (((int)(x) > (int)(y)) ? (x) : (y))
-#ifndef rint
-#define rint(x)                       floor(x + 0.5)
-#endif
-
-/*****************************************************************************\
- *                                   Graphics                                *
-\*****************************************************************************/
-
-#define GetBit(image, x, y)\
-    ((bit)((*(image->data + (x) / 8 + (y) * image->bytes_per_line) &\
-           (1 << ((x) % 8))) ? 1 : 0))
-
-#if 0
-bit 
-BWGetBit(Widget w, Position x, Position y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (QueryInBitmap(BW, x, y))
-       return GetBit(BW->bitmap.image, x, y);
-    else
-       return NotSet;
-}
-#endif
-
-#define InvertBit(image, x, y)\
-    (*(image->data + (x) / 8 + (y) * image->bytes_per_line) ^=\
-     (bit) (1 << ((x) % 8)))
-
-
-#define SetBit(image, x, y)\
-    (*(image->data + (x) / 8 + (y) * image->bytes_per_line) |=\
-     (bit) (1 << ((x) % 8)))
-
-#define ClearBit(image, x, y)\
-    (*(image->data + (x) / 8 + (y) * image->bytes_per_line) &=\
-     (bit)~(1 << ((x) % 8)))
-
-
-#define HighlightSquare(BW, x, y)\
-    XFillRectangle(XtDisplay(BW), XtWindow(BW),\
-                   BW->bitmap.highlighting_gc,\
-                  InWindowX(BW, x), InWindowY(BW, y),\
-                   BW->bitmap.squareW, BW->bitmap.squareH)
-/*
-void 
-HighlightSquare(BitmapWidget BW, Position x, Position y)
-{
-    XFillRectangle(XtDisplay(BW), XtWindow(BW),
-                   BW->bitmap.highlighting_gc,
-                  InWindowX(BW, x), InWindowY(BW, y),
-                   BW->bitmap.squareW, BW->bitmap.squareH);
-}
-*/
-
-#define DrawSquare(BW, x, y)\
-    XFillRectangle(XtDisplay(BW), XtWindow(BW),\
-                   BW->bitmap.drawing_gc,\
-                  InWindowX(BW, x), InWindowY(BW, y),\
-                   BW->bitmap.squareW, BW->bitmap.squareH) 
-
-/*
-void 
-DrawSquare(BitmapWidget BW, Position x, Position y)
-{
-    XFillRectangle(XtDisplay(BW), XtWindow(BW),
-                   BW->bitmap.drawing_gc,
-                  InWindowX(BW, x), InWindowY(BW, y),
-                   BW->bitmap.squareW, BW->bitmap.squareH);
-}
-*/
-
-#define InvertPoint(BW, x, y)\
-    {InvertBit(BW->bitmap.image, x, y); DrawSquare(BW, x, y);}
-
-#define DrawPoint(BW, x, y, value)\
-    if (GetBit(BW->bitmap.image, x, y) != value)\
-       InvertPoint(BW, x, y)
-
-void 
-BWDrawPoint(Widget w, Position x, Position y, bit value)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (QueryInBitmap(BW, x, y)) {
-       if (value == Highlight)
-           HighlightSquare(BW, x, y);
-       else
-           DrawPoint(BW, x, y, value);
-    }
-}
-
-static XPoint *
-HotSpotShape(BitmapWidget BW, Position x, Position y)
-{
-    static XPoint points[5];
-  
-    points[0].x = InWindowX(BW, x);
-    points[0].y = InWindowY(BW, y + 1.0/2);
-    points[1].x = InWindowX(BW, x + 1.0/2);
-    points[1].y = InWindowY(BW, y + 1);
-    points[2].x = InWindowX(BW, x + 1);
-    points[2].y = InWindowY(BW, y + 1.0/2);
-    points[3].x = InWindowX(BW, x + 1.0/2);
-    points[3].y = InWindowY(BW, y);
-    points[4].x = InWindowX(BW, x);
-    points[4].y = InWindowY(BW, y + 1.0/2);
-    
-    return points;
-}
-
-#define DrawHotSpot(BW, x, y)\
-  XFillPolygon(XtDisplay(BW), XtWindow(BW), BW->bitmap.drawing_gc,\
-              HotSpotShape(BW, x, y), 5, Convex, CoordModeOrigin)
-
-#define HighlightHotSpot(BW, x, y)\
-  XFillPolygon(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,\
-              HotSpotShape(BW, x, y), 5, Convex, CoordModeOrigin)
-
-/*
-XImage *CreateBitmapImage();
-void DestroyBitmapImage();
-*/
-
-void 
-BWRedrawHotSpot(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y))
-       DrawHotSpot(BW, BW->bitmap.hot.x, BW->bitmap.hot.y);
-}
-
-void 
-BWClearHotSpot(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)) {
-      DrawHotSpot(BW, BW->bitmap.hot.x, BW->bitmap.hot.y);
-      BW->bitmap.hot.x = BW->bitmap.hot.y = NotSet;
-    }
-}
-
-void 
-BWDrawHotSpot(Widget w, Position x, Position y, int value)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (QueryInBitmap(BW, x, y)) {
-       if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y) &&
-           ((BW->bitmap.hot.x == x) && (BW->bitmap.hot.y == y))) {
-           if ((value == Clear) || (value == Invert)) {
-               BWClearHotSpot(w);
-           }
-       }
-       else
-           if ((value == Set) || (value == Invert)) {
-               BWClearHotSpot(w);
-               DrawHotSpot(BW, x, y);
-               BW->bitmap.hot.x = x;
-               BW->bitmap.hot.y = y;
-           }
-       
-       if (value == Highlight)
-           HighlightHotSpot(BW, x, y); 
-    }
-}
-
-void 
-BWSetHotSpot(Widget w, Position x, Position y)
-{
-    if (QuerySet(x, y))
-       BWDrawHotSpot(w, x, y, Set);
-    else
-       BWClearHotSpot(w);
-}
-
-/* high level procedures */
-
-void 
-BWRedrawSquares(Widget w, 
-               Position x, Position y, 
-               Dimension width, Dimension height)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Position from_x = InBitmapX(BW, x);
-    Position from_y = InBitmapY(BW, y);
-    Position to_x = InBitmapX(BW, x + width);
-    Position to_y = InBitmapY(BW, y + height);
-
-    QuerySwap(from_x, to_x);
-    QuerySwap(from_y, to_y);
-    from_x = max(0, from_x);
-    from_y = max(0, from_y);
-    to_x = min(BW->bitmap.image->width - 1, to_x);
-    to_y = min(BW->bitmap.image->height - 1, to_y);
-  
-    for (x = from_x; x <= to_x; x++)
-       for (y = from_y; y <= to_y; y++)
-           if (GetBit(BW->bitmap.image, x, y)) DrawSquare(BW, x, y);
-}
-
-void 
-BWDrawGrid(Widget w, 
-          Position from_x, Position from_y, 
-          Position to_x, Position to_y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    int i;
-  
-    QuerySwap(from_x, to_x);
-    QuerySwap(from_y, to_y);
-    from_x = max(0, from_x);
-    from_y = max(0, from_y);
-    to_x = min(BW->bitmap.image->width - 1, to_x);
-    to_y = min(BW->bitmap.image->height - 1, to_y);
-  
-    for(i = from_x + (from_x == 0); i <= to_x; i++)
-       XDrawLine(XtDisplay(BW), XtWindow(BW), 
-                 BW->bitmap.frame_gc,
-                 InWindowX(BW, i), InWindowY(BW, from_y),
-                 InWindowX(BW, i), InWindowY(BW, to_y + 1));
-  
-    for(i = from_y + (from_y == 0); i <= to_y; i++)
-       XDrawLine(XtDisplay(BW), XtWindow(BW), 
-                 BW->bitmap.frame_gc,
-                 InWindowX(BW, from_x), InWindowY(BW, i),
-                 InWindowX(BW, to_x + 1), InWindowY(BW, i));
-}
-
-
-void 
-BWRedrawGrid(Widget w, 
-            Position x, Position y, 
-            Dimension width, Dimension height)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Position from_x = InBitmapX(BW, x);
-    Position from_y = InBitmapY(BW, y);
-    Position to_x = InBitmapX(BW, x + width);
-    Position to_y = InBitmapY(BW, y + height);
-
-    if (BW->bitmap.grid)
-       BWDrawGrid(w, from_x, from_y, to_x, to_y);
-}
-
-void 
-BWDrawLine(Widget w, 
-          Position from_x, Position from_y, 
-          Position to_x, Position to_y, int value)
-{
-    Position i;
-    register double x, y;
-    double dx, dy, delta;
-
-    dx = to_x - from_x;
-    dy = to_y - from_y;
-    x = from_x + 0.5;
-    y = from_y + 0.5;
-    delta = max(abs(dx), abs(dy));
-    if (delta > 0) {
-       dx /= delta;
-       dy /= delta;
-       for(i = 0; i <= delta; i++) {
-           BWDrawPoint(w, (Position) x, (Position) y, value);
-           x += dx;
-           y += dy;
-       }
-    }
-    else
-       BWDrawPoint(w, from_x, from_y, value);
-}
-
-void 
-BWBlindLine(Widget w, 
-           Position from_x, Position from_y, 
-           Position to_x, Position to_y, int value)
-{
-    Position i;
-    register double x, y;
-    double dx, dy, delta;
-
-    dx = to_x - from_x;
-    dy = to_y - from_y;
-    x = from_x + 0.5;
-    y = from_y + 0.5;
-    delta = max(abs(dx), abs(dy));
-    if (delta > 0) {
-       dx /= delta;
-       dy /= delta;
-       x += dx;
-       y += dy;
-       for(i = 1; i <= delta; i++) {
-           BWDrawPoint(w, (Position) x, (Position) y, value);
-           x += dx;
-           y += dy;
-       }
-    }
-    else
-       BWDrawPoint(w, from_x, from_y, value);
-}
-
-void 
-BWDrawRectangle(Widget w, 
-               Position from_x, Position from_y, 
-               Position to_x, Position to_y, int value)
-{
-    register Position i;
-    Dimension delta, width, height;
-    
-    QuerySwap(from_x, to_x);
-    QuerySwap(from_y, to_y);
-    
-    width = to_x - from_x;
-    height = to_y - from_y;
-
-    delta = max(width, height);
-    
-    if (!QueryZero(width, height)) {
-       for (i = 0; (int)i < (int)delta; i++) {
-           if ((int)i < (int)width) {
-               BWDrawPoint(w, from_x + i, from_y, value);
-               BWDrawPoint(w, to_x - i, to_y, value);
-           }
-           if ((int)i < (int)height) {
-               BWDrawPoint(w, from_x, to_y - i, value);
-               BWDrawPoint(w, to_x, from_y + i, value);
-           }
-       }
-    }
-    else
-       BWDrawLine(w, 
-                  from_x, from_y, 
-                  to_x, to_y, value);
-}
-  
-void 
-BWDrawFilledRectangle(Widget w, 
-                     Position from_x, Position from_y, 
-                     Position to_x, Position to_y, int value)
-{
-    register Position x, y;
-
-    QuerySwap(from_x, to_x);
-    QuerySwap(from_y, to_y);
-    
-    for (x = from_x; x <= to_x; x++)
-       for (y = from_y; y <= to_y; y++)
-           BWDrawPoint(w, x, y, value);
-}
-
-void 
-BWDrawCircle(Widget w, 
-            Position origin_x, Position origin_y, 
-            Position point_x, Position point_y, int value)
-{
-    register Position i, delta;
-    Dimension dx, dy, half;
-    double radius;
-    
-    dx = abs(point_x - origin_x);
-    dy = abs(point_y - origin_y);
-    radius = sqrt((double) ((int)dx * (int)dx + (int)dy * (int)dy));
-    if (radius < 1.0) {
-       BWDrawPoint(w, origin_x, origin_y, value);
-    }
-    else {
-       BWDrawPoint(w, origin_x - (Position) floor(radius), origin_y, value);
-       BWDrawPoint(w, origin_x + (Position) floor(radius), origin_y, value);
-       BWDrawPoint(w, origin_x, origin_y - (Position) floor(radius), value);
-       BWDrawPoint(w, origin_x, origin_y + (Position) floor(radius), value);
-    }
-    half = radius / sqrt(2.0);
-    for(i = 1; (int)i <= (int)half; i++) {
-       delta = sqrt(radius * radius - i * i);
-       BWDrawPoint(w, origin_x - delta, origin_y - i, value);
-       BWDrawPoint(w, origin_x - delta, origin_y + i, value);
-       BWDrawPoint(w, origin_x + delta, origin_y - i, value);
-       BWDrawPoint(w, origin_x + delta, origin_y + i, value);
-       if (i != delta) {
-           BWDrawPoint(w, origin_x - i, origin_y - delta, value);
-           BWDrawPoint(w, origin_x - i, origin_y + delta, value);
-           BWDrawPoint(w, origin_x + i, origin_y - delta, value);
-           BWDrawPoint(w, origin_x + i, origin_y + delta, value);
-       }
-    }
-}
-
-void 
-BWDrawFilledCircle(Widget w, 
-                  Position origin_x, Position origin_y, 
-                  Position point_x, Position point_y, int value)
-{
-    register Position i, j, delta;
-    Dimension dx, dy;
-    double radius;
-    
-    dx = abs(point_x - origin_x);
-    dy = abs(point_y - origin_y);
-    radius = sqrt((double) ((int)dx * (int)dx + (int)dy * (int)dy));
-    for(j = origin_x - (Position) floor(radius); 
-       j <= origin_x + (Position) floor(radius); j++)
-       BWDrawPoint(w, j, origin_y, value);
-    for(i = 1; i <= (Position) floor(radius); i++) {
-       delta = sqrt(radius * radius - i * i);
-       for(j = origin_x - delta; j <= origin_x + delta; j++) {
-           BWDrawPoint(w, j, origin_y - i, value);
-           BWDrawPoint(w, j, origin_y + i, value);
-       }
-    }
-}
-
-#define QueryFlood(BW, x, y, value)\
-    ((GetBit(BW->bitmap.image, x, y) !=\
-      (value & 1)) && QueryInBitmap(BW, x, y))
-
-#define Flood(BW, x, y, value)\
-    {if (value == Highlight) HighlightSquare(BW, x, y);\
-     else InvertPoint(BW, x, y);}
-
-/*
-static void 
-FloodLoop(BitmapWidget BW, Position x, Position y, int value)
-{
-    if (QueryFlood(BW, x, y, value)) {
-       Flood(BW, x, y, value);
-       FloodLoop(BW, x, y - 1, value);
-       FloodLoop(BW, x - 1, y, value);
-       FloodLoop(BW, x, y + 1, value);
-       FloodLoop(BW, x + 1, y, value);
-    }
-}
-*/
-
-static void 
-FloodLoop(BitmapWidget BW, Position x, Position y, int value)
-{
-    Position save_x, save_y, x_left, x_right;
-    
-    if (QueryFlood(BW, x, y, value)) 
-       Flood(BW, x, y, value)
-
-
-    save_x = x;
-    save_y = y;
-
-    x++;
-    while (QueryFlood(BW, x, y, value)) {
-       Flood(BW, x, y, value);
-       x++;
-    }
-    x_right = --x;
-
-    x = save_x;
-    x--;
-    while (QueryFlood(BW, x, y, value)) {
-       Flood(BW, x, y, value);
-       x--;
-    }
-    x_left = ++x;
-
-
-    x = x_left;
-    y = save_y;
-    y++;
-    
-    while (x <= x_right) {
-       Boolean flag = False;
-       Position x_enter;
-       
-       while (QueryFlood(BW, x, y, value) && (x <= x_right)) {
-           flag = True;
-           x++;
-       }
-       
-       if (flag) {
-           if ((x == x_right) && QueryFlood(BW, x, y, value))
-               FloodLoop(BW, x, y, value);
-           else
-               FloodLoop(BW, x - 1, y, value);
-       }
-       
-       x_enter = x;
-       
-       while (!QueryFlood(BW, x, y, value) && (x < x_right))
-           x++;
-       
-       if (x == x_enter) x++;
-    }
-
-    x = x_left;
-    y = save_y;
-    y--;
-
-    while (x <= x_right) {
-       Boolean flag = False;
-       Position x_enter;
-       
-       while (QueryFlood(BW, x, y, value) && (x <= x_right)) {
-           flag = True;
-           x++;
-       }
-       
-       if (flag) {
-           if ((x == x_right) && QueryFlood(BW, x, y, value))
-               FloodLoop(BW, x, y, value);
-           else
-               FloodLoop(BW, x - 1, y, value);
-       }
-       
-       x_enter = x;
-       
-       while (!QueryFlood(BW, x, y, value) && (x < x_right))
-           x++;
-       
-       if (x == x_enter) x++;
-    }
-}
-
-void 
-BWFloodFill(Widget w, Position x, Position y, int value)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    int pixel;
-
-    pixel = GetBit(BW->bitmap.image, x, y);
-
-    if (value == Invert)
-       FloodLoop(BW, x, y, (pixel ? Clear : Set));
-    else if (value != pixel)
-       FloodLoop(BW, x, y, value); 
-}
-
-#define QueryHotInMark(BW)\
-    ((BW->bitmap.hot.x == max(BW->bitmap.mark.from_x,\
-                             min(BW->bitmap.hot.x, BW->bitmap.mark.to_x)))\
-     &&\
-     (BW->bitmap.hot.y == max(BW->bitmap.mark.from_y,\
-                             min(BW->bitmap.hot.y, BW->bitmap.mark.to_y))))
-
-void 
-BWUp(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    bit first, up, down=0;
-    Position from_x, from_y, to_x, to_y;
-
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-
-    if ((to_y - from_y) == 0)
-       return;
-    
-    for(x = from_x; x <= to_x; x++) {
-       first = up = GetBit(BW->bitmap.image, x, to_y);
-       for(y = to_y - 1; y >= from_y; y--) {
-           down = GetBit(BW->bitmap.image, x, y);
-           if (up != down) 
-               InvertPoint(BW, x, y);
-           up =down;
-       }
-       if(first != down)
-           InvertPoint(BW, x, to_y);
-    }
-
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w))
-       BWSetHotSpot(w,
-                    BW->bitmap.hot.x,
-                    (BW->bitmap.hot.y - 1 + BW->bitmap.image->height) % 
-                    BW->bitmap.image->height);
-
-}
-
-void 
-BWDown(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    bit first, down, up=0;
-    Position from_x, from_y, to_x, to_y;
-
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-
-    if ((to_y - from_y) == 0)
-       return;
-
-    for(x = from_x; x <= to_x; x++) {
-       first = down = GetBit(BW->bitmap.image, x, from_y);
-       for(y = from_y + 1; y <= to_y; y++) {
-           up = GetBit(BW->bitmap.image, x, y);
-           if (down != up)
-               InvertPoint(BW, x, y);
-           down = up;
-       }
-       if(first != up) 
-           InvertPoint(BW, x, from_y);
-    }
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w))
-       BWSetHotSpot(w,
-                    BW->bitmap.hot.x,
-                    (BW->bitmap.hot.y + 1) % BW->bitmap.image->height);
-}
-
-void 
-BWLeft(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    bit first, left, right=0;
-    Position from_x, from_y, to_x, to_y;
-    
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-
-    if ((to_x - from_x) == 0)
-       return;
-    
-    for(y = from_y; y <= to_y; y++) {
-       first = left = GetBit(BW->bitmap.image, to_x, y);
-       for(x = to_x - 1; x >= from_x; x--) {
-           right = GetBit(BW->bitmap.image, x, y);
-           if (left != right)
-               InvertPoint(BW, x, y);
-           left = right;
-       }
-       if(first != right)
-           InvertPoint(BW, to_x, y);
-    }
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w))
-       BWSetHotSpot(w,
-                    (BW->bitmap.hot.x - 1 + BW->bitmap.image->width) % 
-                    BW->bitmap.image->width,
-                    BW->bitmap.hot.y);
-}
-
-void 
-BWRight(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    bit first, right, left=0;
-    Position from_x, from_y, to_x, to_y;
-    
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-    
-    if ((to_x - from_x) == 0)
-       return;
-    
-    for(y = from_y; y <= to_y; y++) {
-       first = right = GetBit(BW->bitmap.image, from_x, y);
-       for(x = from_x + 1; x <= to_x; x++) {
-           left = GetBit(BW->bitmap.image, x, y);
-           if (right != left)
-               InvertPoint(BW, x, y);
-           right = left;
-       }
-       if(first != left)
-           InvertPoint(BW, from_x, y);
-    }
-
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w))
-       BWSetHotSpot(w,
-                    (BW->bitmap.hot.x + 1) % BW->bitmap.image->width,
-                    BW->bitmap.hot.y);
-}
-
-/* void TransferImageData(); */
-
-void 
-BWFold(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Position x, y, new_x, new_y;
-    Dimension horiz, vert;
-    char *storage_data;
-    XImage *storage;
-       
-    storage_data = CreateCleanData(Length(BW->bitmap.image->width, 
-                                         BW->bitmap.image->height));
-
-    storage = CreateBitmapImage(BW, storage_data, 
-                               (Dimension) BW->bitmap.image->width, 
-                               (Dimension) BW->bitmap.image->height);
-
-    TransferImageData(BW->bitmap.image, storage);
-
-    BW->bitmap.fold ^= True;
-    horiz = (BW->bitmap.image->width + BW->bitmap.fold) / 2;
-    vert = (BW->bitmap.image->height + BW->bitmap.fold) / 2;
-    
-    for (x = 0; x < BW->bitmap.image->width; x++)
-       for (y = 0; y < BW->bitmap.image->height; y++) {
-           new_x = (int)(x + horiz) % (int)BW->bitmap.image->width;
-           new_y = (int)(y + vert) % (int)BW->bitmap.image->height;
-           if(GetBit(BW->bitmap.image, new_x, new_y) != 
-              GetBit(storage, x, y))
-               InvertPoint(BW, new_x, new_y);
-       }
-    
-    DestroyBitmapImage(&storage);
-
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y))
-      BWSetHotSpot(w, 
-                  (Position) 
-                  ((int)(BW->bitmap.hot.x+horiz)
-                   %(int)BW->bitmap.image->width),
-                  (Position)
-                  ((int)(BW->bitmap.hot.y+vert)
-                   %(int)BW->bitmap.image->height)
-                  );
-}
-
-
-void 
-BWClear(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    int i, length;
-
-    length = Length(BW->bitmap.image->width, BW->bitmap.image->height);
-
-    for (x = 0; x < BW->bitmap.image->width; x++)
-       for (y = 0; y < BW->bitmap.image->height; y++)
-           if (GetBit(BW->bitmap.image, x, y))
-               DrawSquare(BW, x, y);
-    
-    for (i = 0; i < length; i++)
-       BW->bitmap.image->data[i] = 0;
-
-}
-
-void 
-BWSet(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    int i, length;
-    
-    length = Length(BW->bitmap.image->width, BW->bitmap.image->height);
-    
-    for (x = 0; x < BW->bitmap.image->width; x++)
-       for (y = 0; y < BW->bitmap.image->height; y++)
-           if (!GetBit(BW->bitmap.image, x, y))
-               DrawSquare(BW, x, y);
-    
-    for (i = 0; i < length; i++)
-       BW->bitmap.image->data[i] = (char)255;
-
-}
-void 
-BWRedraw(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    XClearArea(XtDisplay(BW), XtWindow(BW),
-              0, 0, BW->core.width, BW->core.height,
-              True);
-}
-
-void 
-BWInvert(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    int i, length;
-
-    length = Length(BW->bitmap.image->width, BW->bitmap.image->height);
-
-    XFillRectangle(XtDisplay(BW), XtWindow(BW),
-                  BW->bitmap.drawing_gc,
-                  InWindowX(BW, 0), InWindowY(BW, 0),
-                  InWindowX(BW, BW->bitmap.image->width) - InWindowX(BW, 0),
-                  InWindowY(BW, BW->bitmap.image->height) - InWindowY(BW, 0));
-    
-    for (i = 0; i < length; i++)
-       BW->bitmap.image->data[i] ^= 255;
-}
-
-void 
-BWFlipHoriz(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    Position from_x, from_y, to_x, to_y;
-    float half;
-    
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-    half = (float) (to_y - from_y) / 2.0 + 0.5;
-    
-    if (half == 0.0)
-       return;
-    
-    for (x = from_x; x <= to_x; x++) 
-       for (y = 0; y <  half; y++)
-           if (GetBit(BW->bitmap.image, x, from_y + y) != 
-               GetBit(BW->bitmap.image, x, to_y - y)) {
-               InvertPoint(BW, x, from_y + y);
-               InvertPoint(BW, x, to_y - y);
-           }
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w))
-       BWSetHotSpot(w,
-                    BW->bitmap.hot.x,
-                    BW->bitmap.image->height - 1 - BW->bitmap.hot.y);
-}
-
-void 
-BWFlipVert(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    register Position x, y;
-    Position from_x, from_y, to_x, to_y;
-    float half;
-    
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-    half = (float) (to_x - from_x) / 2.0 + 0.5;
-
-    if (half == 0)
-       return;
-
-    for (y = from_y; y <= to_y; y++)
-       for (x = 0; x < half; x++)
-           if (GetBit(BW->bitmap.image, from_x + x, y) != 
-               GetBit(BW->bitmap.image, to_x - x, y)) {
-               InvertPoint(BW, from_x + x, y);
-               InvertPoint(BW, to_x - x, y);
-           }
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w))
-       BWSetHotSpot(w,
-                    BW->bitmap.image->width - 1 - BW->bitmap.hot.x,
-                    BW->bitmap.hot.y);
-}
-
-
-void 
-BWRotateRight(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Position x, y, delta, shift, tmp;
-    Position half_width, half_height;
-    XPoint hot;
-    bit quad1, quad2, quad3, quad4;
-    Position from_x, from_y, to_x, to_y;
-    
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-
-    half_width = floor((to_x - from_x) / 2.0 + 0.5);
-    half_height = floor((to_y - from_y ) / 2.0 + 0.5);
-    shift = min((Position)(to_x - from_x), (Position)(to_y - from_y )) % 2;
-    delta = min((Position) half_width, (Position) half_height) - shift;
-    
-    for (x = 0; x <= delta; x++) {
-       for (y = 1 - shift; y <= delta; y++) {
-           quad1 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width + x, 
-                          from_y + (Position)half_height + y);
-           quad2 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width + y, 
-                          from_y + (Position)half_height - shift - x);
-           quad3 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width - shift - x, 
-                          from_y + (Position)half_height - shift - y);
-           quad4 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width - shift - y, 
-                          from_y + (Position)half_height + x);
-
-           if (quad1 != quad2)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width + x, 
-                           from_y + (Position)half_height + y);
-           if (quad2 != quad3)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width + y, 
-                           from_y + (Position)half_height - shift - x);
-           if (quad3 != quad4)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width - shift - x,
-                           from_y + (Position)half_height - shift - y);
-           if (quad4 != quad1)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width - shift - y, 
-                           from_y + (Position)half_height + x);
-       }
-    }
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w)) {
-       hot.x = BW->bitmap.hot.x - half_width;
-       hot.y = BW->bitmap.hot.y - half_height;
-       if (hot.x >= 0) hot.x += shift;
-       if (hot.y >= 0) hot.y += shift;
-       tmp = hot.x;
-       hot.x = - hot.y;
-       hot.y = tmp;
-       if (hot.x > 0) hot.x -= shift;
-       if (hot.y > 0) hot.y -= shift;
-       hot.x += half_width;
-       hot.y += half_height;
-       if (QueryInBitmap(BW, hot.x, hot.y))
-           BWSetHotSpot(w, hot.x, hot.y);
-    }
-    
-}
-
-void 
-BWRotateLeft(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Position x, y,delta, shift, tmp;
-    Position half_width, half_height;
-    XPoint hot;
-    bit quad1, quad2, quad3, quad4;
-    Position from_x, from_y, to_x, to_y;
-    
-    if (BWQueryMarked(w)) {
-       from_x = BW->bitmap.mark.from_x;
-       from_y = BW->bitmap.mark.from_y;
-       to_x = BW->bitmap.mark.to_x;
-       to_y = BW->bitmap.mark.to_y;
-    }
-    else {
-       from_x = 0;
-       from_y = 0;
-       to_x = BW->bitmap.width - 1;
-       to_y = BW->bitmap.height - 1;
-    }
-
-    half_width = floor((to_x - from_x) / 2.0 + 0.5);
-    half_height = floor((to_y - from_y ) / 2.0 + 0.5);
-    shift = min((Position)(to_x - from_x), (Position)(to_y - from_y )) % 2;
-    delta = min((Position) half_width, (Position) half_height) - shift;
-    
-    for (x = 0; x <= delta; x++) {
-       for (y = 1 - shift; y <= delta; y++) {
-           quad1 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width + x, 
-                          from_y + (Position)half_height + y);
-           quad2 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width + y, 
-                          from_y + (Position)half_height - shift - x);
-           quad3 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width - shift - x, 
-                          from_y + (Position)half_height - shift - y);
-           quad4 = GetBit(BW->bitmap.image, 
-                          from_x + (Position)half_width - shift - y, 
-                          from_y + (Position)half_height + x);
-
-           if (quad1 != quad4)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width + x, 
-                           from_y + (Position)half_height + y);
-           if (quad2 != quad1)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width + y, 
-                           from_y + (Position)half_height - shift - x);
-           if (quad3 != quad2)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width - shift - x,
-                           from_y + (Position)half_height - shift - y);
-           if (quad4 != quad3)
-               InvertPoint(BW, 
-                           from_x + (Position)half_width - shift - y, 
-                           from_y + (Position)half_height + x);
-       }
-    }
-    
-    if (QuerySet(BW->bitmap.hot.x, BW->bitmap.hot.y)
-       &&
-       !BWQueryMarked(w)) {
-       hot.x = BW->bitmap.hot.x - half_width;
-       hot.y = BW->bitmap.hot.y - half_height;
-       if (hot.x >= 0) hot.x += shift;
-       if (hot.y >= 0) hot.y += shift;
-       tmp = hot.x;
-       hot.x = hot.y;
-       hot.y = - tmp;
-       if (hot.x > 0) hot.x -= shift;
-       if (hot.y > 0) hot.y -= shift;
-       hot.x += half_width;
-       hot.y += half_height;
-       if (QueryInBitmap(BW, hot.x, hot.y))
-           BWSetHotSpot(w, hot.x, hot.y);
-    }
-}
-
-
-void 
-CopyImageData(XImage *source, XImage *destination, 
-             Position from_x, Position from_y, 
-             Position to_x, Position to_y, 
-             Position at_x, Position at_y)
-{
-    Position x, y, delta_x, delta_y;
-    
-    delta_x = to_x - from_x + 1;
-    delta_y = to_y - from_y + 1;
-    
-    for (x = 0; x < delta_x; x++)
-       for (y = 0; y < delta_y; y++)
-           if (GetBit(source, from_x + x, from_y + y))
-               SetBit(destination, at_x + x, at_y + y);
-           else
-               ClearBit(destination, at_x + x, at_y + y);
-}
-      
-XImage *
-ConvertToBitmapImage(BitmapWidget BW, XImage *image)
-{
-    XImage *bitmap_image;
-    char   *data;
-    Position x, y;
-    
-    data = CreateCleanData(Length(image->width, image->height));
-    bitmap_image = CreateBitmapImage(BW, data, 
-                                    (Dimension) image->width, 
-                                    (Dimension) image->height);
-
-    for (x = 0; x < min(image->width, bitmap_image->width); x++)
-       for (y = 0; y < min(image->height, bitmap_image->height); y++)
-           if ((XGetPixel(image, x, y) != 0) != GetBit(bitmap_image, x, y))
-               InvertBit(bitmap_image, x, y);
-
-    return bitmap_image;
-}
-
-void 
-TransferImageData(XImage *source, XImage *destination)
-{
-    Position x, y;
-    
-    for (x = 0; x < min(source->width, destination->width); x++)
-       for (y = 0; y < min(source->height, destination->height); y++)
-           if (GetBit(source, x, y) != GetBit(destination, x, y))
-               InvertBit(destination, x, y);
-}
-
-void 
-BWStore(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Dimension width, height;
-    char *storage_data;
-
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
-
-       DestroyBitmapImage(&BW->bitmap.storage);
-
-       width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
-       height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-       
-       storage_data = CreateCleanData(Length(width, height));
-
-       BW->bitmap.storage = CreateBitmapImage(BW,
-                                              storage_data,
-                                              width, height);
-
-       CopyImageData(BW->bitmap.image, BW->bitmap.storage,
-                     BW->bitmap.mark.from_x,  BW->bitmap.mark.from_y,
-                     BW->bitmap.mark.to_x,  BW->bitmap.mark.to_y,
-                     0, 0);
-    }
-}
-
-void 
-BWClearMarked(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y))
-       BWDrawFilledRectangle(w,
-                             BW->bitmap.mark.from_x,
-                             BW->bitmap.mark.from_y,
-                             BW->bitmap.mark.to_x,
-                             BW->bitmap.mark.to_y,
-                             Clear);
-}
-
-
-void 
-BWDragMarked(Widget w, Position at_x, Position at_y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y))
-       BWDrawRectangle(w, 
-                       at_x, at_y, 
-                       at_x + BW->bitmap.mark.to_x - BW->bitmap.mark.from_x,
-                       at_y + BW->bitmap.mark.to_y - BW->bitmap.mark.from_y,
-                       Highlight);
-}
-
-void 
-BWDragStored(Widget w, Position at_x, Position at_y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.storage)
-       BWDrawRectangle(w, 
-                       at_x, at_y,
-                       at_x + BW->bitmap.storage->width - 1,
-                       at_y + BW->bitmap.storage->height - 1,
-                       Highlight);
-}
-
-static void 
-DrawImageData(BitmapWidget BW, XImage *image, 
-             Position at_x, Position at_y, int value)
-{
-    Position x, y;
-    Boolean  C, S, I, H;
-    bit      A, B;
-
-    C = value == Clear;
-    S = value == Set;
-    I = value == Invert;
-    H = value == Highlight;
-
-    for (x = 0; x < image->width; x++) 
-       for (y = 0; y < image->height; y++) {
-           A = GetBit(image, x, y);
-           B = GetBit(BW->bitmap.image, at_x + x, at_y + y);
-           if ((A & C) | ((A | B) & S) | ((A ^ B) & I) | ((A | B) & H))
-               value = (A & H) ? Highlight : Set;
-           else
-               value = Clear;
-           BWDrawPoint((Widget) BW, 
-                        at_x + x, at_y + y, 
-                        value);
-       }
-}
-
-void 
-BWRestore(Widget w, Position at_x, Position at_y, int value)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.storage) {
-      DrawImageData(BW, BW->bitmap.storage, at_x, at_y, value);
-      /*DestroyBitmapImage(&BW->bitmap.storage);*/
-    }
-}
-
-void 
-BWCopy(Widget w, Position at_x, Position at_y, int value)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XImage *storage;
-    char *storage_data;
-    Dimension width, height;
-
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
-
-       width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
-       height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-       
-       storage_data = CreateCleanData(Length(width, height));
-
-       storage = CreateBitmapImage(BW, storage_data, width, height);
-
-       CopyImageData(BW->bitmap.image, storage,
-                     BW->bitmap.mark.from_x,  BW->bitmap.mark.from_y,
-                     BW->bitmap.mark.to_x,  BW->bitmap.mark.to_y,
-                     0, 0);
-
-       DrawImageData(BW, storage, at_x, at_y, value);
-
-       DestroyBitmapImage(&storage);
-    }
-}
-
-/* void BWMark(); */
-
-void 
-BWMove(Widget w, Position at_x, Position at_y, int value)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    XImage *storage;
-    char *storage_data;
-    Dimension width, height;
-
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
-
-       width = BW->bitmap.mark.to_x - BW->bitmap.mark.from_x + 1;
-       height = BW->bitmap.mark.to_y - BW->bitmap.mark.from_y + 1;
-       
-       storage_data = CreateCleanData(Length(width, height));
-
-       storage = CreateBitmapImage(BW, storage_data, width, height);
-
-       CopyImageData(BW->bitmap.image, storage,
-                     BW->bitmap.mark.from_x,  BW->bitmap.mark.from_y,
-                     BW->bitmap.mark.to_x,  BW->bitmap.mark.to_y,
-                     0, 0);
-
-       BWDrawFilledRectangle(w,
-                             BW->bitmap.mark.from_x, BW->bitmap.mark.from_y,
-                             BW->bitmap.mark.to_x, BW->bitmap.mark.to_y,
-                             Clear);
-
-       DrawImageData(BW, storage, at_x, at_y, value);
-
-       BWMark(w, at_x, at_y,
-            at_x + BW->bitmap.mark.to_x - BW->bitmap.mark.from_x,
-            at_y + BW->bitmap.mark.to_y - BW->bitmap.mark.from_y);
-
-       DestroyBitmapImage(&storage);
-    }
-}
-
-void 
-BWRedrawMark(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) 
-       XFillRectangle(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,
-                      InWindowX(BW, BW->bitmap.mark.from_x), 
-                      InWindowY(BW, BW->bitmap.mark.from_y), 
-                      InWindowX(BW, BW->bitmap.mark.to_x + 1) - 
-                      InWindowX(BW, BW->bitmap.mark.from_x),
-                      InWindowY(BW, BW->bitmap.mark.to_y + 1) -
-                      InWindowY(BW, BW->bitmap.mark.from_y));
-}
-
-void 
-BWStoreToBuffer(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    memmove( BW->bitmap.buffer->data, BW->bitmap.image->data, 
-         Length(BW->bitmap.image->width, BW->bitmap.image->height));
-
-    BW->bitmap.buffer_hot = BW->bitmap.hot;
-    BW->bitmap.buffer_mark = BW->bitmap.mark;
-}
-
-void 
-BWUnmark(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BW->bitmap.buffer_mark = BW->bitmap.mark;
-
-    if (QuerySet(BW->bitmap.mark.from_x, BW->bitmap.mark.from_y)) {
-       XFillRectangle(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,
-                      InWindowX(BW, BW->bitmap.mark.from_x), 
-                      InWindowY(BW, BW->bitmap.mark.from_y), 
-                      InWindowX(BW, BW->bitmap.mark.to_x + 1) - 
-                      InWindowX(BW, BW->bitmap.mark.from_x),
-                      InWindowY(BW, BW->bitmap.mark.to_y + 1) -
-                      InWindowY(BW, BW->bitmap.mark.from_y));
-    
-       BW->bitmap.mark.from_x = BW->bitmap.mark.from_y = NotSet;
-       BW->bitmap.mark.to_x = BW->bitmap.mark.to_y = NotSet;
-    }
-}
-
-void 
-BWMark(Widget w, Position from_x, Position from_y, 
-       Position to_x, Position to_y)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    BWUnmark(w);
-    
-    if (QuerySet(from_x, from_y)) {
-       if ((from_x == to_x) && (from_y == to_y)) {
-           /*
-             BW->bitmap.mark.from_x = 0;
-             BW->bitmap.mark.from_y = 0;
-             BW->bitmap.mark.to_x = BW->bitmap.image->width - 1;
-             BW->bitmap.mark.to_y = BW->bitmap.image->height - 1;
-             */
-           return;
-       }
-       else {
-           QuerySwap(from_x, to_x);
-           QuerySwap(from_y, to_y);
-           from_x = max(0, from_x);
-           from_y = max(0, from_y);
-           to_x = min(BW->bitmap.image->width - 1, to_x);
-           to_y = min(BW->bitmap.image->height - 1, to_y);
-           
-           BW->bitmap.mark.from_x = from_x;
-           BW->bitmap.mark.from_y = from_y;
-           BW->bitmap.mark.to_x = to_x;
-           BW->bitmap.mark.to_y = to_y;
-       }
-       
-       XFillRectangle(XtDisplay(BW), XtWindow(BW), BW->bitmap.highlighting_gc,
-                      InWindowX(BW, BW->bitmap.mark.from_x),
-                      InWindowY(BW, BW->bitmap.mark.from_y), 
-                      InWindowX(BW, BW->bitmap.mark.to_x + 1) -
-                      InWindowX(BW, BW->bitmap.mark.from_x),
-                      InWindowY(BW, BW->bitmap.mark.to_y +1) - 
-                      InWindowY(BW, BW->bitmap.mark.from_y));
-    }
-}
-
-void 
-BWMarkAll(Widget w)
-{
-  BitmapWidget BW = (BitmapWidget) w;
-
-  BWMark(w, 0, 0, BW->bitmap.image->width - 1, BW->bitmap.image->height - 1);
-}
-
-void 
-BWUndo(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    Position x, y;
-    char *tmp_data;
-    XPoint tmp_hot;
-    BWArea tmp_mark;
-    
-    tmp_data = BW->bitmap.image->data;
-    BW->bitmap.image->data = BW->bitmap.buffer->data;
-    BW->bitmap.buffer->data = tmp_data;
-
-    tmp_hot = BW->bitmap.hot;
-    tmp_mark = BW->bitmap.mark;
-    
-    for (x = 0; x < BW->bitmap.image->width; x++)
-       for (y = 0; y < BW->bitmap.image->height; y++)
-        if (GetBit(BW->bitmap.image, x, y) != GetBit(BW->bitmap.buffer, x, y))
-            DrawSquare(BW, x, y);
-
-    BWSetHotSpot(w, BW->bitmap.buffer_hot.x, BW->bitmap.buffer_hot.y);
-/*    
-    BWMark(w, BW->bitmap.buffer_mark.from_x, BW->bitmap.buffer_mark.from_y,
-          BW->bitmap.buffer_mark.to_x, BW->bitmap.buffer_mark.to_y);
-*/
-    BW->bitmap.buffer_hot = tmp_hot;
-    BW->bitmap.buffer_mark= tmp_mark;
-
-}
-
-void 
-BWHighlightAxes(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-
-    XDrawLine(XtDisplay(BW), XtWindow(BW),
-             BW->bitmap.axes_gc,
-             InWindowX(BW, 0), 
-             InWindowY(BW, 0),
-             InWindowX(BW, BW->bitmap.width),
-             InWindowY(BW, BW->bitmap.height));
-    XDrawLine(XtDisplay(BW), XtWindow(BW),
-             BW->bitmap.axes_gc,
-             InWindowX(BW, BW->bitmap.width),
-             InWindowY(BW, 0), 
-             InWindowX(BW, 0),
-             InWindowY(BW, BW->bitmap.height));
-    XDrawLine(XtDisplay(BW), XtWindow(BW),
-             BW->bitmap.axes_gc,
-             InWindowX(BW, 0),
-             InWindowY(BW, (float)BW->bitmap.height / 2.0),
-             InWindowX(BW, BW->bitmap.width),
-             InWindowY(BW, (float)BW->bitmap.height / 2.0));
-    XDrawLine(XtDisplay(BW), XtWindow(BW),
-             BW->bitmap.axes_gc,
-             InWindowX(BW, (float)BW->bitmap.width / 2.0),
-             InWindowY(BW, 0),
-             InWindowX(BW, (float)BW->bitmap.width / 2.0),
-             InWindowY(BW, BW->bitmap.height));
-}
-    
-typedef struct {
-    Position *x, *y;
-    Dimension *width, *height;
-} Table;
-
-XImage *
-ScaleBitmapImage(BitmapWidget BW, XImage *src, 
-                double scale_x, double scale_y)
-{
-    char *data;
-    XImage *dst;
-    Table table;    
-    Position x, y, w, h;
-    Dimension width, height;
-    bit pixel;
-
-    width = max(rint(scale_x * src->width), 1);
-    height = max(rint(scale_y * src->height), 1);
-
-    data = CreateCleanData(Length(width, height));
-    dst = CreateBitmapImage(BW, data, width, height);
-
-    /*
-     * It would be nice to check if width or height < 1.0 and
-     * average the skipped pixels. But, it is slow as it is now.
-     */
-    if (scale_x == 1.0 && scale_y == 1.0)
-       memmove( dst->data, src->data, Length(width, height));
-    else {
-       table.x = (Position *) XtMalloc(sizeof(Position) * src->width);
-       table.y = (Position *) XtMalloc(sizeof(Position) * src->height);
-       table.width = (Dimension *) XtMalloc(sizeof(Dimension) * src->width);
-       table.height = (Dimension *) XtMalloc(sizeof(Dimension) * src->height);
-       
-       for (x = 0; x < src->width; x++) {
-           table.x[x] = rint(scale_x * x);
-           table.width[x] = rint(scale_x * (x + 1)) - rint(scale_x * x);
-       }
-       for (y = 0; y < src->height; y++) {
-           table.y[y] = rint(scale_y * y);
-           table.height[y] = rint(scale_y * (y + 1)) - rint(scale_y * y);
-       }
-       
-       for (x = 0; x < src->width; x++)
-           for (y = 0; y < src->height; y++) {
-               pixel = GetBit(src, x, y);
-               for (w = 0; (int)w < (int)table.width[x]; w++)
-                   for (h = 0; (int)h < (int)table.height[y]; h++)
-                       if (pixel) SetBit(dst, 
-                                       table.x[x] + w, 
-                                       table.y[y] + h);
-           }
-
-       XtFree((char *)table.x);
-       XtFree((char *)table.y);
-       XtFree((char *)table.width);
-       XtFree((char *)table.height);
-    }
-    
-    return (dst);
-}
-
-/*****************************************************************************/
diff --git a/bitmap/Handlers.c b/bitmap/Handlers.c
deleted file mode 100644 (file)
index 9137e0f..0000000
+++ /dev/null
@@ -1,675 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include "BitmapP.h"
-    
-#include <stdio.h>
-#include <math.h>
-
-#define min(x, y)                     (((int)(x) < (int)(y)) ? (x) : (y))
-#define max(x, y)                     (((int)(x) > (int)(y)) ? (x) : (y))
-
-#include "Requests.h"
-
-
-/*****************************************************************************
- *                                  Handlers                                 *
- *****************************************************************************/
-
-#define QueryInSquare(BW, x, y, square_x, square_y)\
-    ((InBitmapX(BW, x) == (square_x)) &&\
-     (InBitmapY(BW, y) == (square_y)))
-
-
-static void 
-DragOnePointHandler(Widget w, 
-                   XtPointer client_data, 
-                   XEvent *event, 
-                   Boolean *cont) /* ARGSUSED */
-{
-    BWStatus *status = (BWStatus *)client_data;
-    BitmapWidget BW = (BitmapWidget) w;
-
-    if (DEBUG)
-       fprintf(stderr, "D1PH ");
-
-    switch (event->type) {
-    
-    case ButtonPress:
-       if (event->xbutton.state != status->state) return;
-       if (!QuerySet(status->at_x, status->at_y)) {
-           BWStoreToBuffer(w);
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;
-           status->at_x = InBitmapX(BW, event->xbutton.x);
-           status->at_y = InBitmapY(BW, event->xbutton.y);
-           status->success = status->draw ? True : False;
-           if (status->draw)
-               (*(DrawOnePointProc)status->draw)(w,
-                               status->at_x, status->at_y, status->value);
-       }
-       break;
-       
-    case ButtonRelease:
-       if (QuerySet(status->at_x, status->at_y)) {
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;
-           status->at_x = InBitmapX(BW, event->xbutton.x);
-           status->at_y = InBitmapY(BW, event->xbutton.y);
-           status->success = status->draw ? True : False;
-           /* SUPPRESS 701 */
-           BWTerminateRequest(w, TRUE); 
-       }
-       break;
-
-    case MotionNotify:
-       if (QuerySet(status->at_x, status->at_y)) {
-           if (!QueryInSquare(BW, event->xmotion.x, event->xmotion.y,
-                              status->at_x, status->at_y)) {
-               status->at_x = InBitmapX(BW, event->xmotion.x);
-               status->at_y = InBitmapY(BW, event->xmotion.y);
-               if (status->draw)
-                   (*(DrawOnePointProc)status->draw)(w,
-                                   status->at_x, status->at_y, status->value);
-           }
-       }
-       break;
-
-    }
-}
-
-void 
-DragOnePointEngage(Widget w, 
-                  BWStatus *status, 
-                  XtPointer draw, 
-                  int *state)
-{
-    
-    status->at_x = NotSet;
-    status->at_y = NotSet;
-    status->draw = draw;
-    status->success = False;
-    status->state = *state;
-    
-    XtAddEventHandler(w,
-                     ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
-                     FALSE, DragOnePointHandler, (XtPointer)status);
-}
-
-/* ARGSUSED */
-void 
-DragOnePointTerminate(Widget w, 
-                     BWStatus *status, 
-                     XtPointer draw)
-{
-    
-    if (status->success) {
-       BWChangeNotify(w);
-       BWSetChanged(w);
-    }
-    
-    XtRemoveEventHandler(w,
-                ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
-                FALSE, DragOnePointHandler, (XtPointer)status);
-    
-}
-
-void 
-OnePointHandler(Widget w, 
-               XtPointer client_data, 
-               XEvent *event, 
-               Boolean *cont) /* ARGSUSED */
-{
-    BWStatus    *status = (BWStatus *)client_data;
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (DEBUG)
-       fprintf(stderr, "1PH ");
-
-    switch (event->type) {
-       
-    case Expose:
-       if (QuerySet(status->at_x, status->at_y)) {
-           BWClip(w, event->xexpose.x, event->xexpose.y,
-                  event->xexpose.width, event->xexpose.height);
-           if (status->draw)
-               (*(DrawOnePointProc)status->draw)(w,
-                               status->at_x, status->at_y, Highlight);
-           
-           BWUnclip(w);
-       }
-       break;
-       
-    case ButtonPress:
-       if (event->xbutton.state != status->state) return;
-       if (!QuerySet(status->at_x, status->at_y)) {
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;
-           status->at_x = InBitmapX(BW, event->xbutton.x);
-           status->at_y = InBitmapY(BW, event->xbutton.y);
-           if (status->draw)
-               (*(DrawOnePointProc)status->draw)(w,
-                               status->at_x, status->at_y, Highlight);
-       }
-       break;
-       
-    case ButtonRelease:
-       if (QuerySet(status->at_x, status->at_y)) {
-           if (status->draw)
-               (*(DrawOnePointProc)status->draw)(w,
-                               status->at_x, status->at_y, Highlight);
-           
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;
-           status->at_x = InBitmapX(BW, event->xbutton.x);
-           status->at_y = InBitmapY(BW, event->xbutton.y);
-           status->success = True;
-           
-           BWTerminateRequest(w, TRUE);
-       }
-       break;
-       
-    case MotionNotify:
-       if (QuerySet(status->at_x, status->at_y)) {
-           if (!QueryInSquare(BW, event->xmotion.x, event->xmotion.y,
-                              status->at_x, status->at_y)) {
-               if (status->draw)
-                   (*(DrawOnePointProc)status->draw)(w,
-                                   status->at_x, status->at_y, Highlight);
-               status->at_x = InBitmapX(BW, event->xmotion.x);
-               status->at_y = InBitmapY(BW, event->xmotion.y);
-               if (status->draw)
-                   (*(DrawOnePointProc)status->draw)(w,
-                                   status->at_x, status->at_y, Highlight);
-           }
-       }      
-       break;
-    }
-}
-
-void 
-OnePointEngage(Widget w, 
-              BWStatus *status, 
-              XtPointer draw, 
-              int *state)
-{
-    status->at_x = NotSet;
-    status->at_y = NotSet;
-    status->draw = draw;
-    status->success = False;
-    status->state = *state;
-
-    XtAddEventHandler(w,
-                     ButtonPressMask | ButtonReleaseMask | 
-                     ExposureMask | PointerMotionMask,
-                     FALSE, OnePointHandler, (XtPointer)status);
-}
-
-#if 0
-void 
-OnePointImmediateEngage(Widget w, 
-                       BWStatus *status, 
-                       XtPointer draw, 
-                       int *state)
-{
-    status->at_x = 0;
-    status->at_y = 0;
-    status->draw = draw;
-    status->success = False;
-    status->state = *state;
-    
-    if (status->draw)
-       (*(DrawOnePointProc)status->draw)(w,
-                       status->at_x, status->at_y, Highlight);
-    
-    XtAddEventHandler(w,
-                     ButtonPressMask | ButtonReleaseMask | 
-                     ExposureMask | PointerMotionMask,
-                     FALSE, OnePointHandler, (XtPointer)status);
-}
-#endif
-
-void 
-OnePointTerminate(Widget w, 
-                 BWStatus *status, 
-                 XtPointer draw)
-{
-    
-    if (status->success && draw) {
-       BWStoreToBuffer(w);
-       (*(DrawOnePointProc)draw)(w,
-               status->at_x, status->at_y,
-               status->value);
-       BWChangeNotify(w);
-       BWSetChanged(w);
-    }    
-    else
-       if (QuerySet(status->at_x, status->at_y))
-           if (status->draw)
-               (*(DrawOnePointProc)status->draw)(w,
-                               status->at_x, status->at_y, Highlight);
-    
-    XtRemoveEventHandler(w,
-                        ButtonPressMask | ButtonReleaseMask | 
-                        ExposureMask | PointerMotionMask,
-                        FALSE, OnePointHandler, (XtPointer)status);
-}
-
-void 
-OnePointTerminateTransparent(Widget w, 
-                            BWStatus *status, 
-                            XtPointer draw)
-{
-    
-    if (status->success && draw)
-       (*(DrawOnePointProc)draw)(w,
-               status->at_x, status->at_y,
-               status->value);
-    else
-       if (QuerySet(status->at_x, status->at_y))
-           if (status->draw)
-               (*(DrawOnePointProc)status->draw)(w,
-                               status->at_x, status->at_y, Highlight);
-    
-    XtRemoveEventHandler(w,
-                        ButtonPressMask | ButtonReleaseMask | 
-                        ExposureMask | PointerMotionMask,
-                        FALSE, OnePointHandler, (XtPointer)status);
-    
-}
-
-
-void 
-TwoPointsHandler(Widget w, 
-                XtPointer client_data, 
-                XEvent *event, 
-                Boolean *cont) /* ARGSUSED */
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    BWStatus   *status = (BWStatus *)client_data;
-    if (DEBUG)
-       fprintf(stderr, "2PH ");
-    
-    switch (event->type) {
-       
-    case Expose:
-       if (QuerySet(status->from_x, status->from_y) && 
-           QuerySet(status->to_x, status->to_y)) {
-           BWClip(w, event->xexpose.x, event->xexpose.y,
-                  event->xexpose.width, event->xexpose.height);
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, Highlight);
-           BWUnclip(w);
-       }
-       break;
-       
-    case ButtonPress:
-       if (event->xbutton.state != status->state) return;
-       if (!QuerySet(status->from_x, status->from_y)) {
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;
-           status->from_x = InBitmapX(BW, event->xbutton.x);
-           status->from_y = InBitmapY(BW, event->xbutton.y);
-           status->to_x = InBitmapX(BW, event->xbutton.x);
-           status->to_y = InBitmapY(BW, event->xbutton.y);
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, Highlight);
-       }
-       break;
-       
-    case ButtonRelease:
-       if (QuerySet(status->from_x, status->from_y)) {
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, Highlight);
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;            
-           status->to_x = InBitmapX(BW, event->xbutton.x);
-           status->to_y = InBitmapY(BW, event->xbutton.y);
-           status->success = True;
-           
-           BWTerminateRequest(w, TRUE);
-       }
-       break;
-       
-    case MotionNotify:
-       if (QuerySet(status->from_x, status->from_y)) {
-           if (QuerySet(status->to_x, status->to_y)) {
-               if (!QueryInSquare(BW, event->xmotion.x, event->xmotion.y,
-                                  status->to_x, status->to_y)) {
-                   if (status->draw)
-                       (*(DrawTwoPointProc)status->draw)(w,
-                                       status->from_x, status->from_y, 
-                                       status->to_x, status->to_y, Highlight);
-                   status->to_x = InBitmapX(BW, event->xmotion.x);
-                   status->to_y = InBitmapY(BW, event->xmotion.y);
-                   if (status->draw)
-                       (*(DrawTwoPointProc)status->draw)(w,
-                                       status->from_x, status->from_y, 
-                                       status->to_x, status->to_y, Highlight);
-               }
-           }
-           else {
-               status->to_x = InBitmapX(BW, event->xmotion.x);
-               status->to_y = InBitmapY(BW, event->xmotion.y);
-               if (status->draw)
-                   (*(DrawTwoPointProc)status->draw)(w,
-                                   status->from_x, status->from_y, 
-                                   status->to_x, status->to_y, Highlight);
-           }
-       }
-       break;
-    }
-}
-
-void 
-TwoPointsEngage(Widget w, 
-               BWStatus *status, 
-               XtPointer draw, 
-               int *state)
-{
-    
-    status->from_x = NotSet;
-    status->from_y = NotSet;
-    status->to_x = NotSet;
-    status->to_y = NotSet;
-    status->draw = draw;
-    status->success = False;
-    status->state = *state;
-
-    XtAddEventHandler(w,
-                     ButtonPressMask | ButtonReleaseMask | 
-                     ExposureMask | PointerMotionMask,
-                     FALSE, TwoPointsHandler, (XtPointer)status);
-}
-
-void 
-TwoPointsTerminate(Widget w, 
-                  BWStatus *status, 
-                  XtPointer draw)
-{
-    
-    if (status->success && draw) {
-       BWStoreToBuffer(w);
-       (*(DrawTwoPointProc)draw)(w,
-               status->from_x, status->from_y,
-               status->to_x, status->to_y,
-               status->value);
-       BWChangeNotify(w);
-       BWSetChanged(w);
-    }
-    else
-       if (QuerySet(status->from_x, status->from_y) && 
-           QuerySet(status->to_x, status->to_y))
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, Highlight);
-    
-    XtRemoveEventHandler(w,
-                        ButtonPressMask | ButtonReleaseMask | 
-                        ExposureMask | PointerMotionMask,
-                        FALSE, TwoPointsHandler, (XtPointer)status);
-}
-
-void 
-TwoPointsTerminateTransparent(Widget w, 
-                             BWStatus *status, 
-                             XtPointer draw)
-{
-    
-    if (status->success && draw)
-       (*(DrawTwoPointProc)draw)(w,
-               status->from_x, status->from_y,
-               status->to_x, status->to_y,
-               status->value);
-    else
-       if (QuerySet(status->from_x, status->from_y) && 
-           QuerySet(status->to_x, status->to_y))
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, Highlight);
-    
-    XtRemoveEventHandler(w,
-                        ButtonPressMask | ButtonReleaseMask | 
-                        ExposureMask | PointerMotionMask,
-                        FALSE, TwoPointsHandler, (XtPointer)status);
-}
-
-void 
-TwoPointsTerminateTimed(Widget w, 
-                       BWStatus *status, 
-                       XtPointer draw)
-{
-    
-    if (status->success && draw)
-       (*(DrawTwoPointProc)draw)(w,
-               status->from_x, status->from_y,
-               status->to_x, status->to_y,
-               status->btime);
-    else
-       if (QuerySet(status->from_x, status->from_y) && 
-           QuerySet(status->to_x, status->to_y))
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, Highlight);
-    
-    XtRemoveEventHandler(w,
-                        ButtonPressMask | ButtonReleaseMask | 
-                        ExposureMask | PointerMotionMask,
-                        FALSE, TwoPointsHandler, (XtPointer)status);
-}
-
-/* ARGSUSED */
-void 
-Interface(Widget w, 
-         BWStatus *status, 
-         XtPointer action)
-{
-    (*(InterfaceProc)action)(w);
-}
-
-void 
-Paste(Widget w, 
-      Position at_x, 
-      Position at_y, 
-      int value)
-{
-    BitmapWidget    BW = (BitmapWidget) w;
-    BWStatus       *my_status;
-    BWRequest       request;
-
-    my_status = (BWStatus *) 
-       BW->bitmap.request_stack[BW->bitmap.current].status;
-
-    my_status->draw = NULL;
-
-   request = (BWRequest)
-   BW->bitmap.request_stack[BW->bitmap.current].request->terminate_client_data;
-       
-    BWTerminateRequest(w, FALSE);
-    
-    if ((at_x == max(BW->bitmap.mark.from_x, min(at_x, BW->bitmap.mark.to_x)))
-       &&
-      (at_y == max(BW->bitmap.mark.from_y, min(at_y, BW->bitmap.mark.to_y)))) {
-       
-       BWStatus *status;
-       
-       if (DEBUG)
-           fprintf(stderr, "Prepaste request: %s\n", request);
-       
-       BWEngageRequest(w, request, False, (char *)&(my_status->state), sizeof(int));
-       
-       status = (BWStatus *) 
-           BW->bitmap.request_stack[BW->bitmap.current].status;
-       
-       status->at_x = at_x;
-       status->at_y = at_y;
-       status->value = value;
-       (*(DrawOnePointProc)status->draw) (w, at_x, at_y, Highlight);   
-    }
-    else {
-
-       BWStatus *status;
-       
-      BWEngageRequest(w, MarkRequest, False, (char *)&(my_status->state), sizeof(int));
-       
-       status = (BWStatus *) 
-           BW->bitmap.request_stack[BW->bitmap.current].status;
-       
-       status->from_x = status->to_x = at_x;
-       status->from_y = status->to_y = at_y;
-       status->value = value;
-       (*(DrawTwoPointProc)status->draw) (w, at_x, at_y, at_x, at_y, Highlight);
-    }
-}
-
-
-void 
-DragTwoPointsHandler(Widget w, 
-                    XtPointer client_data, 
-                    XEvent *event, 
-                    Boolean *cont) /* ARGSUSED */
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    BWStatus   *status = (BWStatus *)client_data;
-
-    if (DEBUG)
-       fprintf(stderr, "D2PH ");
-
-    switch (event->type) {
-       
-    case ButtonPress:
-       if (event->xbutton.state != status->state) return;
-       if (!QuerySet(status->from_x, status->from_y)) {
-           BWStoreToBuffer(w);
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;
-           status->from_x = InBitmapX(BW, event->xbutton.x);
-           status->from_y = InBitmapY(BW, event->xbutton.y);
-           status->to_x = InBitmapX(BW, event->xbutton.x);
-           status->to_y = InBitmapY(BW, event->xbutton.y);
-           status->success = status->draw ? True : False;
-           if (status->draw)
-               (*(DrawTwoPointProc)status->draw)(w,
-                               status->from_x, status->from_y, 
-                               status->to_x, status->to_y, status->value);
-       }
-       break;
-       
-    case ButtonRelease:
-       if (QuerySet(status->from_x, status->from_y)) {
-           status->value = Value(BW, event->xbutton.button);
-           status->btime = event->xbutton.time;            
-           status->from_x = status->to_x;
-           status->from_y = status->to_y;
-           status->to_x = InBitmapX(BW, event->xbutton.x);
-           status->to_y = InBitmapY(BW, event->xbutton.y);
-           status->success = True;
-           
-           BWTerminateRequest(w, TRUE);
-       }
-       break;
-       
-    case MotionNotify:
-       if (QuerySet(status->from_x, status->from_y)) {
-           if (QuerySet(status->to_x, status->to_y)) {
-               if (!QueryInSquare(BW, event->xmotion.x, event->xmotion.y,
-                                  status->to_x, status->to_y)) {
-                   status->from_x = status->to_x;
-                   status->from_y = status->to_y;
-                   status->to_x = InBitmapX(BW, event->xmotion.x);
-                   status->to_y = InBitmapY(BW, event->xmotion.y);
-                   if (status->draw)
-                       (*(DrawTwoPointProc)status->draw)(w,
-                                       status->from_x, status->from_y, 
-                                       status->to_x, status->to_y, status->value);
-               }
-           }
-       }
-       break;
-    }
-}
-
-void 
-DragTwoPointsEngage(Widget w, 
-                   BWStatus *status, 
-                   XtPointer draw, 
-                   int *state)
-{
-    
-    status->from_x = NotSet;
-    status->from_y = NotSet;
-    status->to_x = NotSet;
-    status->to_y = NotSet;
-    status->draw = draw;
-    status->success = False;
-    status->state = *state;
-
-    XtAddEventHandler(w,
-                     ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
-                     FALSE, DragTwoPointsHandler, (XtPointer)status);
-}
-
-void 
-DragTwoPointsTerminate(Widget w, 
-                      BWStatus *status, 
-                      XtPointer draw)
-{
-    
-    if (status->success && draw) {
-       if ((status->from_x != status->to_x) 
-           || 
-           (status->from_y != status->to_y))
-           (*(DrawTwoPointProc)draw)(w,
-                   status->from_x, status->from_y,
-                   status->to_x, status->to_y,
-                   status->value);
-       BWChangeNotify(w);
-       BWSetChanged(w);
-    }
-    
-    XtRemoveEventHandler(w,
-                        ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
-                        FALSE, DragTwoPointsHandler, (XtPointer)status);
-}
-
-/*****************************************************************************/
diff --git a/bitmap/INSTALL b/bitmap/INSTALL
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/bitmap/Left b/bitmap/Left
deleted file mode 100644 (file)
index 5c7f141..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define Left_width 30
-#define Left_height 30
-static char Left_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
-   0x00, 0x37, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0xc0, 0x1d, 0x00, 0x00,
-   0xe0, 0x0e, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0xb8, 0xff, 0xff, 0x1f,
-   0x5c, 0xff, 0xff, 0x0f, 0xae, 0xaa, 0xaa, 0x06, 0x57, 0x55, 0x55, 0x03,
-   0xae, 0xaa, 0xaa, 0x06, 0x5c, 0xff, 0xff, 0x0f, 0xb8, 0xff, 0xff, 0x1f,
-   0x70, 0x07, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0xc0, 0x1d, 0x00, 0x00,
-   0x80, 0x3b, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
-   0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/Makefile.am b/bitmap/Makefile.am
deleted file mode 100644 (file)
index 13a392b..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-bin_PROGRAMS = bitmap bmtoa atobm
-
-# bitmap
-
-bitmap_CFLAGS = $(CWARNFLAGS) $(BITMAP_CFLAGS)
-bitmap_LDADD = $(BITMAP_LIBS) -lm
-
-bitmap_SOURCES = \
-         BitEdit.c \
-         CutPaste.c \
-         Graphics.c \
-         ReqMach.c \
-         Bitmap.c \
-         Dialog.c \
-         Handlers.c \
-         Bitmap.h \
-         BitmapP.h \
-         Dialog.h \
-         Requests.h
-
-# bmtoa
-
-bmtoa_CFLAGS = $(CWARNFLAGS) $(BMTOA_CFLAGS)
-bmtoa_LDADD = $(BMTOA_LIBS)
-bmtoa_SOURCES = \
-         bmtoa.c
-
-# atobm
-
-atobm_CFLAGS = $(CWARNFLAGS) $(ATOBM_CFLAGS)
-atobm_LDADD = $(ATOBM_LDADD)
-atobm_SOURCES = \
-         atobm.c
-
-# mans
-
-appman_PRE = \
-             bitmap.man
-
-
-# App default files  (*.ad)
-
-DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
-
-appdefaultdir = @appdefaultdir@
-
-dist_appdefault_DATA = \
-       app-defaults/Bitmap-color \
-       app-defaults/Bitmap-nocase \
-       app-defaults/Bitmap
-
-
-EXTRA_DIST = bitmap.icon ChangeLog autogen.sh
-MAINTAINERCLEANFILES=ChangeLog
-
-.PHONY: ChangeLog
-
-ChangeLog:
-       $(CHANGELOG_CMD)
-
-dist-hook: ChangeLog
-
-# bitmaps
-
-bitmapdir = $(includedir)/X11/bitmaps
-
-dist_bitmap_DATA =     \
-       Dashes          \
-       Down            \
-       Excl            \
-       FlipHoriz       \
-       FlipVert        \
-       Fold            \
-       Left            \
-       Right           \
-       RotateLeft      \
-       RotateRight     \
-       Stipple         \
-       Term            \
-       Up
-
-APP_MAN_DIR_SUFFIX = $(APP_MAN_DIR:@mandir@/man%=%)
-
-appmandir = $(APP_MAN_DIR)
-
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) \
-             $(man_shadows:=.@APP_MAN_SUFFIX@)
-
-BUILT_SOURCES = shadows.DONE
-
-EXTRA_DIST += $(appman_PRE)
-CLEANFILES = $(appman_DATA) $(BUILT_SOURCES)
-
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
-
-man_shadows = atobm bmtoa
-
-shadows.DONE:
-       -rm -f $(man_shadows:=.@APP_MAN_SUFFIX@)
-       (for i in $(man_shadows:=.@APP_MAN_SUFFIX@) ; do \
-        echo .so man$(APP_MAN_DIR_SUFFIX)/bitmap.$(APP_MAN_SUFFIX) > $$i; \
-        done)
diff --git a/bitmap/Makefile.in b/bitmap/Makefile.in
deleted file mode 100644 (file)
index 1742b0f..0000000
+++ /dev/null
@@ -1,1067 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = bitmap$(EXEEXT) bmtoa$(EXEEXT) atobm$(EXEEXT)
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
-       $(dist_bitmap_DATA) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       compile config.guess config.sub depcomp install-sh missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
-       "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(bitmapdir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_atobm_OBJECTS = atobm-atobm.$(OBJEXT)
-atobm_OBJECTS = $(am_atobm_OBJECTS)
-atobm_DEPENDENCIES =
-atobm_LINK = $(CCLD) $(atobm_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
-am_bitmap_OBJECTS = bitmap-BitEdit.$(OBJEXT) bitmap-CutPaste.$(OBJEXT) \
-       bitmap-Graphics.$(OBJEXT) bitmap-ReqMach.$(OBJEXT) \
-       bitmap-Bitmap.$(OBJEXT) bitmap-Dialog.$(OBJEXT) \
-       bitmap-Handlers.$(OBJEXT)
-bitmap_OBJECTS = $(am_bitmap_OBJECTS)
-am__DEPENDENCIES_1 =
-bitmap_DEPENDENCIES = $(am__DEPENDENCIES_1)
-bitmap_LINK = $(CCLD) $(bitmap_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
-am_bmtoa_OBJECTS = bmtoa-bmtoa.$(OBJEXT)
-bmtoa_OBJECTS = $(am_bmtoa_OBJECTS)
-bmtoa_DEPENDENCIES = $(am__DEPENDENCIES_1)
-bmtoa_LINK = $(CCLD) $(bmtoa_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(atobm_SOURCES) $(bitmap_SOURCES) $(bmtoa_SOURCES)
-DIST_SOURCES = $(atobm_SOURCES) $(bitmap_SOURCES) $(bmtoa_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-DATA = $(appman_DATA) $(dist_appdefault_DATA) $(dist_bitmap_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-ATOBM_CFLAGS = @ATOBM_CFLAGS@
-ATOBM_LIBS = @ATOBM_LIBS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITMAP_CFLAGS = @BITMAP_CFLAGS@
-BITMAP_LIBS = @BITMAP_LIBS@
-BMTOA_CFLAGS = @BMTOA_CFLAGS@
-BMTOA_LIBS = @BMTOA_LIBS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CHANGELOG_CMD = @CHANGELOG_CMD@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CWARNFLAGS = @CWARNFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_CMD = @INSTALL_CMD@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-SED = sed
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-XBITMAP_CFLAGS = @XBITMAP_CFLAGS@
-XBITMAP_LIBS = @XBITMAP_LIBS@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-appdefaultdir = @appdefaultdir@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# bitmap
-bitmap_CFLAGS = $(CWARNFLAGS) $(BITMAP_CFLAGS)
-bitmap_LDADD = $(BITMAP_LIBS) -lm
-bitmap_SOURCES = \
-         BitEdit.c \
-         CutPaste.c \
-         Graphics.c \
-         ReqMach.c \
-         Bitmap.c \
-         Dialog.c \
-         Handlers.c \
-         Bitmap.h \
-         BitmapP.h \
-         Dialog.h \
-         Requests.h
-
-
-# bmtoa
-bmtoa_CFLAGS = $(CWARNFLAGS) $(BMTOA_CFLAGS)
-bmtoa_LDADD = $(BMTOA_LIBS)
-bmtoa_SOURCES = \
-         bmtoa.c
-
-
-# atobm
-atobm_CFLAGS = $(CWARNFLAGS) $(ATOBM_CFLAGS)
-atobm_LDADD = $(ATOBM_LDADD)
-atobm_SOURCES = \
-         atobm.c
-
-
-# mans
-appman_PRE = \
-             bitmap.man
-
-
-# App default files  (*.ad)
-DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
-dist_appdefault_DATA = \
-       app-defaults/Bitmap-color \
-       app-defaults/Bitmap-nocase \
-       app-defaults/Bitmap
-
-EXTRA_DIST = bitmap.icon ChangeLog autogen.sh $(appman_PRE)
-MAINTAINERCLEANFILES = ChangeLog
-
-# bitmaps
-bitmapdir = $(includedir)/X11/bitmaps
-dist_bitmap_DATA = \
-       Dashes          \
-       Down            \
-       Excl            \
-       FlipHoriz       \
-       FlipVert        \
-       Fold            \
-       Left            \
-       Right           \
-       RotateLeft      \
-       RotateRight     \
-       Stipple         \
-       Term            \
-       Up
-
-APP_MAN_DIR_SUFFIX = $(APP_MAN_DIR:@mandir@/man%=%)
-appmandir = $(APP_MAN_DIR)
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) \
-             $(man_shadows:=.@APP_MAN_SUFFIX@)
-
-BUILT_SOURCES = shadows.DONE
-CLEANFILES = $(appman_DATA) $(BUILT_SOURCES)
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
-man_shadows = atobm bmtoa
-all: $(BUILT_SOURCES) config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
-am--refresh:
-       @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           echo ' $(SHELL) ./config.status'; \
-           $(SHELL) ./config.status;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-       else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h1
-       cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
-       rm -f stamp-h1
-       touch $@
-
-distclean-hdr:
-       -rm -f config.h stamp-h1
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       for p in $$list; do echo "$$p $$p"; done | \
-       sed 's/$(EXEEXT)$$//' | \
-       while read p p1; do if test -f $$p; \
-         then echo "$$p"; echo "$$p"; else :; fi; \
-       done | \
-       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-       sed 'N;N;N;s,\n, ,g' | \
-       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-           if ($$2 == $$4) files[d] = files[d] " " $$1; \
-           else { print "f", $$3 "/" $$4, $$1; } } \
-         END { for (d in files) print "f", d, files[d] }' | \
-       while read type dir files; do \
-           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-           test -z "$$files" || { \
-             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-           } \
-       ; done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       files=`for p in $$list; do echo "$$p"; done | \
-         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/' `; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-atobm$(EXEEXT): $(atobm_OBJECTS) $(atobm_DEPENDENCIES) 
-       @rm -f atobm$(EXEEXT)
-       $(AM_V_CCLD)$(atobm_LINK) $(atobm_OBJECTS) $(atobm_LDADD) $(LIBS)
-bitmap$(EXEEXT): $(bitmap_OBJECTS) $(bitmap_DEPENDENCIES) 
-       @rm -f bitmap$(EXEEXT)
-       $(AM_V_CCLD)$(bitmap_LINK) $(bitmap_OBJECTS) $(bitmap_LDADD) $(LIBS)
-bmtoa$(EXEEXT): $(bmtoa_OBJECTS) $(bmtoa_DEPENDENCIES) 
-       @rm -f bmtoa$(EXEEXT)
-       $(AM_V_CCLD)$(bmtoa_LINK) $(bmtoa_OBJECTS) $(bmtoa_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atobm-atobm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-BitEdit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-Bitmap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-CutPaste.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-Dialog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-Graphics.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-Handlers.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap-ReqMach.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmtoa-bmtoa.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-atobm-atobm.o: atobm.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(atobm_CFLAGS) $(CFLAGS) -MT atobm-atobm.o -MD -MP -MF $(DEPDIR)/atobm-atobm.Tpo -c -o atobm-atobm.o `test -f 'atobm.c' || echo '$(srcdir)/'`atobm.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/atobm-atobm.Tpo $(DEPDIR)/atobm-atobm.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atobm.c' object='atobm-atobm.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(atobm_CFLAGS) $(CFLAGS) -c -o atobm-atobm.o `test -f 'atobm.c' || echo '$(srcdir)/'`atobm.c
-
-atobm-atobm.obj: atobm.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(atobm_CFLAGS) $(CFLAGS) -MT atobm-atobm.obj -MD -MP -MF $(DEPDIR)/atobm-atobm.Tpo -c -o atobm-atobm.obj `if test -f 'atobm.c'; then $(CYGPATH_W) 'atobm.c'; else $(CYGPATH_W) '$(srcdir)/atobm.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/atobm-atobm.Tpo $(DEPDIR)/atobm-atobm.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atobm.c' object='atobm-atobm.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(atobm_CFLAGS) $(CFLAGS) -c -o atobm-atobm.obj `if test -f 'atobm.c'; then $(CYGPATH_W) 'atobm.c'; else $(CYGPATH_W) '$(srcdir)/atobm.c'; fi`
-
-bitmap-BitEdit.o: BitEdit.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-BitEdit.o -MD -MP -MF $(DEPDIR)/bitmap-BitEdit.Tpo -c -o bitmap-BitEdit.o `test -f 'BitEdit.c' || echo '$(srcdir)/'`BitEdit.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-BitEdit.Tpo $(DEPDIR)/bitmap-BitEdit.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='BitEdit.c' object='bitmap-BitEdit.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-BitEdit.o `test -f 'BitEdit.c' || echo '$(srcdir)/'`BitEdit.c
-
-bitmap-BitEdit.obj: BitEdit.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-BitEdit.obj -MD -MP -MF $(DEPDIR)/bitmap-BitEdit.Tpo -c -o bitmap-BitEdit.obj `if test -f 'BitEdit.c'; then $(CYGPATH_W) 'BitEdit.c'; else $(CYGPATH_W) '$(srcdir)/BitEdit.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-BitEdit.Tpo $(DEPDIR)/bitmap-BitEdit.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='BitEdit.c' object='bitmap-BitEdit.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-BitEdit.obj `if test -f 'BitEdit.c'; then $(CYGPATH_W) 'BitEdit.c'; else $(CYGPATH_W) '$(srcdir)/BitEdit.c'; fi`
-
-bitmap-CutPaste.o: CutPaste.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-CutPaste.o -MD -MP -MF $(DEPDIR)/bitmap-CutPaste.Tpo -c -o bitmap-CutPaste.o `test -f 'CutPaste.c' || echo '$(srcdir)/'`CutPaste.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-CutPaste.Tpo $(DEPDIR)/bitmap-CutPaste.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='CutPaste.c' object='bitmap-CutPaste.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-CutPaste.o `test -f 'CutPaste.c' || echo '$(srcdir)/'`CutPaste.c
-
-bitmap-CutPaste.obj: CutPaste.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-CutPaste.obj -MD -MP -MF $(DEPDIR)/bitmap-CutPaste.Tpo -c -o bitmap-CutPaste.obj `if test -f 'CutPaste.c'; then $(CYGPATH_W) 'CutPaste.c'; else $(CYGPATH_W) '$(srcdir)/CutPaste.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-CutPaste.Tpo $(DEPDIR)/bitmap-CutPaste.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='CutPaste.c' object='bitmap-CutPaste.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-CutPaste.obj `if test -f 'CutPaste.c'; then $(CYGPATH_W) 'CutPaste.c'; else $(CYGPATH_W) '$(srcdir)/CutPaste.c'; fi`
-
-bitmap-Graphics.o: Graphics.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Graphics.o -MD -MP -MF $(DEPDIR)/bitmap-Graphics.Tpo -c -o bitmap-Graphics.o `test -f 'Graphics.c' || echo '$(srcdir)/'`Graphics.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Graphics.Tpo $(DEPDIR)/bitmap-Graphics.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Graphics.c' object='bitmap-Graphics.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Graphics.o `test -f 'Graphics.c' || echo '$(srcdir)/'`Graphics.c
-
-bitmap-Graphics.obj: Graphics.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Graphics.obj -MD -MP -MF $(DEPDIR)/bitmap-Graphics.Tpo -c -o bitmap-Graphics.obj `if test -f 'Graphics.c'; then $(CYGPATH_W) 'Graphics.c'; else $(CYGPATH_W) '$(srcdir)/Graphics.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Graphics.Tpo $(DEPDIR)/bitmap-Graphics.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Graphics.c' object='bitmap-Graphics.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Graphics.obj `if test -f 'Graphics.c'; then $(CYGPATH_W) 'Graphics.c'; else $(CYGPATH_W) '$(srcdir)/Graphics.c'; fi`
-
-bitmap-ReqMach.o: ReqMach.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-ReqMach.o -MD -MP -MF $(DEPDIR)/bitmap-ReqMach.Tpo -c -o bitmap-ReqMach.o `test -f 'ReqMach.c' || echo '$(srcdir)/'`ReqMach.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-ReqMach.Tpo $(DEPDIR)/bitmap-ReqMach.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ReqMach.c' object='bitmap-ReqMach.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-ReqMach.o `test -f 'ReqMach.c' || echo '$(srcdir)/'`ReqMach.c
-
-bitmap-ReqMach.obj: ReqMach.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-ReqMach.obj -MD -MP -MF $(DEPDIR)/bitmap-ReqMach.Tpo -c -o bitmap-ReqMach.obj `if test -f 'ReqMach.c'; then $(CYGPATH_W) 'ReqMach.c'; else $(CYGPATH_W) '$(srcdir)/ReqMach.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-ReqMach.Tpo $(DEPDIR)/bitmap-ReqMach.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ReqMach.c' object='bitmap-ReqMach.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-ReqMach.obj `if test -f 'ReqMach.c'; then $(CYGPATH_W) 'ReqMach.c'; else $(CYGPATH_W) '$(srcdir)/ReqMach.c'; fi`
-
-bitmap-Bitmap.o: Bitmap.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Bitmap.o -MD -MP -MF $(DEPDIR)/bitmap-Bitmap.Tpo -c -o bitmap-Bitmap.o `test -f 'Bitmap.c' || echo '$(srcdir)/'`Bitmap.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Bitmap.Tpo $(DEPDIR)/bitmap-Bitmap.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Bitmap.c' object='bitmap-Bitmap.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Bitmap.o `test -f 'Bitmap.c' || echo '$(srcdir)/'`Bitmap.c
-
-bitmap-Bitmap.obj: Bitmap.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Bitmap.obj -MD -MP -MF $(DEPDIR)/bitmap-Bitmap.Tpo -c -o bitmap-Bitmap.obj `if test -f 'Bitmap.c'; then $(CYGPATH_W) 'Bitmap.c'; else $(CYGPATH_W) '$(srcdir)/Bitmap.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Bitmap.Tpo $(DEPDIR)/bitmap-Bitmap.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Bitmap.c' object='bitmap-Bitmap.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Bitmap.obj `if test -f 'Bitmap.c'; then $(CYGPATH_W) 'Bitmap.c'; else $(CYGPATH_W) '$(srcdir)/Bitmap.c'; fi`
-
-bitmap-Dialog.o: Dialog.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Dialog.o -MD -MP -MF $(DEPDIR)/bitmap-Dialog.Tpo -c -o bitmap-Dialog.o `test -f 'Dialog.c' || echo '$(srcdir)/'`Dialog.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Dialog.Tpo $(DEPDIR)/bitmap-Dialog.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Dialog.c' object='bitmap-Dialog.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Dialog.o `test -f 'Dialog.c' || echo '$(srcdir)/'`Dialog.c
-
-bitmap-Dialog.obj: Dialog.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Dialog.obj -MD -MP -MF $(DEPDIR)/bitmap-Dialog.Tpo -c -o bitmap-Dialog.obj `if test -f 'Dialog.c'; then $(CYGPATH_W) 'Dialog.c'; else $(CYGPATH_W) '$(srcdir)/Dialog.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Dialog.Tpo $(DEPDIR)/bitmap-Dialog.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Dialog.c' object='bitmap-Dialog.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Dialog.obj `if test -f 'Dialog.c'; then $(CYGPATH_W) 'Dialog.c'; else $(CYGPATH_W) '$(srcdir)/Dialog.c'; fi`
-
-bitmap-Handlers.o: Handlers.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Handlers.o -MD -MP -MF $(DEPDIR)/bitmap-Handlers.Tpo -c -o bitmap-Handlers.o `test -f 'Handlers.c' || echo '$(srcdir)/'`Handlers.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Handlers.Tpo $(DEPDIR)/bitmap-Handlers.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Handlers.c' object='bitmap-Handlers.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Handlers.o `test -f 'Handlers.c' || echo '$(srcdir)/'`Handlers.c
-
-bitmap-Handlers.obj: Handlers.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -MT bitmap-Handlers.obj -MD -MP -MF $(DEPDIR)/bitmap-Handlers.Tpo -c -o bitmap-Handlers.obj `if test -f 'Handlers.c'; then $(CYGPATH_W) 'Handlers.c'; else $(CYGPATH_W) '$(srcdir)/Handlers.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bitmap-Handlers.Tpo $(DEPDIR)/bitmap-Handlers.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Handlers.c' object='bitmap-Handlers.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bitmap_CFLAGS) $(CFLAGS) -c -o bitmap-Handlers.obj `if test -f 'Handlers.c'; then $(CYGPATH_W) 'Handlers.c'; else $(CYGPATH_W) '$(srcdir)/Handlers.c'; fi`
-
-bmtoa-bmtoa.o: bmtoa.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bmtoa_CFLAGS) $(CFLAGS) -MT bmtoa-bmtoa.o -MD -MP -MF $(DEPDIR)/bmtoa-bmtoa.Tpo -c -o bmtoa-bmtoa.o `test -f 'bmtoa.c' || echo '$(srcdir)/'`bmtoa.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bmtoa-bmtoa.Tpo $(DEPDIR)/bmtoa-bmtoa.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='bmtoa.c' object='bmtoa-bmtoa.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bmtoa_CFLAGS) $(CFLAGS) -c -o bmtoa-bmtoa.o `test -f 'bmtoa.c' || echo '$(srcdir)/'`bmtoa.c
-
-bmtoa-bmtoa.obj: bmtoa.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bmtoa_CFLAGS) $(CFLAGS) -MT bmtoa-bmtoa.obj -MD -MP -MF $(DEPDIR)/bmtoa-bmtoa.Tpo -c -o bmtoa-bmtoa.obj `if test -f 'bmtoa.c'; then $(CYGPATH_W) 'bmtoa.c'; else $(CYGPATH_W) '$(srcdir)/bmtoa.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/bmtoa-bmtoa.Tpo $(DEPDIR)/bmtoa-bmtoa.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='bmtoa.c' object='bmtoa-bmtoa.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bmtoa_CFLAGS) $(CFLAGS) -c -o bmtoa-bmtoa.obj `if test -f 'bmtoa.c'; then $(CYGPATH_W) 'bmtoa.c'; else $(CYGPATH_W) '$(srcdir)/bmtoa.c'; fi`
-install-appmanDATA: $(appman_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
-       done
-
-uninstall-appmanDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
-install-dist_appdefaultDATA: $(dist_appdefault_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
-       done
-
-uninstall-dist_appdefaultDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
-install-dist_bitmapDATA: $(dist_bitmap_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(bitmapdir)" || $(MKDIR_P) "$(DESTDIR)$(bitmapdir)"
-       @list='$(dist_bitmap_DATA)'; test -n "$(bitmapdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bitmapdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(bitmapdir)" || exit $$?; \
-       done
-
-uninstall-dist_bitmapDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_bitmap_DATA)'; test -n "$(bitmapdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bitmapdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bitmapdir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       set x; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       shift; \
-       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         if test $$# -gt 0; then \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             "$$@" $$unique; \
-         else \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             $$unique; \
-         fi; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && $(am__cd) $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       $(am__remove_distdir)
-       test -d "$(distdir)" || mkdir "$(distdir)"
-       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       list='$(DISTFILES)'; \
-         dist_files=`for file in $$list; do echo $$file; done | \
-         sed -e "s|^$$srcdirstrip/||;t" \
-             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-       case $$dist_files in \
-         */*) $(MKDIR_P) `echo "$$dist_files" | \
-                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-                          sort -u` ;; \
-       esac; \
-       for file in $$dist_files; do \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         if test -d $$d/$$file; then \
-           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-           if test -d "$(distdir)/$$file"; then \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-         else \
-           test -f "$(distdir)/$$file" \
-           || cp -p $$d/$$file "$(distdir)/$$file" \
-           || exit 1; \
-         fi; \
-       done
-       $(MAKE) $(AM_MAKEFLAGS) \
-         top_distdir="$(top_distdir)" distdir="$(distdir)" \
-         dist-hook
-       -test -n "$(am__skip_mode_fix)" \
-       || find "$(distdir)" -type d ! -perm -755 \
-               -exec chmod u+rwx,go+rx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r "$(distdir)"
-dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-dist-lzma: distdir
-       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-       $(am__remove_distdir)
-
-dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
-       $(am__remove_distdir)
-
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
-
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
-
-dist-zip: distdir
-       -rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
-
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       case '$(DIST_ARCHIVES)' in \
-       *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
-       *.tar.bz2*) \
-         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.lzma*) \
-         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
-       *.tar.xz*) \
-         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
-       *.zip*) \
-         unzip $(distdir).zip ;;\
-       esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
-       chmod a-w $(distdir)
-       test -d $(distdir)/_build || exit 0; \
-       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-           $(DISTCHECK_CONFIGURE_FLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-               distuninstallcheck \
-         && chmod -R a-w "$$dc_install_base" \
-         && ({ \
-              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-             } || { rm -rf "$$dc_destdir"; exit 1; }) \
-         && rm -rf "$$dc_destdir" \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
-         && cd "$$am__cwd" \
-         || exit 1
-       $(am__remove_distdir)
-       @(echo "$(distdir) archives ready for distribution: "; \
-         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-          || { echo "ERROR: files left after uninstall:" ; \
-               if test -n "$(DESTDIR)"; then \
-                 echo "  (check DESTDIR support)"; \
-               fi ; \
-               $(distuninstallcheck_listfiles) ; \
-               exit 1; } >&2
-distcleancheck: distclean
-       @if test '$(srcdir)' = . ; then \
-         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-         exit 1 ; \
-       fi
-       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-         || { echo "ERROR: files left in build directory after distclean:" ; \
-              $(distcleancheck_listfiles) ; \
-              exit 1; } >&2
-check-am: all-am
-check: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(PROGRAMS) $(DATA) config.h
-installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(bitmapdir)"; do \
-         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-       done
-install: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-appmanDATA install-dist_appdefaultDATA \
-       install-dist_bitmapDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
-       uninstall-dist_appdefaultDATA uninstall-dist_bitmapDATA
-
-.MAKE: all check install install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-       clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
-       dist-zip distcheck distclean distclean-compile \
-       distclean-generic distclean-hdr distclean-tags distcleancheck \
-       distdir distuninstallcheck dvi dvi-am html html-am info \
-       info-am install install-am install-appmanDATA \
-       install-binPROGRAMS install-data install-data-am \
-       install-dist_appdefaultDATA install-dist_bitmapDATA \
-       install-dvi install-dvi-am install-exec install-exec-am \
-       install-html install-html-am install-info install-info-am \
-       install-man install-pdf install-pdf-am install-ps \
-       install-ps-am install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
-       ps ps-am tags uninstall uninstall-am uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-dist_appdefaultDATA \
-       uninstall-dist_bitmapDATA
-
-
-.PHONY: ChangeLog
-
-ChangeLog:
-       $(CHANGELOG_CMD)
-
-dist-hook: ChangeLog
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
-
-shadows.DONE:
-       -rm -f $(man_shadows:=.@APP_MAN_SUFFIX@)
-       (for i in $(man_shadows:=.@APP_MAN_SUFFIX@) ; do \
-        echo .so man$(APP_MAN_DIR_SUFFIX)/bitmap.$(APP_MAN_SUFFIX) > $$i; \
-        done)
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/bitmap/NEWS b/bitmap/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/bitmap/ReqMach.c b/bitmap/ReqMach.c
deleted file mode 100644 (file)
index d781b74..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xfuncs.h>
-#include <X11/Xos.h>
-#include "BitmapP.h"
-    
-#include <stdio.h>
-#include <math.h>
-
-
-/*****************************************************************************\
- * Request Machine: stacks up and handles requests from application calls.   * 
-\*****************************************************************************/
-
-/*
- * Searches for a request record of a request specified by its name.
- * Returns a pointer to the record or NULL if the request was not found.
- */
-static BWRequestRec *
-FindRequest(BWRequest name)
-{
-    int i;
-
-    for (i = 0; i < bitmapClassRec.bitmap_class.num_requests; i++)
-       if (!strcmp(name, bitmapClassRec.bitmap_class.requests[i].name))
-           return &bitmapClassRec.bitmap_class.requests[i];
-    
-    return NULL;
-}
-
-/*
- * Adds a request to the request stack and does proper initializations.
- * Returns TRUE if the request was found and FALSE otherwise.
- */
-Boolean 
-BWAddRequest(Widget w, BWRequest name, Boolean trap, 
-            XtPointer call_data, Cardinal call_data_size)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    BWRequestRec *request;
-    
-    request = FindRequest(name);
-    if(request) {
-       if (DEBUG)
-         fprintf(stderr, "Adding... Cardinal: %d\n", BW->bitmap.cardinal + 1);
-
-       BW->bitmap.request_stack = (BWRequestStack *)
-           XtRealloc((char *)BW->bitmap.request_stack,
-                     (++BW->bitmap.cardinal + 1) * sizeof(BWRequestStack));
-       
-       BW->bitmap.request_stack[BW->bitmap.cardinal].request = request;
-       BW->bitmap.request_stack[BW->bitmap.cardinal].status = 
-           XtMalloc(request->status_size);
-       BW->bitmap.request_stack[BW->bitmap.cardinal].trap = trap;
-       BW->bitmap.request_stack[BW->bitmap.cardinal].call_data = 
-           XtMalloc(call_data_size);
-       memmove( BW->bitmap.request_stack[BW->bitmap.cardinal].call_data,
-             call_data, 
-             call_data_size);
-
-       return True;
-    }
-    else {
-       XtWarning("bad request name.  BitmapWidget");
-       return False;
-    }
-}
-
-/*
- * Engages the request designated by the current parameter.
- * Returnes TRUE if the request has an engage function and FALSE otherwise.
- */
-static Boolean 
-Engage(BitmapWidget BW, Cardinal current)
-{
-    BW->bitmap.current = current;
-    
-    if (DEBUG)
-       fprintf(stderr, "Request: %s\n", 
-               BW->bitmap.request_stack[current].request->name);
-  
-    if (BW->bitmap.request_stack[current].request->engage) {
-       (*BW->bitmap.request_stack[current].request->engage)
-           ((Widget) BW,
-            BW->bitmap.request_stack[current].status,
-            BW->bitmap.request_stack[current].request->engage_client_data,
-            BW->bitmap.request_stack[current].call_data);
-       return True;
-    }
-    else
-       return False;
-}
-
-/* Boolean BWTerminateRequest();
-   Boolean BWRemoveRequest(); */
-
-/*
- * Scans down the request stack removing all requests untill it finds 
- * one to be trapped.
- */
-static void 
-TrappingLoop(BitmapWidget BW)
-{
-
-    if (DEBUG)
-       fprintf(stderr, "Scanning... Current: %d\n", BW->bitmap.current);
-    if ((BW->bitmap.current > 0) 
-       && 
-       (!BW->bitmap.request_stack[BW->bitmap.current--].trap)) {
-       BWRemoveRequest((Widget) BW);
-       TrappingLoop(BW);
-    }
-    else
-       if (BW->bitmap.cardinal > 0) {
-           if (DEBUG)
-               fprintf(stderr, "Trapping... Current: %d\n", BW->bitmap.current+1);
-           if(!Engage(BW, ++BW->bitmap.current))
-               BWTerminateRequest((Widget) BW, True);
-       }
-}
-/*
- * Terimantes the current request and continues with next request if con = TRUE
- * Returnes TRUE if there is any number of requests left on the stack.
- */
-Boolean 
-BWTerminateRequest(Widget w, Boolean cont)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.current > 0) {
-       if (DEBUG)
-           fprintf(stderr, "Terminating... Current: %d\n", BW->bitmap.current);
-       if (BW->bitmap.request_stack[BW->bitmap.current].request->terminate)
-           (*BW->bitmap.request_stack[BW->bitmap.current].request->terminate)
-               (w,
-                BW->bitmap.request_stack[BW->bitmap.current].status,
-                BW->bitmap.request_stack[BW->bitmap.current].request->terminate_client_data);
-       
-       if (cont) {
-           if (BW->bitmap.current == BW->bitmap.cardinal)
-               TrappingLoop(BW);
-           else {
-               if (DEBUG)
-                   fprintf(stderr, "Continuing... Current: %d\n", BW->bitmap.current+1);
-               if (!Engage(BW, ++BW->bitmap.current))
-                   BWTerminateRequest(w, True);
-           }
-       }
-       else
-           BW->bitmap.current = 0;
-    }
-    
-    return BW->bitmap.current;
-}
-
-/*
- * Simple interface to BWTerminateRequest that takes only a widget.
- */
-void 
-BWAbort(Widget w)
-{
-    BWTerminateRequest(w, True);
-}
-
-/*
- * Removes the top request from the request stack. If the request is active
- * it will terminate it.
- * Returns TRUE if the number of requests left on the stack != 0.
- */
-Boolean 
-BWRemoveRequest(Widget w)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BW->bitmap.cardinal > 0) {
-       if (DEBUG)
-           fprintf(stderr, "Removing... Cardinal: %d\n", BW->bitmap.cardinal);
-       if (BW->bitmap.current == BW->bitmap.cardinal)
-           BWTerminateRequest(w, False);
-       
-       if (BW->bitmap.request_stack[BW->bitmap.cardinal].request->remove)
-           (*BW->bitmap.request_stack[BW->bitmap.cardinal].request->remove)
-               (w,
-                BW->bitmap.request_stack[BW->bitmap.cardinal].status,
-                BW->bitmap.request_stack[BW->bitmap.cardinal].request->remove_client_data);
-       
-       XtFree(BW->bitmap.request_stack[BW->bitmap.cardinal].status);
-       XtFree(BW->bitmap.request_stack[BW->bitmap.cardinal].call_data);
-       BW->bitmap.request_stack = (BWRequestStack *)
-           XtRealloc((char *)BW->bitmap.request_stack,
-                     (--BW->bitmap.cardinal + 1) * sizeof(BWRequestStack));
-       
-       return True;
-    }
-    else 
-       return False;
-}
-
-void 
-BWRemoveAllRequests(Widget w)
-{
-    while (BWRemoveRequest(w)) {/* removes all requests from the stack */}
-}
-
-/*
- * Adds the request to the stack and performs engaging ritual.
- * Returns TRUE if the request was found, FALSE otherwise.
- */
-Boolean 
-BWEngageRequest(Widget w, BWRequest name, Boolean trap, 
-               XtPointer call_data, Cardinal call_data_size)
-{
-    BitmapWidget BW = (BitmapWidget) w;
-    
-    if (BWAddRequest(w, name, trap, call_data, call_data_size)) {
-       BWTerminateRequest(w, False);
-       if (DEBUG)
-           fprintf(stderr, "Engaging... Cardinal: %d\n", BW->bitmap.cardinal);
-       if (!Engage(BW, BW->bitmap.cardinal))
-           BWTerminateRequest(w, True);
-       
-       return True;
-    }
-    else
-       return False;
-}
-
-/************************* End of the Request Machine ************************/
diff --git a/bitmap/Requests.h b/bitmap/Requests.h
deleted file mode 100644 (file)
index c4457e2..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * Author:  Davor Matic, MIT X Consortium
- */
-
-#ifndef _Requests_h
-#define _Requests_h
-
-typedef int (*DrawOnePointProc)(Widget, Position, Position, int);
-typedef int (*DrawTwoPointProc)(Widget, Position, Position,
-                               Position, Position, int);
-typedef int (*InterfaceProc)(Widget);
-
-typedef struct {
-    Boolean  success;
-    Position at_x, at_y;
-    Position from_x, from_y,
-             to_x, to_y;
-    XtPointer draw;
-    int      value;
-    Time     btime;
-    int      state;
-} BWStatus;
-
-extern void OnePointEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
-extern void OnePointTerminate ( Widget w, BWStatus *status, XtPointer draw );
-extern void OnePointTerminateTransparent ( Widget w, BWStatus *status, XtPointer draw );
-extern void DragOnePointEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
-extern void DragOnePointTerminate ( Widget w, BWStatus *status, XtPointer client_data );
-extern void TwoPointsEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
-extern void TwoPointsTerminate ( Widget w, BWStatus *status, XtPointer draw );
-extern void TwoPointsTerminateTransparent ( Widget w, BWStatus *status, XtPointer draw );
-extern void TwoPointsTerminateTimed ( Widget w, BWStatus *status, XtPointer draw );
-extern void DragTwoPointsEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
-extern void DragTwoPointsTerminate ( Widget w, BWStatus *status, XtPointer draw );
-extern void Interface ( Widget w, BWStatus *status, XtPointer action );
-extern void Paste ( Widget w, Position at_x, Position at_y, int value );
-
-extern void BWDragMarked(Widget w, Position at_x, Position at_y);
-extern void BWDragStored(Widget w, Position at_x, Position at_y);
-extern void BWCopy(Widget w, Position at_x, Position at_y, int value);
-extern void BWMove(Widget w, Position at_x, Position at_y, int value);
-extern void BWRestore(Widget w, Position at_x, Position at_y, int value);
-extern void BWDrawPoint(Widget w, Position x, Position y, bit value);
-extern void BWBlindLine(Widget w, Position from_x, Position from_y, 
-                       Position to_x, Position to_y, int value);
-extern void BWDrawHotSpot(Widget w, Position x, Position y, int value);
-extern void BWZoomIn(Widget w, Position from_x, Position from_y, 
-                    Position to_x, Position to_y);
-
-extern void OnePointHandler(Widget w, XtPointer client_data, 
-                           XEvent *event, Boolean *cont);
-extern void TwoPointsHandler(Widget w, XtPointer client_data, 
-                            XEvent *event, Boolean *cont);
-extern void DragTwoPointsHandler(Widget w, XtPointer client_data, 
-                                XEvent *event, Boolean *cont);
-
-#endif /* _Requests_h */
diff --git a/bitmap/Right b/bitmap/Right
deleted file mode 100644 (file)
index d751a5f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define Right_width 30
-#define Right_height 30
-static char Right_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00,
-   0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x1d, 0x00, 0x00, 0x80, 0x3b, 0x00,
-   0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0xdc, 0x01,
-   0xff, 0xff, 0xbf, 0x03, 0xfe, 0xff, 0x5f, 0x07, 0xac, 0xaa, 0xaa, 0x0e,
-   0x58, 0x55, 0x55, 0x1d, 0xac, 0xaa, 0xaa, 0x0e, 0xfe, 0xff, 0x5f, 0x07,
-   0xff, 0xff, 0xbf, 0x03, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0xee, 0x00,
-   0x00, 0x00, 0x77, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0x80, 0x1d, 0x00,
-   0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/RotateLeft b/bitmap/RotateLeft
deleted file mode 100644 (file)
index c4d4b14..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define RotateLeft_width 30
-#define RotateLeft_height 30
-static char RotateLeft_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00,
-   0x00, 0x6e, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00,
-   0xc0, 0x1d, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0x70, 0xff, 0x0f, 0x00,
-   0xb8, 0xfe, 0x1f, 0x00, 0x5c, 0x55, 0x35, 0x00, 0xae, 0xaa, 0x6a, 0x00,
-   0x5c, 0x55, 0xd5, 0x00, 0xb8, 0xfe, 0xff, 0x01, 0x70, 0xff, 0xff, 0x03,
-   0xe0, 0x0e, 0x58, 0x03, 0xc0, 0x1d, 0xb8, 0x03, 0x80, 0x3b, 0x58, 0x03,
-   0x00, 0x77, 0xb8, 0x03, 0x00, 0x6e, 0x58, 0x03, 0x00, 0x7c, 0xb8, 0x03,
-   0x00, 0x78, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03,
-   0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x18, 0x03,
-   0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/RotateRight b/bitmap/RotateRight
deleted file mode 100644 (file)
index d54f3c7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#define RotateRight_width 30
-#define RotateRight_height 30
-static char RotateRight_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00,
-   0x00, 0x80, 0x1d, 0x00, 0x00, 0x80, 0x3b, 0x00, 0x00, 0x00, 0x77, 0x00,
-   0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0xfc, 0xbf, 0x03,
-   0x00, 0xfe, 0x5f, 0x07, 0x00, 0xab, 0xaa, 0x0e, 0x80, 0x55, 0x55, 0x1d,
-   0xc0, 0xaa, 0xaa, 0x0e, 0xe0, 0xff, 0x5f, 0x07, 0xf0, 0xff, 0xbf, 0x03,
-   0xb0, 0x06, 0xdc, 0x01, 0x70, 0x07, 0xee, 0x00, 0xb0, 0x06, 0x77, 0x00,
-   0x70, 0x87, 0x3b, 0x00, 0xb0, 0x86, 0x1d, 0x00, 0x70, 0x87, 0x0f, 0x00,
-   0xb0, 0x86, 0x07, 0x00, 0x70, 0x07, 0x00, 0x00, 0xb0, 0x06, 0x00, 0x00,
-   0xf0, 0x07, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00,
-   0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/Stipple b/bitmap/Stipple
deleted file mode 100644 (file)
index d412e65..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#define Stipple_width 2
-#define Stipple_height 2
-static char Stipple_bits[] = {
-   0x01, 0x00};
diff --git a/bitmap/Term b/bitmap/Term
deleted file mode 100644 (file)
index 19ec399..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#define Term_width 32
-#define Term_height 32
-static char Term_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x04, 0x00, 0x00, 0x20,
-   0xe4, 0xff, 0xff, 0x27, 0x14, 0x00, 0x00, 0x28, 0x14, 0x80, 0x01, 0x28,
-   0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x01, 0x28,
-   0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x01, 0x28, 0x14, 0x80, 0x00, 0x28,
-   0x14, 0x80, 0x00, 0x28, 0x14, 0x80, 0x00, 0x28, 0x14, 0x80, 0x00, 0x28,
-   0x14, 0x00, 0x00, 0x28, 0x14, 0x80, 0x00, 0x28, 0x14, 0x00, 0x00, 0x28,
-   0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xf8, 0xff, 0xff, 0x1f,
-   0xfe, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x40,
-   0x02, 0x00, 0xc0, 0x5f, 0x02, 0x00, 0x00, 0x40, 0xfa, 0xff, 0xff, 0x5f,
-   0xae, 0xaa, 0xaa, 0x6a, 0x56, 0x55, 0x55, 0x55, 0xab, 0xaa, 0xaa, 0xea,
-   0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/Up b/bitmap/Up
deleted file mode 100644 (file)
index 423103f..0000000
--- a/bitmap/Up
+++ /dev/null
@@ -1,13 +0,0 @@
-#define Up_width 30
-#define Up_height 30
-static char Up_bits[] = {
-   0x00, 0x40, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00,
-   0x00, 0xb8, 0x03, 0x00, 0x00, 0x5c, 0x07, 0x00, 0x00, 0xae, 0x0e, 0x00,
-   0x00, 0x57, 0x1d, 0x00, 0x80, 0xab, 0x3a, 0x00, 0xc0, 0x5d, 0x77, 0x00,
-   0xe0, 0xbe, 0xef, 0x00, 0x70, 0x5f, 0xdf, 0x01, 0xb0, 0xbb, 0xbb, 0x01,
-   0xf0, 0x59, 0xf3, 0x01, 0xf0, 0xb8, 0xe3, 0x01, 0x00, 0x58, 0x03, 0x00,
-   0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00,
-   0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00,
-   0x00, 0xb8, 0x03, 0x00, 0x00, 0x58, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00,
-   0x00, 0x58, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xb8, 0x03, 0x00,
-   0x00, 0x18, 0x03, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/bitmap/app-defaults/Bitmap b/bitmap/app-defaults/Bitmap
deleted file mode 100644 (file)
index f9cc220..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-! The App-defaults file for Bitmap.
-
-*TransientShell.allowShellResize:      True
-*shapeStyle:                           oval
-*cursor:                               left_ptr
-*pane.orientation:                     horizontal
-
-*Form*top:                             ChainTop
-*Form*bottom:                          ChainTop
-*Form*left:                            ChainLeft
-*Form*right:                           ChainLeft
-
-*MenuButton.leftBitmap:                        menu12
-*form*width:                           120
-*form*height:                          15
-
-*baseTranslations:#override\
-                       Ctrl<Key>c:     do-quit()\n\
-                       <Key>q:         do-quit()\n\
-                       Ctrl<Key>n:     do-new()\n\
-                       Ctrl<Key>f:     do-load()\n\
-                       Ctrl<Key>i:     do-insert()\n\
-                       Ctrl<Key>s:     do-save()\n\
-                       Ctrl<Key>w:     do-save-as()\n\
-                       Ctrl<Key>r:     do-resize()\n\
-                       Ctrl<Key>x:     do-rescale()\n\
-                       Ctrl<Key>e:     do-filename()\n\
-                       Ctrl<Key>b:     do-basename()\n\
-                       Meta<Key>i:     switch-image()\n\
-                       Meta<Key>g:     switch-grid()\n\
-                       Meta<Key>d:     switch-dashed()\n\
-                       Meta<Key>a:     switch-axes()\n\
-                       Meta<Key>s:     switch-stippled()\n\
-                       Meta<Key>p:     switch-proportional()\n\
-                       Meta<Key>z:     switch-zoom()\n\
-                       Meta<Key>c:     do-cut()\n\
-                       Meta<Key>w:     do-copy()\n\
-                       Meta<Key>y:     do-paste()
-
-
-*Toggle.translations:  <EnterWindow>:          highlight(WhenUnset)\n\
-                       <LeaveWindow>:          unhighlight()\n\
-                       <Btn1Down>,<Btn1Up>:    set() notify()
-
-*MenuButton.translations:<EnterWindow>:                highlight()\n\
-                       <LeaveWindow>:          reset()\n\
-                       Any<BtnDown>:           reset() fix-menu() PopupMenu()
-
-*Dialog*baseTranslations:#override\
-                       <Key>Return:    set-dialog-button(okay, yes, retry)\n\
-                       Ctrl<Key>g:     set-dialog-button(cancel, abort)
-*image*baseTranslations:#override\
-                       <Btn1Down>,<Btn1Up>:    switch-image()
-*image*width: 0
-*image*height: 0
-*image*Label.internalWidth: 0
-*image*Label.internalHeight: 0
-*image*normalImage.foreground: white
-*image*normalImage.background: black
-*image*invertedImage.foreground: black
-*image*invertedImage.background: white
-
-*bitmap.cursor:                        tcross
-*bitmap.dashes:                                Dashes
-*bitmap.stipple:                       Stipple
-*bitmap.stippled:                      on
-
-*TransientShell.width:                 300
-
-*input*icon:                           Term
-*qsave*icon:                           Term
-*error*icon:                           Excl
-*Dialog.yes.label:                     Yes
-*Dialog.no.label:                      No
-*Dialog.okay.label:                    OK
-*Dialog.abort.label:                   Abort
-*Dialog.cancel.label:                  Cancel
-*Dialog.retry.label:                   Retry
-
-*MenuButton.width:                     58
-
-*SimpleMenu.width:                     0
-*SimpleMenu.height:                    0
-*SimpleMenu.cursor:                    hand2
-*SimpleMenu.line.height:               0
-
-*fileButton.label:                     File
-*fileButton.menuName:                  fileMenu
-
-*editButton.label:                     Edit
-*editButton.fromHoriz:                         fileButton
-*editButton.menuName:                  editMenu
-
-*formy.status*top:                     ChainTop
-*formy.status*bottom:                  ChainTop
-*formy.status*left:                    ChainLeft
-*formy.status*right:                   ChainRight
-*status.fromHoriz:                     editButton
-*status.borderWidth:                   0
-
-*SmeBSB.HorizontalMargins:             32
-
-*fileMenu.new.label:                   New (Ctrl-N)...
-*fileMenu.load.label:                  Load (Ctrl-F)...   
-*fileMenu.insert.label:                        Insert (Ctrl-I)... 
-*fileMenu.save.label:                  Save (Ctrl-S)
-*fileMenu.saveAs.label:                        Save As (Ctrl-W)...
-*fileMenu.resize.label:                        Resize (Ctrl-R)... 
-*fileMenu.rescale.label:               Rescale (Ctrl-X)...
-*fileMenu.filename.label:              Filename (Ctrl-E)...
-*fileMenu.basename.label:              Basename (Ctrl-B)...
-*fileMenu.quit.label:                  Quit (Ctrl-C, Q)
-
-*editMenu.image.label:                 Image (Meta-I)
-*editMenu.grid.label:                  Grid (Meta-G)
-*editMenu.dashed.label:                        Dashed (Meta-D)
-*editMenu.axes.label:                  Axes (Meta-A)
-*editMenu.stippled.label:              Stippled (Meta-S)
-*editMenu.proportional.label:          Proportional (Meta-P)
-*editMenu.zoom.label:                  Zoom (Meta-Z)
-*editMenu.cut.label:                   Cut (Meta-C)
-*editMenu.copy.label:                  Copy (Meta-W)
-*editMenu.paste.label:                 Paste (Meta-Y, Ctrl-mb)
-
-*form.clear.label:                     Clear
-*form.set.fromVert:                    clear
-*form.set.label:                       Set
-*form.invert.fromVert:                         set
-*form.invert.label:                    Invert
-
-*form.mark.vertDistance:               10
-*form.mark.fromVert:                   invert
-*form.mark.label:                      Mark
-*form.unmark.fromVert:                 mark
-*form.unmark.label:                    Unmark
-
-*form.copy.vertDistance:               10
-*form.copy.fromVert:                   unmark
-*form.copy.radioGroup:                 mark
-*form.copy.label:                      Copy
-*form.move.fromVert:                   copy
-*form.move.radioGroup:                 copy
-*form.move.label:                      Move
-
-*form.flipHoriz.vertDistance:          10
-*form.flipHoriz.width:                 36
-*form.flipHoriz.height:                        36
-*form.flipHoriz.fromVert:              move
-*form.flipHoriz.bitmap:                        FlipHoriz
-*form.up.vertDistance:                 10
-*form.up.width:                                36
-*form.up.height:                       36
-*form.up.fromVert:                     move
-*form.up.fromHoriz:                    flipHoriz
-*form.up.bitmap:                       Up
-*form.flipVert.vertDistance:           10
-*form.flipVert.width:                  36
-*form.flipVert.height:                 36
-*form.flipVert.fromVert:               move
-*form.flipVert.fromHoriz:              up
-*form.flipVert.bitmap:                 FlipVert
-*form.left.width:                      36
-*form.left.height:                     36
-*form.left.fromVert:                   flipHoriz
-*form.left.bitmap:                     Left
-*form.fold.width:                      36
-*form.fold.height:                     36
-*form.fold.fromVert:                   up
-*form.fold.fromHoriz:                  left
-*form.fold.bitmap:                     Fold
-*form.right.width:                     36
-*form.right.height:                    36
-*form.right.fromVert:                  flipVert
-*form.right.fromHoriz:                         fold
-*form.right.bitmap:                    Right
-*form.rotateLeft.width:                        36
-*form.rotateLeft.height:               36
-*form.rotateLeft.fromVert:             left
-*form.rotateLeft.bitmap:               RotateLeft
-*form.down.width:                      36
-*form.down.height:                     36
-*form.down.fromVert:                   fold
-*form.down.fromHoriz:                  rotateLeft
-*form.down.bitmap:                     Down
-*form.rotateRight.width:               36
-*form.rotateRight.height:              36
-*form.rotateRight.fromVert:            right
-*form.rotateRight.fromHoriz:           down
-*form.rotateRight.bitmap:              RotateRight
-
-*form.point.vertDistance:              10
-*form.point.fromVert:                  rotateLeft
-*form.point.radioGroup:                move
-*form.point.label:                     Point
-*form.curve.fromVert:                  point
-*form.curve.radioGroup:                point
-*form.curve.label:                     Curve
-*form.line.fromVert:                   curve
-*form.line.radioGroup:                         curve
-*form.line.label:                      Line
-*form.rectangle.fromVert:              line
-*form.rectangle.radioGroup:            line
-*form.rectangle.label:                 Rectangle
-*form.filledRectangle.fromVert:        rectangle
-*form.filledRectangle.radioGroup:      rectangle
-*form.filledRectangle.label:           Filled Rectangle
-*form.circle.fromVert:                         filledRectangle
-*form.circle.radioGroup:               filledRectangle
-*form.circle.label:                    Circle
-*form.filledCircle.fromVert:           circle
-*form.filledCircle.radioGroup:         circle
-*form.filledCircle.label:              Filled Circle
-*form.floodFill.fromVert:              filledCircle
-*form.floodFill.radioGroup:            filledCircle
-*form.floodFill.label:                 Flood Fill
-
-*form.setHotSpot.vertDistance:         10
-*form.setHotSpot.fromVert:             floodFill
-*form.setHotSpot.radioGroup:           floodFill
-*form.setHotSpot.label:                        Set Hot Spot
-*form.clearHotSpot.fromVert:           setHotSpot
-*form.clearHotSpot.label:              Clear Hot Spot
-
-*form.undo.vertDistance:               10
-*form.undo.fromVert:                   clearHotSpot
-*form.undo.label:                      Undo
-
-
diff --git a/bitmap/app-defaults/Bitmap-color b/bitmap/app-defaults/Bitmap-color
deleted file mode 100644 (file)
index 7a7a025..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-! The App-defaults file for Bitmap on a color screen.
-
-#include "Bitmap"
-
-*background: medium blue
-*foreground: cyan
-*borderColor: plum
-*frame: deep sky blue
-*highlight: magenta
-*Command.background: purple
-*Toggle.background: purple
-*MenuButton.background: purple
-*Command.foreground: white
-*Toggle.foreground: white
-*MenuButton.foreground: white
-*status.foreground: green
-*Dialog.icon.foreground: pale green
-*bitmap.stippled: off
diff --git a/bitmap/app-defaults/Bitmap-nocase b/bitmap/app-defaults/Bitmap-nocase
deleted file mode 100644 (file)
index 4b35387..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-!
-!
-! The App-defaults file for Bitmap for use on file systems
-! that are not case sensitive.
-
-*TransientShell.allowShellResize:      True
-*shapeStyle:                           oval
-*cursor:                               left_ptr
-*pane.orientation:                     horizontal
-
-*Form*top:                             ChainTop
-*Form*bottom:                          ChainTop
-*Form*left:                            ChainLeft
-*Form*right:                           ChainLeft
-
-*MenuButton.leftBitmap:                        menu12
-*form*width:                           120
-*form*height:                          15
-
-*baseTranslations:#override\
-                       Ctrl<Key>c:     do-quit()\n\
-                       <Key>q:         do-quit()\n\
-                       Ctrl<Key>n:     do-new()\n\
-                       Ctrl<Key>f:     do-load()\n\
-                       Ctrl<Key>i:     do-insert()\n\
-                       Ctrl<Key>s:     do-save()\n\
-                       Ctrl<Key>w:     do-save-as()\n\
-                       Ctrl<Key>r:     do-resize()\n\
-                       Ctrl<Key>x:     do-rescale()\n\
-                       Ctrl<Key>e:     do-filename()\n\
-                       Ctrl<Key>b:     do-basename()\n\
-                       Meta<Key>i:     switch-image()\n\
-                       Meta<Key>g:     switch-grid()\n\
-                       Meta<Key>d:     switch-dashed()\n\
-                       Meta<Key>a:     switch-axes()\n\
-                       Meta<Key>s:     switch-stippled()\n\
-                       Meta<Key>p:     switch-proportional()\n\
-                       Meta<Key>z:     switch-zoom()\n\
-                       Meta<Key>c:     do-cut()\n\
-                       Meta<Key>w:     do-copy()\n\
-                       Meta<Key>y:     do-paste()
-
-
-*Toggle.translations:  <EnterWindow>:          highlight(WhenUnset)\n\
-                       <LeaveWindow>:          unhighlight()\n\
-                       <Btn1Down>,<Btn1Up>:    set() notify()
-
-*MenuButton.translations:<EnterWindow>:                highlight()\n\
-                       <LeaveWindow>:          reset()\n\
-                       Any<BtnDown>:           reset() fix-menu() PopupMenu()
-
-*Dialog*baseTranslations:#override\
-                       <Key>Return:    set-dialog-button(okay, yes, retry)\n\
-                       Ctrl<Key>g:     set-dialog-button(cancel, abort)
-*image*baseTranslations:#override\
-                       <Btn1Down>,<Btn1Up>:    switch-image()
-*image*width: 0
-*image*height: 0
-*image*Label.internalWidth: 0
-*image*Label.internalHeight: 0
-*image*normalImage.foreground: white
-*image*normalImage.background: black
-*image*invertedImage.foreground: black
-*image*invertedImage.background: white
-
-*bitmap.cursor:                        tcross
-*bitmap.dashes:                                Dashes
-*bitmap.stipple:                       Stippler
-*bitmap.stippled:                      on
-
-*TransientShell.width:                 300
-
-*input*icon:                           Term
-*qsave*icon:                           Term
-*error*icon:                           Excl
-*Dialog.yes.label:                     Yes
-*Dialog.no.label:                      No
-*Dialog.okay.label:                    OK
-*Dialog.abort.label:                   Abort
-*Dialog.cancel.label:                  Cancel
-*Dialog.retry.label:                   Retry
-
-*MenuButton.width:                     58
-
-*SimpleMenu.width:                     0
-*SimpleMenu.height:                    0
-*SimpleMenu.cursor:                    hand2
-*SimpleMenu.line.height:               0
-
-*fileButton.label:                     File
-*fileButton.menuName:                  fileMenu
-
-*editButton.label:                     Edit
-*editButton.fromHoriz:                         fileButton
-*editButton.menuName:                  editMenu
-
-*formy.status*top:                     ChainTop
-*formy.status*bottom:                  ChainTop
-*formy.status*left:                    ChainLeft
-*formy.status*right:                   ChainRight
-*status.fromHoriz:                     editButton
-*status.borderWidth:                   0
-
-*SmeBSB.HorizontalMargins:             32
-
-*fileMenu.new.label:                   New (Ctrl-N)...
-*fileMenu.load.label:                  Load (Ctrl-F)...   
-*fileMenu.insert.label:                        Insert (Ctrl-I)... 
-*fileMenu.save.label:                  Save (Ctrl-S)
-*fileMenu.saveAs.label:                        Save As (Ctrl-W)...
-*fileMenu.resize.label:                        Resize (Ctrl-R)... 
-*fileMenu.rescale.label:               Rescale (Ctrl-X)...
-*fileMenu.filename.label:              Filename (Ctrl-E)...
-*fileMenu.basename.label:              Basename (Ctrl-B)...
-*fileMenu.quit.label:                  Quit (Ctrl-C, Q)
-
-*editMenu.image.label:                 Image (Meta-I)
-*editMenu.grid.label:                  Grid (Meta-G)
-*editMenu.dashed.label:                        Dashed (Meta-D)
-*editMenu.axes.label:                  Axes (Meta-A)
-*editMenu.stippled.label:              Stippled (Meta-S)
-*editMenu.proportional.label:          Proportional (Meta-P)
-*editMenu.zoom.label:                  Zoom (Meta-Z)
-*editMenu.cut.label:                   Cut (Meta-C)
-*editMenu.copy.label:                  Copy (Meta-W)
-*editMenu.paste.label:                 Paste (Meta-Y, Ctrl-mb)
-
-*form.clear.label:                     Clear
-*form.set.fromVert:                    clear
-*form.set.label:                       Set
-*form.invert.fromVert:                         set
-*form.invert.label:                    Invert
-
-*form.mark.vertDistance:               10
-*form.mark.fromVert:                   invert
-*form.mark.label:                      Mark
-*form.unmark.fromVert:                 mark
-*form.unmark.label:                    Unmark
-
-*form.copy.vertDistance:               10
-*form.copy.fromVert:                   unmark
-*form.copy.radioGroup:                 mark
-*form.copy.label:                      Copy
-*form.move.fromVert:                   copy
-*form.move.radioGroup:                 copy
-*form.move.label:                      Move
-
-*form.flipHoriz.vertDistance:          10
-*form.flipHoriz.width:                 36
-*form.flipHoriz.height:                        36
-*form.flipHoriz.fromVert:              move
-*form.flipHoriz.bitmap:                        FlipHoriz
-*form.up.vertDistance:                 10
-*form.up.width:                                36
-*form.up.height:                       36
-*form.up.fromVert:                     move
-*form.up.fromHoriz:                    flipHoriz
-*form.up.bitmap:                       Up
-*form.flipVert.vertDistance:           10
-*form.flipVert.width:                  36
-*form.flipVert.height:                 36
-*form.flipVert.fromVert:               move
-*form.flipVert.fromHoriz:              up
-*form.flipVert.bitmap:                 FlipVert
-*form.left.width:                      36
-*form.left.height:                     36
-*form.left.fromVert:                   flipHoriz
-*form.left.bitmap:                     Left
-*form.fold.width:                      36
-*form.fold.height:                     36
-*form.fold.fromVert:                   up
-*form.fold.fromHoriz:                  left
-*form.fold.bitmap:                     Fold
-*form.right.width:                     36
-*form.right.height:                    36
-*form.right.fromVert:                  flipVert
-*form.right.fromHoriz:                         fold
-*form.right.bitmap:                    Right
-*form.rotateLeft.width:                        36
-*form.rotateLeft.height:               36
-*form.rotateLeft.fromVert:             left
-*form.rotateLeft.bitmap:               RotateLeft
-*form.down.width:                      36
-*form.down.height:                     36
-*form.down.fromVert:                   fold
-*form.down.fromHoriz:                  rotateLeft
-*form.down.bitmap:                     Down
-*form.rotateRight.width:               36
-*form.rotateRight.height:              36
-*form.rotateRight.fromVert:            right
-*form.rotateRight.fromHoriz:           down
-*form.rotateRight.bitmap:              RotateRight
-
-*form.point.vertDistance:              10
-*form.point.fromVert:                  rotateLeft
-*form.point.radioGroup:                move
-*form.point.label:                     Point
-*form.curve.fromVert:                  point
-*form.curve.radioGroup:                point
-*form.curve.label:                     Curve
-*form.line.fromVert:                   curve
-*form.line.radioGroup:                         curve
-*form.line.label:                      Line
-*form.rectangle.fromVert:              line
-*form.rectangle.radioGroup:            line
-*form.rectangle.label:                 Rectangle
-*form.filledRectangle.fromVert:        rectangle
-*form.filledRectangle.radioGroup:      rectangle
-*form.filledRectangle.label:           Filled Rectangle
-*form.circle.fromVert:                         filledRectangle
-*form.circle.radioGroup:               filledRectangle
-*form.circle.label:                    Circle
-*form.filledCircle.fromVert:           circle
-*form.filledCircle.radioGroup:         circle
-*form.filledCircle.label:              Filled Circle
-*form.floodFill.fromVert:              filledCircle
-*form.floodFill.radioGroup:            filledCircle
-*form.floodFill.label:                 Flood Fill
-
-*form.setHotSpot.vertDistance:         10
-*form.setHotSpot.fromVert:             floodFill
-*form.setHotSpot.radioGroup:           floodFill
-*form.setHotSpot.label:                        Set Hot Spot
-*form.clearHotSpot.fromVert:           setHotSpot
-*form.clearHotSpot.label:              Clear Hot Spot
-
-*form.undo.vertDistance:               10
-*form.undo.fromVert:                   clearHotSpot
-*form.undo.label:                      Undo
-
-
diff --git a/bitmap/atobm.c b/bitmap/atobm.c
deleted file mode 100644 (file)
index ec41944..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
-
-Copyright 1988, 1993, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * atobm - ascii to bitmap filter
- * Author:  Jim Fulton, MIT X Consortium
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <X11/Xos.h>
-#include <stdlib.h>
-
-static char *ProgramName;
-
-static void doit(FILE *fp, char *filename, char *chars, 
-                int xhot, int yhot, char *name);
-
-static void 
-usage (void)
-{
-    fprintf (stderr, "usage:  %s [-options ...] [filename]\n\n",
-            ProgramName);
-    fprintf (stderr, 
-       "where options include:\n");
-    fprintf (stderr, 
-       "    -chars cc        chars to use for 0 and 1 bits, respectively\n");
-    fprintf (stderr, 
-       "    -name variable   name to use in bitmap file\n");
-    fprintf (stderr, 
-       "    -xhot number     x position of hotspot\n");
-    fprintf (stderr,
-       "    -yhot number     y position of hotspot\n");
-    fprintf (stderr, "\n");
-    exit (1);
-}
-
-
-static char *
-cify_name (char *name)
-{
-    int length = name ? strlen (name) : 0;
-    int i;
-
-    for (i = 0; i < length; i++) {     /* strncpy (result, begin, length); */
-       char c = name[i];
-       if (!((isascii(c) && isalnum(c)) || c == '_')) name[i] = '_';
-    }
-    return name;
-}
-
-static char *
-StripName(char *name)
-{
-  char *begin = strrchr(name, '/');
-  char *end, *result;
-  int length;
-
-  begin = (begin ? begin+1 : name);
-  end = strchr(begin, '.');    /* change to strrchr to allow longer names */
-  length = (end ? (end - begin) : strlen (begin));
-  result = (char *) malloc (length + 1);
-  strncpy (result, begin, length);
-  result [length] = '\0';
-  return (result);
-}
-
-int
-main (int argc, char *argv[])
-{
-    int i;
-    int xhot = -1, yhot = -1;
-    char *filename = NULL;
-    char *chars = "-#";
-    char *name = NULL;
-    FILE *fp;
-
-    ProgramName = argv[0];
-
-    for (i = 1; i < argc; i++) {
-       char *arg = argv[i];
-
-       if (arg[0] == '-') {
-           switch (arg[1]) {
-             case '\0':
-               filename = NULL;
-               continue;
-             case 'c':
-               if (++i >= argc) usage ();
-               chars = argv[i];
-               continue;
-             case 'n':
-               if (++i >= argc) usage ();
-               name = argv[i];
-               continue;
-             case 'x':
-               if (++i >= argc) usage ();
-               xhot = atoi (argv[i]);
-               continue;
-             case 'y':
-               if (++i >= argc) usage ();
-               yhot = atoi (argv[i]);
-               continue;
-             default:
-               usage ();
-           }
-       } else {
-           filename = arg;
-       }
-    }
-
-    if (strlen (chars) != 2) {
-       fprintf (stderr,
-        "%s:  bad character list \"%s\", must have exactly 2 characters\n",
-                ProgramName, chars);
-       exit (1);
-    }
-
-    if (filename) {
-       fp = fopen (filename, "r");
-       if (!fp) {
-           fprintf (stderr, "%s:  unable to open file \"%s\".\n",
-                    ProgramName, filename);
-           exit (1);
-       }
-    } else {
-       fp = stdin;
-    }
-
-    if (!name) name = filename ? StripName (filename) : "";
-    cify_name (name);
-    doit (fp, filename, chars, xhot, yhot, name);
-
-    if (filename) (void) fclose (fp);
-    exit (0);
-}
-
-
-static void
-doit (FILE *fp, 
-      char *filename, 
-      char *chars, 
-      int xhot, int yhot, 
-      char *name)
-{
-    int i, j;
-    int last_character;
-    char buf[BUFSIZ];
-    char *cp, *newline;
-    int width = 0, height = 0;
-    int len;
-    int removespace = (((isascii(chars[0]) && isspace(chars[0])) ||
-                       (isascii(chars[1]) && isspace(chars[1]))) ? 0 : 1);
-    int lineno = 0;
-    int bytes_per_scanline = 0;
-    struct _scan_list {
-       int allocated;
-       int used;
-       unsigned char *scanlines;
-       struct _scan_list *next;
-    } *head = NULL, *slist = NULL;
-    static unsigned char masktable[] = {
-       0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
-    int padded = 0;
-       
-#define NTOALLOC 16
-#define NewSList() \
-           slist = (struct _scan_list *) calloc (1, sizeof *slist); \
-           if (!slist) { \
-               fprintf (stderr, "%s:  unable to allocate scan list\n", \
-                        ProgramName); \
-               return; \
-           } \
-           slist->allocated = NTOALLOC * bytes_per_scanline; \
-           slist->scanlines = (unsigned char *) calloc(slist->allocated, 1); \
-           if (!slist->scanlines) { \
-               fprintf (stderr, "%s:  unable to allocate char array\n", \
-                        ProgramName); \
-               return; \
-           } \
-           slist->used = 0; \
-           slist->next = NULL; 
-
-    while (1) {
-       buf[0] = '\0';
-       lineno++;
-       if (fgets (buf, sizeof buf, fp) == NULL) break;
-
-       cp = buf;
-       if (removespace) {
-           for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++) ;
-       }
-       if (*cp == '\n' || !*cp) continue;  /* empty line */
-
-       newline = strchr(cp, '\n');
-       if (!newline) {
-           fprintf (stderr, "%s:  line %d too long.\n",
-                    ProgramName, lineno);
-           return;
-       }
-
-       if (removespace) {
-           for (; --newline > cp && isascii(*newline) && isspace(*newline); );
-           newline++;
-       }
-
-       if (newline == cp + 1) continue;
-
-       *newline = '\0';
-       len = strlen (cp);
-
-       if (width == 0) {
-           width = len;
-           padded = ((width & 7) != 0);
-           bytes_per_scanline = (len + 7) / 8;
-           NewSList ();
-           head = slist;
-       } else if (width != len) {
-           fprintf (stderr,
-                    "%s:  line %d is %d characters wide instead of %d\n",
-                    ProgramName, lineno, len, width);
-           return;
-       }
-
-       if (slist->used + 1 >= slist->allocated) {
-           struct _scan_list *old = slist;
-           NewSList ();
-           old->next = slist;
-       }
-
-       /* okay, parse the line and stick values into the scanline array */
-       for (i = 0; i < width; i++) {
-           int ind = (i & 7);
-           int on = 0;
-
-           if (cp[i] == chars[1]) {
-               on = 1;
-           } else if (cp[i] != chars[0]) {
-               fprintf (stderr, "%s:  bad character '%c' on line %d\n",
-                        ProgramName, cp[i], lineno);
-           }
-
-           if (on) slist->scanlines[slist->used] |= masktable[ind];
-           if (ind == 7) slist->used++;
-       }
-       if (padded) slist->used++;
-       height++;
-    }
-
-    printf ("#define %s_width %d\n", name, width);
-    printf ("#define %s_height %d\n", name, height);
-    if (xhot >= 0) printf ("#define %s_x_hot %d\n", name, xhot);
-    if (yhot >= 0) printf ("#define %s_y_hot %d\n", name, yhot);
-    printf ("\n");
-    printf ("static unsigned char %s_bits[] = {\n", name);
-
-    j = 0;
-    last_character = height * bytes_per_scanline - 1;
-    for (slist = head; slist; slist = slist->next) {
-       for (i = 0; i < slist->used; i++) {
-           printf (" 0x%02x", slist->scanlines[i]);
-           if (j != last_character) putchar (',');
-           if ((j % 12) == 11) putchar ('\n');
-           j++;
-       }
-    }
-    printf (" };\n");
-    return;
-}
diff --git a/bitmap/autogen.sh b/bitmap/autogen.sh
deleted file mode 100755 (executable)
index e81f989..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure --enable-maintainer-mode "$@"
-
diff --git a/bitmap/bitmap.icon b/bitmap/bitmap.icon
deleted file mode 100644 (file)
index 53105c7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#define bitmap_width 32
-#define bitmap_height 32
-static char bitmap_bits[] = {
-   0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0xf8, 0xfd, 0xff, 0xff, 0xfb,
-   0x85, 0x08, 0x23, 0xfa, 0x95, 0x28, 0x23, 0xfa, 0x95, 0x29, 0x67, 0xfa,
-   0xb5, 0x69, 0x67, 0xfa, 0xb5, 0x69, 0x67, 0xfa, 0xb5, 0x69, 0x67, 0xfa,
-   0x85, 0x09, 0x67, 0xfa, 0xfd, 0xff, 0xff, 0xfb, 0x85, 0x18, 0x21, 0xfa,
-   0x95, 0x18, 0x25, 0xfa, 0x95, 0x39, 0x65, 0xfa, 0xb5, 0x39, 0x6d, 0xfa,
-   0xb5, 0x39, 0x6d, 0xfa, 0xb5, 0x39, 0x6d, 0xfa, 0x85, 0x39, 0x61, 0xfa,
-   0xfd, 0xff, 0xff, 0xfb, 0x45, 0x18, 0xf9, 0xfb, 0x45, 0x19, 0xe1, 0xfb,
-   0x4d, 0x39, 0xd3, 0xfb, 0x4d, 0x3b, 0xab, 0xfb, 0x4d, 0x3b, 0x57, 0xfb,
-   0x4d, 0x3b, 0xaf, 0xfa, 0x4d, 0x38, 0x5f, 0xfd, 0xfd, 0xff, 0xbf, 0xfa,
-   0x01, 0x00, 0x40, 0xf5, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, 0xe5,
-   0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff};
diff --git a/bitmap/bitmap.man b/bitmap/bitmap.man
deleted file mode 100644 (file)
index 14a248e..0000000
+++ /dev/null
@@ -1,654 +0,0 @@
-.\" Copyright 1993, 1998  The Open Group
-.\" 
-.\" Permission to use, copy, modify, distribute, and sell this software and its
-.\" documentation for any purpose is hereby granted without fee, provided that
-.\" the above copyright notice appear in all copies and that both that
-.\" copyright notice and this permission notice appear in supporting
-.\" documentation.
-.\" 
-.\" The above copyright notice and this permission notice shall be included
-.\" in all copies or substantial portions of the Software.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-.\" OTHER DEALINGS IN THE SOFTWARE.
-.\" 
-.\" Except as contained in this notice, the name of The Open Group shall
-.\" not be used in advertising or otherwise to promote the sale, use or
-.\" other dealings in this Software without prior written authorization
-.\" from The Open Group.
-.\"
-.\"
-.TH BITMAP 1 __xorgversion__
-.SH NAME
-bitmap, bmtoa, atobm \- bitmap editor and converter utilities for the X Window System
-.SH SYNOPSIS
-.B bitmap
-[
-.I \-options
-\&.\|.\|. ] [
-.I filename
-] [
-.I basename
-]
-.sp
-.B bmtoa
-[
-.B \-chars
-\&.\|.\|. ] [
-.I filename
-]
-.sp
-.B atobm
-[
-.B \-chars
-.I cc
-] [
-.B \-name
-.I variable
-] [
-.B \-xhot
-.I number
-] [
-.B \-yhot
-.I number
-] [
-.I filename
-]
-.SH DESCRIPTION
-The \fIbitmap\fP program is a rudimentary tool for creating or editing
-rectangular images made up of 1's and 0's.  Bitmaps are used in X for
-defining clipping regions, cursor shapes, icon shapes, and tile and
-stipple patterns.
-.PP
-The \fIbmtoa\fP and \fIatobm\fP filters convert \fIbitmap\fP files (FILE
-FORMAT) to and from ASCII strings.  They are most commonly used to 
-quickly print out bitmaps and to generate versions for including in text.
-.SH COMMAND LINE OPTIONS
-\fIBitmap\fP supports the standard X Toolkit command line arguments
-(see \fIX\fP(1)).  The following additional arguments are supported as well.
-.TP 4
-.B \-size\fI WIDTHxHEIGHT\fP
-Specifies size of the grid in squares.
-.TP 4
-.B \-sw\fI dimension\fP
-Specifies the width of squares in pixels.
-.TP 4
-.B \-sh\fI dimension\fP
-Specifies the height of squares in pixels.
-.TP 4
-.B \-gt\fI dimension\fP
-Grid tolerance.  If the square dimensions fall below the specified 
-value, grid will be automatically turned off.
-.TP 4
-.B \-grid, +grid
-Turns on or off the grid lines.
-.TP 4
-.B \-axes, +axes
-Turns on or off the major axes.
-.TP 4
-.B \-dashed, +dashed
-Turns on or off dashing for the frame and grid lines.
-.TP 4
-.B \-stippled, +stippled
-Turns on or off stippling of highlighted squares.
-.TP 4
-.B \-proportional, +proportional
-Turns proportional mode on or off.  If proportional mode is on, 
-square width is equal to square height.  If proportional mode is
-off,\fI bitmap\fP will use the smaller square dimension, if they 
-were initially different.
-.TP 4
-.B \-dashes\fI filename\fP
-Specifies the bitmap to be used as a stipple for dashing.
-.TP 4
-.B \-stipple\fI filename\fP
-Specifies the bitmap to be used as a stipple for highlighting.
-.TP 4
-.B \-hl\fI color\fP
-Specifies the color used for highlighting.
-.TP 4
-.B \-fr\fI color\fP
-Specifies the color used for the frame and grid lines.
-.TP 4
-.B filename
-Specifies the bitmap to be initially loaded into the program.  
-If the file does not exist,\fI bitmap\fP will assume it is a new file.
-.TP 4
-.B basename
-Specifies the basename to be used in the C code output file.  
-If it is different than the basename in the working file,\fI bitmap\fP 
-will change it when saving the file.
-.PP
-\fIBmtoa\fP accepts the following option:
-.TP 4
-.B \-chars \fIcc\fP
-This option specifies the pair of characters to use in the string version
-of the bitmap.  The first character is used for 0 bits and the second character
-is used for 1 bits.  The default is to use dashes (\-) for 0's and sharp signs
-(#) for 1's.
-.PP
-\fIAtobm\fP accepts the following options:
-.TP 4
-.B \-chars \fIcc\fP
-This option specifies the pair of characters to use when converting string
-bitmaps into arrays of numbers.  The first character represents a 0 bit and
-the second character represents a 1 bit.  The default is to use dashes (\-)
-for 0's and sharp signs (#) for 1's.
-.TP 4
-.B \-name \fIvariable\fP
-This option specifies the variable name to be used when writing out the
-bitmap file.  The default is to use the basename of the \fIfilename\fP command
-line argument or leave it blank if the standard input is read.
-.TP 4
-.B \-xhot \fInumber\fP
-This option specifies the X coordinate of the hotspot.  Only positive values
-are allowed.  By default, no hotspot information is included.
-.TP 4
-.B \-yhot \fInumber\fP
-This option specifies the Y coordinate of the hotspot.  Only positive values
-are allowed.  By default, no hotspot information is included.
-.SH USAGE 
-\fIBitmap\fP displays grid in which each square represents a single
-bit in the picture being edited.  Actual size of the bitmap image, as
-it would appear normally and inverted, can be obtained by pressing\fB
-Meta-I\fP key.  You are free to move the image popup out of the way to
-continue editing.  Pressing the left mouse button in the popup window
-or\fB Meta-I\fP again will remove the real size bitmap image.
-.PP
-If the bitmap is to be used for defining a cursor, one of the squares
-in the images may be designated as the hot spot.  This determines
-where the cursor is actually pointing.  For cursors with sharp tips
-(such as arrows or fingers), this is usually at the end of the tip;
-for symmetric cursors (such as crosses or bullseyes), this is usually
-at the center.
-.PP
-Bitmaps are stored as small C code fragments suitable for including in
-applications.  They provide an array of bits as well as symbolic
-constants giving the width, height, and hot spot (if specified) that
-may be used in creating cursors, icons, and tiles.
-.SH EDITING
-To edit a bitmap image simply click on one of the buttons with drawing
-commands (\fBPoint, Curve, Line, Rectangle,\fP etc.) and move the
-pointer into the bitmap grid  window.  Press one of the buttons on your
-mouse and the appropriate action will take place.  You can either set,
-clear or invert the gird squares.  Setting a grid square corresponds
-to setting a bit in the bitmap image to 1.  Clearing a grid square
-corresponds to setting a bit in the bitmap image to 0.  Inverting a
-grid square corresponds to changing a bit in the bitmap image from 0 to
-1 or 1 to 0, depending what its previous state was. The
-default behavior of mouse buttons is as specified below.
-.sp
-.nf
-               MouseButton1            Set
-               MouseButton2            Invert
-               MouseButton3            Clear
-               MouseButton4            Clear
-               MouseButton5            Clear
-.fi
-.sp
-This default behavior can be changed by setting the button function
-resources.  An example is provided below.
-.sp
-.nf
-               bitmap*button1Function: Set
-               bitmap*button2Function: Clear
-               bitmap*button3Function: Invert
-               etc.
-.fi
-.sp
-The button function applies to all drawing commands, including copying,
-moving and pasting, flood filling and setting the hot spot.
-.SH DRAWING COMMANDS
-Here is the list of drawing commands accessible through the
-buttons at the left side of the application's window.  Some commands
-can be aborted by pressing A inside the bitmap window, allowing the
-user to select different guiding points where applicable.
-.TP 4
-.B Clear
-This command clears all bits in the bitmap image.  The grid squares
-will be set to the background color.  Pressing C inside the bitmap
-window has the same effect.
-.TP 4
-.B Set
-This command sets all bits in the bitmap image.  The grid squares 
-will be set to the foreground color.  Pressing S inside the bitmap
-window has the same effect.
-.TP 4
-.B Invert
-This command inverts all bits in the bitmap image.  The grid squares 
-will be inverted appropriately.  Pressing I inside the bitmap window
-has the same effect.
-.TP 4
-.B Mark
-This command is used to mark an area of the grid by dragging out a
-rectangular shape in the highlighting color.  Once the area is marked,
-it can be operated on by a number of commands (see \fBUp, Down, Left,
-Right, Rotate, Flip, Cut,\fP etc.)  Only one marked area can be present
-at any time.  If you attempt to mark another area, the old mark will
-vanish.  The same effect can be achieved by pressing\fB
-Shift-MouseButton1\fP and dragging out a rectangle in the grid window.
-Pressing\fB Shift-MouseButton2\fP will mark the entire grid area.
-.TP 4
-.B Unmark
-This command will cause the marked area to vanish.  The same effect can 
-be achieved by pressing\fB Shift-MouseButton3\fP.
-.TP 4
-.B Copy
-This command is used to copy an area of the grid from one location to
-another.  If there is no marked grid area displayed,\fB Copy\fP
-behaves just like\fB Mark\fP described above.  Once there is a marked
-grid area displayed in the highlighting color, this command has two
-alternative behaviors.  If you click a mouse button inside the marked
-area, you will be able to drag the rectangle that represents the
-marked area to the desired location.  After you release the mouse
-button, the area will be copied.  If you click outside the marked
-area,\fB Copy\fP will assume that you wish to mark a different region of
-the bitmap image, thus it will behave like\fB Mark\fP again.
-.TP 4
-.B Move
-This command is used to move an area of the grid from one location to
-another.  Its behavior resembles the behavior of\fB Copy\fP command,
-except that the marked area will be moved instead of copied.
-.TP 4
-.B Flip Horizontally
-This command will flip the bitmap image with respect to the horizontal axes.
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing H inside the bitmap window has the
-same effect.
-.TP 4
-.B Up
-This command moves the bitmap image one pixel up.
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing UpArrow inside the bitmap window has the
-same effect.
-.TP 4
-.B Flip Vertically
-This command will flip the bitmap image with respect to the vertical axes.
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing V inside the bitmap window has the
-same effect.
-.TP 4
-.B Left
-This command moves the bitmap image one pixel to the left.
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing LeftArrow inside the bitmap window has
-the same effect.
-.TP 4
-.B Fold
-This command will fold the bitmap image so that the opposite corners 
-become adjacent.  This is useful when creating bitmap images for
-tiling.  Pressing F inside the bitmap window has the same effect.
-.TP 4
-.B Right
-This command moves the bitmap image one pixel to the right.
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing RightArrow inside the bitmap window
-has the same effect.
-.TP 4
-.B Rotate Left
-This command rotates the bitmap image 90 degrees to the left (counter 
-clockwise.)
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing L inside the bitmap window has the
-same effect.
-.TP 4
-.B Down
-This command moves the bitmap image one pixel down.
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing DownArrow inside the bitmap window
-has the same effect.
-.TP 4
-.B Rotate Right
-This command rotates the bitmap image 90 degrees to the right (clockwise.)
-If a marked area of the grid is highlighted, it will operate only 
-inside the marked area.  Pressing R inside the bitmap window has the
-same effect.
-.TP 4
-.B Point
-This command will change the grid squares underneath the mouse pointer if
-a mouse button is being pressed down.  If you drag the mouse button 
-continuously, the line may not be continuous, depending on the speed of your
-system and frequency of mouse motion events.
-.TP 4
-.B Curve
-This command will change the grid squares underneath the mouse pointer if
-a mouse button is being pressed down.  If you drag the mouse button 
-continuously, it will make sure that the line is continuous.  If your system
-is slow or\fI bitmap\fP receives very few mouse motion events, it might
-behave quite strangely.
-.TP 4
-.B Line
-This command will change the gird squares in a line between two squares.
-Once you press a mouse button in the grid window,\fI bitmap\fP will 
-highlight the line from the square where the mouse button was initially
-pressed to the square where the mouse pointer is located.  By releasing the
-mouse button you will cause the change to take effect, and the highlighted
-line will disappear.
-.TP 4
-.B Rectangle
-This command will change the gird squares in a rectangle between two squares.
-Once you press a mouse button in the grid window,\fI bitmap\fP will 
-highlight the rectangle from the square where the mouse button was initially
-pressed to the square where the mouse pointer is located.  By releasing the
-mouse button you will cause the change to take effect, and the highlighted
-rectangle will disappear.
-.TP 4
-.B Filled Rectangle
-This command is identical to\fB Rectangle\fP, except at the end the
-rectangle will be filled rather than outlined.
-.TP 4
-.B Circle
-This command will change the gird squares in a circle between two squares.
-Once you press a mouse button in the grid window,\fI bitmap\fP will 
-highlight the circle from the square where the mouse button was initially
-pressed to the square where the mouse pointer is located.  By releasing the
-mouse button you will cause the change to take effect, and the highlighted
-circle will disappear.
-.TP 4
-.B Filled Circle
-This command is identical to\fB Circle\fP, except at the end the
-circle will be filled rather than outlined.
-.TP 4
-.B Flood Fill
-This command will flood fill the connected area underneath the mouse 
-pointer when you click on the desired square.  Diagonally adjacent 
-squares are not considered to be connected.
-.TP 4
-.B Set Hot Spot
-This command designates one square in the grid as the hot spot if this 
-bitmap image is to be used for defining a cursor.  Pressing a mouse button 
-in the desired square will cause a diamond shape to be displayed.
-.TP 4
-.B Clear Hot Spot
-This command removes any designated hot spot from the bitmap image.
-.TP 4
-.B Undo
-This command will undo the last executed command.  It has depth one, 
-that is, pressing\fB Undo\fP after\fB Undo\fP will undo itself.  
-.SH FILE MENU
-The File menu commands can be accessed by pressing the File button and
-selecting the appropriate menu entry, or by pressing Ctrl key with
-another key.  These commands deal with files and global bitmap
-parameters, such as size, basename, filename etc.
-.TP 4
-.B New
-This command will clear the editing area and prompt for the name of
-the new file to be edited.  It will not load in the new file.
-.TP 4
-.B Load
-This command is used to load a new bitmap file into the bitmap editor.
-If the current image has not been saved, user will be asked whether to
-save or ignore the changes.  The editor can edit only one file at a
-time.  If you need interactive editing, run a number of editors and
-use cut and paste mechanism as described below.
-.TP 4
-.B Insert
-This command is used to insert a bitmap file into the image
-being currently edited.  After being prompted for the filename,
-click inside the grid window and drag the outlined rectangle to the
-location where you want to insert the new file.
-.TP 4
-.B Save
-This command will save the bitmap image.  It will not prompt for the
-filename unless it is said to be <none>.  If you leave the filename
-undesignated or \-, the output will be piped to stdout.
-.TP 4
-.B Save As
-This command will save the bitmap image after prompting for a new
-filename.  It should be used if you want to change the filename.
-.TP 4
-.B Resize
-This command is used to resize the editing area to the new number of
-pixels.  The size should be entered in the WIDTHxHEIGHT format.  The
-information in the image being edited will not be lost unless the new
-size is smaller that the current image size. The editor was not
-designed to edit huge files.  
-.TP 4
-.B Rescale
-This command is used to rescale the editing area to the new width and
-height.  The size should be entered in the WIDTHxHEIGHT format.  It will 
-not do antialiasing and information will be lost if you rescale to the
-smaller sizes.  Feel free to add you own algorithms for better rescaling.
-.TP 4
-.B Filename
-This command is used to change the filename without changing the basename
-nor saving the file.  If you specify \- for a filename, the output will 
-be piped to stdout.
-.TP 4
-.B Basename
-This command is used to change the basename, if a different one from
-the specified filename is desired.
-.TP 4
-.B Quit
-\This command will terminate the bitmap application.  If the file was
-not saved, user will be prompted and asked whether to save the image
-or not.  This command is preferred over killing the process.
-.SH EDIT MENU
-The Edit menu commands can be accessed by pressing the Edit button and
-selecting the appropriate menu entry, or by pressing Meta key with
-another key.  These commands deal with editing facilities such as
-grid, axes, zooming, cut and paste, etc.
-.TP 4
-.B Image
-This command will display the image being edited and its inverse in its 
-actual size in a separate window.  The window can be moved away to continue
-with editing.  Pressing the left mouse button in the image window will
-cause it to disappear from the screen.
-.TP 4
-.B Grid
-This command controls the grid in the editing area.  If the grid spacing
-is below the value specified by gridTolerance resource (8 by default), 
-the grid will be automatically turned off.  It can be enforced by explicitly
-activating this command.
-.TP 4
-.B Dashed
-This command controls the stipple for drawing the grid lines.  The stipple
-specified by dashes resource can be turned on or off by activating this 
-command.
-.TP 4
-.B Axes
-This command controls the highlighting of the main axes of the image
-being edited.  The actual lines are not part of the image.  They are
-provided to aid user when constructing symmetrical images, or whenever
-having the main axes highlighted helps your editing.
-.TP 4
-.B Stippled
-This command controls the stippling of the highlighted areas of the
-bitmap image.  The stipple specified by stipple resource can be turned on
-or off by activating this command.
-.TP 4
-.B Proportional
-This command controls the proportional mode.  If the proportional mode 
-is on, width and height of all image squares are forced to be equal,
-regardless of the proportions of the bitmap window.
-.TP 4
-.B Zoom
-This command controls the zoom mode.  If there is a marked area of the 
-image already displayed, bitmap will automatically zoom into it.  Otherwise,
-user will have to highlight an area to be edited in the zoom mode and 
-bitmap will automatically switch into it.  One can use all the editing
-commands and other utilities in the zoom mode.  When you zoom out, undo
-command will undo the whole zoom session.
-.TP 4
-.B Cut
-This commands cuts the contents of the highlighted image area into the
-internal cut and paste buffer.  
-.TP 4
-.B Copy
-This command copies the contents of the highlighted image area into the
-internal cut and paste buffer. 
-.TP 4
-.B Paste
-This command will check if there are any other bitmap applications with
-a highlighted image area, or if there is something in the internal cut
-and paste buffer and copy it to the image.  To place the copied image,
-click in the editing window and drag the outlined image to the position
-where you want to place i, and then release the button.
-.SH CUT AND PASTE
-Bitmap supports two cut and paste mechanisms; the internal cut and
-paste and the global X selection cut and paste.  The internal cut and
-paste is used when executing copy and move drawing commands and also
-cut and copy commands from the edit menu.  The global X selection cut
-and paste is used whenever there is a highlighted area of a bitmap
-image displayed anywhere on the screen.  To copy a part of image from
-another bitmap editor simply highlight the desired area by using the
-Mark command or pressing the shift key and dragging the area with the
-left mouse button.  When the selected area becomes highlighted, any
-other applications (such as xterm, etc.) that use primary selection
-will discard their selection values and unhighlight the appropriate
-information.  Now, use the Paste command for the Edit menu or control
-mouse button to copy the selected part of image into another (or the
-same) bitmap application.  If you attempt to do this without a visible
-highlighted image area, the bitmap will fall back to the internal cut
-and paste buffer and paste whatever was there stored at the moment.
-.SH WIDGETS
-Below is the widget structure of the \fIbitmap\fP
-application.  Indentation indicates hierarchical structure.  The
-widget class name is given first, followed by the widget instance
-name.  All widgets except the bitmap widget are from the standard
-Athena widget set.  
-.sp 
-.nf
-       Bitmap bitmap
-               TransientShell image
-                       Box box
-                               Label normalImage
-                               Label invertedImage
-               TransientShell input
-                       Dialog dialog
-                               Command okay
-                               Command cancel
-               TransientShell error
-                       Dialog dialog
-                               Command abort
-                               Command retry
-               TransientShell qsave
-                       Dialog dialog
-                               Command yes
-                               Command no
-                               Command cancel
-               Paned parent
-                       Form formy
-                               MenuButton fileButton
-                               SimpleMenu fileMenu
-                                       SmeBSB  new
-                                       SmeBSB  load
-                                       SmeBSB  insert
-                                       SmeBSB  save
-                                       SmeBSB  saveAs
-                                       SmeBSB  resize
-                                       SmeBSB  rescale
-                                       SmeBSB  filename
-                                       SmeBSB  basename
-                                       SmeLine line
-                                       SmeBSB  quit
-                               MenuButton editButton
-                               SimpleMenu editMenu
-                                       SmeBSB  image
-                                       SmeBSB  grid
-                                       SmeBSB  dashed
-                                       SmeBSB  axes
-                                       SmeBSB  stippled
-                                       SmeBSB  proportional
-                                       SmeBSB  zoom
-                                       SmeLine line
-                                       SmeBSB  cut
-                                       SmeBSB  copy
-                                       SmeBSB  paste
-                               Label status
-                       Pane pane
-                               Bitmap bitmap
-                               Form form
-                                       Command clear
-                                       Command set
-                                       Command invert
-                                       Toggle  mark
-                                       Command unmark
-                                       Toggle  copy
-                                       Toggle  move
-                                       Command flipHoriz
-                                       Command up
-                                       Command flipVert
-                                       Command left
-                                       Command fold
-                                       Command right
-                                       Command rotateLeft
-                                       Command down
-                                       Command rotateRight
-                                       Toggle  point
-                                       Toggle  curve
-                                       Toggle  line
-                                       Toggle  rectangle
-                                       Toggle  filledRectangle
-                                       Toggle  circle
-                                       Toggle  filledCircle
-                                       Toggle  floodFill
-                                       Toggle  setHotSpot
-                                       Command clearHotSpot
-                                       Command undo
-.fi
-.SH COLORS
-If you would like bitmap to be viewable in color, include the following 
-in the #ifdef COLOR section of the file you read with xrdb:
-.sp 1
-*customization:                 \-color
-.sp 1
-.br
-This will cause bitmap to pick up the colors in the app-defaults color
-customization file:
-.sp 1
-    __apploaddir__/Bitmap-color
-.sp 1
-.fi
-.SH BITMAP WIDGET
-Bitmap widget is a stand-alone widget for editing raster images.  It
-is not designed to edit large images, although it may be used in that
-purpose as well.  It can be freely incorporated with other
-applications and used as a standard editing tool.  The following are
-the resources provided by the bitmap widget.
-.sp 
-.nf
-Bitmap Widget
-
-Header file            Bitmap.h
-Class                  bitmapWidgetClass
-Class Name             Bitmap
-Superclass             Bitmap
-
-
-All the Simple Widget resources plus .\|.\|.
-.ta 1.6i 3.2i 4.8i
-
-Name   Class   Type    Default Value
-
-foreground     Foreground      Pixel   XtDefaultForeground
-highlight      Highlight       Pixel   XtDefaultForeground
-framing        Framing Pixel   XtDefaultForeground
-gridTolerance  GridTolerance   Dimension       8
-size   Size    String  32x32
-dashed Dashed  Boolean True
-grid   Grid    Boolean True
-stippled       Stippled        Boolean True
-proportional   Proportional    Boolean True
-axes   Axes    Boolean False
-squareWidth    SquareWidth     Dimension       16
-squareHeight   SquareHeight    Dimension       16
-margin Margin  Dimension       16
-xHot   XHot    Position        NotSet (\-1)
-yHot   YHot    Position        NotSet (\-1)
-button1Function        Button1Function DrawingFunction Set
-button2Function        Button2Function DrawingFunction Invert
-button3Function        Button3Function DrawingFunction Clear
-button4Function        Button4Function DrawingFunction Invert
-button5Function        Button5Function DrawingFunction Invert
-filename       Filename        String  None ("")
-basename       Basename        String  None ("")
-.fi
-
-.SH AUTHOR
-Davor Matic, MIT X Consortium
diff --git a/bitmap/bmtoa.c b/bitmap/bmtoa.c
deleted file mode 100644 (file)
index bdd2078..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
-
-Copyright 1988, 1993, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-/*
- * bmtoa - bitmap to ascii filter
- * Author:  Jim Fulton, MIT X Consortium
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xos.h>
-
-#include <X11/Xmu/Drawing.h>
-
-#include <stdlib.h>
-#include <unistd.h>
-#ifndef HAS_MKSTEMP
-extern char *mktemp();
-#endif
-
-static char *ProgramName;
-
-static void print_scanline (unsigned int width, unsigned int height, 
-                           unsigned char *data, char *chars);
-
-static void 
-usage (void)
-{
-    fprintf (stderr, "usage:  %s [-options ...] [filename]\n\n",
-            ProgramName);
-    fprintf (stderr, 
-       "where options include:\n");
-    fprintf (stderr,
-       "    -chars cc        chars to use for 0 and 1 bits, respectively\n");
-    fprintf (stderr, "\n");
-    exit (1);
-}
-
-static char *
-copy_stdin (void)
-{
-#ifdef WIN32
-    static char tmpfilename[] = "/temp/bmtoa.XXXXXX";
-#else
-    static char tmpfilename[] = "/tmp/bmtoa.XXXXXX";
-#endif
-    char buf[BUFSIZ];
-    FILE *fp;
-    int nread, nwritten;
-
-#ifndef HAS_MKSTEMP
-    if (mktemp (tmpfilename) == NULL) {
-       fprintf (stderr,
-                "%s:  unable to genererate temporary file name for stdin.\n",
-                ProgramName);
-       exit (1);
-    }
-    fp = fopen (tmpfilename, "w");
-#else
-    int fd;
-
-    if ((fd = mkstemp(tmpfilename)) < 0) {
-       fprintf (stderr,
-                "%s:  unable to genererate temporary file name for stdin.\n",
-                ProgramName);
-       exit (1);
-    }
-    fp = fdopen(fd, "w");
-#endif
-    while (1) {
-       buf[0] = '\0';
-       nread = fread (buf, 1, sizeof buf, stdin);
-       if (nread <= 0) break;
-       nwritten = fwrite (buf, 1, nread, fp);
-       if (nwritten != nread) {
-           fprintf (stderr,
-                    "%s:  error copying stdin to file (%d of %d chars)\n",
-                    ProgramName, nwritten, nread);
-           (void) fclose (fp);
-           (void) unlink (tmpfilename);
-           exit (1);
-       }
-    }
-    (void) fclose (fp);
-    return tmpfilename;
-}
-
-int
-main (int argc, char *argv[]) 
-{
-    char *filename = NULL;
-    int isstdin = 0;
-    char *chars = "-#";
-    int i;
-    unsigned int width, height;
-    unsigned char *data;
-    int x_hot, y_hot;
-    int status;
-
-    ProgramName = argv[0];
-
-    for (i = 1; i < argc; i++) {
-       char *arg = argv[i];
-
-       if (arg[0] == '-') {
-           switch (arg[1]) {
-             case '\0':
-               filename = NULL;
-               continue;
-             case 'c':
-               if (++i >= argc) usage ();
-               chars = argv[i];
-               continue;
-             default:
-               usage ();
-           }
-       } else {
-           filename = arg;
-       }
-    }
-
-    if (strlen (chars) != 2) {
-       fprintf (stderr,
-        "%s:  bad character list \"%s\", must have exactly 2 characters\n",
-                ProgramName, chars);
-       exit (1);
-    }
-
-    if (!filename) {
-       filename = copy_stdin ();
-       isstdin = 1;
-    }
-
-    status = XmuReadBitmapDataFromFile (filename, &width, &height, &data,
-                                       &x_hot, &y_hot);
-    if (isstdin) (void) unlink (filename);  /* don't need it anymore */
-    if (status != BitmapSuccess) {
-       fprintf (stderr, "%s:  unable to read bitmap from file \"%s\"\n",
-                ProgramName, isstdin ? "(stdin)" : filename);
-       exit (1);
-    }
-
-    print_scanline (width, height, data, chars);
-    exit (0);
-}
-
-static void
-print_scanline (unsigned int width, 
-               unsigned int height, 
-               unsigned char *data, 
-               char *chars)
-{
-    char *scanline = (char *) malloc (width + 1);
-    unsigned char *dp = data;
-    int row, column;
-    static unsigned char masktable[] = {
-       0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
-    int padded = ((width & 7) != 0);
-
-    if (!scanline) {
-       fprintf (stderr, "%s:  unable to allocate %d bytes for scanline\n",
-                ProgramName, width + 1);
-       exit (1);
-    }
-
-    for (row = 0; row < height; row++) {
-       for (column = 0; column < width; column++) {
-           int i = (column & 7);
-
-           if (*dp & masktable[i]) {
-               putchar (chars[1]);
-           } else {
-               putchar (chars[0]);
-           }
-
-           if (i == 7) dp++;
-       }
-       putchar ('\n');
-       if (padded) dp++;
-    }
-    return;
-}
-
diff --git a/bitmap/compile b/bitmap/compile
deleted file mode 100755 (executable)
index ec64c62..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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 <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/ico/AUTHORS b/ico/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ico/ChangeLog b/ico/ChangeLog
deleted file mode 100644 (file)
index afc745f..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-commit 11308c41fe4c1bf99a6654fca294f3e098075a33
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Jul 20 16:28:38 2007 -0700
-
-    Version bump: 1.0.2
-
-commit 255c8078a0edfc289e434ba769fd50e05ab72ad2
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Jul 20 16:17:31 2007 -0700
-
-    Fill in COPYING stub with copyright & licenses from source files
-
-commit 5a51d7e1db3694e41d55bc02208f3fa1b736e951
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Jul 20 16:14:34 2007 -0700
-
-    Replace static changelog with dist-hook to generate from git log
-
-commit e7a16eb488b591af57561799525891be5030bf25
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Jul 20 16:10:58 2007 -0700
-
-    Change ico_CFLAGS to AM_CFLAGS to stop automake-1.10 warning
-    
-    Makefile.am:27: compiling `ico.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
-
-commit e3146e963d7bf333d0e01d9d556d6c8be722898d
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Apr 11 15:37:10 2007 -0700
-
-    renamed: .cvsignore -> .gitignore
-
-commit db38b36c535baeda5bdc8a873b32f678e7df8e36
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Apr 11 15:36:16 2007 -0700
-
-    Bug #10616: Man page typo: s/TREMINATION/TERMINATION/
-    
-    X.Org Bugzilla #10616 <https://bugs.freedesktop.org/show_bug.cgi?id=10616>
-    Reported upstream from
-    Debian Bug #395445 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=395445>
-
-commit 366924f71f6e5db3641bc350a07d37f64fe6ea08
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:42 2005 +0000
-
-    Update package version for X11R7 release.
-
-commit 82481ae9b8335ae924b4341d194c4f0ed51f1f03
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:40 2005 +0000
-
-    Stub COPYING files
-
-commit 52ad0990a0f63ef8601c56b3937afba0a511b376
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:02 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit 22bef66811d55607c096b0e015fb91e31c3043c6
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:48:16 2005 +0000
-
-    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-commit f8a8eb25e339b5ae58c0bd6b9068338488d3be22
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:49:16 2005 +0000
-
-    Update package version number for X11R7 RC3 release.
-
-commit 8e79cdd0c53ab420fa3b69003762d2d1ebfa0273
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:37 2005 +0000
-
-    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
-        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
-
-commit 3c4e96626a4fcc4df45bced95c44c5e99e605537
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:34:55 2005 +0000
-
-    Another pass at .cvsignores for apps.
-
-commit 3cb8504ab547357b6b538e1ffbb3000b5cc0b8e7
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:48 2005 +0000
-
-    Add/improve .cvsignore files for apps.
-
-commit 02b2de700f25d3be621d560b3042f7a7a89369e6
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Nov 9 21:09:19 2005 +0000
-
-    Update package version number for X11R7 RC2 release.
-
-commit 703edae088fb7bb409dbdb58d111ed9e4c31cf78
-Author: Kean Johnson <kean@armory.com>
-Date:   Tue Nov 8 06:33:31 2005 +0000
-
-    See ChangeLog entry 2005-11-07 for details.
-
-commit fe9efd5cd0703005da9ceb55f59d376ba0b01226
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:48 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit 7ad280349d00bb52201dc43c21ac097ec97132dc
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:19 2005 +0000
-
-    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
-        work better with BSD make
-
-commit cd8ac3431f4b2c6a8fad1031bf34d894fb6398ae
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:41 2005 +0000
-
-    Use sed to fill in variables in man page
-
-commit a0f44d19aa84965a31303fd39f05631665fd7e37
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Aug 17 19:49:17 2005 +0000
-
-    Get xthreadlib variable from Xlib. Bump to 0.99.1.
-
-commit 19fd5758771d31d13cc483cf80adafa3bf530132
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Aug 13 02:13:30 2005 +0000
-
-    Update for modularization: include <config.h> & <X11/XlibConf.h>, use
-        XTHREADS define from XlibConf.h to enable multithreading Also ansify
-        icoFatal prototype to clear Sun cc warnings.
-
-commit 979aa90d7b94494ce365b9dc3cf724a3f91f8598
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Aug 1 20:25:27 2005 +0000
-
-    Install man pages to section 1 instead of section m (Patch from Donnie
-        Berkholz)
-
-commit 25ac536b836c2772784bd13b543d538a2673fb4c
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:29 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit 5c31a07dbcb735445951f7f7cae8579ee16262d5
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Jul 20 19:31:48 2005 +0000
-
-    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
-        configure cache, you cache it, and the cached value is probably wrong.
-
-commit 9e0555e9d980217dd20d1f7385ff47514675629c
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Tue Jun 28 15:00:13 2005 +0000
-
-    Check in build system for ico
-
-commit 6a904d00db84e235ea2b0073fbcd078f8a96c9c2
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:33 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit caf6767501c8176c02702e441ab422ced4ea5033
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:34:51 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit 81bd81a192d3e6cc4e8ac744d6f9dd844013c3de
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:12:52 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit 0fe04de86a907b549e143b27ff5c16887ec7de2a
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:15 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit dcd8f0f0b566a45609145651ae0c6d2cbed6bfc7
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:23:54 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit 996d4a49a21986ae0a8d3f4f047aa71422727925
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:29:02 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit c3b5b1a77685345b857f858fa3c226ec4a826414
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:57 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 352df17fc71405e7bc36559ee8a72e21d7a5694a
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:57 2003 +0000
-
-    Initial revision
diff --git a/ico/INSTALL b/ico/INSTALL
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ico/NEWS b/ico/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ico/README b/ico/README
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ico/aclocal.m4 b/ico/aclocal.m4
deleted file mode 100644 (file)
index 3b51a56..0000000
+++ /dev/null
@@ -1,1519 +0,0 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
-You have another version of autoconf.  If you want to use that,
-you should regenerate the build system entirely.], [63])])
-
-# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10])dnl
-_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.1.5
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
-]) # XORG_MACROS_VERSION
-
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
-
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
-#
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
-
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([Whether to build pdf documentation])
-
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
-
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
-
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
-
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
-
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
-
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
-#
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
-
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
-
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
-#
-AC_DEFUN([XORG_WITH_LINT],[
-
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
-
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
-
-]) # XORG_WITH_LINT
-
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
-#
-
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
-
-]) # XORG_LINT_LIBRARY
-
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
-
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
-])
-
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-if test $pkg_failed = yes; then
-       $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.])],
-               [$4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
diff --git a/ico/allobjs.h b/ico/allobjs.h
deleted file mode 100644 (file)
index fec24fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "objcube.h"
-#include "objico.h"
-#include "objocta.h"
-#include "objpyr.h"
-#include "objplane.h"
diff --git a/ico/config.guess b/ico/config.guess
deleted file mode 100755 (executable)
index 396482d..0000000
+++ /dev/null
@@ -1,1500 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-07-02'
-
-# This file 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[45])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    i*:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    x86:Interix*:[3456]*)
-       echo i586-pc-interix${UNAME_RELEASE}
-       exit ;;
-    EM64T:Interix*:[3456]*)
-       echo x86_64-unknown-interix${UNAME_RELEASE}
-       exit ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
-       exit ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/ico/config.h.in b/ico/config.h.in
deleted file mode 100644 (file)
index 1ca4092..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Major version of this package */
-#undef PACKAGE_VERSION_MAJOR
-
-/* Minor version of this package */
-#undef PACKAGE_VERSION_MINOR
-
-/* Patch version of this package */
-#undef PACKAGE_VERSION_PATCHLEVEL
-
-/* Version number of package */
-#undef VERSION
diff --git a/ico/config.sub b/ico/config.sub
deleted file mode 100755 (executable)
index fab0aa3..0000000
+++ /dev/null
@@ -1,1616 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-09-20'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
-               os=
-               basic_machine=$1
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64vr | mips64vrel \
-       | mips64orion | mips64orionel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | mt \
-       | msp430 \
-       | nios | nios2 \
-       | ns16k | ns32k \
-       | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-       | pyramid \
-       | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nios-* | nios2-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-       | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tron-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
-       | ymp-* \
-       | z8k-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16c)
-               basic_machine=cr16c-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sde)
-               basic_machine=mipsisa32-sde
-               os=-elf
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-        -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-        -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-               os=-elf
-               ;;
-        spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/ico/configure b/ico/configure
deleted file mode 100755 (executable)
index 8d0fc84..0000000
+++ /dev/null
@@ -1,5207 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for ico 1.0.2.
-#
-# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 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.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-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
-
-
-
-
-# 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-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; }
-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
-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'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-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
-}
-
-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
-  :
-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; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-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_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='ico'
-PACKAGE_TARNAME='ico'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='ico 1.0.2'
-PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
-
-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
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-am__isrc
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-PKG_CONFIG
-ICO_CFLAGS
-ICO_LIBS
-XTHREADLIB
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-APP_MAN_SUFFIX
-LIB_MAN_SUFFIX
-FILE_MAN_SUFFIX
-MISC_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-ADMIN_MAN_SUFFIX
-APP_MAN_DIR
-LIB_MAN_DIR
-FILE_MAN_DIR
-MISC_MAN_DIR
-DRIVER_MAN_DIR
-ADMIN_MAN_DIR
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-PKG_CONFIG
-ICO_CFLAGS
-ICO_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`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 ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`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 ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`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 ;;
-
-  -without-* | --without-*)
-    ac_package=`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 ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --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; }; }
-    ;;
-
-  *=*)
-    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; }; }
-    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
-    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}
-    ;;
-
-  esac
-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; }; }
-fi
-
-# Be sure to have absolute directory names.
-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
-  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; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-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
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-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; }; }
-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; }; }
-
-
-# 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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-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; }; }
-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; }; }
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # 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 ico 1.0.2 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --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
-      --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
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-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/ico]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of ico 1.0.2:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  PKG_CONFIG  path to pkg-config utility
-  ICO_CFLAGS  C compiler flags for ICO, overriding pkg-config
-  ICO_LIBS    linker flags for ICO, overriding pkg-config
-
-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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-_ACEOF
-ac_status=$?
-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
-    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,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`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/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-ico configure 1.0.2
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 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
-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 ico $as_me 1.0.2, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$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; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# 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=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    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;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## 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"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## 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"`;;
-       esac
-       echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## 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"
-  } >&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
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* 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"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
-  set x "$ac_default_prefix/share/config.site" \
-       "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-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;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  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;}
-    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;}
-  >$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,)
-      { 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;}
-      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;}
-      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=:
-      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=$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'" ;;
-    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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-
-
-am__api_version='1.10'
-
-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
-  { { 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; }; }
-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),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  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=.
-  for ac_prog in mkdir gmkdir; do
-        for ac_exec_ext in '' $ac_executable_extensions; do
-          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
-            'mkdir (fileutils) '4.1*)
-              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-              break 3;;
-          esac
-        done
-       done
-done
-IFS=$as_save_IFS
-
-fi
-
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-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_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-  SET_MAKE=
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='ico'
- VERSION='1.0.2'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
-fi
-
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-   if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
-fi
-
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-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
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    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
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  fi
-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
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    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
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-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; }; }
-
-# 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"
-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); }
-{ (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); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-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_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-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_link_default") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-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 )
-       ;;
-    [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;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-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
-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
-
-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
-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"
-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); }; 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
-# `rm'.
-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_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; }
-
-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.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  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; }; }
-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; }
-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
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  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_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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`
-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
-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
-/* end confdefs.h.  */
-
-int
-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
-  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
-/* end confdefs.h.  */
-
-int
-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
-
-       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
-/* end confdefs.h.  */
-
-int
-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
-  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; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-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
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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
-  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
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-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; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}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; } ;;
-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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-depcc="$CC"   am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Checks for pkg-config packages
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; 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_ac_pt_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               PKG_CONFIG=""
-       fi
-
-fi
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for ICO" >&5
-echo $ECHO_N "checking for ICO... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= 0.99.1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "x11 >= 0.99.1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_ICO_CFLAGS=`$PKG_CONFIG --cflags "x11 >= 0.99.1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 >= 0.99.1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "x11 >= 0.99.1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_ICO_LIBS=`$PKG_CONFIG --libs "x11 >= 0.99.1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-else
-       pkg_failed=untried
-fi
-
-if test $pkg_failed = yes; then
-       ICO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 >= 0.99.1"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$ICO_PKG_ERRORS" 1>&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (x11 >= 0.99.1) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the ICO_CFLAGS and ICO_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&5
-echo "$as_me: error: Package requirements (x11 >= 0.99.1) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the ICO_CFLAGS and ICO_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the ICO_CFLAGS and ICO_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the ICO_CFLAGS and ICO_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-       ICO_CFLAGS=$pkg_cv_ICO_CFLAGS
-       ICO_LIBS=$pkg_cv_ICO_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
-fi
-
-
-XTHREADLIB=`$PKG_CONFIG --variable=xthreadlib x11`
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
-
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
-
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
-
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    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;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (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 \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     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
-    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
-  else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-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"`
-  # 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'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-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
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## 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
-  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
-
-
-
-
-# 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-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; }
-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
-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'`
-
-# 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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&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 ico $as_me 1.0.2, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      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
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-ico config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2006 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'
-MKDIR_P='$MKDIR_P'
-_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.
-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=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$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; }; };;
-  --help | --hel | -h )
-    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; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-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
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
-  *) { { 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; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); 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"
-}  ||
-{
-  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.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-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
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-am__isrc!$am__isrc$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$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
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-ICO_CFLAGS!$ICO_CFLAGS$ac_delim
-ICO_LIBS!$ICO_LIBS$ac_delim
-XTHREADLIB!$XTHREADLIB$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
-LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim
-FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim
-MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim
-DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim
-ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim
-APP_MAN_DIR!$APP_MAN_DIR$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-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
-_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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim
-FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim
-MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim
-DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim
-ADMIN_MAN_DIR!$ADMIN_MAN_DIR$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-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-2.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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-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; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$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 `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) 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; }; };;
-      esac
-      ac_file_inputs="$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."
-    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;}
-    fi
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$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" |
-    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" || { { 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; }; }; }
-  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,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`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/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# 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/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $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;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  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' ;;
-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
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
-
-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;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
- ;;
-  :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;}
-    else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
-    fi
-  else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
-  fi
-  rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $ac_file | $ac_file:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$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'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  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" |
-    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" || { { 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; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  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; }
-fi
-
diff --git a/ico/depcomp b/ico/depcomp
deleted file mode 100755 (executable)
index ca5ea4e..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2006-10-15.18
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
-
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
-  depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
-  DEPDIR      directory where to store dependencies.
-  depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
-  libtool     Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "depcomp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
-  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-## Unfortunately, FreeBSD c89 acceptance of flags depends upon
-## the command line argument order; so add the flags where they
-## appear in depend2.am.  Note that the slowdown incurred here
-## affects only configure: in makefiles, %FASTDEP% shortcuts this.
-  for arg
-  do
-    case $arg in
-    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
-    *)  set fnord "$@" "$arg" ;;
-    esac
-    shift # fnord
-    shift # $arg
-  done
-  "$@"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
-  # start of each line; $object doesn't have directory information.
-  # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-  stat=$?
-
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
-  # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp2)
-  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
-  # compilers, which have integrated preprocessors.  The correct option
-  # to use with these is +Maked; it writes dependencies to a file named
-  # 'foo.d', which lands next to the object file, wherever that
-  # happens to be.
-  # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-  if test "$libtool" = yes; then
-    tmpdepfile1=$dir$base.d
-    tmpdepfile2=$dir.libs/$base.d
-    "$@" -Wc,+Maked
-  else
-    tmpdepfile1=$dir$base.d
-    tmpdepfile2=$dir$base.d
-    "$@" +Maked
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-     rm -f "$tmpdepfile1" "$tmpdepfile2"
-     exit $stat
-  fi
-
-  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
-  do
-    test -f "$tmpdepfile" && break
-  done
-  if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
-    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
-  else
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile" "$tmpdepfile2"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
-  # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
-  "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # Remove any Libtool call
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    # Strip any option that makedepend may not understand.  Remove
-    # the object too, otherwise makedepend will parse it as a source file.
-    -*|$object)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
-    *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/ico/ico.c b/ico/ico.c
deleted file mode 100644 (file)
index 8b93b10..0000000
--- a/ico/ico.c
+++ /dev/null
@@ -1,1330 +0,0 @@
-/* $XConsortium: ico.c,v 1.47 94/04/17 20:45:15 gildea Exp $ */
-/* $XdotOrg: $ */
-/***********************************************************
-
-Copyright (c) 1987  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-/* $XFree86: xc/programs/ico/ico.c,v 1.9tsi Exp $ */
-
-/******************************************************************************
- * Description
- *     Display a wire-frame rotating icosahedron, with hidden lines removed
- *
- * Arguments:
- *     -r              display on root window instead of creating a new one
- * (plus a host of others, try -help)
- *****************************************************************************/
-/* Additions by jimmc@sci:
- *  faces and colors
- *  double buffering on the display
- *  additional polyhedra
- *  sleep switch
- */
-
-/*
- * multi-thread version by Stephen Gildea, January 1992
- */
-
-/* Additions by Carlos A M dos Santos, XFree86 project, September 1999:
- *  use of "q" to quit threads
- *  support for ICCCM delete window message
- *  better thread support - mutex and condition to control termination
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-
-#include <X11/XlibConf.h>
-#ifdef XTHREADS
-# define MULTITHREAD
-#endif
-#endif /* HAVE_CONFIG_H / autoconf */
-
-#include <math.h>
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-#include <X11/Xfuncs.h>
-#include <X11/keysym.h>
-#include <stdio.h>
-#ifdef MULTIBUFFER
-#include <X11/extensions/multibuf.h>
-#endif /* MULTIBUFFER */
-#ifdef MULTITHREAD
-#include <X11/Xthreads.h>
-#endif
-#include <X11/Xos.h>
-
-#define MIN_ICO_WIDTH 5
-#define MIN_ICO_HEIGHT 5
-#define DEFAULT_ICO_WIDTH 150
-#define DEFAULT_ICO_HEIGHT 150
-#define DEFAULT_DELTAX 13
-#define DEFAULT_DELTAY 9
-
-#include "polyinfo.h"  /* define format of one polyhedron */
-
-/* Now include all the files which define the actual polyhedra */
-Polyinfo polygons[] = {
-#include "allobjs.h"
-};
-#define NumberPolygons sizeof(polygons)/sizeof(polygons[0])
-
-#include <stdlib.h>
-#include <time.h>      /* for time_t */
-#include <sys/time.h>  /* for struct timeval */
-
-typedef double Transform3D[4][4];
-
-typedef struct {
-       int prevX, prevY;
-       unsigned long *plane_masks;     /* points into dbpair.plane_masks */
-       unsigned long enplanemask;      /* what we enable for drawing */
-       XColor *colors;         /* size = 2 ** totalplanes */
-       unsigned long *pixels;  /* size = 2 ** planesperbuf */
-} DBufInfo;
-
-/* variables that need to be per-thread */
-
-struct closure {
-    /* these elements were originally in DBufPair, a struct type */
-    int planesperbuf;
-    int pixelsperbuf;  /* = 1<<planesperbuf */
-    int totalplanes;   /* = 2*planesperbuf */
-    int totalpixels;   /* = 1<<totalplanes */
-    unsigned long *plane_masks;        /* size = totalplanes */
-    unsigned long pixels[1];
-    int dbufnum;
-    DBufInfo bufs[2];
-    DBufInfo *drawbuf, *dpybuf;
-    /* end of old DBufPair dbpair */
-    /* these elements were originally global variables */
-    Window win, draw_window;
-    int winW, winH;
-    Colormap cmap;
-    GC gcontext;
-#ifdef MULTIBUFFER
-    Multibuffer multibuffers[2];
-#endif /* MULTIBUFFER */
-    int nplanesets;
-    /* items needed by drawPoly */
-    char drawn[MAXNV][MAXNV];
-    Transform3D xform;
-    Point3D xv[2][MAXNV];
-    int xv_buffer;
-    double wo2, ho2;
-#ifdef MULTITHREAD           
-    int thread_num;
-#endif
-};
-
-
-/* The display is shared and writable, but Xlib locks it as necessary */
-
-Display *dpy;
-
-/* This atom will be used to catch the ICCCM "delete window" message. It will
- * be allocated once and used in read-only mode by threads, so it can be a
- * global variable */
-
-Atom wm_delete_window;
-
-/*
- * variables that are not set except maybe in initialization before
- * any additional threads are created
- */
-
-char *Primaries[] = {
-    "red", "green", "blue", "yellow", "cyan", "magenta"
-};
-#define NumberPrimaries 6
-
-const char *help_message[] = {
-"where options include:",
-"-display host:dpy           X server to use",
-"    -geometry geom          geometry of window to use",
-"    -size WxH               size of object to rotate",
-"    -delta +X+Y             amount by which to move object",
-"    -r                      draw in the root window",
-"    -d number               dashed line pattern for wire frames",
-"    -bg color               background color",
-"    -colors color ...       codes to use on sides",
-"    -p#                     use # (1 through 8) primary colors",
-#ifdef MULTIBUFFER           
-"    -dbl                    use double buffering (extension if present)",
-#else                        
-"    -dbl                    use double buffering (software only)",
-#endif                       
-"    -softdbl                use software double buffering",
-"    -noedges                don't draw wire frame edges",
-"    -faces                  draw faces",
-"    -copy                   use multibuffer update action Copied",
-"    -untouched              use multibuffer update action Untouched",
-"    -undefined              use multibuffer update action Undefined",
-"    -lw number              line width to use",
-"    -i                      invert",
-"    -sleep number           seconds to sleep in between draws",
-"    -obj objname            type of polyhedral object to draw",
-"    -objhelp                list polyhedral objects available",
-#ifdef MULTITHREAD           
-"    -threads number         number of windows, each its own thread",
-#endif
-NULL};
-
-const char *ProgramName;       /* argv[0] */
-
-/*
- * variables set by command-line options
- */
-const char *geom = NULL;       /* -geometry: window geometry */
-int useRoot = 0;               /* -r */
-int dash = 0;                  /* -d: dashed line pattern */
-char **colornames;             /* -colors (points into argv) */
-#ifdef MULTIBUFFER
-int update_action = MultibufferUpdateActionBackground;
-#endif
-int linewidth = 0;             /* -lw */
-int multibufext = 0;           /* -dbl: use Multi-Buffering extension */
-int dblbuf = 0;                        /* -dbl or -softdbl: double buffering */
-int numcolors = 0;             /* -p: number of primary colors to use */
-const char *background_colorname = NULL; /* -bg */
-int doedges = 1;               /* -noedges turns this off */
-int dofaces = 0;               /* -faces */
-int invert = 0;                        /* -i */
-const char *ico_geom = NULL;   /* -size: size of object in window */
-const char *delta_geom = NULL; /* -delta: amount by which to move object */
-Polyinfo *poly;                        /* -obj: the poly to draw */
-int dsync = 0;                 /* -dsync */
-int xsync = 0;                 /* -sync */
-int msleepcount = 0;           /* -sleep value in milliseconds*/
-#ifdef MULTITHREAD
-int thread_count;
-#ifdef XMUTEX_INITIALIZER
-xmutex_rec count_mutex = XMUTEX_INITIALIZER;
-#else
-xmutex_rec count_mutex;
-#endif
-xcondition_rec count_cond;     /* Xthreads doesn't define an equivalent to
-                                * PTHREAD_COND_INITIALIZER, so we must call
-                                * xcondition_init later */
-#endif
-
-/******************************************************************************
- * Description
- *     Error handling
- *****************************************************************************/
-
-#if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
-void icoFatal (const char *fmt, const char *a0) __attribute__((__noreturn__));
-#endif
-void
-icoFatal(const char *fmt, const char *a0)
-{
-       fprintf(stderr, "%s: ", ProgramName);
-       fprintf(stderr, fmt, a0);
-       fprintf(stderr, "\n");
-       exit(1);
-}
-
-
-/******************************************************************************
- * Description
- *     Memory allocation
- *****************************************************************************/
-
-static char *
-xalloc(unsigned int nbytes)
-{
-        char *p;
-
-       p = malloc(nbytes);
-       if (p)
-               return p;
-
-       fprintf(stderr, "%s: no more memory\n", ProgramName);
-       exit(1);
-}
-
-
-/******************************************************************************
- * Description
- *     Sleep a certain number of milliseconds
- *****************************************************************************/
-
-static void
-msleep(unsigned int msecs)
-{
-       struct timeval timeout;
-
-       timeout.tv_sec = msecs / 1000; timeout.tv_usec = (msecs % 1000) * 1000;
-       select(1,NULL,NULL,NULL,&timeout);
-}
-
-
-/******************************************************************************
- * Description
- *     Format a 4x4 identity matrix.
- *
- * Output
- *     *m              Formatted identity matrix
- *****************************************************************************/
-
-static void
-IdentMat(Transform3D m)
-{
-       int i;
-       int j;
-
-       for (i = 3; i >= 0; --i) {
-               for (j = 3; j >= 0; --j)
-                       m[i][j] = 0.0;
-               m[i][i] = 1.0;
-       }
-}
-
-
-/******************************************************************************
- * Description
- *     Concatenate two 4-by-4 transformation matrices.
- *
- * Input
- *     l               multiplicand (left operand)
- *     r               multiplier (right operand)
- *
- * Output
- *     *m              Result matrix
- *****************************************************************************/
-
-static void
-ConcatMat(Transform3D l, Transform3D r, Transform3D m)
-{
-       int i;
-       int j;
-
-       for (i = 0; i < 4; ++i)
-               for (j = 0; j < 4; ++j)
-                       m[i][j] = l[i][0] * r[0][j]
-                           + l[i][1] * r[1][j]
-                           + l[i][2] * r[2][j]
-                           + l[i][3] * r[3][j];
-}
-
-
-/******************************************************************************
- * Description
- *     Format a matrix that will perform a rotation transformation
- *     about the specified axis.  The rotation angle is measured
- *     counterclockwise about the specified axis when looking
- *     at the origin from the positive axis.
- *
- * Input
- *     axis            Axis ('x', 'y', 'z') about which to perform rotation
- *     angle           Angle (in radians) of rotation
- *     A               Pointer to rotation matrix
- *
- * Output
- *     *m              Formatted rotation matrix
- *****************************************************************************/
-
-static void
-FormatRotateMat(char axis, double angle, Transform3D m)
-{
-       double s, c;
-
-       IdentMat(m);
-
-       s = sin(angle);
-       c = cos(angle);
-
-       switch (axis)
-       {
-               case 'x':
-                       m[1][1] = m[2][2] = c;
-                       m[1][2] = s;
-                       m[2][1] = -s;
-                       break;
-               case 'y':
-                       m[0][0] = m[2][2] = c;
-                       m[2][0] = s;
-                       m[0][2] = -s;
-                       break;
-               case 'z':
-                       m[0][0] = m[1][1] = c;
-                       m[0][1] = s;
-                       m[1][0] = -s;
-                       break;
-       }
-}
-
-
-/******************************************************************************
- * Description
- *     Perform a partial transform on non-homogeneous points.
- *     Given an array of non-homogeneous (3-coordinate) input points,
- *     this routine multiplies them by the 3-by-3 upper left submatrix
- *     of a standard 4-by-4 transform matrix.  The resulting non-homogeneous
- *     points are returned.
- *
- * Input
- *     n               number of points to transform
- *     m               4-by-4 transform matrix
- *     in              array of non-homogeneous input points
- *
- * Output
- *     *out            array of transformed non-homogeneous output points
- *****************************************************************************/
-
-static void
-PartialNonHomTransform(int n, Transform3D m, const Point3D *in, Point3D *out)
-{
-       for (; n > 0; --n, ++in, ++out) {
-               out->x = in->x * m[0][0] + in->y * m[1][0] + in->z * m[2][0];
-               out->y = in->x * m[0][1] + in->y * m[1][1] + in->z * m[2][1];
-               out->z = in->x * m[0][2] + in->y * m[1][2] + in->z * m[2][2];
-       }
-}
-
-
-/*
- * Unfortunately we can not use XWindowEvent and XCheckWindowEvent to get
- * ClientMessage events, because there is no corresponding event mask. We must
- * use XIfEvent and XCheckIfEvent and this function as a predicate. Better if
- * Xlib had some kind of XWindowAnyEvent and XCheckWindowEvent. -- Casantos.
- */
-
-static Bool
-predicate(Display *display, XEvent *event, XPointer args)
-{
-    Window w = (Window) args;
-    return event->xany.window == w;
-}
-
-/******************************************************************************
- * Description
- *     Icosahedron animator.
- *****************************************************************************/
-
-static void
-icoClearArea(struct closure *closure, int x, int y, int w, int h)
-{
-       if (multibufext && dblbuf)
-               return;
-
-       if (dblbuf || dofaces) {
-               XSetForeground(dpy,
-                       closure->gcontext,
-                       closure->drawbuf->pixels[0]);
-
-               /* use background as foreground color for fill */
-               XFillRectangle(dpy,closure->win,closure->gcontext,x,y,w,h);
-       } else {
-               XClearArea(dpy,closure->win,x,y,w,h,0);
-       }
-}
-
-/* Set up points, transforms, etc.  */
-
-static void
-initPoly(struct closure *closure, Polyinfo *poly, int icoW, int icoH)
-{
-    Point3D *vertices = poly->v;
-    int NV = poly->numverts;
-    Transform3D r1;
-    Transform3D r2;
-
-    FormatRotateMat('x', 5 * 3.1416 / 180.0, r1);
-    FormatRotateMat('y', 5 * 3.1416 / 180.0, r2);
-    ConcatMat(r1, r2, closure->xform);
-
-    memcpy((char *)closure->xv[0], (char *)vertices, NV * sizeof(Point3D));
-    closure->xv_buffer = 0;
-
-    closure->wo2 = icoW / 2.0;
-    closure->ho2 = icoH / 2.0;
-}
-
-static void
-setDrawBuf (struct closure *closure, int n)
-{
-    XGCValues xgcv;
-    unsigned long mask;
-
-#ifdef MULTIBUFFER
-    if (multibufext && dblbuf) {
-       closure->win = closure->multibuffers[n];
-       n = 0;
-    }
-#endif /* MULTIBUFFER */
-
-    closure->drawbuf = closure->bufs+n;
-    xgcv.foreground = closure->drawbuf->pixels[closure->pixelsperbuf-1];
-    xgcv.background = closure->drawbuf->pixels[0];
-    mask = GCForeground | GCBackground;
-    if (dblbuf && !multibufext) {
-       xgcv.plane_mask = closure->drawbuf->enplanemask;
-       mask |= GCPlaneMask;
-    }
-    XChangeGC(dpy, closure->gcontext, mask, &xgcv);
-}
-
-static void
-setDisplayBuf(struct closure *closure, int n, int firsttime)
-{
-#ifdef MULTIBUFFER
-       if (multibufext && dblbuf) {
-               XmbufDisplayBuffers (dpy, 1, &closure->multibuffers[n], msleepcount, 0);
-               if (!firsttime)
-                       return;
-               n = 0;
-       }
-#endif
-       closure->dpybuf = closure->bufs+n;
-       if (closure->totalpixels > 2)
-           XStoreColors(dpy,closure->cmap,closure->dpybuf->colors,closure->totalpixels);
-}
-
-static void
-setBufColor(struct closure *closure, int n, XColor *color)
-{
-       int i,j,cx;
-       DBufInfo *b;
-       unsigned long pix;
-
-       for (i=0; i<closure->nplanesets; i++) {
-               b = closure->bufs+i;
-               for (j=0; j<(dblbuf&&!multibufext?closure->pixelsperbuf:1); j++) {
-                       cx = n + j*closure->pixelsperbuf;
-                       pix = b->colors[cx].pixel;
-                       b->colors[cx] = *color;
-                       b->colors[cx].pixel = pix;
-                       b->colors[cx].flags = DoRed | DoGreen | DoBlue;
-               }
-       }
-}
-
-/******************************************************************************
- * Description
- *     Undraw previous polyhedron (by erasing its bounding box).
- *     Rotate and draw the new polyhedron.
- *
- * Input
- *     poly            the polyhedron to draw
- *     gc              X11 graphics context to be used for drawing
- *     icoX, icoY      position of upper left of bounding-box
- *     icoW, icoH      size of bounding-box
- *     prevX, prevY    position of previous bounding-box
- *****************************************************************************/
-
-static void
-drawPoly(struct closure *closure, Polyinfo *poly, GC gc,
-        int icoX, int icoY, int icoW, int icoH, int prevX, int prevY)
-{
-       int *f = poly->f;
-       int NV = poly->numverts;
-       int NF = poly->numfaces;
-
-       int p0;
-       int p1;
-       XPoint *pv2;
-       XSegment *pe;
-       Point3D *pxv;
-       XPoint v2[MAXNV];
-       XSegment edges[MAXEDGES];
-       int i;
-       int j,k;
-       int *pf;
-       int facecolor;
-
-       int pcount;
-       double pxvz;
-       XPoint ppts[MAXEDGESPERPOLY];
-
-       /* Switch double-buffer and rotate vertices */
-
-       closure->xv_buffer = !closure->xv_buffer;
-       PartialNonHomTransform(NV, closure->xform,
-               closure->xv[!closure->xv_buffer],
-               closure->xv[closure->xv_buffer]);
-
-
-       /* Convert 3D coordinates to 2D window coordinates: */
-
-       pxv = closure->xv[closure->xv_buffer];
-       pv2 = v2;
-       for (i = NV - 1; i >= 0; --i) {
-               pv2->x = (int) ((pxv->x + 1.0) * closure->wo2) + icoX;
-               pv2->y = (int) ((pxv->y + 1.0) * closure->ho2) + icoY;
-               ++pxv;
-               ++pv2;
-       }
-
-
-       /* Accumulate edges to be drawn, eliminating duplicates for speed: */
-
-       pxv = closure->xv[closure->xv_buffer];
-       pv2 = v2;
-       pf = f;
-       pe = edges;
-       bzero(closure->drawn, sizeof(closure->drawn));
-
-       if (dblbuf)
-               setDrawBuf(closure, closure->dbufnum);
-                       /* switch drawing buffers if double buffered */
-       /* for faces, need to clear before FillPoly */
-       if (dofaces && !(multibufext && dblbuf)) {
-               /* multibuf uses update background */
-               if (dblbuf)
-                       icoClearArea(closure,
-                               closure->drawbuf->prevX - linewidth/2,
-                               closure->drawbuf->prevY - linewidth/2,
-                               icoW + linewidth + 1, icoH + linewidth + 1);
-               icoClearArea(closure,
-                       prevX - linewidth/2, prevY - linewidth/2,
-                       icoW + linewidth + 1, icoH + linewidth + 1);
-       }
-
-       if (dsync)
-               XSync(dpy, 0);
-
-       for (i = NF - 1; i >= 0; --i, pf += pcount) {
-
-               pcount = *pf++; /* number of edges for this face */
-               pxvz = 0.0;
-               for (j=0; j<pcount; j++) {
-                       p0 = pf[j];
-                       pxvz += pxv[p0].z;
-               }
-
-               /* If facet faces away from viewer, don't consider it: */
-               if (pxvz<0.0)
-                       continue;
-
-               if (dofaces) {
-                       if (numcolors)
-                               facecolor = i%numcolors + 1;
-                       else
-                               facecolor = 1;
-                       XSetForeground(dpy, gc,
-                               closure->drawbuf->pixels[facecolor]);
-                       for (j=0; j<pcount; j++) {
-                               p0 = pf[j];
-                               ppts[j].x = pv2[p0].x;
-                               ppts[j].y = pv2[p0].y;
-                       }
-                       XFillPolygon(dpy, closure->win, gc, ppts, pcount,
-                               Convex, CoordModeOrigin);
-               }
-
-               if (doedges) {
-                       for (j=0; j<pcount; j++) {
-                               if (j<pcount-1) k=j+1;
-                               else k=0;
-                               p0 = pf[j];
-                               p1 = pf[k];
-                               if (!closure->drawn[p0][p1]) {
-                                       closure->drawn[p0][p1] = 1;
-                                       closure->drawn[p1][p0] = 1;
-                                       pe->x1 = pv2[p0].x;
-                                       pe->y1 = pv2[p0].y;
-                                       pe->x2 = pv2[p1].x;
-                                       pe->y2 = pv2[p1].y;
-                                       ++pe;
-                               }
-                       }
-               }
-       }
-
-       /* Erase previous, draw current icosahedrons; sync for smoothness. */
-
-       if (doedges) {
-               if (dofaces) {
-                       XSetForeground(dpy, gc, closure->drawbuf->pixels[0]);
-                               /* use background as foreground color */
-               } else {
-                       if (dblbuf && !multibufext)
-                               icoClearArea(closure,
-                                       closure->drawbuf->prevX - linewidth/2,
-                                       closure->drawbuf->prevY - linewidth/2,
-                                       icoW + linewidth + 1,
-                                       icoH + linewidth + 1);
-                       if (!(multibufext && dblbuf))
-                               icoClearArea(closure,
-                                       prevX - linewidth/2,
-                                       prevY - linewidth/2,
-                                       icoW + linewidth + 1,
-                                       icoH + linewidth + 1);
-                       if (dblbuf || dofaces) {
-                               XSetForeground(dpy, gc, closure->drawbuf->pixels[
-                                       closure->pixelsperbuf-1]);
-                       }
-               }
-               XDrawSegments(dpy, closure->win, gc, edges, pe - edges);
-       }
-
-       if (dsync)
-               XSync(dpy, 0);
-
-       if (dblbuf) {
-               closure->drawbuf->prevX = icoX;
-               closure->drawbuf->prevY = icoY;
-               setDisplayBuf(closure, closure->dbufnum, 0);
-       }
-       if (dblbuf)
-               closure->dbufnum = 1 - closure->dbufnum;
-       if (!(multibufext && dblbuf) && msleepcount > 0)
-               msleep(msleepcount);
-}
-
-static void
-initDBufs(struct closure *closure, int fg, int bg, int planesperbuf)
-{
-       int i,j,jj,j0,j1,k,m,t;
-       DBufInfo *b;
-       XColor bgcolor, fgcolor;
-
-       closure->nplanesets = (dblbuf && !multibufext ? 2 : 1);
-
-       closure->planesperbuf = planesperbuf;
-       closure->pixelsperbuf = 1<<planesperbuf;
-       closure->totalplanes = closure->nplanesets * planesperbuf;
-       closure->totalpixels = 1<<closure->totalplanes;
-       closure->plane_masks = (unsigned long *)
-               xalloc(closure->totalplanes * sizeof(unsigned long));
-       closure->dbufnum = 0;
-       for (i=0; i < closure->nplanesets; i++) {
-               b = closure->bufs+i;
-               b->plane_masks = closure->plane_masks + (i*planesperbuf);
-               b->colors = (XColor *)
-                       xalloc(closure->totalpixels * sizeof(XColor));
-               b->pixels = (unsigned long *)
-                       xalloc(closure->pixelsperbuf * sizeof(unsigned long));
-       }
-
-       if (closure->totalplanes == 1) {
-           closure->pixels[0] = bg;
-           closure->plane_masks[0] = fg ^ bg;
-       } else {
-           t = XAllocColorCells(dpy,closure->cmap,0,
-                   closure->plane_masks,closure->totalplanes, closure->pixels,1);
-                           /* allocate color planes */
-           if (t==0) {
-                   icoFatal("can't allocate enough color planes", NULL);
-           }
-       }
-
-       fgcolor.pixel = fg;
-       bgcolor.pixel = bg;
-       XQueryColor(dpy,closure->cmap,&fgcolor);
-       XQueryColor(dpy,closure->cmap,&bgcolor);
-
-       setBufColor(closure, 0,&bgcolor);
-       setBufColor(closure, 1,&fgcolor);
-       for (i=0; i<closure->nplanesets; i++) {
-               b = closure->bufs+i;
-               for (j0=0; j0<(dblbuf&&!multibufext?closure->pixelsperbuf:1); j0++) {
-                   for (j1=0; j1<closure->pixelsperbuf; j1++) {
-                       j = (j0<<closure->planesperbuf)|j1;
-                       if (i==0) jj=j;
-                       else jj= (j1<<closure->planesperbuf)|j0;
-                       b->colors[jj].pixel = closure->pixels[0];
-                       for (k=0, m=j; m; k++, m=m>>1) {
-                               if (m&1)
-                                  b->colors[jj].pixel ^= closure->plane_masks[k];
-                       }
-                       b->colors[jj].flags = DoRed | DoGreen | DoBlue;
-                   }
-               }
-               b->prevX = b->prevY = 0;
-               b->enplanemask = 0;
-               for (j=0; j<planesperbuf; j++) {
-                       b->enplanemask |= b->plane_masks[j];
-               }
-               for (j=0; j<closure->pixelsperbuf; j++) {
-                       b->pixels[j] = closure->pixels[0];
-                       for (k=0, m=j; m; k++, m=m>>1) {
-                               if (m&1)
-                                  b->pixels[j] ^= b->plane_masks[k];
-                       }
-               }
-       }
-
-       if (!(multibufext && dblbuf)) {
-           setDrawBuf(closure, 0);
-           XSetBackground(dpy, closure->gcontext, closure->bufs[0].pixels[0]);
-           XSetWindowBackground(dpy, closure->draw_window, closure->bufs[0].pixels[0]);
-           XSetPlaneMask(dpy, closure->gcontext, AllPlanes);
-           icoClearArea(closure, 0, 0, closure->winW, closure->winH); /* clear entire window */
-       }
-}
-
-static void
-setBufColname(struct closure *closure, int n, char *colname)
-{
-       int t;
-       XColor dcolor, color;
-
-       t = XLookupColor(dpy,closure->cmap,colname,&dcolor,&color);
-       if (t==0) {     /* no such color */
-               icoFatal("no such color %s",colname);
-       }
-       setBufColor(closure, n,&color);
-}
-
-
-/* function to create and run an ico window */
-static void *
-do_ico_window(void *ptr)
-{
-       int fg, bg;
-       XSetWindowAttributes xswa;
-       XWindowAttributes xwa;
-       XEvent xev;
-       int icoX, icoY;
-       unsigned long vmask;
-       XGCValues xgcv;
-       int initcolors = 0;
-       int icoDeltaX = DEFAULT_DELTAX, icoDeltaY = DEFAULT_DELTAY;
-       int icodeltax2, icodeltay2;
-       Bool blocking = False;
-       int winX, winY;
-       int icoW = 0, icoH = 0;
-       KeySym ksym;
-       Bool do_it = True;
-       char buf[20];
-       struct closure *closure = ptr;
-#ifdef MULTITHREAD           
-       int len;
-#endif
-
-#ifdef DEBUG
-       printf("thread %x starting\n", xthread_self());
-#endif
-       closure->cmap = XDefaultColormap(dpy,DefaultScreen(dpy));
-       if (!closure->cmap) {
-               icoFatal("no default colormap!", NULL);
-       }
-
-       fg = WhitePixel(dpy, DefaultScreen(dpy));
-       bg = BlackPixel(dpy, DefaultScreen(dpy));
-       if (background_colorname) {
-           XColor cdef, igndef;
-
-           if (XAllocNamedColor (dpy, closure->cmap, background_colorname,
-                                 &cdef, &igndef))
-             bg = cdef.pixel;
-           else 
-             icoFatal("background: no such color \"%s\"",background_colorname);
-       }
-       if (numcolors && (!dofaces || numcolors == 1)) {
-           XColor cdef, igndef;
-
-           if (XAllocNamedColor (dpy, closure->cmap, colornames[0], &cdef, &igndef))
-             fg = cdef.pixel;
-           else 
-             icoFatal("face: no such color \"%s\"", colornames[0]);
-       }
-
-       if (invert) {
-           unsigned long tmp = fg;
-           fg = bg;
-           bg = tmp;
-       }
-
-       /* Set up window parameters, create and map window if necessary */
-
-       if (useRoot) {
-               closure->draw_window = DefaultRootWindow(dpy);
-               winX = 0;
-               winY = 0;
-               closure->winW = DisplayWidth(dpy, DefaultScreen(dpy));
-               closure->winH = DisplayHeight(dpy, DefaultScreen(dpy));
-       } else {
-               closure->winW = closure->winH = (multibufext&&dblbuf ? 300 : 600);
-               winX = (DisplayWidth(dpy, DefaultScreen(dpy)) - closure->winW) >> 1;
-               winY = (DisplayHeight(dpy, DefaultScreen(dpy)) - closure->winH) >> 1;
-               if (geom) 
-                       XParseGeometry(geom, &winX, &winY,
-                                      (unsigned int *)&closure->winW,
-                                      (unsigned int *)&closure->winH);
-
-               xswa.event_mask = ExposureMask |
-                                 StructureNotifyMask |
-                                 KeyPressMask;
-               xswa.background_pixel = bg;
-               xswa.border_pixel = fg;
-
-               closure->draw_window = XCreateWindow(dpy,
-                   DefaultRootWindow(dpy), 
-                   winX, winY, closure->winW, closure->winH, 0, 
-                   DefaultDepth(dpy, DefaultScreen(dpy)), 
-                   InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
-                   CWEventMask | CWBackPixel | CWBorderPixel, &xswa);
-#ifdef MULTITHREAD           
-               len = sprintf(buf, "Ico: thread %d", closure->thread_num);
-               XChangeProperty(dpy, closure->draw_window,
-                               XA_WM_NAME, XA_STRING, 8, 
-                               PropModeReplace, (unsigned char *)buf, len);
-#else
-               XChangeProperty(dpy, closure->draw_window,
-                               XA_WM_NAME, XA_STRING, 8, 
-                               PropModeReplace, (unsigned char *)"Ico", 3);
-#endif
-               (void) XSetWMProtocols (dpy, closure->draw_window,
-                                       &wm_delete_window, 1);
-               XMapWindow(dpy, closure->draw_window);
-#ifdef DEBUG
-               printf("thread %x waiting for Expose\n", xthread_self());
-#endif
-               for (;;) {
-                   XNextEvent(dpy, &xev);
-                   if (xev.type == Expose)
-                       break;
-               }
-#ifdef DEBUG
-               printf("thread %x got Expose\n", xthread_self());
-#endif
-               if (XGetWindowAttributes(dpy,closure->draw_window,&xwa)==0) {
-                       icoFatal("cannot get window attributes (size)", NULL);
-               }
-               closure->winW = xwa.width;
-               closure->winH = xwa.height;
-       }
-
-       if (ico_geom) 
-         XParseGeometry (ico_geom, &icoX, &icoY,
-                         (unsigned int *)&icoW,
-                         (unsigned int *)&icoH);
-       if (icoW <= 0) icoW = DEFAULT_ICO_WIDTH;
-       if (icoH <= 0) icoH = DEFAULT_ICO_HEIGHT;
-       if (icoW < MIN_ICO_WIDTH) icoW = MIN_ICO_WIDTH;
-       if (icoH < MIN_ICO_HEIGHT) icoH = MIN_ICO_HEIGHT;
-
-       if (delta_geom) {
-           unsigned int junk;
-
-           XParseGeometry (delta_geom, &icoDeltaX, &icoDeltaY, &junk, &junk);
-           if (icoDeltaX == 0 && icoDeltaY == 0) {
-               icoDeltaX = DEFAULT_DELTAX;
-               icoDeltaY = DEFAULT_DELTAY;
-           }
-       }
-
-       closure->win = None;
-
-#ifdef MULTIBUFFER
-       if (multibufext && dblbuf) {
-           if (XmbufCreateBuffers (dpy, closure->draw_window, 2, update_action,
-                                   MultibufferUpdateHintFrequent,
-                                   closure->multibuffers) == 2) {
-               XCopyArea (dpy, closure->draw_window, closure->multibuffers[1],
-                          DefaultGC(dpy, DefaultScreen(dpy)),
-                          0, 0, closure->winW, closure->winH, 0, 0);
-               closure->win = closure->multibuffers[1];
-           } else 
-             icoFatal ("unable to obtain 2 buffers", NULL);
-       }
-#endif /* MULTIBUFFER */
-       if (closure->win == None) closure->win = closure->draw_window;
-
-       /* Set up a graphics context */
-
-       vmask = (GCBackground | GCForeground | GCLineWidth);
-       xgcv.background = bg;
-       xgcv.foreground = fg;
-       xgcv.line_width = linewidth;
-       if (dash) {
-           xgcv.line_style = LineDoubleDash;
-           xgcv.dashes = dash;
-           vmask |= (GCLineStyle | GCDashList);
-       }
-       closure->gcontext = XCreateGC (dpy, closure->draw_window, vmask, &xgcv);
-
-       if (dofaces && numcolors>1) {
-           int i,t,bits;
-               bits = 0;
-               for (t=numcolors; t; t=t>>1) bits++;
-               initDBufs(closure, fg,bg,bits);
-               /* don't set the background color */
-               for (i=0; i<numcolors; i++) {
-                       setBufColname(closure, i+1,colornames[i]);
-               }
-               initcolors = 1;
-       }
-       else if (dblbuf || dofaces) {
-               initDBufs(closure, fg,bg,1);
-               initcolors = 1;
-       }
-       if (initcolors) {
-           setDisplayBuf(closure, dblbuf?1:0, 1); /* insert new colors */
-       }
-
-       if (dsync)
-               XSync(dpy, 0);
-
-       /* Get the initial position, size, and speed of the bounding-box */
-
-       srand((int) time((time_t *)0) % 231);
-       icoX = ((closure->winW - icoW) * (rand() & 0xFF)) >> 8;
-       icoY = ((closure->winH - icoH) * (rand() & 0xFF)) >> 8;
-
-
-       /* Bounce the box in the window */
-
-       icodeltax2 = icoDeltaX * 2;
-       icodeltay2 = icoDeltaY * 2;
-       initPoly(closure, poly, icoW, icoH);
-
-       while (do_it) {
-               int prevX;
-               int prevY;
-               Bool do_event;
-
-               /*
-                * This is not a good example of how to do event reading
-                * in multi-threaded programs.  More commonly there would
-                * be one thread reading all events and dispatching them
-                * to the appropriate thread.  However, the threaded version
-                * of ico was developed to test the MT Xlib implementation,
-                * so it is useful to have it behave a little oddly.
-                * For a discussion of how to write multi-threaded X programs,
-                * see Gildea, S., "Multi-Threaded Xlib", The X Resource,
-                * Issue 5, January 1993, pp. 159-166.
-                */
-               if (blocking) {
-                   XIfEvent(dpy, &xev, predicate, (XPointer) closure->win);
-                   do_event = True;
-               } else
-                   do_event = XCheckIfEvent(dpy, &xev, predicate,
-                           (XPointer) closure->win);
-               if (do_event) {
-                   switch (xev.type) {
-                     case ConfigureNotify:
-#ifdef DEBUG
-                       printf("thread %x configure\n", xthread_self());
-#endif
-                       if (xev.xconfigure.width != closure->winW ||
-                           xev.xconfigure.height != closure->winH)
-                         icoX = icoY = 1;
-                       closure->winW = xev.xconfigure.width;
-                       closure->winH = xev.xconfigure.height;
-                       break;
-                     case KeyPress:
-#ifdef DEBUG
-                       printf("thread %x keypress\n", xthread_self());
-#endif
-                       XLookupString(&xev.xkey, buf, 10, &ksym, NULL);
-                       do_it = ((ksym != XK_Q) && ksym != XK_q);
-                       break;
-                     case MapNotify:
-                       blocking = False;
-#ifdef DEBUG
-                       printf("thread %x unblocking\n", xthread_self());
-#endif
-                       break;
-                     case UnmapNotify:
-                       blocking = True;
-#ifdef DEBUG
-                       printf("thread %x blocking\n", xthread_self());
-#endif
-                       break;
-                     case ClientMessage:
-#ifdef DEBUG
-                       printf("thread %x message\n", xthread_self());
-#endif
-                       if (xev.xclient.data.l[0] == wm_delete_window)
-                           do_it = False;
-                       else
-                           XBell (dpy, 0);
-                       continue;
-                   }
-               }
-
-               prevX = icoX;
-               prevY = icoY;
-
-               icoX += icoDeltaX;
-               if (icoX < 0 || icoX + icoW > closure->winW) {
-                       icoX -= icodeltax2;
-                       icoDeltaX = - icoDeltaX;
-                       icodeltax2 = icoDeltaX * 2;
-               }
-               icoY += icoDeltaY;
-               if (icoY < 0 || icoY + icoH > closure->winH) {
-                       icoY -= icodeltay2;
-                       icoDeltaY = - icoDeltaY;
-                       icodeltay2 = icoDeltaY * 2;
-               }
-
-               drawPoly(closure, poly, closure->gcontext,
-                        icoX, icoY, icoW, icoH, prevX, prevY);
-       }
-       XDestroyWindow(dpy, closure->win);
-#ifdef MULTITHREAD
-       xmutex_lock(&count_mutex);
-       thread_count--;
-       if (thread_count == 0) {
-           xcondition_broadcast(&count_cond);
-       }
-       xmutex_unlock(&count_mutex);
-#endif
-       return NULL;
-}
-
-/******************************************************************************
- * Description
- *     Main routine.  Process command-line arguments, then bounce a bounding
- *     box inside the window.  Call DrawIco() to redraw the icosahedron.
- *****************************************************************************/
-
-static void
-giveObjHelp(void)
-{
-       int i;
-       Polyinfo *poly;
-
-       printf("%-16s%-12s  #Vert.  #Edges  #Faces  %-16s\n",
-               "Name", "ShortName", "Dual");
-       for (i=0; i<NumberPolygons; i++) {
-               poly = polygons+i;
-               printf("%-16s%-12s%6d%8d%8d    %-16s\n",
-                       poly->longname, poly->shortname,
-                       poly->numverts, poly->numedges, poly->numfaces,
-                       poly->dual);
-       }
-}
-
-static Polyinfo *
-findpoly(const char *name)
-{
-       int i;
-        Polyinfo *poly;
-
-       for (i=0; i<NumberPolygons; i++) {
-               poly = polygons+i;
-               if (strcmp(name,poly->longname)==0 || strcmp(name,poly->shortname)==0)
-                       return poly;
-       }
-       icoFatal("can't find object %s", name);
-}
-
-int main(argc, argv)
-    int argc;
-    char **argv;
-{
-       const char *display = NULL;
-#ifdef MULTIBUFFER
-       int mbevbase, mberrbase;
-#endif
-#ifdef MULTITHREAD
-       int nthreads = 1;       /* -threads: number of windows */
-       int i;
-#endif
-       struct closure *closure;
-
-       ProgramName = argv[0];
-
-       /* Process arguments: */
-
-       poly = findpoly("icosahedron"); /* default */
-
-       for (argv++, argc--; argc > 0; argv++, argc--) {
-               if (!strcmp (*argv, "-display")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       display = *++argv; argc--;
-               } else if (!strncmp (*argv, "-g", 2)) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       geom = *++argv; argc--;
-               } else if (!strcmp(*argv, "-r"))
-                       useRoot = 1;
-               else if (!strcmp (*argv, "-d")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       dash = atoi(*++argv); argc--;
-               }
-#ifdef MULTITHREAD
-               else if (!strcmp(*argv, "-threads")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       nthreads = atoi(*++argv); argc--;
-               }
-#endif
-               else if (!strcmp(*argv, "-colors")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       colornames = ++argv; argc--; numcolors = 0;
-                       for ( ; argc > 0 && argv[0][0]!='-'; argv++, argc--, numcolors++) ;
-                       argv--; argc++;
-               }
-               else if (!strcmp (*argv, "-copy")) {
-#ifdef MULTIBUFFER
-                       update_action = MultibufferUpdateActionCopied;
-#endif
-               }
-               else if (!strcmp (*argv, "-untouched")) {
-#ifdef MULTIBUFFER
-                       update_action = MultibufferUpdateActionUntouched;
-#endif
-               }
-               else if (!strcmp (*argv, "-undefined")) {
-#ifdef MULTIBUFFER
-                       update_action = MultibufferUpdateActionUndefined;
-#endif
-               } else if (!strcmp (*argv, "-lw")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       linewidth = atoi(*++argv); argc--;
-               } else if (!strcmp (*argv, "-dbl")) {
-                       dblbuf = 1;
-#ifdef MULTIBUFFER
-                       multibufext = 1;
-#endif
-               }
-               else if (!strcmp(*argv, "-softdbl")) {
-                       dblbuf = 1;
-                       multibufext = 0;
-               }
-               else if (!strncmp(*argv, "-p", 2)) {
-                       numcolors = atoi(argv[0]+2);
-                       if (numcolors < 1 || numcolors > NumberPrimaries)
-                               numcolors = NumberPrimaries;
-                       colornames = Primaries;
-                       dofaces = 1;
-               }
-               else if (!strcmp(*argv, "-bg")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       background_colorname = *++argv; argc--;
-               } else if (!strcmp(*argv, "-noedges"))
-                       doedges = 0;
-               else if (!strcmp(*argv, "-faces"))
-                       dofaces = 1;
-               else if (!strcmp(*argv, "-i"))
-                       invert = 1;
-               else if (!strcmp(*argv, "-size")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       ico_geom = *++argv; argc--;
-               } else if (!strcmp(*argv, "-delta")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       delta_geom = *++argv; argc--;
-               } else if (!strcmp (*argv, "-sleep")) {
-                       float f;
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       if (sscanf (*++argv, "%f", &f) < 1)
-                               icoFatal("invalid argument for %s", argv[-1]);
-                       msleepcount = (int) (f * 1000.0);
-                       argc--;
-               } else if (!strcmp (*argv, "-obj")) {
-                       if (argc < 2)
-                               icoFatal("missing argument for %s", *argv);
-                       poly = findpoly(*++argv); argc--;
-               } else if (!strcmp(*argv, "-dsync"))
-                       dsync = 1;
-               else if (!strncmp(*argv, "-sync",  5)) 
-                       xsync = 1;
-               else if (!strcmp(*argv, "-objhelp")) {
-                       giveObjHelp();
-                       exit(1);
-               }
-               else {  /* unknown arg */
-                       const char **cpp;
-
-                       fprintf (stderr, "usage:  %s [options]\n\n",
-                                ProgramName);
-                       for (cpp = help_message; *cpp; cpp++)
-                               fprintf (stderr, "%s\n", *cpp);
-                       exit (1);
-               }
-       }
-
-       if (!dofaces && !doedges)
-               icoFatal("nothing to draw", NULL);
-
-#ifdef MULTITHREAD
-       XInitThreads();
-#endif
-       if (!(dpy = XOpenDisplay(display)))
-           icoFatal("cannot open display \"%s\"", XDisplayName(display));
-       wm_delete_window = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
-       if (xsync)
-           XSynchronize(dpy, True);
-
-#ifdef MULTIBUFFER
-       if (multibufext && !XmbufQueryExtension (dpy, &mbevbase, &mberrbase)) {
-           multibufext = 0;
-       }
-#endif
-
-#ifdef MULTITHREAD
-#ifndef XMUTEX_INITIALIZER
-       xmutex_init(&count_mutex);
-#endif
-       xcondition_init(&count_cond);
-
-       /* start all threads here */
-       thread_count = nthreads;
-       for (i=1; i <= nthreads; i++) {
-           closure = (struct closure *) xalloc(sizeof(struct closure));
-           closure->thread_num = i;
-           xthread_fork(do_ico_window, closure);
-       }
-       /* wait until all theads terminate */
-       xmutex_lock(&count_mutex);
-       xcondition_wait(&count_cond, &count_mutex);
-       xmutex_unlock(&count_mutex);
-#else
-       /* start the animation */
-       closure = (struct closure *) xalloc(sizeof(struct closure));
-       do_ico_window(closure);
-#endif
-       XCloseDisplay(dpy);
-       return 0;
-}
diff --git a/ico/ico.man b/ico/ico.man
deleted file mode 100644 (file)
index 07fb576..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" $XConsortium: ico.man,v 1.14 94/04/17 20:45:16 gildea Exp $
-.\" $XFree86: xc/programs/ico/ico.man,v 1.4 2003/03/19 01:49:28 dawes Exp $
-.TH ICO 1 __xorgversion__
-.SH NAME
-ico \- animate an icosahedron or other polyhedron
-.SH SYNOPSIS
-.B ico
-[-display display] [-geometry geometry]
-[-r] [-d pattern] [-i] [-dbl] [-faces] [-noedges]
-[-sleep n] [-obj object] [-objhelp] [-colors color-list]
-.SH DESCRIPTION
-.I Ico
-displays a wire-frame rotating polyhedron, with hidden lines removed,
-or a solid-fill polyhedron with hidden faces removed.
-There are a number of different polyhedra available;
-adding a new polyhedron to the program is quite simple.
-.SH OPTIONS
-.TP
-.B -r
-Display on the root window instead of creating a new window.
-.TP
-.B -d pattern
-Specify a bit pattern for drawing dashed lines for wire frames.
-.TP
-.B -i
-Use inverted colors for wire frames.
-.TP
-.B -dbl
-Use double buffering on the display.
-This works for either wire frame or solid fill drawings.
-For solid fill drawings, using this switch results in substantially
-smoother movement.
-Note that this requires twice as many bit planes as without double buffering.
-Since some colors are typically allocated by other programs,
-most eight-bit-plane displays will probably be limited to eight colors
-when using double buffering.
-.TP
-.B -faces
-Draw filled faces instead of wire frames.
-.TP
-.B -noedges
-Don't draw the wire frames.
-Typically used only when -faces is used.
-.TP
-.B -sleep \fIn\fP
-Sleep n seconds between each move of the object.
-.TP
-.B -obj \fIobject\fP
-Specify what object to draw.
-If no object is specified, an icosahedron is drawn.
-.TP
-.B -objhelp
-Print out a list of the available objects, along with information
-about each object.
-.TP
-.B -colors \fIcolor color ...\fP
-Specify what colors should be used to draw the filled faces of the object.
-If less colors than faces are given, the colors are reused.
-.SH PROGRAM TERMINATION
-.LP
-Pressing "q" will close a window. If compiled with threads support, the
-program will stop only when all threads terminate. You can also close an
-animation window using the ICCCM \fIdelete\fP message (depending on your
-window manager, you will have a decoration button or menu to send such
-message).
-.SH ADDING POLYHEDRA
-.LP
-If you have the source to ico, it is very easy to add more polyhedra.
-Each polyhedron is defined in an include file by the name of objXXX.h,
-where XXX is something related to the name of the polyhedron.
-The format of the include file is defined in the file polyinfo.h.
-Look at the file objcube.h to see what the exact format of an objXXX.h
-file should be, then create your objXXX.h file in that format.
-.LP
-After making the new objXXX.h file (or copying in a new one from elsewhere),
-simply do a 'make depend'.
-This will recreate the file allobjs.h, which lists all of the objXXX.h
-files.
-Doing a 'make' after this will rebuild ico with the new object information.
-.SH "SEE ALSO"
-X(__miscmansuffix__)
-.SH BUGS
-.LP
-Pyramids and tetrahedrons with filled faces do not display correctly.
-.LP
-A separate color cell is allocated for each name in the -colors list, even
-when the same name may be specified twice.  Color allocation fails in
-TrueColor displays and option \fI-faces\fP does not work well.
-.SH COPYRIGHT
-Copyright 1994 X Consortium
-.br
-See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
diff --git a/ico/install-sh b/ico/install-sh
deleted file mode 100755 (executable)
index 4fbbae7..0000000
+++ /dev/null
@@ -1,507 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2006-10-14.15
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-
-nl='
-'
-IFS=" ""       $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-posix_glob=
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chmodcmd=$chmodprog
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) mode=$2
-        shift
-        shift
-       case $mode in
-         *' '* | *'    '* | *'
-'*       | *'*'* | *'?'* | *'['*)
-           echo "$0: invalid mode: $mode" >&2
-           exit 1;;
-       esac
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
-
-    -T) no_target_directory=true
-       shift
-       continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    --)        shift
-       break;;
-
-    -*)        echo "$0: invalid option: $1" >&2
-       exit 1;;
-
-    *)  break;;
-  esac
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
-  # When -d is used, all remaining arguments are directories to create.
-  # When -t is used, the destination is already specified.
-  # Otherwise, the last argument is the destination.  Remove it from $@.
-  for arg
-  do
-    if test -n "$dstarg"; then
-      # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dstarg"
-      shift # fnord
-    fi
-    shift # arg
-    dstarg=$arg
-  done
-fi
-
-if test $# -eq 0; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
-
-  # Set umask so as not to create temps with too-generous modes.
-  # However, 'strip' requires both read and write access to temps.
-  case $mode in
-    # Optimize common cases.
-    *644) cp_umask=133;;
-    *755) cp_umask=22;;
-
-    *[0-7])
-      if test -z "$stripcmd"; then
-       u_plus_rw=
-      else
-       u_plus_rw='% 200'
-      fi
-      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
-    *)
-      if test -z "$stripcmd"; then
-       u_plus_rw=
-      else
-       u_plus_rw=,u+rw
-      fi
-      cp_umask=$mode$u_plus_rw;;
-  esac
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    dstdir=$dst
-    test -d "$dstdir"
-    dstdir_status=$?
-  else
-
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
-       exit 1
-      fi
-      dstdir=$dst
-      dst=$dstdir/`basename "$src"`
-      dstdir_status=0
-    else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-       (dirname "$dst") 2>/dev/null ||
-       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-            X"$dst" : 'X\(//\)[^/]' \| \
-            X"$dst" : 'X\(//\)$' \| \
-            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-       echo X"$dst" |
-           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)[^/].*/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\).*/{
-                  s//\1/
-                  q
-                }
-                s/.*/./; q'
-      `
-
-      test -d "$dstdir"
-      dstdir_status=$?
-    fi
-  fi
-
-  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
-         mkdir_mode=-m$mode
-       else
-         mkdir_mode=
-       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-writeable 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;;
-    esac
-
-    if
-      $posix_mkdir && (
-       umask $mkdir_umask &&
-       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
-      )
-    then :
-    else
-
-      # The umask is ridiculous, or 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.
-
-      case $dstdir in
-       /*) prefix=/ ;;
-       -*) prefix=./ ;;
-       *)  prefix= ;;
-      esac
-
-      case $posix_glob in
-        '')
-         if (set -f) 2>/dev/null; then
-           posix_glob=true
-         else
-           posix_glob=false
-         fi ;;
-      esac
-
-      oIFS=$IFS
-      IFS=/
-      $posix_glob && set -f
-      set fnord $dstdir
-      shift
-      $posix_glob && set +f
-      IFS=$oIFS
-
-      prefixes=
-
-      for d
-      do
-       test -z "$d" && continue
-
-       prefix=$prefix$d
-       if test -d "$prefix"; then
-         prefixes=
-       else
-         if $posix_mkdir; then
-           (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
-         else
-           case $prefix in
-             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-             *) qprefix=$prefix;;
-           esac
-           prefixes="$prefixes '$qprefix'"
-         fi
-       fi
-       prefix=$prefix/
-      done
-
-      if test -n "$prefixes"; then
-       # Don't fail if two instances are running concurrently.
-       (umask $mkdir_umask &&
-        eval "\$doit_exec \$mkdirprog $prefixes") ||
-         test -d "$dstdir" || exit 1
-       obsolete_mkdir_used=true
-      fi
-    fi
-  fi
-
-  if test -n "$dir_arg"; then
-    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
-    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
-      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
-  else
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_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") &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dst"; then
-              $doit $rmcmd -f "$dst" 2>/dev/null \
-              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
-                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
-              || {
-                echo "$0: cannot unlink or rename $dst" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dst"
-        }
-    } || exit 1
-
-    trap '' 0
-  fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/ico/missing b/ico/missing
deleted file mode 100755 (executable)
index 1c8ff70..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2006-05-10.23
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case $1 in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $1 in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-       case $LASTARG in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f y.tab.h; then
-       echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-       case $LASTARG in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f lex.yy.c; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-       /^@setfilename/{
-         s/.* \([^ ]*\) *$/\1/
-         p
-         q
-       }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/ico/objcube.h b/ico/objcube.h
deleted file mode 100644 (file)
index 441145e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* objcube.h - structure values for cube */
-
-{      "cube", "cube", /* long and short names */
-       "octahedron",   /* long name of dual */
-       8, 12, 6,       /* number of vertices, edges, and faces */
-       {               /* vertices (x,y,z) */
-                       /* all points must be within radius 1 of the origin */
-#define T 0.577
-               {  T,  T,  T },
-               {  T,  T, -T },
-               {  T, -T, -T },
-               {  T, -T,  T },
-               { -T,  T,  T },
-               { -T,  T, -T },
-               { -T, -T, -T },
-               { -T, -T,  T },
-#undef T
-       },
-       {       /* faces (numfaces + indexes into vertices) */
-               /*  faces must be specified clockwise from the outside */
-               4,      0, 1, 2, 3,
-               4,      7, 6, 5, 4,
-               4,      1, 0, 4, 5,
-               4,      3, 2, 6, 7,
-               4,      2, 1, 5, 6,
-               4,      0, 3, 7, 4,
-       }
-},             /* leave a comma to separate from the next include file */
-/* end */
diff --git a/ico/objico.h b/ico/objico.h
deleted file mode 100644 (file)
index 7ca56ae..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* objico.h - structure values for icosahedron */
-
-{      "icosahedron", "ico",   /* long and short names */
-       "dodecahedron",         /* long name of dual */
-       12, 30, 20,     /* number of vertices, edges, and faces */
-       {               /* vertices (x,y,z) */
-                       /* all points must be within radius 1 of the origin */
-               { 0.00000000,  0.00000000, -0.95105650},
-               { 0.00000000,  0.85065080, -0.42532537},
-               { 0.80901698,  0.26286556, -0.42532537},
-               { 0.50000000, -0.68819095, -0.42532537},
-               {-0.50000000, -0.68819095, -0.42532537},
-               {-0.80901698,  0.26286556, -0.42532537},
-               { 0.50000000,  0.68819095,  0.42532537},
-               { 0.80901698, -0.26286556,  0.42532537},
-               { 0.00000000, -0.85065080,  0.42532537},
-               {-0.80901698, -0.26286556,  0.42532537},
-               {-0.50000000,  0.68819095,  0.42532537},
-               { 0.00000000,  0.00000000,  0.95105650}
-       },
-       {       /* faces (numfaces + indexes into vertices) */
-               /*  faces must be specified clockwise from the outside */
-                3,     0,  2,  1,
-                3,     0,  3,  2,
-                3,     0,  4,  3,
-                3,     0,  5,  4,
-                3,     0,  1,  5,
-                3,     1,  6, 10,
-                3,     1,  2,  6,
-                3,     2,  7,  6,
-                3,     2,  3,  7,
-                3,     3,  8,  7,
-                3,     3,  4,  8,
-                3,     4,  9,  8,
-                3,     4,  5,  9,
-                3,     5, 10,  9,
-                3,     5,  1, 10,
-                3,     10,  6, 11,
-                3,     6,  7, 11,
-                3,     7,  8, 11,
-                3,     8,  9, 11,
-                3,     9, 10, 11
-       }
-},             /* leave a comma to separate from the next include file */
-/* end */
diff --git a/ico/objocta.h b/ico/objocta.h
deleted file mode 100644 (file)
index 80521d3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* objocta.h - structure values for octahedron */
-
-{      "octahedron", "octa",   /* long and short names */
-       "cube",         /* long name of dual */
-       6, 12, 8,       /* number of vertices, edges, and faces */
-       {               /* vertices (x,y,z) */
-                       /* all points must be within radius 1 of the origin */
-#define T 1.0
-               {  T,  0,  0 },
-               { -T,  0,  0 },
-               {  0,  T,  0 },
-               {  0, -T,  0 },
-               {  0,  0,  T },
-               {  0,  0, -T },
-#undef T
-       },
-       {       /* faces (numfaces + indexes into vertices) */
-               /*  faces must be specified clockwise from the outside */
-               3,      0, 4, 2,
-               3,      0, 2, 5,
-               3,      0, 5, 3,
-               3,      0, 3, 4,
-               3,      1, 2, 4,
-               3,      1, 5, 2,
-               3,      1, 3, 5,
-               3,      1, 4, 3,
-       }
-},             /* leave a comma to separate from the next include file */
-/* end */
diff --git a/ico/objplane.h b/ico/objplane.h
deleted file mode 100644 (file)
index ce5b4e0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* objplane.h - structure values for plane */
-
-{       "plane", "plane",       /* long and short names */
-        "cube",         /* long name of dual */
-        4, 4, 1,        /* number of vertices, edges, and faces */
-        {               /* vertices (x,y,z) */
-                        /* all points must be within radius 1 of the origin */
-#define T 1.0
-                {  T,  0,  0 },
-                { -T,  0,  0 },
-                {  0,  T,  0 },
-                {  0, -T,  0 },
-#undef T
-        },
-        {       /* faces (numfaces + indexes into vertices) */
-                /*  faces must be specified clockwise from the outside */
-                4,      0, 2, 1, 3,
-        }
-},              /* leave a comma to separate from the next include file */
-/* end */
diff --git a/ico/objpyr.h b/ico/objpyr.h
deleted file mode 100644 (file)
index 5ea163e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* objpyr.h - structure values for pyramid */
-
-{       "pyramid", "pyramid",   /* long and short names */
-        "cube",         /* long name of dual */
-        5, 8, 5,        /* number of vertices, edges, and faces */
-        {               /* vertices (x,y,z) */
-                        /* all points must be within radius 1 of the origin */
-#define T 1.0
-                {  T,  0,  0 },
-                { -T,  0,  0 },
-                {  0,  T,  0 },
-                {  0, -T,  0 },
-                {  0,  0,  T },
-                /* {  0,  0, -T }, */
-#undef T
-        },
-        {       /* faces (numfaces + indexes into vertices) */
-                /*  faces must be specified clockwise from the outside */
-                3,      0, 4, 2,
-                /* 3,   0, 2, 5, */
-                /* 3,   0, 5, 3, */
-                3,      0, 3, 4,
-                3,      1, 2, 4,
-                /* 3,   1, 5, 2, */
-                /* 3,   1, 3, 5, */
-                3,      1, 4, 3,
-                4,      0, 2, 1, 3,
-        }
-},              /* leave a comma to separate from the next include file */
-/* end */
diff --git a/ico/polyinfo.h b/ico/polyinfo.h
deleted file mode 100644 (file)
index e405623..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* polyinfo.h
- * This is the description of one polyhedron file
- */
-/* $XFree86$ */
-
-#define MAXVERTS 120
-       /* great rhombicosidodecahedron has 120 vertices */
-#define MAXNV MAXVERTS
-#define MAXFACES 30
-       /* (hexakis icosahedron has 120 faces) */
-#define MAXEDGES 180
-       /* great rhombicosidodecahedron has 180 edges */
-#define MAXEDGESPERPOLY 20
-
-typedef struct {
-       double x, y, z;
-} Point3D;
-
-/* structure of the include files which define the polyhedra */
-typedef struct {
-       const char *longname;   /* long name of object */
-       const char *shortname;  /* short name of object */
-       const char *dual;       /* long name of dual */
-       int numverts;           /* number of vertices */
-       int numedges;           /* number of edges */
-       int numfaces;           /* number of faces */
-       Point3D v[MAXVERTS];    /* the vertices */
-       int f[MAXEDGES*2+MAXFACES];     /* the faces */
-} Polyinfo;
-
-/* end */
diff --git a/luit/COPYING b/luit/COPYING
new file mode 100644 (file)
index 0000000..f2b9823
--- /dev/null
@@ -0,0 +1,20 @@
+Copyright (c) 2001 by Juliusz Chroboczek
+Copyright (c) 2002 by Tomohiro KUBOTA
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/luit/ChangeLog b/luit/ChangeLog
new file mode 100644 (file)
index 0000000..6cb8e69
--- /dev/null
@@ -0,0 +1,619 @@
+commit f44baa7b690f04a0b4ebbaf0c43284b9798ac7d7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Oct 6 19:04:40 2010 -0700
+
+    luit 1.1.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ed3908570e961d566ff13d8b38c2fa9efa2047ff
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Sep 26 17:35:31 2010 -0700
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0d7ea51f819d1e85909a3ec3fb637e3b4d703095
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 9a44a8c2310202bc5a62394d15fd70000ebe66bf
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Aug 20 16:22:17 2010 -0400
+
+    make: whitespace management
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1fd9d492985277a4bb6c2cc8f6648c736f43bb43
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Aug 20 16:18:33 2010 -0400
+
+    luit.man: remove trailing whitespace
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 63dcabebc4b1e2cf69d3bc8efdf250925581a159
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Aug 20 13:09:47 2010 -0400
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    Use the appropriate platform version of sed
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 04ceef3da7e3cfb62bb946fb13980394bf37dbaf
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Aug 20 13:38:26 2010 -0400
+
+    man: replace hardcoded (7) with __miscmansuffix__
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 889bd7922faa4aa92769e4a06048bf83b867a52b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Aug 20 13:32:06 2010 -0400
+
+    man: replacement string should be __appmansuffix__
+    
+    To match XORG_MANPAGE_SECTIONS macro expectations.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1e6ce149a24e453c1e5af2d39721a2a79d078d7d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Aug 20 13:27:54 2010 -0400
+
+    man: replacement string should be __locale_alias__
+    
+    To match the luit.man expectations.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 6b7f25cdbd0f80a0f88d72c66aa51d75cd38b906
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 00:24:55 2010 -0700
+
+    Warn if configure does not find Xlib, but don't link against it.
+    
+    luit doesn't #include any Xlib headers or call any Xlib functions,
+    just attempts to read Xlib's locale.aliases files if it can find it.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 466e7769a450550d68b3aea5f4f4edbdc31f8bba
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Thu Jul 1 09:36:30 2010 -0700
+
+    Whitespace cleanup from Thomas Dickey's luit-20100601 fork
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit fddfe30c3ff91c83d0484b136e7673764e555555
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Thu Jul 1 09:35:39 2010 -0700
+
+    Integrate changes from Thomas Dickey's luit-20100601 fork
+    
+        * add -alias option to allow override of locale.alias pathname.
+        * improve fix waitForInput as suggested in Freedesktop #26383.
+        * fix warnings from clang --analyze
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 3b2bbab48945e9dd8563f4ae047436c138e41789
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Feb 10 01:49:18 2010 +0100
+
+    Bump to 1.0.5
+
+commit 633a436d7b158f87d8973b5547236dc0ef485895
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Wed Feb 10 01:48:44 2010 +0100
+
+    Bump xorg-macros requirement to 1.4 for XORG_INSTALL
+
+commit b7af1cef38d1995289acd1f2c13580b378ec0fc9
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Tue Feb 2 14:45:17 2010 +0100
+
+    poll: check for POLLERR|POLLHUP in WaitForInput
+    
+    X.Org bug#26383 <http://bugs.freedesktop.org/26383>
+    
+    Acked-by: Juliusz Chroboczek <jch@pps.jussieu.fr>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+commit 3fb0af21816b9f89c4b33e7cac5aad6d90bcc6c7
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Tue Dec 22 11:02:51 2009 -0800
+
+    configure: Fix a linewrap that snuck in with copy/paste
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+commit 5cb2d1e544ee22a29cfbc2c9729e2d043eb916b5
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Tue Dec 22 10:58:07 2009 -0800
+
+    darwin: Don't use poll()
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+commit 21e3e5b6fe0ed2e17c3fd403433e07350393cd1c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:52 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit a8550d4f38259d207cb96c90f31d63a23951a176
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:07 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit 4ddd9147cd27942c3cacd81d4fb3148fb5626100
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:24 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit ab0905fe39cf23855c3e0c319b96cdd773d9f756
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:38 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit dec37ff576b2d5728d8741eaa2195f129cfb990f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:14 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit 587d1b5a0c7e164e3006022499b56f4a927a613c
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Wed Oct 21 12:47:19 2009 -0700
+
+    This is not a GNU project, so declare it foreign.
+    
+    On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
+    > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
+    > > I noticed an INSTALL file in xlsclients and libXvMC today, and it
+    > > was quite annoying to work around since 'autoreconf -fvi' replaces
+    > > it and git wants to commit it.  Should these files even be in git?
+    > > Can I nuke them for the betterment of humanity and since they get
+    > > created by autoreconf anyways?
+    >
+    > See https://bugs.freedesktop.org/show_bug.cgi?id=24206
+    
+    As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
+    AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
+    of the INSTALL file. It is also part of the 24206 solution.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+commit 6de92b1ddf17a16a8075ad3922da68e72dcc949f
+Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+Date:   Tue Oct 6 13:28:58 2009 -0500
+
+    luit: Cygwin compatibility fix
+    
+    Cygwin has O_NOCTTY but not TIOCSCTTY, so there is no way for the tty
+    to become controlling this way.  Also, document the reason for calling
+    one right after the other.
+    
+    Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
+    Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
+
+commit f5e4bc812cec6503722ee289a0cc1099ce6fb3f5
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 18:14:18 2009 -0700
+
+    luit 1.0.4
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 61bb775852796628207a5062d8fdd8bcd6ec77bd
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 18:01:27 2009 -0700
+
+    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 8f9d685e4bb91640fb01392c6d73e7d9e365b41b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:17 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 4823838f77ab03cccd07860fdf8002bc577e0f04
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 9 14:55:03 2009 -0700
+
+    luit: Convert platform #ifdefs to configure tests for functions & headers
+    
+    Also check for __SVR4 in remaining SVR4 check to match Solaris compiler
+    default definition.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 638f4ac8e233973dc3c89d87cd9f6ac05489fef4
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Fri Jan 16 20:01:11 2009 -0200
+
+    Ansification and compile warning fixes.
+    
+      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
+    make distcheck and most gcc 4.3 and sparse warnings.
+
+commit 51eae7b3a07faab716ea7ef3186cee658f393d04
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Fri Apr 11 10:32:59 2008 -0700
+
+    Apple: Use secure tty
+    Thanks to Martin Otte for the patch
+
+commit 2547b637ab615884ea51458dfb793f1a70bc5201
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri Feb 1 00:08:27 2008 +0100
+
+    Bump to 1.0.3.
+
+commit bde6425192d06d4168048c32ca92abbade085869
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri Feb 1 00:05:56 2008 +0100
+
+    Make ChangeLog hook safer.
+
+commit e1a002217cabdb0806f28a0530a9cb972f370312
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Tue Jan 29 21:45:35 2008 +0100
+
+    Define _XOPEN_SOURCE to 500 on linux
+    
+    strdup() is only exposed by glibc headers if _XOPEN_SOURCE is defined to
+    a value >= 500.
+
+commit abca524c0298e629810bd98d18b73eceb0eca8d9
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 18:23:40 2008 -0800
+
+    Set locale.alias file in man page to match the one set by configure
+
+commit bada8600b282d453727c6202ab69f3cb2c8fc7fb
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 16:19:05 2008 -0800
+
+    Constify a bit
+
+commit 673fd4184c005909db20035006f6b98eb6210bd4
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 15:54:55 2008 -0800
+
+    Replace malloc/strcpy pairs with strdup
+
+commit 9ca1cdabb4f04cc7e8c437b48821f0672f58af60
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 14:40:30 2008 -0800
+
+    Man page typo fixes
+
+commit 87a181ce2647225e21e5824104ca1f7b04a221c7
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 14:33:41 2008 -0800
+
+    Fix sparse warnings: non-ANSI function declaration (missing void)
+
+commit 191f62fab880b9aa001a566a95343c4fe5565b40
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 14:31:31 2008 -0800
+
+    Fix many sparse warnings of Using plain integer as NULL pointer
+
+commit 98cd8b69a5ad042087a7f081482d4fd4d001cc3e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jan 28 14:25:15 2008 -0800
+
+    Change luit_CFLAGS to AM_CFLAGS to make automake-1.10 happier
+    
+    Makefile.am:29: compiling `charset.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
+
+commit a1b53290954cfabfbb28ac0bb932570754e118ae
+Author: Karsten Hilbert <karsten.hilbert@gmx.net>
+Date:   Thu Oct 11 15:44:28 2007 +0200
+
+    Fix typo in luit.man
+    
+    Debian bug#446216.
+
+commit 599d3c2049bc71929c29e864e4d76b2bdfc0c550
+Author: Dan Nicholson <dbn.lists@gmail.com>
+Date:   Fri Sep 21 14:52:09 2007 -0400
+
+    Match luit locale.alias location to libX11 default
+    Luit expects to find the locale.alias file in ${libdir}/X11/locale. However,
+    libX11 installs the locale files in ${datadir}/X11/locale, by default.
+
+commit ff27bd043f93ee9505f7f6cd0aed417ef264351e
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:51:03 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 47c5031b9ac3e14e5bffcae9edb4daa6306b754d
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Aug 23 19:24:26 2007 -0400
+
+    Rename .cvsignore to .gitignore
+
+commit 0277a1b8d6f2f1cf8156967862436207a170f111
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date:   Tue Nov 14 16:37:21 2006 +0100
+
+    Include corrected PHONY in Makefile.
+    Thanks to Donnie Berkholz for noticing I'm stupid.
+
+commit 2d4743cac9e2ceb81781586d396ebcc151fd123b
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date:   Tue Nov 14 03:37:14 2006 +0100
+
+    Remove incorrect .PHONY in Makefile.
+
+commit c89bc49b6dc037c6b5177f2c79370257efd54b7e
+Author: Julien Cristau <julien.cristau@ens-lyon.org>
+Date:   Tue Nov 7 17:27:36 2006 +0100
+
+    [PATCH] Add a rule to autogenerate ChangeLog for distribution.
+    
+    The current ChangeLog is not getting updated, so we generate it from git-log
+    instead.  Also clean it in "make maintainer-clean".
+    
+    Signed-off-by: Julien Cristau <julien.cristau@ens-lyon.org>
+    Signed-off-by: Juliusz Chroboczek <jch@pps.jussieu.fr>
+
+commit 0190002a9730185dec0ab8bcf27ce730d295e39d
+Author: Julien Cristau <julien.cristau@ens-lyon.org>
+Date:   Tue Nov 7 17:27:35 2006 +0100
+
+    [PATCH] Delete ChangeLog file.
+    
+    Signed-off-by: Julien Cristau <julien.cristau@ens-lyon.org>
+    Signed-off-by: Juliusz Chroboczek <jch@pps.jussieu.fr>
+
+commit 930c1fb0cce2bdd65553b85e4231fe14ccf7a2e7
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Wed Nov 8 16:24:26 2006 +0200
+
+    bump to 1.0.2
+
+commit 33c99a9408fc236ec68cc027c1caddc805e80efe
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date:   Sun Nov 5 23:43:52 2006 +0100
+
+    Set up parent pty before forking (bug 8490).
+    This avoids a race condition when the child reads the terminal settings
+    before the parent has set the pty up.
+
+commit 605d8b15add136788f1316534c275f0f6d0fe792
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date:   Tue Oct 31 17:05:20 2006 +0100
+
+    Added random IBM codepages to the encodings vector.
+    I didn't modify the locales vector -- people using non-standard encodings
+    should directly set the ISO 2022 state using -gr, -g2 and friends.
+
+commit 0318e87e279527ea0fba6c07b9d3e7ce5598c934
+Author: Juliusz Chroboczek <jch@pps.jussieu.fr>
+Date:   Tue Oct 31 01:22:36 2006 +0100
+
+    Updated COPYING.
+
+commit a4e6e5a6c618706d5375ff1a9ffc34cce23fcf76
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:43 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit b5e1535b07183305313ec74612525286b11d5deb
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:40 2005 +0000
+
+    Stub COPYING files
+
+commit 899331d63218a9ef190f3575811e76bced5d67e1
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:02 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit 9b949814b988ffb0d01bfd945b207bbb8379e573
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 8 17:55:17 2005 +0000
+
+    Add configure options to allow hard-coded paths to be changed.
+
+commit 6f19ff5947590d28e17fd86a47af38f2d3abf90d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:17 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 7cad59b8eb72df9c6c51c6deff4b353a0ce2f9e8
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:16 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit da7d5db0365ad51888dc262c0ed6b8e63c479af8
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:37 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 0970cf337c42939a1865048aef1a49782de5d3b0
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:34:56 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit aea3251136908221d6547f2dea67ea1e81a94acd
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:48 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit 22f85fed95a41f35410d49452a1ca891807fdf03
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:49 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit 52cd38a1849b80cdf8f393402061e259250ccee9
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:19 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 889af994115911897dbaff5d1262275d1a25fc73
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:41 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit 77bdecc7b28208b6a74f80d6ad169e4be81fc311
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:28 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit e751086392e8379b0a92dfdbe7b1effdbbf11b8d
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 15:11:56 2005 +0000
+
+    Define _XOPEN_SOURCE on Linux (patch from Stefan Dirsch)
+
+commit d235388c5d3130966c8524e041184fd52b668225
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:29 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit d9df2dbe4186d6662c40e364c527b157335d05c0
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:31:49 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit b9846be287e3f5a00b9012af2f060255bed4879f
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Wed Jul 6 16:30:11 2005 +0000
+
+    Build system for luit
+
+commit 94118c5d40a3b355eeafb95631c741574ba43342
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:54:35 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit 52c779f3fe3dd8116e6c54ec1cca05b89cecf0ca
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:34:54 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 86bdb1f20619208e22e27cc91dffc14e0cd91406
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:12:53 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 5d8090493ad08e657d1a57518ccf98d4b6a3885e
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:15 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit f466b8b816201dd6385e4897fcad7888dae3d502
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:23:55 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit c65c9b70829cf3e7e82729a7756cad05189c31ec
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Jan 29 08:09:01 2004 +0000
+
+    Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
+
+commit 0afe748d654f553771ee2f4b07ab1ccce30b9ddd
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:02 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit f0c47a47ea65135be8b78cd215ba4a67ecc44a57
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:57 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit 84208ce0135c0376208346d20a76add90d52aae4
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:57 2003 +0000
+
+    Initial revision
similarity index 100%
rename from xcalc/INSTALL
rename to luit/INSTALL
diff --git a/luit/Makefile.am b/luit/Makefile.am
new file mode 100644 (file)
index 0000000..8069670
--- /dev/null
@@ -0,0 +1,58 @@
+# 
+#  Copyright 2005  Red Hat, Inc.
+# 
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+# 
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+
+SUBDIRS=man
+bin_PROGRAMS = luit
+
+AM_CFLAGS =            \
+       $(CWARNFLAGS)   \
+       $(LUIT_CFLAGS)  \
+       $(OS_CFLAGS)    \
+       -DLOCALE_ALIAS_FILE=\"$(LOCALEALIASFILE)\"
+
+luit_LDADD = $(LUIT_LIBS)
+
+luit_SOURCES =         \
+        charset.c      \
+        charset.h      \
+        iso2022.c      \
+        iso2022.h      \
+        locale.c       \
+        luit.c         \
+        luit.h         \
+        other.c                \
+        other.h                \
+        parser.c       \
+        parser.h       \
+        sys.c          \
+        sys.h
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/luit/Makefile.in b/luit/Makefile.in
new file mode 100644 (file)
index 0000000..4de054e
--- /dev/null
@@ -0,0 +1,877 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 
+#  Copyright 2005  Red Hat, Inc.
+# 
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+# 
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = luit$(EXEEXT)
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+       $(top_srcdir)/configure COPYING ChangeLog INSTALL config.guess \
+       config.sub depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_luit_OBJECTS = charset.$(OBJEXT) iso2022.$(OBJEXT) locale.$(OBJEXT) \
+       luit.$(OBJEXT) other.$(OBJEXT) parser.$(OBJEXT) sys.$(OBJEXT)
+luit_OBJECTS = $(am_luit_OBJECTS)
+am__DEPENDENCIES_1 =
+luit_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(luit_SOURCES)
+DIST_SOURCES = $(luit_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
+DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FILE_MAN_DIR = @FILE_MAN_DIR@
+FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_MAN_DIR = @LIB_MAN_DIR@
+LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LOCALEALIASFILE = @LOCALEALIASFILE@
+LTLIBOBJS = @LTLIBOBJS@
+LUIT_CFLAGS = @LUIT_CFLAGS@
+LUIT_LIBS = @LUIT_LIBS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
+MISC_MAN_DIR = @MISC_MAN_DIR@
+MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+OS_CFLAGS = @OS_CFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = man
+AM_CFLAGS = \
+       $(CWARNFLAGS)   \
+       $(LUIT_CFLAGS)  \
+       $(OS_CFLAGS)    \
+       -DLOCALE_ALIAS_FILE=\"$(LOCALEALIASFILE)\"
+
+luit_LDADD = $(LUIT_LIBS)
+luit_SOURCES = \
+        charset.c      \
+        charset.h      \
+        iso2022.c      \
+        iso2022.h      \
+        locale.c       \
+        luit.c         \
+        luit.h         \
+        other.c                \
+        other.h                \
+        parser.c       \
+        parser.h       \
+        sys.c          \
+        sys.h
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+am--refresh:
+       @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+       else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+       rm -f stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+luit$(EXEEXT): $(luit_OBJECTS) $(luit_DEPENDENCIES) 
+       @rm -f luit$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(luit_OBJECTS) $(luit_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/charset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso2022.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locale.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/luit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/other.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @fail= failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+       @$(am__cd) '$(distuninstallcheck_dir)' \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(PROGRAMS) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+       ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am am--refresh check check-am clean clean-binPROGRAMS \
+       clean-generic ctags ctags-recursive dist dist-all dist-bzip2 \
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-binPROGRAMS install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-binPROGRAMS
+
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/luit/README b/luit/README
new file mode 100644 (file)
index 0000000..825d09e
--- /dev/null
@@ -0,0 +1,28 @@
+Luit is a filter that can be run between an arbitrary application and
+a UTF-8 terminal emulator such as xterm.  It will convert application
+output from the locale's encoding into UTF-8, and convert terminal
+input from UTF-8 into the locale's encoding.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/app/luit
+
+        http://cgit.freedesktop.org/xorg/app/luit
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
diff --git a/luit/acinclude.m4 b/luit/acinclude.m4
new file mode 100644 (file)
index 0000000..7e579f5
--- /dev/null
@@ -0,0 +1,116 @@
+dnl ---------------------------------------------------------------------------
+dnl
+dnl Copyright 2006-2009,2010 by Thomas E. Dickey
+dnl
+dnl                         All Rights Reserved
+dnl
+dnl Permission to use, copy, modify, and distribute this software and its
+dnl documentation for any purpose and without fee is hereby granted,
+dnl provided that the above copyright notice appear in all copies and that
+dnl both that copyright notice and this permission notice appear in
+dnl supporting documentation, and that the name of the above listed
+dnl copyright holder(s) not be used in advertising or publicity pertaining
+dnl to distribution of the software without specific, written prior
+dnl permission.
+dnl
+dnl THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+dnl TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+dnl AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+dnl LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl ---------------------------------------------------------------------------
+
+dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_POLL version: 4 updated: 2006/12/16 12:33:30
+dnl ------------
+dnl See if the poll function really works.  Some platforms have poll(), but
+dnl it does not work for terminals or files.
+AC_DEFUN([CF_FUNC_POLL],[
+AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[
+AC_TRY_RUN([
+#include <stdio.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <sys/poll.h>
+#endif
+int main() {
+       struct pollfd myfds;
+       int ret;
+
+       myfds.fd = 0;
+       myfds.events = POLLIN;
+
+       ret = poll(&myfds, 1, 100);
+       ${cf_cv_main_return:-return}(ret != 0);
+}],
+       [cf_cv_working_poll=yes],
+       [cf_cv_working_poll=no],
+       [cf_cv_working_poll=unknown])])
+test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL, 1, [poll() works])
+])dnl
+
+dnl ---------------------------------------------------------------------------
+dnl CF_SIGWINCH version: 1 updated: 2006/04/02 16:41:09
+dnl -----------
+dnl Use this macro after CF_XOPEN_SOURCE, but do not require it (not all
+dnl programs need this test).
+dnl
+dnl This is really a MacOS X 10.4.3 workaround.  Defining _POSIX_C_SOURCE
+dnl forces SIGWINCH to be undefined (breaks xterm, ncurses).  Oddly, the struct
+dnl winsize declaration is left alone - we may revisit this if Apple choose to
+dnl break that part of the interface as well.
+AC_DEFUN([CF_SIGWINCH],
+[
+AC_CACHE_CHECK(if SIGWINCH is defined,cf_cv_define_sigwinch,[
+       AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/signal.h>
+],[int x = SIGWINCH],
+       [cf_cv_define_sigwinch=yes],
+       [AC_TRY_COMPILE([
+#undef _XOPEN_SOURCE
+#undef _POSIX_SOURCE
+#undef _POSIX_C_SOURCE
+#include <sys/types.h>
+#include <sys/signal.h>
+],[int x = SIGWINCH],
+       [cf_cv_define_sigwinch=maybe],
+       [cf_cv_define_sigwinch=no])
+])
+])
+
+if test "$cf_cv_define_sigwinch" = maybe ; then
+AC_CACHE_CHECK(for actual SIGWINCH definition,cf_cv_fixup_sigwinch,[
+cf_cv_fixup_sigwinch=unknown
+cf_sigwinch=32
+while test $cf_sigwinch != 1
+do
+       AC_TRY_COMPILE([
+#undef _XOPEN_SOURCE
+#undef _POSIX_SOURCE
+#undef _POSIX_C_SOURCE
+#include <sys/types.h>
+#include <sys/signal.h>
+],[
+#if SIGWINCH != $cf_sigwinch
+make an error
+#endif
+int x = SIGWINCH],
+       [cf_cv_fixup_sigwinch=$cf_sigwinch
+        break])
+
+cf_sigwinch=`expr $cf_sigwinch - 1`
+done
+])
+
+       if test "$cf_cv_fixup_sigwinch" != unknown ; then
+               CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
+       fi
+fi
+])dnl
+
+
similarity index 95%
rename from xcalc/aclocal.m4
rename to luit/aclocal.m4
index 1af08a2..26857b2 100644 (file)
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                    [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test $pkg_failed = yes; then
-       AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+# serial 9
 
-       m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-$$1_PKG_ERRORS
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# serial 10
 
-_PKG_TEXT])[]dnl
-        ])
-elif test $pkg_failed = untried; then
-       AC_MSG_RESULT([no])
-       m4_default([$4], [AC_MSG_FAILURE(
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-_PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
-        ])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       $3
-fi[]dnl
-])# PKG_CHECK_MODULES
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
 
-dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
-dnl
-dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the "Software"),
-dnl to deal in the Software without restriction, including without limitation
-dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
-dnl and/or sell copies of the Software, and to permit persons to whom the
-dnl Software is furnished to do so, subject to the following conditions:
-dnl
-dnl The above copyright notice and this permission notice (including the next
-dnl paragraph) shall be included in all copies or substantial portions of the
-dnl Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-dnl DEALINGS IN THE SOFTWARE.
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To ensure that this macro is defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION],
-#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.11.0])
-m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
-m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
-m4_if(m4_cmp(maj_have, maj_needed), 0,,
-    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
-m4_if(m4_version_compare(vers_have, [$1]), -1,
-    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
-m4_undefine([vers_have])
-m4_undefine([maj_have])
-m4_undefine([maj_needed])
-]) # XORG_MACROS_VERSION
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
 
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       # under Cygwin unix is still defined even with -undef
-       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS="-undef -ansi"
-               AC_MSG_RESULT([yes, with -ansi])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
 else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
+  am_cv_$1_dependencies_compiler_type=none
 fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-# Added MAN_SUBSTS in version 1.8
-# Added AC_PROG_SED in version 1.8
 
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_SED])
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
 
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
 
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
+#serial 5
 
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-XORG_MAN_PAGE="X Version 11"
-AC_SUBST([XORG_MAN_PAGE])
-MAN_SUBSTS="\
-       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|\$(prefix)|g' \
-       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
-AC_SUBST([MAN_SUBSTS])
 
-]) # XORG_MANPAGE_SECTIONS
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
-# ------------------------
-# Minimum version: 1.7.0
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
 #
-# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
-# provided by xorg-sgml-doctools, if installed.
-AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
-AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
-XORG_SGML_PATH=
-PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
-    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
-    [m4_ifval([$1],[:],
-        [if test x"$cross_compiling" != x"yes" ; then
-            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
-                          [XORG_SGML_PATH=$prefix/share/sgml])
-         fi])
-    ])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
-# the path and the name of the doc stylesheet
-if test "x$XORG_SGML_PATH" != "x" ; then
-   AC_MSG_RESULT([$XORG_SGML_PATH])
-   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
-   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
-else
-   AC_MSG_RESULT([no])
-fi
+# serial 8
 
-AC_SUBST(XORG_SGML_PATH)
-AC_SUBST(STYLESHEET_SRCDIR)
-AC_SUBST(XSL_STYLESHEET)
-AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
-]) # XORG_CHECK_SGML_DOCTOOLS
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
-AC_REQUIRE([XORG_WITH_PS2PDF])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_PATH_PROG(LINUXDOC, linuxdoc)
+# serial 16
 
-AC_MSG_CHECKING([whether to build documentation])
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([whether to build pdf documentation])
-
-if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
+AC_SUBST([CYGPATH_W])
 
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
 
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([whether to build text documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
 
-AC_MSG_CHECKING([whether to build PDF documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-AC_MSG_CHECKING([whether to build PostScript documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([whether to build HTML documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+AC_SUBST(install_sh)])
 
-# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
-# ----------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package. When DEFAULT is not specified,
-# --with-xmlto assumes 'auto'.
-#
-# Interface to module:
-# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
-# XMLTO:       returns the path of the xmlto program found
-#              returns the path set by the user in the environment
-# --with-xmlto:        'yes' user instructs the module to use xmlto
-#              'no' user instructs the module not to use xmlto
-#
-# Added in version 1.10.0
-# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
-#                  xmlto for text output requires either lynx, links, or w3m browsers
-#
-# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_XMLTO],[
-AC_ARG_VAR([XMLTO], [Path to xmlto command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(xmlto,
-       AS_HELP_STRING([--with-xmlto],
-          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
-          [use_xmlto=$withval], [use_xmlto=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_xmlto" = x"auto"; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
-       have_xmlto=no
-   else
-        have_xmlto=yes
-   fi
-elif test "x$use_xmlto" = x"yes" ; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
-   fi
-   have_xmlto=yes
-elif test "x$use_xmlto" = x"no" ; then
-   if test "x$XMLTO" != "x"; then
-      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
-   fi
-   have_xmlto=no
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-# Test for a minimum version of xmlto, if provided.
-m4_ifval([$1],
-[if test "$have_xmlto" = yes; then
-    # scrape the xmlto version
-    AC_MSG_CHECKING([the xmlto version])
-    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
-    AC_MSG_RESULT([$xmlto_version])
-    AS_VERSION_COMPARE([$xmlto_version], [$1],
-        [if test "x$use_xmlto" = xauto; then
-            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
-            have_xmlto=no
-        else
-            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
-        fi])
-fi])
-
-# Test for the ability of xmlto to generate a text target
-have_xmlto_text=no
-cat > conftest.xml << "EOF"
-EOF
-AS_IF([test "$have_xmlto" = yes],
-      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
-             [have_xmlto_text=yes],
-             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
-rm -f conftest.xml
-AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
-AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
-]) # XORG_WITH_XMLTO
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
-# ----------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package. When DEFAULT is not specified,
-# --with-asciidoc assumes 'auto'.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Interface to module:
-# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
-# ASCIIDOC:     returns the path of the asciidoc program found
-#               returns the path set by the user in the environment
-# --with-asciidoc: 'yes' user instructs the module to use asciidoc
-#                'no' user instructs the module not to use asciidoc
-#
-# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_ASCIIDOC],[
-AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(asciidoc,
-       AS_HELP_STRING([--with-asciidoc],
-          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
-          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_asciidoc" = x"auto"; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
-       have_asciidoc=no
-   else
-        have_asciidoc=yes
-   fi
-elif test "x$use_asciidoc" = x"yes" ; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
-   fi
-   have_asciidoc=yes
-elif test "x$use_asciidoc" = x"no" ; then
-   if test "x$ASCIIDOC" != "x"; then
-      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
-   fi
-   have_asciidoc=no
-else
-   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-m4_ifval([$1],
-[if test "$have_asciidoc" = yes; then
-    # scrape the asciidoc version
-    AC_MSG_CHECKING([the asciidoc version])
-    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
-    AC_MSG_RESULT([$asciidoc_version])
-    AS_VERSION_COMPARE([$asciidoc_version], [$1],
-        [if test "x$use_asciidoc" = xauto; then
-            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
-            have_asciidoc=no
-        else
-            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
-        fi])
-fi])
-AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
-]) # XORG_WITH_ASCIIDOC
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
 
-# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
-# --------------------------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package. When DEFAULT is not specified,
-# --with-doxygen assumes 'auto'.
-#
-# Interface to module:
-# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
-# DOXYGEN:      returns the path of the doxygen program found
-#               returns the path set by the user in the environment
-# --with-doxygen: 'yes' user instructs the module to use doxygen
-#                'no' user instructs the module not to use doxygen
-#
-# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_DOXYGEN],[
-AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(doxygen,
-       AS_HELP_STRING([--with-doxygen],
-          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
-          [use_doxygen=$withval], [use_doxygen=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_doxygen" = x"auto"; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
-       have_doxygen=no
-   else
-        have_doxygen=yes
-   fi
-elif test "x$use_doxygen" = x"yes" ; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
-   fi
-   have_doxygen=yes
-elif test "x$use_doxygen" = x"no" ; then
-   if test "x$DOXYGEN" != "x"; then
-      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
-   fi
-   have_doxygen=no
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-m4_ifval([$1],
-[if test "$have_doxygen" = yes; then
-    # scrape the doxygen version
-    AC_MSG_CHECKING([the doxygen version])
-    doxygen_version=`$DOXYGEN --version 2>/dev/null`
-    AC_MSG_RESULT([$doxygen_version])
-    AS_VERSION_COMPARE([$doxygen_version], [$1],
-        [if test "x$use_doxygen" = xauto; then
-            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
-            have_doxygen=no
-        else
-            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
-        fi])
-fi])
-AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
-]) # XORG_WITH_DOXYGEN
+])
 
-# XORG_WITH_GROFF([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-groff option, it allows maximum flexibilty in making decisions
-# as whether or not to use the groff package. When DEFAULT is not specified,
-# --with-groff assumes 'auto'.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Interface to module:
-# HAVE_GROFF:   used in makefiles to conditionally generate documentation
-# HAVE_GROFF_MM: the memorandum macros (-mm) package
-# HAVE_GROFF_MS: the -ms macros package
-# GROFF:        returns the path of the groff program found
-#               returns the path set by the user in the environment
-# --with-groff:         'yes' user instructs the module to use groff
-#               'no' user instructs the module not to use groff
-#
-# Added in version 1.9.0:
-# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
-#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
-#                 psselect from the psutils package.
-#                 the ghostcript package. Refer to the grohtml man pages
-#
-# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
-#
-# OS and distros often splits groff in a basic and full package, the former
-# having the groff program and the later having devices, fonts and macros
-# Checking for the groff executable is not enough.
-#
-# If macros are missing, we cannot assume that groff is useless, so we don't
-# unset HAVE_GROFF or GROFF env variables.
-# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
-#
-AC_DEFUN([XORG_WITH_GROFF],[
-AC_ARG_VAR([GROFF], [Path to groff command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(groff,
-       AS_HELP_STRING([--with-groff],
-          [Use groff to regenerate documentation (default: ]_defopt[)]),
-          [use_groff=$withval], [use_groff=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_groff" = x"auto"; then
-   AC_PATH_PROG([GROFF], [groff])
-   if test "x$GROFF" = "x"; then
-        AC_MSG_WARN([groff not found - documentation targets will be skipped])
-       have_groff=no
-   else
-        have_groff=yes
-   fi
-elif test "x$use_groff" = x"yes" ; then
-   AC_PATH_PROG([GROFF], [groff])
-   if test "x$GROFF" = "x"; then
-        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
-   fi
-   have_groff=yes
-elif test "x$use_groff" = x"no" ; then
-   if test "x$GROFF" != "x"; then
-      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
-   fi
-   have_groff=no
-else
-   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
-fi
+# serial 4
 
-# We have groff, test for the presence of the macro packages
-if test "x$have_groff" = x"yes"; then
-    AC_MSG_CHECKING([for ${GROFF} -ms macros])
-    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
-        groff_ms_works=yes
-    else
-        groff_ms_works=no
-    fi
-    AC_MSG_RESULT([$groff_ms_works])
-    AC_MSG_CHECKING([for ${GROFF} -mm macros])
-    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
-        groff_mm_works=yes
-    else
-        groff_mm_works=no
-    fi
-    AC_MSG_RESULT([$groff_mm_works])
-fi
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# We have groff, test for HTML dependencies, one command per package
-if test "x$have_groff" = x"yes"; then
-   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
-   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
-   AC_PATH_PROG(PSSELECT_PATH, [psselect])
-   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
-      have_groff_html=yes
-   else
-      have_groff_html=no
-      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
-   fi
-fi
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
-# Set Automake conditionals for Makefiles
-AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
-AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
-AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
-AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
-]) # XORG_WITH_GROFF
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
-# XORG_WITH_FOP([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-fop option, it allows maximum flexibilty in making decisions
-# as whether or not to use the fop package. When DEFAULT is not specified,
-# --with-fop assumes 'auto'.
-#
-# Interface to module:
-# HAVE_FOP:    used in makefiles to conditionally generate documentation
-# FOP:         returns the path of the fop program found
-#              returns the path set by the user in the environment
-# --with-fop:  'yes' user instructs the module to use fop
-#              'no' user instructs the module not to use fop
-#
-# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
-#
-AC_DEFUN([XORG_WITH_FOP],[
-AC_ARG_VAR([FOP], [Path to fop command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(fop,
-       AS_HELP_STRING([--with-fop],
-          [Use fop to regenerate documentation (default: ]_defopt[)]),
-          [use_fop=$withval], [use_fop=]_defopt)
-m4_undefine([_defopt])
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-if test "x$use_fop" = x"auto"; then
-   AC_PATH_PROG([FOP], [fop])
-   if test "x$FOP" = "x"; then
-        AC_MSG_WARN([fop not found - documentation targets will be skipped])
-       have_fop=no
-   else
-        have_fop=yes
-   fi
-elif test "x$use_fop" = x"yes" ; then
-   AC_PATH_PROG([FOP], [fop])
-   if test "x$FOP" = "x"; then
-        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
-   fi
-   have_fop=yes
-elif test "x$use_fop" = x"no" ; then
-   if test "x$FOP" != "x"; then
-      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
-   fi
-   have_fop=no
-else
-   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
-fi
-AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
-]) # XORG_WITH_FOP
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# XORG_WITH_PS2PDF([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
-# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
-# --with-ps2pdf assumes 'auto'.
-#
-# Interface to module:
-# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
-# PS2PDF:      returns the path of the ps2pdf program found
-#              returns the path set by the user in the environment
-# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
-#               'no' user instructs the module not to use ps2pdf
-#
-# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_PS2PDF],[
-AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(ps2pdf,
-       AS_HELP_STRING([--with-ps2pdf],
-          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
-          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_ps2pdf" = x"auto"; then
-   AC_PATH_PROG([PS2PDF], [ps2pdf])
-   if test "x$PS2PDF" = "x"; then
-        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
-       have_ps2pdf=no
-   else
-        have_ps2pdf=yes
-   fi
-elif test "x$use_ps2pdf" = x"yes" ; then
-   AC_PATH_PROG([PS2PDF], [ps2pdf])
-   if test "x$PS2PDF" = "x"; then
-        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
-   have_ps2pdf=yes
-elif test "x$use_ps2pdf" = x"no" ; then
-   if test "x$PS2PDF" != "x"; then
-      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
    fi
-   have_ps2pdf=no
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
 fi
-AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
-]) # XORG_WITH_PS2PDF
+AC_MSG_RESULT(yes)])
 
-# XORG_ENABLE_DOCS (enable_docs=yes)
-# ----------------
-# Minimum version: 1.6.0
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a builder to skip all
-# documentation targets except traditional man pages.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
-# --enable-docs: 'yes' user instructs the module to generate docs
-#               'no' user instructs the module not to generate docs
-# parm1:       specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_DOCS],[
-m4_define([default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(docs,
-       AS_HELP_STRING([--enable-docs],
-          [Enable building the documentation (default: ]default[)]),
-          [build_docs=$enableval], [build_docs=]default)
-m4_undefine([default])
-AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
-AC_MSG_CHECKING([whether to build documentation])
-AC_MSG_RESULT([$build_docs])
-]) # XORG_ENABLE_DOCS
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
-# ----------------
-# Minimum version: 1.6.0
-#
-# This macro enables a builder to skip all developer documentation.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
-# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
-#                      'no' user instructs the module not to generate developer docs
-# parm1:               specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
-m4_define([devel_default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(devel-docs,
-       AS_HELP_STRING([--enable-devel-docs],
-          [Enable building the developer documentation (default: ]devel_default[)]),
-          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
-m4_undefine([devel_default])
-AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
-AC_MSG_CHECKING([whether to build developer documentation])
-AC_MSG_RESULT([$build_devel_docs])
-]) # XORG_ENABLE_DEVEL_DOCS
+# serial 1
 
-# XORG_ENABLE_SPECS (enable_specs=yes)
-# ----------------
-# Minimum version: 1.6.0
-#
-# This macro enables a builder to skip all functional specification targets.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_SPECS:                used in makefiles to conditionally generate specs
-# --enable-specs:      'yes' user instructs the module to generate specs
-#                      'no' user instructs the module not to generate specs
-# parm1:               specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_SPECS],[
-m4_define([spec_default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(specs,
-       AS_HELP_STRING([--enable-specs],
-          [Enable building the specs (default: ]spec_default[)]),
-          [build_specs=$enableval], [build_specs=]spec_default)
-m4_undefine([spec_default])
-AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
-AC_MSG_CHECKING([whether to build functional specifications])
-AC_MSG_RESULT([$build_specs])
-]) # XORG_ENABLE_SPECS
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AS_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no],
-               [MALLOC_ZERO_RETURNS_NULL=yes])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
 fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# This macro enables the use of a tool that flags some suspicious and
-# non-portable constructs (likely to be bugs) in C language source code.
-# It will attempt to locate the tool and use appropriate options.
-# There are various lint type tools on different platforms.
-#
-# Interface to module:
-# LINT:                returns the path to the tool found on the platform
-#              or the value set to LINT on the configure cmd line
-#              also an Automake conditional
-# LINT_FLAGS:  an Automake variable with appropriate flags
-#
-# --with-lint: 'yes' user instructs the module to use lint
-#              'no' user instructs the module not to use lint (default)
-#
-# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
-# If the user sets the value of LINT_FLAGS, they are used verbatim.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_LINT],[
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_ARG_VAR([LINT], [Path to a lint-style command])
-AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
-AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
+# serial 2
 
-# Obtain platform specific info like program name and options
-# The lint program on FreeBSD and NetBSD is different from the one on Solaris
-case $host_os in
-  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
-       lint_name=splint
-       lint_options="-badflag"
-       ;;
-  *freebsd* | *netbsd*)
-       lint_name=lint
-       lint_options="-u -b"
-       ;;
-  *solaris*)
-       lint_name=lint
-       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-       ;;
-esac
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
 
-# Test for the presence of the program (either guessed by the code or spelled out by the user)
-if test "x$use_lint" = x"yes" ; then
-   AC_PATH_PROG([LINT], [$lint_name])
-   if test "x$LINT" = "x"; then
-        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
-   fi
-elif test "x$use_lint" = x"no" ; then
-   if test "x$LINT" != "x"; then
-      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
-   fi
-else
-   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
-fi
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
-# User supplied flags override default flags
-if test "x$LINT_FLAGS" != "x"; then
-   lint_options=$LINT_FLAGS
-fi
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-AC_SUBST([LINT_FLAGS],[$lint_options])
-AM_CONDITIONAL(LINT, [test "x$LINT" != x])
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-]) # XORG_WITH_LINT
+# serial 2
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# Interface to module:
-# LINTLIB              - Automake variable with the name of lint library file to make
-# MAKE_LINT_LIB                - Automake conditional
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
 #
-# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
-#                        - 'no' user instructs the module not to create a lint library (default)
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-if test "x$make_lint_lib" = x"yes" ; then
-   LINTLIB=llib-l$1.ln
-   if test "x$LINT" = "x"; then
-        AC_MSG_ERROR([Cannot make lint library without --with-lint])
-   fi
-elif test "x$make_lint_lib" != x"no" ; then
-   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
-fi
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
 
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
-]) # XORG_LINT_LIBRARY
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
-# XORG_CWARNFLAGS
-# ---------------
-# Minimum version: 1.2.0
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
 #
-# Defines CWARNFLAGS to enable C compiler warnings.
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
 #
-AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC_C99])
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-]) # XORG_CWARNFLAGS
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.1])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
 
-# XORG_STRICT_OPTION
-# -----------------------
-# Minimum version: 1.3.0
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
 #
-# Add configure option to enable strict compilation
-AC_DEFUN([XORG_STRICT_OPTION], [
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
-AC_REQUIRE([AC_PROG_CC_C99])
-AC_REQUIRE([XORG_CWARNFLAGS])
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
-AC_ARG_ENABLE(strict-compilation,
-                         AS_HELP_STRING([--enable-strict-compilation],
-                         [Enable all warnings from compiler and make them errors (default: disabled)]),
-                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
-if test "x$STRICT_COMPILE" = "xyes"; then
-       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
-       if test "x$GCC" = xyes ; then
-               STRICT_CFLAGS="-pedantic -Werror"
-       elif test "x$SUNCC" = "xyes"; then
-               STRICT_CFLAGS="-errwarn"
-    elif test "x$INTELCC" = "xyes"; then
-               STRICT_CFLAGS="-Werror"
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
        fi
 fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
-]) # XORG_STRICT_OPTION
+rm -f conftest.$ac_ext
 
-# XORG_DEFAULT_OPTIONS
-# --------------------
-# Minimum version: 1.3.0
-#
-# Defines default options for X.Org modules.
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
+
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-AC_DEFUN([XORG_DEFAULT_OPTIONS], [
-AC_REQUIRE([AC_PROG_INSTALL])
-XORG_CWARNFLAGS
-XORG_STRICT_OPTION
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-XORG_INSTALL
-XORG_MANPAGE_SECTIONS
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
-    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
-]) # XORG_DEFAULT_OPTIONS
-
-# XORG_INSTALL()
-# ----------------
-# Minimum version: 1.4.0
-#
-# Defines the variable INSTALL_CMD as the command to copy
-# INSTALL from $prefix/share/util-macros.
-#
-AC_DEFUN([XORG_INSTALL], [
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
-INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-AC_SUBST([INSTALL_CMD])
-]) # XORG_INSTALL
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
-])
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
-# XORG_CHANGELOG()
-# ----------------
-# Minimum version: 1.2.0
-#
-# Defines the variable CHANGELOG_CMD as the command to generate
-# ChangeLog from git.
-#
-#
-AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-AC_SUBST([CHANGELOG_CMD])
-]) # XORG_CHANGELOG
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
 
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+]) # XORG_MANPAGE_SECTIONS
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
 else
-  $1_TRUE='#'
-  $1_FALSE=
+   AC_MSG_RESULT([no])
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+AC_PATH_PROG(LINUXDOC, linuxdoc)
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+AC_MSG_CHECKING([whether to build documentation])
 
-  cd ..
-  rm -rf conftest.dir
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
 else
-  am_cv_$1_dependencies_compiler_type=none
+   BUILDDOC=no
 fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
 
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_MSG_RESULT([$BUILDDOC])
 
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
 fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
 
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# serial 8
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
+fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# serial 16
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
+fi
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
+
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
 fi
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
 fi
-AC_SUBST([CYGPATH_W])
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
 
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES(CC)],
-                 [define([AC_PROG_CC],
-                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES(CXX)],
-                 [define([AC_PROG_CXX],
-                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES(OBJC)],
-                 [define([AC_PROG_OBJC],
-                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
 
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
 
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
 fi
-AC_SUBST(install_sh)])
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
 else
-  am__leading_dot=_
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
 
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
 
-# serial 4
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
 
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
 
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
 
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+]) # XORG_WITH_LINT
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
+fi
 
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+]) # XORG_LINT_LIBRARY
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
 
-# serial 5
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
 
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
-AC_MSG_RESULT(yes)])
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-# serial 1
 
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
-# serial 2
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
 
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-# serial 2
+$$1_PKG_ERRORS
 
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+_PKG_TEXT
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
+m4_include([acinclude.m4])
diff --git a/luit/charset.c b/luit/charset.c
new file mode 100644 (file)
index 0000000..c74f262
--- /dev/null
@@ -0,0 +1,591 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "sys.h"
+#include "other.h"
+#include "charset.h"
+#include "parser.h"
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+static unsigned int
+IdentityRecode(unsigned int n, const CharsetRec * self GCC_UNUSED)
+{
+    return n;
+}
+
+#ifdef UNUSED
+static int
+IdentityReverse(unsigned int n, const CharsetRec * self)
+{
+#define IS_GL(n) ((n) >= 0x20 && (n) < 0x80)
+    switch (self->type) {
+    case T_94:
+    case T_96:
+       if (IS_GL(n))
+           return n;
+       else
+           return -1;
+    case T_128:
+       if (n < 0x80)
+           return n;
+       else
+           return -1;
+    case T_9494:
+    case T_9696:
+       if (IS_GL(n >> 8) && IS_GL(n & 0xFF))
+           return n;
+       else
+           return -1;
+    case T_94192:
+       if (IS_GL(n >> 8) && IS_GL(n & 0x7F))
+           return n;
+       else
+           return -1;
+    default:
+       abort();
+       /* NOTREACHED */
+    }
+#undef IS_GL
+}
+#endif
+
+static int
+NullReverse(unsigned int n GCC_UNUSED, const CharsetRec * self GCC_UNUSED)
+{
+    return -1;
+}
+
+static const CharsetRec Unknown94Charset =
+{"Unknown (94)", T_94, 0, IdentityRecode, NullReverse, 0, 0, 0, 0, 0, 0};
+static const CharsetRec Unknown96Charset =
+{"Unknown (96)", T_96, 0, IdentityRecode, NullReverse, 0, 0, 0, 0, 0, 0};
+static const CharsetRec Unknown9494Charset =
+{"Unknown (94x94)", T_9494, 0, IdentityRecode, NullReverse, 0, 0, 0, 0, 0, 0};
+static const CharsetRec Unknown9696Charset =
+{"Unknown (96x96)", T_9696, 0, IdentityRecode, NullReverse, 0, 0, 0, 0, 0, 0};
+
+typedef struct _FontencCharset {
+    const char *name;
+    int type;
+    unsigned char final;
+    const char *xlfd;
+    unsigned shift;
+    FontMapPtr mapping;
+    FontMapReversePtr reverse;
+} FontencCharsetRec, *FontencCharsetPtr;
+/* *INDENT-OFF* */
+static FontencCharsetRec fontencCharsets[] =
+{
+    {"ISO 646 (1973)", T_94,    '@', "iso646.1973-0",    0x00,   0, 0},
+    {"ASCII",          T_94,    'B', "iso8859-1",        0x00,   0, 0},
+    {"JIS X 0201:GL",  T_94,    'J', "jisx0201.1976-0",  0x00,   0, 0},
+    {"JIS X 0201:GR",  T_94,    'I', "jisx0201.1976-0",  0x80,   0, 0},
+    {"DEC Special",    T_94,    '0', "dec-special",      0x00,   0, 0},
+    {"DEC Technical",  T_94,    '>', "dec-dectech",      0x00,   0, 0},
+
+    {"ISO 8859-1",     T_96,    'A', "iso8859-1",        0x80,   0, 0},
+    {"ISO 8859-2",     T_96,    'B', "iso8859-2",        0x80,   0, 0},
+    {"ISO 8859-3",     T_96,    'C', "iso8859-3",        0x80,   0, 0},
+    {"ISO 8859-4",     T_96,    'D', "iso8859-4",        0x80,   0, 0},
+    {"ISO 8859-5",     T_96,    'L', "iso8859-5",        0x80,   0, 0},
+    {"ISO 8859-6",     T_96,    'G', "iso8859-6",        0x80,   0, 0},
+    {"ISO 8859-7",     T_96,    'F', "iso8859-7",        0x80,   0, 0},
+    {"ISO 8859-8",     T_96,    'H', "iso8859-8",        0x80,   0, 0},
+    {"ISO 8859-9",     T_96,    'M', "iso8859-9",        0x80,   0, 0},
+    {"ISO 8859-10",    T_96,    'V', "iso8859-10",       0x80,   0, 0},
+    {"ISO 8859-11",    T_96,    'T', "iso8859-11",       0x80,   0, 0},
+    {"TIS 620",        T_96,    'T', "iso8859-11",       0x80,   0, 0},
+    {"ISO 8859-13",    T_96,    'Y', "iso8859-13",       0x80,   0, 0},
+    {"ISO 8859-14",    T_96,    '_', "iso8859-14",       0x80,   0, 0},
+    {"ISO 8859-15",    T_96,    'b', "iso8859-15",       0x80,   0, 0},
+    {"ISO 8859-16",    T_96,    'f', "iso8859-16",       0x80,   0, 0},
+    {"KOI8-E",         T_96,    '@', "koi8-e",           0x80,   0, 0},
+    {"TCVN",           T_96,    'Z', "tcvn-0",           0x80,   0, 0},
+
+    {"GB 2312",        T_9494,  'A', "gb2312.1980-0",    0x0000, 0, 0},
+    {"JIS X 0208",     T_9494,  'B', "jisx0208.1990-0",  0x0000, 0, 0},
+    {"KSC 5601",       T_9494,  'C', "ksc5601.1987-0",   0x0000, 0, 0},
+    {"JIS X 0212",     T_9494,  'D', "jisx0212.1990-0",  0x0000, 0, 0},
+
+    {"GB 2312",        T_9696,  'A', "gb2312.1980-0",    0x0000, 0, 0},
+    {"JIS X 0208",     T_9696,  'B', "jisx0208.1990-0",  0x0000, 0, 0},
+    {"KSC 5601",       T_9696,  'C', "ksc5601.1987-0",   0x0000, 0, 0},
+    {"JIS X 0212",     T_9696,  'D', "jisx0212.1990-0",  0x0000, 0, 0},
+
+    {"KOI8-R",         T_128,   0,   "koi8-r",           0x80,   0, 0},
+    {"KOI8-U",         T_128,   0,   "koi8-u",           0x80,   0, 0},
+    {"KOI8-RU",        T_128,   0,   "koi8-ru",          0x80,   0, 0},
+    {"CP 1252",        T_128,   0,   "microsoft-cp1252", 0x80,   0, 0},
+    {"CP 1251",        T_128,   0,   "microsoft-cp1251", 0x80,   0, 0},
+    {"CP 1250",        T_128,   0,   "microsoft-cp1250", 0x80,   0, 0},
+
+    {"CP 437",         T_128,   0,   "ibm-cp437",        0x80,   0, 0},
+    {"CP 850",         T_128,   0,   "ibm-cp850",        0x80,   0, 0},
+    {"CP 866",         T_128,   0,   "ibm-cp866",        0x80,   0, 0},
+
+    {"Big 5",          T_94192, 0,   "big5.eten-0",      0x8000, 0, 0},
+    {0,                0,       0,   0,                  0,      0, 0}
+};
+/* *INDENT-ON* */
+
+typedef struct _OtherCharset {
+    const char *name;
+    int (*init) (OtherStatePtr);
+    unsigned int (*mapping) (unsigned int, OtherStatePtr);
+    unsigned int (*reverse) (unsigned int, OtherStatePtr);
+    int (*stack) (unsigned, OtherStatePtr);
+} OtherCharsetRec, *OtherCharsetPtr;
+
+static const OtherCharsetRec otherCharsets[] =
+{
+    {"GBK", init_gbk, mapping_gbk, reverse_gbk, stack_gbk},
+    {"UTF-8", init_utf8, mapping_utf8, reverse_utf8, stack_utf8},
+    {"SJIS", init_sjis, mapping_sjis, reverse_sjis, stack_sjis},
+    {"BIG5-HKSCS", init_hkscs, mapping_hkscs, reverse_hkscs, stack_hkscs},
+    {"GB18030", init_gb18030, mapping_gb18030, reverse_gb18030, stack_gb18030},
+    {0, 0, 0, 0, 0}
+};
+
+static int
+compare(const char *s, const char *t)
+{
+    while (*s || *t) {
+       if (*s && (isspace(UChar(*s)) || *s == '-' || *s == '_'))
+           s++;
+       else if (*t && (isspace(UChar(*t)) || *t == '-' || *t == '_'))
+           t++;
+       else if (*s && *t && tolower(UChar(*s)) == tolower(UChar(*t))) {
+           s++;
+           t++;
+       } else
+           return 1;
+    }
+    return 0;
+}
+
+static unsigned int
+FontencCharsetRecode(unsigned int n, const CharsetRec * self)
+{
+    const FontencCharsetRec *fc = (const FontencCharsetRec *) (self->data);
+
+    return FontEncRecode(n + fc->shift, fc->mapping);
+}
+
+static int
+FontencCharsetReverse(unsigned int i, const CharsetRec * self)
+{
+    const FontencCharsetRec *fc = (const FontencCharsetRec *) (self->data);
+    unsigned n;
+
+    n = fc->reverse->reverse(i, fc->reverse->data);
+    if (n == 0 || n < fc->shift)
+       return -1;
+    else
+       n -= fc->shift;
+
+#define IS_GL(n) ((n) >= 0x20 && (n) < 0x80)
+    switch (self->type) {
+    case T_94:
+    case T_96:
+       if (IS_GL(n))
+           return (int) n;
+       else
+           return -1;
+    case T_128:
+       if (n < 0x80)
+           return (int) n;
+       else
+           return -1;
+    case T_9494:
+    case T_9696:
+       if (IS_GL(n >> 8) && IS_GL(n & 0xFF))
+           return (int) n;
+       else
+           return -1;
+    case T_94192:
+       if (IS_GL(n >> 8) && IS_GL(n & 0x7F))
+           return (int) n;
+       else
+           return -1;
+    default:
+       abort();
+       /* NOTREACHED */
+    }
+#undef IS_GL
+}
+
+static CharsetPtr cachedCharsets = NULL;
+
+static CharsetPtr
+getCachedCharset(unsigned final, int type, const char *name)
+{
+    CharsetPtr c;
+    for (c = cachedCharsets; c; c = c->next) {
+       if (((c->type == type && c->final == final) ||
+            (name && !compare(c->name, name))) &&
+           (c->type != T_FAILED))
+           return c;
+    }
+    return NULL;
+}
+
+static void
+cacheCharset(CharsetPtr c)
+{
+    c->next = cachedCharsets;
+    cachedCharsets = c;
+}
+
+static CharsetPtr
+getFontencCharset(unsigned final, int type, const char *name)
+{
+    FontencCharsetPtr fc;
+    CharsetPtr c;
+    FontMapPtr mapping;
+    FontMapReversePtr reverse;
+
+    fc = fontencCharsets;
+    while (fc->name) {
+       if (((fc->type == type && fc->final == final) ||
+            (name && !compare(fc->name, name))) &&
+           (fc->type != T_FAILED))
+           break;
+       fc++;
+    }
+
+    if (!fc->name)
+       return NULL;
+
+    c = malloc(sizeof(CharsetRec));
+    if (c == NULL)
+       return NULL;
+
+    mapping = FontEncMapFind(fc->xlfd, FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!mapping) {
+       fc->type = T_FAILED;
+       return NULL;
+    }
+
+    reverse = FontMapReverse(mapping);
+    if (!reverse) {
+       fc->type = T_FAILED;
+       return NULL;
+    }
+
+    fc->mapping = mapping;
+    fc->reverse = reverse;
+
+    c->name = fc->name;
+    c->type = fc->type;
+    c->final = fc->final;
+    c->recode = FontencCharsetRecode;
+    c->reverse = FontencCharsetReverse;
+    c->data = fc;
+
+    cacheCharset(c);
+    return c;
+}
+
+static CharsetPtr
+getOtherCharset(const char *name)
+{
+    const OtherCharsetRec *fc;
+    CharsetPtr c;
+    OtherStatePtr s;
+
+    fc = otherCharsets;
+    while (fc->name) {
+       if (name && !compare(fc->name, name))
+           break;
+       fc++;
+    }
+
+    if (!fc->name)
+       return NULL;
+
+    c = malloc(sizeof(CharsetRec));
+    if (c == NULL)
+       return NULL;
+
+    s = malloc(sizeof(OtherState));
+    if (s == NULL) {
+       free(c);
+       return NULL;
+    }
+
+    c->name = fc->name;
+    c->type = T_OTHER;
+    c->final = 0;
+    c->data = fc;
+    c->other_recode = fc->mapping;
+    c->other_reverse = fc->reverse;
+    c->other_stack = fc->stack;
+    c->other_aux = s;
+
+    if (!fc->init(s)) {
+       c->type = T_FAILED;
+       return NULL;
+    }
+
+    cacheCharset(c);
+    return c;
+}
+
+const CharsetRec *
+getUnknownCharset(int type)
+{
+    switch (type) {
+    case T_94:
+       return &Unknown94Charset;
+    case T_96:
+       return &Unknown96Charset;
+    case T_9494:
+       return &Unknown9494Charset;
+    case T_9696:
+       return &Unknown9696Charset;
+    default:
+       return &Unknown94Charset;
+    }
+}
+
+const CharsetRec *
+getCharset(unsigned final, int type)
+{
+    const CharsetRec *c;
+
+    c = getCachedCharset(final, type, NULL);
+    if (c)
+       return c;
+
+    c = getFontencCharset(final, type, NULL);
+    if (c)
+       return c;
+
+    return getUnknownCharset(type);
+}
+
+const CharsetRec *
+getCharsetByName(const char *name)
+{
+    const CharsetRec *c;
+
+    if (name == NULL)
+       return getUnknownCharset(T_94);
+
+    c = getCachedCharset(0, 0, name);
+    if (c)
+       return c;
+
+    c = getFontencCharset(0, 0, name);
+    if (c)
+       return c;
+
+    c = getOtherCharset(name);
+    if (c)
+       return c;
+
+    return getUnknownCharset(T_94);
+}
+/* *INDENT-OFF* */
+static const LocaleCharsetRec localeCharsets[] =
+{
+    {"C",          0, 2, "ASCII", NULL,         "ISO 8859-1",    NULL,         NULL},
+    {"POSIX",      0, 2, "ASCII", NULL,         "ISO 8859-1",    NULL,         NULL},
+    {"ISO8859-1",  0, 2, "ASCII", NULL,         "ISO 8859-1",    NULL,         NULL},
+    {"ISO8859-2",  0, 2, "ASCII", NULL,         "ISO 8859-2",    NULL,         NULL},
+    {"ISO8859-3",  0, 2, "ASCII", NULL,         "ISO 8859-3",    NULL,         NULL},
+    {"ISO8859-4",  0, 2, "ASCII", NULL,         "ISO 8859-4",    NULL,         NULL},
+    {"ISO8859-5",  0, 2, "ASCII", NULL,         "ISO 8859-5",    NULL,         NULL},
+    {"ISO8859-6",  0, 2, "ASCII", NULL,         "ISO 8859-6",    NULL,         NULL},
+    {"ISO8859-7",  0, 2, "ASCII", NULL,         "ISO 8859-7",    NULL,         NULL},
+    {"ISO8859-8",  0, 2, "ASCII", NULL,         "ISO 8859-8",    NULL,         NULL},
+    {"ISO8859-9",  0, 2, "ASCII", NULL,         "ISO 8859-9",    NULL,         NULL},
+    {"ISO8859-10", 0, 2, "ASCII", NULL,         "ISO 8859-10",   NULL,         NULL},
+    {"ISO8859-11", 0, 2, "ASCII", NULL,         "ISO 8859-11",   NULL,         NULL},
+    {"TIS620",     0, 2, "ASCII", NULL,         "ISO 8859-11",   NULL,         NULL},
+    {"ISO8859-13", 0, 2, "ASCII", NULL,         "ISO 8859-13",   NULL,         NULL},
+    {"ISO8859-14", 0, 2, "ASCII", NULL,         "ISO 8859-14",   NULL,         NULL},
+    {"ISO8859-15", 0, 2, "ASCII", NULL,         "ISO 8859-15",   NULL,         NULL},
+    {"ISO8859-16", 0, 2, "ASCII", NULL,         "ISO 8859-16",   NULL,         NULL},
+    {"KOI8-R",     0, 2, "ASCII", NULL,         "KOI8-R",        NULL,         NULL},
+    {"CP1251",     0, 2, "ASCII", NULL,         "CP 1251",       NULL,         NULL},
+    {"TCVN",       0, 2, "ASCII", NULL,         "TCVN",          NULL,         NULL},
+    {"eucCN",      0, 1, "ASCII", "GB 2312",    NULL,            NULL,         NULL},
+    {"GB2312",     0, 1, "ASCII", "GB 2312",    NULL,            NULL,         NULL},
+    {"eucJP",      0, 1, "ASCII", "JIS X 0208", "JIS X 0201:GR", "JIS X 0212", NULL},
+    {"eucKR",      0, 1, "ASCII", "KSC 5601",   NULL,            NULL,         NULL},
+    {"eucCN",      0, 1, "ASCII", "GB 2312",    NULL,            NULL,         NULL},
+    {"Big5",       0, 1, "ASCII", "Big 5",      NULL,            NULL,         NULL},
+    {"gbk",        0, 1, NULL,    NULL,         NULL,            NULL,         "GBK"},
+    {"UTF-8",      0, 1, NULL,    NULL,         NULL,            NULL,         "UTF-8"},
+    {"SJIS",       0, 1, NULL,    NULL,         NULL,            NULL,         "SJIS"},
+    {"Big5-HKSCS", 0, 1, NULL,    NULL,         NULL,            NULL,         "BIG5-HKSCS"},
+    {"gb18030",    0, 1, NULL,    NULL,         NULL,            NULL,         "GB18030"},
+    {0,            0, 0, 0,       0,            0,               0,            0}
+};
+/* *INDENT-ON* */
+
+void
+reportCharsets(void)
+{
+    const LocaleCharsetRec *p;
+    FontencCharsetPtr q;
+    printf("Known locale encodings:\n\n");
+    for (p = localeCharsets; p->name; p++) {
+       if (p->other) {
+           printf("  %s (non-ISO-2022 encoding)\n", p->other);
+           continue;
+       }
+       printf("  %s: GL -> G%d, GR -> G%d", p->name, p->gl, p->gr);
+       if (p->g0)
+           printf(", G0: %s", p->g0);
+       if (p->g1)
+           printf(", G1: %s", p->g1);
+       if (p->g2)
+           printf(", G2: %s", p->g2);
+       if (p->g3)
+           printf(", G3: %s", p->g3);
+       printf("\n");
+    }
+
+    printf("\n\nKnown charsets (not all may be available):\n\n");
+    for (q = fontencCharsets; q->name; q++)
+       printf("  %s%s\n",
+              q->name, q->final ? " (ISO 2022)" : "");
+}
+
+int
+getLocaleState(const char *locale,
+              const char *charset,
+              int *gl_return, int *gr_return,
+              const CharsetRec * *g0_return,
+              const CharsetRec * *g1_return,
+              const CharsetRec * *g2_return,
+              const CharsetRec * *g3_return,
+              const CharsetRec * *other_return)
+{
+    int result = 0;
+    char *resolved = 0;
+    const LocaleCharsetRec *p;
+
+    if (!charset) {
+       resolved = resolveLocale(locale);
+       if (!resolved)
+           return -1;
+       charset = strrchr(resolved, '.');
+       if (charset)
+           charset++;
+       else
+           charset = resolved;
+    }
+
+    for (p = localeCharsets; p->name; p++) {
+       if (compare(p->name, charset) == 0)
+           break;
+    }
+
+    if (p->name == NULL) {
+       result = -1;
+    } else {
+
+       *gl_return = p->gl;
+       *gr_return = p->gr;
+       *g0_return = getCharsetByName(p->g0);
+       *g1_return = getCharsetByName(p->g1);
+       *g2_return = getCharsetByName(p->g2);
+       *g3_return = getCharsetByName(p->g3);
+       if (p->other)
+           *other_return = getCharsetByName(p->other);
+       else
+           *other_return = NULL;
+    }
+    if (resolved != 0)
+       free(resolved);
+    return result;
+}
+
+#ifdef NO_LEAKS
+static int
+isUnknownCharsetPtr(CharsetPtr p)
+{
+    return (p == &Unknown94Charset
+           || p == &Unknown96Charset
+           || p == &Unknown9494Charset
+           || p == &Unknown9696Charset);
+}
+
+static void
+destroyFontencCharsetPtr(FontencCharsetPtr p)
+{
+    p->mapping = 0;
+
+    /*
+     * This should, but does not work -
+     *     FontMapReverseFree(p->reverse)
+     *
+     * The iteration for map[] is based on reading the source of
+     * FontMapReverse().
+     */
+    if (p->reverse) {
+       int n;
+       unsigned **map = p->reverse->data;
+       for (n = 0; n < 256; ++n) {
+           if (map[n])
+               free(map[n]);
+       }
+       free(p->reverse->data);
+       free(p->reverse);
+       p->reverse = 0;
+    }
+}
+
+static void
+destroyCharset(CharsetPtr p)
+{
+    if (!isUnknownCharsetPtr(p)) {
+       destroyFontencCharsetPtr(p->data);
+       free(p);
+    }
+}
+
+void
+charset_leaks(void)
+{
+    while (cachedCharsets != 0) {
+       CharsetPtr next = cachedCharsets->next;
+       destroyCharset(cachedCharsets);
+       cachedCharsets = next;
+    }
+}
+#endif
diff --git a/luit/charset.h b/luit/charset.h
new file mode 100644 (file)
index 0000000..3600329
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+/* $XFree86: xc/programs/luit/charset.h,v 1.4 2002/10/17 01:06:09 dawes Exp $ */
+
+#ifndef LUIT_CHARSET_H
+#define LUIT_CHARSET_H 1
+
+#include "other.h"
+
+#define T_FAILED 0
+#define T_94 1
+#define T_96 2
+#define T_128 3
+#define T_9494 4
+#define T_9696 5
+/* Big 5 */
+#define T_94192 6
+#define T_OTHER 7
+
+/* True for charsets that pass control chars unchanged, at least in
+   the first byte */
+#define CHARSET_REGULAR(c) ((c)->type != T_128)
+
+typedef struct _Charset {
+    const char *name;
+    int type;
+    unsigned char final;
+    unsigned int (*recode) (unsigned int, const struct _Charset * self);
+    int (*reverse) (unsigned int, const struct _Charset * self);
+    const void *data;
+    int (*other_stack) (unsigned c, OtherStatePtr aux);
+    OtherState *other_aux;
+    unsigned int (*other_recode) (unsigned int c, OtherStatePtr aux);
+    unsigned int (*other_reverse) (unsigned int c, OtherStatePtr aux);
+    struct _Charset *next;
+} CharsetRec, *CharsetPtr;
+
+typedef struct _LocaleCharset {
+    const char *name;
+    int gl;
+    int gr;
+    const char *g0;
+    const char *g1;
+    const char *g2;
+    const char *g3;
+    const char *other;
+} LocaleCharsetRec, *LocaleCharsetPtr;
+
+const CharsetRec *getUnknownCharset(int);
+const CharsetRec *getCharset(unsigned, int);
+const CharsetRec *getCharsetByName(const char *);
+void reportCharsets(void);
+int getLocaleState(const char *locale, const char *charset,
+                  int *gl_return, int *gr_return,
+                  const CharsetRec * *g0_return,
+                  const CharsetRec * *g1_return,
+                  const CharsetRec * *g2_return,
+                  const CharsetRec * *g3_return,
+                  const CharsetRec * *other_return);
+
+#endif /* LUIT_CHARSET_H */
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from xedit/config.guess
rename to luit/config.guess
index c2246a4..2852378
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -92,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -106,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -552,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -968,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
diff --git a/luit/config.h.in b/luit/config.h.in
new file mode 100644 (file)
index 0000000..d090795
--- /dev/null
@@ -0,0 +1,121 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the `grantpt' function. */
+#undef HAVE_GRANTPT
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <libutil.h> header file. */
+#undef HAVE_LIBUTIL_H
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Have openpty in libutil */
+#undef HAVE_OPENPTY
+
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define to 1 if you have the <pty.h> header file. */
+#undef HAVE_PTY_H
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <stropts.h> header file. */
+#undef HAVE_STROPTS_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <util.h> header file. */
+#undef HAVE_UTIL_H
+
+/* poll() works */
+#undef HAVE_WORKING_POLL
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* 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
+
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from bitmap/config.sub
rename to luit/config.sub
index a39437d..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-04-17'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -149,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -275,26 +283,38 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -325,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -337,7 +357,7 @@ case $basic_machine in
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -359,21 +379,24 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -467,6 +490,19 @@ case $basic_machine in
                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
                os=-linux
                ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -719,6 +755,9 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -823,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1057,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1240,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1260,9 +1301,9 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1275,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1283,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1416,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1456,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1613,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
diff --git a/luit/configure b/luit/configure
new file mode 100755 (executable)
index 0000000..19302bd
--- /dev/null
@@ -0,0 +1,6752 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for luit 1.1.0.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 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. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+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
+
+# 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
+
+
+# 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 #((
+  *[\\/]* ) 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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  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
+  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
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  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=.
+  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
+            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
+
+
+      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 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 and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
+
+# 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"
+
+
+} # 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
+
+
+# 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
+
+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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+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_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/=
+  ' <$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" ||
+    { $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
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+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 2>/dev/null
+fi
+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'
+  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
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# 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`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='luit'
+PACKAGE_TARNAME='luit'
+PACKAGE_VERSION='1.1.0'
+PACKAGE_STRING='luit 1.1.0'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+OS_CFLAGS
+LUIT_LIBS
+LUIT_CFLAGS
+LOCALEALIASFILE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
+ADMIN_MAN_DIR
+DRIVER_MAN_DIR
+MISC_MAN_DIR
+FILE_MAN_DIR
+LIB_MAN_DIR
+APP_MAN_DIR
+ADMIN_MAN_SUFFIX
+DRIVER_MAN_SUFFIX
+MISC_MAN_SUFFIX
+FILE_MAN_SUFFIX
+LIB_MAN_SUFFIX
+APP_MAN_SUFFIX
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+INSTALL_CMD
+PKG_CONFIG
+CHANGELOG_CMD
+CWARNFLAGS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+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_maintainer_mode
+enable_dependency_tracking
+enable_strict_compilation
+enable_silent_rules
+with_localealiasfile
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+LUIT_CFLAGS
+LUIT_LIBS'
+
+
+# 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
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    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"
+    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 ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    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"
+    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- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    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"
+    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_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"
+    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.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) 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.
+    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.
+    $as_echo "$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
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  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
+
+# 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
+  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'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $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
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+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 .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  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 -- "$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
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  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" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # 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 luit 1.1.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --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
+      --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
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+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/luit]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of luit 1.1.0:";;
+   esac
+  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]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-localealiasfile=<path>
+                          The locale alias file (default:
+                          ${datadir}/X11/locale/locale.alias)
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  PKG_CONFIG  path to pkg-config utility
+  LUIT_CFLAGS C compiler flags for LUIT, overriding pkg-config
+  LUIT_LIBS   linker flags for LUIT, overriding pkg-config
+
+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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+ac_status=$?
+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" ||
+      { 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=/`$as_echo "$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|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+luit configure 1.1.0
+generated by GNU Autoconf 2.68
+
+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_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_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_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\""
+$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_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_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;}
+( $as_echo "## ---------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
+## ---------------------------------------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&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_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_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 <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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 luit $as_me 1.1.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      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
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ 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
+# would cause problems or look ugly.
+# 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=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    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;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $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'; 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"
+_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 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
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+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;}
+    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;}
+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.  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$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.
+       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=`$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.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  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
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+am__api_version='1.11'
+
+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),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# 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.
+# 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 ${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]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+           # 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
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           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
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $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.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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_STRIP="strip"
+    $as_echo "$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_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $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; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+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_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$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
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='luit'
+ VERSION='1.1.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+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
+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
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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
+{ $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+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
+{ $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+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
+{ $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.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # 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+' '}$@"
+  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; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+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
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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;}
+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
+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 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=$?
+  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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+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.
+{ $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 | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+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_default") 2>&5
+  ac_status=$?
+  $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,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+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 | *.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;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  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
+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;}
+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
+
+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; }
+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; }; 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
+# `rm'.
+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 | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) 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;}
+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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_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
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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>&5
+  ac_status=$?
+  $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 | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$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;}
+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; }
+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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  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
+{ $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
+{ $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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
+{ $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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    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_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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];
+
+/* 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 **, 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;
+}
+_ACEOF
+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 :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  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 :
+
+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
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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 :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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"
+      { 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
+  $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"
+      { 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
+  $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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
+
+# 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
+
+done
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-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_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
+
+fi
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+
+
+
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+  STRICT_COMPILE=no
+fi
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+  INTELCC="yes"
+else
+  INTELCC="no"
+fi
+
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+
+
+
+for ac_header in pty.h stropts.h sys/param.h sys/select.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
+
+done
+
+for ac_func in select grantpt
+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
+_ACEOF
+
+fi
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5
+$as_echo_n "checking for gzopen in -lz... " >&6; }
+if ${ac_cv_lib_z_gzopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* 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 gzopen ();
+int
+main ()
+{
+return gzopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_gzopen=yes
+else
+  ac_cv_lib_z_gzopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5
+$as_echo "$ac_cv_lib_z_gzopen" >&6; }
+if test "x$ac_cv_lib_z_gzopen" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  as_fn_error $? "zlib not found" "$LINENO" 5
+fi
+
+
+
+# Check whether --with-localealiasfile was given.
+if test "${with_localealiasfile+set}" = set; then :
+  withval=$with_localealiasfile; LOCALEALIASFILE="$withval"
+else
+  LOCALEALIASFILE=${datadir}/X11/locale/locale.alias
+fi
+
+
+
+# Checks for pkg-config packages
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUIT" >&5
+$as_echo_n "checking for LUIT... " >&6; }
+
+if test -n "$LUIT_CFLAGS"; then
+    pkg_cv_LUIT_CFLAGS="$LUIT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontenc\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "fontenc") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LUIT_CFLAGS=`$PKG_CONFIG --cflags "fontenc" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$LUIT_LIBS"; then
+    pkg_cv_LUIT_LIBS="$LUIT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontenc\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "fontenc") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_LUIT_LIBS=`$PKG_CONFIG --libs "fontenc" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               LUIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fontenc" 2>&1`
+        else
+               LUIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "fontenc" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$LUIT_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (fontenc) were not met:
+
+$LUIT_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables LUIT_CFLAGS
+and LUIT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables LUIT_CFLAGS
+and LUIT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       LUIT_CFLAGS=$pkg_cv_LUIT_CFLAGS
+       LUIT_LIBS=$pkg_cv_LUIT_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+
+# We don't link against libX11, just use its locale.alias data file
+if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libX11 not found.  luit may not be able to find locale aliases without it." >&5
+$as_echo "$as_me: WARNING: libX11 not found.  luit may not be able to find locale aliases without it." >&2;}
+fi
+
+case $host_os in
+    # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
+    darwin*)
+        OS_CFLAGS=
+        ;;
+    linux*)
+        for ac_header in poll.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_poll_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_POLL_H 1
+_ACEOF
+
+fi
+
+done
+
+        for ac_func in poll
+do :
+  ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
+fi
+done
+
+        OS_CFLAGS="-D_XOPEN_SOURCE=500"
+        ;;
+    *)
+        for ac_header in poll.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_poll_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_POLL_H 1
+_ACEOF
+
+fi
+
+done
+
+        for ac_func in poll
+do :
+  ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
+if test "x$ac_cv_func_poll" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_POLL 1
+_ACEOF
+
+fi
+done
+
+        OS_CFLAGS=
+        ;;
+esac
+
+
+for ac_header in pty.h stropts.h sys/ioctl.h sys/param.h sys/poll.h sys/select.h sys/time.h termios.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
+
+done
+
+for ac_func in grantpt putenv select strdup
+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
+_ACEOF
+
+fi
+done
+
+
+if test "x$ac_cv_func_grantpt" != "xyes" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
+$as_echo_n "checking for openpty in -lutil... " >&6; }
+if ${ac_cv_lib_util_openpty+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* 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 openpty ();
+int
+main ()
+{
+return openpty ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_util_openpty=yes
+else
+  ac_cv_lib_util_openpty=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
+$as_echo "$ac_cv_lib_util_openpty" >&6; }
+if test "x$ac_cv_lib_util_openpty" = xyes; then :
+  cf_have_openpty=yes
+else
+  cf_have_openpty=no
+fi
+
+        if test "$cf_have_openpty" = yes ; then
+                LIBS="-lutil $LIBS"
+
+$as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
+
+                for ac_header in \
+                        util.h \
+                        libutil.h \
+                        pty.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
+
+done
+
+        fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if poll really works" >&5
+$as_echo_n "checking if poll really works... " >&6; }
+if ${cf_cv_working_poll+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+if test "$cross_compiling" = yes; then :
+  cf_cv_working_poll=unknown
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <sys/poll.h>
+#endif
+int main() {
+       struct pollfd myfds;
+       int ret;
+
+       myfds.fd = 0;
+       myfds.events = POLLIN;
+
+       ret = poll(&myfds, 1, 100);
+       ${cf_cv_main_return:-return}(ret != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  cf_cv_working_poll=yes
+else
+  cf_cv_working_poll=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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_working_poll" >&5
+$as_echo "$cf_cv_working_poll" >&6; }
+test "$cf_cv_working_poll" = "yes" &&
+$as_echo "#define HAVE_WORKING_POLL 1" >>confdefs.h
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIGWINCH is defined" >&5
+$as_echo_n "checking if SIGWINCH is defined... " >&6; }
+if ${cf_cv_define_sigwinch+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/types.h>
+#include <sys/signal.h>
+
+int
+main ()
+{
+int x = SIGWINCH
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cf_cv_define_sigwinch=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#undef _XOPEN_SOURCE
+#undef _POSIX_SOURCE
+#undef _POSIX_C_SOURCE
+#include <sys/types.h>
+#include <sys/signal.h>
+
+int
+main ()
+{
+int x = SIGWINCH
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cf_cv_define_sigwinch=maybe
+else
+  cf_cv_define_sigwinch=no
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_define_sigwinch" >&5
+$as_echo "$cf_cv_define_sigwinch" >&6; }
+
+if test "$cf_cv_define_sigwinch" = maybe ; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for actual SIGWINCH definition" >&5
+$as_echo_n "checking for actual SIGWINCH definition... " >&6; }
+if ${cf_cv_fixup_sigwinch+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cf_cv_fixup_sigwinch=unknown
+cf_sigwinch=32
+while test $cf_sigwinch != 1
+do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#undef _XOPEN_SOURCE
+#undef _POSIX_SOURCE
+#undef _POSIX_C_SOURCE
+#include <sys/types.h>
+#include <sys/signal.h>
+
+int
+main ()
+{
+
+#if SIGWINCH != $cf_sigwinch
+make an error
+#endif
+int x = SIGWINCH
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cf_cv_fixup_sigwinch=$cf_sigwinch
+        break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+cf_sigwinch=`expr $cf_sigwinch - 1`
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_fixup_sigwinch" >&5
+$as_echo "$cf_cv_fixup_sigwinch" >&6; }
+
+       if test "$cf_cv_fixup_sigwinch" != unknown ; then
+               CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
+       fi
+fi
+
+
+ac_config_files="$ac_config_files Makefile man/Makefile"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    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;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (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 \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     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;}
+      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
+    { $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
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+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=`$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.
+  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
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+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;}
+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.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+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 :
+  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
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+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
+
+# 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
+
+
+# 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 #((
+  *[\\/]* ) 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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  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
+  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]
+# ----------------------------------------
+# 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
+
+
+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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+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 2>/dev/null
+fi
+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'
+  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='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+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 luit $as_me 1.1.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_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"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$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 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --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
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+luit config.status 1.1.0
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+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'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+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
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -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 ;;
+  --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
+    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
+    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
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $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.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+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
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_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
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  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 -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# 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
+
+
+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 2>/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
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  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
+    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
+
+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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$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 = "\a"
+
+}
+{
+  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 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[        ]*=[    ]*/{
+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 || 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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+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*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) 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 `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          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
+      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 '`
+         $as_echo "$*" | 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;}
+    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 >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_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"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$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|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_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=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+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;}
+_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' ;;
+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 || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+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
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+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' "$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 "$ac_tmp/stdin"
+  case $ac_file in
+  -) 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
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $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 "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+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.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  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 || 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 --git a/luit/configure.ac b/luit/configure.ac
new file mode 100644 (file)
index 0000000..dc98aa0
--- /dev/null
@@ -0,0 +1,99 @@
+dnl  Copyright 2005 Red Hat, Inc.
+dnl 
+dnl  Permission to use, copy, modify, distribute, and sell this software and its
+dnl  documentation for any purpose is hereby granted without fee, provided that
+dnl  the above copyright notice appear in all copies and that both that
+dnl  copyright notice and this permission notice appear in supporting
+dnl  documentation, and that the name of Red Hat not be used in
+dnl  advertising or publicity pertaining to distribution of the software without
+dnl  specific, written prior permission.  Red Hat makes no
+dnl  representations about the suitability of this software for any purpose.  It
+dnl  is provided "as is" without express or implied warranty.
+dnl 
+dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl  PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+AC_INIT([luit], [1.1.0],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [luit])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+
+AM_CONFIG_HEADER(config.h)
+
+AC_CANONICAL_HOST
+
+
+AC_CHECK_HEADERS([pty.h stropts.h sys/param.h sys/select.h])
+AC_CHECK_FUNCS([select grantpt])
+
+AC_CHECK_LIB(z, gzopen,, AC_MSG_ERROR([zlib not found]))
+
+AC_ARG_WITH(localealiasfile,
+        AC_HELP_STRING([--with-localealiasfile=<path>],
+                       [The locale alias file (default: ${datadir}/X11/locale/locale.alias)]),
+        [LOCALEALIASFILE="$withval"],
+        [LOCALEALIASFILE=${datadir}/X11/locale/locale.alias])
+AC_SUBST([LOCALEALIASFILE])
+
+# Checks for pkg-config packages
+PKG_CHECK_MODULES(LUIT, fontenc)
+
+# We don't link against libX11, just use its locale.alias data file
+PKG_CHECK_EXISTS(x11, [],
+       [AC_MSG_WARN([libX11 not found.  luit may not be able to find locale aliases without it.])])
+
+case $host_os in
+    # darwin has poll() but can't be used to poll character devices (atleast through SnowLeopard)
+    darwin*)
+        OS_CFLAGS=
+        ;;
+    linux*)
+        AC_CHECK_HEADERS([poll.h])
+        AC_CHECK_FUNCS([poll])
+        OS_CFLAGS="-D_XOPEN_SOURCE=500"
+        ;;
+    *)
+        AC_CHECK_HEADERS([poll.h])
+        AC_CHECK_FUNCS([poll])
+        OS_CFLAGS=
+        ;;
+esac
+AC_SUBST(OS_CFLAGS)
+
+AC_CHECK_HEADERS([pty.h stropts.h sys/ioctl.h sys/param.h sys/poll.h sys/select.h sys/time.h termios.h]) 
+AC_CHECK_FUNCS([grantpt putenv select strdup])
+
+if test "x$ac_cv_func_grantpt" != "xyes" ; then
+        AC_CHECK_LIB(util, openpty, [cf_have_openpty=yes],[cf_have_openpty=no])
+        if test "$cf_have_openpty" = yes ; then
+                LIBS="-lutil $LIBS"
+                AC_DEFINE(HAVE_OPENPTY, 1, [Have openpty in libutil])
+                AC_CHECK_HEADERS( \
+                        util.h \
+                        libutil.h \
+                        pty.h \
+                )
+        fi
+fi
+
+CF_FUNC_POLL
+CF_SIGWINCH
+
+AC_CONFIG_FILES([Makefile
+                 man/Makefile])
+
+AC_OUTPUT
similarity index 100%
rename from xman/depcomp
rename to luit/depcomp
similarity index 100%
rename from xman/install-sh
rename to luit/install-sh
diff --git a/luit/iso2022.c b/luit/iso2022.c
new file mode 100644 (file)
index 0000000..1e551d5
--- /dev/null
@@ -0,0 +1,1078 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include "luit.h"
+#include "sys.h"
+#include "other.h"
+#include "iso2022.h"
+
+#define BUFFERED_INPUT_SIZE 4
+static unsigned char buffered_input[BUFFERED_INPUT_SIZE];
+static int buffered_input_count = 0;
+
+static void
+FatalError(const char *f,...)
+{
+    va_list args;
+    va_start(args, f);
+    vfprintf(stderr, f, args);
+    va_end(args);
+    ExitProgram(1);
+}
+
+static void
+ErrorF(const char *f,...)
+{
+    va_list args;
+    va_start(args, f);
+    vfprintf(stderr, f, args);
+    va_end(args);
+}
+
+#define OUTBUF_FREE(is, count) ((is)->outbuf_count + (count) <= BUFFER_SIZE)
+#define OUTBUF_MAKE_FREE(is, fd, count) \
+    if(!OUTBUF_FREE((is), (count))) outbuf_flush((is), (fd))
+
+static void
+outbuf_flush(Iso2022Ptr is, int fd)
+{
+    int rc;
+    unsigned i = 0;
+
+    if (olog >= 0)
+       IGNORE_RC(write(olog, is->outbuf, is->outbuf_count));
+
+    while (i < is->outbuf_count) {
+       rc = (int) write(fd, is->outbuf + i, is->outbuf_count - i);
+       if (rc > 0) {
+           i += (unsigned) rc;
+       } else {
+           if (rc < 0 && errno == EINTR)
+               continue;
+           else if ((rc == 0) || ((rc < 0) && (errno == EAGAIN))) {
+               waitForOutput(fd);
+               continue;
+           } else
+               break;
+       }
+    }
+    is->outbuf_count = 0;
+}
+
+static void
+outbufOne(Iso2022Ptr is, int fd, unsigned c)
+{
+    OUTBUF_MAKE_FREE(is, fd, 1);
+    is->outbuf[is->outbuf_count++] = UChar(c);
+}
+
+/* Discards null codepoints */
+static void
+outbufUTF8(Iso2022Ptr is, int fd, unsigned c)
+{
+    if (c == 0)
+       return;
+
+    if (c <= 0x7F) {
+       OUTBUF_MAKE_FREE(is, fd, 1);
+       is->outbuf[is->outbuf_count++] = UChar(c);
+    } else if (c <= 0x7FF) {
+       OUTBUF_MAKE_FREE(is, fd, 2);
+       is->outbuf[is->outbuf_count++] = UChar(0xC0 | ((c >> 6) & 0x1F));
+       is->outbuf[is->outbuf_count++] = UChar(0x80 | (c & 0x3F));
+    } else {
+       OUTBUF_MAKE_FREE(is, fd, 3);
+       is->outbuf[is->outbuf_count++] = UChar(0xE0 | ((c >> 12) & 0x0F));
+       is->outbuf[is->outbuf_count++] = UChar(0x80 | ((c >> 6) & 0x3F));
+       is->outbuf[is->outbuf_count++] = UChar(0x80 | (c & 0x3F));
+    }
+}
+
+static void
+buffer(Iso2022Ptr is, unsigned c)
+{
+    if (is->buffered == NULL) {
+       is->buffered_len = 10;
+       is->buffered = malloc(is->buffered_len);
+       if (is->buffered == NULL)
+           FatalError("Couldn't allocate buffered.\n");
+    }
+
+    if (is->buffered_count >= is->buffered_len) {
+       is->buffered = realloc(is->buffered, 2 * is->buffered_len + 1);
+       if (is->buffered == NULL) {
+           FatalError("Couldn't grow buffered.\n");
+       }
+       is->buffered_len = 2 * is->buffered_len + 1;
+    }
+
+    is->buffered[is->buffered_count++] = UChar(c);
+}
+
+static void
+outbuf_buffered_carefully(Iso2022Ptr is, int fd)
+{
+    /* This should never happen in practice */
+    unsigned i = 0;
+
+    while (i < is->buffered_count) {
+       OUTBUF_MAKE_FREE(is, fd, 1);
+       is->outbuf[is->outbuf_count++] = is->buffered[i++];
+    }
+    is->buffered_count = 0;
+}
+
+static void
+outbuf_buffered(Iso2022Ptr is, int fd)
+{
+    if (is->buffered_count > BUFFER_SIZE)
+       outbuf_buffered_carefully(is, fd);
+
+    OUTBUF_MAKE_FREE(is, fd, is->buffered_count);
+    memcpy(is->outbuf + is->outbuf_count, is->buffered, is->buffered_count);
+    is->outbuf_count += is->buffered_count;
+    is->buffered_count = 0;
+}
+
+static void
+discard_buffered(Iso2022Ptr is)
+{
+    is->buffered_count = 0;
+}
+
+Iso2022Ptr
+allocIso2022(void)
+{
+    Iso2022Ptr is;
+    is = malloc(sizeof(Iso2022Rec));
+    if (!is)
+       return NULL;
+    is->glp = is->grp = NULL;
+    G0(is) = G1(is) = G2(is) = G3(is) = OTHER(is) = NULL;
+
+    is->parserState = P_NORMAL;
+    is->shiftState = S_NORMAL;
+
+    is->inputFlags = IF_EIGHTBIT | IF_SS | IF_SSGR;
+    is->outputFlags = OF_SS | OF_LS | OF_SELECT;
+
+    is->buffered = NULL;
+    is->buffered_len = 0;
+    is->buffered_count = 0;
+
+    is->buffered_ku = -1;
+
+    is->outbuf = malloc((size_t) BUFFER_SIZE);
+    if (!is->outbuf) {
+       free(is);
+       return NULL;
+    }
+    is->outbuf_count = 0;
+
+    return is;
+}
+
+void
+destroyIso2022(Iso2022Ptr is)
+{
+    if (is->buffered)
+       free(is->buffered);
+    if (is->outbuf)
+       free(is->outbuf);
+    free(is);
+}
+
+static int
+identifyCharset(Iso2022Ptr i, const CharsetRec * *p)
+{
+    if (p == &G0(i)) {
+       return 0;
+    } else if (p == &G1(i)) {
+       return 1;
+    } else if (p == &G2(i)) {
+       return 2;
+    } else if (p == &G3(i)) {
+       return 3;
+    } else {
+       abort();
+       /* NOTREACHED */
+    }
+}
+
+void
+reportIso2022(Iso2022Ptr i)
+{
+    if (OTHER(i) != NULL) {
+       fprintf(stderr, "%s, non-ISO-2022 encoding.\n", OTHER(i)->name);
+       return;
+    }
+    fprintf(stderr, "G0 is %s, ", G0(i)->name);
+    fprintf(stderr, "G1 is %s, ", G1(i)->name);
+    fprintf(stderr, "G2 is %s, ", G2(i)->name);
+    fprintf(stderr, "G3 is %s.\n", G3(i)->name);
+    fprintf(stderr, "GL is G%d, ", identifyCharset(i, i->glp));
+    fprintf(stderr, "GR is G%d.\n", identifyCharset(i, i->grp));
+}
+
+int
+initIso2022(const char *locale, const char *charset, Iso2022Ptr i)
+{
+    int gl = 0, gr = 2;
+    const CharsetRec *g0 = NULL;
+    const CharsetRec *g1 = NULL;
+    const CharsetRec *g2 = NULL;
+    const CharsetRec *g3 = NULL;
+    const CharsetRec *other = NULL;
+    int rc;
+
+    rc = getLocaleState(locale, charset, &gl, &gr, &g0, &g1, &g2, &g3, &other);
+    if (rc < 0) {
+       if (charset)
+           ErrorF("Warning: couldn't find charset %s; "
+                  "using ISO 8859-1.\n", charset);
+       else
+           ErrorF("Warning: couldn't find charset data for locale %s; "
+                  "using ISO 8859-1.\n", locale);
+    }
+
+    if (g0)
+       G0(i) = g0;
+    else
+       G0(i) = getCharsetByName("ASCII");
+
+    if (g1)
+       G1(i) = g1;
+    else
+       G1(i) = getUnknownCharset(T_94);
+
+    if (g2)
+       G2(i) = g2;
+    else
+       G2(i) = getCharsetByName("ISO 8859-1");
+
+    if (g3)
+       G3(i) = g3;
+    else
+       G3(i) = getUnknownCharset(T_94);
+
+    if (other)
+       OTHER(i) = other;
+    else
+       OTHER(i) = NULL;
+
+    i->glp = &i->g[gl];
+    i->grp = &i->g[gr];
+    return 0;
+}
+
+int
+mergeIso2022(Iso2022Ptr d, Iso2022Ptr s)
+{
+    if (G0(d) == NULL)
+       G0(d) = G0(s);
+    if (G1(d) == NULL)
+       G1(d) = G1(s);
+    if (G2(d) == NULL)
+       G2(d) = G2(s);
+    if (G3(d) == NULL)
+       G3(d) = G3(s);
+    if (OTHER(d) == NULL)
+       OTHER(d) = OTHER(s);
+    if (d->glp == NULL)
+       d->glp = &(d->g[identifyCharset(s, s->glp)]);
+    if (d->grp == NULL)
+       d->grp = &(d->g[identifyCharset(s, s->grp)]);
+    return 0;
+}
+
+static int
+utf8Count(unsigned c)
+{
+    /* All return values must be less than BUFFERED_INPUT_SIZE */
+    if ((c & 0x80) == 0)
+       return 1;
+    else if ((c & 0x40) == 0)
+       return 1;               /* incorrect UTF-8 */
+    else if ((c & 0x60) == 0x40)
+       return 2;
+    else if ((c & 0x70) == 0x60)
+       return 3;
+    else if ((c & 0x78) == 0x70)
+       return 4;
+    else
+       return 1;
+}
+
+static int
+fromUtf8(unsigned char *b)
+{
+    if ((b[0] & 0x80) == 0)
+       return b[0];
+    else if ((b[0] & 0x40) == 0)
+       return -1;              /* incorrect UTF-8 */
+    else if ((b[0] & 0x60) == 0x40)
+       return ((b[0] & 0x1F) << 6) | (b[1] & 0x3F);
+    else if ((b[0] & 0x70) == 0x60)
+       return (((b[0] & 0x0F) << 12) |
+               ((b[1] & 0x3F) << 6) |
+               ((b[2] & 0x3F)));
+    else if ((b[0] & 0x78) == 0x70)
+       return (((b[0] & 0x03) << 18) |
+               ((b[1] & 0x3F) << 12) |
+               ((b[2] & 0x3F) << 6) |
+               ((b[3] & 0x3F)));
+    else
+       return -1;
+}
+
+void
+copyIn(Iso2022Ptr is, int fd, unsigned char *buf, int count)
+{
+    unsigned char *c;
+    int codepoint, rem;
+
+    c = buf;
+    rem = count;
+
+#define NEXT do {c++; rem--;} while(0)
+
+    while (rem) {
+       codepoint = -1;
+       if (is->parserState == P_ESC) {
+           assert(buffered_input_count == 0);
+           codepoint = *c;
+           NEXT;
+           if (*c == CSI_7)
+               is->parserState = P_CSI;
+           else if (IS_FINAL_ESC(codepoint))
+               is->parserState = P_NORMAL;
+       } else if (is->parserState == P_CSI) {
+           assert(buffered_input_count == 0);
+           codepoint = *c;
+           NEXT;
+           if (IS_FINAL_CSI(codepoint))
+               is->parserState = P_NORMAL;
+       } else if (!(*c & 0x80)) {
+           if (buffered_input_count > 0) {
+               buffered_input_count = 0;
+               continue;
+           } else {
+               codepoint = *c;
+               NEXT;
+               if (codepoint == ESC)
+                   is->parserState = P_ESC;
+           }
+       } else if ((*c & 0x40)) {
+           if (buffered_input_count > 0) {
+               buffered_input_count = 0;
+               continue;
+           } else {
+               buffered_input[buffered_input_count] = *c;
+               buffered_input_count++;
+               NEXT;
+           }
+       } else {
+           if (buffered_input_count <= 0) {
+               buffered_input_count = 0;
+               NEXT;
+               continue;
+           } else {
+               buffered_input[buffered_input_count] = *c;
+               buffered_input_count++;
+               NEXT;
+               if (buffered_input_count >= utf8Count(buffered_input[0])) {
+                   codepoint = fromUtf8(buffered_input);
+                   buffered_input_count = 0;
+                   if (codepoint == CSI)
+                       is->parserState = P_CSI;
+               }
+           }
+       }
+#undef NEXT
+
+       if (codepoint >= 0) {
+           int i;
+           unsigned ucode = (unsigned) codepoint;
+           unsigned char obuf[4];
+
+#define WRITE_1(i) do { \
+           obuf[0] = UChar(i); \
+           IGNORE_RC(write(fd, obuf, (size_t) 1)); \
+       } while(0)
+#define WRITE_2(i) do { \
+           obuf[0] = UChar(((i) >> 8) & 0xFF); \
+           obuf[1] = UChar((i) & 0xFF); \
+           IGNORE_RC(write(fd, obuf, (size_t) 2)); \
+       } while(0)
+
+#define WRITE_3(i) do { \
+           obuf[0] = UChar(((i) >> 16) & 0xFF); \
+           obuf[1] = UChar(((i) >>  8) & 0xFF); \
+           obuf[2] = UChar((i) & 0xFF); \
+           IGNORE_RC(write(fd, obuf, (size_t) 3)); \
+       } while(0)
+
+#define WRITE_4(i) do { \
+           obuf[0] = UChar(((i) >> 24) & 0xFF); \
+           obuf[1] = UChar(((i) >> 16) & 0xFF); \
+           obuf[2] = UChar(((i) >>  8) & 0xFF); \
+           obuf[3] = UChar((i) & 0xFF); \
+           IGNORE_RC(write(fd, obuf, (size_t) 4)); \
+       } while(0)
+
+#define WRITE_1_P_8bit(p, i) { \
+           obuf[0] = UChar(p); \
+           obuf[1] = UChar(i); \
+           IGNORE_RC(write(fd, obuf, (size_t) 2)); \
+       }
+
+#define WRITE_1_P_7bit(p, i) { \
+           obuf[0] = ESC; \
+           obuf[1] = UChar((p) - 0x40); \
+           obuf[2] = UChar(i); \
+           IGNORE_RC(write(fd, obuf, (size_t) 3)); \
+       }
+
+#define WRITE_1_P(p,i) do { \
+       if(is->inputFlags & IF_EIGHTBIT) \
+           WRITE_1_P_8bit(p,i) else \
+           WRITE_1_P_7bit(p,i) \
+       } while(0)
+
+#define WRITE_2_P_8bit(p, i) { \
+           obuf[0] = UChar(p); \
+           obuf[1] = UChar(((i) >> 8) & 0xFF); \
+           obuf[2] = UChar((i) & 0xFF); \
+           IGNORE_RC(write(fd, obuf, (size_t) 3)); \
+       }
+
+#define WRITE_2_P_7bit(p, i) { \
+           obuf[0] = ESC; \
+           obuf[1] = UChar((p) - 0x40); \
+           obuf[2] = UChar(((i) >> 8) & 0xFF); \
+           obuf[3] = UChar((i) & 0xFF); \
+           IGNORE_RC(write(fd, obuf, (size_t) 4)); \
+       }
+
+#define WRITE_2_P(p,i) do { \
+           if(is->inputFlags & IF_EIGHTBIT) \
+               WRITE_2_P_8bit(p,i) \
+           else \
+               WRITE_2_P_7bit(p,i) \
+       } while(0)
+
+#define WRITE_1_P_S(p,i,s) do { \
+           obuf[0] = UChar(p); \
+           obuf[1] = UChar((i) & 0xFF); \
+           obuf[2] = UChar(s); \
+           IGNORE_RC(write(fd, obuf, (size_t) 3)); \
+       } while(0)
+
+#define WRITE_2_P_S(p,i,s) do { \
+           obuf[0] = UChar(p); \
+           obuf[1] = UChar(((i) >> 8) & 0xFF); \
+           obuf[2] = UChar((i) & 0xFF); \
+           obuf[3] = UChar(s); \
+           IGNORE_RC(write(fd, obuf, (size_t) 4)); \
+       } while(0)
+
+           if (ucode < 0x20 ||
+               (OTHER(is) == NULL && CHARSET_REGULAR(GR(is)) &&
+                (ucode >= 0x80 && ucode < 0xA0))) {
+               WRITE_1(ucode);
+               continue;
+           }
+           if (OTHER(is) != NULL) {
+               unsigned int c2;
+               c2 = OTHER(is)->other_reverse(ucode, OTHER(is)->other_aux);
+               if (c2 >> 24)
+                   WRITE_4(c2);
+               else if (c2 >> 16)
+                   WRITE_3(c2);
+               else if (c2 >> 8)
+                   WRITE_2(c2);
+               else if (c2)
+                   WRITE_1(c2);
+               continue;
+           }
+           i = (GL(is)->reverse) (ucode, GL(is));
+           if (i >= 0) {
+               switch (GL(is)->type) {
+               case T_94:
+               case T_96:
+               case T_128:
+                   if (i >= 0x20)
+                       WRITE_1(i);
+                   break;
+               case T_9494:
+               case T_9696:
+               case T_94192:
+                   if (i >= 0x2020)
+                       WRITE_2(i);
+                   break;
+               default:
+                   abort();
+                   /* NOTREACHED */
+               }
+               continue;
+           }
+           if (is->inputFlags & IF_EIGHTBIT) {
+               i = GR(is)->reverse(ucode, GR(is));
+               if (i >= 0) {
+                   switch (GR(is)->type) {
+                   case T_94:
+                   case T_96:
+                   case T_128:
+                       /* we allow C1 characters if T_128 in GR */
+                       WRITE_1(i | 0x80);
+                       break;
+                   case T_9494:
+                   case T_9696:
+                       WRITE_2(i | 0x8080);
+                       break;
+                   case T_94192:
+                       WRITE_2(i | 0x8000);
+                       break;
+                   default:
+                       abort();
+                       /* NOTREACHED */
+                   }
+                   continue;
+               }
+           }
+           if (is->inputFlags & IF_SS) {
+               i = G2(is)->reverse(ucode, G2(is));
+               if (i >= 0) {
+                   switch (GR(is)->type) {
+                   case T_94:
+                   case T_96:
+                   case T_128:
+                       if (i >= 0x20) {
+                           if ((is->inputFlags & IF_EIGHTBIT) &&
+                               (is->inputFlags & IF_SSGR))
+                               i |= 0x80;
+                           WRITE_1_P(SS2, i);
+                       }
+                       break;
+                   case T_9494:
+                   case T_9696:
+                       if (i >= 0x2020) {
+                           if ((is->inputFlags & IF_EIGHTBIT) &&
+                               (is->inputFlags & IF_SSGR))
+                               i |= 0x8080;
+                           WRITE_2_P(SS2, i);
+                       }
+                       break;
+                   case T_94192:
+                       if (i >= 0x2020) {
+                           if ((is->inputFlags & IF_EIGHTBIT) &&
+                               (is->inputFlags & IF_SSGR))
+                               i |= 0x8000;
+                           WRITE_2_P(SS2, i);
+                       }
+                       break;
+                   default:
+                       abort();
+                       /* NOTREACHED */
+                   }
+                   continue;
+               }
+           }
+           if (is->inputFlags & IF_SS) {
+               i = G3(is)->reverse(ucode, G3(is));
+               switch (GR(is)->type) {
+               case T_94:
+               case T_96:
+               case T_128:
+                   if (i >= 0x20) {
+                       if ((is->inputFlags & IF_EIGHTBIT) &&
+                           (is->inputFlags & IF_SSGR))
+                           i |= 0x80;
+                       WRITE_1_P(SS3, i);
+                   }
+                   break;
+               case T_9494:
+               case T_9696:
+                   if (i >= 0x2020) {
+                       if ((is->inputFlags & IF_EIGHTBIT) &&
+                           (is->inputFlags & IF_SSGR))
+                           i |= 0x8080;
+                       WRITE_2_P(SS3, i);
+                   }
+                   break;
+               case T_94192:
+                   if (i >= 0x2020) {
+                       if ((is->inputFlags & IF_EIGHTBIT) &&
+                           (is->inputFlags & IF_SSGR))
+                           i |= 0x8000;
+                       WRITE_2_P(SS3, i);
+                   }
+                   break;
+               default:
+                   abort();
+                   /* NOTREACHED */
+               }
+               continue;
+           }
+           if (is->inputFlags & IF_LS) {
+               i = GR(is)->reverse(ucode, GR(is));
+               if (i >= 0) {
+                   switch (GR(is)->type) {
+                   case T_94:
+                   case T_96:
+                   case T_128:
+                       WRITE_1_P_S(LS1, i, LS0);
+                       break;
+                   case T_9494:
+                   case T_9696:
+                       WRITE_2_P_S(LS1, i, LS0);
+                       break;
+                   case T_94192:
+                       WRITE_2_P_S(LS1, i, LS0);
+                       break;
+                   default:
+                       abort();
+                       /* NOTREACHED */
+                   }
+                   continue;
+               }
+           }
+#undef WRITE_1
+#undef WRITE_2
+#undef WRITE_1_P
+#undef WRITE_1_P_7bit
+#undef WRITE_1_P_8bit
+#undef WRITE_2_P
+#undef WRITE_2_P_7bit
+#undef WRITE_2_P_8bit
+       }
+    }
+}
+
+#define PAIR(a,b) ((unsigned) ((a) << 8) | (b))
+
+void
+copyOut(Iso2022Ptr is, int fd, unsigned char *buf, unsigned count)
+{
+    unsigned char *s = buf;
+
+    if (ilog >= 0)
+       IGNORE_RC(write(ilog, buf, (size_t) count));
+
+    while (s < buf + count) {
+       switch (is->parserState) {
+       case P_NORMAL:
+         resynch:
+           if (is->buffered_ku < 0) {
+               if (*s == ESC) {
+                   buffer(is, *s++);
+                   is->parserState = P_ESC;
+               } else if (OTHER(is) != NULL) {
+                   int c = OTHER(is)->other_stack(*s, OTHER(is)->other_aux);
+                   if (c >= 0) {
+                       unsigned ucode = (unsigned) c;
+                       outbufUTF8(is, fd,
+                                  OTHER(is)->other_recode(ucode, OTHER(is)->other_aux));
+                       is->shiftState = S_NORMAL;
+                   }
+                   s++;
+               } else if (*s == CSI && CHARSET_REGULAR(GR(is))) {
+                   buffer(is, *s++);
+                   is->parserState = P_CSI;
+               } else if ((*s == SS2 ||
+                           *s == SS3 ||
+                           *s == LS0 ||
+                           *s == LS1) &&
+                          CHARSET_REGULAR(GR(is))) {
+                   buffer(is, *s++);
+                   terminate(is, fd);
+                   is->parserState = P_NORMAL;
+               } else if (*s <= 0x20 && is->shiftState == S_NORMAL) {
+                   /* Pass through C0 when GL is not regular */
+                   outbufOne(is, fd, *s);
+                   s++;
+               } else {
+                   const CharsetRec *charset;
+                   unsigned char code = 0;
+                   if (*s <= 0x7F) {
+                       switch (is->shiftState) {
+                       case S_NORMAL:
+                           charset = GL(is);
+                           break;
+                       case S_SS2:
+                           charset = G2(is);
+                           break;
+                       case S_SS3:
+                           charset = G3(is);
+                           break;
+                       default:
+                           abort();
+                           /* NOTREACHED */
+                       }
+                       code = *s;
+                   } else {
+                       switch (is->shiftState) {
+                       case S_NORMAL:
+                           charset = GR(is);
+                           break;
+                       case S_SS2:
+                           charset = G2(is);
+                           break;
+                       case S_SS3:
+                           charset = G3(is);
+                           break;
+                       default:
+                           abort();
+                           /* NOTREACHED */
+                       }
+                       code = UChar(*s - 0x80);
+                   }
+
+                   switch (charset->type) {
+                   case T_94:
+                       if (code >= 0x21 && code <= 0x7E)
+                           outbufUTF8(is, fd, charset->recode(code, charset));
+                       else
+                           outbufUTF8(is, fd, *s);
+                       s++;
+                       is->shiftState = S_NORMAL;
+                       break;
+                   case T_96:
+                       if (code >= 0x20)
+                           outbufUTF8(is, fd, charset->recode(code, charset));
+                       else
+                           outbufUTF8(is, fd, *s);
+                       is->shiftState = S_NORMAL;
+                       s++;
+                       break;
+                   case T_128:
+                       outbufUTF8(is, fd, charset->recode(code, charset));
+                       is->shiftState = S_NORMAL;
+                       s++;
+                       break;
+                   default:
+                       /* First byte of a multibyte sequence */
+                       is->buffered_ku = *s;
+                       s++;
+                   }
+               }
+           } else {            /* buffered_ku */
+               const CharsetRec *charset;
+               unsigned char ku_code;
+               unsigned code = 0;
+               if (is->buffered_ku <= 0x7F) {
+                   switch (is->shiftState) {
+                   case S_NORMAL:
+                       charset = GL(is);
+                       break;
+                   case S_SS2:
+                       charset = G2(is);
+                       break;
+                   case S_SS3:
+                       charset = G3(is);
+                       break;
+                   default:
+                       abort();
+                       /* NOTREACHED */
+                   }
+                   ku_code = UChar(is->buffered_ku);
+                   if (*s < 0x80)
+                       code = *s;
+               } else {
+                   switch (is->shiftState) {
+                   case S_NORMAL:
+                       charset = GR(is);
+                       break;
+                   case S_SS2:
+                       charset = G2(is);
+                       break;
+                   case S_SS3:
+                       charset = G3(is);
+                       break;
+                   default:
+                       abort();
+                       /* NOTREACHED */
+                   }
+                   ku_code = UChar(is->buffered_ku - 0x80);
+                   if (*s >= 0x80)
+                       code = UChar(*s - 0x80);
+               }
+               switch (charset->type) {
+               case T_94:
+               case T_96:
+               case T_128:
+                   abort();
+                   /* NOTREACHED */
+                   break;
+               case T_9494:
+                   if (code >= 0x21 && code <= 0x7E) {
+                       outbufUTF8(is, fd,
+                                  charset->recode(PAIR(ku_code, code), charset));
+                       is->buffered_ku = -1;
+                       is->shiftState = S_NORMAL;
+                   } else {
+                       is->buffered_ku = -1;
+                       is->shiftState = S_NORMAL;
+                       goto resynch;
+                   }
+                   s++;
+                   break;
+               case T_9696:
+                   if (code >= 0x20) {
+                       outbufUTF8(is, fd,
+                                  charset->recode(PAIR(ku_code, code), charset));
+                       is->buffered_ku = -1;
+                       is->shiftState = S_NORMAL;
+                   } else {
+                       is->buffered_ku = -1;
+                       is->shiftState = S_NORMAL;
+                       goto resynch;
+                   }
+                   s++;
+                   break;
+               case T_94192:
+                   /* Use *s, not code */
+                   if (((*s >= 0x21) && (*s <= 0x7E)) ||
+                       ((*s >= 0xA1) && (*s <= 0xFE))) {
+                       unsigned ucode = PAIR(ku_code, *s);
+                       outbufUTF8(is, fd,
+                                  charset->recode(ucode, charset));
+                       is->buffered_ku = -1;
+                       is->shiftState = S_NORMAL;
+                   } else {
+                       is->buffered_ku = -1;
+                       is->shiftState = S_NORMAL;
+                       goto resynch;
+                   }
+                   s++;
+                   break;
+               default:
+                   abort();
+                   /* NOTREACHED */
+               }
+           }
+           break;
+       case P_ESC:
+           assert(is->buffered_ku == -1);
+           if (*s == CSI_7) {
+               buffer(is, *s++);
+               is->parserState = P_CSI;
+           } else if (IS_FINAL_ESC(*s)) {
+               buffer(is, *s++);
+               terminate(is, fd);
+               is->parserState = P_NORMAL;
+           } else {
+               buffer(is, *s++);
+           }
+           break;
+       case P_CSI:
+           if (IS_FINAL_CSI(*s)) {
+               buffer(is, *s++);
+               terminate(is, fd);
+               is->parserState = P_NORMAL;
+           } else {
+               buffer(is, *s++);
+           }
+           break;
+       default:
+           abort();
+           /* NOTREACHED */
+       }
+    }
+    outbuf_flush(is, fd);
+}
+
+void
+terminate(Iso2022Ptr is, int fd)
+{
+    if (is->outputFlags & OF_PASSTHRU) {
+       outbuf_buffered(is, fd);
+       return;
+    }
+
+    switch (is->buffered[0]) {
+    case SS2:
+       if (is->outputFlags & OF_SS)
+           is->shiftState = S_SS2;
+       discard_buffered(is);
+       return;
+    case SS3:
+       if (is->outputFlags & OF_SS)
+           is->shiftState = S_SS3;
+       discard_buffered(is);
+       return;
+    case LS0:
+       if (is->outputFlags & OF_LS)
+           is->glp = &G0(is);
+       discard_buffered(is);
+       return;
+    case LS1:
+       if (is->outputFlags & OF_LS)
+           is->glp = &G1(is);
+       discard_buffered(is);
+       return;
+    case ESC:
+       assert(is->buffered_count >= 2);
+       switch (is->buffered[1]) {
+       case SS2_7:
+           if (is->outputFlags & OF_SS)
+               is->shiftState = S_SS2;
+           discard_buffered(is);
+           return;
+       case SS3_7:
+           if (is->outputFlags & OF_SS)
+               is->shiftState = S_SS3;
+           discard_buffered(is);
+           return;
+       case LS2_7:
+           if (is->outputFlags & OF_SS)
+               is->glp = &G2(is);
+           discard_buffered(is);
+           return;
+       case LS3_7:
+           if (is->outputFlags & OF_LS)
+               is->glp = &G3(is);
+           discard_buffered(is);
+           return;
+       case LS1R_7:
+           if (is->outputFlags & OF_LS)
+               is->grp = &G1(is);
+           discard_buffered(is);
+           return;
+       case LS2R_7:
+           if (is->outputFlags & OF_LS)
+               is->grp = &G2(is);
+           discard_buffered(is);
+           return;
+       case LS3R_7:
+           if (is->outputFlags & OF_LS)
+               is->grp = &G3(is);
+           discard_buffered(is);
+           return;
+       default:
+           terminateEsc(is, fd,
+                        is->buffered + 1,
+                        (unsigned) (is->buffered_count - 1));
+           break;
+       }
+       return;
+    default:
+       outbuf_buffered(is, fd);
+    }
+}
+
+void
+terminateEsc(Iso2022Ptr is, int fd, unsigned char *s_start, unsigned count)
+{
+    const CharsetRec *charset;
+
+    /* ISO 2022 doesn't allow 2C, but Emacs/MULE uses it in 7-bit
+       mode */
+
+    if ((s_start[0] == 0x28 || s_start[0] == 0x29 ||
+        s_start[0] == 0x2A || s_start[0] == 0x2B ||
+        s_start[0] == 0x2C || s_start[0] == 0x2D ||
+        s_start[0] == 0x2E || s_start[0] == 0x2F) &&
+       count >= 2) {
+       if (is->outputFlags & OF_SELECT) {
+           if (s_start[0] <= 0x2B)
+               charset = getCharset(s_start[1], T_94);
+           else
+               charset = getCharset(s_start[1], T_96);
+           switch (s_start[0]) {
+           case 0x28:
+           case 0x2C:
+               G0(is) = charset;
+               break;
+           case 0x29:
+           case 0x2D:
+               G1(is) = charset;
+               break;
+           case 0x2A:
+           case 0x2E:
+               G2(is) = charset;
+               break;
+           case 0x2B:
+           case 0x2F:
+               G3(is) = charset;
+               break;
+           }
+       }
+       discard_buffered(is);
+    } else if (s_start[0] == 0x24 && count == 2) {
+       if (is->outputFlags & OF_SELECT) {
+           charset = getCharset(s_start[1], T_9494);
+           G0(is) = charset;
+       }
+       discard_buffered(is);
+    } else if (s_start[0] == 0x24 && count >= 2 &&
+              (s_start[1] == 0x28 || s_start[1] == 0x29 ||
+               s_start[1] == 0x2A || s_start[1] == 0x2B ||
+               s_start[1] == 0x2D || s_start[1] == 0x2E ||
+               s_start[1] == 0x2F) &&
+              count >= 3) {
+       if (is->outputFlags & OF_SELECT) {
+           if (s_start[1] <= 0x2B)
+               charset = getCharset(s_start[2], T_9494);
+           else
+               charset = getCharset(s_start[2], T_9696);
+           switch (s_start[1]) {
+           case 0x28:
+               G0(is) = charset;
+               break;
+           case 0x29:
+           case 0x2D:
+               G1(is) = charset;
+               break;
+           case 0x2A:
+           case 0x2E:
+               G2(is) = charset;
+               break;
+           case 0x2B:
+           case 0x2F:
+               G3(is) = charset;
+               break;
+           }
+       }
+       discard_buffered(is);
+    } else
+       outbuf_buffered(is, fd);
+}
+
+#ifdef NO_LEAKS
+void
+iso2022_leaks(void)
+{
+}
+#endif
diff --git a/luit/iso2022.h b/luit/iso2022.h
new file mode 100644 (file)
index 0000000..844cfdd
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifndef LUIT_ISO2022_H
+#define LUIT_ISO2022_H 1
+
+#include "charset.h"
+
+#define ESC    0x1B
+#define CSI    0x9B
+#define CSI_7  '['
+#define SS2    0x8E
+#define SS2_7  0x4E
+#define SS3    0x8F
+#define SS3_7  0x4F
+#define LS0    0x0F
+#define LS1    0x0E
+#define LS2_7  0x6E
+#define LS3_7  0x6F
+#define LS1R_7 0x7E
+#define LS2R_7 0x7D
+#define LS3R_7 0x7C
+
+#define IS_FINAL_ESC(x) (((x) & 0xF0 ) != 0x20)
+#define IS_FINAL_CSI(x) (((x) & 0xF0 ) != 0x20 && (((x) & 0xF0 ) != 0x30))
+
+#define P_NORMAL    0
+#define P_ESC       1
+#define P_CSI       2
+
+#define S_NORMAL    0
+#define S_SS2       1
+#define S_SS3       2
+
+#define IF_SS       1
+#define IF_LS       2
+#define IF_EIGHTBIT 4
+#define IF_SSGR     8
+
+#define OF_SS       1
+#define OF_LS       2
+#define OF_SELECT   4
+#define OF_PASSTHRU 8
+
+typedef struct _Iso2022 {
+    const CharsetRec **glp;
+    const CharsetRec **grp;
+    const CharsetRec *g[4];
+    const CharsetRec *other;
+    int parserState;
+    int shiftState;
+    int inputFlags;
+    int outputFlags;
+    unsigned char *buffered;
+    size_t buffered_len;
+    size_t buffered_count;
+    int buffered_ku;
+    unsigned char *outbuf;
+    size_t outbuf_count;
+} Iso2022Rec, *Iso2022Ptr;
+
+#define GL(i) (*(i)->glp)
+#define GR(i) (*(i)->grp)
+#define G0(i) ((i)->g[0])
+#define G1(i) ((i)->g[1])
+#define G2(i) ((i)->g[2])
+#define G3(i) ((i)->g[3])
+#define OTHER(i) ((i)->other)
+
+#define BUFFER_SIZE 512
+
+Iso2022Ptr allocIso2022(void);
+void destroyIso2022(Iso2022Ptr);
+int initIso2022(const char *, const char *, Iso2022Ptr);
+int mergeIso2022(Iso2022Ptr, Iso2022Ptr);
+void reportIso2022(Iso2022Ptr);
+void terminate(Iso2022Ptr, int);
+void terminateEsc(Iso2022Ptr, int, unsigned char *, unsigned);
+void copyIn(Iso2022Ptr, int, unsigned char *, int);
+void copyOut(Iso2022Ptr, int, unsigned char *, unsigned);
+
+#endif /* LUIT_ISO2022_H */
diff --git a/luit/locale.c b/luit/locale.c
new file mode 100644 (file)
index 0000000..fe070d8
--- /dev/null
@@ -0,0 +1,5 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "locale.h"
diff --git a/luit/luit.c b/luit/luit.c
new file mode 100644 (file)
index 0000000..6bd8775
--- /dev/null
@@ -0,0 +1,711 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <sys/ioctl.h>
+#include <signal.h>
+
+#include "luit.h"
+#include "sys.h"
+#include "other.h"
+#include "parser.h"
+#include "iso2022.h"
+
+static int pipe_option = 0;
+static int p2c_waitpipe[2];
+static int c2p_waitpipe[2];
+
+static Iso2022Ptr inputState = NULL, outputState = NULL;
+
+static char *child_argv0 = NULL;
+static const char *locale_name = NULL;
+static int exitOnChild = 0;
+static int converter = 0;
+
+const char *locale_alias = LOCALE_ALIAS_FILE;
+
+int ilog = -1;
+int olog = -1;
+int verbose = 0;
+
+static volatile int sigwinch_queued = 0;
+static volatile int sigchld_queued = 0;
+
+static int convert(int, int);
+static int condom(int, char **);
+
+static void
+ErrorF(const char *f,...)
+{
+    va_list args;
+    va_start(args, f);
+    vfprintf(stderr, f, args);
+    va_end(args);
+}
+
+static void
+FatalError(const char *f,...)
+{
+    va_list args;
+    va_start(args, f);
+    vfprintf(stderr, f, args);
+    va_end(args);
+    ExitProgram(1);
+}
+
+static void
+help(void)
+{
+    fprintf(stderr,
+           "luit\n"
+           "  [ -V ] [ -h ] [ -list ] [ -v ] [ -argv0 name ]\n"
+           "  [ -gl gn ] [-gr gk] "
+           "[ -g0 set ] [ -g1 set ] "
+           "[ -g2 set ] [ -g3 set ]\n"
+           "  [ -encoding encoding ] "
+           "[ +oss ] [ +ols ] [ +osl ] [ +ot ]\n"
+           "  [ -kgl gn ] [-kgr gk] "
+           "[ -kg0 set ] [ -kg1 set ] "
+           "[ -kg2 set ] [ -kg3 set ]\n"
+           "  [ -k7 ] [ +kss ] [ +kssgr ] [ -kls ]\n"
+           "  [ -c ] "
+           "[ -p ] "
+           "[ -x ] "
+           "[ -ilog filename ] "
+           "[ -olog filename ] "
+           "[ -alias filename ] "
+           "[ -- ]\n"
+           "  [ program [ args ] ]\n");
+}
+
+static int
+parseOptions(int argc, char **argv)
+{
+    int i = 1;
+    while (i < argc) {
+       if (argv[i][0] != '-' && argv[i][0] != '+') {
+           break;
+       } else if (!strcmp(argv[i], "--")) {
+           i++;
+           break;
+       } else if (!strcmp(argv[i], "-v")) {
+           verbose++;
+           i++;
+       } else if (!strcmp(argv[i], "-V")) {
+           printf("%s - %s\n", argv[0], VERSION);
+           ExitProgram(0);
+       } else if (!strcmp(argv[i], "-h")) {
+           help();
+           ExitProgram(0);
+       } else if (!strcmp(argv[i], "-list")) {
+           reportCharsets();
+           ExitProgram(0);
+       } else if (!strcmp(argv[i], "+oss")) {
+           outputState->outputFlags &= ~OF_SS;
+           i++;
+       } else if (!strcmp(argv[i], "+ols")) {
+           outputState->outputFlags &= ~OF_LS;
+           i++;
+       } else if (!strcmp(argv[i], "+osl")) {
+           outputState->outputFlags &= ~OF_SELECT;
+           i++;
+       } else if (!strcmp(argv[i], "+ot")) {
+           outputState->outputFlags = OF_PASSTHRU;
+           i++;
+       } else if (!strcmp(argv[i], "-k7")) {
+           inputState->inputFlags &= ~IF_EIGHTBIT;
+           i++;
+       } else if (!strcmp(argv[i], "+kss")) {
+           inputState->inputFlags &= ~IF_SS;
+           i++;
+       } else if (!strcmp(argv[1], "+kssgr")) {
+           inputState->inputFlags &= ~IF_SSGR;
+           i++;
+       } else if (!strcmp(argv[i], "-kls")) {
+           inputState->inputFlags |= IF_LS;
+           i++;
+       } else if (!strcmp(argv[i], "-g0")) {
+           if (i + 1 >= argc)
+               FatalError("-g0 requires an argument\n");
+           G0(outputState) = getCharsetByName(argv[i + 1]);
+           i += 2;
+       } else if (!strcmp(argv[i], "-g1")) {
+           if (i + 1 >= argc)
+               FatalError("-g1 requires an argument\n");
+           G1(outputState) = getCharsetByName(argv[i + 1]);
+           i += 2;
+       } else if (!strcmp(argv[i], "-g2")) {
+           if (i + 1 >= argc)
+               FatalError("-g2 requires an argument\n");
+           G2(outputState) = getCharsetByName(argv[i + 1]);
+           i += 2;
+       } else if (!strcmp(argv[i], "-g3")) {
+           if (i + 1 >= argc)
+               FatalError("-g3 requires an argument\n");
+           G3(outputState) = getCharsetByName(argv[i + 1]);
+
+           i += 2;
+       } else if (!strcmp(argv[i], "-gl")) {
+           int j;
+           if (i + 1 >= argc)
+               FatalError("-gl requires an argument\n");
+           if (strlen(argv[i + 1]) != 2 ||
+               argv[i + 1][0] != 'g')
+               j = -1;
+           else
+               j = argv[i + 1][1] - '0';
+           if (j < 0 || j > 3)
+               FatalError("The argument of -gl "
+                          "should be one of g0 through g3,\n"
+                          "not %s\n", argv[i + 1]);
+           else
+               outputState->glp = &outputState->g[j];
+           i += 2;
+       } else if (!strcmp(argv[i], "-gr")) {
+           int j;
+           if (i + 1 >= argc)
+               FatalError("-gr requires an argument\n");
+           if (strlen(argv[i + 1]) != 2 ||
+               argv[i + 1][0] != 'g')
+               j = -1;
+           else
+               j = argv[i + 1][1] - '0';
+           if (j < 0 || j > 3)
+               FatalError("The argument of -gl "
+                          "should be one of g0 through g3,\n"
+                          "not %s\n", argv[i + 1]);
+           else
+               outputState->grp = &outputState->g[j];
+           i += 2;
+       } else if (!strcmp(argv[i], "-kg0")) {
+           if (i + 1 >= argc)
+               FatalError("-kg0 requires an argument\n");
+           G0(inputState) = getCharsetByName(argv[i + 1]);
+           i += 2;
+       } else if (!strcmp(argv[i], "-kg1")) {
+           if (i + 1 >= argc)
+               FatalError("-kg1 requires an argument\n");
+           G1(inputState) = getCharsetByName(argv[i + 1]);
+           i += 2;
+       } else if (!strcmp(argv[i], "-kg2")) {
+           if (i + 1 >= argc)
+               FatalError("-kg2 requires an argument\n");
+           G2(inputState) = getCharsetByName(argv[i + 1]);
+           i += 2;
+       } else if (!strcmp(argv[i], "-kg3")) {
+           if (i + 1 >= argc)
+               FatalError("-kg3 requires an argument\n");
+           G3(inputState) = getCharsetByName(argv[i + 1]);
+
+           i += 2;
+       } else if (!strcmp(argv[i], "-kgl")) {
+           int j;
+           if (i + 1 >= argc)
+               FatalError("-kgl requires an argument\n");
+           if (strlen(argv[i + 1]) != 2 ||
+               argv[i + 1][0] != 'g')
+               j = -1;
+           else
+               j = argv[i + 1][1] - '0';
+           if (j < 0 || j > 3)
+               FatalError("The argument of -kgl "
+                          "should be one of g0 through g3,\n"
+                          "not %s\n", argv[i + 1]);
+           else
+               inputState->glp = &inputState->g[j];
+           i += 2;
+       } else if (!strcmp(argv[i], "-kgr")) {
+           int j;
+           if (i + 1 >= argc)
+               FatalError("-kgl requires an argument\n");
+           if (strlen(argv[i + 1]) != 2 ||
+               argv[i + 1][0] != 'g')
+               j = -1;
+           else
+               j = argv[i + 1][1] - '0';
+           if (j < 0 || j > 3)
+               FatalError("The argument of -kgl "
+                          "should be one of g0 through g3,\n"
+                          "not %s\n", argv[i + 1]);
+           else
+               inputState->grp = &inputState->g[j];
+           i += 2;
+       } else if (!strcmp(argv[i], "-argv0")) {
+           if (i + 1 >= argc)
+               FatalError("-argv0 requires an argument\n");
+           child_argv0 = argv[i + 1];
+           i += 2;
+       } else if (!strcmp(argv[i], "-x")) {
+           exitOnChild = 1;
+           i++;
+       } else if (!strcmp(argv[i], "-c")) {
+           converter = 1;
+           i++;
+       } else if (!strcmp(argv[i], "-ilog")) {
+           if (i + 1 >= argc)
+               FatalError("-ilog requires an argument\n");
+           ilog = open(argv[i + 1], O_WRONLY | O_CREAT | O_TRUNC, 0777);
+           if (ilog < 0) {
+               perror("Couldn't open input log");
+               ExitProgram(1);
+           }
+           i += 2;
+       } else if (!strcmp(argv[i], "-olog")) {
+           if (i + 1 >= argc)
+               FatalError("-olog requires an argument\n");
+           olog = open(argv[i + 1], O_WRONLY | O_CREAT | O_TRUNC, 0777);
+           if (olog < 0) {
+               perror("Couldn't open output log");
+               ExitProgram(1);
+           }
+           i += 2;
+       } else if (!strcmp(argv[i], "-alias")) {
+           if (i + 1 >= argc)
+               FatalError("-alias requires an argument\n");
+           locale_alias = argv[i + 1];
+           i += 2;
+       } else if (!strcmp(argv[i], "-encoding")) {
+           if (i + 1 >= argc)
+               FatalError("-encoding requires an argument\n");
+           locale_name = argv[i + 1];
+           i += 2;
+       } else if (!strcmp(argv[i], "-p")) {
+           pipe_option = 1;
+           i += 1;
+       } else {
+           FatalError("Unknown option %s\n", argv[i]);
+       }
+    }
+    return i;
+}
+
+static int
+parseArgs(int argc, char **argv,
+         char *argv0,
+         char **path_return,
+         char ***argv_return)
+{
+    char *path = NULL;
+    char **child_argv = NULL;
+
+    if (argc <= 0) {
+       char *shell;
+       shell = getenv("SHELL");
+       if (shell) {
+           path = strmalloc(shell);
+           if (!path)
+               goto bail;
+       } else {
+           path = strmalloc("/bin/sh");
+           if (!path)
+               goto bail;
+       }
+       child_argv = malloc(2 * sizeof(char *));
+       if (!child_argv)
+           goto bail;
+       if (argv0)
+           child_argv[0] = argv0;
+       else
+           child_argv[0] = my_basename(path);
+       child_argv[1] = NULL;
+    } else {
+       path = strmalloc(argv[0]);
+       if (!path)
+           goto bail;
+       child_argv = malloc((unsigned) (argc + 1) * sizeof(char *));
+       if (!child_argv) {
+           goto bail;
+       }
+       if (child_argv0)
+           child_argv[0] = argv0;
+       else
+           child_argv[0] = my_basename(argv[0]);
+       memcpy(child_argv + 1, argv + 1, (unsigned) (argc - 1) * sizeof(char *));
+       child_argv[argc] = NULL;
+    }
+
+    *path_return = path;
+    *argv_return = child_argv;
+    return 0;
+
+  bail:
+    if (path)
+       free(path);
+    if (argv)
+       free(argv);
+    return -1;
+}
+
+int
+main(int argc, char **argv)
+{
+    int rc;
+    int i;
+    char *l;
+
+#ifdef HAVE_PUTENV
+    if ((l = strmalloc("NCURSES_NO_UTF8_ACS=1")) != 0)
+       putenv(l);
+#endif
+
+    l = setlocale(LC_ALL, "");
+    if (!l)
+       ErrorF("Warning: couldn't set locale.\n");
+
+    inputState = allocIso2022();
+    if (!inputState)
+       FatalError("Couldn't create input state\n");
+
+    outputState = allocIso2022();
+    if (!outputState)
+       FatalError("Couldn't create output state\n");
+
+    if (l) {
+       locale_name = setlocale(LC_CTYPE, NULL);
+    } else {
+       locale_name = getenv("LC_ALL");
+       if (locale_name == NULL) {
+           locale_name = getenv("LC_CTYPE");
+           if (locale_name == NULL) {
+               locale_name = getenv("LANG");
+           }
+       }
+    }
+
+    if (locale_name == NULL) {
+       ErrorF("Couldn't get locale name -- using C\n");
+       locale_name = "C";
+    }
+
+    i = parseOptions(argc, argv);
+    if (i < 0)
+       FatalError("Couldn't parse options\n");
+
+    rc = initIso2022(locale_name, NULL, outputState);
+    if (rc < 0)
+       FatalError("Couldn't init output state\n");
+
+    rc = mergeIso2022(inputState, outputState);
+    if (rc < 0)
+       FatalError("Couldn't init input state\n");
+
+    if (converter)
+       rc = convert(0, 1);
+    else
+       rc = condom(argc - i, argv + i);
+
+#ifdef NO_LEAKS
+    ExitProgram(rc);
+#endif
+    return rc;
+}
+
+static int
+convert(int ifd, int ofd)
+{
+    int rc, i;
+    unsigned char buf[BUFFER_SIZE];
+
+    rc = droppriv();
+    if (rc < 0) {
+       perror("Couldn't drop privileges");
+       ExitProgram(1);
+    }
+
+    while (1) {
+       i = (int) read(ifd, buf, (size_t) BUFFER_SIZE);
+       if (i <= 0) {
+           if (i < 0) {
+               perror("Read error");
+               ExitProgram(1);
+           }
+           break;
+       }
+       copyOut(outputState, ofd, buf, (unsigned) i);
+    }
+    return 0;
+}
+
+#ifdef SIGWINCH
+static void
+sigwinchHandler(int sig GCC_UNUSED)
+{
+    sigwinch_queued = 1;
+}
+#endif
+
+static void
+sigchldHandler(int sig GCC_UNUSED)
+{
+    sigchld_queued = 1;
+}
+
+static int
+setup_io(int pty)
+{
+    int rc;
+    int val;
+
+#ifdef SIGWINCH
+    installHandler(SIGWINCH, sigwinchHandler);
+#endif
+    installHandler(SIGCHLD, sigchldHandler);
+
+    rc = copyTermios(0, pty);
+    if (rc < 0)
+       FatalError("Couldn't copy terminal settings\n");
+
+    rc = setRawTermios();
+    if (rc < 0)
+       FatalError("Couldn't set terminal to raw\n");
+
+    val = fcntl(0, F_GETFL, 0);
+    if (val >= 0) {
+       fcntl(0, F_SETFL, val | O_NONBLOCK);
+    }
+    val = fcntl(pty, F_GETFL, 0);
+    if (val >= 0) {
+       fcntl(pty, F_SETFL, val | O_NONBLOCK);
+    }
+
+    setWindowSize(0, pty);
+
+    return rc;
+}
+
+static void
+cleanup_io(int pty)
+{
+    int val;
+
+#ifdef SIGWINCH
+    installHandler(SIGWINCH, SIG_DFL);
+#endif
+    installHandler(SIGCHLD, SIG_DFL);
+
+    val = fcntl(0, F_GETFL, 0);
+    if (val >= 0) {
+       fcntl(0, F_SETFL, val & ~O_NONBLOCK);
+    }
+    val = fcntl(pty, F_GETFL, 0);
+    if (val >= 0) {
+       fcntl(pty, F_SETFL, val & ~O_NONBLOCK);
+    }
+}
+
+static void
+close_waitpipe(int which)
+{
+    close(p2c_waitpipe[which]);
+    close(c2p_waitpipe[!which]);
+}
+
+static void
+write_waitpipe(int fds[2])
+{
+    IGNORE_RC(write(fds[1], "1", (size_t) 1));
+}
+
+static void
+read_waitpipe(int fds[2])
+{
+    char tmp[10];
+    IGNORE_RC(read(fds[0], tmp, (size_t) 1));
+}
+
+static int
+condom(int argc, char **argv)
+{
+    int pty;
+    int pid;
+    char *line;
+    char *path = 0;
+    char **child_argv = 0;
+    int rc;
+
+    rc = parseArgs(argc, argv, child_argv0,
+                  &path, &child_argv);
+    if (rc < 0)
+       FatalError("Couldn't parse arguments\n");
+
+    rc = allocatePty(&pty, &line);
+    if (rc < 0) {
+       perror("Couldn't allocate pty");
+       ExitProgram(1);
+    }
+
+    rc = droppriv();
+    if (rc < 0) {
+       perror("Couldn't drop privileges");
+       ExitProgram(1);
+    }
+
+    if (pipe_option) {
+       IGNORE_RC(pipe(p2c_waitpipe));
+       IGNORE_RC(pipe(c2p_waitpipe));
+    }
+
+    pid = fork();
+    if (pid < 0) {
+       perror("Couldn't fork");
+       ExitProgram(1);
+    }
+
+    if (pid == 0) {
+       close(pty);
+       if (pipe_option) {
+           close_waitpipe(1);
+       }
+       child(line, path, child_argv);
+    } else {
+       if (pipe_option) {
+           close_waitpipe(0);
+       }
+       free(child_argv);
+       free(path);
+       free(line);
+       parent(pid, pty);
+    }
+
+    return 0;
+}
+
+void
+child(char *line, char *path, char *const argv[])
+{
+    int tty;
+    int pgrp;
+
+    close(0);
+    close(1);
+    close(2);
+
+    pgrp = setsid();
+    if (pgrp < 0) {
+       kill(getppid(), SIGABRT);
+       ExitProgram(1);
+    }
+
+    tty = openTty(line);
+    if (tty < 0) {
+       kill(getppid(), SIGABRT);
+       ExitProgram(1);
+    }
+    if (pipe_option) {
+       write_waitpipe(c2p_waitpipe);
+    }
+
+    if (tty != 0)
+       dup2(tty, 0);
+    if (tty != 1)
+       dup2(tty, 1);
+    if (tty != 2)
+       dup2(tty, 2);
+
+    if (tty > 2)
+       close(tty);
+
+    if (pipe_option) {
+       read_waitpipe(p2c_waitpipe);
+       close_waitpipe(0);
+    }
+
+    execvp(path, argv);
+    perror("Couldn't exec");
+    ExitProgram(1);
+}
+
+void
+parent(int pid GCC_UNUSED, int pty)
+{
+    unsigned char buf[BUFFER_SIZE];
+    int i;
+    int rc;
+
+    if (pipe_option) {
+       read_waitpipe(c2p_waitpipe);
+    }
+
+    if (verbose) {
+       reportIso2022(outputState);
+    }
+    setup_io(pty);
+
+    if (pipe_option) {
+       write_waitpipe(p2c_waitpipe);
+       close_waitpipe(1);
+    }
+
+    for (;;) {
+       rc = waitForInput(0, pty);
+
+       if (sigwinch_queued) {
+           sigwinch_queued = 0;
+           setWindowSize(0, pty);
+       }
+
+       if (sigchld_queued && exitOnChild)
+           break;
+
+       if (rc > 0) {
+           if (rc & 2) {
+               i = (int) read(pty, buf, (size_t) BUFFER_SIZE);
+               if ((i == 0) || ((i < 0) && (errno != EAGAIN)))
+                   break;
+               if (i > 0)
+                   copyOut(outputState, 0, buf, (unsigned) i);
+           }
+           if (rc & 1) {
+               i = (int) read(0, buf, (size_t) BUFFER_SIZE);
+               if ((i == 0) || ((i < 0) && (errno != EAGAIN)))
+                   break;
+               if (i > 0)
+                   copyIn(inputState, pty, buf, i);
+           }
+       }
+    }
+
+    restoreTermios();
+    cleanup_io(pty);
+}
+
+#ifdef NO_LEAKS
+void
+luit_leaks(void)
+{
+    destroyIso2022(inputState);
+    destroyIso2022(outputState);
+}
+#endif
diff --git a/luit/luit.h b/luit/luit.h
new file mode 100644 (file)
index 0000000..39be5d2
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifndef LUIT_LUIT_H
+#define LUIT_LUIT_H 1
+
+extern const char *locale_alias;
+extern int iso2022;
+extern int verbose;
+extern int sevenbit;
+extern int ilog;
+extern int olog;
+
+void child(char *, char *, char *const *);
+void parent(int, int);
+
+#endif /* LUIT_LUIT_H */
diff --git a/luit/man/Makefile.am b/luit/man/Makefile.am
new file mode 100644 (file)
index 0000000..4844a20
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+appmandir = $(APP_MAN_DIR)
+appman_PRE = luit.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+EXTRA_DIST = $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+MAN_SUBSTS += -e 's|__locale_alias__|$(LOCALEALIASFILE)|g'
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/luit/man/Makefile.in b/luit/man/Makefile.in
new file mode 100644 (file)
index 0000000..ecf6b91
--- /dev/null
@@ -0,0 +1,438 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = man
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(appmandir)"
+DATA = $(appman_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
+DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FILE_MAN_DIR = @FILE_MAN_DIR@
+FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_MAN_DIR = @LIB_MAN_DIR@
+LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LOCALEALIASFILE = @LOCALEALIASFILE@
+LTLIBOBJS = @LTLIBOBJS@
+LUIT_CFLAGS = @LUIT_CFLAGS@
+LUIT_LIBS = @LUIT_LIBS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__locale_alias__|$(LOCALEALIASFILE)|g'
+MISC_MAN_DIR = @MISC_MAN_DIR@
+MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+OS_CFLAGS = @OS_CFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+appmandir = $(APP_MAN_DIR)
+appman_PRE = luit.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+EXTRA_DIST = $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign man/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-appmanDATA: $(appman_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
+       done
+
+uninstall-appmanDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(appmandir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-appmanDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-appmanDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-appmanDATA install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am uninstall uninstall-am uninstall-appmanDATA
+
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/luit/man/luit.man b/luit/man/luit.man
new file mode 100644 (file)
index 0000000..596e0d0
--- /dev/null
@@ -0,0 +1,246 @@
+.\"
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds AQ \(aq
+.el       .ds AQ '
+.ie \n(.g .ds `` \(lq
+.el       .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el       .ds '' ''
+.TH LUIT 1 __vendorversion__
+.SH NAME
+luit \- Locale and ISO\ 2022 support for Unicode terminals
+.SH SYNOPSIS
+.B luit
+[
+.I options
+] [
+.B \-\-
+] [
+.I program
+[
+.I args
+] ]
+.SH DESCRIPTION
+.B Luit
+is a filter that can be run between an arbitrary application and a
+UTF-8 terminal emulator.  It will convert application output from the
+locale's encoding into UTF-8, and convert terminal input from UTF-8
+into the locale's encoding.
+
+An application may also request switching to a different output
+encoding using ISO\ 2022 and ISO\ 6429 escape sequences.  Use of this
+feature is discouraged: multilingual applications should be modified
+to directly generate UTF-8 instead.
+
+.B Luit
+is usually invoked transparently by the terminal emulator.  For
+information about running
+.B luit
+from the command line, see EXAMPLES below.
+.SH OPTIONS
+.TP
+.B \-h
+Display some summary help and quit.
+.TP
+.B \-list
+List the supported charsets and encodings, then quit.
+.TP
+.B \-V
+Print luit's version and quit.
+.TP
+.B \-v
+Be verbose.
+.TP
+.B \-c
+Function as a simple converter from standard input to standard output.
+.TP
+.B \-p
+In startup, establish a handshake between parent and child processes.
+This is needed for some systems, e.g., FreeBSD.
+.TP
+.B \-x
+Exit as soon as the child dies.  This may cause
+.B luit
+to lose data at the end of the child's output.
+.TP
+.BI \-argv0 " name"
+Set the child's name (as passed in argv[0]).
+.TP
+.BI \-encoding " encoding"
+Set up
+.B luit
+to use
+.I encoding
+rather than the current locale's encoding.
+.TP
+.B +oss
+Disable interpretation of single shifts in application output.
+.TP
+.B +ols
+Disable interpretation of locking shifts in application output.
+.TP
+.B +osl
+Disable interpretation of character set selection sequences in
+application output.
+.TP
+.B +ot
+Disable interpretation of all sequences and pass all sequences in
+application output to the terminal unchanged.  This may lead to
+interesting results.
+.TP
+.B \-k7
+Generate seven-bit characters for keyboard input.
+.TP
+.B +kss
+Disable generation of single-shifts for keyboard input.
+.TP
+.B +kssgr
+Use GL codes after a single shift for keyboard input.  By default, GR
+codes are generated after a single shift when generating eight-bit
+keyboard input.
+.TP
+.B \-kls
+Generate locking shifts (SO/SI) for keyboard input.
+.TP
+.BI \-gl " gn"
+Set the initial assignment of GL.  The argument should be one of
+.BR g0 ,
+.BR g1 ,
+.B g2
+or
+.BR g3 .
+The default depends on the locale, but is usually
+.BR g0 .
+.TP
+.BI \-gr " gk"
+Set the initial assignment of GR.  The default depends on the locale,
+and is usually
+.B g2
+except for EUC locales, where it is
+.BR g1 .
+.TP
+.BI \-g0 " charset"
+Set the charset initially selected in G0.  The default depends on
+the locale, but is usually
+.BR ASCII .
+.TP
+.BI \-g1 " charset"
+Set the charset initially selected in G1.  The default depends on the
+locale.
+.TP
+.BI \-g2 " charset"
+Set the charset initially selected in G2.  The default depends on the
+locale.
+.TP
+.BI \-g3 " charset"
+Set the charset initially selected in G3.  The default depends on the
+locale.
+.TP
+.BI \-ilog " filename"
+Log into
+.I filename
+all the bytes received from the child.
+.TP
+.BI \-olog " filename"
+Log into
+.I filename
+all the bytes sent to the terminal emulator.
+.TP
+.BI \-alias " filename"
+the locale alias file
+.br
+(default: __locale_alias__).
+.TP
+.B \-\-
+End of options.
+.SH EXAMPLES
+The most typical use of
+.B luit
+is to adapt an instance of
+.B XTerm
+to the locale's encoding.  Current versions of
+.B XTerm
+invoke
+.B luit
+automatically when it is needed.  If you are using an older release of
+.BR XTerm ,
+or a different terminal emulator, you may invoke
+.B luit
+manually:
+.IP
+$ xterm \-u8 \-e luit
+.PP
+If you are running in a UTF-8 locale but need to access a remote
+machine that doesn't support UTF-8,
+.B luit
+can adapt the remote output to your terminal:
+.IP
+$ LC_ALL=fr_FR luit ssh legacy-machine
+.PP
+.B Luit
+is also useful with applications that hard-wire an encoding that is
+different from the one normally used on the system or want to use
+legacy escape sequences for multilingual output.  In particular,
+versions of
+.B Emacs
+that do not speak UTF-8 well can use
+.B luit
+for multilingual output:
+.IP
+$ luit -encoding 'ISO 8859-1' emacs -nw
+.PP
+And then, in
+.BR Emacs ,
+.IP
+M-x set-terminal-coding-system RET iso-2022-8bit-ss2 RET
+.PP
+.SH FILES
+.TP
+.B __locale_alias__
+The file mapping locales to locale encodings.
+.SH SECURITY
+On systems with SVR4 (\*(``Unix-98\*('') ptys (Linux version 2.2 and later,
+SVR4),
+.B luit
+should be run as the invoking user.
+
+On systems without SVR4 (\*(``Unix-98\*('') ptys (notably BSD variants),
+running
+.B luit
+as an ordinary user will leave the tty world-writable; this is a
+security hole, and luit will generate a warning (but still accept to
+run).  A possible solution is to make
+.B luit
+suid root;
+.B luit
+should drop privileges sufficiently early to make this safe.  However,
+the startup code has not been exhaustively audited, and the author
+takes no responsibility for any resulting security issues.
+
+.B Luit
+will refuse to run if it is installed setuid and cannot safely drop
+privileges.
+.SH BUGS
+None of this complexity should be necessary.  Stateless UTF-8
+throughout the system is the way to go.
+
+Charsets with a non-trivial intermediary byte are not yet supported.
+
+Selecting alternate sets of control characters is not supported and
+will never be.
+.SH SEE ALSO
+xterm(__appmansuffix__), unicode(__miscmansuffix__), utf-8(__miscmansuffix__), charsets(__miscmansuffix__).
+.nf
+.br
+.I Character Code Structure and Extension Techniques (ISO\ 2022, ECMA-35).
+.br
+.I Control Functions for Coded Character Sets (ISO\ 6429, ECMA-48).
+.fi
+.SH AUTHOR
+The version of
+.B Luit
+included in this X.Org Foundation release
+was originally written by Juliusz Chroboczek <jch@freedesktop.org>
+for the XFree86 Project and includes additional contributions from
+Thomas E. Dickey required for newer releases of xterm(__appmansuffix__).
similarity index 100%
rename from xman/missing
rename to luit/missing
diff --git a/luit/other.c b/luit/other.c
new file mode 100644 (file)
index 0000000..f70a78d
--- /dev/null
@@ -0,0 +1,483 @@
+/*
+Copyright (c) 2002 by Tomohiro KUBOTA
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include "other.h"
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define EURO_10646 0x20AC
+
+int
+init_gbk(OtherStatePtr s)
+{
+    s->gbk.mapping =
+       FontEncMapFind("gbk-0", FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!s->gbk.mapping)
+       return 0;
+
+    s->gbk.reverse = FontMapReverse(s->gbk.mapping);
+    if (!s->gbk.reverse)
+       return 0;
+
+    s->gbk.buf = -1;
+    return 1;
+}
+
+unsigned int
+mapping_gbk(unsigned int n, OtherStatePtr s)
+{
+    unsigned int r;
+    if (n < 128)
+       return n;
+    if (n == 128)
+       return EURO_10646;
+    r = FontEncRecode(n, s->gbk.mapping);
+    return r;
+}
+
+unsigned int
+reverse_gbk(unsigned int n, OtherStatePtr s)
+{
+    if (n < 128)
+       return n;
+    if (n == EURO_10646)
+       return 128;
+    return s->gbk.reverse->reverse(n, s->gbk.reverse->data);
+}
+
+int
+stack_gbk(unsigned c, OtherStatePtr s)
+{
+    if (s->gbk.buf < 0) {
+       if (c < 129)
+           return (int) c;
+       s->gbk.buf = (int) c;
+       return -1;
+    } else {
+       int b;
+       if (c < 0x40 || c == 0x7F) {
+           s->gbk.buf = -1;
+           return (int) c;
+       }
+       if (s->gbk.buf < 0xFF && c < 0xFF)
+           b = (int) ((unsigned) (s->gbk.buf << 8) + c);
+       else
+           b = -1;
+       s->gbk.buf = -1;
+       return b;
+    }
+}
+
+int
+init_utf8(OtherStatePtr s)
+{
+    s->utf8.buf_ptr = 0;
+    return 1;
+}
+
+unsigned int
+mapping_utf8(unsigned int n, OtherStatePtr s GCC_UNUSED)
+{
+    return n;
+}
+
+unsigned int
+reverse_utf8(unsigned int n, OtherStatePtr s GCC_UNUSED)
+{
+    if (n < 0x80)
+       return n;
+    if (n < 0x800)
+       return 0xC080 + ((n & 0x7C0) << 2) + (n & 0x3F);
+    if (n < 0x10000)
+       return 0xE08080 + ((n & 0xF000) << 4) + ((n & 0xFC0) << 2) + (n & 0x3F);
+    return 0xF0808080 + ((n & 0x1C0000) << 6) + ((n & 0x3F000) << 4) +
+       ((n & 0xFC0) << 2) + (n & 0x3F);
+}
+
+int
+stack_utf8(unsigned c, OtherStatePtr s)
+{
+    int u;
+
+    if (c < 0x80) {
+       s->utf8.buf_ptr = 0;
+       return (int) c;
+    }
+    if (s->utf8.buf_ptr == 0) {
+       if ((c & 0x40) == 0)
+           return -1;
+       s->utf8.buf[s->utf8.buf_ptr++] = UChar(c);
+       if ((c & 0x60) == 0x40)
+           s->utf8.len = 2;
+       else if ((c & 0x70) == 0x60)
+           s->utf8.len = 3;
+       else if ((c & 0x78) == 0x70)
+           s->utf8.len = 4;
+       else
+           s->utf8.buf_ptr = 0;
+       return -1;
+    }
+    if ((c & 0x40) != 0) {
+       s->utf8.buf_ptr = 0;
+       return -1;
+    }
+    s->utf8.buf[s->utf8.buf_ptr++] = UChar(c);
+    if (s->utf8.buf_ptr < s->utf8.len)
+       return -1;
+    switch (s->utf8.len) {
+    case 2:
+       u = ((s->utf8.buf[0] & 0x1F) << 6) | (s->utf8.buf[1] & 0x3F);
+       s->utf8.buf_ptr = 0;
+       if (u < 0x80)
+           return -1;
+       else
+           return u;
+    case 3:
+       u = ((s->utf8.buf[0] & 0x0F) << 12)
+           | ((s->utf8.buf[1] & 0x3F) << 6)
+           | (s->utf8.buf[2] & 0x3F);
+       s->utf8.buf_ptr = 0;
+       if (u < 0x800)
+           return -1;
+       else
+           return u;
+    case 4:
+       u = ((s->utf8.buf[0] & 0x03) << 18)
+           | ((s->utf8.buf[1] & 0x3F) << 12)
+           | ((s->utf8.buf[2] & 0x3F) << 6)
+           | ((s->utf8.buf[3] & 0x3F));
+       s->utf8.buf_ptr = 0;
+       if (u < 0x10000)
+           return -1;
+       else
+           return u;
+    }
+    s->utf8.buf_ptr = 0;
+    return -1;
+}
+
+#define HALFWIDTH_10646 0xFF61
+#define YEN_SJIS 0x5C
+#define YEN_10646 0x00A5
+#define OVERLINE_SJIS 0x7E
+#define OVERLINE_10646 0x203E
+
+int
+init_sjis(OtherStatePtr s)
+{
+    s->sjis.x0208mapping =
+       FontEncMapFind("jisx0208.1990-0", FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!s->sjis.x0208mapping)
+       return 0;
+
+    s->sjis.x0208reverse = FontMapReverse(s->sjis.x0208mapping);
+    if (!s->sjis.x0208reverse)
+       return 0;
+
+    s->sjis.x0201mapping =
+       FontEncMapFind("jisx0201.1976-0", FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!s->sjis.x0201mapping)
+       return 0;
+
+    s->sjis.x0201reverse = FontMapReverse(s->sjis.x0201mapping);
+    if (!s->sjis.x0201reverse)
+       return 0;
+
+    s->sjis.buf = -1;
+    return 1;
+}
+
+unsigned int
+mapping_sjis(unsigned int n, OtherStatePtr s)
+{
+    unsigned int j1, j2, s1, s2;
+    if (n == YEN_SJIS)
+       return YEN_10646;
+    if (n == OVERLINE_SJIS)
+       return OVERLINE_10646;
+    if (n < 0x80)
+       return n;
+    if (n >= 0xA0 && n <= 0xDF)
+       return FontEncRecode(n, s->sjis.x0201mapping);
+    s1 = ((n >> 8) & 0xFF);
+    s2 = (n & 0xFF);
+    j1 = (s1 << 1)
+       - (unsigned) (s1 <= 0x9F ? 0xE0 : 0x160)
+       - (unsigned) (s2 < 0x9F ? 1 : 0);
+    j2 = s2
+       - 0x1F
+       - (unsigned) (s2 >= 0x7F ? 1 : 0)
+       - (unsigned) (s2 >= 0x9F ? 0x5E : 0);
+    return FontEncRecode((j1 << 8) + j2, s->sjis.x0208mapping);
+}
+
+unsigned int
+reverse_sjis(unsigned int n, OtherStatePtr s)
+{
+    unsigned int j, j1, j2, s1, s2;
+    if (n == YEN_10646)
+       return YEN_SJIS;
+    if (n == OVERLINE_10646)
+       return OVERLINE_SJIS;
+    if (n < 0x80)
+       return n;
+    if (n >= HALFWIDTH_10646)
+       return s->sjis.x0201reverse->reverse(n, s->sjis.x0201reverse->data);
+    j = s->sjis.x0208reverse->reverse(n, s->sjis.x0208reverse->data);
+    j1 = ((j >> 8) & 0xFF);
+    j2 = (j & 0xFF);
+    s1 = ((j1 - 1) >> 1)
+       + (unsigned) ((j1 <= 0x5E) ? 0x71 : 0xB1);
+    s2 = j2
+       + (unsigned) ((j1 & 1) ? ((j2 < 0x60) ? 0x1F : 0x20) : 0x7E);
+    return (s1 << 8) + s2;
+}
+
+int
+stack_sjis(unsigned c, OtherStatePtr s)
+{
+    if (s->sjis.buf < 0) {
+       if (c < 128 || (c >= 0xA0 && c <= 0xDF))
+           return (int) c;
+       s->sjis.buf = (int) c;
+       return -1;
+    } else {
+       int b;
+       if (c < 0x40 || c == 0x7F) {
+           s->sjis.buf = -1;
+           return (int) c;
+       }
+       if (s->sjis.buf < 0xFF && c < 0xFF)
+           b = (int) ((unsigned) (s->sjis.buf << 8) + c);
+       else
+           b = -1;
+       s->sjis.buf = -1;
+       return b;
+    }
+}
+
+int
+init_hkscs(OtherStatePtr s)
+{
+    s->hkscs.mapping =
+       FontEncMapFind("big5hkscs-0", FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!s->hkscs.mapping)
+       return 0;
+
+    s->hkscs.reverse = FontMapReverse(s->hkscs.mapping);
+    if (!s->hkscs.reverse)
+       return 0;
+
+    s->hkscs.buf = -1;
+    return 1;
+}
+
+unsigned int
+mapping_hkscs(unsigned int n, OtherStatePtr s)
+{
+    unsigned int r;
+    if (n < 128)
+       return n;
+    if (n == 128)
+       return EURO_10646;
+    r = FontEncRecode(n, s->hkscs.mapping);
+    return r;
+}
+
+unsigned int
+reverse_hkscs(unsigned int n, OtherStatePtr s)
+{
+    if (n < 128)
+       return n;
+    if (n == EURO_10646)
+       return 128;
+    return s->hkscs.reverse->reverse(n, s->hkscs.reverse->data);
+}
+
+int
+stack_hkscs(unsigned c, OtherStatePtr s)
+{
+    if (s->hkscs.buf < 0) {
+       if (c < 129)
+           return (int) c;
+       s->hkscs.buf = (int) c;
+       return -1;
+    } else {
+       int b;
+       if (c < 0x40 || c == 0x7F) {
+           s->hkscs.buf = -1;
+           return (int) c;
+       }
+       if (s->hkscs.buf < 0xFF && c < 0xFF)
+           b = (int) ((unsigned) (s->hkscs.buf << 8) + c);
+       else
+           b = -1;
+       s->hkscs.buf = -1;
+       return b;
+    }
+}
+
+/*
+ *  Because of the 1 ~ 4 multi-bytes nature of GB18030.
+ *  CharSet encoding is split to 2 subset (besides latin)
+ *  The 2Bytes MB char is defined in gb18030.2000-0
+ *  The 4Bytes MB char is defined in gb18030.2000-1
+ *  Please note that the mapping in 2000-1 is not a 4Bytes seq => 2Bytes value
+ *  mapping.
+ *  To use the 2000-1 we need to 'linear' the 4Bytes sequence and 'lookup' the 
+ *  unicode value after that.
+ *
+ *  For more info on GB18030 standard pls check:
+ *    http://oss.software.ibm.com/icu/docs/papers/gb18030.html
+ *
+ *  For more info on GB18030 implementation issues in XFree86 pls check:
+ *    http://www.ibm.com/developerWorks/cn/linux/i18n/gb18030/xfree86/part1
+ */
+int
+init_gb18030(OtherStatePtr s)
+{
+    s->gb18030.cs0_mapping =
+       FontEncMapFind("gb18030.2000-0", FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!s->gb18030.cs0_mapping)
+       return 0;
+
+    s->gb18030.cs0_reverse = FontMapReverse(s->gb18030.cs0_mapping);
+    if (!s->gb18030.cs0_reverse)
+       return 0;
+
+    s->gb18030.cs1_mapping =
+       FontEncMapFind("gb18030.2000-1", FONT_ENCODING_UNICODE, -1, -1, NULL);
+    if (!s->gb18030.cs1_mapping)
+       return 0;
+
+    s->gb18030.cs1_reverse = FontMapReverse(s->gb18030.cs1_mapping);
+    if (!s->gb18030.cs1_reverse)
+       return 0;
+
+    s->gb18030.linear = 0;
+    s->gb18030.buf_ptr = 0;
+    return 1;
+}
+
+unsigned int
+mapping_gb18030(unsigned int n, OtherStatePtr s)
+{
+    if (n <= 0x80)
+       return n;               /* 0x80 is valid but unassigned codepoint */
+    if (n >= 0xFFFF)
+       return '?';
+
+    return FontEncRecode(n,
+                        (s->gb18030.linear) ? s->gb18030.cs1_mapping : s->gb18030.cs0_mapping);
+}
+
+unsigned int
+reverse_gb18030(unsigned int n, OtherStatePtr s)
+{
+    /* when lookup in 2000-0 failed. */
+    /* lookup in 2000-1 and then try to unlinear'd */
+    unsigned int r;
+    if (n <= 0x80)
+       return n;
+
+    r = s->gb18030.cs0_reverse->reverse(n, s->gb18030.cs0_reverse->data);
+    if (r != 0)
+       return r;
+
+    r = s->gb18030.cs1_reverse->reverse(n, s->gb18030.cs1_reverse->data);
+    if (r != 0) {
+       unsigned char bytes[4];
+
+       bytes[3] = UChar(0x30 + r % 10);
+       r /= 10;
+       bytes[2] = UChar(0x81 + r % 126);
+       r /= 126;
+       bytes[1] = UChar(0x30 + r % 10);
+       r /= 10;
+       bytes[0] = UChar(0x81 + r);
+
+       r = (unsigned int) bytes[0] << 24;
+       r |= (unsigned int) bytes[1] << 16;
+       r |= (unsigned int) bytes[2] << 8;
+       r |= (unsigned int) bytes[3];
+    }
+    return r;
+}
+
+int
+stack_gb18030(unsigned c, OtherStatePtr s)
+{
+    /* if set gb18030.linear => True. the return value is "linear'd" */
+    if (s->gb18030.buf_ptr == 0) {
+       if (c <= 0x80)
+           return (int) c;
+       if (c == 0xFF)
+           return -1;
+       s->gb18030.linear = 0;
+       s->gb18030.buf[s->gb18030.buf_ptr++] = (int) c;
+       return -1;
+    } else if (s->gb18030.buf_ptr == 1) {
+       if (c >= 0x40) {
+           s->gb18030.buf_ptr = 0;
+           if ((c == 0x80) || (c == 0xFF))
+               return -1;
+           else
+               return (int) ((unsigned) (s->gb18030.buf[0] << 8) + c);
+       } else if (c >= 30) {   /* 2Byte is (0x30 -> 0x39) */
+           s->gb18030.buf[s->gb18030.buf_ptr++] = (int) c;
+           return -1;
+       } else {
+           s->gb18030.buf_ptr = 0;
+           return (int) c;
+       }
+    } else if (s->gb18030.buf_ptr == 2) {
+       if ((c >= 0x81) && (c <= 0xFE)) {
+           s->gb18030.buf[s->gb18030.buf_ptr++] = (int) c;
+           return -1;
+       } else {
+           s->gb18030.buf_ptr = 0;
+           return (int) c;
+       }
+    } else {
+       int r = 0;
+       s->gb18030.buf_ptr = 0;
+       if ((c >= 0x30) && (c <= 0x39)) {
+           s->gb18030.linear = 1;
+           r = (((s->gb18030.buf[0] - 0x81) * 10
+                 + (s->gb18030.buf[1] - 0x30)) * 126
+                + (s->gb18030.buf[2] - 0x81)) * 10
+               + ((int) c - 0x30);
+           return r;
+       }
+       return -1;
+    }
+}
diff --git a/luit/other.h b/luit/other.h
new file mode 100644 (file)
index 0000000..9d814a3
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+Copyright (c) 2002 by Tomohiro KUBOTA
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifndef LUIT_OTHER_H
+#define LUIT_OTHER_H 1
+
+#include "config.h"            /* include this, for self-contained headers */
+
+#ifndef GCC_UNUSED
+#define GCC_UNUSED             /* ARGSUSED */
+#endif
+
+#include <X11/fonts/fontenc.h>
+
+#define UChar(n) ((unsigned char)(n))
+
+typedef struct {
+    FontMapPtr mapping;
+    FontMapReversePtr reverse;
+    int buf;
+} aux_gbk;
+
+typedef struct {
+    unsigned char buf[4];
+    int buf_ptr, len;
+} aux_utf8;
+
+typedef struct {
+    FontMapPtr x0208mapping;
+    FontMapPtr x0201mapping;
+    FontMapReversePtr x0208reverse;
+    FontMapReversePtr x0201reverse;
+    int buf;
+} aux_sjis;
+
+typedef struct {
+    FontMapPtr mapping;
+    FontMapReversePtr reverse;
+    int buf;
+} aux_hkscs;
+
+typedef struct {
+    FontMapPtr cs0_mapping;    /* gb18030.2000-0 */
+    FontMapReversePtr cs0_reverse;
+
+    FontMapPtr cs1_mapping;    /* gb18030.2000-1 */
+    FontMapReversePtr cs1_reverse;
+
+    int linear;                        /* set to '1' if stack_gb18030 linearized a 4bytes seq */
+    int buf[3];
+    int buf_ptr;
+} aux_gb18030;
+
+typedef union {
+    aux_gbk gbk;
+    aux_utf8 utf8;
+    aux_sjis sjis;
+    aux_hkscs hkscs;
+    aux_gb18030 gb18030;
+} OtherState, *OtherStatePtr;
+
+int init_gbk(OtherStatePtr);
+unsigned int mapping_gbk(unsigned int, OtherStatePtr);
+unsigned int reverse_gbk(unsigned int, OtherStatePtr);
+int stack_gbk(unsigned, OtherStatePtr);
+
+int init_utf8(OtherStatePtr);
+unsigned int mapping_utf8(unsigned int, OtherStatePtr);
+unsigned int reverse_utf8(unsigned int, OtherStatePtr);
+int stack_utf8(unsigned, OtherStatePtr);
+
+int init_sjis(OtherStatePtr);
+unsigned int mapping_sjis(unsigned int, OtherStatePtr);
+unsigned int reverse_sjis(unsigned int, OtherStatePtr);
+int stack_sjis(unsigned, OtherStatePtr);
+
+int init_hkscs(OtherStatePtr);
+unsigned int mapping_hkscs(unsigned int, OtherStatePtr);
+unsigned int reverse_hkscs(unsigned int, OtherStatePtr);
+int stack_hkscs(unsigned, OtherStatePtr);
+
+int init_gb18030(OtherStatePtr);
+unsigned int mapping_gb18030(unsigned int, OtherStatePtr);
+unsigned int reverse_gb18030(unsigned int, OtherStatePtr);
+int stack_gb18030(unsigned, OtherStatePtr);
+
+#endif /* LUIT_OTHER_H */
diff --git a/luit/parser.c b/luit/parser.c
new file mode 100644 (file)
index 0000000..7e0e90b
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "luit.h"
+#include "parser.h"
+#include "sys.h"
+
+static char keyword[MAX_KEYWORD_LENGTH];
+
+static void
+skipEndOfLine(FILE *f, int c)
+{
+    if (c == 0)
+       c = getc(f);
+
+    for (;;)
+       if (c <= 0 || c == '\n')
+           return;
+       else
+           c = getc(f);
+}
+
+static int
+drainWhitespace(FILE *f, int c)
+{
+    if (c == 0)
+       c = getc(f);
+
+    while (c == '#' || c == ' ' || c == '\t') {
+       if (c <= 0)
+           return 0;
+       if (c == '#') {
+           skipEndOfLine(f, c);
+           return '\n';
+       }
+       c = getc(f);
+    }
+
+    return c;
+}
+
+static int
+getString(FILE *f, int string_end, int *c_return)
+{
+    int i = 0;
+    int c;
+
+    c = getc(f);
+    while (c > 0) {
+       if (c == string_end)
+           break;
+       if (c == '\\') {
+           c = getc(f);
+           if (c == '\n')
+               continue;
+       }
+       keyword[i++] = (char) c;
+       if (i >= MAX_KEYWORD_LENGTH)
+           return TOK_ERROR;
+       c = getc(f);
+    }
+
+    if (c <= 0)
+       return TOK_ERROR;
+    keyword[i] = '\0';
+    *c_return = c;
+    return TOK_KEYWORD;
+}
+
+static int
+getToken(FILE *f, int c, int parse_assignments, int *c_return)
+{
+    int i;
+    c = drainWhitespace(f, c);
+
+    if (c < 0)
+       return TOK_EOF;
+    if (c == '\n') {
+       *c_return = 0;
+       return TOK_EOL;
+    }
+
+    if (parse_assignments && c == '=') {
+       *c_return = 0;
+       return TOK_EQUALS;
+    }
+
+    if (c == '\'' || c == '"')
+       return getString(f, c, c_return);
+
+    i = 0;
+    while (c > 0 && c != ' ' && c != '\t' && c != '\n') {
+       if (c == '\\') {
+           c = getc(f);
+           if (c == '\n')
+               continue;
+       }
+       keyword[i++] = (char) c;
+       if (i >= MAX_KEYWORD_LENGTH)
+           return TOK_ERROR;
+       c = getc(f);
+       if (parse_assignments && c == '=')
+           break;
+    }
+
+    *c_return = c < 0 ? 0 : c;
+    keyword[i] = '\0';
+    return TOK_KEYWORD;
+}
+
+/* Can parse both the old and new formats for locale.alias */
+static int
+parseTwoTokenLine(FILE *f, char *first, char *second)
+{
+    int c = 0;
+    int tok;
+
+  again:
+
+    tok = getToken(f, c, 0, &c);
+    if (tok == TOK_EOF)
+       return -1;
+    else if (tok == TOK_EOL)
+       goto again;
+    else if (tok == TOK_KEYWORD) {
+       size_t len = strlen(keyword);
+       if (keyword[len - 1] == ':')
+           keyword[len - 1] = '\0';
+       strcpy(first, keyword);
+    } else
+       return -2;
+
+    tok = getToken(f, c, 0, &c);
+    if (tok == TOK_KEYWORD) {
+       strcpy(second, keyword);
+    } else
+       return -2;
+
+    tok = getToken(f, c, 0, &c);
+    if (tok != TOK_EOL)
+       return -2;
+
+    return 0;
+}
+
+char *
+resolveLocale(const char *locale)
+{
+    FILE *f;
+    char first[MAX_KEYWORD_LENGTH], second[MAX_KEYWORD_LENGTH];
+    char *resolved = NULL;
+    int rc;
+    int found = 0;
+
+    f = fopen(locale_alias, "r");
+
+    if (f != NULL) {
+       do {
+           rc = parseTwoTokenLine(f, first, second);
+           if (rc < -1)
+               break;
+           if (!strcmp(first, locale)) {
+               resolved = strmalloc(second);
+               found = 1;
+               break;
+           }
+       } while (rc >= 0);
+
+       if (!found) {
+           if (resolved == NULL) {
+               resolved = strmalloc(locale);
+           }
+       }
+
+       fclose(f);
+    } else {
+       perror(locale_alias);
+    }
+
+    return resolved;
+}
diff --git a/luit/parser.h b/luit/parser.h
new file mode 100644 (file)
index 0000000..5521de3
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifndef LUIT_PARSER_H
+#define LUIT_PARSER_H 1
+
+#ifndef LOCALE_ALIAS_FILE
+#define LOCALE_ALIAS_FILE "/usr/X11R6/lib/X11/locale/locale.alias"
+#endif
+
+#define MAX_KEYWORD_LENGTH 1024
+
+#define TOK_ERROR (-2)
+#define TOK_EOF (-1)
+#define TOK_EOL 0
+#define TOK_EQUALS 1
+#define TOK_KEYWORD 2
+
+char *resolveLocale(const char *locale);
+
+#endif /* LUIT_PARSER_H */
diff --git a/luit/sys.c b/luit/sys.c
new file mode 100644 (file)
index 0000000..aca656a
--- /dev/null
@@ -0,0 +1,555 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <termios.h>
+#include <signal.h>
+#include <errno.h>
+
+#ifdef HAVE_WORKING_POLL
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <sys/poll.h>
+#endif
+#undef HAVE_SELECT
+#endif
+
+#ifdef HAVE_SELECT
+#if !(defined(_MINIX) || defined(__BEOS__))
+#define HAVE_WORKING_SELECT 1
+#endif
+#endif
+
+#ifdef HAVE_WORKING_SELECT
+#if defined(HAVE_SYS_SELECT_H) && defined(HAVE_SYS_TIME_SELECT)
+#include <sys/select.h>
+#endif
+#endif
+
+#ifdef HAVE_PTY_H
+#include <pty.h>
+#endif
+
+#ifdef HAVE_STROPTS_H
+#include <stropts.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_OPENPTY
+#if defined(HAVE_UTIL_H)
+#include <util.h>
+#elif defined(HAVE_LIBUTIL_H)
+#include <libutil.h>
+#elif defined(HAVE_PTY_H)
+#include <pty.h>
+#endif
+#endif /* HAVE_OPENPTY */
+
+#include "sys.h"
+
+#ifdef USE_IGNORE_RC
+int ignore_unused;
+#endif
+
+#if defined(HAVE_OPENPTY)
+static int opened_tty = -1;
+#endif
+
+static int saved_tio_valid = 0;
+static struct termios saved_tio;
+
+int
+waitForOutput(int fd)
+{
+    int ret = 0;
+
+#if defined(HAVE_WORKING_POLL)
+    struct pollfd pfd[1];
+    int rc;
+
+    pfd[0].fd = fd;
+    pfd[0].events = POLLOUT;
+    pfd[0].revents = 0;
+
+    rc = poll(pfd, 1, -1);
+    if (rc < 0)
+       ret = -1;
+    else if (pfd[0].revents & (POLLOUT | POLLERR | POLLHUP))
+       ret = 1;
+
+#elif defined(HAVE_WORKING_SELECT)
+    fd_set fds;
+    int rc;
+
+    FD_ZERO(&fds);
+    FD_SET(fd, &fds);
+    rc = select(FD_SETSIZE, NULL, &fds, NULL, NULL);
+    if (rc < 0)
+       ret = -1;
+    else if (FD_ISSET(fd, &fds))
+       ret = 1;
+
+#else
+    ret = 1;
+#endif
+
+    return ret;
+}
+
+int
+waitForInput(int fd1, int fd2)
+{
+    int ret = 0;
+
+#if defined(HAVE_WORKING_POLL)
+    struct pollfd pfd[2];
+    int rc;
+
+    pfd[0].fd = fd1;
+    pfd[1].fd = fd2;
+    pfd[0].events = pfd[1].events = POLLIN;
+    pfd[0].revents = pfd[1].revents = 0;
+
+    rc = poll(pfd, 2, -1);
+    if (rc < 0) {
+       ret = -1;
+    } else {
+       if (pfd[0].revents & (POLLIN | POLLERR | POLLHUP))
+           ret |= 1;
+       if (pfd[1].revents & (POLLIN | POLLERR | POLLHUP))
+           ret |= 2;
+    }
+
+#elif defined(HAVE_WORKING_SELECT)
+    fd_set fds;
+    int rc;
+
+    FD_ZERO(&fds);
+    FD_SET(fd1, &fds);
+    FD_SET(fd2, &fds);
+    rc = select(FD_SETSIZE, &fds, NULL, NULL, NULL);
+    if (rc < 0) {
+       ret = -1;
+    } else {
+       if (FD_ISSET(fd1, &fds))
+           ret |= 1;
+       if (FD_ISSET(fd2, &fds))
+           ret |= 2;
+    }
+#else
+    ret = (1 | 2);
+#endif
+
+    return ret;
+}
+
+int
+setWindowSize(int sfd, int dfd)
+{
+#ifdef TIOCGWINSZ
+    int rc;
+    struct winsize ws;
+    rc = ioctl(sfd, TIOCGWINSZ, (char *) &ws);
+    if (rc < 0)
+       return -1;
+    rc = ioctl(dfd, TIOCSWINSZ, (char *) &ws);
+    if (rc < 0)
+       return -1;
+#endif
+    return 0;
+}
+
+int
+installHandler(int signum, void (*handler) (int))
+{
+    struct sigaction sa;
+    sigset_t ss;
+    int rc;
+
+    sigemptyset(&ss);
+
+    sa.sa_handler = handler;
+    sa.sa_mask = ss;
+    sa.sa_flags = 0;
+    rc = sigaction(signum, &sa, NULL);
+    return rc;
+}
+
+int
+copyTermios(int sfd, int dfd)
+{
+    struct termios tio;
+    int rc;
+
+    rc = tcgetattr(sfd, &tio);
+    if (rc < 0)
+       return -1;
+
+    rc = tcsetattr(dfd, TCSAFLUSH, &tio);
+    if (rc < 0)
+       return -1;
+
+    return 0;
+}
+
+int
+saveTermios(void)
+{
+    int rc;
+    rc = tcgetattr(0, &saved_tio);
+    if (rc >= 0)
+       saved_tio_valid = 1;
+    return rc;
+}
+
+int
+restoreTermios(void)
+{
+    if (!saved_tio_valid)
+       return -1;
+    return tcsetattr(0, TCSAFLUSH, &saved_tio);
+}
+
+int
+setRawTermios(void)
+{
+    struct termios tio;
+    int rc;
+
+    if (!saved_tio_valid)
+       saveTermios();
+    rc = tcgetattr(0, &tio);
+    if (rc < 0)
+       return rc;
+    tio.c_lflag &= (unsigned) ~(ECHO | ICANON | ISIG);
+    tio.c_iflag &= (unsigned) ~(ICRNL | IXOFF | IXON | ISTRIP);
+#ifdef ONLCR
+    tio.c_oflag &= (unsigned) ~ONLCR;
+#endif
+#ifdef OCRNL
+    tio.c_oflag &= (unsigned) ~OCRNL;
+#endif
+#ifdef ONOCR
+    tio.c_oflag &= (unsigned) ~ONOCR;
+#endif
+
+#ifdef VMIN
+    tio.c_cc[VMIN] = 0;
+    tio.c_cc[VTIME] = 0;
+#endif
+    rc = tcsetattr(0, TCSAFLUSH, &tio);
+    if (rc < 0)
+       return rc;
+    return 0;
+}
+
+char *
+my_basename(char *path)
+{
+    char *p;
+
+    p = strrchr(path, '/');
+    if (!p)
+       p = path;
+    else
+       p++;
+    return p;
+}
+
+static int
+fix_pty_perms(char *line)
+{
+    int rc;
+    struct stat s;
+
+    rc = stat(line, &s);
+    if (rc < 0)
+       return -1;
+    if (s.st_uid != getuid() || s.st_gid != getgid()) {
+       rc = chown(line, getuid(), getgid());
+       if (rc < 0) {
+           fprintf(stderr,
+                   "Warning: could not change ownership of tty -- "
+                   "pty is insecure!\n");
+           return 0;
+       }
+    }
+    if ((s.st_mode & 0777) != (S_IRUSR | S_IWUSR | S_IWGRP)) {
+       rc = chmod(line, S_IRUSR | S_IWUSR | S_IWGRP);
+       if (rc < 0) {
+           fprintf(stderr,
+                   "Warning: could not change permissions of tty -- "
+                   "pty is insecure!\n");
+           return 0;
+       }
+    }
+    return 1;
+}
+
+int
+allocatePty(int *pty_return, char **line_return)
+{
+    char name[12], *line = NULL;
+    int pty = -1;
+    const char *name1 = "pqrstuvwxyzPQRST";
+    char buffer[80];
+    char *name2 = strcpy(buffer, "0123456789abcdefghijklmnopqrstuv");
+    const char *p1;
+    char *p2;
+
+#if defined(HAVE_GRANTPT)
+    int rc;
+
+    pty = open("/dev/ptmx", O_RDWR);
+    if (pty < 0)
+       goto bsd;
+
+    rc = grantpt(pty);
+    if (rc < 0) {
+       close(pty);
+       goto bsd;
+    }
+
+    rc = unlockpt(pty);
+    if (rc < 0) {
+       close(pty);
+       goto bsd;
+    }
+
+    line = strmalloc(ptsname(pty));
+    if (!line) {
+       close(pty);
+       goto bsd;
+    }
+
+    fix_pty_perms(line);
+
+    *pty_return = pty;
+    *line_return = line;
+    return 0;
+
+  bsd:
+#elif defined(HAVE_OPENPTY)
+    int rc;
+    char ttydev[80];           /* OpenBSD says at least 16 bytes */
+
+    rc = openpty(&pty, &opened_tty, ttydev, NULL, NULL);
+    if (rc < 0) {
+       close(pty);
+       goto bsd;
+    }
+    line = strmalloc(ttydev);
+    if (!line) {
+       close(pty);
+       goto bsd;
+    }
+
+    fix_pty_perms(line);
+
+    *pty_return = pty;
+    *line_return = line;
+    return 0;
+
+  bsd:
+#endif /* HAVE_GRANTPT, etc */
+
+    strcpy(name, "/dev/pty??");
+    for (p1 = name1; *p1; p1++) {
+       name[8] = *p1;
+       for (p2 = name2; *p2; p2++) {
+           name[9] = *p2;
+           pty = open(name, O_RDWR);
+           if (pty >= 0)
+               goto found;
+           /* Systems derived from 4.4BSD differ in their pty names,
+              so ENOENT doesn't necessarily imply we're done. */
+           continue;
+       }
+    }
+
+    goto bail;
+
+  found:
+    if ((line = strmalloc(name)) != 0) {
+       line[5] = 't';
+       fix_pty_perms(line);
+       *pty_return = pty;
+       *line_return = line;
+       return 0;
+    }
+
+  bail:
+    if (pty >= 0)
+       close(pty);
+    if (line)
+       free(line);
+    return -1;
+}
+
+int
+openTty(char *line)
+{
+    int rc;
+    int tty = -1;
+
+    tty = open(line, O_RDWR
+#if defined(TIOCSCTTY) && defined(O_NOCTTY)
+    /*
+     * Do not make this our controlling terminal, yet just in case it fails
+     * in some intermediate state.  But do not add this flag if we haven't
+     * the corresponding ioctl.
+     */
+              | O_NOCTTY
+#endif
+       );
+
+    if (tty < 0)
+       goto bail;
+
+#if defined(HAVE_OPENPTY)
+    if (opened_tty >= 0) {
+       close(opened_tty);
+       opened_tty = -1;
+    }
+#endif
+
+#ifdef TIOCSCTTY
+    /*
+     * Now that we've successfully opened the terminal, make it the controlling
+     * terminal.  This call works only if the process does not already have a
+     * controlling terminal.
+     *
+     * Cygwin as of 2009/10/12 lacks this call, but has O_NOCTTY.
+     */
+    rc = ioctl(tty, TIOCSCTTY, (char *) 0);
+    if (rc < 0) {
+       goto bail;
+    }
+#endif
+
+#if defined(I_PUSH) && (defined(SVR4) || defined(__SVR4))
+    rc = ioctl(tty, I_PUSH, "ptem");
+    if (rc < 0)
+       goto bail;
+
+    rc = ioctl(tty, I_PUSH, "ldterm");
+    if (rc < 0)
+       goto bail;
+
+    rc = ioctl(tty, I_PUSH, "ttcompat");
+    if (rc < 0)
+       goto bail;
+#endif
+
+    return tty;
+
+  bail:
+    if (tty >= 0)
+       close(tty);
+    return -1;
+}
+
+/* Post-4.4 BSD systems have POSIX semantics (_POSIX_SAVED_IDS
+   or not, depending on the version).  4.3BSD and Minix do not have
+   saved IDs at all, so there's no issue. */
+int
+droppriv(void)
+{
+    int rc;
+#if (defined(BSD) && !defined(_POSIX_SAVED_IDS)) || defined(_MINIX)
+    rc = setuid(getuid());
+    if (rc >= 0) {
+       rc = setgid(getgid());
+    }
+#elif defined(_POSIX_SAVED_IDS)
+    uid_t uid = getuid();
+    uid_t euid = geteuid();
+    gid_t gid = getgid();
+    gid_t egid = getegid();
+
+    if ((uid != euid || gid != egid) && euid != 0) {
+       errno = ENOSYS;
+       rc = -1;
+    } else {
+       rc = setuid(uid);
+       if (rc >= 0)
+           rc = setgid(gid);
+    }
+#else
+    uid_t uid = getuid();
+    uid_t euid = geteuid();
+    gid_t gid = getgid();
+    gid_t egid = getegid();
+
+    if (uid != euid || gid != egid) {
+       errno = ENOSYS;
+       rc = -1;
+    } else {
+       rc = 0;
+    }
+#endif
+    return rc;
+}
+
+char *
+strmalloc(const char *value)
+{
+    char *result = 0;
+
+    if (value != 0) {
+#ifdef HAVE_STRDUP
+       result = strdup(value);
+#else
+       result = malloc(strlen(value) + 1);
+       if (result != 0)
+           strcpy(result, value);
+#endif
+    }
+    return result;
+}
+
+#ifdef NO_LEAKS
+void
+ExitProgram(int code)
+{
+    luit_leaks();
+    iso2022_leaks();
+    charset_leaks();
+    exit(code);
+}
+#endif
diff --git a/luit/sys.h b/luit/sys.h
new file mode 100644 (file)
index 0000000..5bfe0d2
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2001 by Juliusz Chroboczek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#ifndef LUIT_SYS_H
+#define LUIT_SYS_H 1
+
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define USE_IGNORE_RC
+extern int ignore_unused;
+#define IGNORE_RC(func) ignore_unused = (int) func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */
+
+int waitForOutput(int fd);
+int waitForInput(int fd1, int fd2);
+int setWindowSize(int sfd, int dfd);
+int installHandler(int signum, void (*handler) (int));
+int copyTermios(int sfd, int dfd);
+int saveTermios(void);
+int restoreTermios(void);
+int setRawTermios(void);
+char *my_basename(char *path);
+int allocatePty(int *pty_return, char **line_return);
+int openTty(char *line);
+int droppriv(void);
+char *strmalloc(const char *value);
+
+#ifdef NO_LEAKS
+void luit_leaks(void);
+void charset_leaks(void);
+void iso2022_leaks(void);
+void ExitProgram(int code);
+#else
+#define ExitProgram(code) exit(code)
+#endif
+
+#endif /* LUIT_SYS_H */
diff --git a/oclock/AUTHORS b/oclock/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
index 7f33cbf..405c4d3 100644 (file)
@@ -1,12 +1,45 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright 1989, 1993, 1998  The Open Group
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright (C) 1994 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from the X Consor-
+tium.
index f782e91..81f8471 100644 (file)
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit 52f1f49fa24a0459b6ca4db2f3f55700ba66f3c6
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Sep 22 19:55:54 2010 -0700
 
-       * configure.ac:
-       Update package version for X11R7 release.
+    oclock 1.0.2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit af0aaab315399dafdb29a487c841b7de8271079d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Sep 22 19:53:41 2010 -0700
 
-       * configure.ac:
-       Update package version number for final X11R7 release candidate.
+    config: remove AC_SUBST of OCLOCK_CFLAGS & OCLOCK_LIBS
+    
+    PKG_CHECK_MODULES handles that automatically for us
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-07  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit a7515825e8d487ec58634dde47e110602617079f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Sep 22 19:52:54 2010 -0700
 
-       * Makefile.am:
-       * configure.ac:
-       Change to use the app-defaults default dir configured in libXt.
+    config: Remove AC_PROG_CC & AC_PROG_INSTALL that XORG_DEFAULT_OPTIONS provide
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit d4b4454ad1aa65849a83f12938e6e2913d7e2ce9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
 
-       * Makefile.am:
-       Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
 
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit 375822dca8af44b7c38885877063ea961edc162c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Sep 22 19:47:59 2010 -0700
 
-       * configure.ac:
-       Update package version number for X11R7 RC3 release.
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+    Enables silent rule and use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-10-18  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit 116e81ed700e02f7ca33d9e5befae9bef8398ae9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 08:10:33 2010 -0700
 
-       * configure.ac:
-       Update package version number for RC1 release.
+    Fill in COPYING file with copyright notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
+commit 36c59a40384192c5ae4a8036532968e96fe2f9c1
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:06 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 42362ed91f2fd2b8283778890923b336ef4caf8a
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:47 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit e053ca4439ec3e5feab7de4ace216ace4e5f31fd
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:52 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit 1d1d81985cd3f334950afeb8db907aababbd5fac
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:07 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit 826f9ffce175226b8aa377742e833afb4da75fa3
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:24 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 31872e9a9c11edb98bd3f80898c758f906b73ae2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:38 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 626858ae023ca3ca69178d9d97f6777c9647c0a7
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:14 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit f698ed2d837837c4f8f8e0f26cb8780c352c5cdc
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:18 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 11e13bdf2bdc6cdc7f7d27427016eaf8c9ad48c3
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Mon Jan 12 18:53:19 2009 -0200
+
+    Ansification and compile warning fixes.
+    
+      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
+    make distcheck and all gcc 4.3 and sparse warnings.
+
+commit 8509d5cc01607e19590571b4e0d941b0e5900052
+Author: Matthieu Herrb <matthieu@bluenote.herrb.net>
+Date:   Sat Mar 8 22:01:17 2008 +0100
+
+    Makefile.am: nuke RCS Id
+
+commit e86ed6c3e18f8c1b751ab3da248f30c930d8fb25
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 16:37:03 2007 -0500
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit b876d58de971bd0f49be63a171f467dc2e20853e
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:51:06 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
+commit e76d84c2bec66612645e1b85828fa2407d4ff7b9
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Aug 23 19:24:30 2007 -0400
+
+    Rename .cvsignore to .gitignore
+
+commit 7d50f6245b18b96d8b2bf76a62bb2f2ca4a32d6b
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:43 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit 8beaf1035944b5d9da483940298ea6d14c68ee04
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:41 2005 +0000
+
+    Stub COPYING files
+
+commit 47d806d0d0893a348f7d8c5107129e1b1691889d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:03 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit 01110cd495dc25e40e99dac70e104e97bfa88ec1
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 7 16:17:58 2005 +0000
+
+    Change to use the app-defaults default dir configured in libXt.
+
+commit de145e0469b263c12499fb6827e8ca7290b9e174
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:17 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit c5c9c2a0db7a375478dc58e9de96d2dc02dfd085
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:16 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 6e2eb6b70fe7a6309455a72dd9efec780a78bea3
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:37 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 294fb296909b32db0f58a0ad5c78a63ecdfd83f0
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:34:56 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit 24f73d458c367328b5e97544052c53a0ba352890
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:49 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit 233a988e813d0239ab567d66342e2b745584a72c
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:49 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit e47bd2f5b354a14af9ba84cf9900dfc8e2f51b80
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:32:53 2005 +0000
+
+    Change default install dir for app-default files from
+        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
+        the monolith & allow localization
+
+commit f1d6f0ee06acfb84ebbfa5841e18d9b3301c8619
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:20 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 3dd33cc2d36264c903a0032769ce6debc7780be5
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:42 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit 54fc284497e7a8399e2527d2198862011b85ef75
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Thu Oct 13 20:10:59 2005 +0000
+
+    Fix app-default files to install under the same names as in the monolith
+        instead of their short names used only for 14-character filename length
+        limited ancient filesystems
+
+commit 3d6bd1e2ab17b69f0b188325bbda62e56df13dbf
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:28 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit 9c808e849cc65bf482f1e1f0b33fc82cd08a0593
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:29 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit b986847c03da39c177ff8f4086e658c36228fdb2
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Jul 26 15:44:01 2005 +0000
+
+    Replace more GNU make-ism's with more portable macros
+
+commit 9fea8d0cce13310b0549f9af164b04614dee26c6
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:31:49 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit 375d4ff16a93c5e1874b1a21c96a9549475ae6c4
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Jul 17 20:11:01 2005 +0000
+
+    fix rules to work with non-GNU make and outside of $srcdir
+
+commit f9b186fdd589267fc8d448ffc5da6d775afe01f2
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Tue Jun 28 15:22:52 2005 +0000
+
+    Add buildsystem for oclock
+
+commit 9bc6e165c4c22f0eb412b306b7e0032a0f6dcac0
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:54:36 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit b456377e090d94ffd38f64b7e0bf86f575b832c2
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:34:55 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit a99975463d105d5db7de3648c6fb0af568f87a70
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:12:53 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 89b70b9fc003bb288a66eb1d4e868489dde88d65
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:15 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit dfbd841e966677b36ccf72f8f6492e1010831f5b
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:23:57 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit bd8264b017134cc6def3657a3c770e1a9841ca67
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:02 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 71633e81c3dd2135c7c4c67c954dc0b7f162f7dc
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:57 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit c4bc1693ae8bbc4bff3891b1d06b110025c23579
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 15:54:53 2003 +0000
+
+    R6.6 is the Xorg base-line
index 66fea36..812ce43 100644 (file)
@@ -130,7 +130,7 @@ ClockClassRec clockClassRec = {
     }
 };
 
-static void ClassInitialize()
+static void ClassInitialize(void)
 {
     XtAddConverter( XtRString, XtRBackingStore, XmuCvtStringToBackingStore,
                    NULL, 0 );
@@ -139,10 +139,8 @@ static void ClassInitialize()
 WidgetClass clockWidgetClass = (WidgetClass) &clockClassRec;
 
 /* ARGSUSED */
-static void Initialize (greq, gnew, args, num_args)
-    Widget greq, gnew;
-    ArgList args;
-    Cardinal *num_args;
+static void Initialize (Widget greq, Widget gnew,
+                       ArgList args, Cardinal *num_args)
 {
     ClockWidget w = (ClockWidget)gnew;
     XtGCMask   valuemask;
@@ -178,14 +176,13 @@ static void Initialize (greq, gnew, args, num_args)
                                                        &shape_error_base))
     w->clock.shape_window = False;
     w->clock.shape_mask = 0;
-    w->clock.shapeGC = 0;
+    w->clock.shapeGC = NULL;
     w->clock.shape_width = 0;
     w->clock.shape_height = 0;
     w->clock.polys_valid = 0;
 }
 
-static void Resize (widget)
-    Widget     widget;
+static void Resize (Widget widget)
 {
     ClockWidget        w = (ClockWidget) widget;
     XGCValues  xgcv;
@@ -344,11 +341,9 @@ static void Resize (widget)
            -WINDOW_HEIGHT(w)/2, WINDOW_HEIGHT(w)/2);
     }
 }
-static void Realize (gw, valueMask, attrs)
-     Widget gw;
-     XtValueMask *valueMask;
-     XSetWindowAttributes *attrs;
+
+static void Realize (Widget gw, XtValueMask *valueMask,
+                    XSetWindowAttributes *attrs)
 {
      ClockWidget       w = (ClockWidget)gw;
 
@@ -366,11 +361,10 @@ static void Realize (gw, valueMask, attrs)
                     *valueMask, attrs );
     if (!w->clock.transparent)
        Resize (gw);
-    new_time ((XtPointer) gw, 0);
+    new_time ((XtPointer) gw, NULL);
 }
 
-static void Destroy (gw)
-     Widget gw;
+static void Destroy (Widget gw)
 {
      ClockWidget w = (ClockWidget)gw;
      if (w->clock.interval_id) XtRemoveTimeOut (w->clock.interval_id);
@@ -387,10 +381,7 @@ static void Destroy (gw)
 }
 
 /* ARGSUSED */
-static void Redisplay(gw, event, region)
-     Widget gw;
-     XEvent *event;
-     Region region;
+static void Redisplay(Widget gw, XEvent *event, Region region)
 {
     ClockWidget        w;
 
@@ -417,8 +408,7 @@ static void Redisplay(gw, event, region)
  */
 
 static double
-clock_to_angle (clock)
-double clock;
+clock_to_angle (double clock)
 {
        if (clock >= .75)
                clock -= 1.0;
@@ -426,9 +416,7 @@ double      clock;
 }
 
 /* ARGSUSED */
-static void new_time (client_data, id)
-     XtPointer client_data;
-     XtIntervalId *id;         /* unused */
+static void new_time (XtPointer client_data, XtIntervalId *id)
 {
         ClockWidget    w = (ClockWidget)client_data;
        Time_t          now;
@@ -463,10 +451,7 @@ static void new_time (client_data, id)
 } /* new_time */
 
 void
-paint_jewel (w, d, gc)
-ClockWidget w;
-Drawable    d;
-GC         gc;
+paint_jewel (ClockWidget w, Drawable d, GC gc)
 {
     if (JEWEL_SIZE(w) > 0.0)
     {
@@ -483,9 +468,7 @@ GC      gc;
  * check to see if the polygon intersects the circular jewel
  */
 int
-check_jewel_poly (w, poly)
-ClockWidget    w;
-TPoint         poly[POLY_SIZE];
+check_jewel_poly (ClockWidget w, TPoint poly[POLY_SIZE])
 {
     double     a2, b2, c2, d2;
     double     x, y, size;
@@ -517,10 +500,7 @@ TPoint             poly[POLY_SIZE];
 }
 
 void
-check_jewel (w, d, gc)
-ClockWidget    w;
-Drawable       d;
-GC             gc;
+check_jewel (ClockWidget w, Drawable d, GC gc)
 {
        if (!w->clock.polys_valid || JEWEL_SIZE(w) <= 0.0)
                return;
@@ -538,10 +518,8 @@ GC         gc;
  * This is represented with a five sided polygon.
  */
 void
-compute_hand (w, a, l, width, poly)
-ClockWidget    w;
-double         a, l, width;
-TPoint         poly[POLY_SIZE];
+compute_hand (ClockWidget w, double a, double l, double width,
+             TPoint poly[POLY_SIZE])
 {
        double  c, s;
 
@@ -562,8 +540,7 @@ TPoint              poly[POLY_SIZE];
 }
 
 void
-compute_hands (w)
-ClockWidget    w;
+compute_hands (ClockWidget w)
 {
        compute_hand (w, w->clock.minute_angle,
                MINUTE_LENGTH(w), MINUTE_WIDTH(w), w->clock.minute_poly);
@@ -573,21 +550,14 @@ ClockWidget       w;
 }
 
 void
-paint_hand (w, d, gc, poly)
-ClockWidget    w;
-Drawable       d;
-GC             gc;
-TPoint         poly[POLY_SIZE];
+paint_hand (ClockWidget w, Drawable d, GC gc, TPoint poly[POLY_SIZE])
 {
        TFillPolygon (XtDisplay (w), d, gc, &w->clock.t, poly, POLY_SIZE,
                        Convex, CoordModeOrigin);
 }
 
 void
-paint_hands (w, d, minute_gc, hour_gc)
-ClockWidget    w;
-Drawable       d;
-GC             minute_gc, hour_gc;
+paint_hands (ClockWidget w, Drawable d, GC minute_gc, GC hour_gc)
 {
     if (w->clock.polys_valid) {
        paint_hand (w, d, hour_gc, w->clock.hour_poly);
index 23e5f25..8b82ade 100644 (file)
@@ -1,16 +1,19 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-These are generic installation instructions.
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -23,9 +26,9 @@ debugging `configure').
 
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
+the results of its tests to speed up reconfiguring.  Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
@@ -67,42 +67,57 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
 is an example:
 
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
    *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -125,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -137,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
 Specifying the System Type
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -170,9 +207,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -190,21 +227,29 @@ them in the `configure' command line, using `VAR=value'.  For example:
      ./configure CC=/usr/local2/bin/gcc
 
 causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
+overridden in the site shell script).
 
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
 
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -231,6 +276,16 @@ configuration-related scripts to be executed by `/bin/bash'.
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
index 957c344..f4eadc8 100644 (file)
@@ -1,4 +1,3 @@
-# $Id: Makefile.am,v 1.12 2005/12/07 16:17:58 kem Exp $
 # 
 #  Copyright 2005  Red Hat, Inc.
 # 
@@ -22,7 +21,7 @@
 
 bin_PROGRAMS = oclock
 
-oclock_CFLAGS = $(OCLOCK_CFLAGS)
+AM_CFLAGS = $(OCLOCK_CFLAGS) $(CWARNFLAGS)
 oclock_LDADD = $(OCLOCK_LIBS) -lm
 
 oclock_SOURCES =       \
@@ -38,51 +37,36 @@ appman_PRE = \
 
 # App default files  (*.ad)
 
-appdefaultdir = @appdefaultdir@
-
-
-APPDEFAULTFILES = \
-        Clock-color
-
-SUFFIXES = .ad
-
-.ad:
-       cp $< $@
-
-appdefault_DATA = $(APPDEFAULTFILES)
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) oclock.bit oclmask.bit
+appdefaultdir = @appdefaultdir@
 
-CLEANFILES = $(APPDEFAULTFILES)
+dist_appdefault_DATA = \
+        app-defaults/Clock-color
 
+EXTRA_DIST = oclock.bit oclmask.bit
 
 appmandir = $(APP_MAN_DIR)
 
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
 EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
 
-SED = sed
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
 
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
+.PHONY: ChangeLog INSTALL
 
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
index cf7a18d..86c348c 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,7 +15,6 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am,v 1.12 2005/12/07 16:17:58 kem Exp $
 # 
 #  Copyright 2005  Red Hat, Inc.
 # 
 #  PERFORMANCE OF THIS SOFTWARE.
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -60,37 +57,50 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = oclock$(EXEEXT)
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       compile config.guess config.sub depcomp install-sh missing \
-       mkinstalldirs
 subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
-       "$(DESTDIR)$(appmandir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
+       "$(DESTDIR)$(appdefaultdir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_oclock_OBJECTS = oclock-Clock.$(OBJEXT) oclock-oclock.$(OBJEXT) \
-       oclock-transform.$(OBJEXT)
+am_oclock_OBJECTS = Clock.$(OBJEXT) oclock.$(OBJEXT) \
+       transform.$(OBJEXT)
 oclock_OBJECTS = $(am_oclock_OBJECTS)
 am__DEPENDENCIES_1 =
 oclock_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(oclock_SOURCES)
 DIST_SOURCES = $(oclock_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -98,19 +108,32 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appdefaultDATA_INSTALL = $(INSTALL_DATA)
-appmanDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appdefault_DATA) $(appman_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(appman_DATA) $(dist_appdefault_DATA)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -118,9 +141,8 @@ distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
 APPDEFS_LIBS = @APPDEFS_LIBS@
 APP_MAN_DIR = @APP_MAN_DIR@
@@ -132,7 +154,10 @@ AWK = @AWK@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -141,9 +166,13 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
+EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -155,11 +184,11 @@ LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
 OBJEXT = @OBJEXT@
 OCLOCK_CFLAGS = @OCLOCK_CFLAGS@
 OCLOCK_LIBS = @OCLOCK_LIBS@
@@ -168,23 +197,26 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
-
-# App default files  (*.ad)
 appdefaultdir = @appdefaultdir@
 bindir = @bindir@
 build = @build@
@@ -192,6 +224,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -219,9 +252,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-oclock_CFLAGS = $(OCLOCK_CFLAGS)
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = $(OCLOCK_CFLAGS) $(CWARNFLAGS)
 oclock_LDADD = $(OCLOCK_LIBS) -lm
 oclock_SOURCES = \
         Clock.c \
@@ -234,54 +271,38 @@ oclock_SOURCES = \
 appman_PRE = \
         oclock.man
 
-APPDEFAULTFILES = \
-        Clock-color
 
-SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
-appdefault_DATA = $(APPDEFAULTFILES)
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) oclock.bit oclmask.bit \
-       $(appman_PRE)
-CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
+# App default files  (*.ad)
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+dist_appdefault_DATA = \
+        app-defaults/Clock-color
+
+EXTRA_DIST = oclock.bit oclmask.bit $(appman_PRE)
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
 am--refresh:
        @:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -297,21 +318,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
        @if test ! -f $@; then \
          rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
        else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -319,30 +341,44 @@ distclean-hdr:
        -rm -f config.h stamp-h1
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 oclock$(EXEEXT): $(oclock_OBJECTS) $(oclock_DEPENDENCIES) 
        @rm -f oclock$(EXEEXT)
-       $(LINK) $(oclock_LDFLAGS) $(oclock_OBJECTS) $(oclock_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(oclock_OBJECTS) $(oclock_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -350,183 +386,160 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oclock-Clock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oclock-oclock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oclock-transform.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Clock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oclock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-oclock-Clock.o: Clock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -MT oclock-Clock.o -MD -MP -MF "$(DEPDIR)/oclock-Clock.Tpo" -c -o oclock-Clock.o `test -f 'Clock.c' || echo '$(srcdir)/'`Clock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/oclock-Clock.Tpo" "$(DEPDIR)/oclock-Clock.Po"; else rm -f "$(DEPDIR)/oclock-Clock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Clock.c' object='oclock-Clock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -c -o oclock-Clock.o `test -f 'Clock.c' || echo '$(srcdir)/'`Clock.c
-
-oclock-Clock.obj: Clock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -MT oclock-Clock.obj -MD -MP -MF "$(DEPDIR)/oclock-Clock.Tpo" -c -o oclock-Clock.obj `if test -f 'Clock.c'; then $(CYGPATH_W) 'Clock.c'; else $(CYGPATH_W) '$(srcdir)/Clock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/oclock-Clock.Tpo" "$(DEPDIR)/oclock-Clock.Po"; else rm -f "$(DEPDIR)/oclock-Clock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Clock.c' object='oclock-Clock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -c -o oclock-Clock.obj `if test -f 'Clock.c'; then $(CYGPATH_W) 'Clock.c'; else $(CYGPATH_W) '$(srcdir)/Clock.c'; fi`
-
-oclock-oclock.o: oclock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -MT oclock-oclock.o -MD -MP -MF "$(DEPDIR)/oclock-oclock.Tpo" -c -o oclock-oclock.o `test -f 'oclock.c' || echo '$(srcdir)/'`oclock.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/oclock-oclock.Tpo" "$(DEPDIR)/oclock-oclock.Po"; else rm -f "$(DEPDIR)/oclock-oclock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='oclock.c' object='oclock-oclock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -c -o oclock-oclock.o `test -f 'oclock.c' || echo '$(srcdir)/'`oclock.c
-
-oclock-oclock.obj: oclock.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -MT oclock-oclock.obj -MD -MP -MF "$(DEPDIR)/oclock-oclock.Tpo" -c -o oclock-oclock.obj `if test -f 'oclock.c'; then $(CYGPATH_W) 'oclock.c'; else $(CYGPATH_W) '$(srcdir)/oclock.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/oclock-oclock.Tpo" "$(DEPDIR)/oclock-oclock.Po"; else rm -f "$(DEPDIR)/oclock-oclock.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='oclock.c' object='oclock-oclock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -c -o oclock-oclock.obj `if test -f 'oclock.c'; then $(CYGPATH_W) 'oclock.c'; else $(CYGPATH_W) '$(srcdir)/oclock.c'; fi`
-
-oclock-transform.o: transform.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -MT oclock-transform.o -MD -MP -MF "$(DEPDIR)/oclock-transform.Tpo" -c -o oclock-transform.o `test -f 'transform.c' || echo '$(srcdir)/'`transform.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/oclock-transform.Tpo" "$(DEPDIR)/oclock-transform.Po"; else rm -f "$(DEPDIR)/oclock-transform.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='transform.c' object='oclock-transform.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -c -o oclock-transform.o `test -f 'transform.c' || echo '$(srcdir)/'`transform.c
-
-oclock-transform.obj: transform.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -MT oclock-transform.obj -MD -MP -MF "$(DEPDIR)/oclock-transform.Tpo" -c -o oclock-transform.obj `if test -f 'transform.c'; then $(CYGPATH_W) 'transform.c'; else $(CYGPATH_W) '$(srcdir)/transform.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/oclock-transform.Tpo" "$(DEPDIR)/oclock-transform.Po"; else rm -f "$(DEPDIR)/oclock-transform.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='transform.c' object='oclock-transform.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oclock_CFLAGS) $(CFLAGS) -c -o oclock-transform.obj `if test -f 'transform.c'; then $(CYGPATH_W) 'transform.c'; else $(CYGPATH_W) '$(srcdir)/transform.c'; fi`
-uninstall-info-am:
-install-appdefaultDATA: $(appdefault_DATA)
+install-appmanDATA: $(appman_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(appdefault_DATA)'; for p in $$list; do \
+       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
        done
 
-uninstall-appdefaultDATA:
+uninstall-appmanDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-install-appmanDATA: $(appman_DATA)
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
+install-dist_appdefaultDATA: $(dist_appdefault_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
+       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
        done
 
-uninstall-appmanDATA:
+uninstall-dist_appdefaultDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
-       done
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       mkdir $(distdir)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
@@ -534,6 +547,14 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -558,13 +579,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -572,9 +597,11 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
@@ -596,13 +623,15 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -623,8 +652,8 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS) $(DATA) config.h
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
@@ -647,10 +676,12 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@@ -668,18 +699,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am: install-appdefaultDATA install-appmanDATA
+install-data-am: install-appmanDATA install-dist_appdefaultDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
 
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -701,30 +752,44 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
+
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
        clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-appmanDATA \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_appdefaultDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
        installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
-
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
 
-.ad:
-       cp $< $@
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/oclock/NEWS b/oclock/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
index e69de29..33268b9 100644 (file)
@@ -0,0 +1,26 @@
+oclock is a simple analog clock using the SHAPE extension to make
+a round (possibly transparent) window.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/app/oclock
+
+        http://cgit.freedesktop.org/xorg/app/oclock
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
index 398f56a..dd551e5 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
+# _AM_AUTOCONF_VERSION(VERSION)
 # -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-$$1_PKG_ERRORS
+# serial 9
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-_PKG_TEXT
+# serial 10
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
 
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
 #
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.1.2
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
-]) # XORG_MACROS_VERSION
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
 
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
 
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
 fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
 
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
 
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
 
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
-
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
+#serial 5
 
-AC_MSG_RESULT([$BUILDDOC])
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_RESULT([$BUILDPDFDOC])
+# serial 8
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+# Do all the work for Automake.                             -*- Autoconf -*-
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+# serial 16
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
+AC_SUBST([CYGPATH_W])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+AC_SUBST(install_sh)])
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_LINT],[
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
+# serial 5
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
 
-]) # XORG_WITH_LINT
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
 
-]) # XORG_LINT_LIBRARY
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
 ])
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+# Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
+# serial 4
 
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 5
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-  $1_TRUE='#'
-  $1_FALSE=
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
+AC_MSG_RESULT(yes)])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+# serial 1
 
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+# serial 2
 
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
+# serial 2
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
+done
+rm -rf conftest.dir
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
+#
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.0])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
 
-# AM_PROG_INSTALL_SH
+# XORG_PROG_RAWCPP()
 # ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
 else
-  am__leading_dot=_
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
+       fi
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
+rm -f conftest.$ac_ext
 
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
-]
-)
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-# serial 3
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
 fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
 
-# serial 4
 
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
 
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+]) # XORG_MANPAGE_SECTIONS
+
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
 else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+   AC_MSG_RESULT([no])
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
+AC_PATH_PROG(LINUXDOC, linuxdoc)
+
+AC_MSG_CHECKING([whether to build documentation])
+
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
 else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
+   BUILDDOC=no
 fi
-AC_SUBST([mkdir_p])])
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_RESULT([$BUILDDOC])
 
-# serial 3
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
+fi
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
-# serial 4
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
+fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
 fi
-AC_MSG_RESULT(yes)])
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
+
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
 
-# serial 2
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
 
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
 #
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
 #
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
+#
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
+
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
+fi
+
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
+
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
+#
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
+
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
+else
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
+fi
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
+
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
+
+]) # XORG_WITH_LINT
+
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
+#
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
+
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
+fi
+
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+
+]) # XORG_LINT_LIBRARY
+
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
+
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
+#
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
+
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
+
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
+
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
diff --git a/oclock/compile b/oclock/compile
deleted file mode 100755 (executable)
index 1b1d232..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
index 396482d..dc84c68 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
 
-timestamp='2006-07-02'
+timestamp='2009-11-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2006-07-02'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,8 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
@@ -169,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -323,14 +324,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -531,7 +551,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[456])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -639,7 +659,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -780,7 +800,7 @@ EOF
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
-    i*:MINGW*:*)
+    *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
     i*:windows32*:*)
@@ -790,15 +810,24 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    x86:Interix*:[3456]*)
-       echo i586-pc-interix${UNAME_RELEASE}
-       exit ;;
-    EM64T:Interix*:[3456]*)
-       echo x86_64-unknown-interix${UNAME_RELEASE}
-       exit ;;
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -828,8 +857,29 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
        exit ;;
     avr32*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -843,6 +893,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -852,74 +913,33 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
        exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
@@ -929,8 +949,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -950,69 +973,9 @@ EOF
     x86_64:Linux:*:*)
        echo x86_64-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1041,7 +1004,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1085,8 +1048,11 @@ EOF
     pc:*:*:*)
        # Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
@@ -1124,6 +1090,16 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1136,7 +1112,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1199,6 +1175,9 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1208,6 +1187,15 @@ EOF
     SX-6:SUPER-UX:*:*)
        echo sx6-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1217,6 +1205,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1298,6 +1296,9 @@ EOF
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
        exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1458,9 +1459,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index c364eda..7c9cfb1 100644 (file)
@@ -1,5 +1,32 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
 /* Name of package */
 #undef PACKAGE
 
 /* 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
 
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
 /* Version number of package */
 #undef VERSION
index 387c18d..2a55a50 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
 
-timestamp='2006-07-02'
+timestamp='2009-11-20'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2006-07-02'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,8 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -122,6 +125,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +152,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -245,17 +252,20 @@ case $basic_machine in
        | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
+       | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
@@ -268,6 +278,7 @@ case $basic_machine in
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | moxie \
        | mt \
        | msp430 \
        | nios | nios2 \
@@ -276,19 +287,22 @@ case $basic_machine in
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | rx \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
        | tahoe | thumb | tic4x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
-       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -323,19 +337,22 @@ case $basic_machine in
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
@@ -356,21 +373,26 @@ case $basic_machine in
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -434,6 +456,10 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -442,10 +468,26 @@ case $basic_machine in
                basic_machine=ns32k-sequent
                os=-dynix
                ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -474,8 +516,8 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16c)
-               basic_machine=cr16c-unknown
+       cr16)
+               basic_machine=cr16-unknown
                os=-elf
                ;;
        crds | unos)
@@ -513,6 +555,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -667,6 +713,14 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        m88k-omron*)
                basic_machine=m88k-omron
                ;;
@@ -678,10 +732,17 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
                ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
@@ -808,6 +869,14 @@ case $basic_machine in
                basic_machine=i860-intel
                os=-osf
                ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        pbd)
                basic_machine=sparc-tti
                ;;
@@ -909,6 +978,10 @@ case $basic_machine in
        sb1el)
                basic_machine=mipsisa64sb1el-unknown
                ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
        sei)
                basic_machine=mips-sei
                os=-seiux
@@ -920,6 +993,9 @@ case $basic_machine in
                basic_machine=sh-hitachi
                os=-hms
                ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
        sh64)
                basic_machine=sh64-unknown
                ;;
@@ -1009,6 +1085,10 @@ case $basic_machine in
                basic_machine=tic6x-unknown
                os=-coff
                ;;
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
+               ;;
        tx39)
                basic_machine=mipstx39-unknown
                ;;
@@ -1084,6 +1164,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1122,7 +1206,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1172,6 +1256,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1192,10 +1279,11 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1204,7 +1292,7 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1214,7 +1302,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1344,6 +1432,9 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
        -none)
                ;;
        *)
@@ -1366,6 +1457,9 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
         spu-*)
                os=-elf
                ;;
@@ -1406,6 +1500,9 @@ case $basic_machine in
        m68*-cisco)
                os=-aout
                ;;
+        mep-*)
+               os=-elf
+               ;;
        mips*-cisco)
                os=-elf
                ;;
@@ -1535,7 +1632,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index 9581ff3..e3f9cc5 100755 (executable)
@@ -1,62 +1,85 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for oclock 1.0.1.
+# Generated by GNU Autoconf 2.68 for oclock 1.0.2.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
+#
 # 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
 
 
@@ -65,20 +88,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
 
      ;;
@@ -89,32 +111,279 @@ 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
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  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
+            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
+
+
+      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 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_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
   fi
-done
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
+
+# 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"
+
+
+} # 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
+
+
+# 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
 
-# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -128,13 +397,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
@@ -149,412 +422,127 @@ echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# 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
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  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/=
+  ' <$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" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  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
+  # 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
 }
 
-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
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_ret_success; then
-  :
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 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
-  :
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+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'
+  fi
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_ln_s='cp -p'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-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
-  :
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
-
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
 
-      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
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
+as_executable_p=$as_test_x
 
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
-:
-_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
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-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_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&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`
 
@@ -569,121 +557,181 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='oclock'
 PACKAGE_TARNAME='oclock'
-PACKAGE_VERSION='1.0.1'
-PACKAGE_STRING='oclock 1.0.1'
+PACKAGE_VERSION='1.0.2'
+PACKAGE_STRING='oclock 1.0.2'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
 
-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
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-PKG_CONFIG
-OCLOCK_CFLAGS
-OCLOCK_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
 appdefaultdir
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-APP_MAN_SUFFIX
-LIB_MAN_SUFFIX
-FILE_MAN_SUFFIX
-MISC_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-ADMIN_MAN_SUFFIX
-APP_MAN_DIR
-LIB_MAN_DIR
-FILE_MAN_DIR
-MISC_MAN_DIR
-DRIVER_MAN_DIR
+APPDEFS_LIBS
+APPDEFS_CFLAGS
+OCLOCK_LIBS
+OCLOCK_CFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
-LIBOBJS
-LTLIBOBJS'
+DRIVER_MAN_DIR
+MISC_MAN_DIR
+FILE_MAN_DIR
+LIB_MAN_DIR
+APP_MAN_DIR
+ADMIN_MAN_SUFFIX
+DRIVER_MAN_SUFFIX
+MISC_MAN_SUFFIX
+FILE_MAN_SUFFIX
+LIB_MAN_SUFFIX
+APP_MAN_SUFFIX
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+INSTALL_CMD
+PKG_CONFIG
+CHANGELOG_CMD
+CWARNFLAGS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+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_maintainer_mode
+enable_dependency_tracking
+enable_strict_compilation
+enable_silent_rules
+with_appdefaultdir
+'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -692,6 +740,7 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
+CPP
 PKG_CONFIG
 OCLOCK_CFLAGS
 OCLOCK_LIBS
@@ -702,6 +751,8 @@ APPDEFS_LIBS'
 # 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
@@ -757,8 +808,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.
@@ -800,13 +852,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 ;;
@@ -819,13 +878,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- \
@@ -1016,22 +1082,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.
@@ -1051,26 +1131,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
@@ -1078,23 +1158,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'
@@ -1108,8 +1201,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
@@ -1124,23 +1217,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
@@ -1167,13 +1258,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
@@ -1199,7 +1288,7 @@ if test "$ac_init_help" = "long"; then
   # 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 oclock 1.0.1 to adapt to many kinds of systems.
+\`configure' configures oclock 1.0.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1213,7 +1302,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
@@ -1221,9 +1310,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
@@ -1233,25 +1322,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/oclock]
-  --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/oclock]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1269,23 +1358,30 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of oclock 1.0.1:";;
+     short | recursive ) echo "Configuration of oclock 1.0.2:";;
    esac
   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]
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
+  --with-appdefaultdir=<pathname>
+                          specify directory for app-defaults files (default is
+                          autodetected)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1293,8 +1389,9 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
   OCLOCK_CFLAGS
               C compiler flags for OCLOCK, overriding pkg-config
@@ -1315,15 +1412,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/ ;;
@@ -1359,7 +1458,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       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
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-oclock configure 1.0.1
-generated by GNU Autoconf 2.61
+oclock configure 1.0.2
+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_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_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_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\""
+$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_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
 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 oclock $as_me 1.0.1, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+It was created by oclock $as_me 1.0.2, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1419,8 +1715,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
@@ -1454,12 +1750,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
@@ -1475,13 +1771,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
@@ -1493,11 +1789,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1506,12 +1800,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
@@ -1530,128 +1825,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
 )
     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"
 _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
 
@@ -1665,68 +1968,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; }; }
+  { $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'
@@ -1735,7 +2026,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version="1.9"
+am__api_version='1.11'
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -1753,9 +2045,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   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,
@@ -1780,22 +2070,23 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 # 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.
@@ -1813,17 +2104,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
@@ -1836,8 +2139,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.
@@ -1847,21 +2150,34 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -1871,11 +2187,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -1884,81 +2197,206 @@ then
    # Ok.
    :
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-{ 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; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
+# Double any \ or $.
 # By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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_STRIP="strip"
+    $as_echo "$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_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $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; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
   done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
   else
-    mkdir_p='$(install_sh) -d'
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
 for ac_prog in gawk mawk nawk awk
 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_AWK+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_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -1968,43 +2406,44 @@ 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_AWK="$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
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&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
 
 
   test -n "$AWK" && break
 done
 
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2014,12 +2453,12 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = 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; }
   SET_MAKE=
 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; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -2032,12 +2471,14 @@ else
 fi
 rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
 fi
 
 # test whether we have cygpath
@@ -2052,7 +2493,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='oclock'
- VERSION='1.0.1'
+ VERSION='1.0.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2080,151 +2521,115 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+AMTAR=${AMTAR-"${am_missing_run}tar"}
 
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  USE_MAINTAINER_MODE=no
 fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
 else
-  STRIP="$ac_cv_prog_STRIP"
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
 fi
 
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
 
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
 fi
 
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
 else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
 fi
 
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2234,10 +2639,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.
@@ -2247,25 +2652,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
 
 
@@ -2274,10 +2679,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.
@@ -2287,25 +2692,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
@@ -2313,12 +2718,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
@@ -2331,10 +2732,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.
@@ -2344,25 +2745,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
 
 
@@ -2371,10 +2772,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.
@@ -2385,18 +2786,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
@@ -2415,11 +2816,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
 
 
@@ -2430,10 +2831,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.
@@ -2443,25 +2844,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
 
 
@@ -2474,10 +2875,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.
@@ -2487,25 +2888,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
 
 
@@ -2517,12 +2918,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
@@ -2532,51 +2929,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
@@ -2588,42 +2971,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,
@@ -2633,14 +3012,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
@@ -2659,78 +3038,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 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; }; }
+{ { $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
@@ -2738,37 +3080,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 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; }; }
+  { { $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$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+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 <stdio.h>
+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
@@ -2780,51 +3175,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
@@ -2838,54 +3228,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
@@ -2896,34 +3266,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
@@ -2934,35 +3281,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
@@ -2973,42 +3297,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
@@ -3024,18 +3324,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 <stdarg.h>
 #include <stdio.h>
@@ -3081,141 +3377,56 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
 int argc;
 char **argv;
 int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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
-  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
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-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; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}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; } ;;
-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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+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 :
+  ac_cv_prog_cc_c89=$ac_arg
 fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
 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$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
 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
 
 depcc="$CC"   am_compiler_list=
 
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -3240,6 +3451,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3257,7 +3473,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3267,18 +3493,23 @@ else
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -3302,13 +3533,11 @@ else
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
   am__fastdepCC_TRUE=
@@ -3319,98 +3548,591 @@ else
 fi
 
 
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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 :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
+    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
+  $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"
+      { 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
+  $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
-done
+
+      $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  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 <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+rm -f conftest*
 
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+fi
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+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 <ctype.h>
+#include <stdlib.h>
+#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
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+#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
+
+# 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
+
+done
 
 
-# Checks for pkg-config packages
 
 
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+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_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
@@ -3422,14 +4144,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_PKG_CONFIG="$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
 
   ;;
@@ -3437,11 +4159,11 @@ esac
 fi
 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&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
 
 
@@ -3450,10 +4172,10 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
   ac_pt_PKG_CONFIG=$PKG_CONFIG
   # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; 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_ac_pt_PKG_CONFIG+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_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
@@ -3465,14 +4187,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_ac_pt_PKG_CONFIG="$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
 
   ;;
@@ -3480,11 +4202,11 @@ esac
 fi
 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 if test -n "$ac_pt_PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&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_pt_PKG_CONFIG" = x; then
@@ -3492,12 +4214,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
     PKG_CONFIG=$ac_pt_PKG_CONFIG
 fi
 if test -n "$PKG_CONFIG"; then
        _pkg_min_version=0.9.0
-       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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" >&5
-echo "${ECHO_T}no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
 
 fi
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+
+
+
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+  STRICT_COMPILE=no
+fi
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+  INTELCC="yes"
+else
+  INTELCC="no"
+fi
+
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
 
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for OCLOCK" >&5
-echo $ECHO_N "checking for OCLOCK... $ECHO_C" >&6; }
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$OCLOCK_CFLAGS"; then
-        pkg_cv_OCLOCK_CFLAGS="$OCLOCK_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu xext\"") >&5
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Checks for pkg-config packages
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCLOCK" >&5
+$as_echo_n "checking for OCLOCK... " >&6; }
+
+if test -n "$OCLOCK_CFLAGS"; then
+    pkg_cv_OCLOCK_CFLAGS="$OCLOCK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xmu xext\""; } >&5
   ($PKG_CONFIG --exists --print-errors "x11 xmu xext") 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
   pkg_cv_OCLOCK_CFLAGS=`$PKG_CONFIG --cflags "x11 xmu xext" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$OCLOCK_LIBS"; then
-        pkg_cv_OCLOCK_LIBS="$OCLOCK_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu xext\"") >&5
+if test -n "$OCLOCK_LIBS"; then
+    pkg_cv_OCLOCK_LIBS="$OCLOCK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xmu xext\""; } >&5
   ($PKG_CONFIG --exists --print-errors "x11 xmu xext") 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
   pkg_cv_OCLOCK_LIBS=`$PKG_CONFIG --libs "x11 xmu xext" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -3573,25 +4641,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               OCLOCK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmu xext"`
+               OCLOCK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xmu xext" 2>&1`
         else
-               OCLOCK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmu xext"`
+               OCLOCK_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xmu xext" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$OCLOCK_PKG_ERRORS" >&5
 
-       { { echo "$as_me:$LINENO: error: Package requirements (x11 xmu xext) were not met:
-
-$OCLOCK_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables OCLOCK_CFLAGS
-and OCLOCK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (x11 xmu xext) were not met:
+       as_fn_error $? "Package requirements (x11 xmu xext) were not met:
 
 $OCLOCK_PKG_ERRORS
 
@@ -3601,10 +4658,11 @@ installed software in a non-standard prefix.
 Alternatively, you may set the environment variables OCLOCK_CFLAGS
 and OCLOCK_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -3612,69 +4670,52 @@ Alternatively, you may set the environment variables OCLOCK_CFLAGS
 and OCLOCK_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables OCLOCK_CFLAGS
-and OCLOCK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
        OCLOCK_CFLAGS=$pkg_cv_OCLOCK_CFLAGS
        OCLOCK_LIBS=$pkg_cv_OCLOCK_LIBS
-        { 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
 
 
-
-
 pkg_failed=no
-{ echo "$as_me:$LINENO: checking for APPDEFS" >&5
-echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_CFLAGS"; then
-        pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
+$as_echo_n "checking for APPDEFS... " >&6; }
+
+if test -n "$APPDEFS_CFLAGS"; then
+    pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xt") 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
   pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_LIBS"; then
-        pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
+if test -n "$APPDEFS_LIBS"; then
+    pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xt") 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
   pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -3687,25 +4728,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
         else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$APPDEFS_PKG_ERRORS" >&5
 
-       { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (xt) were not met:
+       as_fn_error $? "Package requirements (xt) were not met:
 
 $APPDEFS_PKG_ERRORS
 
@@ -3715,20 +4745,11 @@ installed software in a non-standard prefix.
 Alternatively, you may set the environment variables APPDEFS_CFLAGS
 and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -3736,190 +4757,27 @@ Alternatively, you may set the environment variables APPDEFS_CFLAGS
 and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
        APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
        APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { 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
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
 else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+  appdefaultdir="${xt_appdefaultdir}"
 fi
 
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-
 ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
@@ -3949,12 +4807,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
@@ -3962,8 +4821,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
   (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 quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -3985,13 +4844,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      :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
@@ -4004,48 +4874,50 @@ 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
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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.
@@ -4055,59 +4927,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
 
 
@@ -4116,20 +5008,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
 
      ;;
@@ -4140,32 +5031,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
+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
-done
+  $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
@@ -4176,16 +5146,20 @@ fi
 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
-  as_basename=false
+  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
@@ -4200,104 +5174,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
-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 ||
+  mkdir conf$$.dir 2>/dev/null
+fi
+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
@@ -4314,12 +5287,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
   '
@@ -4334,13 +5307,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 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 oclock $as_me 1.0.1, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+This file was extended by oclock $as_me 1.0.2, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -4353,7 +5332,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
 
 _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"
@@ -4361,22 +5349,25 @@ config_commands="$ac_config_commands"
 
 _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
@@ -4387,36 +5378,44 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
 
 _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="\\
-oclock config.status 1.0.1
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+oclock config.status 1.0.2
+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'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+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
@@ -4429,34 +5428,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
@@ -4471,27 +5477,29 @@ 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
 #
 # INIT-COMMANDS
 #
@@ -4499,19 +5507,17 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) { { 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
 
 # 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_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
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$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
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-OCLOCK_CFLAGS!$OCLOCK_CFLAGS$ac_delim
-OCLOCK_LIBS!$OCLOCK_LIBS$ac_delim
-APPDEFS_CFLAGS!$APPDEFS_CFLAGS$ac_delim
-APPDEFS_LIBS!$APPDEFS_LIBS$ac_delim
-appdefaultdir!$appdefaultdir$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
-LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim
-FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim
-MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim
-DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim
-ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
 
-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`
+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 2>/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
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+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
-APP_MAN_DIR!$APP_MAN_DIR$ac_delim
-LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim
-FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim
-MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim
-DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim
-ADMIN_MAN_DIR!$ADMIN_MAN_DIR$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` = 8; 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 || 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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$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 = "\a"
+
+}
+{
+  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
+}
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACAWK
 _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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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    :C $CONFIG_COMMANDS
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+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
@@ -4803,7 +5854,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
     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 `:'.
@@ -4812,26 +5863,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
           [\\/$]*) 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
@@ -4841,42 +5900,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
@@ -4894,20 +5918,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/ ;;
@@ -4945,14 +5964,19 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
   esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  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
 }
@@ -4960,36 +5984,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
@@ -4998,136 +6023,68 @@ s&@builddir@&$ac_builddir&;t t
 s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.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;}
-
-  rm -f "$tmp/stdin"
+  { 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 "$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"
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $ac_file | $ac_file:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$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 |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -5147,29 +6104,40 @@ echo X$ac_file |
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
         X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -5187,68 +6155,33 @@ echo X"$mf" |
            q
          }
          s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
         X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  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"$file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -5266,27 +6199,25 @@ echo X"$as_dir" |
            q
          }
          s/.*/./; q'`
-      test -d "$as_dir" && break
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
     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; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
   done
-done
+}
  ;;
 
   esac
 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.
@@ -5306,6 +6237,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
 
index 1329057..ab542a7 100644 (file)
@@ -21,26 +21,32 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(oclock,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],oclock)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([oclock],
+       [1.0.2],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+       [oclock])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-AM_CONFIG_HEADER(config.h)
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
 
-AC_PROG_CC
-AC_PROG_INSTALL
+AM_CONFIG_HEADER(config.h)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(OCLOCK, x11 xmu xext)
-AC_SUBST(OCLOCK_CFLAGS)
-AC_SUBST(OCLOCK_LIBS)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+AC_ARG_WITH(appdefaultdir,
+       AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+         [specify directory for app-defaults files (default is autodetected)]),
+       [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
 
 AC_OUTPUT([Makefile])
index 04701da..df8eea7 100755 (executable)
@@ -1,9 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2005-07-09.11
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
 
 # 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
@@ -16,9 +17,7 @@ scriptversion=2005-07-09.11
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
    depmode=dashmstdout
 fi
 
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
   if test $stat -eq 0; then :
   else
@@ -178,14 +199,14 @@ sgi)
 ' < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
     tr '
-' ' ' >> $depfile
-    echo >> $depfile
+' ' ' >> "$depfile"
+    echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
     tr ' ' '
 ' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+   >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -201,34 +222,39 @@ aix)
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -276,6 +302,51 @@ icc)
   rm -f "$tmpdepfile"
   ;;
 
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +359,13 @@ tru64)
 
    if test "$libtool" = yes; then
       # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
+      # static library.  This mechanism is used in libtool 1.4 series to
       # handle both shared and static libraries in a single compilation.
       # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
       #
       # With libtool 1.5 this exception was removed, and libtool now
       # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # compilations output dependencies in $dir.libs/$base.o.d and
       # in $dir$base.o.d.  We have to check for both files, because
       # one of the two compilations can be disabled.  We should prefer
       # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
@@ -345,7 +416,7 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -396,32 +467,39 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
   # X makedepend
   shift
-  cleared=no
-  for arg in "$@"; do
+  cleared=no eat=no
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
       cleared=yes ;;
     esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
     case "$arg" in
     -D*|-I*)
       set fnord "$@" "$arg"; shift ;;
     # Strip any option that makedepend may not understand.  Remove
     # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
     -*|$object)
       ;;
     *)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
@@ -441,7 +519,7 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -479,13 +557,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
@@ -498,16 +590,23 @@ msvisualcpp)
        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
   echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
@@ -526,5 +625,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 4d4a951..6781b98 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,38 +39,68 @@ scriptversion=2005-05-14.22
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
 
-chmodcmd="$chmodprog 0755"
-chowncmd=
 chgrpcmd=
-stripcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
 src=
 dst=
 dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
 no_target_directory=
 
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
 In the 4th, create DIRECTORIES.
 
 Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last 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.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 "
 
-while test -n "$1"; do
+while test $# -ne 0; do
   case $1 in
-    -c) shift
-        continue;;
+    -c) ;;
+
+    -C) copy_on_change=true;;
 
-    -d) dir_arg=true
-        shift
-        continue;;
+    -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
     --help) echo "$usage"; exit $?;;
 
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
+    -s) stripcmd=$stripprog;;
 
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
+    -t) dst_arg=$2
+       shift;;
 
-    -T) no_target_directory=true
-       shift
-       continue;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    *)  # When -d is used, all remaining arguments are directories to create.
-       # When -t is used, the destination is already specified.
-       test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-       for arg
-       do
-          if test -n "$dstarg"; then
-           # $@ is not empty: it contains at least $arg.
-           set fnord "$@" "$dstarg"
-           shift # fnord
-         fi
-         shift # arg
-         dstarg=$arg
-       done
+    --)        shift
        break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
   esac
+  shift
 done
 
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
   if test -z "$dir_arg"; then
     echo "$0: no input file specified." >&2
     exit 1
@@ -164,24 +199,47 @@ if test -z "$1"; then
   exit 0
 fi
 
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
 for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src ;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
     dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
   else
+
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
     # might cause directories to be created, which would be especially bad
     # if $src (and thus $dsttmp) contains '*'.
@@ -190,71 +248,199 @@ do
       exit 1
     fi
 
-    if test -z "$dstarg"; then
+    if test -z "$dst_arg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dstarg
+    dst=$dst_arg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst ;;
+      -*) dst=./$dst;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
+       echo "$0: $dst_arg: Is a directory" >&2
        exit 1
       fi
-      dst=$dst/`basename "$src"`
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
     fi
   fi
 
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+  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
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       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-writeable 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;;
+    esac
 
-  # Make sure that the destination directory exists.
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
 
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
+      # The umask is ridiculous, or 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.
 
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
 
-    pathcomp=
+      eval "$initialize_posix_glob"
 
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
       shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (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
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
       fi
-      pathcomp=$pathcomp/
-    done
+    fi
   fi
 
   if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
   else
-    dstfile=`basename "$dst"`
 
     # Make a couple of temp file names in the proper directory.
     dsttmp=$dstdir/_inst.$$_
@@ -262,10 +448,9 @@ do
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
 
     # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -273,51 +458,63 @@ do
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-              || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-        }
-    }
-  fi || { (exit 1); exit 1; }
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
 done
 
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 894e786..28055d2 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2005-06-08.21
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2005-06-08.21
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,6 +31,8 @@ if test $# -eq 0; then
 fi
 
 run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
 # In the cases where this matters, `missing' is being run in the
 # srcdir already.
@@ -44,7 +44,7 @@ fi
 
 msg="missing on your system"
 
-case "$1" in
+case $1 in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
@@ -77,6 +77,7 @@ Supported PROGRAM values:
   aclocal      touch file \`aclocal.m4'
   autoconf     touch file \`configure'
   autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
   automake     touch all \`Makefile.in' files
   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
   flex         create \`lex.yy.c', if possible, from existing .c
@@ -86,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -103,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -135,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case "$1" in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -145,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -154,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -164,7 +175,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
-      case "$f" in
+      case $f in
       *:*) touch_files="$touch_files "`echo "$f" |
                                       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
       *) touch_files="$touch_files $f.in";;
@@ -184,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -192,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -f "$file"; then
        touch $file
     else
@@ -207,80 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.c
            fi
            SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.h
            fi
          ;;
        esac
     fi
-    if [ ! -f y.tab.h ]; then
+    if test ! -f y.tab.h; then
        echo >y.tab.h
     fi
-    if [ ! -f y.tab.c ]; then
+    if test ! -f y.tab.c; then
        echo 'main() { return 0; }' >y.tab.c
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" lex.yy.c
            fi
          ;;
        esac
     fi
-    if [ ! -f lex.yy.c ]; then
+    if test ! -f lex.yy.c; then
        echo 'main() { return 0; }' >lex.yy.c
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
         \`Help2man' package in order for those modifications to take
         effect.  You can get \`Help2man' from any GNU archive site."
 
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
        touch $file
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -289,11 +298,17 @@ WARNING: \`$1' is $msg.  You should only need it if
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -z "$file"; then
       # ... or it is the one specified with @setfilename ...
       infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
       # ... or it is derived from the source name (dir/f.texi becomes f.info)
       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
@@ -303,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
@@ -317,13 +332,13 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     firstarg="$1"
     if shift; then
-       case "$firstarg" in
+       case $firstarg in
        *o*)
            firstarg=`echo "$firstarg" | sed s/o//`
            tar "$firstarg" "$@" && exit 0
            ;;
        esac
-       case "$firstarg" in
+       case $firstarg in
        *h*)
            firstarg=`echo "$firstarg" | sed s/h//`
            tar "$firstarg" "$@" && exit 0
@@ -356,5 +371,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/oclock/mkinstalldirs b/oclock/mkinstalldirs
deleted file mode 100755 (executable)
index 259dbfc..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2005-06-29.22
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-errstatus=0
-dirmode=
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage"
-      exit $?
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --version)
-      echo "$0 $scriptversion"
-      exit $?
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error.  This is a problem when calling mkinstalldirs
-# from a parallel make.  We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
-  '')
-    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    else
-      # On NextStep and OpenStep, the `mkdir' command does not
-      # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
-      # exists.
-      test -d ./-p && rmdir ./-p
-      test -d ./--version && rmdir ./--version
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-       test ! -d ./--version; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    else
-      # Clean up after NextStep and OpenStep mkdir.
-      for d in ./-m ./-p ./--version "./$dirmode";
-      do
-        test -d $d && rmdir $d
-      done
-    fi
-    ;;
-esac
-
-for file
-do
-  case $file in
-    /*) pathcomp=/ ;;
-    *)  pathcomp= ;;
-  esac
-  oIFS=$IFS
-  IFS=/
-  set fnord $file
-  shift
-  IFS=$oIFS
-
-  for d
-  do
-    test "x$d" = x && continue
-
-    pathcomp=$pathcomp$d
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-       errstatus=$lasterr
-      else
-       if test ! -z "$dirmode"; then
-         echo "chmod $dirmode $pathcomp"
-         lasterr=
-         chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-         if test ! -z "$lasterr"; then
-           errstatus=$lasterr
-         fi
-       fi
-      fi
-    fi
-
-    pathcomp=$pathcomp/
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
index cb2fc8d..92db51e 100644 (file)
@@ -54,24 +54,20 @@ static XtActionsRec actions[] = {
 
 static Atom wm_delete_window;
 
-static void die(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void die(Widget w, XtPointer client_data, XtPointer call_data)
 {
     XCloseDisplay(XtDisplay(w));
     exit(0);
 }
 
-static void save(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+static void save(Widget w, XtPointer client_data, XtPointer call_data)
 {
     return;    /* stateless */
 }
 
 /* Exit with message describing command line format */
 
-static void usage()
+static void usage(void)
 {
     fprintf(stderr,
 "usage: oclock\n");
@@ -153,11 +149,7 @@ main(int argc, char *argv[])
     exit(0);
 }
 
-static void quit(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+static void quit(Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
     Arg arg;
 
index 2b662d2..8b900fb 100644 (file)
@@ -47,7 +47,7 @@ TranslatePoints(TPoint *points, int n_points,
 
        xpoints = (XPoint *) malloc ((unsigned)n_points * sizeof (*xpoints));
        if (!xpoints)
-               return 0;
+               return NULL;
        for (i = 0; i < n_points; i++) {
                xpoints[i].x = Xx(points[i].x + xoff, points[i].y + yoff, t);
                xpoints[i].y = Xy(points[i].x + xoff, points[i].y + yoff, t);
@@ -60,15 +60,8 @@ TranslatePoints(TPoint *points, int n_points,
 }
 
 void
-TFillPolygon (dpy, d, gc, t, points, n_points, shape, mode)
-register Display       *dpy;
-Drawable               d;
-GC                     gc;
-Transform              *t;
-TPoint                 *points;
-int                    n_points;
-int                    shape;
-int                    mode;
+TFillPolygon (register Display *dpy, Drawable d, GC gc, Transform *t,
+             TPoint *points, int n_points, int shape, int mode)
 {
        XPoint  *xpoints;
 
@@ -81,13 +74,9 @@ int                  mode;
 }
 
 void
-TDrawArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
-       register Display        *dpy;
-       Drawable                d;
-       GC                      gc;
-       Transform               *t;
-       double                  x, y, width, height;
-       int                     angle1, angle2;
+TDrawArc (register Display *dpy, Drawable d, GC gc, Transform *t,
+         double x, double y, double width, double height,
+         int angle1, int angle2)
 {
        int     xx, xy, xw, xh;
 
@@ -107,13 +96,9 @@ TDrawArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
 }
 
 void
-TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
-       register Display        *dpy;
-       Drawable                d;
-       GC                      gc;
-       Transform               *t;
-       double                  x, y, width, height;
-       int                     angle1, angle2;
+TFillArc (register Display *dpy, Drawable d, GC gc, Transform *t,
+         double x, double y, double width, double height,
+         int angle1, int angle2)
 {
        int     xx, xy, xw, xh;
 
@@ -133,10 +118,8 @@ TFillArc (dpy, d, gc, t, x, y, width, height, angle1, angle2)
 }
 
 void
-SetTransform (t, xx1, xx2, xy1, xy2, tx1, tx2, ty1, ty2)
-Transform      *t;
-int            xx1, xx2, xy1, xy2;
-double         tx1, tx2, ty1, ty2;
+SetTransform (Transform *t, int xx1, int xx2, int xy1, int xy2,
+             double tx1, double tx2, double ty1, double ty2)
 {
        t->mx = ((double) xx2 - xx1) / (tx2 - tx1);
        t->bx = ((double) xx1) - t->mx * tx1;
index 54db071..90ee9b9 100644 (file)
+%define _unpackaged_files_terminate_build 0 
+
 Summary: X.Org X11 applications
 Name: xorg-x11-apps
-Version: 7.5
-Release: 3.5
-License: MIT/X11
+# NOTE: The package version should be set to the X11 major release from which
+# the OS release is based upon.
+Version: 7.6
+Release: 5
+License: MIT
 Group: User Interface/X
 URL: http://www.x.org
+
 Source: %{name}-%{version}.tar.gz
 
-Patch0: 01_xedit_mkdir_races.diff
-Patch1: 03_xconsole_implicit_pointer_conversion.diff
-Patch2: 05_xmore_fix_segv_without_xprint.diff
+# Clock apps
+#Source0:  ftp://ftp.x.org/pub/individual/app/oclock-1.0.2.tar.bz2
+#Source1:  ftp://ftp.x.org/pub/individual/app/xclock-1.0.5.tar.bz2
+# X Window Dump (xwd) utilities
+#Source2:  ftp://ftp.x.org/pub/individual/app/xwd-1.0.4.tar.bz2
+#Source3:  ftp://ftp.x.org/pub/individual/app/xwud-1.0.3.tar.bz2
+#Source4:  ftp://ftp.x.org/pub/individual/app/xpr-1.0.3.tar.bz2
+# Miscellaneous other applications
+#Source5:  ftp://ftp.x.org/pub/individual/app/luit-1.1.0.tar.bz2
+#Source6:  ftp://ftp.x.org/pub/individual/app/x11perf-1.5.3.tar.bz2
+#Source7:  ftp://ftp.x.org/pub/individual/app/xbiff-1.0.2.tar.bz2
+#Source8:  ftp://ftp.x.org/pub/individual/app/xclipboard-1.1.1.tar.bz2
+#Source9:  ftp://ftp.x.org/pub/individual/app/xconsole-1.0.4.tar.bz2
+#Source10: ftp://ftp.x.org/pub/individual/app/xcursorgen-1.0.4.tar.bz2
+#Source11: ftp://ftp.x.org/pub/individual/app/xeyes-1.1.1.tar.bz2
+#Source13: ftp://ftp.x.org/pub/individual/app/xload-1.1.0.tar.bz2
+#Source14: ftp://ftp.x.org/pub/individual/app/xlogo-1.0.3.tar.bz2
+#Source15: ftp://ftp.x.org/pub/individual/app/xmag-1.0.4.tar.bz2
+#Source16: ftp://ftp.x.org/pub/individual/app/xmessage-1.0.3.tar.bz2
+#Source18: ftp://ftp.x.org/pub/individual/app/xfd-1.1.0.tar.bz2
+#Source19: ftp://ftp.x.org/pub/individual/app/xfontsel-1.0.3.tar.bz2
+#Source20: ftp://ftp.x.org/pub/individual/app/xvidtune-1.0.2.tar.bz2
+
+#Patch0: x11perf-1.4.1-x11perf-datadir-cleanups.patch
+#Patch2: xconsole-1.0.3-streams-me-softer.patch
+#Patch6: xbiff-1.0.2-xmu-configure.patch
 
-BuildRequires: pkgconfig(xorg-macros)
-BuildRequires: pkgconfig(libpng)
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(xaw7)
-BuildRequires: pkgconfig(xcursor)
-BuildRequires: pkgconfig(xext)
-BuildRequires: pkgconfig(xft)
-BuildRequires: pkgconfig(xkbfile)
-BuildRequires: pkgconfig(xmuu)
-BuildRequires: pkgconfig(xrender)
-BuildRequires: pkgconfig(xt)
-BuildRequires: pkgconfig(xmu)
-BuildRequires: pkgconfig(xbitmaps)
+BuildRequires: autoconf automake
 
-%define DEF_SUBDIRS bitmap ico oclock xcalc xclock xeyes xwd xwud
+BuildRequires: xorg-x11-xutils-dev
+# xfd needs gettext
+BuildRequires: gettext
+BuildRequires: zlib-devel
+BuildRequires: libfontenc-devel
+BuildRequires: libX11-devel
+BuildRequires: libXmu-devel
+BuildRequires: libXext-devel
+BuildRequires: libXt-devel
+BuildRequires: libXaw-devel
+BuildRequires: libXpm-devel
+BuildRequires: libXft-devel
+BuildRequires: libXrender-devel
+BuildRequires: libxkbfile-devel
+BuildRequires: libXcursor-devel
+BuildRequires: libpng-devel
+BuildRequires: libXfixes-devel
+BuildRequires: libXi-devel >= 1.2
+BuildRequires: libXxf86vm-devel
+BuildRequires: xorg-x11-xbitmaps
 
-Provides: %{DEF_SUBDIRS}
+Provides: luit oclock x11perf xclipboard xclock xconsole xcursorgen
+Provides: xeyes xload xlogo xmag xmessage xpr xwd xwud
+Provides: xfd xfontsel xvidtune
+#Provides: xbiff 
 
 # NOTE: xwd, xwud, luit used to be in these.
-Obsoletes: XFree86, xorg-x11
+#Obsoletes: XFree86, xorg-x11
 # NOTE: x11perf, xclipboard used to be in these.
-Obsoletes: XFree86-tools, xorg-x11-tools
+#Obsoletes: XFree86-tools, xorg-x11-tools
+# Xaw app moves
+#Conflicts: xorg-x11-utils < 7.4-5.fc12
+#Conflicts: xorg-x11-server-utils < 7.4-8.fc12
+
 %description
 A collection of common X Window System applications.
 
+%define apps luit oclock x11perf xclipboard xclock xconsole xcursorgen xeyes xload xlogo xmag xmessage xpr xwd xwud xfd xfontsel xvidtune
+
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
+#%setup -q -c %{name}-%{version} -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a13 -a14 -a15 -a16 -a18 -a19 -a20
+#%patch0 -p0 -b .x11perf-datadir-cleanups
+##%patch2 -p0 -b .streams-me-softer
+#%patch6 -p1 -b .xmu-configure
 
 %build
 # Build all apps
 {
-    CFLAGS="${CFLAGS} -D_F_BLOCK_MULTI_VIS_"
-    for app in %{DEF_SUBDIRS}; do
-        pushd $app
-        %configure \
-            --disable-xprint \
-            --with-sysmanpath=/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/man \
-            RSH=rsh \
-            MANCONF="/etc/manpath.config"
-        popd
-    done
+CFLAGS="${CFLAGS} -D_F_BLOCK_MULTI_VIS_" 
+for app in luit oclock x11perf xclipboard xclock xconsole xcursorgen xeyes xload xlogo xmag xmessage xpr xwd xwud xfd xfontsel xvidtune ; do
+       pushd $app
+               sed -i '/XAW_/ s/)/, xaw7)/; /XAW_/ s/XAW_CHECK_XPRINT_SUPPORT/PKG_CHECK_MODULES/' configure.ac
+               autoreconf -v --install
+               %configure --disable-xprint 
+               make
+       popd
+done
 }
 
 %install
 rm -rf $RPM_BUILD_ROOT
 # Install all apps
 {
-   for app in %{DEF_SUBDIRS} ; do
-      pushd $app
-      make install DESTDIR=$RPM_BUILD_ROOT
-      popd
-   done
+for app in luit oclock x11perf xclipboard xclock xconsole xcursorgen xeyes xload xlogo xmag xmessage xpr xwd xwud xfd xfontsel xvidtune ; do
+       pushd $app
+       make install DESTDIR=$RPM_BUILD_ROOT
+       popd
+done
 }
 
 %remove_docs
@@ -74,6 +118,46 @@ rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
 
 %files
+%defattr(-,root,root,-)
 %{_bindir}/*
-%{_includedir}/X11/bitmaps/*
-/etc/X11/app-defaults/*
+#%{_bindir}/luit
+#%{_bindir}/oclock
+#%{_bindir}/x11perf
+#%{_bindir}/x11perfcomp
+#%{_bindir}/xbiff
+#%{_bindir}/xclipboard
+#%{_bindir}/xclock
+#%{_bindir}/xconsole
+#%{_bindir}/xcursorgen
+#%{_bindir}/xcutsel
+#%{_bindir}/xdpr
+#%{_bindir}/xeyes
+#%{_bindir}/xfd
+#%{_bindir}/xfontsel
+#%{_bindir}/xload
+#%{_bindir}/xlogo
+#%{_bindir}/xmag
+#%{_bindir}/xmessage
+#%{_bindir}/xpr
+#%{_bindir}/xvidtune
+#%{_bindir}/xwd
+#%{_bindir}/xwud
+#%{_datadir}/X11/app-defaults/Clock-color
+#%{_datadir}/X11/app-defaults/XClipboard
+#%{_datadir}/X11/app-defaults/XClock
+#%{_datadir}/X11/app-defaults/XClock-color
+#%{_datadir}/X11/app-defaults/XConsole
+#%{_datadir}/X11/app-defaults/XFontSel
+#%{_datadir}/X11/app-defaults/Xfd
+#%{_datadir}/X11/app-defaults/XLoad
+#%{_datadir}/X11/app-defaults/XLogo
+#%{_datadir}/X11/app-defaults/XLogo-color
+#%{_datadir}/X11/app-defaults/Xmag
+#%{_datadir}/X11/app-defaults/Xmessage
+#%{_datadir}/X11/app-defaults/Xmessage-color
+#%{_datadir}/X11/app-defaults/Xvidtune
+#%dir %{_datadir}/X11/x11perfcomp
+#%{_datadir}/X11/x11perfcomp/Xmark
+#%{_datadir}/X11/x11perfcomp/fillblnk
+#%{_datadir}/X11/x11perfcomp/perfboth
+#%{_datadir}/X11/x11perfcomp/perfratio
\ No newline at end of file
diff --git a/x11perf-1.4.1-x11perf-datadir-cleanups.patch b/x11perf-1.4.1-x11perf-datadir-cleanups.patch
new file mode 100644 (file)
index 0000000..9d85c9b
--- /dev/null
@@ -0,0 +1,11 @@
+--- x11perf-1.5.3/Makefile.am.x11perf-datadir-cleanups 2005-11-23 13:03:27.000000000 -0500
++++ x11perf-1.5.3/Makefile.am  2005-11-23 13:03:57.000000000 -0500
+@@ -23,7 +23,7 @@
+ bin_SCRIPTS = x11perfcomp
+-LIBPATH = $(libdir)/X11/x11perfcomp
++LIBPATH = $(datadir)/X11/x11perfcomp
+ x11perfcompdir = $(LIBPATH)
+ dist_x11perfcomp_SCRIPTS = fillblnk perfboth perfratio Xmark
diff --git a/x11perf/AUTHORS b/x11perf/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 331c94e..6a90fd8
@@ -1,3 +1,74 @@
+commit c39d831d409537fce2f36c8672f908a7cc810519
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jan 5 16:33:36 2011 -0800
+
+    x11perf 1.5.3
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e7917bbec06e5c8e17f07b0eb833602b33111f08
+Merge: 5072fb4 cc84118
+Author: Peter Harris <pharris@opentext.com>
+Date:   Tue Nov 23 14:41:33 2010 -0500
+
+    Merge fixes from git://anongit.freedesktop.org/~peterh/x11perf
+
+commit cc84118bd700745f02c65b2d6900e512e4c333af
+Author: Peter Harris <peter.harris@hummingbird.com>
+Date:   Mon Oct 29 11:35:22 2007 -0400
+
+    Avoid "rep" calculation overflow.
+    
+    On today's fast machines, "treps" can easily overflow a 32-bit number.
+    Use "long long" to calculate reps.
+    
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 17a30e7c65c0b03b71b5b1ac54ae3ba33ae3b42a
+Author: Peter Harris <peter.harris@hummingbird.com>
+Date:   Mon Oct 29 11:29:32 2007 -0400
+
+    Clamp test time to positive values.
+    
+    If there is some jitter in the sync time, operations can complete in a
+    negative amount of time (confusing both humans and x11perfcomp).
+    
+    Signed-off-by: Peter Harris <pharris@opentext.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 5072fb464ffebcd97ec3a33cbff7095c3ec16225
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Nov 19 22:34:02 2010 -0800
+
+    Remove unneccessary AC_SUBST of CFLAGS & LIBS vars from PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2f6fa453f485739575296da9317243ddda25c4f6
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Nov 19 22:32:12 2010 -0800
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Regroup AC statements under the Autoconf initialization section.
+    Regroup AM statements under the Automake initialization section.
+    Add missing AC_CONFIG_SRCDIR
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d970d9de1c98bc828365f15fb08aaa8dda214dd6
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Nov 19 22:28:22 2010 -0800
+
+    Bug 31640 - x11perf: Doesn't build without libXft
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=31640
+    
+    Fix trapezoid checks to look for both render & xft
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
 commit 3147d783925bb42c7af78c9f5508c0dc245b942b
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Tue Sep 21 20:48:33 2010 -0700
@@ -209,7 +280,7 @@ Date:   Thu Nov 1 09:13:43 2007 +0100
     Fix typos in descriptions of -compwinwin{1,5}00.
 
 commit 569a5eaaef9a5c8bf50f1323fe39e81347976875
-Merge: 55aa9c2... e906fe5...
+Merge: 55aa9c2 e906fe5
 Author: Keith Packard <keithp@koto.keithp.com>
 Date:   Mon Sep 10 16:56:06 2007 +0100
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/x11perf/NEWS b/x11perf/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 684599f..b2cf5c5 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -34,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
+m4_if([$1], [1.11.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -406,18 +406,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -1030,32 +1018,26 @@ AC_SUBST([am__untar])
 
 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
 dnl 
 dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
 dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
 dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
 # XORG_MACROS_VERSION(required-version)
 # -------------------------------------
@@ -1073,7 +1055,7 @@ dnl of the copyright holder.
 # See the "minimum version" comment for each macro you use to see what 
 # version you require.
 m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.3.0])
+m4_define([vers_have], [1.11.0])
 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1141,9 +1123,12 @@ AC_SUBST(RAWCPPFLAGS)
 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 # Not sure if there's any better way than just hardcoding by OS name.
 # Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
 if test x$APP_MAN_SUFFIX = x    ; then
     APP_MAN_SUFFIX=1
@@ -1212,8 +1197,60 @@ AC_SUBST([FILE_MAN_DIR])
 AC_SUBST([MISC_MAN_DIR])
 AC_SUBST([DRIVER_MAN_DIR])
 AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
 ]) # XORG_MANPAGE_SECTIONS
 
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
 # XORG_CHECK_LINUXDOC
 # -------------------
 # Minimum version: 1.0.0
@@ -1223,23 +1260,14 @@ AC_SUBST([ADMIN_MAN_DIR])
 # Whether or not the necessary tools and files are found can be checked
 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
 AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
-else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
 AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
 
-AC_MSG_CHECKING([Whether to build documentation])
+AC_MSG_CHECKING([whether to build documentation])
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
    BUILDDOC=yes
 else
    BUILDDOC=no
@@ -1249,9 +1277,9 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
 AC_MSG_RESULT([$BUILDDOC])
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
    BUILDPDFDOC=yes
 else
    BUILDPDFDOC=no
@@ -1261,7 +1289,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 MAKE_PDF="$PS2PDF"
 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
@@ -1281,48 +1309,44 @@ AC_SUBST(MAKE_HTML)
 # indicates whether the necessary tools and files are found and, if set,
 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
 AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
 BUILDTXTDOC=no
 BUILDPDFDOC=no
 BUILDPSDOC=no
 BUILDHTMLDOC=no
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
    test x$BUILD_TXTDOC != xno; then
        BUILDTXTDOC=yes
 fi
 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
    test x$BUILD_PDFDOC != xno; then
        BUILDPDFDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
    test x$BUILD_PSDOC != xno; then
        BUILDPSDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 AC_MSG_RESULT([$BUILDPSDOC])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
    test x$BUILD_HTMLDOC != xno; then
        BUILDHTMLDOC=yes
 fi
@@ -1340,6 +1364,548 @@ AC_SUBST(MAKE_PDF)
 AC_SUBST(MAKE_HTML)
 ]) # XORG_CHECK_DOCBOOK
 
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+          [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
+# --------------------------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+          [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: ]_defopt[)]),
+          [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: ]_defopt[)]),
+          [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+m4_define([docs_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: ]docs_default[)]),
+          [build_docs=$enableval], [build_docs=]docs_default)
+m4_undefine([docs_default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+m4_define([devel_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: ]devel_default[)]),
+          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+m4_define([spec_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: ]spec_default[)]),
+          [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
 # XORG_CHECK_MALLOC_ZERO
 # ----------------------
 # Minimum version: 1.0.0
@@ -1356,20 +1922,19 @@ AC_ARG_ENABLE(malloc0returnsnull,
 
 AC_MSG_CHECKING([whether malloc(0) returns NULL])
 if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
+       AC_RUN_IFELSE([AC_LANG_PROGRAM([
+#include <stdlib.h>
+],[
     char *m0, *r0, *c0, *p;
     m0 = malloc(0);
     p = malloc(10);
     r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
+    c0 = calloc(0,10);
+    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
+])],
                [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1392,38 +1957,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 # ----------------
 # Minimum version: 1.1.0
 #
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
 #
 AC_DEFUN([XORG_WITH_LINT],[
 
-# Allow checking code with lint, sparse, etc.
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
                [Use a lint-style source code checker (default: disabled)])],
                [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-       LINT="$use_lint"
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
 fi
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
 ]) # XORG_WITH_LINT
 
@@ -1433,28 +2029,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
 #
 # Sets up flags for building lint libraries for checking programs that call
 # functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
 #
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
 AC_DEFUN([XORG_LINT_LIBRARY],[
 AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
        [Create lint library (default: disabled)])],
        [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
 fi
+
 AC_SUBST(LINTLIB)
 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
@@ -1467,11 +2064,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 # Defines CWARNFLAGS to enable C compiler warnings.
 #
 AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -1484,7 +2081,6 @@ else
     fi
 fi
 AC_SUBST(CWARNFLAGS)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 ]) # XORG_CWARNFLAGS
 
 # XORG_STRICT_OPTION
@@ -1493,7 +2089,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 #
 # Add configure option to enable strict compilation
 AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 AC_REQUIRE([AC_PROG_CC_C99])
 AC_REQUIRE([XORG_CWARNFLAGS])
 
@@ -1523,12 +2119,33 @@ AC_SUBST([CWARNFLAGS])
 # Defines default options for X.Org modules.
 #
 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
 XORG_CWARNFLAGS
 XORG_STRICT_OPTION
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
+XORG_INSTALL
 XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
 ]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
 dnl Copyright 2005 Red Hat, Inc
 dnl
 dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -1556,22 +2173,9 @@ dnl
 
 # XORG_RELEASE_VERSION
 # --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  
 AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AS_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
                [Major version of this package])
@@ -1598,14 +2202,13 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
 # Defines the variable CHANGELOG_CMD as the command to generate
 # ChangeLog from git.
 #
-# Arrange that distcleancheck ignores ChangeLog left over by distclean.
 #
 AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
 echo 'git directory not found: installing possibly empty changelog.' >&2)"
 AC_SUBST([CHANGELOG_CMD])
-AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
 ]) # XORG_CHANGELOG
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index dc84c68..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-11-20'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -551,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -967,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 2a55a50..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-11-20'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -281,6 +283,7 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
@@ -294,7 +297,7 @@ case $basic_machine in
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e \
        | we32k \
@@ -302,6 +305,15 @@ case $basic_machine in
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -333,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -367,6 +379,7 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
@@ -380,7 +393,8 @@ case $basic_machine in
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
        | ubicom32-* \
        | v850-* | v850e-* | vax-* \
@@ -480,6 +494,15 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -839,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1073,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1294,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1435,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1475,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
index 557b26c..57a7fa4 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for x11perf 1.5.2.
+# Generated by GNU Autoconf 2.68 for x11perf 1.5.3.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # 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
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       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 test x$as_have_required = xno; then :
@@ -553,11 +561,12 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='x11perf'
 PACKAGE_TARNAME='x11perf'
-PACKAGE_VERSION='1.5.2'
-PACKAGE_STRING='x11perf 1.5.2'
+PACKAGE_VERSION='1.5.3'
+PACKAGE_STRING='x11perf 1.5.3'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
+ac_unique_file="Makefile.am"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -1148,7 +1157,7 @@ Try \`$0 --help' for more information"
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1286,7 +1295,7 @@ if test "$ac_init_help" = "long"; then
   # 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 x11perf 1.5.2 to adapt to many kinds of systems.
+\`configure' configures x11perf 1.5.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1356,7 +1365,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of x11perf 1.5.2:";;
+     short | recursive ) echo "Configuration of x11perf 1.5.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1463,8 +1472,8 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-x11perf configure 1.5.2
-generated by GNU Autoconf 2.67
+x11perf configure 1.5.3
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1510,7 +1519,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1526,7 +1535,7 @@ ac_fn_c_check_decl ()
   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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1557,7 +1566,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 
@@ -1593,7 +1602,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1635,7 +1644,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1649,7 +1658,7 @@ 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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1667,7 +1676,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1712,7 +1721,7 @@ fi
   # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -1725,7 +1734,7 @@ 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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1780,15 +1789,15 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  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 x11perf $as_me 1.5.2, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by x11perf $as_me 1.5.3, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2135,6 +2144,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Initialize Automake
 am__api_version='1.11'
 
 ac_aux_dir=
@@ -2183,7 +2197,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $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 :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2360,7 +2374,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2400,7 +2414,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2453,7 +2467,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2504,7 +2518,7 @@ do
 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 test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2544,7 +2558,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2602,7 +2616,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='x11perf'
- VERSION='1.5.2'
+ VERSION='1.5.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2678,10 +2692,6 @@ fi
 
 
 
-
-ac_config_headers="$ac_config_headers config.h"
-
-
 DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
@@ -2754,7 +2764,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2794,7 +2804,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2847,7 +2857,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2887,7 +2897,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2946,7 +2956,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2990,7 +3000,7 @@ do
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3273,7 +3283,7 @@ 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 test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3324,7 +3334,7 @@ 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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3361,7 +3371,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 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 test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3439,7 +3449,7 @@ else
 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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3538,7 +3548,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3663,7 +3673,7 @@ fi
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+if ${ac_cv_prog_cc_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c99=no
@@ -3851,7 +3861,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -3979,7 +3989,7 @@ 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 test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4042,7 +4052,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4109,7 +4119,7 @@ $as_echo "$ac_cv_path_EGREP" >&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 test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4244,7 +4254,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -4287,7 +4297,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4358,7 +4368,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -4392,7 +4402,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -4425,7 +4435,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -4507,7 +4517,7 @@ if  test "x$GCC" = xyes ; then
     esac
 else
     ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
@@ -4533,14 +4543,14 @@ fi
 
 if test "x$STRICT_COMPILE" = "xyes"; then
        ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
 fi
 
        ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then :
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
   INTELCC="yes"
 else
   INTELCC="no"
@@ -4704,7 +4714,7 @@ AM_BACKSLASH='\'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
 $as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
+if ${ac_cv_type_signal+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4824,8 +4834,6 @@ $as_echo "yes" >&6; }
        :
 fi
 
-
-
 # Check for Xrender library
 
 pkg_failed=no
@@ -4894,8 +4902,6 @@ else
 $as_echo "yes" >&6; }
        xrender_found=yes
 fi
-
-
 case "$xrender_found" in
 yes)
 
@@ -4972,8 +4978,6 @@ else
 $as_echo "yes" >&6; }
        xft_found=yes
 fi
-
-
 case "$xft_found" in
 yes)
 
@@ -5050,8 +5054,6 @@ else
 $as_echo "yes" >&6; }
        xext_found=yes
 fi
-
-
 case "$xext_found" in
 yes)
        save_LIBS="$LIBS"
@@ -5059,7 +5061,7 @@ yes)
        for ac_func in XShmQueryExtension
 do :
   ac_fn_c_check_func "$LINENO" "XShmQueryExtension" "ac_cv_func_XShmQueryExtension"
-if test "x$ac_cv_func_XShmQueryExtension" = x""yes; then :
+if test "x$ac_cv_func_XShmQueryExtension" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_XSHMQUERYEXTENSION 1
 _ACEOF
@@ -5139,10 +5141,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
+    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;}
-    cat confcache >$cache_file
+      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
     { $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;}
@@ -5194,7 +5207,7 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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"
@@ -5295,6 +5308,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5601,8 +5615,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by x11perf $as_me 1.5.2, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by x11perf $as_me 1.5.3, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -5667,8 +5681,8 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-x11perf config.status 1.5.2
-configured by $0, generated by GNU Autoconf 2.67,
+x11perf config.status 1.5.3
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -5823,9 +5837,10 @@ 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 'as_fn_exit 1' 1 2 13 15
 }
@@ -5833,12 +5848,13 @@ $debug ||
 
 {
   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")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -5860,7 +5876,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -5888,7 +5904,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -5936,7 +5952,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -5968,7 +5984,7 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -6002,7 +6018,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6014,8 +6030,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  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
@@ -6135,7 +6151,7 @@ do
     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 `:'.
@@ -6170,7 +6186,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
@@ -6307,21 +6323,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+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"; } &&
+  { 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";;
+  -) 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
  ;;
@@ -6332,20 +6349,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && 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" "$tmp/config.h" >/dev/null 2>&1; then
+    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" \
+      mv "$ac_tmp/config.h" "$ac_file" \
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
old mode 100755 (executable)
new mode 100644 (file)
index 7e2640f..552ea8d
@@ -20,11 +20,16 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
+# Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([x11perf],
-       [1.5.2],
+       [1.5.3],
        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
        [x11perf])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
@@ -32,22 +37,15 @@ AM_MAINTAINER_MODE
 m4_ifndef([XORG_MACROS_VERSION],
          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
 XORG_MACROS_VERSION(1.8)
-
-AM_CONFIG_HEADER(config.h)
-
 XORG_DEFAULT_OPTIONS
 
 AC_TYPE_SIGNAL
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(X11PERF, x11 xmuu)
-AC_SUBST(X11PERF_CFLAGS)
-AC_SUBST(X11PERF_LIBS)
 
 # Check for Xrender library
 PKG_CHECK_MODULES(XRENDER, xrender, [xrender_found=yes], [xrender_found=no])
-AC_SUBST(XRENDER_CFLAGS)
-AC_SUBST(XRENDER_LIBS)
 case "$xrender_found" in
 yes)
        AC_DEFINE(XRENDER,1,[Xrender library available])
@@ -56,8 +54,6 @@ esac
 
 # Check for Xft library
 PKG_CHECK_MODULES(XFT, xft, [xft_found=yes], [xft_found=no])
-AC_SUBST(XFT_CFLAGS)
-AC_SUBST(XFT_LIBS)
 case "$xft_found" in
 yes)
        AC_DEFINE(XFT,1,[Xft library available])
@@ -66,8 +62,6 @@ esac
 
 # Check for MIT-SHM extension
 PKG_CHECK_MODULES(XEXT, xext, [xext_found=yes], [xext_found=no])
-AC_SUBST(XEXT_CFLAGS)
-AC_SUBST(XEXT_LIBS)
 case "$xext_found" in
 yes)
        save_LIBS="$LIBS"
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index ce3026b..e4f3cb1
@@ -788,7 +788,7 @@ Test test[] = {
                InitTrapezoids, DoTrapezoids, NullProc, EndTrapezoids,
                V1_4FEATURE, ROP, 0,
                {2, 300, "escherknot", NULL, FillTiled}},
-#ifdef XRENDER
+#if defined(XRENDER) && defined(XFT)
   {"-aatrap1", "Fill 1x1 aa trap", NULL,
                InitFixedTraps, DoFixedTraps, NullProc, EndFixedTraps,
                V1_5FEATURE, NONROP, 0,
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 326b56e..05f43c2
@@ -104,7 +104,7 @@ EndTrapezoids(XParms xp, Parms p)
     free(points);
 }
 
-#ifdef XRENDER
+#if defined(XRENDER) && defined(XFT)
 #include <X11/extensions/Xrender.h>
 #include <X11/Xft/Xft.h>
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 15eb04d..c5129d7
@@ -282,7 +282,7 @@ RoundTo3Digits(double d)
 
 
 static void 
-ReportTimes(double usecs, int n, char *str, int average)
+ReportTimes(double usecs, long long n, char *str, int average)
 {
     double msecsperobj, objspersec;
 
@@ -296,14 +296,14 @@ ReportTimes(double usecs, int n, char *str, int average)
         objspersec =  RoundTo3Digits(objspersec);
 
         if (average) {
-           printf("%7d trep @ %8.4f msec (%8.1f/sec): %s\n", 
+           printf("%7lld trep @ %8.4f msec (%8.1f/sec): %s\n",
                    n, msecsperobj, objspersec, str);
        } else {
-           printf("%7d reps @ %8.4f msec (%8.1f/sec): %s\n", 
+           printf("%7lld reps @ %8.4f msec (%8.1f/sec): %s\n",
                n, msecsperobj, objspersec, str);
        }
     } else {
-       printf("%6d %sreps @ 0.0 msec (unmeasurably fast): %s\n",
+       printf("%6lld %sreps @ 0.0 msec (unmeasurably fast): %s\n",
            n, average ? "t" : "", str);
     }
 
@@ -647,6 +647,7 @@ DoTest(XParms xp, Test *test, int reps)
     HardwareSync(xp);
 
     time = ElapsedTime(syncTime);
+    if (time < 0.0) time = 0.0;
     CheckAbort ();
     if (drawToFakeServer)
         XQueryBestSize(xp->d, TileShape, tileToQuery,
@@ -838,7 +839,7 @@ static void
 ProcessTest(XParms xp, Test *test, int func, unsigned long pm, char *label)
 {
     double  time, totalTime;
-    int     reps;
+    long long reps;
     int     j;
 
     xp->planemask = pm;
old mode 100755 (executable)
new mode 100644 (file)
index 597b1f7..1deb037
@@ -291,7 +291,7 @@ extern void EndAAText ( XParms xp, Parms p );
 extern int InitTrapezoids ( XParms xp, Parms p, int reps );
 extern void DoTrapezoids ( XParms xp, Parms p, int reps );
 extern void EndTrapezoids ( XParms xp, Parms p );
-#ifdef XRENDER
+#if defined(XRENDER) && defined(XFT)
 extern int InitFixedTraps ( XParms xp, Parms p, int reps );
 extern void DoFixedTraps ( XParms xp, Parms p, int reps );
 extern void EndFixedTraps ( XParms xp, Parms p );
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/xbiff-1.0.2-xmu-configure.patch b/xbiff-1.0.2-xmu-configure.patch
new file mode 100644 (file)
index 0000000..809b7ea
--- /dev/null
@@ -0,0 +1,32 @@
+From 754ee50a440d6b4a68c759b188d7da93a21d8727 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 8 Nov 2010 09:48:45 +1000
+Subject: [PATCH] Backport of configure flags for xbiff
+
+commit 070c9d45cc0678708d5766804d0c529bc6f8bee3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 16:38:53 2010 -0700
+
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ xbiff-1.0.2/configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/xbiff-1.0.2/configure.ac b/xbiff-1.0.2/configure.ac
+index 1ded032..0ce1b1b 100644
+--- a/xbiff-1.0.2/configure.ac
++++ b/xbiff-1.0.2/configure.ac
+@@ -38,7 +38,7 @@ AC_PROG_INSTALL
+ XORG_DEFAULT_OPTIONS
+-PKG_CHECK_MODULES(XBIFF, xaw7 xbitmaps xext)
++PKG_CHECK_MODULES(XBIFF, xaw7 xmu xbitmaps xext x11)
+ AC_SUBST(XBIFF_CFLAGS)
+ AC_SUBST(XBIFF_LIBS)
+-- 
+1.7.3.2
+
diff --git a/xcalc/COPYING b/xcalc/COPYING
deleted file mode 100644 (file)
index 42a20fb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-Copyright (c) 1989, 1994  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-------------------------------------------------------------------------------
-
-Copyright 2005 Red Hat, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Red Hat not be used in
-advertising or publicity pertaining to distribution of the software
-without specific, written prior permission.  Red Hat makes no
-representations about the suitability of this software for any
-purpose.  It is provided "as is" without express or implied warranty.
-
-RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
diff --git a/xcalc/ChangeLog b/xcalc/ChangeLog
deleted file mode 100644 (file)
index ba79097..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-commit 6c21e467c805d62593d34da9e83a2fa2f01798a6
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Dec 17 19:51:44 2009 -0800
-
-    xcalc 1.0.3
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 146b1da64e575d330c2599161938140a4233cb6a
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Dec 17 19:21:22 2009 -0800
-
-    Apply automake silencer to man page generation rule
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit abb1bf5b74642f8d40ca5fbf87490c5186f41590
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Thu Nov 26 09:19:52 2009 -0500
-
-    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
-    
-    Now that the INSTALL file is generated.
-    Allows running make maintainer-clean.
-
-commit 109d08574cf3d951d73668a5a23c97dad94d6e75
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Wed Oct 28 14:09:08 2009 -0400
-
-    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
-    
-    Add missing INSTALL file. Use standard GNU file on building tarball
-    README may have been updated
-    Remove AUTHORS file as it is empty and no content available yet.
-    Remove NEWS file as it is empty and no content available yet.
-
-commit dc35d949925e76e74403b4aea02c2ff198bf0ec6
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Tue Oct 27 15:07:24 2009 -0400
-
-    Deploy the new XORG_DEFAULT_OPTIONS #24242
-    
-    This macro aggregate a number of existing macros that sets commmon
-    X.Org components configuration options. It shields the configuration file from
-    future changes.
-
-commit 31a1d8fc1486e6dd0cb9c5ba569c820b3b79d890
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Mon Oct 26 22:08:38 2009 -0400
-
-    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
-    
-    ChangeLog filename is known to Automake and requires no further
-    coding in the makefile.
-
-commit befb756a62a11a857f20f903b8b892768a58e229
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Thu Oct 22 12:34:15 2009 -0400
-
-    .gitignore: use common defaults with custom section # 24239
-    
-    Using common defaults will reduce errors and maintenance.
-    Only the very small or inexistent custom section need periodic maintenance
-    when the structure of the component changes. Do not edit defaults.
-
-commit eab3461ac8e9e809094f45ca2084ddf7b4485035
-Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Sun Sep 27 15:37:25 2009 -0400
-
-    Makefile.am: do not include autogen.sh in distribution #24183
-    
-    This is a private build script that should not be distributed
-
-commit b685a52aa117e9c7841fdb9b9e6b44fe898cd929
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Oct 1 14:54:20 2009 -0700
-
-    Add README with pointers to mailing lists, bugzilla, & git
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit dd6ca812a9e540ade4afd5db9dd13ea7ed3ea3ab
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Mon Jan 12 20:09:07 2009 -0200
-
-    Ansification and compile warning fixes.
-    
-      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
-    make distcheck and all gcc 4.3 and sparse warnings.
-
-commit fd75efe1d9b57c483f7cedd9e2dce34b97eef75e
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Wed Aug 20 10:32:49 2008 -0400
-
-    xaw8 is gone, use xaw7
-
-commit e8360958ef3dba1e7ab8282c5055b0ccf5650f1c
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Fri May 16 14:20:03 2008 +0200
-
-    $(builddir) is the current directory
-    
-    Apparently automake doesn't always export the builddir variable.
-    This fixes my previous commit.
-
-commit d3849e5474e65d2cf4212118896883330752c763
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Sun Apr 20 19:42:48 2008 +0200
-
-    Fix build with builddir != srcdir
-
-commit 18db0ddc3a18317585172374d0157dbdc76146aa
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Thu Mar 27 20:07:34 2008 -0700
-
-    Build fix for file systems that are not case sensitive
-
-commit 9f76a0d8684da6dfad67282be213139b6f87a05a
-Author: Matthieu Herrb <matthieu@bluenote.herrb.net>
-Date:   Sat Mar 8 22:09:59 2008 +0100
-
-    Makefile.am: nuke RCS Id
-
-commit 19fad31ddef4c1063ee2315dfee94e4ebb5f0ff0
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 21 11:23:52 2007 -0700
-
-    Version bump: 1.0.2
-
-commit c4ada4a7ee46f8ab0dfeb2cd311758d9197a59a8
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 21 11:19:09 2007 -0700
-
-    Fill in COPYING with copyright/license notices from source files
-
-commit 5ee182a964d0ba16315935ec9bfd91779ed4a2a1
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 21 11:15:50 2007 -0700
-
-    Replace static changelog with dist-hook to generate from git log
-
-commit 3c9230230e88f6421ea3549f813eabceb4120734
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 21 11:03:07 2007 -0700
-
-    renamed: .cvsignore -> .gitignore
-
-commit b2c489924708b202f33f6528d3269911662f906c
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Aug 21 11:02:19 2007 -0700
-
-    Change xcalc_CFLAGS to AM_CFLAGS to make automake-1.10 happier
-
-commit b586f35824d7c3bc061ba96e82b48744041dac59
-Author: Mike Markowski <mm@udel.edu>
-Date:   Wed Jul 12 11:28:40 2006 -0700
-
-    Bug #4914: Add HP mode resources to XCalc-color app-defaults
-    
-    X.Org bug #4914 <https://bugs.freedesktop.org/show_bug.cgi?id=4914>
-    Patch #3658 <https://bugs.freedesktop.org/attachment.cgi?id=3658>
-
-commit 322a3bd493b99164925e852df5ffa8e1a650f496
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:48 2005 +0000
-
-    Update package version for X11R7 release.
-
-commit 8b7933c8192364e55b863b3e88ad64dbd6004bcc
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:42 2005 +0000
-
-    Stub COPYING files
-
-commit 543045f1c5effcafe60ee86ab02663ea5253d7b1
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:05 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit ffb4bc9e1bbff3648d9a60d29c8efe8292b2e6d2
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 7 16:17:58 2005 +0000
-
-    Change to use the app-defaults default dir configured in libXt.
-
-commit f8c6b6ee02de9f4991e4894386fd1f914e71f295
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:48:19 2005 +0000
-
-    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-commit db75d5541e32a82c1a200f5db94258c55144aee9
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:49:18 2005 +0000
-
-    Update package version number for X11R7 RC3 release.
-
-commit 217c43175b253fb436dfe2c17c258440efbf1b4d
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:39 2005 +0000
-
-    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
-        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
-
-commit 35347991b10472019e814b4346f9f55f33fa6850
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:34:58 2005 +0000
-
-    Another pass at .cvsignores for apps.
-
-commit ec23a703b3dd3ca07bcb67599d2aa20186b812db
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:50 2005 +0000
-
-    Add/improve .cvsignore files for apps.
-
-commit 4b974526a94abe02297f7ecf427cb78681c9bfb3
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:52 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit b0d618388ae24bb2bbcfbb43b313306b3b8d342f
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Oct 18 00:32:54 2005 +0000
-
-    Change default install dir for app-default files from
-        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
-        the monolith & allow localization
-
-commit 933a86b8c6d64e974b314c5e3617fa2cbb213cce
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:21 2005 +0000
-
-    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
-        work better with BSD make
-
-commit 203bc6e49653660050a874508da2c57e089c3c54
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:43 2005 +0000
-
-    Use sed to fill in variables in man page
-
-commit e70773cb5c4269627e0d8750f7852ed865fd8eaf
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Thu Oct 13 20:11:00 2005 +0000
-
-    Fix app-default files to install under the same names as in the monolith
-        instead of their short names used only for 14-character filename length
-        limited ancient filesystems
-
-commit 9648bcddee6779eed395d60f17a13bcf13fa9042
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Aug 1 20:25:29 2005 +0000
-
-    Install man pages to section 1 instead of section m (Patch from Donnie
-        Berkholz)
-
-commit cdd93a4e3c1dac5f23ad21c5fac4fbc054e0a42d
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:31 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit 2347df01911fc8061071cb80018963b79514e4b4
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Jul 26 15:44:01 2005 +0000
-
-    Replace more GNU make-ism's with more portable macros
-
-commit b7161f370dbabeb536e9dc078f05e1ffd67847fb
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Jul 20 19:31:51 2005 +0000
-
-    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
-        configure cache, you cache it, and the cached value is probably wrong.
-
-commit 526ab098fe73f9dde13b651ae8c70fbec56594c2
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sun Jul 17 20:11:02 2005 +0000
-
-    fix rules to work with non-GNU make and outside of $srcdir
-
-commit 392f5dd1907a5110c89b308ef51122b39b23dde5
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Wed Jun 29 23:12:07 2005 +0000
-
-    Build system for Xcalc
-
-commit a72c79567a4f550dfafb532b03be79339c5a4a30
-Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
-Date:   Tue Jul 6 09:24:58 2004 +0000
-
-    Bugzilla #665: bugs in xcalc -rpn mode decimal_point is a const char* not
-        char. the patch uses strcmp instead of plain char == char operator and
-        allows decimal_point to be of any length. localeconv() is only called
-        if X_LOCALE is _not_ defined
-
-commit bbcc481006d4b5f4e8d1276db2220cf96a355985
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sun May 23 20:03:49 2004 +0000
-
-    xc/programs/xcalc/math.c
-    xcalc -rpn mode errors (Geoffery Coram)
-
-commit ed6ab3f1b45a5101a4cddfca754291b4523520a1
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:38 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit bb536859850357b05511068fab838dd3a1436ef6
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:35:00 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit fecd81156f60db136eaf9cf79a34b7d076bbae06
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:12:55 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit 3acc8a33b8eec4fe9164e12507cafb3c161d3cbe
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:16 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit 70f4b224345cc7c43d1960858c27a11541ea55c4
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:23:58 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit c61023614eb9182293f5c26c22a3babf65f1dee1
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:29:03 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit c538606166a71ab7b711de7394cc61add265a209
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:58 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 411b0e9e319550a394b0a5945543f39a5affc6a6
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:48:58 2003 +0000
-
-    Initial revision
diff --git a/xcalc/actions.c b/xcalc/actions.c
deleted file mode 100644 (file)
index 78c3e36..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-/* $XConsortium: actions.c,v 1.9 94/04/17 20:43:30 converse Exp $ */
-/*
-
-Copyright (c) 1989  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-/*
- * actions.c - externally available procedures for xcalc
- *
- * Author:  Donna Converse, MIT X Consortium
- */
-
-#include <X11/Intrinsic.h>
-#include <setjmp.h>
-#include "xcalc.h"
-
-#ifndef IEEE
-#define XCALC_PRE_OP(keynum) { if (pre_op(keynum)) return; \
-                      if (setjmp (env)) {fail_op(); return;}}
-#else
-#define XCALC_PRE_OP(keynum) if (pre_op(keynum)) return;
-#endif
-
-static void add(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void back(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void bell(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void degree(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void digit(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void divide(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void e(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void enter(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void epower(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void equal(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void negate(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void nop(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void off(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void pi(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void power(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void quit(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void recall(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void roll(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void selection(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void sine(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void square(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void store(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void sum(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count);
-
-/*
- *     calculator action table
- */
-
-XtActionsRec   Actions[] = {
-{"add",                add},           /* addition */
-{"back",       back},          /* HP-specific backspace */
-{"bell",       bell},          /* ring bell */
-{"clear",      clearit},       /* TI-specific clear calculator state */
-{"cosine",     cosine},        /* trigonometric function cosine */
-{"decimal",    decimal},       /* decimal point */
-{"degree",     degree},        /* degree, radian, grad switch */
-{"digit",      digit},         /* numeric key */
-{"divide",     divide},        /* division */
-{"e",          e},             /* the natural number e */
-{"enter",      enter},         /* HP-specific enter */
-{"epower",     epower},        /* e raised to a power */
-{"equal",      equal},         /* TI-specific = */
-{"exchange",   exchange},      /* TI-specific exchange memory and display */
-{"factorial",  factorial},     /* factorial function */
-{"inverse",    inverse},       /* inverse */
-{"leftParen",  leftParen},     /* TI-specific left parenthesis */
-{"logarithm",  logarithm},     /* logarithm base 10 */
-{"multiply",   multiply},      /* multiplication */
-{"naturalLog", naturalLog},    /* natural logarithm base e */
-{"negate",     negate},        /* change sign */
-{"nop",                nop},           /* no operation, rings bell */
-{"off",                off},           /* clear state */
-{"pi",         pi},            /* the number pi */
-{"power",      power},         /* raise to an arbitrary power */
-{"quit",       quit},          /* quit */
-{"recall",     recall},        /* memory recall */
-{"reciprocal",  reciprocal},   /* reciprocal function */
-{"rightParen", rightParen},    /* TI-specific left parenthesis */
-{"roll",       roll},          /* HP-specific roll stack */
-{"scientific", scientific},    /* scientfic notation (EE) */
-{"selection",  selection},     /* copy selection */
-{"sine",       sine},          /* trigonometric function sine */
-{"square",     square},        /* square */
-{"squareRoot", squareRoot},    /* square root */
-{"store",      store},         /* memory store */
-{"subtract",   subtract},      /* subtraction */
-{"sum",                sum},           /* memory summation */
-{"tangent",    tangent},       /* trigonometric function tangent */
-{"tenpower",   tenpower},      /* 10 raised to to an arbitrary power */
-{"XexchangeY", XexchangeY}     /* HP-specific exchange X and Y registers */
-};
-
-int ActionsCount = XtNumber(Actions);
-
-/*ARGSUSED*/
-static void add(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kADD);
-    rpn ? twof(kADD) : twoop(kADD);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void back(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kBKSP);
-    bkspf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void bell(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    ringbell();
-}
-
-/*ARGSUSED*/
-static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kCLR);
-    clearf();
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kCOS);
-    oneop(kCOS);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kDEC);
-    decf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void degree(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kDRG);
-    drgf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void digit(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    switch (vector[0][0])
-    {
-      case '1':        XCALC_PRE_OP(kONE); numeric(kONE); break;
-      case '2': XCALC_PRE_OP(kTWO); numeric(kTWO); break;
-      case '3': XCALC_PRE_OP(kTHREE); numeric(kTHREE); break;
-      case '4': XCALC_PRE_OP(kFOUR); numeric(kFOUR); break;
-      case '5': XCALC_PRE_OP(kFIVE); numeric(kFIVE); break;
-      case '6': XCALC_PRE_OP(kSIX); numeric(kSIX); break;
-      case '7': XCALC_PRE_OP(kSEVEN); numeric(kSEVEN); break;
-      case '8': XCALC_PRE_OP(kEIGHT); numeric(kEIGHT); break;
-      case '9': XCALC_PRE_OP(kNINE); numeric(kNINE); break;
-      case '0': XCALC_PRE_OP(kZERO); numeric(kZERO); break;
-    }
-    post_op();
-}
-
-/*ARGSUSED*/
-static void divide(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kDIV);
-    rpn  ? twof(kDIV) : twoop(kDIV);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void e(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kE);
-    oneop(kE);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void enter(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kENTR);
-    entrf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void epower(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kEXP);
-    oneop(kEXP);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void equal(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kEQU);
-    equf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kEXC);
-    oneop(kEXC);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kFACT);
-    oneop(kFACT);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kINV);
-    invf();
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kLPAR);
-    lparf();
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kLOG);
-    oneop(kLOG);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kMUL);
-    rpn ? twof(kMUL) : twoop(kMUL);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kLN);
-    oneop(kLN);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void negate(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kNEG);
-    negf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void nop(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    ringbell();
-}
-
-/*ARGSUSED*/
-static void off(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kOFF);
-    offf();
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void pi(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kPI);
-    oneop(kPI);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void power(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kPOW);
-    rpn ? twof(kPOW) : twoop(kPOW);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void quit(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    if (e->type == ClientMessage && e->xclient.data.l[0] != wm_delete_window)
-       ringbell();
-    else
-       Quit();
-}
-
-/*ARGSUSED*/
-static void recall(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kRCL);
-    rpn ? memf(kRCL) : oneop(kRCL);
-    post_op();
-}
-       
-/*ARGSUSED*/
-static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kRECIP);
-    oneop(kRECIP);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kRPAR);
-    rparf();
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void roll(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kROLL);
-    rollf();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kEE);
-    eef();
-    post_op();
-}
-
-/*ARGSUSED*/
-static void selection(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    do_select(((XButtonReleasedEvent *)e)->time);
-}
-
-/*ARGSUSED*/
-static void sine(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kSIN);
-    oneop(kSIN);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void square(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kSQR);
-    oneop(kSQR);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kSQRT);
-    oneop(kSQRT);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void store(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kSTO);
-    rpn ? memf(kSTO) : oneop(kSTO);
-    post_op();
-}
-
-/*ARGSUSED*/
-static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kSUB);
-    rpn ? twof(kSUB) : twoop(kSUB);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void sum(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kSUM);
-    rpn ? memf(kSUM) : oneop(kSUM);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kTAN);
-    oneop(kTAN);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(k10X);
-    oneop(k10X);
-    post_op();
-}
-   
-/*ARGSUSED*/
-static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count)
-{
-    XCALC_PRE_OP(kXXY);
-    twof(kXXY);
-    post_op();
-}
diff --git a/xcalc/app-defaults/XCalc b/xcalc/app-defaults/XCalc
deleted file mode 100644 (file)
index 31d553e..0000000
+++ /dev/null
@@ -1,530 +0,0 @@
-! $XConsortium: XCalc.ad,v 1.13 94/03/03 19:19:32 converse Exp $
-! $XFree86$
-! XCalc application class resource file
-
-XCalc.Title:           Calculator
-XCalc.IconName:                Calc
-XCalc.IconPixmap:      calculator
-
-XCalc*Cursor:          hand2
-XCalc*Font:            8x13
-XCalc*ShapeStyle:      rectangle
-XCalc*Command.horizDistance:   2
-XCalc*Command.vertDistance:    2
-XCalc*Command.width:           40
-XCalc*Command.height:          26
-XCalc*Command.internalWidth:   1
-
-XCalc*bevel.background:                black
-XCalc*bevel.horizDistance:     4
-XCalc*bevel.vertDistance:      2
-
-XCalc*bevel.screen.horizDistance:      6
-XCalc*bevel.screen.vertDistance:       2
-XCalc*bevel.screen.defaultDistance:    0
-
-XCalc*bevel.screen.Label.horizDistance:                4
-XCalc*bevel.screen.Label.vertDistance:         2
-XCalc*bevel.screen.Label.internalHeight:       1
-XCalc*bevel.screen.Label.internalWidth:                1
-XCalc*bevel.screen.LCD.label:                  88888888888
-XCalc*bevel.screen.LCD.fromHoriz:              M
-XCalc*bevel.screen.LCD.horizDistance:          4
-XCalc*bevel.screen.LCD.vertDistance:           2
-XCalc*bevel.screen.INV.fromVert:               LCD
-XCalc*bevel.screen.INV.vertDistance:           4
-XCalc*bevel.screen.DEG.fromHoriz:              INV
-XCalc*bevel.screen.DEG.fromVert:               LCD
-XCalc*bevel.screen.DEG.horizDistance:          1
-XCalc*bevel.screen.RAD.fromHoriz:              DEG
-XCalc*bevel.screen.RAD.fromVert:               LCD
-XCalc*bevel.screen.GRAD.fromHoriz:             RAD
-XCalc*bevel.screen.GRAD.fromVert:              LCD
-XCalc*bevel.screen.P.label:                    ()
-XCalc*bevel.screen.P.fromHoriz:                        GRAD
-XCalc*bevel.screen.P.fromVert:                 LCD
-XCalc*bevel.screen.P.horizDistance:            2
-
-!XCalc*ti.Geometry:    171x252
-XCalc*ti.bevel.screen.LCD.width:               186
-
-XCalc*ti.bevel.screen.LCD.translations:        #replace\n\
-       Ctrl<Key>c:quit()\n\
-       Ctrl<Key>h:clear()\n\
-       None<Key>0:digit(0)\n\
-       None<Key>1:digit(1)\n\
-       None<Key>2:digit(2)\n\
-       None<Key>3:digit(3)\n\
-       None<Key>4:digit(4)\n\
-       None<Key>5:digit(5)\n\
-       None<Key>6:digit(6)\n\
-       None<Key>7:digit(7)\n\
-       None<Key>8:digit(8)\n\
-       None<Key>9:digit(9)\n\
-       <Key>KP_0:digit(0)\n\
-       <Key>KP_1:digit(1)\n\
-       <Key>KP_2:digit(2)\n\
-       <Key>KP_3:digit(3)\n\
-       <Key>KP_4:digit(4)\n\
-       <Key>KP_5:digit(5)\n\
-       <Key>KP_6:digit(6)\n\
-       <Key>KP_7:digit(7)\n\
-       <Key>KP_8:digit(8)\n\
-       <Key>KP_9:digit(9)\n\
-       <Key>KP_Enter:equal()\n\
-       <Key>KP_Equal:equal()\n\
-       <Key>KP_Multiply:multiply()\n\
-       <Key>KP_Add:add()\n\
-       <Key>KP_Subtract:subtract()\n\
-       <Key>KP_Decimal:decimal()\n\
-       <Key>KP_Separator:decimal()\n\
-       <Key>KP_Divide:divide()\n\
-       <Key>KP_Tab:equal()\n\
-       <Key>Clear:clear()\n\
-       :<Key>.:decimal()\n\
-       :<Key>+:add()\n\
-       :<Key>-:subtract()\n\
-       :<Key>*:multiply()\n\
-       :<Key>/:divide()\n\
-       :<Key>(:leftParen()\n\
-       :<Key>):rightParen()\n\
-       :<Key>!:factorial()\n\
-       <Key>e:e()\n\
-       :<Key>^:power()\n\
-       <Key>p:pi()\n\
-       <Key>i:inverse()\n\
-       <Key>s:sine()\n\
-       <Key>c:cosine()\n\
-       <Key>t:tangent()\n\
-       <Key>d:degree()\n\
-       <Key>l:naturalLog()\n\
-       :<Key>=:equal()\n\
-       <Key>n:negate()\n\
-       <Key>r:squareRoot()\n\
-       <Key>space:clear()\n\
-       <Key>q:quit()\n\
-       <Key>Delete:clear()\n\
-       <Key>BackSpace:clear()\n\
-       <Btn1Down>,<Btn1Up>:toggle()selection()\n
-
-XCalc*ti.button1.label:                1/x
-XCalc*ti.button1.translations: #override<Btn1Down>,<Btn1Up>:reciprocal()unset()
-XCalc*ti.button2.label:                x\262
-XCalc*ti.button2.translations: #override<Btn1Down>,<Btn1Up>:square()unset()
-XCalc*ti.button3.font:         -adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-XCalc*ti.button3.label:                \326\140
-XCalc*ti.button3.translations: #override<Btn1Down>,<Btn1Up>:squareRoot()unset()
-XCalc*ti.button4.label:                CE/C
-XCalc*ti.button4.translations: #override<Btn1Down>,<Btn1Up>:clear()unset()
-XCalc*ti.button5.label:                AC
-XCalc*ti.button5.translations: #override<Btn1Down>,<Btn1Up>:off()unset()\n\
-       <Btn3Down>,<Btn3Up>:quit()
-
-XCalc*ti.button6.label:                INV
-XCalc*ti.button6.translations: #override<Btn1Down>,<Btn1Up>:inverse()unset()
-XCalc*ti.button7.label:                sin
-XCalc*ti.button7.translations: #override<Btn1Down>,<Btn1Up>:sine()unset()
-XCalc*ti.button8.label:                cos
-XCalc*ti.button8.translations: #override<Btn1Down>,<Btn1Up>:cosine()unset()
-XCalc*ti.button9.label:                tan
-XCalc*ti.button9.translations: #override<Btn1Down>,<Btn1Up>:tangent()unset()
-XCalc*ti.button10.label:               DRG
-XCalc*ti.button10.translations: #override<Btn1Down>,<Btn1Up>:degree()unset()
-
-XCalc*ti.button11.label:       e
-XCalc*ti.button11.translations: #override<Btn1Down>,<Btn1Up>:e()unset()
-XCalc*ti.button12.label:       EE
-XCalc*ti.button12.translations: #override<Btn1Down>,<Btn1Up>:scientific()unset()
-XCalc*ti.button13.label:       log
-XCalc*ti.button13.translations: #override<Btn1Down>,<Btn1Up>:logarithm()unset()
-XCalc*ti.button14.label:       ln
-XCalc*ti.button14.translations: #override<Btn1Down>,<Btn1Up>:naturalLog()unset()
-XCalc*ti.button15.label:       y^x
-XCalc*ti.button15.translations: #override<Btn1Down>,<Btn1Up>:power()unset()
-
-XCalc*ti.button16.font:                -adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-XCalc*ti.button16.label:       \160
-XCalc*ti.button16.translations: #override<Btn1Down>,<Btn1Up>:pi()unset()
-XCalc*ti.button17.label:       x!
-XCalc*ti.button17.translations: #override<Btn1Down>,<Btn1Up>:factorial()unset()
-XCalc*ti.button18.label:       (
-XCalc*ti.button18.translations: #override<Btn1Down>,<Btn1Up>:leftParen()unset()
-XCalc*ti.button19.label:       )
-XCalc*ti.button19.translations: #override<Btn1Down>,<Btn1Up>:rightParen()unset()
-XCalc*ti.button20.font:                -adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-XCalc*ti.button20.label:       \270
-XCalc*ti.button20.translations: #override<Btn1Down>,<Btn1Up>:divide()unset()
-
-XCalc*ti.button21.label:       STO
-XCalc*ti.button21.translations: #override<Btn1Down>,<Btn1Up>:store()unset()
-XCalc*ti.button22.label:       7
-XCalc*ti.button22.translations: #override<Btn1Down>,<Btn1Up>:digit(7)unset()
-XCalc*ti.button23.label:       8
-XCalc*ti.button23.translations: #override<Btn1Down>,<Btn1Up>:digit(8)unset()
-XCalc*ti.button24.label:       9
-XCalc*ti.button24.translations: #override<Btn1Down>,<Btn1Up>:digit(9)unset()
-XCalc*ti.button25.label:       *
-XCalc*ti.button25.translations: #override<Btn1Down>,<Btn1Up>:multiply()unset()
-
-XCalc*ti.button26.label:       RCL
-XCalc*ti.button26.translations: #override<Btn1Down>,<Btn1Up>:recall()unset()
-XCalc*ti.button27.label:       4
-XCalc*ti.button27.translations: #override<Btn1Down>,<Btn1Up>:digit(4)unset()
-XCalc*ti.button28.label:       5
-XCalc*ti.button28.translations: #override<Btn1Down>,<Btn1Up>:digit(5)unset()
-XCalc*ti.button29.label:       6
-XCalc*ti.button29.translations: #override<Btn1Down>,<Btn1Up>:digit(6)unset()
-XCalc*ti.button30.label:       -
-XCalc*ti.button30.translations: #override<Btn1Down>,<Btn1Up>:subtract()unset()
-
-XCalc*ti.button31.label:       SUM
-XCalc*ti.button31.translations: #override<Btn1Down>,<Btn1Up>:sum()unset()
-XCalc*ti.button32.label:       1
-XCalc*ti.button32.translations: #override<Btn1Down>,<Btn1Up>:digit(1)unset()
-XCalc*ti.button33.label:       2
-XCalc*ti.button33.translations: #override<Btn1Down>,<Btn1Up>:digit(2)unset()
-XCalc*ti.button34.label:       3
-XCalc*ti.button34.translations: #override<Btn1Down>,<Btn1Up>:digit(3)unset()
-XCalc*ti.button35.label:       +
-XCalc*ti.button35.translations: #override<Btn1Down>,<Btn1Up>:add()unset()
-
-XCalc*ti.button36.label:       EXC
-XCalc*ti.button36.translations: #override<Btn1Down>,<Btn1Up>:exchange()unset()
-XCalc*ti.button37.label:       0
-XCalc*ti.button37.translations: #override<Btn1Down>,<Btn1Up>:digit(0)unset()
-XCalc*ti.button38.label:       .
-XCalc*ti.button38.translations: #override<Btn1Down>,<Btn1Up>:decimal()unset()
-XCalc*ti.button39.label:       +/-
-XCalc*ti.button39.translations: #override<Btn1Down>,<Btn1Up>:negate()unset()
-XCalc*ti.button40.label:       =
-XCalc*ti.button40.translations: #override<Btn1Down>,<Btn1Up>:equal()unset()
-
-XCalc*ti.button1.horizDistance:        4       
-XCalc*ti.button1.vertDistance: 12
-XCalc*ti.button1.fromVert:     bevel
-XCalc*ti.button2.fromHoriz:    button1
-XCalc*ti.button2.fromVert:     bevel
-XCalc*ti.button2.vertDistance: 12
-XCalc*ti.button3.fromHoriz:    button2
-XCalc*ti.button3.fromVert:     bevel
-XCalc*ti.button3.vertDistance: 12
-XCalc*ti.button4.fromHoriz:    button3
-XCalc*ti.button4.fromVert:     bevel
-XCalc*ti.button4.vertDistance: 12
-XCalc*ti.button5.fromHoriz:    button4
-XCalc*ti.button5.fromVert:     bevel
-XCalc*ti.button5.vertDistance: 12
-
-XCalc*ti.button6.horizDistance:        4
-XCalc*ti.button6.fromVert:     button1
-XCalc*ti.button7.fromHoriz:    button6
-XCalc*ti.button7.fromVert:     button2
-XCalc*ti.button8.fromHoriz:    button7
-XCalc*ti.button8.fromVert:     button3
-XCalc*ti.button9.fromHoriz:    button8
-XCalc*ti.button9.fromVert:     button4
-XCalc*ti.button10.fromHoriz:   button9
-XCalc*ti.button10.fromVert:    button5
-
-XCalc*ti.button11.horizDistance:       4
-XCalc*ti.button11.fromVert:            button6
-XCalc*ti.button12.fromHoriz:           button11
-XCalc*ti.button12.fromVert:            button7
-XCalc*ti.button13.fromHoriz:           button12
-XCalc*ti.button13.fromVert:            button8
-XCalc*ti.button14.fromHoriz:           button13
-XCalc*ti.button14.fromVert:            button9
-XCalc*ti.button15.fromHoriz:           button14
-XCalc*ti.button15.fromVert:            button10
-
-XCalc*ti.button16.horizDistance:       4
-XCalc*ti.button16.fromVert:            button11
-XCalc*ti.button17.fromHoriz:           button16
-XCalc*ti.button17.fromVert:            button12
-XCalc*ti.button18.fromHoriz:           button17
-XCalc*ti.button18.fromVert:            button13
-XCalc*ti.button19.fromHoriz:           button18
-XCalc*ti.button19.fromVert:            button14
-XCalc*ti.button20.fromHoriz:           button19
-XCalc*ti.button20.fromVert:            button15
-
-XCalc*ti.button21.horizDistance:       4
-XCalc*ti.button21.fromVert:            button16
-XCalc*ti.button22.fromHoriz:           button21
-XCalc*ti.button22.fromVert:            button17
-XCalc*ti.button23.fromHoriz:           button22
-XCalc*ti.button23.fromVert:            button18
-XCalc*ti.button24.fromHoriz:           button23
-XCalc*ti.button24.fromVert:            button19
-XCalc*ti.button25.fromHoriz:           button24
-XCalc*ti.button25.fromVert:            button20
-
-XCalc*ti.button26.horizDistance:       4
-XCalc*ti.button26.fromVert:            button21
-XCalc*ti.button27.fromHoriz:           button26
-XCalc*ti.button27.fromVert:            button22
-XCalc*ti.button28.fromHoriz:           button27
-XCalc*ti.button28.fromVert:            button23
-XCalc*ti.button29.fromHoriz:           button28
-XCalc*ti.button29.fromVert:            button24
-XCalc*ti.button30.fromHoriz:           button29
-XCalc*ti.button30.fromVert:            button25
-
-XCalc*ti.button31.horizDistance:       4
-XCalc*ti.button31.fromVert:            button26
-XCalc*ti.button32.fromHoriz:           button31
-XCalc*ti.button32.fromVert:            button27
-XCalc*ti.button33.fromHoriz:           button32
-XCalc*ti.button33.fromVert:            button28
-XCalc*ti.button34.fromHoriz:           button33
-XCalc*ti.button34.fromVert:            button29
-XCalc*ti.button35.fromHoriz:           button34
-XCalc*ti.button35.fromVert:            button30
-
-XCalc*ti.button36.horizDistance:       4
-XCalc*ti.button36.fromVert:            button31
-XCalc*ti.button37.fromHoriz:           button36
-XCalc*ti.button37.fromVert:            button32
-XCalc*ti.button38.fromHoriz:           button37
-XCalc*ti.button38.fromVert:            button33
-XCalc*ti.button39.fromHoriz:           button38
-XCalc*ti.button39.fromVert:            button34
-XCalc*ti.button40.fromHoriz:           button39
-XCalc*ti.button40.fromVert:            button35
-
-
-!XCalc*hp.Geometry:                    336x164
-XCalc*hp.bevel.screen.LCD.width:       186
-
-XCalc*hp.bevel.screen.LCD.translations:        #replace\n\
-       Ctrl<Key>c:quit()\n\
-       Ctrl<Key>h:back()\n\
-       None<Key>0:digit(0)\n\
-       None<Key>1:digit(1)\n\
-       None<Key>2:digit(2)\n\
-       None<Key>3:digit(3)\n\
-       None<Key>4:digit(4)\n\
-       None<Key>5:digit(5)\n\
-       None<Key>6:digit(6)\n\
-       None<Key>7:digit(7)\n\
-       None<Key>8:digit(8)\n\
-       None<Key>9:digit(9)\n\
-       <Key>KP_0:digit(0)\n\
-       <Key>KP_1:digit(1)\n\
-       <Key>KP_2:digit(2)\n\
-       <Key>KP_3:digit(3)\n\
-       <Key>KP_4:digit(4)\n\
-       <Key>KP_5:digit(5)\n\
-       <Key>KP_6:digit(6)\n\
-       <Key>KP_7:digit(7)\n\
-       <Key>KP_8:digit(8)\n\
-       <Key>KP_9:digit(9)\n\
-       <Key>KP_Enter:enter()\n\
-       <Key>KP_Multiply:multiply()\n\
-       <Key>KP_Add:add()\n\
-       <Key>KP_Subtract:subtract()\n\
-       <Key>KP_Decimal:decimal()\n\
-       <Key>KP_Divide:divide()\n\
-       :<Key>.:decimal()\n\
-       :<Key>+:add()\n\
-       :<Key>-:subtract()\n\
-       :<Key>*:multiply()\n\
-       :<Key>/:divide()\n\
-       :<Key>!:factorial()\n\
-       <Key>e:e()\n\
-       :<Key>^:power()\n\
-       <Key>p:pi()\n\
-       <Key>i:inverse()\n\
-       <Key>s:sine()\n\
-       <Key>c:cosine()\n\
-       <Key>t:tangent()\n\
-       <Key>d:degree()\n\
-       <Key>l:naturalLog()\n\
-       <Key>n:negate()\n\
-       <Key>r:squareRoot()\n\
-       <Key>space:clear()\n\
-       <Key>q:quit()\n\
-       <Key>Delete:back()\n\
-       <Key>Return:enter()\n\
-       <Key>Linefeed:enter()\n\
-       <Key>x:XexchangeY()\n\
-       <Key>BackSpace:back()\n\
-       <Btn1Down>,<Btn1Up>:toggle()selection()\n
-
-XCalc*hp.button1.font:         -adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-XCalc*hp.button1.label:                \326\140
-XCalc*hp.button1.translations: #override<Btn1Down>,<Btn1Up>:squareRoot()unset()
-XCalc*hp.button2.label:                e^x
-XCalc*hp.button2.translations: #override<Btn1Down>,<Btn1Up>:epower()unset()
-XCalc*hp.button3.label:                10^x
-XCalc*hp.button3.translations: #override<Btn1Down>,<Btn1Up>:tenpower()unset()
-XCalc*hp.button4.label:                y^x
-XCalc*hp.button4.translations: #override<Btn1Down>,<Btn1Up>:power()unset()
-XCalc*hp.button5.label:                1/x
-XCalc*hp.button5.translations: #override<Btn1Down>,<Btn1Up>:reciprocal()unset()
-XCalc*hp.button6.label:                CHS
-XCalc*hp.button6.translations: #override<Btn1Down>,<Btn1Up>:negate()unset()
-XCalc*hp.button7.label:                7
-XCalc*hp.button7.translations: #override<Btn1Down>,<Btn1Up>:digit(7)unset()
-XCalc*hp.button8.label:                8
-XCalc*hp.button8.translations: #override<Btn1Down>,<Btn1Up>:digit(8)unset()
-XCalc*hp.button9.label:                9
-XCalc*hp.button9.translations: #override<Btn1Down>,<Btn1Up>:digit(9)unset()
-XCalc*hp.button10.font:                -adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-XCalc*hp.button10.label:       \270
-XCalc*hp.button10.translations: #override<Btn1Down>,<Btn1Up>:divide()unset()
-
-XCalc*hp.button11.label:       x!
-XCalc*hp.button11.translations: #override<Btn1Down>,<Btn1Up>:factorial()unset()
-XCalc*hp.button12.font:                -adobe-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-XCalc*hp.button12.label:       \160
-XCalc*hp.button12.translations: #override<Btn1Down>,<Btn1Up>:pi()unset()
-XCalc*hp.button13.label:       sin
-XCalc*hp.button13.translations: #override<Btn1Down>,<Btn1Up>:sine()unset()
-XCalc*hp.button14.label:       cos
-XCalc*hp.button14.translations: #override<Btn1Down>,<Btn1Up>:cosine()unset()
-XCalc*hp.button15.label:       tan
-XCalc*hp.button15.translations: #override<Btn1Down>,<Btn1Up>:tangent()unset()
-XCalc*hp.button16.label:       EEX
-XCalc*hp.button16.translations: #override<Btn1Down>,<Btn1Up>:scientific()unset()
-XCalc*hp.button17.label:       4
-XCalc*hp.button17.translations: #override<Btn1Down>,<Btn1Up>:digit(4)unset()
-XCalc*hp.button18.label:       5
-XCalc*hp.button18.translations: #override<Btn1Down>,<Btn1Up>:digit(5)unset()
-XCalc*hp.button19.label:       6
-XCalc*hp.button19.translations: #override<Btn1Down>,<Btn1Up>:digit(6)unset()
-XCalc*hp.button20.label:       *
-XCalc*hp.button20.translations: #override<Btn1Down>,<Btn1Up>:multiply()unset()
-
-XCalc*hp.button21.mappedWhenManaged: False
-XCalc*hp.button22.mappedWhenManaged: False
-XCalc*hp.button23.label:       Rv
-XCalc*hp.button23.translations: #override<Btn1Down>,<Btn1Up>:roll()unset()
-XCalc*hp.button24.label:       x:y
-XCalc*hp.button24.translations: #override<Btn1Down>,<Btn1Up>:XexchangeY()unset()
-XCalc*hp.button25.label:       <-
-XCalc*hp.button25.translations: #override<Btn1Down>,<Btn1Up>:back()unset()
-XCalc*hp.button26.label:       E\nN\nT\nE\nR
-XCalc*hp.button26.translations: #override<Btn1Down>,<Btn1Up>:enter()unset()
-XCalc*hp.button27.label:       1
-XCalc*hp.button27.translations: #override<Btn1Down>,<Btn1Up>:digit(1)unset()
-XCalc*hp.button28.label:       2
-XCalc*hp.button28.translations: #override<Btn1Down>,<Btn1Up>:digit(2)unset()
-XCalc*hp.button29.label:       3
-XCalc*hp.button29.translations: #override<Btn1Down>,<Btn1Up>:digit(3)unset()
-XCalc*hp.button30.label:       -
-XCalc*hp.button30.translations: #override<Btn1Down>,<Btn1Up>:subtract()unset()
-
-XCalc*hp.button31.label:       ON
-XCalc*hp.button31.translations: #override<Btn1Down>,<Btn1Up>:off()unset()\n\
-       <Btn3Down>,<Btn3Up>:quit()
-XCalc*hp.button32.label:       DRG
-XCalc*hp.button32.translations: #override<Btn1Down>,<Btn1Up>:degree()unset()
-XCalc*hp.button33.label:       INV
-XCalc*hp.button33.translations: #override<Btn1Down>,<Btn1Up>:inverse()unset()
-XCalc*hp.button34.label:       STO
-XCalc*hp.button34.translations: #override<Btn1Down>,<Btn1Up>:store()unset()
-XCalc*hp.button35.label:       RCL
-XCalc*hp.button35.translations: #override<Btn1Down>,<Btn1Up>:recall()unset()
-XCalc*hp.button36.label:       0
-XCalc*hp.button36.translations: #override<Btn1Down>,<Btn1Up>:digit(0)unset()
-XCalc*hp.button37.label:       .
-XCalc*hp.button37.translations: #override<Btn1Down>,<Btn1Up>:decimal()unset()
-XCalc*hp.button38.label:       SUM
-XCalc*hp.button38.translations: #override<Btn1Down>,<Btn1Up>:sum()unset()
-XCalc*hp.button39.label:       +
-XCalc*hp.button39.translations: #override<Btn1Down>,<Btn1Up>:add()unset()
-
-XCalc*hp.button1.horizDistance:        4
-XCalc*hp.button1.vertDistance: 12
-XCalc*hp.button1.fromVert:     bevel
-XCalc*hp.button2.fromHoriz:    button1
-XCalc*hp.button2.fromVert:     bevel
-XCalc*hp.button2.vertDistance: 12
-XCalc*hp.button3.fromHoriz:    button2
-XCalc*hp.button3.fromVert:     bevel
-XCalc*hp.button3.vertDistance: 12
-XCalc*hp.button4.fromHoriz:    button3
-XCalc*hp.button4.fromVert:     bevel
-XCalc*hp.button4.vertDistance: 12
-XCalc*hp.button5.fromHoriz:    button4
-XCalc*hp.button5.fromVert:     bevel
-XCalc*hp.button5.vertDistance: 12
-XCalc*hp.button6.fromHoriz:    button5
-XCalc*hp.button6.fromVert:     bevel
-XCalc*hp.button6.vertDistance: 12
-XCalc*hp.button7.fromHoriz:    button6
-XCalc*hp.button7.fromVert:     bevel
-XCalc*hp.button7.vertDistance: 12
-XCalc*hp.button8.fromHoriz:    button7
-XCalc*hp.button8.fromVert:     bevel
-XCalc*hp.button8.vertDistance: 12
-XCalc*hp.button9.fromHoriz:    button8
-XCalc*hp.button9.fromVert:     bevel
-XCalc*hp.button9.vertDistance: 12
-XCalc*hp.button10.fromHoriz:   button9
-XCalc*hp.button10.fromVert:    bevel
-XCalc*hp.button10.vertDistance:        12
-
-XCalc*hp.button11.horizDistance:       4
-XCalc*hp.button11.fromVert:            button1
-XCalc*hp.button12.fromHoriz:           button11
-XCalc*hp.button12.fromVert:            button2
-XCalc*hp.button13.fromHoriz:           button12
-XCalc*hp.button13.fromVert:            button3
-XCalc*hp.button14.fromHoriz:           button13
-XCalc*hp.button14.fromVert:            button4
-XCalc*hp.button15.fromHoriz:           button14
-XCalc*hp.button15.fromVert:            button5
-XCalc*hp.button16.fromHoriz:           button15
-XCalc*hp.button16.fromVert:            button6
-XCalc*hp.button17.fromHoriz:           button16
-XCalc*hp.button17.fromVert:            button7
-XCalc*hp.button18.fromHoriz:           button17
-XCalc*hp.button18.fromVert:            button8
-XCalc*hp.button19.fromHoriz:           button18
-XCalc*hp.button19.fromVert:            button9
-XCalc*hp.button20.fromHoriz:           button19
-XCalc*hp.button20.fromVert:            button10
-
-XCalc*hp.button21.horizDistance:       4
-XCalc*hp.button21.fromVert:            button11
-XCalc*hp.button22.fromHoriz:           button21
-XCalc*hp.button22.fromVert:            button12
-XCalc*hp.button23.fromHoriz:           button22
-XCalc*hp.button23.fromVert:            button13
-XCalc*hp.button24.fromHoriz:           button23
-XCalc*hp.button24.fromVert:            button14
-XCalc*hp.button25.fromHoriz:           button24
-XCalc*hp.button25.fromVert:            button15
-XCalc*hp.button26.fromHoriz:           button25
-XCalc*hp.button26.fromVert:            button16
-XCalc*hp.button26.font:                        6x12
-XCalc*hp.button26.height:              56
-XCalc*hp.button27.fromHoriz:           button26
-XCalc*hp.button27.fromVert:            button17
-XCalc*hp.button28.fromHoriz:           button27
-XCalc*hp.button28.fromVert:            button18
-XCalc*hp.button29.fromHoriz:           button28
-XCalc*hp.button29.fromVert:            button19
-XCalc*hp.button30.fromHoriz:           button29
-XCalc*hp.button30.fromVert:            button20
-
-XCalc*hp.button31.horizDistance:       4
-XCalc*hp.button31.fromVert:            button21
-XCalc*hp.button32.fromHoriz:           button31
-XCalc*hp.button32.fromVert:            button22
-XCalc*hp.button33.fromHoriz:           button32
-XCalc*hp.button33.fromVert:            button23
-XCalc*hp.button34.fromHoriz:           button33
-XCalc*hp.button34.fromVert:            button24
-XCalc*hp.button35.fromHoriz:           button34
-XCalc*hp.button35.fromVert:            button25
-XCalc*hp.button36.fromHoriz:           button26
-XCalc*hp.button36.fromVert:            button27
-XCalc*hp.button37.fromHoriz:           button36
-XCalc*hp.button37.fromVert:            button28
-XCalc*hp.button38.fromHoriz:           button37
-XCalc*hp.button38.fromVert:            button29
-XCalc*hp.button39.fromHoriz:           button38
-XCalc*hp.button39.fromVert:            button30
diff --git a/xcalc/app-defaults/XCalc-color b/xcalc/app-defaults/XCalc-color
deleted file mode 100644 (file)
index 6b26604..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-#include "XCalc"
-
-XCalc*ti.backgroundPixmap:             gray3?foreground=gray70&background=gray85
-XCalc*.bevel.background:               gray80
-XCalc*.bevel.displayList:              foreground gray90;lines -1,0,0,0,0,-1;lines 3,-4,-4,-4,-4,3
-
-XCalc*.bevel.borderColor:              gray60
-XCalc*.bevel.borderWidth:              1
-XCalc*.bevel.vertDistance:             4
-XCalc*.bevel.defaultDistance:          4
-XCalc*.bevel.screen.vertDistance:      4
-XCalc*.bevel.screen.horizDistance:     4
-XCalc*.bevel.screen*left:              chainLeft
-XCalc*.bevel.screen*right:             chainRight
-XCalc*.bevel.screen*top:               chainTop
-XCalc*.bevel.screen*bottom:            chainBottom
-XCalc*.bevel.screen*background:        rgb:9/a/9
-XCalc*.bevel.screen.borderColor:       gray50
-XCalc*.bevel.screen*LCD.foreground:    gray20
-XCalc*.bevel.screen*INV.vertDistance:  2
-
-!      T e x a s   I n s t r u m e n t s   T I - 3 0
-
-XCalc*ti.Command.shapeStyle:           roundedRectangle
-XCalc*ti.Command.displayList:          foreground rgb:a/b/c;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-
-XCalc*ti.Command.borderColor:          rgb:8/9/a
-XCalc*ti.Command.background:           rgb:c/d/e
-XCalc*ti.Command.foreground:           gray5
-
-XCalc*ti.button20.foreground:          gray5
-XCalc*ti.button20.background:          rgb:e/d/c
-XCalc*ti.button20.displayList:         foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button20.borderColor:         rgb:9/8/7
-
-XCalc*ti.button25.foreground:          gray5
-XCalc*ti.button25.background:          rgb:e/d/c
-XCalc*ti.button25.displayList:         foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button25.borderColor:         rgb:9/8/7
-
-XCalc*ti.button30.foreground:          gray5
-XCalc*ti.button30.background:          rgb:e/d/c
-XCalc*ti.button30.displayList:         foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button30.borderColor:         rgb:9/8/7
-
-XCalc*ti.button35.foreground:          gray5
-XCalc*ti.button35.background:          rgb:e/d/c
-XCalc*ti.button35.displayList:         foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button35.borderColor:         rgb:9/8/7
-
-XCalc*ti.button40.foreground:          gray5
-XCalc*ti.button40.background:          rgb:e/d/c
-XCalc*ti.button40.displayList:         foreground rgb:a/9/8;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button40.borderColor:         rgb:9/8/7
-
-
-
-XCalc*ti.button22.background:          gray95
-XCalc*ti.button22.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button22.borderColor:         gray65
-
-XCalc*ti.button23.background:          gray95
-XCalc*ti.button23.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button23.borderColor:         gray65
-
-XCalc*ti.button24.background:          gray95
-XCalc*ti.button24.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button24.borderColor:         gray65
-
-XCalc*ti.button27.background:          gray95
-XCalc*ti.button27.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button27.borderColor:         gray65
-
-XCalc*ti.button28.background:          gray95
-XCalc*ti.button28.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button28.borderColor:         gray65
-
-XCalc*ti.button29.background:          gray95
-XCalc*ti.button29.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button29.borderColor:         gray65
-
-XCalc*ti.button32.background:          gray95
-XCalc*ti.button32.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button32.borderColor:         gray65
-
-XCalc*ti.button33.background:          gray95
-XCalc*ti.button33.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button33.borderColor:         gray65
-
-XCalc*ti.button34.background:          gray95
-XCalc*ti.button34.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button34.borderColor:         gray65
-
-XCalc*ti.button37.background:          gray95
-XCalc*ti.button37.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button37.borderColor:         gray65
-
-XCalc*ti.button38.background:          gray95
-XCalc*ti.button38.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button38.borderColor:         gray65
-
-XCalc*ti.button39.background:          gray95
-XCalc*ti.button39.displayList:         foreground gray75;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-XCalc*ti.button39.borderColor:         gray65
-
-!      H e w l e t t - P a c k a r d   1 0 C
-
-XCalc*hp.Command.shapeStyle:           roundedRectangle
-XCalc*hp.background:   wheat
-
-XCalc*hp.Command.background:           peru
-XCalc*hp.Command.foreground:           white
-
-! Unused buttons.  (Make invisible.)
-XCalc*hp.button21.background:  wheat
-XCalc*hp.button22.background:  wheat
-
-! ON button
-XCalc*hp.button31.background:  goldenrod
-XCalc*hp.button31.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-!XCalc*hp.button31.foreground: white
-
-! SQRT
-XCalc*hp.button1.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! e^x
-XCalc*hp.button2.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! 10^x
-XCalc*hp.button3.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! y^x
-XCalc*hp.button4.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! 1/c
-XCalc*hp.button5.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! CHS
-XCalc*hp.button6.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! x!
-XCalc*hp.button11.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! pi
-XCalc*hp.button12.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! sin
-XCalc*hp.button13.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! cos
-XCalc*hp.button14.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! tan
-XCalc*hp.button15.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! EEX
-XCalc*hp.button16.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! Rv
-XCalc*hp.button23.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! x:y
-XCalc*hp.button24.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! <-
-XCalc*hp.button25.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! ENTER
-XCalc*hp.button26.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! DRG
-XCalc*hp.button32.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! INV
-XCalc*hp.button33.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! STO
-XCalc*hp.button34.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-!RCL
-XCalc*hp.button35.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-
-! "Operator" keys.
-! Divide key
-XCalc*hp.button10.background:  SteelBlue
-XCalc*hp.button10.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! Multiply key
-XCalc*hp.button20.background:  SteelBlue
-XCalc*hp.button20.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! Minus key
-XCalc*hp.button30.background:  SteelBlue
-XCalc*hp.button30.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! SUM
-XCalc*hp.button38.background:  SteelBlue
-XCalc*hp.button38.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! Plus key
-XCalc*hp.button39.background:  SteelBlue
-XCalc*hp.button39.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-
-! "Number" keys.
-! "7"
-XCalc*hp.button7.background:   white
-XCalc*hp.button7.foreground:   black
-XCalc*hp.button7.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "8"
-XCalc*hp.button8.background:   white
-XCalc*hp.button8.foreground:   black
-XCalc*hp.button8.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "9"
-XCalc*hp.button9.background:   white
-XCalc*hp.button9.foreground:   black
-XCalc*hp.button9.displayList:  foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "4"
-XCalc*hp.button17.background:  white
-XCalc*hp.button17.foreground:  black
-XCalc*hp.button17.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "5"
-XCalc*hp.button18.background:  white
-XCalc*hp.button18.foreground:  black
-XCalc*hp.button18.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "6"
-XCalc*hp.button19.background:  white
-XCalc*hp.button19.foreground:  black
-XCalc*hp.button19.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "1"
-XCalc*hp.button27.background:  white
-XCalc*hp.button27.foreground:  black
-XCalc*hp.button27.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "2"
-XCalc*hp.button28.background:  white
-XCalc*hp.button28.foreground:  black
-XCalc*hp.button28.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "3"
-XCalc*hp.button29.background:  white
-XCalc*hp.button29.foreground:  black
-XCalc*hp.button29.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "0"
-XCalc*hp.button36.background:  white
-XCalc*hp.button36.foreground:  black
-XCalc*hp.button36.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
-! "."
-XCalc*hp.button37.background:  white
-XCalc*hp.button37.foreground:  black
-XCalc*hp.button37.displayList: foreground rgb:b/b/b;segments 8,-4,-9,-4,-4,-9,-4,8;draw-arc -14,-14,-4,-4,270,90
diff --git a/xcalc/math.c b/xcalc/math.c
deleted file mode 100644 (file)
index 9719492..0000000
+++ /dev/null
@@ -1,944 +0,0 @@
-/* $XConsortium: math.c,v 1.17 91/07/25 17:51:34 rws Exp $
- * $MIT: contrib/programs/xcalc/math.c,v 3.2 1999/12/14 18:53:00 gjcoram Exp$
- * $XFree86: xc/programs/xcalc/math.c,v 1.5tsi Exp $ 
- * $XdotOrg: xc/programs/xcalc/math.c,v 1.3 2004/05/23 20:03:49 alanc Exp $
- *
- *  math.c  -  mathematics functions for a hand calculator under X
- *
- *  Author:    John H. Bradley, University of Pennsylvania
- *                (bradley@cis.upenn.edu)
- *                     March, 1987
- *
- *  RPN mode added and port to X11 by Mark Rosenstein, MIT Project Athena
- *
- *  Modified to be a client of the Xt toolkit and the Athena widget set by
- *  Donna Converse, MIT X Consortium.  This is all that remains of the 
- *  original calculator, and it still needs to be rewritten.  The HP
- *  functionality should be separated from the TI functionality. 
- *  Beware the HP functions: there are still errors here.
- *
- *  Geoffrey Coram fixed most of the HP mode bugs.
- */
-
-#include "xcalc.h"
-
-#ifdef _CRAY           /* kludge around Cray STDC compiler */
-double (*log_p)() = log;
-#define log ((*log_p))
-double (*exp_p)() = exp;
-#define exp ((*exp_p))
-double (*sqrt_p)() = sqrt;
-#define sqrt ((*sqrt_p))
-double (*log10_p)() = log10;
-#define log10 ((*log10_p))
-double (*atan2_p)() = atan2;
-#define atan2 ((*atan2_p))
-double (*asin_p)() = asin;
-#define asin ((*asin_p))
-double (*acos_p)() = acos;
-#define acos ((*acos_p))
-double (*atan_p)() = atan;
-#define atan ((*atan_p))
-double (*sin_p)() = sin;
-#define sin ((*sin_p))
-double (*cos_p)() = cos;
-#define cos ((*cos_p))
-double (*tan_p)() = tan;
-#define tan ((*tan_p))
-double (*pow_p)() = pow;
-#define pow ((*pow_p))
-#endif /* _CRAY */
-
-#ifndef PI             /* sometimes defined in math.h */
-#define PI          3.14159265358979
-#endif
-#define E           2.71828182845904
-#define MAXDISP     11
-#define DEG 0          /* DRG mode.  used for trig calculations */
-#define RAD 1
-#define GRAD 2
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#define max(a,b) ((a) > (b) ? (a) : (b))
-#define True   1
-#define False   0
-
-#ifndef IEEE
-jmp_buf env;
-#endif
-
-/* This section is all of the state machine that implements the calculator
- * functions.  Much of it is shared between the infix and rpn modes.
- */
-
-static int flagINV, flagPAREN, flagM, drgmode; /* display flags */
-
-static double drg2rad=PI/180.0;  /* Conversion factors for trig funcs */
-static double rad2drg=180.0/PI;
-static int entered=1;  /* true if display contains a valid number.
-                          if==2, then use 'dnum', rather than the string
-                          stored in the display.  (for accuracy) 
-                          if==3, then error occurred, only CLR & AC work */
-/* entered seems to be overloaded - dmc */
-static int lift_enabled = 0;   /* for rpn mode only */
-
-static int CLR    =0;  /* CLR clears display.  if 1, clears acc, also */
-static int Dpoint=0;  /* to prevent using decimal pt twice in a # */
-static int clrdisp=1;  /* if true clears display before entering # */
-static int lastop =kCLR;
-static int memop  =kCLR;
-static int exponent=0;
-static double acc =0.0;
-static double dnum=0.0;
-#define XCALC_MEMORY 10
-static double mem[XCALC_MEMORY] = { 0.0 };
-
-static void   DrawDisplay(void);
-static void   PushOp(int op);
-static int    PopOp(void);
-static int    isopempty(void);
-#ifdef DEBUG
-static void   showstack(char *string);
-#endif
-static void   PushNum(double num);
-static double PopNum(void);
-static void   RollNum(int dir);
-static void   ClearStacks(void);
-static int    priority(int op);
-
-/*
- * The following is to deal with the unfortunate assumption that if errno
- * is non-zero then an error has occurred.  On some systems (e.g. Ultrix), 
- * sscanf will call lower level routines that will set errno.
- */
-
-static void
-parse_double (char *src, char *fmt, double *dp)
-{
-    int olderrno = errno;
-
-    (void) sscanf (src, fmt, dp);
-    errno = olderrno;
-    return;
-}
-
-
-/*********************************/
-int pre_op(int keynum)
-{
-    if (keynum==-1) return(0);
-    errno = 0;                 /* for non-IEEE machines */
-
-    if ( (entered==3) && !(keynum==kCLR || keynum==kOFF)) {
-      if (rpn) {
-       clrdisp++;
-      } else {
-        ringbell();
-        return(1);     /* the intent was probably not to do the operation */
-      }
-    }
-
-    if (keynum != kCLR) CLR=0;
-    return(0);
-}
-
-#ifndef IEEE
-
-/* cannot assign result of setjmp under ANSI C, use global instead */
-static volatile int SignalKind;
-
-void fail_op(void)
-{
-    if (SignalKind == SIGFPE)
-       strcpy(dispstr, "math error");
-    else if (SignalKind == SIGILL)
-       strcpy(dispstr, "illegal operand");
-
-    entered=3;
-    DrawDisplay();
-    return;
-}
-
-/*ARGSUSED*/
-signal_t fperr(int sig)
-{
-#if defined(SYSV) || defined(SVR4) || defined(linux)
-    signal(SIGFPE, fperr);
-#endif
-    SignalKind = sig;
-    longjmp(env,1);
-}
-
-/* for VAX BSD4.3 */
-/*ARGSUSED*/
-signal_t illerr(int sig)
-{
-    /* not reset when caught? */
-    signal(SIGILL, illerr);
-
-    SignalKind = sig;
-    longjmp(env,1);
-}
-
-#endif /* not IEEE */
-
-
-void post_op(void)
-{
-#ifdef DEBUG
-    showstack("\0");
-#endif
-#ifndef IEEE
-    if (errno) {
-        strcpy(dispstr,"error");
-        DrawDisplay();
-        entered=3;
-        errno=0;
-        }
-#endif
-}
-/*-------------------------------------------------------------------------*/
-static void
-DrawDisplay(void)
-{
-    if ((int) strlen(dispstr) > 12) {   /* strip out some decimal digits */
-        char tmp[32];
-        char *estr = index(dispstr,'e');  /* search for exponent part */
-        if (!estr) dispstr[12]='\0';      /* no exp, just trunc. */
-        else {
-            if ((int) strlen(estr) <= 4) 
-                sprintf(tmp,"%.8s",dispstr); /* leftmost 8 chars */
-            else
-                sprintf(tmp,"%.7s",dispstr); /* leftmost 7 chars */
-            strcat (tmp,estr);            /* plus exponent */
-            strcpy (dispstr,tmp);
-            }
-        }
-    draw(dispstr);
-    setflag(XCalc_MEMORY, (flagM));
-    setflag(XCalc_INVERSE, (flagINV));
-    setflag(XCalc_DEGREE, (drgmode==DEG));
-    setflag(XCalc_RADIAN, (drgmode==RAD));
-    setflag(XCalc_GRADAM, (drgmode==GRAD));
-    setflag(XCalc_PAREN, (flagPAREN));
-}
-
-/*-------------------------------------------------------------------------*/
-void
-numeric(int keynum)
-{
-    char       st[2];
-    int                cell = 0;
-
-  flagINV=0;
-
-  if (rpn && (memop == kSTO || memop == kRCL || memop == kSUM)) {
-      switch (keynum) {
-       case kONE:      cell = 1; break;
-       case kTWO:      cell = 2; break;
-       case kTHREE:    cell = 3; break;
-       case kFOUR:     cell = 4; break;
-       case kFIVE:     cell = 5; break;
-       case kSIX:      cell = 6; break;
-       case kSEVEN:    cell = 7; break;
-       case kEIGHT:    cell = 8; break;
-       case kNINE:     cell = 9; break;
-       case kZERO:     cell = 0; break;
-      }
-      switch (memop) {
-      case kSTO:
-       mem[cell] = dnum;
-       lift_enabled = 1;
-       entered = 2;
-       clrdisp++;
-       break;
-      case kRCL:
-       PushNum(dnum);
-       dnum = mem[cell];
-       sprintf(dispstr, "%.8g", dnum);
-       lift_enabled = 1;
-        entered = 1;
-       clrdisp++;
-       break;
-      case kSUM:
-       mem[cell] += dnum;
-       lift_enabled = 1;
-       entered = 2;
-       clrdisp++;
-       break;
-      }
-      memop = kCLR;
-      DrawDisplay();
-      return;
-  }
-
-  if (clrdisp) {
-    dispstr[0]='\0';
-    exponent=Dpoint=0;
-/*    if (rpn && entered==2)
-      PushNum(dnum);
- */
-    if (rpn & lift_enabled)
-       PushNum(dnum);
-  }
-  if ((int) strlen(dispstr) >= MAXDISP)
-    return;
-    
-    switch (keynum){
-      case kONE:       st[0] = '1'; break;
-      case kTWO:       st[0] = '2'; break;
-      case kTHREE:     st[0] = '3'; break;
-      case kFOUR:      st[0] = '4'; break;
-      case kFIVE:      st[0] = '5'; break;
-      case kSIX:       st[0] = '6'; break;
-      case kSEVEN:     st[0] = '7'; break;
-      case kEIGHT:     st[0] = '8'; break;
-      case kNINE:      st[0] = '9'; break;
-      case kZERO:      st[0] = '0'; break;
-    }
-    st[1] = '\0';
-    strcat(dispstr,st);
-
-  DrawDisplay();
-  if (clrdisp && keynum != kZERO)
-    clrdisp=0; /*no leading 0s*/
-  memop = keynum;
-  entered=1;
-  lift_enabled = 0;
-}
-
-void
-bkspf(void)
-{
-
-  lift_enabled = 0;
-
-  if (! flagINV)
-  {
-      if (entered!=1) {
-         clearf();
-         return;
-      }
-      if (clrdisp)
-         return;
-      if ((int) strlen(dispstr) > 0) {
-#ifndef X_LOCALE
-          const char *dp = localeconv()->decimal_point;
-          size_t dp_len = strlen(dp);
-          size_t ds_len = strlen(dispstr);
-          if (ds_len >= dp_len && strcmp(dispstr + ds_len - dp_len, dp) == 0)
-             Dpoint=0;
-#else
-         if (dispstr[strlen(dispstr)-1] == '.')
-             Dpoint=0;
-#endif   
-         dispstr[strlen(dispstr)-1] = 0;
-      }
-      if (strlen(dispstr) == 0) {
-         strcat(dispstr, "0");
-         clrdisp++;
-      }
-  }
-  else
-  {
-      strcpy(dispstr, "0");
-      dnum = 0.0;
-      clrdisp++;
-      flagINV = 0;
-  }
-  DrawDisplay();
-}
-
-void
-decf(void)
-{
-  flagINV=0;
-  if (clrdisp) {
-      if (rpn && lift_enabled)
-       PushNum(dnum);
-      strcpy(dispstr,"0");
-  }
-  if (!Dpoint) {
-#ifndef X_LOCALE
-    strcat(dispstr, localeconv()->decimal_point);
-#else
-    strcat(dispstr, ".");
-#endif
-    DrawDisplay();
-    Dpoint++;
-  }
-  clrdisp=0;
-  entered=1;
-}
-
-void
-eef(void)
-{
-  flagINV=0;
-  if (clrdisp) {
-      if (rpn && lift_enabled)
-       PushNum(dnum);
-      strcpy(dispstr, rpn ? "1" : "0");
-  }
-  if (!exponent) {
-    strcat(dispstr,"E+");
-    DrawDisplay();
-    exponent=strlen(dispstr)-1;  /* where the '-' goes */
-  }
-  clrdisp=0;
-  entered=1;
-}
-
-void
-clearf(void)
-{
-  flagINV=0;
-  if (CLR && !rpn) { /* clear all */
-    ClearStacks();
-    flagPAREN=0;
-  }
-  CLR++;
-  exponent=Dpoint=0;
-  clrdisp=1;
-  entered=1;
-  strcpy(dispstr,"0");
-  DrawDisplay();
-}
-
-void
-negf(void)
-{
-  flagINV=0;
-  if (exponent) {       /* neg the exponent */
-    if (dispstr[exponent]=='-')
-      dispstr[exponent]='+';
-    else
-      dispstr[exponent]='-';
-    DrawDisplay();
-    return;
-  }
-
-  if (strcmp("0",dispstr)==0)
-    return;                    /* don't neg a zero */
-  if (dispstr[0]=='-')         /* already neg-ed */
-    strcpy(dispstr,dispstr+1);  /* move str left once */
-  else {                       /* not neg-ed.  add a '-' */
-    char tmp[32];
-    sprintf(tmp,"-%s",dispstr);
-    strcpy(dispstr,tmp);
-  }
-  if (entered==2)
-    dnum = -1.0 * dnum;
-  DrawDisplay();
-}
-
-/* Two operand functions for infix calc */
-void
-twoop(int keynum)
-{
-  if (flagINV) {
-    flagINV=0;
-    DrawDisplay();
-  }
-
-  if (!entered) {              /* something like "5+*" */
-    if (!isopempty())
-      (void) PopOp();                  /* replace the prev op */
-    PushOp(keynum);            /* with the new one */
-    return;
-  }
-  
-  if (entered==1)
-    parse_double(dispstr,"%lf",&dnum);
-
-  clrdisp=CLR=1;
-  entered=Dpoint=exponent=0;
-
-  if (!isopempty()) {  /* there was a previous op */
-    lastop=PopOp();   /* get it */
-
-    if (lastop==kLPAR) {  /* put it back */
-      PushOp(kLPAR);
-      PushOp(keynum);
-      PushNum(dnum);
-      return;
-    }
-
-    /* now, if the current op (keynum) is of
-       higher priority than the lastop, the current
-       op and number are just pushed on top 
-       Priorities:  (Y^X) > *,/ > +,- */
-    
-    if (priority(keynum) > priority(lastop)) {
-      PushNum(dnum);
-      PushOp(lastop);
-      PushOp(keynum);
-    } else {  /* execute lastop on lastnum and dnum, push
-              result and current op on stack */
-      acc=PopNum();
-      switch (lastop) { /* perform the operation */
-      case kADD: acc += dnum;  break;
-      case kSUB: acc -= dnum;  break;
-      case kMUL: acc *= dnum;  break;
-      case kDIV: acc /= dnum;  break;
-      case kPOW: acc =  pow(acc,dnum);  break;
-       }
-      PushNum(acc);
-      PushOp(keynum);
-      sprintf(dispstr,"%.8g",acc);
-      DrawDisplay();
-      dnum=acc;
-    }
-  }
-  else { /* op stack is empty, push op and num */
-    PushOp(keynum);
-    PushNum(dnum);
-  } 
-}                      
-
-/* Two operand functions for rpn calc */
-void
-twof(int keynum)
-{
-  if (flagINV) {
-    flagINV=0;
-    DrawDisplay();
-  }
-  if (!entered)
-    return;
-  if (entered==1)
-    parse_double(dispstr, "%lf", &dnum);
-  acc = PopNum();
-  switch(keynum) {
-  case kADD: acc += dnum;  break;
-  case kSUB: acc -= dnum;  break;
-  case kMUL: acc *= dnum;  break;
-  case kDIV: acc /= dnum;  break;
-  case kPOW: acc =  pow(acc,dnum);  break;
-  case kXXY: PushNum(dnum);
-  }
-  sprintf(dispstr, "%.8g", acc);
-  DrawDisplay();
-  clrdisp++;
-  Dpoint = exponent = 0;
-  entered = 2;
-  lift_enabled = 1;
-  dnum = acc;
-}
-
-void
-entrf(void)
-{
-  flagINV=0;
-  if (!entered)
-    return;
-
-  clrdisp=CLR=1;
-  Dpoint=exponent=0;
-
-  if (entered==1)
-    parse_double(dispstr,"%lf",&dnum);
-  entered=2;
-  memop = kENTR;
-  PushNum(dnum);
-  lift_enabled = 0;
-}
-
-void
-equf(void)
-{
-  flagINV=0;
-  if (!entered)
-    return;
-
-  clrdisp=CLR=1;
-  Dpoint=exponent=0;
-
-  if (entered==1)
-    parse_double(dispstr,"%lf",&dnum);
-  entered=2;
-
-  PushNum(dnum);
-
-  while (!isopempty()) {  /* do all pending ops */
-    dnum=PopNum();
-    acc=PopNum();
-    lastop=PopOp();
-    switch (lastop) {
-    case kADD:  acc += dnum;
-               break;
-    case kSUB:  acc -= dnum;
-               break;
-    case kMUL:  acc *= dnum;
-               break;
-    case kDIV:  acc /= dnum;
-               break;
-    case kPOW:  acc = pow(acc,dnum);
-               break;
-    case kLPAR:        flagPAREN--;
-               PushNum(acc);
-               break;
-    }
-    dnum=acc;
-    PushNum(dnum);
-  }
-
-  sprintf(dispstr,"%.8g",dnum);
-  DrawDisplay();
-}
-        
-void
-lparf(void)
-{
-  flagINV=0;
-  PushOp(kLPAR);
-  flagPAREN++;
-  DrawDisplay();
-}
-
-void
-rollf(void)
-{
-  if (!entered)
-    return;
-  if (entered==1)
-    parse_double(dispstr, "%lf", &dnum);
-  entered = 2;
-  lift_enabled = 1;
-  RollNum(flagINV);
-  flagINV=0;
-  clrdisp++;
-  sprintf(dispstr, "%.8g", dnum);
-  DrawDisplay();
-}
-
-void
-rparf(void)
-{
-  flagINV=0;
-  if (!entered)
-    return;
-
-  if (!flagPAREN)
-    return;
-  
-  clrdisp++;
-  Dpoint=exponent=0;
-
-  if (entered==1)
-    parse_double(dispstr,"%lf",&dnum);
-  entered=2;
-
-  PushNum(dnum);
-  while (!isopempty() && (lastop=PopOp())!=kLPAR) {
-    /* do all pending ops, back to left paren */
-    dnum=PopNum();
-    acc=PopNum();
-    switch (lastop) {
-    case kADD:  acc += dnum;
-               break;
-    case kSUB:  acc -= dnum;
-               break;
-    case kMUL:  acc *= dnum;
-               break;
-    case kDIV:  acc /= dnum;
-               break;
-    case kPOW:  acc = pow(acc,dnum);
-               break;
-    }
-    dnum=acc;
-    PushNum(dnum);
-  }
-  (void) PopNum();
-  flagPAREN--;
-  entered=2;
-  sprintf(dispstr,"%.8g",dnum);
-  DrawDisplay();
-}
-
-void
-drgf(void)
-{
-  if (flagINV) {
-    if (entered==1)
-      parse_double(dispstr,"%lf",&dnum);
-    switch (drgmode) {
-    case DEG:  dnum=dnum*PI/180.0;    break;
-    case RAD:  dnum=dnum*200.0/PI;    break;
-    case GRAD: dnum=dnum*90.0/100.0;  break;
-    }
-    entered=2;
-    clrdisp=1;
-    flagINV=0;
-    sprintf(dispstr,"%.8g",dnum);
-  }
-                         
-  flagINV=0;
-  drgmode = (drgmode + 1) % 3;
-  switch (drgmode) {
-  case DEG:  drg2rad=PI / 180.0;
-            rad2drg=180.0 / PI;
-            break;
-  case RAD:  drg2rad=1.0;
-            rad2drg=1.0;
-            break;
-  case GRAD: drg2rad=PI / 200.0;
-            rad2drg=200.0 / PI;
-            break;
-  }
-  DrawDisplay();
-}
-
-void
-invf(void)
-{
-  flagINV = ~flagINV;
-  DrawDisplay();
-}
-
-void
-memf(int keynum)
-{
-    memop = keynum;
-    if (entered==1)
-      parse_double(dispstr,"%lf",&dnum);
-    entered = 2;
-    clrdisp++;
-    lift_enabled = 0;
-}
-
-void
-oneop(int keynum)
-{
-  int i,j;
-  double dtmp;
-
-  if (entered==1)
-    parse_double(dispstr,"%lf",&dnum);
-  entered = 2;
-
-  switch (keynum) {  /* do the actual math fn. */
-  case kE:     if (rpn && memop != kENTR) PushNum(dnum); dnum=E;  break;
-  case kPI:    if (rpn && memop != kENTR) PushNum(dnum); dnum=PI;  break;
-  case kRECIP: dnum=1.0/dnum;  break;
-  case kSQR:   flagINV = !flagINV; /* fall through to */
-  case kSQRT:  if (flagINV) dnum=dnum*dnum;
-              else dnum=sqrt(dnum);
-              break;
-  case k10X:   flagINV = !flagINV; /* fall through to */
-  case kLOG:   if (flagINV) dnum=pow(10.0,dnum);
-              else dnum=log10(dnum);
-              break;
-  case kEXP:   flagINV = !flagINV; /* fall through to */
-  case kLN:    if (flagINV) dnum=exp(dnum);
-              else dnum=log(dnum);
-              break;
-  case kSIN:   if (flagINV) dnum=asin(dnum)*rad2drg;
-              else dnum=sin(dnum*drg2rad);
-              break;
-  case kCOS:   if (flagINV) dnum=acos(dnum)*rad2drg;
-              else dnum=cos(dnum*drg2rad);
-              break;
-  case kTAN:   if (flagINV) dnum=atan(dnum)*rad2drg;
-              else dnum=tan(dnum*drg2rad);
-              break;
-  case kSTO:   mem[0]=dnum;  flagM=!(mem[0]==0.0);  break;
-  case kRCL:   if (rpn && lift_enabled) PushNum(dnum);
-               dnum=mem[0];  flagM=!(mem[0]==0.0);  break;
-  case kSUM:   mem[0]+=dnum; flagM=!(mem[0]==0.0);  break;
-  case kEXC:   dtmp=dnum; dnum=mem[0];  mem[0]=dtmp;
-              flagM=!(mem[0]==0.0);  break;
-  case kFACT:  if (floor(dnum)!=dnum || dnum<0.0 || dnum>500.0) {
-                strcpy(dispstr,"error");
-                entered=3;
-                break;
-              }
-              dtmp = floor(dnum); i = dtmp;
-              for (j=1,dnum=1.0; j<=i; j++) 
-                dnum*=(float) j;
-              break;
-  }
-  
-  if (entered==3) {  /* error */
-    DrawDisplay();
-    return;
-  }
-
-  memop = keynum;
-  entered=2;
-  clrdisp=1;
-  flagINV=0;
-  lift_enabled = 1;
-  sprintf(dispstr,"%.8g",dnum);
-  DrawDisplay();
-}
-
-void
-offf(void)
-{
-  /* full reset */
-  int i;
-  ResetCalc();
-  entered=clrdisp=1;
-  lift_enabled = 0;
-  dnum=mem[0]=0.0;
-  if (rpn)
-      for (i=1; i < XCALC_MEMORY; i++)
-         mem[i]=0.0;
-  exponent=Dpoint=0;
-  DrawDisplay();
-}
-
-
-#define STACKMAX 32
-static int opstack[STACKMAX];
-static int opsp;
-static double numstack[STACKMAX];
-static int numsp;
-
-
-/*******/
-static void
-PushOp(int op)
-/*******/
-{
-  if (opsp==STACKMAX) {strcpy(dispstr,"stack error");  entered=3;}
-  else opstack[opsp++]=op;
-}
-
-/*******/
-static int
-PopOp(void)
-/*******/
-{
-  if (opsp==0) {
-      strcpy(dispstr,"stack error");
-      entered=3;
-      return(kNOP);
-  } else
-    return(opstack[--opsp]);
-}
-
-/*******/
-static int
-isopempty(void)
-/*******/
-{
-  return( opsp ? 0 : 1 );
-}
-
-#ifdef DEBUG
-static void
-showstack(char *string)
-{
-    fprintf(stderr, "%s: %lf %lf %lf\n", string, numstack[0], numstack[1],
-           numstack[2]);
-}
-#endif
-
-/*******/
-static void
-PushNum(double num)
-/*******/
-{
-  if (rpn) {
-      numstack[2] = numstack[1];
-      numstack[1] = numstack[0];
-      numstack[0] = num;
-      return;
-  }
-  if (numsp==STACKMAX) {
-      strcpy(dispstr,"stack error");
-      entered=3;
-  } else
-    numstack[numsp++]=num;
-}
-
-/*******/
-static double
-PopNum(void)
-/*******/
-{
-    if (rpn) {
-       double tmp = numstack[0];
-       numstack[0] = numstack[1];
-       numstack[1] = numstack[2];
-       return(tmp);
-    }
-    if (numsp==0) {
-       strcpy(dispstr,"stack error");
-       entered=3;
-       return 0.0;
-    } else
-      return(numstack[--numsp]);
-}
-
-/*******/
-static void
-RollNum(int dir)
-/*******/
-{
-    double tmp;
-
-    if (dir) {                         /* roll up */
-       tmp         = dnum;
-       dnum        = numstack[2];
-       numstack[2] = numstack[1];
-       numstack[1] = numstack[0];
-       numstack[0] = tmp;
-    } else {                           /* roll down */
-       tmp         = dnum;
-       dnum        = numstack[0];
-       numstack[0] = numstack[1];
-       numstack[1] = numstack[2];
-       numstack[2] = tmp;
-    }
-}
-
-
-/*******/
-static void
-ClearStacks(void)
-/*******/
-{
-    if (rpn)
-      numstack[0] = numstack[1] = numstack[2] = 0.;
-    opsp=numsp=0;
-}
-
-
-/*******/
-static int
-priority(int op)
-/*******/
-{
-    switch (op) {
-        case kPOW: return(2);
-        case kMUL:
-        case kDIV: return(1);
-        case kADD:
-        case kSUB: return(0);
-        }
-    return 0;
-}
-
-
-/********/
-void
-ResetCalc(void)
-/********/
-{
-    flagM=flagINV=flagPAREN=0;  drgmode=DEG;
-    setflag(XCalc_MEMORY, False);
-    setflag(XCalc_INVERSE, False);
-    setflag(XCalc_PAREN, False);
-    setflag(XCalc_RADIAN, False);
-    setflag(XCalc_GRADAM, False);
-    setflag(XCalc_DEGREE, True);
-    strcpy(dispstr,"0");
-    draw(dispstr);
-    ClearStacks();
-    drg2rad=PI/180.0;
-    rad2drg=180.0/PI;
-}
diff --git a/xcalc/xcalc.c b/xcalc/xcalc.c
deleted file mode 100644 (file)
index 0796448..0000000
+++ /dev/null
@@ -1,373 +0,0 @@
-/* $XConsortium: xcalc.c,v 1.16 94/04/17 20:43:31 converse Exp $ */
-/*
-
-Copyright (c) 1989  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86$ */
-
-/*
- * xcalc.c  -  a hand calculator for the X Window system
- *
- *  Original Author:  John H. Bradley, University of Pennsylvania
- *                     (bradley@cis.upenn.edu)  March, 1987
- *  RPN mode added and port to X11 by Mark Rosenstein, MIT Project Athena
- *  Rewritten to be an Xaw and Xt client by Donna Converse, MIT X Consortium
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <signal.h>
-#include <X11/Xatom.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/cursorfont.h>
-#include "xcalc.h"
-
-static Boolean convert(Widget w, Atom *selection, Atom *target, Atom *type,
-                      XtPointer *value, unsigned long *length, int *format);
-static void create_keypad(Widget parent);
-static void create_display(Widget parent);
-static void create_calculator(Widget shell);
-static void done(Widget w, Atom *selection, Atom *target);
-static void lose(Widget w, Atom *selection);
-static void Syntax(int argc, char **argv);
-
-/*
- *     global data
- */
-int    rpn = 0;                /* Reverse Polish Notation (HP mode) flag */
-char   dispstr[LCD_STR_LEN];           /* string to show up in the LCD */
-Atom   wm_delete_window;               /* see ICCCM section 5.2.2 */
-
-/*
- *     local data 
- */
-static Display *dpy = NULL;            /* connection to the X server */
-static Widget  toplevel=NULL;          /* top level shell widget */
-static Widget   calculator=NULL;       /* an underlying form widget */
-static Widget  LCD = NULL;             /* liquid crystal display */
-static Widget  ind[6];                 /* mode indicators in the screen */
-static char    selstr[LCD_STR_LEN]; /* storage for selections from the LCD */
-                                       /* checkerboard used in mono mode */
-static XtAppContext xtcontext;         /* Toolkit application context */
-#define check_width 16
-#define check_height 16
-static unsigned char check_bits[] = {
-   0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
-   0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa,
-   0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa};
-
-/*     command line options specific to the application */
-static XrmOptionDescRec Options[] = {
-{"-rpn",       "rpn",          XrmoptionNoArg,         (XtPointer)"on"},
-{"-stipple",   "stipple",      XrmoptionNoArg,         (XtPointer)"on"}
-};
-
-/*     resources specific to the application */
-static struct resources {
-    Boolean    rpn;            /* reverse polish notation (HP mode) */
-    Boolean    stipple;        /* background stipple */
-    Cursor     cursor;
-} appResources;
-
-#define offset(field) XtOffsetOf(struct resources, field)
-static XtResource Resources[] = {
-{"rpn",                "Rpn",          XtRBoolean,     sizeof(Boolean),
-     offset(rpn),      XtRImmediate,   (XtPointer) False},
-{"stipple",    "Stipple",      XtRBoolean,     sizeof(Boolean),
-     offset(stipple),  XtRImmediate,   (XtPointer) False},
-{"cursor",     "Cursor",       XtRCursor,      sizeof(Cursor),
-     offset(cursor),   XtRCursor,      (XtPointer)NULL}
-};
-#undef offset
-
-
-int
-main(int argc, char **argv)
-{
-    Arg                args[3];
-
-    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
-
-    toplevel = XtAppInitialize(&xtcontext, "XCalc", Options, XtNumber(Options),
-                              &argc, argv, NULL, NULL, 0);
-    if (argc != 1) Syntax(argc, argv);
-    
-    XtSetArg(args[0], XtNinput, True);
-    XtSetValues(toplevel, args, ONE);
-
-    XtGetApplicationResources(toplevel, (XtPointer)&appResources, Resources,
-                             XtNumber(Resources), (ArgList) NULL, ZERO);
-
-    create_calculator(toplevel);
-
-    XtAppAddActions(xtcontext, Actions, ActionsCount);
-
-    XtOverrideTranslations(toplevel, 
-          XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()\n"));
-
-    XtRealizeWidget(toplevel);
-
-    dpy = XtDisplay(toplevel);
-    wm_delete_window = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
-    (void) XSetWMProtocols(dpy, XtWindow(toplevel), &wm_delete_window, 1);
-    XDefineCursor(dpy, XtWindow(toplevel), appResources.cursor);
-
-    if (appResources.stipple || (CellsOfScreen(XtScreen(toplevel)) <= 2))
-    {
-       Screen  *screen = XtScreen(toplevel);
-       Pixmap  backgroundPix;
-
-       backgroundPix = XCreatePixmapFromBitmapData
-           (dpy, XtWindow(toplevel),
-            (char *)check_bits, check_width, check_height,
-            WhitePixelOfScreen(screen), BlackPixelOfScreen(screen),
-            DefaultDepthOfScreen(screen));
-       XtSetArg(args[0], XtNbackgroundPixmap, backgroundPix);
-       XtSetValues(calculator, args, ONE);
-    }
-
-#ifndef IEEE
-    signal(SIGFPE,fperr);
-    signal(SIGILL,illerr);
-#endif
-    ResetCalc();
-    XtAppMainLoop(xtcontext);
-
-    return 0;
-}
-
-static void create_calculator(Widget shell)
-{
-    rpn = appResources.rpn;
-    calculator = XtCreateManagedWidget(rpn ? "hp" : "ti", formWidgetClass,
-                                      shell, (ArgList) NULL, ZERO);
-    create_display(calculator);
-    create_keypad(calculator);
-    XtSetKeyboardFocus(calculator, LCD);
-}
-
-/*
- *     Do the calculator data display widgets.
- */
-static void create_display(Widget parent)
-{
-    Widget     bevel, screen;
-    static Arg args[] = {
-       {XtNborderWidth, (XtArgVal)0},
-       {XtNjustify, (XtArgVal)XtJustifyRight}
-    };
-
-    /* the frame surrounding the calculator display */
-    bevel = XtCreateManagedWidget("bevel", formWidgetClass, parent,
-                                 (ArgList) NULL, ZERO);
-
-    /* the screen of the calculator */
-    screen = XtCreateManagedWidget("screen", formWidgetClass, bevel,
-                                  (ArgList) NULL, ZERO);
-
-    /* M - the memory indicator */
-    ind[XCalc_MEMORY] = XtCreateManagedWidget("M", labelWidgetClass, screen,
-                                       args, XtNumber(args));
-
-    /* liquid crystal display */
-    LCD = XtCreateManagedWidget("LCD", toggleWidgetClass, screen, args,
-                               XtNumber(args));
-
-    /* INV - the inverse function indicator */
-    ind[XCalc_INVERSE] = XtCreateManagedWidget("INV", labelWidgetClass, 
-                                        screen, args, XtNumber(args));
-
-    /* DEG - the degrees switch indicator */
-    ind[XCalc_DEGREE] = XtCreateManagedWidget("DEG", labelWidgetClass, screen,
-                                       args, XtNumber(args));
-
-    /* RAD - the radian switch indicator */
-    ind[XCalc_RADIAN] = XtCreateManagedWidget("RAD", labelWidgetClass, screen,
-                                       args, XtNumber(args));
-
-    /* GRAD - the grad switch indicator */
-    ind[XCalc_GRADAM] = XtCreateManagedWidget("GRAD", labelWidgetClass, screen,
-                                       args, XtNumber(args));
-
-    /* () - the parenthesis indicator */
-    ind[XCalc_PAREN] = XtCreateManagedWidget("P", labelWidgetClass, screen,
-                                            args, XtNumber(args));
-}
-
-/*
- *     Do all the buttons.  The application defaults file will give the
- *     default button placement, default button labels, and default 
- *      actions connected to the buttons.  The user can change any of 
- *      these defaults in an environment-specific resource file.
- */
-
-static void create_keypad(Widget parent)
-{
-    static char        *Keyboard[] = {
-       "button1", "button2", "button3", "button4", "button5",
-       "button6", "button7", "button8", "button9", "button10",
-       "button11","button12","button13","button14","button15",
-       "button16","button17","button18","button19","button20",
-       "button21","button22","button23","button24","button25",
-       "button26","button27","button28","button29","button30",
-       "button31","button32","button33","button34","button35",
-       "button36","button37","button38","button39","button40"
-       };
-    register int i;
-    int                 n = XtNumber(Keyboard);
-
-    if (appResources.rpn) n--;         /* HP has 39 buttons, TI has 40 */
-
-    for (i=0; i < n; i++)
-       XtCreateManagedWidget(Keyboard[i], commandWidgetClass, parent,
-                             (ArgList) NULL, ZERO);
-}
-
-/*
- *     Miscellaneous utility routines that interact with the widgets.
- */
-
-/*
- *     called by math routines to write to the liquid crystal display.
- */
-void draw(char *string)
-{
-    Arg        args[1];
-
-    XtSetArg(args[0], XtNlabel, string);
-    XtSetValues(LCD, args, ONE);
-}
-/*
- *     called by math routines to turn on and off the display indicators.
- */
-void setflag(int indicator, Boolean on)
-{
-    if (on) XtMapWidget(ind[indicator]);
-    else XtUnmapWidget(ind[indicator]);
-}
-
-/*
- *     ring the bell.
- */
-void ringbell(void)
-{
-    XBell(dpy, 0);
-}
-
-/*
- *     die.
- */
-void Quit(void)
-{
-    XtDestroyApplicationContext(xtcontext);
-    exit(0);
-}
-
-/*  
- *     recite and die.
- */
-static void Syntax(int argc, char **argv)
-{
-    register int i;
-
-    (void) fprintf(stderr, "%s: unknown options:", argv[0]);
-    for (i=1; i <argc; i++)
-       (void) fprintf(stderr, " %s", argv[i]);
-    (void) fprintf(stderr, "\n\n");
-    (void) fprintf(stderr, "Usage:  %s", argv[0]);
-    for (i=0; i < XtNumber(Options); i++)
-       (void) fprintf(stderr, " [%s]", Options[i].option);
-    (void) fprintf(stderr, "\n");
-    XtDestroyApplicationContext(xtcontext);
-    exit(1);
-}
-
-/*    
- * I use actions on the toggle widget to support selections.  This
- * means that the user may not do a partial selection of the number
- * displayed in the `liquid crystal display.'  Copying numbers into
- * the calculator is also not supported.  So all you can do is copy
- * the entire number from the calculator display.
- */
-
-/*ARGSUSED*/
-static Boolean convert(Widget w, Atom *selection, Atom *target, Atom *type,
-                      XtPointer *value, unsigned long *length, int *format)
-{
-    if (*target == XA_STRING)
-    {
-       *type = XA_STRING;
-       *length = strlen(dispstr);
-       strncpy(selstr, dispstr, (int)(*length));
-       *value = selstr;
-       *format = 8;
-       return True;
-    }
-    return False;
-}
-
-/*
- * called when xcalc loses ownership of the selection.
- */
-/*ARGSUSED*/
-static void lose(Widget w, Atom *selection)
-{
-    XawToggleUnsetCurrent(LCD);
-}
-
-/*
- * called when some other client got the selection.
- */
-/*ARGSUSED*/
-static void done(Widget w, Atom *selection, Atom *target)
-{
-    selstr[0] = '\0';
-}
-
-/*
- * called by the selection() action routine, in response to user action.
- */
-void do_select(Time time)
-{
-    Boolean    state;
-    Arg                args[1];
-
-    XtSetArg(args[0], XtNstate, &state);
-    XtGetValues(LCD, args, 1);
-
-    if (state)
-        XtOwnSelection(LCD, XA_PRIMARY, time, convert, lose, done);
-    else
-       selstr[0] = '\0';
-}
diff --git a/xcalc/xcalc.h b/xcalc/xcalc.h
deleted file mode 100644 (file)
index 5020bfe..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/* $XConsortium: xcalc.h,v 1.4 94/04/17 20:43:32 converse Exp $ */
-/*
-
-Copyright (c) 1989  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86$ */
-
-/*
- * xcalc.h - symbolic constants for xcalc
- *
- * Author:  Donna Converse, MIT X Consortium
- */
-
-#ifndef _XCALC_H_
-#define _XCALC_H_
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-
-#include <stdio.h>
-#include <X11/Xos.h>
-#include <math.h>
-#include <signal.h>
-#if !defined(IEEE) && defined(SVR4)
-#include <siginfo.h>
-#endif
-#include <setjmp.h>
-#include <errno.h>
-#include <X11/Xlocale.h>
-
-
-#ifdef SIGNALRETURNSINT
-#define signal_t int
-#else
-#define signal_t void
-#endif
-
-#define kRECIP 0       /* reciprocal */
-#define kSQR   1       /* square */
-#define kSQRT  2       /* square root */
-#define kCLR   3       /* clear */
-#define kOFF   4       /* clear and quit */
-#define kINV   5       /* inverse */
-#define kSIN   6       /* sine */
-#define kCOS   7       /* cosine */
-#define kTAN   8       /* tangent */
-#define kDRG   9       /* degree radian grad */
-#define kE     10      /* the natural number e */
-#define kEE    11      /* scientific notation */
-#define kLOG   12      /* logarithm */
-#define kLN    13      /* natural logarithm */
-#define kPOW   14      /* power */
-#define kPI    15      /* pi */
-#define kFACT  16      /* factorial */
-#define kLPAR  17      /* left paren */
-#define kRPAR  18      /* right paren */
-#define kDIV   19      /* division */
-#define kSTO   20      /* store */
-#define kSEVEN 21      /* 7 */
-#define kEIGHT 22      /* 8 */
-#define kNINE  23      /* 9 */
-#define kMUL   24      /* multiplication */
-#define kRCL   25      /* recall */
-#define kFOUR  26      /* 4 */
-#define kFIVE  27      /* 5 */
-#define kSIX   28      /* 6 */
-#define kSUB   29      /* subtraction */
-#define kSUM   30      /* summation */
-#define kONE   31      /* 1 */
-#define kTWO   32      /* 2 */
-#define kTHREE 33      /* 3 */
-#define kADD   34      /* addition */
-#define kEXC   35      /* exchange display and memory */
-#define kZERO  36      /* 0 */
-#define kDEC   37      /* decimal point */
-#define kNEG   38      /* negation */
-#define kEQU   39      /* equals */
-#define kENTR  40      /* enter */
-#define kXXY   41      /* exchange X and Y registers */
-#define kEXP   42      /* exponent */
-#define k10X   43      /* 10 raised to a power */
-#define kROLL  44      /* roll stack */
-#define kNOP   45      /* no operation */
-#define kBKSP  46      /* backspace */
-
-#define XCalc_MEMORY   0       /* memory indicator */
-#define XCalc_INVERSE   1      /* inverse function indicator */
-#define XCalc_DEGREE   2       /* degree indicator */
-#define XCalc_RADIAN   3       /* radian indicator */
-#define XCalc_GRADAM   4       /* grad indicator */
-#define XCalc_PAREN    5       /* parenthesis indicator */
-
-/* actions.c */
-extern XtActionsRec Actions[];
-extern int ActionsCount;
-
-/* math.c */
-extern signal_t fperr(int sig);
-extern signal_t illerr(int sig);
-extern void fail_op(void);
-extern int pre_op(int keynum);
-extern void post_op(void);
-
-extern void numeric(int keynum);
-extern void bkspf(void);
-extern void decf(void);
-extern void eef(void);
-extern void clearf(void);
-extern void negf(void);
-extern void twoop(int keynum);
-extern void twof(int keynum);
-extern void entrf(void);
-extern void equf(void);
-extern void lparf(void);
-extern void rollf(void);
-extern void rparf(void);
-extern void drgf(void);
-extern void invf(void);
-extern void memf(int keynum);
-extern void oneop(int keynum);
-extern void offf(void);
-extern void ResetCalc(void);
-
-#ifndef IEEE
-extern jmp_buf env;
-#endif
-
-/* xcalc.c */
-extern void do_select(Time time);
-extern void draw(char *string);
-extern void Quit(void);
-extern void ringbell(void);
-extern void setflag(int indicator, Boolean on);
-
-extern int rpn;
-#define LCD_STR_LEN    32
-extern char dispstr[LCD_STR_LEN];
-extern Atom wm_delete_window;
-
-#endif
diff --git a/xcalc/xcalc.man b/xcalc/xcalc.man
deleted file mode 100644 (file)
index 14d856e..0000000
+++ /dev/null
@@ -1,440 +0,0 @@
-.\" $XConsortium: xcalc.man,v 1.10 94/04/17 20:43:32 matt Exp $
-.\" $XdotOrg: $
-.\" Copyright (c) 1994  X Consortium
-.\" 
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation the rights to use, copy, modify, merge, publish,
-.\" distribute, sublicense, and/or sell copies of the Software, and to
-.\" permit persons to whom the Software is furnished to do so, subject to
-.\" the following conditions:
-.\" 
-.\" The above copyright notice and this permission notice shall be included
-.\" in all copies or substantial portions of the Software.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-.\" OTHER DEALINGS IN THE SOFTWARE.
-.\" 
-.\" Except as contained in this notice, the name of the X Consortium shall
-.\" not be used in advertising or otherwise to promote the sale, use or
-.\" other dealings in this Software without prior written authorization
-.\" from the X Consortium.
-.\"
-.\" $XFree86: xc/programs/xcalc/xcalc.man,v 1.4 2002/10/12 16:06:46 herrb Exp $
-.\"
-.de EX         \"Begin example
-.ne 5
-.if n .sp 1
-.if t .sp .5
-.nf
-.in +.5i
-..
-.de EE
-.fi
-.in -.5i
-.if n .sp 1
-.if t .sp .5
-..
-.TH XCALC 1 __xorgversion__
-.SH NAME
-xcalc \- scientific calculator for X
-.SH SYNOPSIS
-.B xcalc
-[-stipple] [-rpn] [-\fItoolkitoption...\fP]
-.SH DESCRIPTION
-.I xcalc
-is a scientific calculator desktop accessory that can emulate a TI-30
-or an HP-10C.
-.SH OPTIONS
-.PP
-\fIxcalc\fP accepts all of the standard toolkit command line options along
-with two additional options:
-.PP
-.TP 8
-.B \-stipple
-This option indicates that the background of the calculator should be 
-drawn using a stipple of the foreground and background colors.  On monochrome
-displays improves the appearance.
-.PP
-.TP 8
-.B \-rpn
-This option indicates that Reverse Polish Notation should be used.  In this
-mode the calculator will look and behave like an HP-10C.  Without this flag,
-it will emulate a TI-30.
-.SH OPERATION
-.PP
-.I Pointer Usage:
-Operations may be performed with pointer button 1, or in some cases,
-with the keyboard.  
-Many common calculator operations have keyboard accelerators.
-To quit, press pointer button 3 on the AC key of the TI calculator, 
-or the ON key of the HP calculator.
-.PP
-.I Calculator Key Usage (TI mode):
-The numbered keys, the +/- key, and the +, -, *, /, and = keys all do exactly 
-what you would expect them to.  It should be noted that the operators obey
-the standard rules of precedence.  Thus, entering "3+4*5=" results in "23",
-not "35".  The parentheses can be used to override this.  For example, 
-"(1+2+3)*(4+5+6)=" results in "6*15=90".  
-.PP
-The entire number in the calculator display can be selected, in order to
-paste the result of a calculation into text.
-.PP
-The action procedures associated with each function are given below.  These
-are useful if you are interested in defining a custom calculator.
-The action used for all digit keys is \fBdigit(\fIn\fP)\fR, where \fIn\fR
-is the corresponding digit, 0..9.
-.TP 10
-.B 1/x
-Replaces the number in the display with its reciprocal.
-The corresponding action procedure is \fBreciprocal()\fR.
-.TP 10
-.B x^2
-Squares the number in the display.
-The corresponding action procedure is \fBsquare()\fR.
-.TP 10
-.B SQRT
-Takes the square root of the number in the display.
-The corresponding action procedure is \fBsquareRoot()\fR.
-.TP 10
-.B CE/C
-When pressed once, clears the number in the display without clearing the state
-of the machine.  Allows you to re-enter a number if you make a mistake.
-Pressing it twice clears the state, also.
-The corresponding action procedure for TI mode is \fBclear()\fR.
-.TP 10
-.B AC
-Clears the display, the state, and the memory.  Pressing it with the third
-pointer button turns off the calculator, in that it exits the program.
-The action procedure to clear the state is \fBoff()\fR; to quit, \fBquit()\fR.
-.TP 10
-.B INV
-Invert function.  See the individual function keys for details.
-The corresponding action procedure is \fBinverse()\fR.
-.TP 10
-.B sin
-Computes the sine of the number in the display, as interpreted by the current
-DRG mode (see DRG, below).  If inverted, it computes the arcsine.
-The corresponding action procedure is \fBsine()\fR.
-.TP 10
-.B cos
-Computes the cosine, or arccosine when inverted.
-The corresponding action procedure is \fBcosine()\fP.
-.TP 10
-.B tan
-Computes the tangent, or arctangent when inverted.
-The corresponding action procedure is \fBtangent()\fP.
-.TP 10
-.B DRG
-Changes the DRG mode, as indicated by 'DEG', 'RAD', or 'GRAD' at the bottom of
-of the calculator ``liquid crystal'' display.
-When in 'DEG' mode, numbers in the display are taken as being
-degrees.  In 'RAD' mode, numbers are in radians, and in 'GRAD' mode, numbers
-are in grads.  When inverted, the DRG key has a feature of 
-converting degrees to radians to grads and vice-versa.  Example:  put the 
-calculator into 'DEG' mode, and enter "45 INV DRG".  The display should now
-show something along the lines of ".785398", which is 45 degrees converted to
-radians.
-The corresponding action procedure is \fBdegree()\fP.
-.TP 10
-.B e
-The constant 'e'.  (2.7182818...).
-The corresponding action procedure is \fBe()\fR.
-.TP 10
-.B EE
-Used for entering exponential numbers.  For example, to get "-2.3E-4" you'd
-enter "2 . 3 +/- EE 4 +/-".
-The corresponding action procedure is \fBscientific()\fR.
-.TP 10
-.B log
-Calculates the log (base 10) of the number in the display.  When inverted,
-it raises "10.0" to the number in the display.
-For example, entering "3 INV log" should result in "1000".
-The corresponding action procedure is \fBlogarithm()\fP.
-.TP 10
-.B ln
-Calculates the log (base e) of the number in the display.  When inverted, 
-it raises "e" to the number in the display.  For example, entering "e ln"
-should result in "1".
-The corresponding action procedure is \fBnaturalLog()\fR.
-.TP 10
-.B y^x
-Raises the number on the left to the power of the number on the right.  For 
-example "2 y^x 3 =" results in "8", which is 2^3.  For a further example,
-"(1+2+3) y^x (1+2) =" equals "6 y^x 3" which equals "216".
-The corresponding action procedure is \fBpower()\fR.
-.TP 10
-.B PI
-The constant 'pi'.  (3.1415927....)
-The corresponding action procedure is \fBpi()\fR.
-.TP 10
-.B x!
-Computes the factorial of the number in the display.  The number in the display
-must be an integer in the range 0-500, though, depending on your math library,
-it might overflow long before that.
-The corresponding action procedure is \fBfactorial()\fR.
-.TP 10
-.B (
-Left parenthesis.  The corresponding action procedure for TI calculators
-is \fBleftParen()\fR.
-.TP 10
-.B )
-Right parenthesis.  The corresponding action procedure for TI calculators
-is \fBrightParen()\fR.
-.TP 10
-.B /
-Division.  The corresponding action procedure is \fBdivide()\fR.
-.TP 10
-.B *
-Multiplication.  The corresponding action procedure is \fBmultiply()\fR.
-.TP 10
-.B -
-Subtraction.  The corresponding action procedure is \fBsubtract()\fR.
-.TP 10
-.B +
-Addition.  The corresponding action procedure is \fBadd()\fR.
-.TP 10
-.B =
-Perform calculation.  The TI-specific action procedure is \fBequal()\fR.
-.TP 10
-.B STO
-Copies the number in the display to the memory location.
-The corresponding action procedure is \fBstore()\fR.
-.TP 10
-.B RCL
-Copies the number from the memory location to the display.
-The corresponding action procedure is \fBrecall()\fR.
-.TP 10
-.B SUM
-Adds the number in the display to the number in the memory location.
-The corresponding action procedure is \fBsum()\fR.
-.TP 10
-.B EXC
-Swaps the number in the display with the number in the memory location.
-The corresponding action procedure for the TI calculator is \fBexchange()\fR.
-.TP 10
-.B +/-
-Negate; change sign.  The corresponding action procedure is \fBnegate()\fR.
-.TP 10
-.B .
-Decimal point.  The action procedure is \fBdecimal()\fP.
-.sp
-.PP
-.I Calculator Key Usage (RPN mode):
-The number keys, CHS (change sign), +, -, *, /, and ENTR keys all do exactly 
-what you would expect them to do.  Many of the remaining keys are the same as
-in TI mode.  The differences are detailed below.  The action procedure
-for the ENTR key is \fBenter()\fR.
-.sp
-.TP 10
-.B <-
-This is a backspace key that can be used if you make a mistake while entering
-a number.  It will erase digits from the display.  (See BUGS).
-Inverse backspace will clear the X register.
-The corresponding action procedure is \fBback()\fR.
-.TP 10
-.B ON
-Clears the display, the state, and the memory.  Pressing it with the third
-pointer button turns off the calculator, in that it exits the program.
-To clear state, the action procedure is \fBoff\fR; to quit, \fBquit()\fR.
-.TP 10
-.B INV
-Inverts the meaning of the function keys.  This would be the  \fIf\fR key
-on an HP calculator, but \fIxcalc\fR does not display
-multiple legends on each key.  See the individual function keys for details.
-.TP 10
-.B 10^x
-Raises "10.0" to the number in the top of the stack.  
-When inverted, it calculates the log (base 10) of the number in the display.
-The corresponding action procedure is \fBtenpower()\fR.
-.TP 10
-.B e^x
-Raises "e" to the number in the top of the stack.  
-When inverted, it calculates the log (base e) of the number in the display.
-The action procedure is \fBepower()\fR.
-.TP 10
-.B STO
-Copies the number in the top of the stack to a memory location.  There are 10
-memory locations.  The desired memory is specified by following this
-key with a digit key.
-.TP 10
-.B RCL
-Pushes the number from the specified memory location onto the stack.
-.TP 10
-.B SUM
-Adds the number on top of the stack to the number in the specified
-memory location.
-.TP 10
-.B x:y
-Exchanges the numbers in the top two stack positions, the X and Y registers.
-The corresponding action procedure is \fBXexchangeY()\fR.
-.TP 10
-.B R v
-Rolls the stack downward.  When inverted, it rolls the stack upward.
-The corresponding action procedure is \fBroll()\fR.
-.TP 10
-.I blank
-These keys were used for programming functions on the HP-10C.  Their
-functionality has not been duplicated in \fIxcalc\fR.
-.PP
-Finally, there are two additional action procedures:
-\fBbell()\fR, which rings the bell; 
-and \fBselection()\fR, which performs a cut on the
-entire number in the calculator's ``liquid crystal'' display.
-.SH ACCELERATORS
-.PP
-Accelerators are shortcuts for entering commands.  \fIxcalc\fP provides
-some sample keyboard accelerators; also users can customize accelerators.
-The numeric keypad accelerators provided by \fIxcalc\fP
-should be intuitively correct.
-The accelerators defined by \fIxcalc\fP on the main keyboard are given below:
-.PP
-.nf
-.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i
-       TI Key  HP Key  Keyboard Accelerator    TI Function     HP Function
-       
-       SQRT    SQRT    r                       squareRoot()    squareRoot()
-       AC      ON      space                   clear()         clear()
-       AC      <-      Delete                  clear()         back()
-       AC      <-      Backspace               clear()         back()
-       AC      <-      Control-H               clear()         back()
-       AC              Clear                   clear()
-       AC      ON      q                       quit()          quit()
-       AC      ON      Control-C               quit()          quit()
-
-       INV     i       i                       inverse()               inverse()
-       sin     s       s                       sine()          sine()
-       cos     c       c                       cosine()                cosine()
-       tan     t       t                       tangent()       tangent()
-       DRG     DRG     d                       degree()                degree()
-
-       e               e                       e()
-       ln      ln      l                       naturalLog()    naturalLog()
-       y^x     y^x     ^                       power()         power()
-
-       PI      PI      p                       pi()            pi()
-       x!      x!      !                       factorial()     factorial()
-       (               (                       leftParen()
-       )               )                       rightParen()
-
-       /       /       /                       divide()                divide()
-       *       *       *                       multiply()      multiply()
-       -       -       -                       subtract()      subtract()
-       +       +       +                       add()           add()
-       =               =                       equal()
-
-       0..9    0..9    0..9                    digit()         digit()
-       .       .       .                       decimal()       decimal()
-       +/-     CHS     n                       negate()                negate()
-
-               x:y     x                                       XexchangeY()
-               ENTR    Return                                  enter()
-               ENTR    Linefeed                                        enter()
-.fi
-.PP
-.SH CUSTOMIZATION
-The application class name is XCalc.
-.PP
-\fIxcalc\fP has an enormous application defaults file which specifies 
-the position, label, and function of each key on the calculator.
-It also gives translations to serve as keyboard accelerators.
-Because these resources are not specified in the source code, you can create
-a customized calculator by writing a private application defaults file,
-using the Athena Command and Form widget resources to specify the size and 
-position of buttons, the label for each button, and the function of 
-each button.
-.PP
-The foreground and background colors of each calculator key can be 
-individually specified.
-For the TI calculator, a classical color resource specification might be:
-.sp
-.br
-XCalc.ti.Command.background:   gray50
-.br
-XCalc.ti.Command.foreground:   white
-.sp
-For each of buttons 20, 25, 30, 35, and 40, specify:
-.br
-XCalc.ti.button20.background:  black
-.br
-XCalc.ti.button20.foreground:  white
-.sp
-For each of buttons 22, 23, 24, 27, 28, 29, 32, 33, 34, 37, 38, and 39:
-.br
-XCalc.ti.button22.background:  white
-.br
-XCalc.ti.button22.foreground:  black
-.SH WIDGET HIERARCHY
-In order to specify resources, it is useful to know the hierarchy of
-the widgets which compose \fIxcalc\fR.  In the notation below,
-indentation indicates hierarchical structure.  The widget class name
-is given first, followed by the widget instance name.
-.nf
-.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i
-.sp
-XCalc xcalc
-       Form  ti  \fIor\fR  hp    \fI(the name depends on the mode)\fR
-               Form  bevel
-                       Form  screen
-                               Label  M
-                               Toggle  LCD
-                               Label  INV
-                               Label  DEG
-                               Label  RAD
-                               Label  GRAD
-                               Label  P
-               Command  button1
-               Command  button2
-               Command  button3
-\fIand so on, ...\fR
-               Command  button38
-               Command  button39
-               Command  button40
-.fi
-.SH APPLICATION RESOURCES
-.PP
-.TP 8
-\fBrpn\fR (Class \fBRpn\fR)
-Specifies that the rpn mode should be used.  The default is TI mode.
-.TP 8
-\fBstipple\fR (Class \fBStipple\fR)
-Indicates that the background should be stippled.  The default is ``on''
-for monochrome displays, and ``off'' for color displays.
-.TP 8
-\fBcursor\fR (Class \fBCursor\fR)
-The name of the symbol used to represent the pointer.
-The default is ``hand2''.
-.fi
-.SH COLORS
-If you would like xcalc to use its ti colors, include the following 
-in the #ifdef COLOR section of the file you read with xrdb:
-.sp 1
-*customization:                 -color
-.sp 1
-.br
-This will cause xcalc to pick up the colors in the app-defaults color
-customization file:
-.IR __apploaddir__/XCalc-color .
-.fi
-.SH "SEE ALSO"
-X(__miscmansuffix__), xrdb(1), the Athena Widget Set
-.SH BUGS
-.PP
-HP mode is not completely debugged.  In particular, the stack is
-not handled properly after errors.
-.SH COPYRIGHT
-Copyright 1994 X Consortium
-.br
-See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
-.SH AUTHORS
-John Bradley, University of Pennsylvania
-.br
-Mark Rosenstein, MIT Project Athena
-.br 
-Donna Converse, MIT X Consortium
diff --git a/xclipboard/AUTHORS b/xclipboard/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
index 7f33cbf..75c3ec5 100644 (file)
@@ -1,12 +1,21 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright 1989, 1994, 1998  The Open Group
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
index 2e6cb38..3cadbbe 100644 (file)
@@ -1,3 +1,149 @@
+commit 4c5ba0adecd411786b11bd34122cd498ba980c01
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Nov 8 22:53:01 2010 -0800
+
+    xclipboard 1.1.1
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit de80ed3de8490eabcba3618f10c18b2d646e1669
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 7 23:55:47 2010 -0800
+
+    include "config.h" in *.c files for autoconf definitions
+    
+    Actually enables the #ifdef XKB code that commit f16c6dd23a
+    attempted to enable
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 254b55b9a7ec350c3b2f857217ef93ffced3b91d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 7 23:50:49 2010 -0800
+
+    Purge CVS version tags
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0272c10c35be588a76c27253ba1c94750b89cf61
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 7 23:47:47 2010 -0800
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Regroup AC statements under the Autoconf initialization section.
+    Regroup AM sttaements under the Automake initialization section.
+    Add missing AC_CONFIG_SRCDIR
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 163f783b9bef4348d8488b6b927c67406c8a40b6
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 7 23:46:00 2010 -0800
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d043044ab9949b6e15479ede69023f78f00081ee
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Nov 7 23:45:13 2010 -0800
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    Enables use of platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4aa31642993ed592a22214791e06516d3316b226
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Nov 7 23:43:21 2010 -0800
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2fa9cd45301c6f56a89845776fb88b5d9922d811
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 08:37:48 2010 -0700
+
+    Fill in COPYING file with copyright notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5802b699a985522f2b1e4580b9a6b194b129b62e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:47 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 7c961835a6ae4aedfe6d340f24f8855f91d9b87d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:53 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit b673f5c871ab3cd6366dacfd001636836618a03b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit 5210e2aa9a83647bdb2d3407963a0a844c25ea4e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:24 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 6734b4d24af6ca98ab41b824a858be5338c541b6
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:38 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit ebb429922a8e5d0108f53ccbb34215f554641326
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
 commit 96d1fe9241f6b68d52c9b3020dd926319d830558
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Wed Oct 14 22:37:17 2009 -0700
index e69de29..8b82ade 100644 (file)
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
index 42967dc..c8a12ae 100644 (file)
@@ -58,38 +58,22 @@ appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
 EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-EXTRA_DIST += ChangeLog
-MAINTAINERCLEANFILES = ChangeLog
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
index 908cebe..e8cff17 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -60,9 +60,9 @@ bin_PROGRAMS = xclipboard$(EXEEXT) xcutsel$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS config.guess config.sub depcomp \
-       install-sh missing
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -139,6 +139,7 @@ am__remove_distdir = \
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
@@ -173,6 +174,7 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 GREP = @GREP@
 INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -185,6 +187,7 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -194,15 +197,18 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
 XCLIPBOARD_CFLAGS = @XCLIPBOARD_CFLAGS@
 XCLIPBOARD_LIBS = @XCLIPBOARD_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -223,7 +229,6 @@ build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
@@ -282,28 +287,10 @@ dist_appdefault_DATA = \
 
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-EXTRA_DIST = $(appman_PRE) ChangeLog
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
-MAINTAINERCLEANFILES = ChangeLog
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -315,15 +302,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu Makefile
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -557,7 +544,8 @@ distdir: $(DISTFILES)
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
        -test -n "$(am__skip_mode_fix)" \
-       || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -601,17 +589,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
-         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -798,15 +786,19 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/xclipboard/NEWS b/xclipboard/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
index 684599f..641b5d9 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -34,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
+m4_if([$1], [1.11.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -406,18 +406,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 ])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -1030,32 +1018,26 @@ AC_SUBST([am__untar])
 
 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
 dnl 
 dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
 dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
 dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
 # XORG_MACROS_VERSION(required-version)
 # -------------------------------------
@@ -1073,7 +1055,7 @@ dnl of the copyright holder.
 # See the "minimum version" comment for each macro you use to see what 
 # version you require.
 m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.3.0])
+m4_define([vers_have], [1.11.0])
 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1141,9 +1123,12 @@ AC_SUBST(RAWCPPFLAGS)
 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 # Not sure if there's any better way than just hardcoding by OS name.
 # Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
 if test x$APP_MAN_SUFFIX = x    ; then
     APP_MAN_SUFFIX=1
@@ -1212,8 +1197,60 @@ AC_SUBST([FILE_MAN_DIR])
 AC_SUBST([MISC_MAN_DIR])
 AC_SUBST([DRIVER_MAN_DIR])
 AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
 ]) # XORG_MANPAGE_SECTIONS
 
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
 # XORG_CHECK_LINUXDOC
 # -------------------
 # Minimum version: 1.0.0
@@ -1223,23 +1260,14 @@ AC_SUBST([ADMIN_MAN_DIR])
 # Whether or not the necessary tools and files are found can be checked
 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
 AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
-else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
 AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
 
-AC_MSG_CHECKING([Whether to build documentation])
+AC_MSG_CHECKING([whether to build documentation])
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
    BUILDDOC=yes
 else
    BUILDDOC=no
@@ -1249,9 +1277,9 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
 AC_MSG_RESULT([$BUILDDOC])
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
    BUILDPDFDOC=yes
 else
    BUILDPDFDOC=no
@@ -1261,7 +1289,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 MAKE_PDF="$PS2PDF"
 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
@@ -1281,48 +1309,44 @@ AC_SUBST(MAKE_HTML)
 # indicates whether the necessary tools and files are found and, if set,
 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
 AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
 BUILDTXTDOC=no
 BUILDPDFDOC=no
 BUILDPSDOC=no
 BUILDHTMLDOC=no
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
    test x$BUILD_TXTDOC != xno; then
        BUILDTXTDOC=yes
 fi
 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
    test x$BUILD_PDFDOC != xno; then
        BUILDPDFDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
    test x$BUILD_PSDOC != xno; then
        BUILDPSDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 AC_MSG_RESULT([$BUILDPSDOC])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
    test x$BUILD_HTMLDOC != xno; then
        BUILDHTMLDOC=yes
 fi
@@ -1340,6 +1364,548 @@ AC_SUBST(MAKE_PDF)
 AC_SUBST(MAKE_HTML)
 ]) # XORG_CHECK_DOCBOOK
 
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+          [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
+# --------------------------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+          [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: ]_defopt[)]),
+          [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: ]_defopt[)]),
+          [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+m4_define([default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: ]default[)]),
+          [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+m4_define([devel_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: ]devel_default[)]),
+          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+m4_define([spec_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: ]spec_default[)]),
+          [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
 # XORG_CHECK_MALLOC_ZERO
 # ----------------------
 # Minimum version: 1.0.0
@@ -1369,7 +1935,8 @@ main() {
     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 }],
                [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1392,38 +1959,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 # ----------------
 # Minimum version: 1.1.0
 #
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
 #
 AC_DEFUN([XORG_WITH_LINT],[
 
-# Allow checking code with lint, sparse, etc.
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
                [Use a lint-style source code checker (default: disabled)])],
                [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-       LINT="$use_lint"
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
 fi
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
 ]) # XORG_WITH_LINT
 
@@ -1433,28 +2031,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
 #
 # Sets up flags for building lint libraries for checking programs that call
 # functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
 #
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
 AC_DEFUN([XORG_LINT_LIBRARY],[
 AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
        [Create lint library (default: disabled)])],
        [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
 fi
+
 AC_SUBST(LINTLIB)
 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
@@ -1467,11 +2066,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 # Defines CWARNFLAGS to enable C compiler warnings.
 #
 AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -1484,7 +2083,6 @@ else
     fi
 fi
 AC_SUBST(CWARNFLAGS)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 ]) # XORG_CWARNFLAGS
 
 # XORG_STRICT_OPTION
@@ -1493,7 +2091,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 #
 # Add configure option to enable strict compilation
 AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 AC_REQUIRE([AC_PROG_CC_C99])
 AC_REQUIRE([XORG_CWARNFLAGS])
 
@@ -1523,12 +2121,33 @@ AC_SUBST([CWARNFLAGS])
 # Defines default options for X.Org modules.
 #
 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
 XORG_CWARNFLAGS
 XORG_STRICT_OPTION
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
+XORG_INSTALL
 XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
 ]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
 dnl Copyright 2005 Red Hat, Inc
 dnl
 dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -1556,22 +2175,9 @@ dnl
 
 # XORG_RELEASE_VERSION
 # --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  
 AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AS_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
                [Major version of this package])
@@ -1598,14 +2204,13 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
 # Defines the variable CHANGELOG_CMD as the command to generate
 # ChangeLog from git.
 #
-# Arrange that distcleancheck ignores ChangeLog left over by distclean.
 #
 AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
 echo 'git directory not found: installing possibly empty changelog.' >&2)"
 AC_SUBST([CHANGELOG_CMD])
-AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
 ]) # XORG_CHANGELOG
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
index 7e3b1d2..91baacd 100644 (file)
@@ -1,4 +1,3 @@
-! $Xorg: XClipboard.ad,v 1.3 2000/08/17 19:54:12 cpqbld Exp $
 *Command*Font:         -*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1
 *Label*Font:   -*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1
 *Text*Font:    -*-courier-medium-r-normal--*-120-*-*-*-*-iso8859-1
old mode 100755 (executable)
new mode 100644 (file)
index da83314..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-04-27'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
        SUN_ARCH="i386"
@@ -548,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -656,7 +660,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -807,12 +811,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd | genuineintel)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -822,6 +826,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +858,20 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +894,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -882,78 +914,34 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
        exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,8 +950,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -977,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -986,66 +980,6 @@ EOF
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1074,7 +1008,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1182,7 +1116,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
index 9f7e71d..7f0febc 100644 (file)
@@ -42,6 +42,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
 
old mode 100755 (executable)
new mode 100644 (file)
index a39437d..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-04-17'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -149,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -275,26 +283,38 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -325,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -337,7 +357,7 @@ case $basic_machine in
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -359,21 +379,24 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -467,6 +490,19 @@ case $basic_machine in
                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
                os=-linux
                ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -719,6 +755,9 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -823,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1057,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1240,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1260,9 +1301,9 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1275,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1283,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1416,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1456,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1613,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index 7c625fb..2d7bd4e 100755 (executable)
@@ -1,20 +1,24 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for xclipboard 1.1.0.
+# Generated by GNU Autoconf 2.68 for xclipboard 1.1.1.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
+#
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -22,23 +26,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   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
-
 as_nl='
 '
 export as_nl
@@ -46,7 +42,13 @@ export as_nl
 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
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# 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
@@ -57,7 +59,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -80,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -96,15 +91,16 @@ fi
 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
 
      ;;
@@ -116,12 +112,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  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='> '
@@ -133,7 +133,257 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  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=.
+  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
+            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
+
+
+      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 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 and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
+
+# 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"
+
+
+} # 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
+
+
+# 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
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -147,8 +397,12 @@ 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\(//\)$' \| \
@@ -168,415 +422,127 @@ $as_echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# 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
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  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/=
+  ' <$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" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  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
+  # 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
 }
 
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
+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 2>/dev/null
 fi
-
-if as_func_ret_success; then
-  :
+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'
+  fi
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_ln_s='cp -p'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
+as_executable_p=$as_test_x
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
-(
-  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
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-      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=:
-  # 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 ;;
-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=:
-  # 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 ;;
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf@gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  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" ||
-    { $as_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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 2>/dev/null
-fi
-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'
-  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
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&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`
 
@@ -591,15 +557,16 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='xclipboard'
 PACKAGE_TARNAME='xclipboard'
-PACKAGE_VERSION='1.1.0'
-PACKAGE_STRING='xclipboard 1.1.0'
+PACKAGE_VERSION='1.1.1'
+PACKAGE_STRING='xclipboard 1.1.1'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
 
+ac_unique_file="Makefile.am"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -645,7 +612,10 @@ APPDEFS_LIBS
 APPDEFS_CFLAGS
 XCLIPBOARD_LIBS
 XCLIPBOARD_CFLAGS
-PKG_CONFIG
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
 DRIVER_MAN_DIR
 MISC_MAN_DIR
@@ -658,6 +628,7 @@ MISC_MAN_SUFFIX
 FILE_MAN_SUFFIX
 LIB_MAN_SUFFIX
 APP_MAN_SUFFIX
+SED
 host_os
 host_vendor
 host_cpu
@@ -666,10 +637,9 @@ build_os
 build_vendor
 build_cpu
 build
-distcleancheck_listfiles
+INSTALL_CMD
+PKG_CONFIG
 CHANGELOG_CMD
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
 CWARNFLAGS
 EGREP
 GREP
@@ -746,6 +716,7 @@ bindir
 program_transform_name
 prefix
 exec_prefix
+PACKAGE_URL
 PACKAGE_BUGREPORT
 PACKAGE_STRING
 PACKAGE_VERSION
@@ -758,9 +729,8 @@ ac_user_opts='
 enable_option_checking
 enable_maintainer_mode
 enable_dependency_tracking
-enable_silent_rules
 enable_strict_compilation
-with_release_version
+enable_silent_rules
 with_appdefaultdir
 '
       ac_precious_vars='build_alias
@@ -839,8 +809,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.
@@ -885,8 +856,7 @@ do
     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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -912,8 +882,7 @@ do
     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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -1117,8 +1086,7 @@ do
     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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -1134,8 +1102,7 @@ do
     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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -1165,17 +1132,17 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { $as_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 &&
-      { $as_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 ;;
 
@@ -1184,7 +1151,7 @@ Try \`$0 --help' for more information." >&2
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1192,15 +1159,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_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_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1223,8 +1188,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { $as_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'
@@ -1238,8 +1202,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $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
+    $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
@@ -1254,11 +1218,9 @@ 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 .` ||
-  { $as_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" ||
-  { $as_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.
@@ -1297,13 +1259,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_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" || { $as_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
@@ -1329,7 +1289,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xclipboard 1.1.0 to adapt to many kinds of systems.
+\`configure' configures xclipboard 1.1.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1343,7 +1303,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
@@ -1399,7 +1359,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xclipboard 1.1.0:";;
+     short | recursive ) echo "Configuration of xclipboard 1.1.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1411,17 +1371,15 @@ Optional Features:
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')
   --enable-strict-compilation
                           Enable all warnings from compiler and make them
                           errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
   --with-appdefaultdir=<pathname>
                           specify directory for app-defaults files (default is
                           autodetected)
@@ -1432,7 +1390,7 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xclipboard configure 1.1.0
-generated by GNU Autoconf 2.63
+xclipboard configure 1.1.1
+generated by GNU Autoconf 2.68
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 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
-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 xclipboard $as_me 1.1.0, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+  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
 
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-_ASUNAME
+} # ac_fn_c_try_compile
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_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_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\""
+$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_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
+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 xclipboard $as_me 1.1.1, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 } >&5
@@ -1600,9 +1755,9 @@ do
       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
@@ -1618,13 +1773,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
@@ -1636,11 +1791,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1649,13 +1802,13 @@ _ASBOX
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_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) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -1674,11 +1827,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1691,11 +1842,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1709,11 +1858,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1727,46 +1874,53 @@ _ASBOX
     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"
 _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 an explicitly selected file to automatically selected ones.
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$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
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1777,19 +1931,23 @@ fi
 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
   test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+  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
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+  # 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";;
@@ -1797,7 +1955,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
 $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -1812,11 +1970,11 @@ 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,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { $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:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+      { $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=: ;;
     ,);;
@@ -1826,17 +1984,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        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:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+         { $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:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+         { $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:$LINENO:   former value:  \`$ac_old_val'" >&5
+       { $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:$LINENO:   current value: \`$ac_new_val'" >&5
+       { $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
@@ -1848,43 +2006,20 @@ $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
     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
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { $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:$LINENO: error: changes in the environment can compromise the build" >&5
+  { $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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+  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'
@@ -1893,6 +2028,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Initialize Automake
 am__api_version='1.11'
 
 ac_aux_dir=
@@ -1912,9 +2052,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_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,
@@ -1940,10 +2078,10 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 # 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:$LINENO: checking for a BSD-compatible install" >&5
+{ $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
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -1951,11 +2089,11 @@ 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.
@@ -1992,7 +2130,7 @@ case $as_dir/ in
     ;;
 esac
 
-done
+  done
 IFS=$as_save_IFS
 
 rm -rf conftest.one conftest.two conftest.dir
@@ -2008,7 +2146,7 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+{ $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}.
@@ -2019,7 +2157,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
@@ -2030,15 +2168,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2060,11 +2194,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -2073,13 +2204,10 @@ then
    # Ok.
    :
 else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
@@ -2107,7 +2235,7 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
@@ -2128,9 +2256,9 @@ if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2141,24 +2269,24 @@ 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_STRIP="${ac_tool_prefix}strip"
-    $as_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
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
 $as_echo "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2168,9 +2296,9 @@ if test -z "$ac_cv_prog_STRIP"; then
   ac_ct_STRIP=$STRIP
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2181,24 +2309,24 @@ 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_STRIP="strip"
-    $as_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_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
 $as_echo "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2207,7 +2335,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2220,10 +2348,10 @@ fi
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+{ $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2231,7 +2359,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in mkdir gmkdir; do
+    for ac_prog in mkdir gmkdir; do
         for ac_exec_ext in '' $ac_executable_extensions; do
           { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
           case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
@@ -2243,11 +2371,12 @@ do
           esac
         done
        done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 
+  test -d ./--version && rmdir ./--version
   if test "${ac_cv_path_mkdir+set}" = set; then
     MKDIR_P="$ac_cv_path_mkdir -p"
   else
@@ -2255,11 +2384,10 @@ fi
     # value for MKDIR_P within a source directory, because that will
     # break other packages using the cache if that directory is
     # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
     MKDIR_P="$ac_install_sh -d"
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
 $as_echo "$MKDIR_P" >&6; }
 
 mkdir_p="$MKDIR_P"
@@ -2272,9 +2400,9 @@ for ac_prog in gawk mawk nawk awk
 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:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2285,24 +2413,24 @@ 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_AWK="$ac_prog"
-    $as_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
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
 $as_echo "$AWK" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2310,11 +2438,11 @@ fi
   test -n "$AWK" && break
 done
 
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2322,7 +2450,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2332,11 +2460,11 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
   SET_MAKE=
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
@@ -2356,9 +2484,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2374,7 +2500,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xclipboard'
- VERSION='1.1.0'
+ VERSION='1.1.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2415,16 +2541,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
-{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
+if test "${enable_maintainer_mode+set}" = set; then :
   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
   USE_MAINTAINER_MODE=no
 fi
 
-  { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
 $as_echo "$USE_MAINTAINER_MODE" >&6; }
    if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
@@ -2438,7 +2564,7 @@ fi
 
 
 
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 
 
 
@@ -2450,8 +2576,66 @@ fi
 
 
 
+DEPDIR="${am__leading_dot}deps"
 
-ac_config_headers="$ac_config_headers config.h"
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -2462,9 +2646,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2475,24 +2659,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2502,9 +2686,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2515,24 +2699,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2541,7 +2725,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2555,9 +2739,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2568,24 +2752,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2595,9 +2779,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2609,18 +2793,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"
-    $as_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
@@ -2639,10 +2823,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2654,9 +2838,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2667,24 +2851,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2698,9 +2882,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2711,24 +2895,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2741,7 +2925,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2752,57 +2936,37 @@ fi
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+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_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+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:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
+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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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
@@ -2818,8 +2982,8 @@ 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.
-{ $as_echo "$as_me:$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}: 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:
@@ -2835,17 +2999,17 @@ do
 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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,
@@ -2862,7 +3026,7 @@ do
        # 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
@@ -2881,84 +3045,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 else
   ac_file=''
 fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_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
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $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:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+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.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_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
-$as_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
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
 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.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+{ $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"
+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:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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
@@ -2973,32 +3094,83 @@ for ac_file in conftest.exe conftest conftest.*; do
   esac
 done
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { { $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:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+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
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_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 test "${ac_cv_objext+set}" = set; then
+if ${ac_cv_objext+:} 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
@@ -3010,17 +3182,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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
@@ -3033,31 +3205,23 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $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:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+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:$LINENO: result: $ac_cv_objext" >&5
+{ $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
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then
+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
@@ -3071,37 +3235,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+{ $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
@@ -3110,20 +3253,16 @@ else
 fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+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
@@ -3134,35 +3273,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
@@ -3173,36 +3288,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
@@ -3213,42 +3304,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+{ $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
@@ -3265,18 +3331,14 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+{ $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 test "${ac_cv_prog_cc_c89+set}" = set; then
+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 <stdarg.h>
 #include <stdio.h>
@@ -3333,32 +3395,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
@@ -3369,91 +3408,31 @@ fi
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 $as_echo "none needed" >&6; } ;;
   xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+    { $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:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+    { $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'
 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
 
 depcc="$CC"   am_compiler_list=
 
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3561,7 +3540,7 @@ else
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
@@ -3576,98 +3555,181 @@ else
 fi
 
 
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$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
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} 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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           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
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
 
-done
-IFS=$as_save_IFS
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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);
+}
 
-rm -rf conftest.one conftest.two conftest.dir
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
 
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
 
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+typedef const char *ccp;
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
 
 
 
@@ -3676,14 +3738,14 @@ 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:$LINENO: checking how to run the C preprocessor" >&5
+{ $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
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -3698,11 +3760,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -3711,78 +3769,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 <ac_nonexistent.h>
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
 
@@ -3794,7 +3808,7 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+{ $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
@@ -3805,11 +3819,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -3818,87 +3828,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 <ac_nonexistent.h>
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { { $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:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3908,9 +3871,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+{ $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 test "${ac_cv_path_GREP+set}" = set; then
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -3921,7 +3884,7 @@ 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_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
@@ -3941,7 +3904,7 @@ case `"$ac_path_GREP" --version 2>&1` in
     $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"
@@ -3956,26 +3919,24 @@ esac
       $ac_path_GREP_found && break 3
     done
   done
-done
+  done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+    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:$LINENO: result: $ac_cv_path_GREP" >&5
+{ $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:$LINENO: checking for egrep" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -3989,7 +3950,7 @@ 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_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
@@ -4009,7 +3970,7 @@ case `"$ac_path_EGREP" --version 2>&1` in
     $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"
@@ -4024,12 +3985,10 @@ esac
       $ac_path_EGREP_found && break 3
     done
   done
-done
+  done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+    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
@@ -4037,21 +3996,17 @@ fi
 
    fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+{ $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:$LINENO: checking for ANSI C header files" >&5
+{ $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 test "${ac_cv_header_stdc+set}" = set; then
+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 <stdlib.h>
 #include <stdarg.h>
@@ -4066,48 +4021,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 <string.h>
 
 _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
@@ -4117,18 +4047,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 <stdlib.h>
 
 _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
@@ -4138,14 +4064,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 <ctype.h>
 #include <stdlib.h>
@@ -4172,118 +4094,33 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-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
+if ac_fn_c_try_run "$LINENO"; then :
 
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+  ac_cv_header_stdc=no
 fi
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+{ $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
 
 # 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`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; 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
-/* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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
 done
 
 
-   { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __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
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  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 void
-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;
-  float fnumber;
-
-  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);
-}
-
-int
-main ()
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  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[ni.number - 1] = 543;
 
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
 
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 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;;
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_c99=$ac_arg
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
 
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-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_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
   *)
-    CC="$CC $ac_cv_prog_cc_c99"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
 esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
 
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
 
+fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4541,28 +4284,24 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4578,73 +4317,91 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
 
 
 
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
        ;;
     esac
 else
-    { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___SUNPRO_C=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
     fi
 fi
 
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=0;;
-esac
-AM_BACKSLASH='\'
-
-
 
 
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 
 
 
 # Check whether --enable-strict-compilation was given.
-if test "${enable_strict_compilation+set}" = set; then
+if test "${enable_strict_compilation+set}" = set; then :
   enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
 else
   STRICT_COMPILE=no
 fi
 
 if test "x$STRICT_COMPILE" = "xyes"; then
-       { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___SUNPRO_C=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
 fi
 
-       { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
-$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
-if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __INTEL_COMPILER
-  (void) __INTEL_COMPILER;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___INTEL_COMPILER=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___INTEL_COMPILER=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
-$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
   INTELCC="yes"
 else
   INTELCC="no"
@@ -4812,20 +4453,6 @@ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
 
 
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
 _ACEOF
@@ -4850,11 +4477,20 @@ _ACEOF
 
 
 
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
 echo 'git directory not found: installing possibly empty changelog.' >&2)"
 
-distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
 
 
 
 
 if test x$ADMIN_MAN_SUFFIX = x    ; then
     case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Checks for pkg-config packages
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
 fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
 fi
 
 
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
 fi
 
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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 ;;
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
 esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
+AM_BACKSLASH='\'
 
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       else
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-               PKG_CONFIG=""
-       fi
 
-fi
+
+# Checks for pkg-config packages
 if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xkbfile\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xkbfile\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xkbfile") 2>&5
   ac_status=$?
-  $as_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
   XKBPKG="xkbfile"
 else
   XKBPKG=""
 fi
 if test x$XKBPKG = xxkbfile ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define XKB 1
-_ACEOF
+$as_echo "#define XKB 1" >>confdefs.h
 
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for XCLIPBOARD" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCLIPBOARD" >&5
 $as_echo_n "checking for XCLIPBOARD... " >&6; }
 
 if test -n "$XCLIPBOARD_CFLAGS"; then
     pkg_cv_XCLIPBOARD_CFLAGS="$XCLIPBOARD_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11 \${XKBPKG}\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11 \${XKBPKG}\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11 ${XKBPKG}") 2>&5
   ac_status=$?
-  $as_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
   pkg_cv_XCLIPBOARD_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt x11 ${XKBPKG}" 2>/dev/null`
 else
   pkg_failed=yes
@@ -5089,11 +4637,11 @@ if test -n "$XCLIPBOARD_LIBS"; then
     pkg_cv_XCLIPBOARD_LIBS="$XCLIPBOARD_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11 \${XKBPKG}\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11 \${XKBPKG}\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11 ${XKBPKG}") 2>&5
   ac_status=$?
-  $as_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
   pkg_cv_XCLIPBOARD_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt x11 ${XKBPKG}" 2>/dev/null`
 else
   pkg_failed=yes
@@ -5119,18 +4667,7 @@ fi
        # Put the nasty error message in config.log where it belongs
        echo "$XCLIPBOARD_PKG_ERRORS" >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xaw7 xmu xt x11 ${XKBPKG}) were not met:
-
-$XCLIPBOARD_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XCLIPBOARD_CFLAGS
-and XCLIPBOARD_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xaw7 xmu xt x11 ${XKBPKG}) were not met:
+       as_fn_error $? "Package requirements (xaw7 xmu xt x11 ${XKBPKG}) were not met:
 
 $XCLIPBOARD_PKG_ERRORS
 
@@ -5140,22 +4677,11 @@ installed software in a non-standard prefix.
 Alternatively, you may set the environment variables XCLIPBOARD_CFLAGS
 and XCLIPBOARD_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+       { { $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:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XCLIPBOARD_CFLAGS
-and XCLIPBOARD_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -5164,32 +4690,29 @@ and XCLIPBOARD_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        XCLIPBOARD_CFLAGS=$pkg_cv_XCLIPBOARD_CFLAGS
        XCLIPBOARD_LIBS=$pkg_cv_XCLIPBOARD_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        :
 fi
 
 
-
-
 pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for APPDEFS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
 $as_echo_n "checking for APPDEFS... " >&6; }
 
 if test -n "$APPDEFS_CFLAGS"; then
     pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xt") 2>&5
   ac_status=$?
-  $as_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
   pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
 else
   pkg_failed=yes
@@ -5201,11 +4724,11 @@ if test -n "$APPDEFS_LIBS"; then
     pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xt") 2>&5
   ac_status=$?
-  $as_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
   pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
 else
   pkg_failed=yes
        # Put the nasty error message in config.log where it belongs
        echo "$APPDEFS_PKG_ERRORS" >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
-fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-# Check whether --with-appdefaultdir was given.
-if test "${with_appdefaultdir+set}" = set; then
-  withval=$with_appdefaultdir; appdefaultdir="$withval"
-else
-  appdefaultdir="${xt_appdefaultdir}"
-fi
-
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
+       as_fn_error $? "Package requirements (xt) were not met:
 
+$APPDEFS_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables APPDEFS_CFLAGS
+and APPDEFS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
+Alternatively, you may set the environment variables APPDEFS_CFLAGS
+and APPDEFS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
+       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
+else
+  appdefaultdir="${xt_appdefaultdir}"
+fi
 
 
 
 
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
-
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
-
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
-
-
-
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-
-distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
-
-
-
 ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
@@ -5444,13 +4826,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_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) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -5458,8 +4840,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
   (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 quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -5481,12 +4863,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+    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;}
-    cat confcache >$cache_file
+      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
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+    { $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
@@ -5500,14 +4893,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=`$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
 
@@ -5523,34 +4917,26 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+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.
@@ -5560,17 +4946,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## 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=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -5578,23 +4965,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   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
-
 as_nl='
 '
 export as_nl
@@ -5602,7 +4981,13 @@ export as_nl
 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
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# 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
@@ -5613,7 +4998,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -5636,13 +5021,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -5652,15 +5030,16 @@ fi
 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
 
      ;;
@@ -5672,12 +5051,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  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='> '
@@ -5689,7 +5072,89 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# 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
+
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -5703,8 +5168,12 @@ 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\(//\)$' \| \
@@ -5724,76 +5193,25 @@ $as_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" ||
-    { $as_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
@@ -5822,8 +5240,56 @@ 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
@@ -5842,10 +5308,10 @@ else
       if test -d "$1"; then
        test -d "$1/.";
       else
-       case $1 in
+       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
   '
@@ -5860,13 +5326,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 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 xclipboard $as_me 1.1.0, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+This file was extended by xclipboard $as_me 1.1.1, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -5898,13 +5370,15 @@ _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 [OPTION]... [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
   -q, --quiet, --silent
                    do not print progress messages
   -d, --debug      don't remove temporary files
@@ -5923,16 +5397,17 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xclipboard config.status 1.1.0
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+xclipboard config.status 1.1.1
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2008 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."
 
@@ -5950,11 +5425,16 @@ 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
@@ -5968,27 +5448,29 @@ do
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     $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
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { $as_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 )
     $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -5996,11 +5478,10 @@ Try \`$0 --help' for more information." >&2
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { $as_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
@@ -6055,9 +5536,7 @@ do
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_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
 
@@ -6080,26 +5559,24 @@ 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")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6107,7 +5584,13 @@ $debug ||
 if test -n "$CONFIG_FILES"; then
 
 
-ac_cr='\r'
+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 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
   ac_cs_awk_cr='\\r'
@@ -6115,7 +5598,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -6124,24 +5607,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  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
   . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   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
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_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
@@ -6149,7 +5626,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -6163,7 +5640,7 @@ s/'"$ac_delim"'$//
 t delim
 :nl
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more1
 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
 p
@@ -6177,7 +5654,7 @@ s/.\{148\}//
 t nl
 :delim
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more2
 s/["\\]/\\&/g; s/^/"/; s/$/"/
 p
@@ -6197,7 +5674,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -6229,23 +5706,29 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
+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
@@ -6257,7 +5740,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6269,13 +5752,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -6360,9 +5841,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -6375,9 +5854,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_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
@@ -6396,7 +5873,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
     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 `:'.
@@ -6405,12 +5882,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_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
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
+      as_fn_append ac_file_inputs " '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -6421,7 +5896,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
        `' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+      { $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.
@@ -6433,10 +5908,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -6464,47 +5937,7 @@ $as_echo X"$ac_file" |
            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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_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
@@ -6561,7 +5994,6 @@ 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=
-
 ac_sed_dataroot='
 /datarootdir/ {
   p
@@ -6571,12 +6003,11 @@ ac_sed_dataroot='
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p
-'
+/@mandir@/p'
 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:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+  { $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 || ac_write_fail=1
@@ -6586,7 +6017,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
@@ -6614,27 +6045,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+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"; } &&
-  { $as_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
+  { 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;}
+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";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -6643,27 +6071,21 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+      && 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" \
-       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -6701,7 +6123,7 @@ $as_echo X"$_am_arg" |
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
 $as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
@@ -6796,47 +6218,7 @@ $as_echo X"$file" |
            q
          }
          s/.*/./; q'`
-      { as_dir=$dirpart/$fdir
-  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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
       # echo "creating $dirpart/$file"
       echo '# dummy' > "$dirpart/$file"
     done
@@ -6848,15 +6230,12 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
 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_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -6877,10 +6256,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:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+  { $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
 
index 090ed0f..8cebc79 100644 (file)
@@ -21,21 +21,20 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xclipboard, [1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xclipboard)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xclipboard], [1.1.1],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xclipboard])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-         [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
-
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
-AC_PROG_INSTALL
-
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
 # Checks for pkg-config packages
@@ -44,19 +43,14 @@ if test x$XKBPKG = xxkbfile ; then
     AC_DEFINE([XKB], [1], [Define to use libxkbfile calls like XKBStdBell()])
 fi
 PKG_CHECK_MODULES(XCLIPBOARD, [xaw7 xmu xt x11 ${XKBPKG}])
-AC_SUBST(XCLIPBOARD_CFLAGS)
-AC_SUBST(XCLIPBOARD_LIBS)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
        [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
 
 AC_OUTPUT([Makefile])
index 77494cd..1fddf4c 100644 (file)
@@ -1,7 +1,5 @@
 /*
- * $Xorg: xclipboard.c,v 1.4 2001/02/09 02:05:38 xorgcvs Exp $
- *
- * 
+
 Copyright 1989, 1998  The Open Group
 
 Permission to use, copy, modify, distribute, and sell this software and its
@@ -29,7 +27,10 @@ in this Software without prior written authorization from The Open Group.
  * Reauthored by: Keith Packard, MIT X Consortium.
  * UTF-8 and CTEXT support: Stanislav Maslovski <stanislav.maslovski@gmail.com>
  */
-/* $XFree86: xc/programs/xclipboard/xclipboard.c,v 1.8tsi Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
 #include <X11/Intrinsic.h>
index 83fa613..0bc71f2 100644 (file)
@@ -1,4 +1,3 @@
-.\" $Xorg: xclipboard.man,v 1.4 2001/02/09 02:05:39 xorgcvs Exp $
 .\" Copyright 1988, 1994, 1998  The Open Group
 .\" 
 .\" Permission to use, copy, modify, distribute, and sell this software and its
@@ -23,7 +22,6 @@
 .\" other dealings in this Software without prior written authorization
 .\" from The Open Group.
 .\"
-.\" $XFree86: xc/programs/xclipboard/xclipboard.man,v 1.8 2001/12/14 20:01:16 dawes Exp $
 .\"
 .TH XCLIPBOARD 1 __xorgversion__
 .SH NAME
index 609b83d..690e201 100644 (file)
@@ -1,7 +1,5 @@
 /*
- * $Xorg: xcutsel.c,v 1.4 2001/02/09 02:05:39 xorgcvs Exp $
- *
- * 
+
 Copyright 1989, 1998  The Open Group
 
 Permission to use, copy, modify, distribute, and sell this software and its
@@ -26,7 +24,10 @@ in this Software without prior written authorization from The Open Group.
  * *
  * Author:  Ralph Swick, DEC/Project Athena
  */
-/* $XFree86: xc/programs/xclipboard/xcutsel.c,v 1.7 2001/04/01 14:00:19 tsi Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
index ac8a983..e358a8d 100644 (file)
@@ -1,4 +1,3 @@
-.\" $Xorg: xcutsel.man,v 1.4 2001/02/09 02:05:39 xorgcvs Exp $
 .\" Copyright 1994, 1998  The Open Group
 .\" 
 .\" Permission to use, copy, modify, distribute, and sell this software and its
@@ -23,7 +22,6 @@
 .\" other dealings in this Software without prior written authorization
 .\" from The Open Group.
 .\"
-.\" $XFree86: xc/programs/xclipboard/xcutsel.man,v 1.7 2001/01/27 18:21:09 dawes Exp $
 .\"
 .TH XCUTSEL 1 __xorgversion__
 .SH NAME
diff --git a/xclock/AUTHORS b/xclock/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
index af99eee..11a798a 100644 (file)
@@ -44,35 +44,23 @@ SOFTWARE.
 
     ------------------------------------------------------------
 
-Copyright 2004 Sun Microsystems, Inc.
-All rights reserved.
+Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
 
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
 
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-3. Neither the name of Sun Microsystems, Inc. nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-This software is provided "AS IS," without a warranty of any kind.
-
-ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
-INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
-SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES OR
-LIABILITIES  SUFFERED BY LICENSEE AS A RESULT OF  OR RELATING TO USE,
-MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS DERIVATIVES.
-IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE,
-PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
-INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE
-THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE
-SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
 
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
index bfe00f1..b207cf2 100644 (file)
@@ -1,3 +1,160 @@
+commit 97110e50013fc5735c6220f559588b0be9a8b821
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Sep 23 18:34:13 2010 -0700
+
+    xclock 1.0.5
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 051b0f943db06ee56349dc6a03735f4b4d3f6e0f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b5ce0b4f7e7b36451872df82c37251fc3d860de4
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Thu Aug 26 08:23:41 2010 -0700
+
+    Remove extraneous  reference to HAS_STRLCAT
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit eefa040512ec291da7cc537774e14d24801b784e
+Author: David Coppa <dcoppa@gmail.com>
+Date:   Thu Jul 29 21:46:11 2010 +0200
+
+    Fix a crash on sparc64.
+    
+    The pid variable that is passed to XChangeProperty() is not a long.
+    The libX11 code deferences the variable as a long and on a 64-bit sparc
+    this must be aligned on a 8-byte boundary.
+    
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ed35a91ebdbe54befb003599364434193d5c8078
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 16:50:16 2010 -0700
+
+    Sun's copyrights now belong to Oracle
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cd064a06a4d87c1acb890a0b0f2a543c0e90116b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 16:46:54 2010 -0700
+
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7b8ac4d10c8d745750a015ad50e07d5e3ef704fa
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jun 30 23:25:03 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+    Enables silent rule and use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3f3532422225e23114427ad6f1fbc039e60b64c9
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 13:05:38 2010 -0800
+
+    Update Sun license notices to current X.Org standard form
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit bf3695b37628fda8b06fc5363123cf25c77fe76e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:47 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ee1225481c1c5fe7b6fb9093df5fe4ae9f490e9e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:53 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit baf85e944fbd238586805293025a11f62ee56683
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit 795cd3133fd861d8aa987c76b1227befc641fd17
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:24 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit ff0358b1b151f2f07d6bf4345ef32769dab96365
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:38 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 742033062d0153f8e5dcf1214ac904131a27c2cb
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit 30db8ad3c045a4fbcff171435bb8e56ed792a5ec
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Sep 28 08:31:17 2009 +1000
+
+    Add INSTALL to .gitignore. (#24157)
+    
+    Avoids git error "fatal: Untracked working tree file 'INSTALL' would be
+    overwritten by merge." when switching between pre-1.0.4 and now.
+    
+    X.Org Bug 24157 <http://bugs.freedesktop.org/show_bug.cgi?id=24157>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
 commit 779dd2f2af9a65f96b741c2692d7055bf5970969
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Sep 21 21:05:16 2009 -0700
index cbb0e42..70eb0a1 100644 (file)
@@ -48,38 +48,28 @@ SOFTWARE.
 
 ******************************************************************/
 /*
- * Copyright 2004 Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of Sun Microsystems, Inc. nor the names of its
- *    contributors may be used to endorse or promote products derived from
- *    this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind.
- *
- * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
- * SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES OR
- * LIABILITIES  SUFFERED BY LICENSEE AS A RESULT OF  OR RELATING TO USE,
- * MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS DERIVATIVES.
- * IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE,
- * PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
- * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE
- * THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE
- * SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
  *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/*
  * Authors:  I18N - Steve Swales - March 2000
  *          bgpixmap - Alan Coopersmith (as part of STSF project) - Sept. 2001
  */
@@ -1523,7 +1513,7 @@ clock_tic(XtPointer client_data, XtIntervalId *id)
                XClearArea (dpy, win,
                    clear_from, 0, w->core.width - clear_from, w->core.height,
                    False);
-#if defined(HAS_STRLCAT) || defined(HAVE_STRLCPY)
+#ifdef HAVE_STRLCPY
            strlcpy (w->clock.prev_time_string+i, time_ptr+i,
                     sizeof(w->clock.prev_time_string)-i);
 #else
index 2550dab..8b82ade 100644 (file)
@@ -2,7 +2,7 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+2006, 2007, 2008 Free Software Foundation, Inc.
 
    This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -159,7 +159,7 @@ Particular systems
 CC is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+     ./configure CC="cc -Ae"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
@@ -174,16 +174,6 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
 Specifying the System Type
 ==========================
 
@@ -199,8 +189,7 @@ type, such as `sun4', or a canonical name which has the form:
 
 where SYSTEM can have one of these forms:
 
-     OS
-     KERNEL-OS
+     OS KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
index b2367b7..0f43976 100644 (file)
@@ -44,10 +44,10 @@ dist_appdefault_DATA = \
         app-defaults/XClock
 
 EXTRA_DIST = \
-       ChangeLog \
        clmask.bit \
        clock.bit
 
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(APPDEFAULTFILES)
 
 appmandir = $(APP_MAN_DIR)
@@ -57,35 +57,19 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 EXTRA_DIST += $(appman_PRE)
 CLEANFILES += $(appman_DATA)
 
-MAINTAINERCLEANFILES=ChangeLog
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
-
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+dist-hook: ChangeLog INSTALL
 
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
index 59049ba..60a8f6f 100644 (file)
@@ -60,9 +60,9 @@ bin_PROGRAMS = xclock$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS config.guess config.sub depcomp \
-       install-sh missing
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -184,19 +184,7 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -210,21 +198,13 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-SED = sed
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-XAW_CFLAGS = @XAW_CFLAGS@
-XAW_LIBS = @XAW_LIBS@
 XCLOCK_CFLAGS = @XCLOCK_CFLAGS@
 XCLOCK_LIBS = @XCLOCK_LIBS@
-XCLOCK_X11_CFLAGS = @XCLOCK_X11_CFLAGS@
-XCLOCK_X11_LIBS = @XCLOCK_X11_LIBS@
-XCLOCK_XMU_CFLAGS = @XCLOCK_XMU_CFLAGS@
-XCLOCK_XMU_LIBS = @XCLOCK_XMU_LIBS@
 XFT_CFLAGS = @XFT_CFLAGS@
 XFT_LIBS = @XFT_LIBS@
 XKB_CFLAGS = @XKB_CFLAGS@
@@ -299,15 +279,11 @@ dist_appdefault_DATA = \
         app-defaults/XClock-color \
         app-defaults/XClock
 
-EXTRA_DIST = ChangeLog clmask.bit clock.bit $(appman_PRE)
+EXTRA_DIST = clmask.bit clock.bit $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-MAINTAINERCLEANFILES = ChangeLog
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -320,15 +296,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu Makefile
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -801,15 +777,19 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/xclock/NEWS b/xclock/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
index 1af08a2..dd551e5 100644 (file)
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                    [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test $pkg_failed = yes; then
-       AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+# serial 9
 
-       m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-$$1_PKG_ERRORS
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# serial 10
 
-_PKG_TEXT])[]dnl
-        ])
-elif test $pkg_failed = untried; then
-       AC_MSG_RESULT([no])
-       m4_default([$4], [AC_MSG_FAILURE(
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-_PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
-        ])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       $3
-fi[]dnl
-])# PKG_CHECK_MODULES
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
 
-dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
-dnl
-dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the "Software"),
-dnl to deal in the Software without restriction, including without limitation
-dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
-dnl and/or sell copies of the Software, and to permit persons to whom the
-dnl Software is furnished to do so, subject to the following conditions:
-dnl
-dnl The above copyright notice and this permission notice (including the next
-dnl paragraph) shall be included in all copies or substantial portions of the
-dnl Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-dnl DEALINGS IN THE SOFTWARE.
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To ensure that this macro is defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION],
-#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.11.0])
-m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
-m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
-m4_if(m4_cmp(maj_have, maj_needed), 0,,
-    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
-m4_if(m4_version_compare(vers_have, [$1]), -1,
-    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
-m4_undefine([vers_have])
-m4_undefine([maj_have])
-m4_undefine([maj_needed])
-]) # XORG_MACROS_VERSION
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
 
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       # under Cygwin unix is still defined even with -undef
-       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS="-undef -ansi"
-               AC_MSG_RESULT([yes, with -ansi])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
 else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
+  am_cv_$1_dependencies_compiler_type=none
 fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-# Added MAN_SUBSTS in version 1.8
-# Added AC_PROG_SED in version 1.8
 
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_SED])
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
 
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
 
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
+#serial 5
 
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-XORG_MAN_PAGE="X Version 11"
-AC_SUBST([XORG_MAN_PAGE])
-MAN_SUBSTS="\
-       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|\$(prefix)|g' \
-       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
-AC_SUBST([MAN_SUBSTS])
 
-]) # XORG_MANPAGE_SECTIONS
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
-# ------------------------
-# Minimum version: 1.7.0
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
 #
-# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
-# provided by xorg-sgml-doctools, if installed.
-AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
-AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
-XORG_SGML_PATH=
-PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
-    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
-    [m4_ifval([$1],[:],
-        [if test x"$cross_compiling" != x"yes" ; then
-            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
-                          [XORG_SGML_PATH=$prefix/share/sgml])
-         fi])
-    ])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
-# the path and the name of the doc stylesheet
-if test "x$XORG_SGML_PATH" != "x" ; then
-   AC_MSG_RESULT([$XORG_SGML_PATH])
-   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
-   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
-else
-   AC_MSG_RESULT([no])
-fi
+# serial 8
 
-AC_SUBST(XORG_SGML_PATH)
-AC_SUBST(STYLESHEET_SRCDIR)
-AC_SUBST(XSL_STYLESHEET)
-AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
-]) # XORG_CHECK_SGML_DOCTOOLS
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
-AC_REQUIRE([XORG_WITH_PS2PDF])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_PATH_PROG(LINUXDOC, linuxdoc)
+# serial 16
 
-AC_MSG_CHECKING([whether to build documentation])
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([whether to build pdf documentation])
-
-if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
+AC_SUBST([CYGPATH_W])
 
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
 
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([whether to build text documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
 
-AC_MSG_CHECKING([whether to build PDF documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-AC_MSG_CHECKING([whether to build PostScript documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([whether to build HTML documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+AC_SUBST(install_sh)])
 
-# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
-# ----------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package. When DEFAULT is not specified,
-# --with-xmlto assumes 'auto'.
-#
-# Interface to module:
-# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
-# XMLTO:       returns the path of the xmlto program found
-#              returns the path set by the user in the environment
-# --with-xmlto:        'yes' user instructs the module to use xmlto
-#              'no' user instructs the module not to use xmlto
-#
-# Added in version 1.10.0
-# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
-#                  xmlto for text output requires either lynx, links, or w3m browsers
-#
-# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_XMLTO],[
-AC_ARG_VAR([XMLTO], [Path to xmlto command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(xmlto,
-       AS_HELP_STRING([--with-xmlto],
-          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
-          [use_xmlto=$withval], [use_xmlto=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_xmlto" = x"auto"; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
-       have_xmlto=no
-   else
-        have_xmlto=yes
-   fi
-elif test "x$use_xmlto" = x"yes" ; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
-   fi
-   have_xmlto=yes
-elif test "x$use_xmlto" = x"no" ; then
-   if test "x$XMLTO" != "x"; then
-      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
-   fi
-   have_xmlto=no
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-# Test for a minimum version of xmlto, if provided.
-m4_ifval([$1],
-[if test "$have_xmlto" = yes; then
-    # scrape the xmlto version
-    AC_MSG_CHECKING([the xmlto version])
-    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
-    AC_MSG_RESULT([$xmlto_version])
-    AS_VERSION_COMPARE([$xmlto_version], [$1],
-        [if test "x$use_xmlto" = xauto; then
-            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
-            have_xmlto=no
-        else
-            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
-        fi])
-fi])
-
-# Test for the ability of xmlto to generate a text target
-have_xmlto_text=no
-cat > conftest.xml << "EOF"
-EOF
-AS_IF([test "$have_xmlto" = yes],
-      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
-             [have_xmlto_text=yes],
-             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
-rm -f conftest.xml
-AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
-AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
-]) # XORG_WITH_XMLTO
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
-# ----------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package. When DEFAULT is not specified,
-# --with-asciidoc assumes 'auto'.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Interface to module:
-# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
-# ASCIIDOC:     returns the path of the asciidoc program found
-#               returns the path set by the user in the environment
-# --with-asciidoc: 'yes' user instructs the module to use asciidoc
-#                'no' user instructs the module not to use asciidoc
-#
-# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_ASCIIDOC],[
-AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(asciidoc,
-       AS_HELP_STRING([--with-asciidoc],
-          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
-          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_asciidoc" = x"auto"; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
-       have_asciidoc=no
-   else
-        have_asciidoc=yes
-   fi
-elif test "x$use_asciidoc" = x"yes" ; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
-   fi
-   have_asciidoc=yes
-elif test "x$use_asciidoc" = x"no" ; then
-   if test "x$ASCIIDOC" != "x"; then
-      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
-   fi
-   have_asciidoc=no
-else
-   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-m4_ifval([$1],
-[if test "$have_asciidoc" = yes; then
-    # scrape the asciidoc version
-    AC_MSG_CHECKING([the asciidoc version])
-    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
-    AC_MSG_RESULT([$asciidoc_version])
-    AS_VERSION_COMPARE([$asciidoc_version], [$1],
-        [if test "x$use_asciidoc" = xauto; then
-            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
-            have_asciidoc=no
-        else
-            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
-        fi])
-fi])
-AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
-]) # XORG_WITH_ASCIIDOC
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
 
-# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
-# --------------------------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package. When DEFAULT is not specified,
-# --with-doxygen assumes 'auto'.
-#
-# Interface to module:
-# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
-# DOXYGEN:      returns the path of the doxygen program found
-#               returns the path set by the user in the environment
-# --with-doxygen: 'yes' user instructs the module to use doxygen
-#                'no' user instructs the module not to use doxygen
-#
-# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_DOXYGEN],[
-AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(doxygen,
-       AS_HELP_STRING([--with-doxygen],
-          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
-          [use_doxygen=$withval], [use_doxygen=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_doxygen" = x"auto"; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
-       have_doxygen=no
-   else
-        have_doxygen=yes
-   fi
-elif test "x$use_doxygen" = x"yes" ; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
-   fi
-   have_doxygen=yes
-elif test "x$use_doxygen" = x"no" ; then
-   if test "x$DOXYGEN" != "x"; then
-      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
-   fi
-   have_doxygen=no
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-m4_ifval([$1],
-[if test "$have_doxygen" = yes; then
-    # scrape the doxygen version
-    AC_MSG_CHECKING([the doxygen version])
-    doxygen_version=`$DOXYGEN --version 2>/dev/null`
-    AC_MSG_RESULT([$doxygen_version])
-    AS_VERSION_COMPARE([$doxygen_version], [$1],
-        [if test "x$use_doxygen" = xauto; then
-            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
-            have_doxygen=no
-        else
-            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
-        fi])
-fi])
-AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
-]) # XORG_WITH_DOXYGEN
+])
 
-# XORG_WITH_GROFF([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-groff option, it allows maximum flexibilty in making decisions
-# as whether or not to use the groff package. When DEFAULT is not specified,
-# --with-groff assumes 'auto'.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Interface to module:
-# HAVE_GROFF:   used in makefiles to conditionally generate documentation
-# HAVE_GROFF_MM: the memorandum macros (-mm) package
-# HAVE_GROFF_MS: the -ms macros package
-# GROFF:        returns the path of the groff program found
-#               returns the path set by the user in the environment
-# --with-groff:         'yes' user instructs the module to use groff
-#               'no' user instructs the module not to use groff
-#
-# Added in version 1.9.0:
-# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
-#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
-#                 psselect from the psutils package.
-#                 the ghostcript package. Refer to the grohtml man pages
-#
-# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
-#
-# OS and distros often splits groff in a basic and full package, the former
-# having the groff program and the later having devices, fonts and macros
-# Checking for the groff executable is not enough.
-#
-# If macros are missing, we cannot assume that groff is useless, so we don't
-# unset HAVE_GROFF or GROFF env variables.
-# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
-#
-AC_DEFUN([XORG_WITH_GROFF],[
-AC_ARG_VAR([GROFF], [Path to groff command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(groff,
-       AS_HELP_STRING([--with-groff],
-          [Use groff to regenerate documentation (default: ]_defopt[)]),
-          [use_groff=$withval], [use_groff=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_groff" = x"auto"; then
-   AC_PATH_PROG([GROFF], [groff])
-   if test "x$GROFF" = "x"; then
-        AC_MSG_WARN([groff not found - documentation targets will be skipped])
-       have_groff=no
-   else
-        have_groff=yes
-   fi
-elif test "x$use_groff" = x"yes" ; then
-   AC_PATH_PROG([GROFF], [groff])
-   if test "x$GROFF" = "x"; then
-        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
-   fi
-   have_groff=yes
-elif test "x$use_groff" = x"no" ; then
-   if test "x$GROFF" != "x"; then
-      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
-   fi
-   have_groff=no
-else
-   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
-fi
+# serial 4
 
-# We have groff, test for the presence of the macro packages
-if test "x$have_groff" = x"yes"; then
-    AC_MSG_CHECKING([for ${GROFF} -ms macros])
-    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
-        groff_ms_works=yes
-    else
-        groff_ms_works=no
-    fi
-    AC_MSG_RESULT([$groff_ms_works])
-    AC_MSG_CHECKING([for ${GROFF} -mm macros])
-    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
-        groff_mm_works=yes
-    else
-        groff_mm_works=no
-    fi
-    AC_MSG_RESULT([$groff_mm_works])
-fi
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# We have groff, test for HTML dependencies, one command per package
-if test "x$have_groff" = x"yes"; then
-   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
-   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
-   AC_PATH_PROG(PSSELECT_PATH, [psselect])
-   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
-      have_groff_html=yes
-   else
-      have_groff_html=no
-      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
-   fi
-fi
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
-# Set Automake conditionals for Makefiles
-AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
-AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
-AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
-AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
-]) # XORG_WITH_GROFF
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
-# XORG_WITH_FOP([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-fop option, it allows maximum flexibilty in making decisions
-# as whether or not to use the fop package. When DEFAULT is not specified,
-# --with-fop assumes 'auto'.
-#
-# Interface to module:
-# HAVE_FOP:    used in makefiles to conditionally generate documentation
-# FOP:         returns the path of the fop program found
-#              returns the path set by the user in the environment
-# --with-fop:  'yes' user instructs the module to use fop
-#              'no' user instructs the module not to use fop
-#
-# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
-#
-AC_DEFUN([XORG_WITH_FOP],[
-AC_ARG_VAR([FOP], [Path to fop command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(fop,
-       AS_HELP_STRING([--with-fop],
-          [Use fop to regenerate documentation (default: ]_defopt[)]),
-          [use_fop=$withval], [use_fop=]_defopt)
-m4_undefine([_defopt])
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-if test "x$use_fop" = x"auto"; then
-   AC_PATH_PROG([FOP], [fop])
-   if test "x$FOP" = "x"; then
-        AC_MSG_WARN([fop not found - documentation targets will be skipped])
-       have_fop=no
-   else
-        have_fop=yes
-   fi
-elif test "x$use_fop" = x"yes" ; then
-   AC_PATH_PROG([FOP], [fop])
-   if test "x$FOP" = "x"; then
-        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
-   fi
-   have_fop=yes
-elif test "x$use_fop" = x"no" ; then
-   if test "x$FOP" != "x"; then
-      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
-   fi
-   have_fop=no
-else
-   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
-fi
-AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
-]) # XORG_WITH_FOP
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# XORG_WITH_PS2PDF([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
-# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
-# --with-ps2pdf assumes 'auto'.
-#
-# Interface to module:
-# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
-# PS2PDF:      returns the path of the ps2pdf program found
-#              returns the path set by the user in the environment
-# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
-#               'no' user instructs the module not to use ps2pdf
-#
-# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_PS2PDF],[
-AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(ps2pdf,
-       AS_HELP_STRING([--with-ps2pdf],
-          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
-          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_ps2pdf" = x"auto"; then
-   AC_PATH_PROG([PS2PDF], [ps2pdf])
-   if test "x$PS2PDF" = "x"; then
-        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
-       have_ps2pdf=no
-   else
-        have_ps2pdf=yes
-   fi
-elif test "x$use_ps2pdf" = x"yes" ; then
-   AC_PATH_PROG([PS2PDF], [ps2pdf])
-   if test "x$PS2PDF" = "x"; then
-        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
-   have_ps2pdf=yes
-elif test "x$use_ps2pdf" = x"no" ; then
-   if test "x$PS2PDF" != "x"; then
-      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
    fi
-   have_ps2pdf=no
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
 fi
-AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
-]) # XORG_WITH_PS2PDF
+AC_MSG_RESULT(yes)])
 
-# XORG_ENABLE_DOCS (enable_docs=yes)
-# ----------------
-# Minimum version: 1.6.0
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a builder to skip all
-# documentation targets except traditional man pages.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
-# --enable-docs: 'yes' user instructs the module to generate docs
-#               'no' user instructs the module not to generate docs
-# parm1:       specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_DOCS],[
-m4_define([default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(docs,
-       AS_HELP_STRING([--enable-docs],
-          [Enable building the documentation (default: ]default[)]),
-          [build_docs=$enableval], [build_docs=]default)
-m4_undefine([default])
-AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
-AC_MSG_CHECKING([whether to build documentation])
-AC_MSG_RESULT([$build_docs])
-]) # XORG_ENABLE_DOCS
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
-# ----------------
-# Minimum version: 1.6.0
-#
-# This macro enables a builder to skip all developer documentation.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
-# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
-#                      'no' user instructs the module not to generate developer docs
-# parm1:               specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
-m4_define([devel_default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(devel-docs,
-       AS_HELP_STRING([--enable-devel-docs],
-          [Enable building the developer documentation (default: ]devel_default[)]),
-          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
-m4_undefine([devel_default])
-AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
-AC_MSG_CHECKING([whether to build developer documentation])
-AC_MSG_RESULT([$build_devel_docs])
-]) # XORG_ENABLE_DEVEL_DOCS
+# serial 1
 
-# XORG_ENABLE_SPECS (enable_specs=yes)
-# ----------------
-# Minimum version: 1.6.0
-#
-# This macro enables a builder to skip all functional specification targets.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_SPECS:                used in makefiles to conditionally generate specs
-# --enable-specs:      'yes' user instructs the module to generate specs
-#                      'no' user instructs the module not to generate specs
-# parm1:               specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_SPECS],[
-m4_define([spec_default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(specs,
-       AS_HELP_STRING([--enable-specs],
-          [Enable building the specs (default: ]spec_default[)]),
-          [build_specs=$enableval], [build_specs=]spec_default)
-m4_undefine([spec_default])
-AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
-AC_MSG_CHECKING([whether to build functional specifications])
-AC_MSG_RESULT([$build_specs])
-]) # XORG_ENABLE_SPECS
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AS_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no],
-               [MALLOC_ZERO_RETURNS_NULL=yes])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
 fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# This macro enables the use of a tool that flags some suspicious and
-# non-portable constructs (likely to be bugs) in C language source code.
-# It will attempt to locate the tool and use appropriate options.
-# There are various lint type tools on different platforms.
-#
-# Interface to module:
-# LINT:                returns the path to the tool found on the platform
-#              or the value set to LINT on the configure cmd line
-#              also an Automake conditional
-# LINT_FLAGS:  an Automake variable with appropriate flags
-#
-# --with-lint: 'yes' user instructs the module to use lint
-#              'no' user instructs the module not to use lint (default)
-#
-# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
-# If the user sets the value of LINT_FLAGS, they are used verbatim.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_LINT],[
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_ARG_VAR([LINT], [Path to a lint-style command])
-AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
-AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
+# serial 2
 
-# Obtain platform specific info like program name and options
-# The lint program on FreeBSD and NetBSD is different from the one on Solaris
-case $host_os in
-  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
-       lint_name=splint
-       lint_options="-badflag"
-       ;;
-  *freebsd* | *netbsd*)
-       lint_name=lint
-       lint_options="-u -b"
-       ;;
-  *solaris*)
-       lint_name=lint
-       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-       ;;
-esac
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
 
-# Test for the presence of the program (either guessed by the code or spelled out by the user)
-if test "x$use_lint" = x"yes" ; then
-   AC_PATH_PROG([LINT], [$lint_name])
-   if test "x$LINT" = "x"; then
-        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
-   fi
-elif test "x$use_lint" = x"no" ; then
-   if test "x$LINT" != "x"; then
-      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
-   fi
-else
-   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
-fi
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
-# User supplied flags override default flags
-if test "x$LINT_FLAGS" != "x"; then
-   lint_options=$LINT_FLAGS
-fi
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-AC_SUBST([LINT_FLAGS],[$lint_options])
-AM_CONDITIONAL(LINT, [test "x$LINT" != x])
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-]) # XORG_WITH_LINT
+# serial 2
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# Interface to module:
-# LINTLIB              - Automake variable with the name of lint library file to make
-# MAKE_LINT_LIB                - Automake conditional
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
 #
-# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
-#                        - 'no' user instructs the module not to create a lint library (default)
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-if test "x$make_lint_lib" = x"yes" ; then
-   LINTLIB=llib-l$1.ln
-   if test "x$LINT" = "x"; then
-        AC_MSG_ERROR([Cannot make lint library without --with-lint])
-   fi
-elif test "x$make_lint_lib" != x"no" ; then
-   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
-fi
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
 
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
-]) # XORG_LINT_LIBRARY
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
-# XORG_CWARNFLAGS
-# ---------------
-# Minimum version: 1.2.0
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
 #
-# Defines CWARNFLAGS to enable C compiler warnings.
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
 #
-AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC_C99])
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-]) # XORG_CWARNFLAGS
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.0])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
 
-# XORG_STRICT_OPTION
-# -----------------------
-# Minimum version: 1.3.0
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
 #
-# Add configure option to enable strict compilation
-AC_DEFUN([XORG_STRICT_OPTION], [
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
-AC_REQUIRE([AC_PROG_CC_C99])
-AC_REQUIRE([XORG_CWARNFLAGS])
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
-AC_ARG_ENABLE(strict-compilation,
-                         AS_HELP_STRING([--enable-strict-compilation],
-                         [Enable all warnings from compiler and make them errors (default: disabled)]),
-                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
-if test "x$STRICT_COMPILE" = "xyes"; then
-       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
-       if test "x$GCC" = xyes ; then
-               STRICT_CFLAGS="-pedantic -Werror"
-       elif test "x$SUNCC" = "xyes"; then
-               STRICT_CFLAGS="-errwarn"
-    elif test "x$INTELCC" = "xyes"; then
-               STRICT_CFLAGS="-Werror"
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
        fi
 fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
-]) # XORG_STRICT_OPTION
+rm -f conftest.$ac_ext
 
-# XORG_DEFAULT_OPTIONS
-# --------------------
-# Minimum version: 1.3.0
-#
-# Defines default options for X.Org modules.
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
+
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-AC_DEFUN([XORG_DEFAULT_OPTIONS], [
-AC_REQUIRE([AC_PROG_INSTALL])
-XORG_CWARNFLAGS
-XORG_STRICT_OPTION
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-XORG_INSTALL
-XORG_MANPAGE_SECTIONS
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
-    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
-]) # XORG_DEFAULT_OPTIONS
-
-# XORG_INSTALL()
-# ----------------
-# Minimum version: 1.4.0
-#
-# Defines the variable INSTALL_CMD as the command to copy
-# INSTALL from $prefix/share/util-macros.
-#
-AC_DEFUN([XORG_INSTALL], [
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
-INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-AC_SUBST([INSTALL_CMD])
-]) # XORG_INSTALL
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
-])
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
-# XORG_CHANGELOG()
-# ----------------
-# Minimum version: 1.2.0
-#
-# Defines the variable CHANGELOG_CMD as the command to generate
-# ChangeLog from git.
-#
-#
-AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-AC_SUBST([CHANGELOG_CMD])
-]) # XORG_CHANGELOG
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
 
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+]) # XORG_MANPAGE_SECTIONS
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
 else
-  $1_TRUE='#'
-  $1_FALSE=
+   AC_MSG_RESULT([no])
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+AC_PATH_PROG(LINUXDOC, linuxdoc)
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+AC_MSG_CHECKING([whether to build documentation])
 
-  cd ..
-  rm -rf conftest.dir
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
 else
-  am_cv_$1_dependencies_compiler_type=none
+   BUILDDOC=no
 fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
 
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_MSG_RESULT([$BUILDDOC])
 
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
 fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
 
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# serial 8
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
+fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# serial 16
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
+fi
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
+
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
 fi
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
 fi
-AC_SUBST([CYGPATH_W])
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
 
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES(CC)],
-                 [define([AC_PROG_CC],
-                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES(CXX)],
-                 [define([AC_PROG_CXX],
-                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES(OBJC)],
-                 [define([AC_PROG_OBJC],
-                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
 
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
 
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
 fi
-AC_SUBST(install_sh)])
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
 else
-  am__leading_dot=_
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
 
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
 
-# serial 4
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
 
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
 
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
 
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+]) # XORG_WITH_LINT
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
+fi
 
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+]) # XORG_LINT_LIBRARY
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
 
-# serial 5
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
 
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
-AC_MSG_RESULT(yes)])
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-# serial 1
 
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
-# serial 2
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
 
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-# serial 2
+$$1_PKG_ERRORS
 
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+_PKG_TEXT
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
old mode 100755 (executable)
new mode 100644 (file)
index da83314..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-04-27'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
        SUN_ARCH="i386"
@@ -548,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -656,7 +660,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -807,12 +811,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd | genuineintel)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -822,6 +826,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +858,20 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +894,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -882,78 +914,34 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
        exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,8 +950,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -977,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -986,66 +980,6 @@ EOF
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1074,7 +1008,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1182,7 +1116,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
old mode 100755 (executable)
new mode 100644 (file)
index a39437d..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-04-17'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -149,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -275,26 +283,38 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -325,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -337,7 +357,7 @@ case $basic_machine in
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -359,21 +379,24 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -467,6 +490,19 @@ case $basic_machine in
                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
                os=-linux
                ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -719,6 +755,9 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -823,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1057,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1240,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1260,9 +1301,9 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1275,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1283,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1416,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1456,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1613,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index a44e8c4..58f3968 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for xclock 1.0.4.
+# Generated by GNU Autoconf 2.68 for xclock 1.0.5.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # 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
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       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 test x$as_have_required = xno; then :
@@ -553,8 +561,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='xclock'
 PACKAGE_TARNAME='xclock'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='xclock 1.0.4'
+PACKAGE_VERSION='1.0.5'
+PACKAGE_STRING='xclock 1.0.5'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
@@ -601,18 +609,12 @@ LIBOBJS
 appdefaultdir
 APPDEFS_LIBS
 APPDEFS_CFLAGS
-XCLOCK_LIBS
-XCLOCK_CFLAGS
 XKB_LIBS
 XKB_CFLAGS
 XFT_LIBS
 XFT_CFLAGS
-XAW_LIBS
-XAW_CFLAGS
-XCLOCK_XMU_LIBS
-XCLOCK_XMU_CFLAGS
-XCLOCK_X11_LIBS
-XCLOCK_X11_CFLAGS
+XCLOCK_LIBS
+XCLOCK_CFLAGS
 AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
 MAN_SUBSTS
@@ -639,8 +641,6 @@ build_vendor
 build_cpu
 build
 INSTALL_CMD
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
 PKG_CONFIG
 CHANGELOG_CMD
 CWARNFLAGS
@@ -748,14 +748,8 @@ LIBS
 CPPFLAGS
 CPP
 PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-XCLOCK_X11_CFLAGS
-XCLOCK_X11_LIBS
-XCLOCK_XMU_CFLAGS
-XCLOCK_XMU_LIBS
-XAW_CFLAGS
-XAW_LIBS
+XCLOCK_CFLAGS
+XCLOCK_LIBS
 XFT_CFLAGS
 XFT_LIBS
 XKB_CFLAGS
@@ -1166,7 +1160,7 @@ Try \`$0 --help' for more information"
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1304,7 +1298,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xclock 1.0.4 to adapt to many kinds of systems.
+\`configure' configures xclock 1.0.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1374,7 +1368,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xclock 1.0.4:";;
+     short | recursive ) echo "Configuration of xclock 1.0.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1411,20 +1405,9 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  XCLOCK_X11_CFLAGS
-              C compiler flags for XCLOCK_X11, overriding pkg-config
-  XCLOCK_X11_LIBS
-              linker flags for XCLOCK_X11, overriding pkg-config
-  XCLOCK_XMU_CFLAGS
-              C compiler flags for XCLOCK_XMU, overriding pkg-config
-  XCLOCK_XMU_LIBS
-              linker flags for XCLOCK_XMU, overriding pkg-config
-  XAW_CFLAGS  C compiler flags for XAW, overriding pkg-config
-  XAW_LIBS    linker flags for XAW, overriding pkg-config
+  XCLOCK_CFLAGS
+              C compiler flags for XCLOCK, overriding pkg-config
+  XCLOCK_LIBS linker flags for XCLOCK, overriding pkg-config
   XFT_CFLAGS  C compiler flags for XFT, overriding pkg-config
   XFT_LIBS    linker flags for XFT, overriding pkg-config
   XKB_CFLAGS  C compiler flags for XKB, overriding pkg-config
@@ -1500,8 +1483,8 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xclock configure 1.0.4
-generated by GNU Autoconf 2.67
+xclock configure 1.0.5
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1547,7 +1530,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1563,7 +1546,7 @@ ac_fn_c_check_decl ()
   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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1594,7 +1577,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 
@@ -1630,7 +1613,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1672,7 +1655,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1686,7 +1669,7 @@ 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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1704,7 +1687,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1749,7 +1732,7 @@ fi
   # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -1762,7 +1745,7 @@ 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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1817,15 +1800,15 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  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 xclock $as_me 1.0.4, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by xclock $as_me 1.0.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2083,7 +2066,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&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 $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2220,7 +2203,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $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 :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2307,11 +2290,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2397,7 +2380,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2437,7 +2420,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2490,7 +2473,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2541,7 +2524,7 @@ do
 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 test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2581,7 +2564,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2639,7 +2622,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xclock'
- VERSION='1.0.4'
+ VERSION='1.0.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2703,7 +2686,8 @@ fi
 
 
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+
 
 
 
@@ -2714,9 +2698,66 @@ fi
 
 
 
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
 
 
-ac_config_headers="$ac_config_headers config.h"
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -2729,7 +2770,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2769,7 +2810,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2822,7 +2863,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2862,7 +2903,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2921,7 +2962,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2965,7 +3006,7 @@ do
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3020,7 +3061,7 @@ 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;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3135,7 +3176,7 @@ 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;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3178,7 +3219,7 @@ 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 compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3237,7 +3278,7 @@ $as_echo "$ac_try_echo"; } >&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 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3248,7 +3289,7 @@ 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 test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3289,7 +3330,7 @@ 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;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3299,7 +3340,7 @@ 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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3336,7 +3377,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 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 test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3414,7 +3455,7 @@ else
 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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3508,74 +3549,12 @@ 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
 
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3698,11 +3677,9 @@ else
 fi
 
 
-
-
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+if ${ac_cv_prog_cc_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c99=no
@@ -3890,7 +3867,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4006,7 +3983,7 @@ 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 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4018,7 +3995,7 @@ 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 test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4081,7 +4058,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4148,7 +4125,7 @@ $as_echo "$ac_cv_path_EGREP" >&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 test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4277,17 +4254,13 @@ done
 
 
 
-
-
-
-
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -4330,7 +4303,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4393,6 +4366,7 @@ $as_echo "yes" >&6; }
 $as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
+
 fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -4400,7 +4374,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -4416,7 +4390,7 @@ fi
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4434,7 +4408,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -4449,7 +4423,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4467,7 +4441,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -4549,7 +4523,7 @@ if  test "x$GCC" = xyes ; then
     esac
 else
     ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
@@ -4575,14 +4549,14 @@ fi
 
 if test "x$STRICT_COMPILE" = "xyes"; then
        ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
 fi
 
        ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then :
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
   INTELCC="yes"
 else
   INTELCC="no"
@@ -4744,287 +4718,782 @@ AM_BACKSLASH='\'
 
 
 
-for ac_func in strlcpy getpid
-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
-_ACEOF
-
-fi
-done
+ac_config_headers="$ac_config_headers config.h"
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv" >&5
-$as_echo_n "checking for library containing iconv... " >&6; }
-if test "${ac_cv_search_iconv+set}" = set; then :
+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
+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
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* 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 iconv ();
-int
-main ()
-{
-return iconv ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' iconv; 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"
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_iconv=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_iconv+set}" = set; then :
-  break
-fi
 done
-if test "${ac_cv_search_iconv+set}" = set; then :
+  done
+IFS=$as_save_IFS
 
-else
-  ac_cv_search_iconv=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv" >&5
-$as_echo "$ac_cv_search_iconv" >&6; }
-ac_res=$ac_cv_search_iconv
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-$as_echo "#define HAVE_ICONV 1" >>confdefs.h
-
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCLOCK_X11" >&5
-$as_echo_n "checking for XCLOCK_X11... " >&6; }
-
-if test -n "$XCLOCK_X11_CFLAGS"; then
-    pkg_cv_XCLOCK_X11_CFLAGS="$XCLOCK_X11_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XCLOCK_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
-else
-  pkg_failed=yes
 fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XCLOCK_X11_LIBS"; then
-    pkg_cv_XCLOCK_X11_LIBS="$XCLOCK_X11_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XCLOCK_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+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
+{ $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
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+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
+{ $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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+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
+{ $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.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # 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+' '}$@"
+  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; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+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
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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;}
+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
+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 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=$?
+  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
+
+{ $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  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
+{ $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
+{ $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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
+{ $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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    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_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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];
+
+/* 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 **, 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;
+}
+_ACEOF
+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 :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  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 :
+
+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
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
 
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+  cd ..
+  rm -rf conftest.dir
 else
-        _pkg_short_errors_supported=no
+  am_cv_CC_dependencies_compiler_type=none
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               XCLOCK_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
-        else
-               XCLOCK_X11_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XCLOCK_X11_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (x11) were not met:
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-$XCLOCK_X11_PKG_ERRORS
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XCLOCK_X11_CFLAGS
-and XCLOCK_X11_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables XCLOCK_X11_CFLAGS
-and XCLOCK_X11_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
-       XCLOCK_X11_CFLAGS=$pkg_cv_XCLOCK_X11_CFLAGS
-       XCLOCK_X11_LIBS=$pkg_cv_XCLOCK_X11_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+
+for ac_func in strlcpy getpid
+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
+_ACEOF
 
 fi
+done
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCLOCK_XMU" >&5
-$as_echo_n "checking for XCLOCK_XMU... " >&6; }
 
-if test -n "$XCLOCK_XMU_CFLAGS"; then
-    pkg_cv_XCLOCK_XMU_CFLAGS="$XCLOCK_XMU_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmu") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XCLOCK_XMU_CFLAGS=`$PKG_CONFIG --cflags "xmu" 2>/dev/null`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv" >&5
+$as_echo_n "checking for library containing iconv... " >&6; }
+if ${ac_cv_search_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* 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 iconv ();
+int
+main ()
+{
+return iconv ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' iconv; 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_iconv=$ac_res
 fi
- else
-    pkg_failed=untried
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_iconv+:} false; then :
+  break
 fi
-if test -n "$XCLOCK_XMU_LIBS"; then
-    pkg_cv_XCLOCK_XMU_LIBS="$XCLOCK_XMU_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmu") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XCLOCK_XMU_LIBS=`$PKG_CONFIG --libs "xmu" 2>/dev/null`
+done
+if ${ac_cv_search_iconv+:} false; then :
+
 else
-  pkg_failed=yes
+  ac_cv_search_iconv=no
 fi
- else
-    pkg_failed=untried
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv" >&5
+$as_echo "$ac_cv_search_iconv" >&6; }
+ac_res=$ac_cv_search_iconv
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
 
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               XCLOCK_XMU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmu" 2>&1`
-        else
-               XCLOCK_XMU_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmu" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XCLOCK_XMU_PKG_ERRORS" >&5
-
-       as_fn_error $? "Package requirements (xmu) were not met:
-
-$XCLOCK_XMU_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XCLOCK_XMU_CFLAGS
-and XCLOCK_XMU_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XCLOCK_XMU_CFLAGS
-and XCLOCK_XMU_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
-       XCLOCK_XMU_CFLAGS=$pkg_cv_XCLOCK_XMU_CFLAGS
-       XCLOCK_XMU_LIBS=$pkg_cv_XCLOCK_XMU_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XAW" >&5
-$as_echo_n "checking for XAW... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCLOCK" >&5
+$as_echo_n "checking for XCLOCK... " >&6; }
 
-if test -n "$XAW_CFLAGS"; then
-    pkg_cv_XAW_CFLAGS="$XAW_CFLAGS"
+if test -n "$XCLOCK_CFLAGS"; then
+    pkg_cv_XCLOCK_CFLAGS="$XCLOCK_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu x11") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XAW_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
+  pkg_cv_XCLOCK_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
  else
     pkg_failed=untried
 fi
-if test -n "$XAW_LIBS"; then
-    pkg_cv_XAW_LIBS="$XAW_LIBS"
+if test -n "$XCLOCK_LIBS"; then
+    pkg_cv_XCLOCK_LIBS="$XCLOCK_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu x11") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XAW_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
+  pkg_cv_XCLOCK_LIBS=`$PKG_CONFIG --libs "xaw7 xmu x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -5035,8 +5504,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5044,47 +5511,44 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7" 2>&1`
+               XCLOCK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu x11" 2>&1`
         else
-               XAW_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7" 2>&1`
+               XCLOCK_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu x11" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$XAW_PKG_ERRORS" >&5
+       echo "$XCLOCK_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (xaw7) were not met:
+       as_fn_error $? "Package requirements (xaw7 xmu x11) were not met:
 
-$XAW_PKG_ERRORS
+$XCLOCK_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XAW_CFLAGS
-and XAW_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+Alternatively, you may set the environment variables XCLOCK_CFLAGS
+and XCLOCK_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XAW_CFLAGS
-and XAW_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XCLOCK_CFLAGS
+and XCLOCK_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
-       XAW_CFLAGS=$pkg_cv_XAW_CFLAGS
-       XAW_LIBS=$pkg_cv_XAW_LIBS
+       XCLOCK_CFLAGS=$pkg_cv_XCLOCK_CFLAGS
+       XCLOCK_LIBS=$pkg_cv_XCLOCK_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
-XCLOCK_CFLAGS="$XCLOCK_X11_CFLAGS $XAW_CFLAGS $XCLOCK_XMU_CFLAGS"
-XCLOCK_LIBS="$XCLOCK_X11_LIBS $XAW_LIBS $XCLOCK_XMU_LIBS"
 
 
 # Check whether --with-xft was given.
@@ -5136,8 +5600,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5161,10 +5623,9 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables XFT_CFLAGS
 and XFT_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
@@ -5176,17 +5637,17 @@ and XFT_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        XFT_CFLAGS=$pkg_cv_XFT_CFLAGS
        XFT_LIBS=$pkg_cv_XFT_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5
 $as_echo_n "checking for library containing sqrt... " >&6; }
-if test "${ac_cv_search_sqrt+set}" = set; then :
+if ${ac_cv_search_sqrt+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -5220,11 +5681,11 @@ for ac_lib in '' m; do
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_sqrt+set}" = set; then :
+  if ${ac_cv_search_sqrt+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_sqrt+set}" = set; then :
+if ${ac_cv_search_sqrt+:} false; then :
 
 else
   ac_cv_search_sqrt=no
@@ -5300,8 +5761,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5325,10 +5784,9 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables XKB_CFLAGS
 and XKB_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
@@ -5340,13 +5798,13 @@ and XKB_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        XKB_CFLAGS=$pkg_cv_XKB_CFLAGS
        XKB_LIBS=$pkg_cv_XKB_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
        XCLOCK_CFLAGS="$XCLOCK_CFLAGS $XKB_CFLAGS"
        XCLOCK_LIBS="$XCLOCK_LIBS $XKB_LIBS"
@@ -5399,8 +5857,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5424,10 +5880,9 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables APPDEFS_CFLAGS
 and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
@@ -5439,15 +5894,15 @@ and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
        APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
 # Check whether --with-appdefaultdir was given.
 if test "${with_appdefaultdir+set}" = set; then :
@@ -5524,10 +5979,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
+    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;}
-    cat confcache >$cache_file
+      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
     { $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;}
@@ -5578,8 +6044,12 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
-: ${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"
@@ -5680,6 +6150,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5986,8 +6457,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xclock $as_me 1.0.4, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by xclock $as_me 1.0.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6052,8 +6523,8 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xclock config.status 1.0.4
-configured by $0, generated by GNU Autoconf 2.67,
+xclock config.status 1.0.5
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -6181,11 +6652,11 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -6208,9 +6679,10 @@ 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 'as_fn_exit 1' 1 2 13 15
 }
@@ -6218,12 +6690,13 @@ $debug ||
 
 {
   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")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6245,7 +6718,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -6273,7 +6746,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -6321,7 +6794,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -6353,7 +6826,7 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -6387,7 +6860,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6399,8 +6872,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  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
@@ -6501,7 +6974,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -6520,7 +6993,7 @@ do
     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 `:'.
@@ -6529,7 +7002,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+          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
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -6555,8 +7028,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -6692,21 +7165,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+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"; } &&
+  { 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";;
+  -) 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
  ;;
@@ -6717,20 +7191,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && 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" "$tmp/config.h" >/dev/null 2>&1; then
+    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" \
+      mv "$ac_tmp/config.h" "$ac_file" \
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
index 7b7d137..85cef18 100644 (file)
@@ -21,21 +21,25 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xclock,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xclock)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xclock],
+       [1.0.5],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+       [xclock])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
 
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AC_PROG_INSTALL
 
-XORG_DEFAULT_OPTIONS
 
 AC_CHECK_FUNCS([strlcpy getpid])
 
@@ -43,11 +47,7 @@ AC_SEARCH_LIBS([iconv], [iconv],
        [AC_DEFINE(HAVE_ICONV, 1, [Define to 1 if iconv() is available.])])
 
 dnl Required dependencies
-PKG_CHECK_MODULES(XCLOCK_X11, x11)
-PKG_CHECK_MODULES(XCLOCK_XMU, xmu) 
-PKG_CHECK_MODULES(XAW, xaw7)
-XCLOCK_CFLAGS="$XCLOCK_X11_CFLAGS $XAW_CFLAGS $XCLOCK_XMU_CFLAGS"
-XCLOCK_LIBS="$XCLOCK_X11_LIBS $XAW_LIBS $XCLOCK_XMU_LIBS"
+PKG_CHECK_MODULES(XCLOCK, xaw7 xmu x11)
 
 dnl Optional dependencies
 AC_ARG_WITH(xft, AC_HELP_STRING([--with-xft],[Use Xft2 and Xrender for rendering (Default is YES)]),use_xft="$withval",use_xft="try")
@@ -72,7 +72,7 @@ AC_SUBST(XCLOCK_CFLAGS)
 AC_SUBST(XCLOCK_LIBS)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
index 6b80ad0..5965a83 100644 (file)
@@ -215,7 +215,7 @@ main(int argc, char *argv[])
 
 #ifdef HAVE_GETPID
     {
-       pid_t pid = getpid();
+       unsigned long pid = (unsigned long)getpid();
        XChangeProperty(XtDisplay(toplevel), XtWindow(toplevel),
                        XInternAtom(XtDisplay(toplevel), "_NET_WM_PID", False),
                        XA_CARDINAL, 32, PropModeReplace,
diff --git a/xconsole-1.0.3-streams-me-softer.patch b/xconsole-1.0.3-streams-me-softer.patch
new file mode 100644 (file)
index 0000000..354eccc
--- /dev/null
@@ -0,0 +1,11 @@
+diff -up xconsole-1.0.3/xconsole.c.jx xconsole-1.0.3/xconsole.c
+--- xconsole-1.0.3/xconsole.c.jx       2006-08-21 16:31:38.000000000 -0400
++++ xconsole-1.0.3/xconsole.c  2008-04-04 14:12:33.000000000 -0400
+@@ -182,7 +182,6 @@ static XrmOptionDescRec options[] = {
+ # endif
+ # if defined (SVR4) || defined (USE_PTS)
+ #  include <termios.h>
+-#  include <sys/stropts.h>            /* for I_PUSH */
+ #  ifdef sun
+ #   include <sys/strredir.h>
+ #  endif
diff --git a/xconsole/AUTHORS b/xconsole/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
index 7f33cbf..b360ea2 100644 (file)
@@ -1,12 +1,21 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright 1990, 1994, 1998  The Open Group
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
index 505127b..87af04d 100644 (file)
+commit d71b95d96588e1ca020fa15db6ceb3050d41bbdc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Sep 23 19:31:52 2010 -0700
+
+    xconsole 1.0.4
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7507dea14fdc259d50dd1e2693d4f3cd5235eeb4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Sep 23 19:28:30 2010 -0700
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 49bc4d3002ede196319bfc2829dda169c706e300
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 53fdc18e1723eb42596ad72ccd0e84ebfbd0a0e4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 08:47:48 2010 -0700
+
+    Fill in COPYING file with copyright notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3105c7119df08bab8d1668997c6b332ba5ff732c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 17:05:25 2010 -0700
+
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ee142aaa65ef5a96b205110b8fa7dc5f9fe4fc20
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jun 30 23:25:03 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+    Enables silent rule and use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fee6d15b7cc5f1fad77fed4988bd856399e5750a
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:06 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 45fd4b1fa6f81acd33d183b00b060a69087da194
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:47 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 89dbe10377a39ee7001d1c34ce8f01aa209bb376
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:53 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit 11cd7489b6f96f194171be418bf9112b5f1cbc1d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit fe30cb2c210cf51b239505deaac63593a0ab53f9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:24 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 41d1f93ec0cfd8754d3c6f81bb4cb113328291cd
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit 099fc3d0dd7b769693bf1bce70112e1e13fe5336
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:21 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 3254ca74de650838e46a551e7c567a79fd971503
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Aug 3 16:26:13 2009 -0700
+
+    Remove errant #error I_PUSH from SVR4 code path
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 58c8fc6828c07867955882f9126b116edc2036d2
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sat Jul 25 14:08:41 2009 +1000
+
+    Prevent inclusion of stropts.h on Linux.
+    
+    Systems like Linux/glibc that have openpty() will not mess around with SVR4
+    like stream modules, so no need to include streams related headers.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit acc7c587322e2f1952900ad554061c5a8d08f7c3
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Mon Jan 19 20:16:40 2009 -0200
+
+    Ansification and compile warning fixes.
+    
+      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
+    make distcheck and all gcc 4.3 and sparse warnings.
+
+commit 5b3da5679d78ac025358ba0e4beb35e8a9cacd5c
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Nov 16 21:25:33 2008 +0100
+
+    Fix header inclusion for openpty()
+    
+    AC_CHECK_HEADERS(foo.h) defines HAVE_FOO_H, not HAS_FOO_H.
+    This fixes a compiler warning:
+    xconsole.c:839: warning: implicit declaration of function 'openpty'
+
+commit 9f690af8ed736ffcae0f0e3771bbc4ab851f8202
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Wed Aug 20 10:32:50 2008 -0400
+
+    xaw8 is gone, use xaw7
+
+commit 0ac48669dfcfd2760eaab31c934ff0b83ff2dd2c
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri May 16 14:24:55 2008 +0200
+
+    $(builddir) is the current directory
+    
+    Apparently automake doesn't always export the builddir variable.
+    This fixes my previous commit.
+
+commit 6e305f9cdfaffd87f1852a1c24271b10b0bd5079
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Apr 20 19:48:09 2008 +0200
+
+    Fix build with builddir != srcdir
+
+commit e321bfbe9970a89d486437ed5eedcd83a10a749e
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:07:41 2008 -0700
+
+    Build fix for file systems that are not case sensitive
+
+commit 2f9d3842be3d5d58270e54821552735cdb098075
+Merge: d5ffc49... cda9968...
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:59:57 2007 -0400
+
+    Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/app/xconsole
+
+commit d5ffc49536871784f269ba938566fa77733b16e3
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:51:18 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
 commit cda9968cea772dbc94b50d791a5be62203ae9ddf
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Aug 20 18:58:33 2007 -0700
 
     Version bump: 1.0.3
 
-configure.ac
-
 commit 9eee6c49bd6f57d51c517a6703cac2f29732231a
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Aug 20 18:54:22 2007 -0700
 
     Add *~ to .gitignore to skip patch/emacs droppings
 
-.gitignore
-
 commit d1e90da451da71d7d362236c5709d9931ab7b9d1
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Aug 20 18:53:41 2007 -0700
 
     Replace xconsole_CFLAGS with AM_CFLAGS to make automake-1.10 happier
 
-Makefile.am
-
 commit 3d4f2f96fc661095ce615928e6b586784f5d35e5
 Author: Matthieu Herrb <matthieu.herrb@laas.fr>
 Date:   Sun Jul 30 18:42:08 2006 +0200
 
     Check if openpty() is available and use it if it is.
 
-configure.ac
-xconsole.c
-
 commit 5bdbbecf51e3a73c6660498f8598f0731b43a703
 Author: Matthieu Herrb <matthieu.herrb@laas.fr>
 Date:   Sun Jul 30 16:31:03 2006 +0200
 
     Remove ChangeLog, replace with a rule that generates it using git-log
 
-ChangeLog
-Makefile.am
-
 commit c8a026e7c8457cd726f8f6fbd74ade325a9f486e
 Author: Matthieu Herrb <matthieu.herrb@laas.fr>
 Date:   Sun Jul 30 16:29:10 2006 +0200
 
     rename .cvsignore -> .gitignore
 
-.cvsignore
-.gitignore
-
 commit 86e5d9ca5836d4ad02faa1a5f9c0db239464bde1
 Author: Adam Jackson <ajax@nwnk.net>
 Date:   Wed Apr 26 23:38:08 2006 +0000
 
     Bump to 1.0.2
 
-ChangeLog
-configure.ac
-
 commit 219ef4e86f05e7a473e399c5188efdb7f16f31f1
 Author: Matthieu Herrb <matthieu.herrb@laas.fr>
 Date:   Sat Mar 18 18:31:08 2006 +0000
 
     Avoid potential underflow if read() returns -1. Coverity CID 414
 
-ChangeLog
-xconsole.c
-
 commit 950d308b3230e7e89d307fd95abb983e44987665
 Author: Kevin E Martin <kem@kem.org>
 Date:   Wed Dec 21 02:29:49 2005 +0000
 
     Update package version for X11R7 release.
 
-ChangeLog
-configure.ac
-
 commit f3755877004e49e96f26b120e0716f6673dc738b
 Author: Adam Jackson <ajax@nwnk.net>
 Date:   Mon Dec 19 16:22:42 2005 +0000
 
     Stub COPYING files
 
-COPYING
-
 commit a87b4d1f07448fde9b4f7ecad965210a339caaa5
 Author: Kevin E Martin <kem@kem.org>
 Date:   Thu Dec 15 00:24:05 2005 +0000
 
     Update package version number for final X11R7 release candidate.
 
-ChangeLog
-configure.ac
-
 commit d82f94100bd454d3298c6548173827a67cb4d7ad
 Author: Kevin E Martin <kem@kem.org>
 Date:   Wed Dec 7 16:17:59 2005 +0000
 
     Change to use the app-defaults default dir configured in libXt.
 
-ChangeLog
-Makefile.am
-configure.ac
-
 commit c681eac9a17d8d3f16efa2a992b02972cfa71926
 Author: Kevin E Martin <kem@kem.org>
 Date:   Tue Dec 6 22:48:20 2005 +0000
 
     Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
 
-ChangeLog
-Makefile.am
-
 commit 406fdcbe2e0b7f6af37c6d6965f85adfa8bb3aa6
 Author: Kevin E Martin <kem@kem.org>
 Date:   Sat Dec 3 05:49:18 2005 +0000
 
     Update package version number for X11R7 RC3 release.
 
-ChangeLog
-configure.ac
-
 commit 81d992f635798580d71fc79abf9df2a825f125e0
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Mon Nov 28 22:01:40 2005 +0000
@@ -128,50 +301,36 @@ Date:   Mon Nov 28 22:01:40 2005 +0000
     Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
         update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
 
-Makefile.am
-
 commit 61eac81e62e1b9b141ce7aaf3fd778ad1f9d7924
 Author: Eric Anholt <anholt@freebsd.org>
 Date:   Mon Nov 21 10:34:59 2005 +0000
 
     Another pass at .cvsignores for apps.
 
-.cvsignore
-
 commit 68ea4cb352cc528736914c7d328df024164e0e60
 Author: Eric Anholt <anholt@freebsd.org>
 Date:   Sun Nov 20 22:08:51 2005 +0000
 
     Add/improve .cvsignore files for apps.
 
-.cvsignore
-
 commit 630bdf36e17b8f125f8aa0cabf41c75e650ac973
 Author: Kevin E Martin <kem@kem.org>
 Date:   Wed Nov 9 21:09:20 2005 +0000
 
     Update package version number for X11R7 RC2 release.
 
-ChangeLog
-configure.ac
-
 commit 31dbed9163fd4384dc5dc81f426ce82176587dd2
 Author: Kean Johnson <kean@armory.com>
 Date:   Tue Nov 8 06:33:31 2005 +0000
 
     See ChangeLog entry 2005-11-07 for details.
 
-xconsole.c
-
 commit 0710398b397c5f8b09b6216bd18e84337fb4efdb
 Author: Kevin E Martin <kem@kem.org>
 Date:   Wed Oct 19 02:47:52 2005 +0000
 
     Update package version number for RC1 release.
 
-ChangeLog
-configure.ac
-
 commit 34924fc44be47d2d58c701485b4e1b6fad28c21d
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Tue Oct 18 00:32:55 2005 +0000
@@ -180,8 +339,6 @@ Date:   Tue Oct 18 00:32:55 2005 +0000
         $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
         the monolith & allow localization
 
-Makefile.am
-
 commit 324e3c08212f7dbe8b08f7d9028f2e775cbc73c1
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Mon Oct 17 23:56:21 2005 +0000
@@ -189,17 +346,12 @@ Date:   Mon Oct 17 23:56:21 2005 +0000
     Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
         work better with BSD make
 
-Makefile.am
-
 commit ad9813ed3ad1d8adb562ac9b279c18753249786f
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Fri Oct 14 00:25:43 2005 +0000
 
     Use sed to fill in variables in man page
 
-Makefile.am
-configure.ac
-
 commit f8ca981b964aaa3c59eab661ce35efb7d7085020
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Wed Aug 17 21:03:23 2005 +0000
@@ -207,8 +359,6 @@ Date:   Wed Aug 17 21:03:23 2005 +0000
     Bugzilla #4130 <https://bugs.freedesktop.org/show_bug.cgi?id=4130>
         xconsole: non-ascii characters don't show up (Samuel Thibault)
 
-xconsole.c
-
 commit 05a718f11fc97f1e34cf927fd8762f8251356dcb
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Mon Aug 1 20:25:29 2005 +0000
@@ -216,8 +366,6 @@ Date:   Mon Aug 1 20:25:29 2005 +0000
     Install man pages to section 1 instead of section m (Patch from Donnie
         Berkholz)
 
-Makefile.am
-
 commit c0ecb99582a714c95282f1187c0f39acee640779
 Author: Kevin E Martin <kem@kem.org>
 Date:   Fri Jul 29 21:22:31 2005 +0000
@@ -232,24 +380,18 @@ Date:   Fri Jul 29 21:22:31 2005 +0000
     - Update build script to build macros first
     - Update modular Xorg version
 
-configure.ac
-
 commit b23b1f35930ed0d10fef42a23f88a2dacd29d91c
 Author: Daniel Stone <daniel@fooishbar.org>
 Date:   Wed Jul 27 00:15:46 2005 +0000
 
     Fix xconsole build break on AIX caused by removal of ptyx defines.
 
-xconsole.c
-
 commit b471e2609662c2ec83d26ee32a7900e528f67f75
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
 Date:   Tue Jul 26 15:44:02 2005 +0000
 
     Replace more GNU make-ism's with more portable macros
 
-Makefile.am
-
 commit e656ddba66cda7432279cd10ac5a450e8b2c342c
 Author: Adam Jackson <ajax@nwnk.net>
 Date:   Wed Jul 20 19:31:52 2005 +0000
@@ -257,17 +399,12 @@ Date:   Wed Jul 20 19:31:52 2005 +0000
     Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
         configure cache, you cache it, and the cached value is probably wrong.
 
-Makefile.am
-configure.ac
-
 commit 171e31464fc9d4f39403931b1126c3e2cf52b84e
 Author: Matthieu Herrb <matthieu.herrb@laas.fr>
 Date:   Sun Jul 17 21:11:32 2005 +0000
 
     fix rules to work with non-GNU make.
 
-Makefile.am
-
 commit 6fa7b824f077a0c04eb678c8736cda077232a084
 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
 Date:   Thu Jul 7 23:08:22 2005 +0000
@@ -275,17 +412,6 @@ Date:   Thu Jul 7 23:08:22 2005 +0000
     - Build system for xconsole
     - Remove include of "../xterm/ptyx" from xc/programs/xconsole/xconsole.c
 
-AUTHORS
-COPYING
-ChangeLog
-INSTALL
-Makefile.am
-NEWS
-README
-autogen.sh
-configure.ac
-xconsole.c
-
 commit b38b9a7731430359f10ba74706fc6d4c786d2d36
 Author: Egbert Eich <eich@suse.de>
 Date:   Mon Oct 18 14:21:46 2004 +0000
@@ -319,76 +445,48 @@ Date:   Mon Oct 18 14:21:46 2004 +0000
     Added 'pic' to the man page rendering command pipeline (Werner Fink).
     Added missing return value (Stefan Dirsch, Roland Mainz)
 
-xconsole.c
-
 commit 7da0d180d6852916e5dca44842ee88e7d8429e6e
 Author: Egbert Eich <eich@suse.de>
 Date:   Fri Apr 23 19:54:41 2004 +0000
 
     Merging XORG-CURRENT into trunk
 
-XConsole.ad
-xconsole.c
-xconsole.man
-
 commit 0b03eedd1839ec360b2bb7c0b4b9592cd53cfda5
 Author: Egbert Eich <eich@suse.de>
 Date:   Sun Mar 14 08:35:01 2004 +0000
 
     Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
 
-XConsole.ad
-xconsole.c
-xconsole.man
-
 commit 2ec4fa572aba38d9e01205a2b440f6fcf29b796e
 Author: Egbert Eich <eich@suse.de>
 Date:   Wed Mar 3 12:12:55 2004 +0000
 
     Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
 
-XConsole.ad
-xconsole.c
-xconsole.man
-
 commit 798ad4a31ca485e2b04a2a623b1fc96f3860d11f
 Author: Egbert Eich <eich@suse.de>
 Date:   Thu Feb 26 13:36:16 2004 +0000
 
     readding XFree86's cvs IDs
 
-XConsole.ad
-xconsole.c
-xconsole.man
-
 commit 297a4fba84512347e1f65d5c9eca649c24271067
 Author: Egbert Eich <eich@suse.de>
 Date:   Thu Feb 26 09:23:58 2004 +0000
 
     Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
 
-XConsole.ad
-xconsole.c
-xconsole.man
-
 commit b53d3aeeedd692ef010a3ec5961079aee7d47fb3
 Author: Kaleb Keithley <kaleb@freedesktop.org>
 Date:   Tue Nov 25 19:29:03 2003 +0000
 
     XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
 
-xconsole.c
-
 commit 2b2c62b3be8dd36d3231a2ad18d8b212e81695d1
 Author: Kaleb Keithley <kaleb@freedesktop.org>
 Date:   Fri Nov 14 16:48:58 2003 +0000
 
     XFree86 4.3.0.1
 
-XConsole.ad
-xconsole.c
-xconsole.man
-
 commit 593922e4e9e9bdcb9bd2b66493b91023d8f0984b
 Author: Kaleb Keithley <kaleb@freedesktop.org>
 Date:   Fri Nov 14 15:54:53 2003 +0000
index 23e5f25..8b82ade 100644 (file)
@@ -1,16 +1,19 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-These are generic installation instructions.
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -23,9 +26,9 @@ debugging `configure').
 
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
+the results of its tests to speed up reconfiguring.  Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
@@ -67,42 +67,57 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
 is an example:
 
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
    *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -125,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -137,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
 Specifying the System Type
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -170,9 +207,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -190,21 +227,29 @@ them in the `configure' command line, using `VAR=value'.  For example:
      ./configure CC=/usr/local2/bin/gcc
 
 causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
+overridden in the site shell script).
 
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
 
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -231,6 +276,16 @@ configuration-related scripts to be executed by `/bin/bash'.
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
index 0ff760f..5e9d16f 100644 (file)
@@ -21,7 +21,7 @@
 
 bin_PROGRAMS = xconsole
 
-AM_CFLAGS = $(XCONSOLE_CFLAGS)
+AM_CFLAGS = $(XCONSOLE_CFLAGS) $(CWARNFLAGS)
 xconsole_LDADD = $(XCONSOLE_LIBS)
 
 xconsole_SOURCES =     \
@@ -30,60 +30,35 @@ xconsole_SOURCES =  \
 appman_PRE = \
         xconsole.man
 
-# App default files  (*.ad)
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 
 appdefaultdir = @appdefaultdir@
 
-
-APPDEFAULTFILES = \
-        XConsole
-
-SUFFIXES = .ad
-
-.ad:
-       cp $< $@
-
-appdefault_DATA = $(APPDEFAULTFILES)
-
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad)
-
-CLEANFILES = $(APPDEFAULTFILES)
+dist_appdefault_DATA = \
+        app-defaults/XConsole
 
 
 appmandir = $(APP_MAN_DIR)
 
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
-EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
-
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
 
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
 
-.PHONY: ChangeLog
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
-       GIT_DIR=${srcdir}/.git git-log --name-only > ChangeLog
+       $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
index 7eeeda0..20fca89 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 #  PERFORMANCE OF THIS SOFTWARE.
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -59,36 +57,49 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = xconsole$(EXEEXT)
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       compile config.guess config.sub depcomp install-sh missing \
-       mkinstalldirs
 subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
-       "$(DESTDIR)$(appmandir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
+       "$(DESTDIR)$(appdefaultdir)"
 PROGRAMS = $(bin_PROGRAMS)
 am_xconsole_OBJECTS = xconsole.$(OBJEXT)
 xconsole_OBJECTS = $(am_xconsole_OBJECTS)
 am__DEPENDENCIES_1 =
 xconsole_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(xconsole_SOURCES)
 DIST_SOURCES = $(xconsole_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -96,19 +107,32 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appdefaultDATA_INSTALL = $(INSTALL_DATA)
-appmanDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appdefault_DATA) $(appman_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(appman_DATA) $(dist_appdefault_DATA)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -116,9 +140,8 @@ distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
 APPDEFS_LIBS = @APPDEFS_LIBS@
 APP_MAN_DIR = @APP_MAN_DIR@
@@ -130,8 +153,10 @@ AWK = @AWK@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -145,6 +170,8 @@ EXEEXT = @EXEEXT@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -156,40 +183,39 @@ LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@
-TMP_XAW_LIBS = @TMP_XAW_LIBS@
 VERSION = @VERSION@
-XAW_USE_XPRINT_FALSE = @XAW_USE_XPRINT_FALSE@
-XAW_USE_XPRINT_TRUE = @XAW_USE_XPRINT_TRUE@
 XCONSOLE_CFLAGS = @XCONSOLE_CFLAGS@
 XCONSOLE_LIBS = @XCONSOLE_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
-
-# App default files  (*.ad)
 appdefaultdir = @appdefaultdir@
 bindir = @bindir@
 build = @build@
@@ -197,6 +223,7 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
@@ -224,9 +251,13 @@ program_transform_name = @program_transform_name@
 psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-AM_CFLAGS = $(XCONSOLE_CFLAGS)
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = $(XCONSOLE_CFLAGS) $(CWARNFLAGS)
 xconsole_LDADD = $(XCONSOLE_LIBS)
 xconsole_SOURCES = \
         xconsole.c
@@ -234,53 +265,38 @@ xconsole_SOURCES = \
 appman_PRE = \
         xconsole.man
 
-APPDEFAULTFILES = \
-        XConsole
 
-SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
-appdefault_DATA = $(APPDEFAULTFILES)
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) $(appman_PRE)
-CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+dist_appdefault_DATA = \
+        app-defaults/XConsole
+
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
 am--refresh:
        @:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -296,21 +312,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
        @if test ! -f $@; then \
          rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
        else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -318,30 +335,44 @@ distclean-hdr:
        -rm -f config.h stamp-h1
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 xconsole$(EXEEXT): $(xconsole_OBJECTS) $(xconsole_DEPENDENCIES) 
        @rm -f xconsole$(EXEEXT)
-       $(LINK) $(xconsole_LDFLAGS) $(xconsole_OBJECTS) $(xconsole_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(xconsole_OBJECTS) $(xconsole_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -352,139 +383,155 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xconsole.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
-install-appdefaultDATA: $(appdefault_DATA)
+install-appmanDATA: $(appman_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(appdefault_DATA)'; for p in $$list; do \
+       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
        done
 
-uninstall-appdefaultDATA:
+uninstall-appmanDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-install-appmanDATA: $(appman_DATA)
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
+install-dist_appdefaultDATA: $(dist_appdefault_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
+       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
        done
 
-uninstall-appmanDATA:
+uninstall-dist_appdefaultDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
-       done
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       mkdir $(distdir)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
        $(MAKE) $(AM_MAKEFLAGS) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
@@ -492,6 +539,14 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -516,13 +571,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -530,9 +589,11 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
@@ -554,13 +615,15 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -581,8 +644,8 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS) $(DATA) config.h
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
@@ -605,10 +668,12 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@@ -626,18 +691,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am: install-appdefaultDATA install-appmanDATA
+install-data-am: install-appmanDATA install-dist_appdefaultDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
 
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -659,37 +744,44 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
+
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
        clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-appmanDATA \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_appdefaultDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
        installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
-
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
 
-.ad:
-       cp $< $@
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
-       GIT_DIR=${srcdir}/.git git-log --name-only > ChangeLog
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
 
-dist-hook: ChangeLog
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/xconsole/NEWS b/xconsole/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
index e69de29..52a9966 100644 (file)
@@ -0,0 +1,26 @@
+xconsole displays in a X11 window the messages which are usually sent
+to /dev/console
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/app/xconsole
+
+        http://cgit.freedesktop.org/xorg/app/xconsole
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
index ee27fa0..6be78d7 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
+# _AM_AUTOCONF_VERSION(VERSION)
 # -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-$$1_PKG_ERRORS
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-_PKG_TEXT
+# serial 9
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-               [$4])
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
 else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-dnl Copyright 2005 Red Hat, Inc
-dnl 
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl 
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl 
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl 
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl 
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-# XAW_CHECK_XPRINT_SUPPORT()
-# --------------------------
-# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 
-# library. If neither --enable-xprint nor --disable-xprint are given, 
-# the presence of an Xaw with Xprint support will be auto detected
-
-AC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
-       AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
-                       [use_xprint=$enableval],[use_xprint=auto])
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
-       if [[ ! -z $TMP_CHECK2 ]] ; then
-               if test $success = no ; then
-                       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
-                       xaw_use_xprint=no
-               fi
-       fi
+# serial 10
 
-       if test "x$success" = "xyes"; then
-               $1_CFLAGS=$TMP_XAW_CFLAGS
-               $1_LIBS=$TMP_XAW_LIBS
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-               AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
-       else
-               AC_MSG_ERROR([No suitable version of Xaw found])
-       fi
-])
 
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
 #
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.1.5
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
-]) # XORG_MACROS_VERSION
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
 
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
 else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
+  am_cv_$1_dependencies_compiler_type=none
 fi
-rm -f conftest.$ac_ext
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
 
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
+#serial 5
 
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
+# serial 8
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
+AC_SUBST([CYGPATH_W])
 
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
 
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([Whether to build documentation])
+# serial 2
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-   BUILDDOC=no
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-AC_MSG_RESULT([$BUILDDOC])
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+# serial 5
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
 
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
-AC_MSG_RESULT([$BUILDPDFDOC])
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+# serial 4
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+# serial 6
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
 fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+# Helper functions for option handling.                     -*- Autoconf -*-
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
+# serial 4
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
-#
-AC_DEFUN([XORG_WITH_LINT],[
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-]) # XORG_WITH_LINT
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+# serial 5
 
-]) # XORG_LINT_LIBRARY
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
 
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+# serial 2
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
 #
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
 #
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
 #
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 #
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.1])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
 
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
+#
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
+
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
+
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-# serial 7
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
 
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
 
-# serial 8
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
 
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+]) # XORG_MANPAGE_SECTIONS
+
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
 
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
+#
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+AC_PATH_PROG(LINUXDOC, linuxdoc)
 
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+AC_MSG_CHECKING([whether to build documentation])
 
-  cd ..
-  rm -rf conftest.dir
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
 else
-  am_cv_$1_dependencies_compiler_type=none
+   BUILDDOC=no
 fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
 
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_MSG_RESULT([$BUILDDOC])
 
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
 fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-#serial 3
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+AC_MSG_RESULT([$BUILDPDFDOC])
 
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
-# serial 8
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
+fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# serial 12
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
+fi
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
+
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
+
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
 fi
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
 fi
-AC_SUBST([CYGPATH_W])
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
 
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
 
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
 
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
 
-# serial 2
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
 else
-  am__leading_dot=_
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
 
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
 
-# serial 3
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
    fi
+else
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
-# serial 4
+]) # XORG_WITH_LINT
 
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
+#
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-# AM_PROG_MKDIR_P
+]) # XORG_LINT_LIBRARY
+
+# XORG_CWARNFLAGS
 # ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
 else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
 fi
-AC_SUBST([mkdir_p])])
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
+#
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
+
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
 
-# serial 3
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
 
-# _AM_SET_OPTIONS(OPTIONS)
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 # ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
 
-# serial 2
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+$$1_PKG_ERRORS
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
old mode 100755 (executable)
new mode 100644 (file)
index 0f0fe71..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
-timestamp='2007-03-06'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2007-03-06'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -324,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -532,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -640,7 +660,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -791,18 +811,24 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
-           x86) 
+           x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
        esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -832,8 +858,29 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
        exit ;;
     avr32*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -847,6 +894,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -856,74 +914,33 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
        exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
@@ -933,8 +950,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -948,78 +968,18 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
        echo x86_64-unknown-linux-gnu
        exit ;;
-    xtensa:Linux:*:*)
-       echo xtensa-unknown-linux-gnu
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1048,7 +1008,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1092,8 +1052,11 @@ EOF
     pc:*:*:*)
        # Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
@@ -1131,6 +1094,16 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1143,7 +1116,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1206,6 +1179,9 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1233,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1314,6 +1300,9 @@ EOF
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
        exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1474,9 +1463,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index ed84c7e..b86b762 100644 (file)
@@ -51,6 +51,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
 
old mode 100755 (executable)
new mode 100644 (file)
index 5defff6..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
-timestamp='2007-01-18'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2007-01-18'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,10 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -249,13 +258,16 @@ case $basic_machine in
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
@@ -268,28 +280,41 @@ case $basic_machine in
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -320,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -329,14 +354,17 @@ case $basic_machine in
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
@@ -351,27 +379,34 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
+       | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -435,6 +470,10 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -443,10 +482,35 @@ case $basic_machine in
                basic_machine=ns32k-sequent
                os=-dynix
                ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -475,8 +539,8 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16c)
-               basic_machine=cr16c-unknown
+       cr16)
+               basic_machine=cr16-unknown
                os=-elf
                ;;
        crds | unos)
@@ -514,6 +578,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -668,6 +736,14 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        m88k-omron*)
                basic_machine=m88k-omron
                ;;
@@ -679,10 +755,17 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
                ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
@@ -779,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -809,6 +898,14 @@ case $basic_machine in
                basic_machine=i860-intel
                os=-osf
                ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        pbd)
                basic_machine=sparc-tti
                ;;
@@ -1005,17 +1102,14 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
                ;;
        tx39)
                basic_machine=mipstx39-unknown
@@ -1092,6 +1186,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1130,7 +1228,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1180,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1200,10 +1301,11 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1212,9 +1314,10 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1222,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1352,6 +1455,11 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1392,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1549,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index c458173..bce5a01 100755 (executable)
@@ -1,62 +1,85 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for xconsole 1.0.3.
+# Generated by GNU Autoconf 2.68 for xconsole 1.0.4.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
+#
 # 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
 
 
@@ -65,20 +88,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
 
      ;;
@@ -89,32 +111,279 @@ 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
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  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
+            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
+
+
+      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 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_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
   fi
-done
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
+
+# 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"
+
+
+} # 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
+
+
+# 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
 
-# Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -128,13 +397,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
@@ -149,434 +422,149 @@ echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# 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
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  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/=
+  ' <$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" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  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
+  # 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
 }
 
-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
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_ret_success; then
-  :
+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 2>/dev/null
+fi
+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'
+  fi
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_ln_s='cp -p'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
+as_executable_p=$as_test_x
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
-(
-  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
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-      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
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
-fi
+# Name of the host.
+# 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`
 
-
-:
-_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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-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_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='xconsole'
 PACKAGE_TARNAME='xconsole'
-PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='xconsole 1.0.3'
+PACKAGE_VERSION='1.0.4'
+PACKAGE_STRING='xconsole 1.0.4'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -614,119 +602,136 @@ ac_includes_default="\
 # include <unistd.h>
 #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
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-PKG_CONFIG
-TMP_XAW_CFLAGS
-TMP_XAW_LIBS
-XAW_USE_XPRINT_TRUE
-XAW_USE_XPRINT_FALSE
-XCONSOLE_CFLAGS
-XCONSOLE_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
 appdefaultdir
-CPP
-GREP
-EGREP
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-APP_MAN_SUFFIX
-LIB_MAN_SUFFIX
-FILE_MAN_SUFFIX
-MISC_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-ADMIN_MAN_SUFFIX
-APP_MAN_DIR
-LIB_MAN_DIR
-FILE_MAN_DIR
-MISC_MAN_DIR
-DRIVER_MAN_DIR
+APPDEFS_LIBS
+APPDEFS_CFLAGS
+XCONSOLE_LIBS
+XCONSOLE_CFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
-LIBOBJS
-LTLIBOBJS'
+DRIVER_MAN_DIR
+MISC_MAN_DIR
+FILE_MAN_DIR
+LIB_MAN_DIR
+APP_MAN_DIR
+ADMIN_MAN_SUFFIX
+DRIVER_MAN_SUFFIX
+MISC_MAN_SUFFIX
+FILE_MAN_SUFFIX
+LIB_MAN_SUFFIX
+APP_MAN_SUFFIX
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+INSTALL_CMD
+PKG_CONFIG
+CHANGELOG_CMD
+CWARNFLAGS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+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_maintainer_mode
+enable_dependency_tracking
+enable_strict_compilation
+enable_silent_rules
+with_appdefaultdir
+'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -735,17 +740,19 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
+CPP
 PKG_CONFIG
-TMP_XAW_CFLAGS
-TMP_XAW_LIBS
+XCONSOLE_CFLAGS
+XCONSOLE_LIBS
 APPDEFS_CFLAGS
-APPDEFS_LIBS
-CPP'
+APPDEFS_LIBS'
 
 
 # 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
@@ -801,8 +808,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.
@@ -844,13 +852,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 ;;
@@ -863,13 +878,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- \
@@ -1060,22 +1082,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.
@@ -1095,26 +1131,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
@@ -1122,23 +1158,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'
@@ -1152,8 +1201,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
@@ -1168,23 +1217,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
@@ -1211,13 +1258,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
@@ -1243,7 +1288,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xconsole 1.0.3 to adapt to many kinds of systems.
+\`configure' configures xconsole 1.0.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1257,7 +1302,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
@@ -1265,9 +1310,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
@@ -1277,25 +1322,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/xconsole]
-  --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/xconsole]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1313,24 +1358,30 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xconsole 1.0.3:";;
+     short | recursive ) echo "Configuration of xconsole 1.0.4:";;
    esac
   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]
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-xprint         Enable XPrint support
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
+  --with-appdefaultdir=<pathname>
+                          specify directory for app-defaults files (default is
+                          autodetected)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1338,18 +1389,18 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  TMP_XAW_CFLAGS
-              C compiler flags for TMP_XAW, overriding pkg-config
-  TMP_XAW_LIBS
-              linker flags for TMP_XAW, overriding pkg-config
+  XCONSOLE_CFLAGS
+              C compiler flags for XCONSOLE, overriding pkg-config
+  XCONSOLE_LIBS
+              linker flags for XCONSOLE, overriding pkg-config
   APPDEFS_CFLAGS
               C compiler flags for APPDEFS, overriding pkg-config
   APPDEFS_LIBS
               linker flags for APPDEFS, overriding pkg-config
-  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.
@@ -1362,15 +1413,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/ ;;
@@ -1406,7 +1459,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
       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
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xconsole configure 1.0.3
-generated by GNU Autoconf 2.61
+xconsole configure 1.0.4
+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
-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 xconsole $as_me 1.0.3, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
 
-  $ $0 $@
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-_ACEOF
-exec 5>>config.log
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+  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
 
-_ASUNAME
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
+} # ac_fn_c_try_compile
 
-} >&5
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
 
-cat >&5 <<_ACEOF
+  ;
+  return 0;
+}
+_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_decl
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+# 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
 
-_ACEOF
+    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
 
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
+# 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_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_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_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 <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
+
+# 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;}
+( $as_echo "## ---------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
+## ---------------------------------------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&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
+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 xconsole $as_me 1.0.4, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
 ac_configure_args1=
 ac_must_keep_next=false
 for ac_pass in 1 2
@@ -1501,12 +1955,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
@@ -1522,13 +1976,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
@@ -1540,11 +1994,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1553,12 +2005,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
@@ -1577,128 +2030,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
 )
     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"
 _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
 
@@ -1712,68 +2173,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; }; }
+  { $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'
@@ -1782,7 +2231,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version="1.9"
+am__api_version='1.11'
+
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -1800,9 +2250,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   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,
@@ -1827,22 +2275,23 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 # 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.
@@ -1860,17 +2309,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
@@ -1883,8 +2344,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.
@@ -1894,21 +2355,34 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -1918,11 +2392,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -1931,127 +2402,253 @@ then
    # Ok.
    :
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-{ 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; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
+# Double any \ or $.
 # By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
-for ac_prog in gawk mawk nawk awk
-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_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 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_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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_STRIP="strip"
+    $as_echo "$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_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $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; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+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_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$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
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&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
 
 
   test -n "$AWK" && break
 done
 
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2061,12 +2658,12 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = 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; }
   SET_MAKE=
 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; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -2079,12 +2676,14 @@ else
 fi
 rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
 fi
 
 # test whether we have cygpath
@@ -2099,7 +2698,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xconsole'
- VERSION='1.0.3'
+ VERSION='1.0.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2127,112 +2726,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.
@@ -2245,20 +2738,19 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
+if test "${enable_maintainer_mode+set}" = set; then :
   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
   USE_MAINTAINER_MODE=no
 fi
 
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
   MAINTAINER_MODE_FALSE='#'
 else
@@ -2270,7 +2762,78 @@ fi
 
 
 
-ac_config_headers="$ac_config_headers config.h"
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -2281,10 +2844,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.
@@ -2294,25 +2857,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
 
 
@@ -2321,10 +2884,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.
@@ -2334,25 +2897,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
@@ -2360,12 +2923,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
@@ -2378,10 +2937,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.
@@ -2391,25 +2950,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
 
 
@@ -2418,10 +2977,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.
@@ -2432,18 +2991,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
@@ -2462,11 +3021,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
 
 
@@ -2477,10 +3036,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.
@@ -2490,25 +3049,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
 
 
@@ -2521,10 +3080,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.
@@ -2534,25 +3093,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
 
 
@@ -2564,12 +3123,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
@@ -2579,51 +3134,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"
-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); }
-{ (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); }
+  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
@@ -2635,42 +3176,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,
@@ -2680,14 +3217,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
@@ -2706,78 +3243,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 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; }; }
+{ { $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
@@ -2785,37 +3285,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 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; }; }
+  { { $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$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+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 <stdio.h>
+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
@@ -2827,51 +3380,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
@@ -2885,54 +3433,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
@@ -2943,34 +3471,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
@@ -2981,35 +3486,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
@@ -3020,42 +3502,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
@@ -3071,18 +3529,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 <stdarg.h>
 #include <stdio.h>
@@ -3139,31 +3593,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -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
@@ -3174,95 +3606,32 @@ 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'
 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
 
 depcc="$CC"   am_compiler_list=
 
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -3287,6 +3656,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3304,7 +3678,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3314,18 +3698,23 @@ else
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -3342,728 +3731,220 @@ else
     fi
   done
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Checks for pkg-config packages
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; 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_ac_pt_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               PKG_CONFIG=""
-       fi
-
-fi
-
-       # Check whether --enable-xprint was given.
-if test "${enable_xprint+set}" = set; then
-  enableval=$enable_xprint; use_xprint=$enableval
-else
-  use_xprint=auto
-fi
-
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_CFLAGS"; then
-        pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_LIBS"; then
-        pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"`
-        else
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       success=yes
-fi
-       if [ ! -z $TMP_CHECK2 ] ; then
-               if test $success = no ; then
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_CFLAGS"; then
-        pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_LIBS"; then
-        pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"`
-        else
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       success=yes
-fi
-                       xaw_use_xprint=no
-               fi
-       fi
-
-       if test "x$success" = "xyes"; then
-               XCONSOLE_CFLAGS=$TMP_XAW_CFLAGS
-               XCONSOLE_LIBS=$TMP_XAW_LIBS
-
-
-
-if test "x$xaw_use_xprint" = "xyes"; then
-  XAW_USE_XPRINT_TRUE=
-  XAW_USE_XPRINT_FALSE='#'
-else
-  XAW_USE_XPRINT_TRUE='#'
-  XAW_USE_XPRINT_FALSE=
-fi
-
-       else
-               { { echo "$as_me:$LINENO: error: No suitable version of Xaw found" >&5
-echo "$as_me: error: No suitable version of Xaw found" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-
-
-
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for APPDEFS" >&5
-echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_CFLAGS"; then
-        pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_LIBS"; then
-        pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
-        else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" >&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  cd ..
+  rm -rf conftest.dir
 else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
 fi
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
 
 
-{ echo "$as_me:$LINENO: checking for library containing openpty" >&5
-echo $ECHO_N "checking for library containing openpty... $ECHO_C" >&6; }
-if test "${ac_cv_search_openpty+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} 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
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
 
-/* 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"
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
 #endif
-char openpty ();
-int
-main ()
+#if BIG_OK
+#else
+  your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
 {
-return openpty ();
-  ;
+  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;
 }
-_ACEOF
-for ac_lib in '' util; 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
-  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_search_openpty=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
+// Check varargs and va_copy.
+static void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
 
-fi
+  // Check bool.
+  _Bool success = false;
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_openpty+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_openpty+set}" = set; then
-  :
-else
-  ac_cv_search_openpty=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_openpty" >&5
-echo "${ECHO_T}$ac_cv_search_openpty" >&6; }
-ac_res=$ac_cv_search_openpty
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
 
-fi
+  // Check varargs.
+  test_varargs ("s, d' f .", "string", 65, 34.234);
+  test_varargs_macros ();
 
-{ echo "$as_me:$LINENO: checking for openpty" >&5
-echo $ECHO_N "checking for openpty... $ECHO_C" >&6; }
-if test "${ac_cv_func_openpty+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 openpty to an innocuous variant, in case <limits.h> declares openpty.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define openpty innocuous_openpty
+  // 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;
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char openpty (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+  ni.number = 58;
 
-#undef openpty
+  int dynamic_array[ni.number];
+  dynamic_array[ni.number - 1] = 543;
 
-/* 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 openpty ();
-/* 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_openpty || defined __stub___openpty
-choke me
-#endif
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
 
-int
-main ()
-{
-return openpty ();
   ;
   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
-  ac_cv_func_openpty=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_openpty=no
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-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_openpty" >&5
-echo "${ECHO_T}$ac_cv_func_openpty" >&6; }
-if test $ac_cv_func_openpty = yes; then
-  HAS_OPENPTY="yes"
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
 fi
 
-if test "x$HAS_OPENPTY" = "xyes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAS_OPENPTY 1
-_ACEOF
 
-       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
-{ 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"
@@ -4077,11 +3958,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -4090,76 +3967,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 <ac_nonexistent.h>
 _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
 
@@ -4171,8 +4006,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
@@ -4182,11 +4017,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -4195,83 +4026,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 <ac_nonexistent.h>
 _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
@@ -4281,45 +4069,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 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"
@@ -4331,77 +4114,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"
@@ -4413,46 +4180,31 @@ case `"$ac_path_EGREP" --version 2>&1` in
   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 <stdlib.h>
 #include <stdarg.h>
@@ -4467,47 +4219,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 <string.h>
 
 _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
@@ -4517,18 +4245,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 <stdlib.h>
 
 _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
@@ -4538,14 +4262,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 <ctype.h>
 #include <stdlib.h>
@@ -4572,113 +4292,35 @@ 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
 
 # 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
+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 `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -4688,183 +4330,143 @@ done
 
 
 
-for ac_header in util.h pty.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; }
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&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;;
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
 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
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 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; }
 
-# 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>
-_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
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-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_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  ac_header_preproc=no
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 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;}
-    ( cat <<\_ASBOX
-## ---------------------------------------------------------------------- ##
-## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
-## ---------------------------------------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  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;}
+ac_tool_warned=yes ;;
 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
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 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
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- break
-fi
-
-done
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
 
 fi
-
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4880,41 +4482,213 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+
+
+
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+  STRICT_COMPILE=no
+fi
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+  INTELCC="yes"
+else
+  INTELCC="no"
+fi
+
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
 fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
 
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
 
 
 
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Checks for pkg-config packages
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCONSOLE" >&5
+$as_echo_n "checking for XCONSOLE... " >&6; }
+
+if test -n "$XCONSOLE_CFLAGS"; then
+    pkg_cv_XCONSOLE_CFLAGS="$XCONSOLE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XCONSOLE_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$XCONSOLE_LIBS"; then
+    pkg_cv_XCONSOLE_LIBS="$XCONSOLE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XCONSOLE_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
 
+if test $pkg_failed = yes; then
 
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  RELEASE_VERSION=""
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+               XCONSOLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt x11" 2>&1`
+        else
+               XCONSOLE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt x11" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$XCONSOLE_PKG_ERRORS" >&5
 
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
+       as_fn_error $? "Package requirements (xaw7 xmu xt x11) were not met:
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
+$XCONSOLE_PKG_ERRORS
 
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
+Alternatively, you may set the environment variables XCONSOLE_CFLAGS
+and XCONSOLE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables XCONSOLE_CFLAGS
+and XCONSOLE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       XCONSOLE_CFLAGS=$pkg_cv_XCONSOLE_CFLAGS
+       XCONSOLE_LIBS=$pkg_cv_XCONSOLE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
+$as_echo_n "checking for APPDEFS... " >&6; }
+
+if test -n "$APPDEFS_CFLAGS"; then
+    pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$APPDEFS_LIBS"; then
+    pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
+        else
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$APPDEFS_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (xt) were not met:
+
+$APPDEFS_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables APPDEFS_CFLAGS
+and APPDEFS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables APPDEFS_CFLAGS
+and APPDEFS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
+       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
+else
+  appdefaultdir="${xt_appdefaultdir}"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
+$as_echo_n "checking for library containing openpty... " >&6; }
+if ${ac_cv_search_openpty+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* 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 openpty ();
+int
+main ()
+{
+return openpty ();
+  ;
+  return 0;
+}
 _ACEOF
+for ac_lib in '' util; 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_openpty=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_openpty+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_openpty+:} false; then :
 
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
+else
+  ac_cv_search_openpty=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
+$as_echo "$ac_cv_search_openpty" >&6; }
+ac_res=$ac_cv_search_openpty
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
+fi
+
+ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
+if test "x$ac_cv_func_openpty" = xyes; then :
+  HAS_OPENPTY="yes"
+fi
+
+if test "x$HAS_OPENPTY" = "xyes" ; then
+
+$as_echo "#define HAS_OPENPTY 1" >>confdefs.h
+
+       for ac_header in util.h pty.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
+ break
+fi
+
+done
 
+fi
 
 
 ac_config_files="$ac_config_files Makefile"
@@ -5057,12 +5092,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
@@ -5070,8 +5106,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
   (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 quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -5093,13 +5129,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      :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
@@ -5112,55 +5159,50 @@ 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
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${XAW_USE_XPRINT_TRUE}" && test -z "${XAW_USE_XPRINT_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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.
@@ -5170,59 +5212,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
 
 
@@ -5231,20 +5293,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
 
      ;;
@@ -5255,32 +5316,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
+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
-done
+  $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
@@ -5291,16 +5431,20 @@ fi
 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
-  as_basename=false
+  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
@@ -5315,104 +5459,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
-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 ||
+  mkdir conf$$.dir 2>/dev/null
+fi
+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
@@ -5429,12 +5572,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
   '
@@ -5449,13 +5592,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 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 xconsole $as_me 1.0.3, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+This file was extended by xconsole $as_me 1.0.4, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -5468,7 +5617,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
 
 _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"
@@ -5476,22 +5634,25 @@ config_commands="$ac_config_commands"
 
 _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
@@ -5502,36 +5663,44 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
 
 _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="\\
-xconsole config.status 1.0.3
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+xconsole config.status 1.0.4
+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'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+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
@@ -5544,34 +5713,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
@@ -5586,27 +5762,29 @@ 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
 #
 # INIT-COMMANDS
 #
@@ -5614,19 +5792,17 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) { { 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
 
 # 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_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
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$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
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-TMP_XAW_CFLAGS!$TMP_XAW_CFLAGS$ac_delim
-TMP_XAW_LIBS!$TMP_XAW_LIBS$ac_delim
-XAW_USE_XPRINT_TRUE!$XAW_USE_XPRINT_TRUE$ac_delim
-XAW_USE_XPRINT_FALSE!$XAW_USE_XPRINT_FALSE$ac_delim
-XCONSOLE_CFLAGS!$XCONSOLE_CFLAGS$ac_delim
-XCONSOLE_LIBS!$XCONSOLE_LIBS$ac_delim
-APPDEFS_CFLAGS!$APPDEFS_CFLAGS$ac_delim
-APPDEFS_LIBS!$APPDEFS_LIBS$ac_delim
-appdefaultdir!$appdefaultdir$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
 
-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`
+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 2>/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
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+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
-host_os!$host_os$ac_delim
-APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
-LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim
-FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim
-MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim
-DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim
-ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim
-APP_MAN_DIR!$APP_MAN_DIR$ac_delim
-LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim
-FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim
-MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim
-DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim
-ADMIN_MAN_DIR!$ADMIN_MAN_DIR$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` = 15; 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 || 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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$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 = "\a"
+
+}
+{
+  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
+}
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACAWK
 _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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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    :C $CONFIG_COMMANDS
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+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
@@ -5925,7 +6139,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
     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 `:'.
@@ -5934,26 +6148,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
           [\\/$]*) 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
@@ -5963,42 +6185,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
@@ -6016,20 +6203,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/ ;;
@@ -6067,14 +6249,19 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
   esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  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
 }
@@ -6082,36 +6269,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
@@ -6120,136 +6308,68 @@ s&@builddir@&$ac_builddir&;t t
 s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.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;}
-
-  rm -f "$tmp/stdin"
+  { 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 "$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"
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $ac_file | $ac_file:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$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 |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -6269,29 +6389,40 @@ echo X$ac_file |
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
         X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -6309,68 +6440,33 @@ echo X"$mf" |
            q
          }
          s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
         X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  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"$file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -6388,27 +6484,25 @@ echo X"$as_dir" |
            q
          }
          s/.*/./; q'`
-      test -d "$as_dir" && break
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
     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; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
   done
-done
+}
  ;;
 
   esac
 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.
@@ -6428,6 +6522,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
 
index 7b5f858..0454cd1 100644 (file)
@@ -21,23 +21,31 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xconsole,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xconsole)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xconsole],
+       [1.0.4],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+       [xconsole])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-AM_CONFIG_HEADER(config.h)
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
 
-AC_PROG_CC
-AC_PROG_INSTALL
+AM_CONFIG_HEADER(config.h)
 
 # Checks for pkg-config packages
-XAW_CHECK_XPRINT_SUPPORT(XCONSOLE)
-AC_SUBST(XCONSOLE_CFLAGS)
-AC_SUBST(XCONSOLE_LIBS)
+PKG_CHECK_MODULES(XCONSOLE, xaw7 xmu xt x11)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+AC_ARG_WITH(appdefaultdir,
+       AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+         [specify directory for app-defaults files (default is autodetected)]),
+       [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
 AC_SEARCH_LIBS(openpty, [util])
@@ -48,7 +56,5 @@ if test "x$HAS_OPENPTY" = "xyes" ; then
        AC_CHECK_HEADERS([util.h pty.h], [break])
 fi
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
 
 AC_OUTPUT([Makefile])
index 04701da..df8eea7 100755 (executable)
@@ -1,9 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2005-07-09.11
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
 
 # 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
@@ -16,9 +17,7 @@ scriptversion=2005-07-09.11
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
    depmode=dashmstdout
 fi
 
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
   if test $stat -eq 0; then :
   else
@@ -178,14 +199,14 @@ sgi)
 ' < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
     tr '
-' ' ' >> $depfile
-    echo >> $depfile
+' ' ' >> "$depfile"
+    echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
     tr ' ' '
 ' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+   >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -201,34 +222,39 @@ aix)
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -276,6 +302,51 @@ icc)
   rm -f "$tmpdepfile"
   ;;
 
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +359,13 @@ tru64)
 
    if test "$libtool" = yes; then
       # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
+      # static library.  This mechanism is used in libtool 1.4 series to
       # handle both shared and static libraries in a single compilation.
       # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
       #
       # With libtool 1.5 this exception was removed, and libtool now
       # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # compilations output dependencies in $dir.libs/$base.o.d and
       # in $dir$base.o.d.  We have to check for both files, because
       # one of the two compilations can be disabled.  We should prefer
       # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
@@ -345,7 +416,7 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -396,32 +467,39 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
   # X makedepend
   shift
-  cleared=no
-  for arg in "$@"; do
+  cleared=no eat=no
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
       cleared=yes ;;
     esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
     case "$arg" in
     -D*|-I*)
       set fnord "$@" "$arg"; shift ;;
     # Strip any option that makedepend may not understand.  Remove
     # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
     -*|$object)
       ;;
     *)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
@@ -441,7 +519,7 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -479,13 +557,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
@@ -498,16 +590,23 @@ msvisualcpp)
        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
   echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
@@ -526,5 +625,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 4d4a951..6781b98 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,38 +39,68 @@ scriptversion=2005-05-14.22
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
 
-chmodcmd="$chmodprog 0755"
-chowncmd=
 chgrpcmd=
-stripcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
 src=
 dst=
 dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
 no_target_directory=
 
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
 In the 4th, create DIRECTORIES.
 
 Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last 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.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 "
 
-while test -n "$1"; do
+while test $# -ne 0; do
   case $1 in
-    -c) shift
-        continue;;
+    -c) ;;
+
+    -C) copy_on_change=true;;
 
-    -d) dir_arg=true
-        shift
-        continue;;
+    -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
     --help) echo "$usage"; exit $?;;
 
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
+    -s) stripcmd=$stripprog;;
 
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
+    -t) dst_arg=$2
+       shift;;
 
-    -T) no_target_directory=true
-       shift
-       continue;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    *)  # When -d is used, all remaining arguments are directories to create.
-       # When -t is used, the destination is already specified.
-       test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-       for arg
-       do
-          if test -n "$dstarg"; then
-           # $@ is not empty: it contains at least $arg.
-           set fnord "$@" "$dstarg"
-           shift # fnord
-         fi
-         shift # arg
-         dstarg=$arg
-       done
+    --)        shift
        break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
   esac
+  shift
 done
 
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
   if test -z "$dir_arg"; then
     echo "$0: no input file specified." >&2
     exit 1
@@ -164,24 +199,47 @@ if test -z "$1"; then
   exit 0
 fi
 
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
 for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src ;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
     dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
   else
+
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
     # might cause directories to be created, which would be especially bad
     # if $src (and thus $dsttmp) contains '*'.
@@ -190,71 +248,199 @@ do
       exit 1
     fi
 
-    if test -z "$dstarg"; then
+    if test -z "$dst_arg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dstarg
+    dst=$dst_arg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst ;;
+      -*) dst=./$dst;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
+       echo "$0: $dst_arg: Is a directory" >&2
        exit 1
       fi
-      dst=$dst/`basename "$src"`
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
     fi
   fi
 
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+  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
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       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-writeable 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;;
+    esac
 
-  # Make sure that the destination directory exists.
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
 
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
+      # The umask is ridiculous, or 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.
 
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
 
-    pathcomp=
+      eval "$initialize_posix_glob"
 
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
       shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (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
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
       fi
-      pathcomp=$pathcomp/
-    done
+    fi
   fi
 
   if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
   else
-    dstfile=`basename "$dst"`
 
     # Make a couple of temp file names in the proper directory.
     dsttmp=$dstdir/_inst.$$_
@@ -262,10 +448,9 @@ do
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
 
     # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -273,51 +458,63 @@ do
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-              || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-        }
-    }
-  fi || { (exit 1); exit 1; }
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
 done
 
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 894e786..28055d2 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2005-06-08.21
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2005-06-08.21
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,6 +31,8 @@ if test $# -eq 0; then
 fi
 
 run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
 # In the cases where this matters, `missing' is being run in the
 # srcdir already.
@@ -44,7 +44,7 @@ fi
 
 msg="missing on your system"
 
-case "$1" in
+case $1 in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
@@ -77,6 +77,7 @@ Supported PROGRAM values:
   aclocal      touch file \`aclocal.m4'
   autoconf     touch file \`configure'
   autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
   automake     touch all \`Makefile.in' files
   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
   flex         create \`lex.yy.c', if possible, from existing .c
@@ -86,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -103,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -135,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case "$1" in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -145,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -154,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -164,7 +175,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
-      case "$f" in
+      case $f in
       *:*) touch_files="$touch_files "`echo "$f" |
                                       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
       *) touch_files="$touch_files $f.in";;
@@ -184,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -192,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -f "$file"; then
        touch $file
     else
@@ -207,80 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.c
            fi
            SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.h
            fi
          ;;
        esac
     fi
-    if [ ! -f y.tab.h ]; then
+    if test ! -f y.tab.h; then
        echo >y.tab.h
     fi
-    if [ ! -f y.tab.c ]; then
+    if test ! -f y.tab.c; then
        echo 'main() { return 0; }' >y.tab.c
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" lex.yy.c
            fi
          ;;
        esac
     fi
-    if [ ! -f lex.yy.c ]; then
+    if test ! -f lex.yy.c; then
        echo 'main() { return 0; }' >lex.yy.c
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
         \`Help2man' package in order for those modifications to take
         effect.  You can get \`Help2man' from any GNU archive site."
 
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
        touch $file
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -289,11 +298,17 @@ WARNING: \`$1' is $msg.  You should only need it if
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -z "$file"; then
       # ... or it is the one specified with @setfilename ...
       infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
       # ... or it is derived from the source name (dir/f.texi becomes f.info)
       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
@@ -303,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
@@ -317,13 +332,13 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     firstarg="$1"
     if shift; then
-       case "$firstarg" in
+       case $firstarg in
        *o*)
            firstarg=`echo "$firstarg" | sed s/o//`
            tar "$firstarg" "$@" && exit 0
            ;;
        esac
-       case "$firstarg" in
+       case $firstarg in
        *h*)
            firstarg=`echo "$firstarg" | sed s/h//`
            tar "$firstarg" "$@" && exit 0
@@ -356,5 +371,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index ec7ccea..d8656e8 100644 (file)
@@ -66,10 +66,10 @@ extern char *_XawTextGetSTRING(TextWidget ctx, XawTextPosition left,
 #include <ctype.h>
 #include <stdlib.h>
 #ifdef HAS_OPENPTY
-# ifdef HAS_UTIL_H
+# ifdef HAVE_UTIL_H
 #  include <util.h>
 # endif
-# ifdef HAS_PTY_H
+# ifdef HAVE_PTY_H
 #  include <pty.h>
 # endif
 #endif
@@ -182,7 +182,9 @@ static XrmOptionDescRec options[] = {
 # endif
 # if defined (SVR4) || defined (USE_PTS)
 #  include <termios.h>
+#  ifndef HAS_OPENPTY
 #  include <sys/stropts.h>             /* for I_PUSH */
+#  endif
 #  ifdef sun
 #   include <sys/strredir.h>
 #  endif
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/xcursorgen/NEWS b/xcursorgen/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/xditview/AUTHORS b/xditview/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xditview/COPYING b/xditview/COPYING
deleted file mode 100644 (file)
index 7f33cbf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
-
-Please submit updated COPYING files to the Xorg bugzilla:
-
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
-
-http://lists.freedesktop.org/mailman/listinfo/xorg
diff --git a/xditview/ChangeLog b/xditview/ChangeLog
deleted file mode 100644 (file)
index f782e91..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version number for final X11R7 release candidate.
-
-2005-12-07  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * Makefile.am:
-       * configure.ac:
-       Change to use the app-defaults default dir configured in libXt.
-
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * Makefile.am:
-       Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version number for X11R7 RC3 release.
-
-2005-10-18  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version number for RC1 release.
-
diff --git a/xditview/Dvi.c b/xditview/Dvi.c
deleted file mode 100644 (file)
index 75d127f..0000000
+++ /dev/null
@@ -1,559 +0,0 @@
-/* $XConsortium: Dvi.c,v 1.21 94/04/17 20:43:34 keith Exp $ */
-/* $XdotOrg: $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xditview/Dvi.c,v 1.3 2001/08/01 00:45:03 tsi Exp $ */
-
-
-/*
- * Dvi.c - Dvi display widget
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#define XtStrlen(s)    ((s) ? strlen(s) : 0)
-
-  /* The following are defined for the reader's convenience.  Any
-     Xt..Field macro in this code just refers to some field in
-     one of the substructures of the WidgetRec.  */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xmu/Converters.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <ctype.h>
-#include "DviP.h"
-
-/****************************************************************
- *
- * Full class record constant
- *
- ****************************************************************/
-
-/* Private Data */
-/* Note: default_font_map was too long a token for some machines...
- *       therefor it has been split in to and assigned to resources
- *       in the ClassInitialize routine.
- */
-static char default_font_map_1[] =  "\
-R      -*-times-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-I      -*-times-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-B      -*-times-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-F      -*-times-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-TR     -*-times-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-TI     -*-times-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-TB     -*-times-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-TF     -*-times-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-BI     -*-times-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-C      -*-courier-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-CO     -*-courier-medium-o-normal--*-*-*-*-*-*-iso8859-1\n\
-CB     -*-courier-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-CF     -*-courier-bold-o-normal--*-*-*-*-*-*-iso8859-1\n\
-H      -*-helvetica-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-HO     -*-helvetica-medium-o-normal--*-*-*-*-*-*-iso8859-1\n\
-HB     -*-helvetica-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-HF     -*-helvetica-bold-o-normal--*-*-*-*-*-*-iso8859-1\n\
-";
-static char default_font_map_2[] =  "\
-N      -*-new century schoolbook-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-NI     -*-new century schoolbook-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-NB     -*-new century schoolbook-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-NF     -*-new century schoolbook-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-A      -*-charter-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-AI     -*-charter-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-AB     -*-charter-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-AF     -*-charter-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-S      -*-symbol-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific\n\
-S2     -*-symbol-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific\n\
-";
-
-#define offset(field) XtOffsetOf(DviRec, field)
-
-static XtResource resources[] = { 
-       {XtNfontMap, XtCFontMap, XtRString, sizeof (char *),
-        offset(dvi.font_map_string), XtRString, NULL /* set in code */},
-       {XtNforeground, XtCForeground, XtRPixel, sizeof (unsigned long),
-        offset(dvi.foreground), XtRString, XtDefaultForeground},
-       {XtNpageNumber, XtCPageNumber, XtRInt, sizeof (int),
-        offset(dvi.requested_page), XtRImmediate, (XtPointer) 1},
-       {XtNlastPageNumber, XtCLastPageNumber, XtRInt, sizeof (int),
-        offset (dvi.last_page), XtRImmediate, (XtPointer) 0},
-       {XtNfile, XtCFile, XtRFile, sizeof (FILE *),
-        offset (dvi.file), XtRFile, (char *) 0},
-       {XtNseek, XtCSeek, XtRBoolean, sizeof (Boolean),
-        offset(dvi.seek), XtRImmediate, (XtPointer) False},
-       {XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *),
-        offset(dvi.default_font), XtRString, XtDefaultFont},
-       {XtNbackingStore, XtCBackingStore, XtRBackingStore, sizeof (int),
-        offset(dvi.backing_store), XtRString, "default"},
-       {XtNnoPolyText, XtCNoPolyText, XtRBoolean, sizeof (Boolean),
-        offset(dvi.noPolyText), XtRImmediate, (XtPointer) False},
-       {XtNscreenResolution, XtCScreenResolution, XtRInt, sizeof (int),
-        offset(dvi.screen_resolution), XtRImmediate, (XtPointer) 75},
-       {XtNpageWidth, XtCPageWidth, XtRFloat, sizeof (float),
-        offset(dvi.page_width), XtRString, "8.5"},
-       {XtNpageHeight, XtCPageHeight, XtRFloat, sizeof (float),
-        offset(dvi.page_height), XtRString, "11"},
-       {XtNsizeScale, XtCSizeScale, XtRInt, sizeof (int),
-        offset(dvi.size_scale_set), XtRImmediate, (XtPointer) 0},
-};
-
-#undef offset
-
-static void            ClassInitialize(void);
-static void            Initialize(Widget, Widget, ArgList, Cardinal *);
-static void            Realize(Widget, XtValueMask *, XSetWindowAttributes *);
-static void            Destroy(Widget);
-static void            Redisplay(Widget, XEvent *, Region);
-static Boolean         SetValues(Widget, Widget, Widget, ArgList , Cardinal *);
-static Boolean         SetValuesHook(Widget, ArgList, Cardinal *);
-static XtGeometryResult        QueryGeometry(Widget,
-                                     XtWidgetGeometry *, XtWidgetGeometry *);
-static void            RequestDesiredSize(DviWidget);
-static void            ShowDvi(DviWidget);
-static void            CloseFile(DviWidget);
-static void            OpenFile(DviWidget);
-
-#define SuperClass ((SimpleWidgetClass)&simpleClassRec)
-
-DviClassRec dviClassRec = {
-{
-       (WidgetClass) SuperClass,       /* superclass             */    
-       "Dvi",                          /* class_name             */
-       sizeof(DviRec),                 /* size                   */
-       ClassInitialize,                /* class_initialize       */
-       NULL,                           /* class_part_initialize  */
-       FALSE,                          /* class_inited           */
-       Initialize,                     /* initialize             */
-       NULL,                           /* initialize_hook        */
-       Realize,                        /* realize                */
-       NULL,                           /* actions                */
-       0,                              /* num_actions            */
-       resources,                      /* resources              */
-       XtNumber(resources),            /* resource_count         */
-       NULLQUARK,                      /* xrm_class              */
-       FALSE,                          /* compress_motion        */
-       XtExposeCompressMaximal,        /* compress_exposure      */
-       TRUE,                           /* compress_enterleave    */
-       FALSE,                          /* visible_interest       */
-       Destroy,                        /* destroy                */
-       NULL,                           /* resize                 */
-       Redisplay,                      /* expose                 */
-       SetValues,                      /* set_values             */
-       SetValuesHook,                  /* set_values_hook        */
-       XtInheritSetValuesAlmost,       /* set_values_almost      */
-       NULL,                           /* get_values_hook        */
-       NULL,                           /* accept_focus           */
-       XtVersion,                      /* version                */
-       NULL,                           /* callback_private       */
-       0,                              /* tm_table               */
-       QueryGeometry,                  /* query_geometry         */
-       XtInheritDisplayAccelerator,    /* display_accelerator    */
-       NULL,                           /* extension              */
-},  /* CoreClass fields initialization */
-{
-    XtInheritChangeSensitive           /* change_sensitive     */
-},  /* SimpleClass fields initialization */
-{
-    0,                                     /* field not used    */
-},  /* DviClass fields initialization */
-};
-
-WidgetClass dviWidgetClass = (WidgetClass) &dviClassRec;
-
-static void
-ClassInitialize (void)
-{
-  int len1 = strlen(default_font_map_1);
-  int len2 = strlen(default_font_map_2);
-  char *dfm = XtMalloc(len1 + len2 + 1);
-  char *ptr = dfm;
-  strcpy(ptr, default_font_map_1); ptr += len1;
-  strcpy(ptr, default_font_map_2); 
-  resources[0].default_addr = dfm;
-
-  XtAddConverter( XtRString, XtRBackingStore, XmuCvtStringToBackingStore,
-                NULL, 0 );
-}
-
-/****************************************************************
- *
- * Private Procedures
- *
- ****************************************************************/
-
-/* ARGSUSED */
-static void
-Initialize(request, new, args, num_args)
-       Widget request, new;
-       ArgList args;
-       Cardinal *num_args;
-{
-    DviWidget  dw = (DviWidget) new;
-
-    dw->dvi.tmpFile = 0;
-    dw->dvi.readingTmp = 0;
-    dw->dvi.ungot = 0;
-    dw->dvi.normal_GC = 0;
-    dw->dvi.file_map = 0;
-    dw->dvi.fonts = 0;
-    dw->dvi.font_map = 0;
-    dw->dvi.current_page = 0;
-    dw->dvi.font_size = 0;
-    dw->dvi.font_number = 0;
-    dw->dvi.device_resolution = 0;
-    dw->dvi.line_width = 0;
-    dw->dvi.line_style = 0;
-    dw->dvi.font = 0;
-    dw->dvi.display_enable = 0;
-    dw->dvi.scale = 0.0;
-    dw->dvi.state = 0;
-    dw->dvi.cache.index = 0;
-    dw->dvi.cache.font = 0; 
-    dw->dvi.size_scale = 0;
-    dw->dvi.size_scale_set = 0;
-    RequestDesiredSize (dw);
-}
-
-static void
-Realize(w, valueMask, attrs)
-       Widget                  w;
-       XtValueMask             *valueMask;
-       XSetWindowAttributes    *attrs;
-{
-    DviWidget  dw = (DviWidget) w;
-    XGCValues  values;
-
-    if (dw->dvi.backing_store != Always + WhenMapped + NotUseful) {
-       attrs->backing_store = dw->dvi.backing_store;
-       *valueMask |= CWBackingStore;
-    }
-    XtCreateWindow (w, (unsigned)InputOutput, (Visual *) CopyFromParent,
-                   *valueMask, attrs);
-    values.foreground = dw->dvi.foreground;
-    dw->dvi.normal_GC = XCreateGC (XtDisplay (w), XtWindow (w),
-                                   GCForeground, &values);
-#ifdef USE_XFT
-    {
-       int             scr;
-       Visual          *visual;
-       Colormap        cmap;
-       XRenderColor    black;
-
-       scr = XScreenNumberOfScreen (dw->core.screen);
-       visual = DefaultVisual (XtDisplay (w), scr);
-       cmap = DefaultColormap (XtDisplay (w), scr);
-       dw->dvi.draw = XftDrawCreate (XtDisplay (w), XtWindow (w), 
-                                     visual, cmap);
-
-       black.red = black.green = black.blue = 0;
-       black.alpha = 0xffff;
-       XftColorAllocValue (XtDisplay (w), visual, cmap,
-                           &black, &dw->dvi.black);
-       dw->dvi.default_font = XftFontOpenName (XtDisplay (w),
-                                               scr,
-                                               "serif-12");
-    }
-#endif
-    if (dw->dvi.file)
-       OpenFile (dw);
-    ParseFontMap (dw);
-}
-
-static void
-Destroy(w)
-       Widget w;
-{
-       DviWidget       dw = (DviWidget) w;
-
-       XFreeGC (XtDisplay (w), dw->dvi.normal_GC);
-       DestroyFontMap (dw->dvi.font_map);
-       DestroyFileMap (dw->dvi.file_map);
-}
-
-/*
- * Repaint the widget window
- */
-
-/* ARGSUSED */
-static void
-Redisplay(w, event, region)
-       Widget w;
-       XEvent *event;
-       Region region;
-{
-       DviWidget       dw = (DviWidget) w;
-#ifndef USE_XFT
-       XRectangle      extents;
-#endif
-       
-#ifdef USE_XFT
-       XClearArea (XtDisplay (dw),
-                   XtWindow (dw),
-                   0, 0, 0, 0, False);
-       dw->dvi.extents.x1 = 0;
-       dw->dvi.extents.y1 = 0;
-       dw->dvi.extents.x2 = dw->core.width;
-       dw->dvi.extents.y2 = dw->core.height;
-#else
-       XClipBox (region, &extents);
-       dw->dvi.extents.x1 = extents.x;
-       dw->dvi.extents.y1 = extents.y;
-       dw->dvi.extents.x2 = extents.x + extents.width;
-       dw->dvi.extents.y2 = extents.y + extents.height;
-#endif
-       ShowDvi (dw);
-}
-
-static void
-RequestDesiredSize (dw)
-    DviWidget  dw;
-{
-    XtWidgetGeometry   req, rep;
-
-    dw->dvi.desired_width = dw->dvi.page_width *
-                                dw->dvi.screen_resolution;
-    dw->dvi.desired_height = dw->dvi.page_height *
-                                 dw->dvi.screen_resolution;
-    req.request_mode = CWWidth|CWHeight;
-    req.width = dw->dvi.desired_width;
-    req.height = dw->dvi.desired_height;
-    XtMakeGeometryRequest ((Widget) dw, &req, &rep);
-}
-
-/*
- * Set specified arguments into widget
- */
-/* ARGSUSED */
-static Boolean
-SetValues (wcurrent, wrequest, wnew, args, num_args)
-       Widget wcurrent, wrequest, wnew;
-       ArgList args;
-       Cardinal *num_args;
-{
-    DviWidget  current = (DviWidget) wcurrent;
-    DviWidget  request = (DviWidget) wrequest;
-    DviWidget  new     = (DviWidget) wnew;
-    Boolean    redisplay = FALSE;
-    char       *new_map;
-    int                cur, req;
-
-    req = request->dvi.requested_page;
-    cur = current->dvi.requested_page;
-    if (cur != req) {
-           if (req < 1)
-               req = 1;
-           if (request->dvi.file)
-           {
-               if (current->dvi.last_page != 0 &&
-                   req > current->dvi.last_page)
-                       req = current->dvi.last_page;
-           }
-           if (cur != req)
-               redisplay = TRUE;
-           new->dvi.requested_page = req;
-    }
-    
-    if (current->dvi.font_map_string != request->dvi.font_map_string) {
-           new_map = XtMalloc (strlen (request->dvi.font_map_string) + 1);
-           if (new_map) {
-                   redisplay = TRUE;
-                   strcpy (new_map, request->dvi.font_map_string);
-                   new->dvi.font_map_string = new_map;
-                   if (current->dvi.font_map_string)
-                           XtFree (current->dvi.font_map_string);
-                   current->dvi.font_map_string = 0;
-                   ParseFontMap (new);
-           }
-    }
-    if (current->dvi.screen_resolution != request->dvi.screen_resolution)
-    {
-       ResetFonts (new);
-       new->dvi.line_width = -1;
-    }
-    if (request->dvi.device_resolution)
-       new->dvi.scale = ((double) request->dvi.screen_resolution) /
-                            ((double) request->dvi.device_resolution);
-    if (current->dvi.page_width !=  request->dvi.page_width ||
-       current->dvi.page_height != request->dvi.page_height ||
-       current->dvi.screen_resolution != request->dvi.screen_resolution)
-    {
-       RequestDesiredSize (new);
-       redisplay = TRUE;
-    }
-    return redisplay;
-}
-
-/*
- * use the set_values_hook entry to check when
- * the file is set
- */
-
-static Boolean
-SetValuesHook (widget, args, num_argsp)
-       Widget          widget;
-       ArgList         args;
-       Cardinal        *num_argsp;
-{
-       DviWidget       dw = (DviWidget) widget;
-       Cardinal        i;
-
-       for (i = 0; i < *num_argsp; i++) {
-               if (!strcmp (args[i].name, XtNfile)) {
-                       CloseFile (dw);
-                       OpenFile (dw);
-                       return TRUE;
-               }
-       }
-       return FALSE;
-}
-
-static void
-CloseFile (dw)
-       DviWidget       dw;
-{
-    if (dw->dvi.tmpFile)
-       fclose (dw->dvi.tmpFile);
-    ForgetPagePositions (dw);
-}
-
-static void
-OpenFile (dw)
-       DviWidget       dw;
-{
-    char       tmpName[sizeof ("/tmp/dviXXXXXX")];
-#ifdef HAS_MKSTEMP
-    int fd;
-#endif
-
-    dw->dvi.tmpFile = 0;
-    if (!dw->dvi.seek) {
-       strcpy (tmpName, "/tmp/dviXXXXXX");
-#ifndef HAS_MKSTEMP
-       mktemp (tmpName);
-       dw->dvi.tmpFile = fopen (tmpName, "w+");
-#else
-       fd = mkstemp(tmpName);
-       dw->dvi.tmpFile = fdopen(fd, "w+");
-#endif
-       unlink (tmpName);
-    }
-    if (dw->dvi.requested_page < 1)
-       dw->dvi.requested_page = 1;
-    dw->dvi.last_page = 0;
-}
-
-static XtGeometryResult
-QueryGeometry (w, request, geometry_return)
-       Widget                  w;
-       XtWidgetGeometry        *request, *geometry_return;
-{
-       XtGeometryResult        ret;
-       DviWidget               dw = (DviWidget) w;
-
-       ret = XtGeometryYes;
-       if ((int)request->width < dw->dvi.desired_width
-           || (int)request->height < dw->dvi.desired_height)
-               ret = XtGeometryAlmost;
-       geometry_return->width = dw->dvi.desired_width;
-       geometry_return->height = dw->dvi.desired_height;
-       geometry_return->request_mode = CWWidth|CWHeight;
-       return ret;
-}
-
-void
-SetDeviceResolution (dw, resolution)
-       DviWidget   dw;
-       int         resolution;
-{
-    if (resolution != dw->dvi.device_resolution) {
-       dw->dvi.device_resolution = resolution;
-       dw->dvi.scale = ((double)  dw->dvi.screen_resolution) /
-                       ((double) resolution);
-    }
-}
-
-static void
-ShowDvi (dw)
-       DviWidget       dw;
-{
-       int     i;
-       long    file_position;
-
-       if (!dw->dvi.file) 
-         return;
-
-       if (dw->dvi.requested_page < 1)
-               dw->dvi.requested_page = 1;
-
-       if (dw->dvi.last_page != 0 && dw->dvi.requested_page > dw->dvi.last_page)
-               dw->dvi.requested_page = dw->dvi.last_page;
-
-       file_position = SearchPagePosition (dw, dw->dvi.requested_page);
-       if (file_position != -1) {
-               FileSeek(dw, file_position);
-               dw->dvi.current_page = dw->dvi.requested_page;
-       } else {
-               for (i=dw->dvi.requested_page; i > 0; i--) {
-                       file_position = SearchPagePosition (dw, i);
-                       if (file_position != -1)
-                               break;
-               }
-               if (file_position == -1)
-                       file_position = 0;
-               FileSeek (dw, file_position);
-
-               dw->dvi.current_page = i;
-               
-               dw->dvi.display_enable = 0;
-               while (dw->dvi.current_page != dw->dvi.requested_page) {
-                       dw->dvi.current_page = ParseInput (dw);
-                       /*
-                        * at EOF, seek back to the begining of this page.
-                        */
-                       if (feof (dw->dvi.file)) {
-                               file_position = SearchPagePosition (dw,
-                                               dw->dvi.current_page);
-                               if (file_position != -1)
-                                       FileSeek (dw, file_position);
-                               break;
-                       }
-               }
-       }
-       
-       dw->dvi.display_enable = 1;
-       ParseInput (dw);
-       if (dw->dvi.last_page && dw->dvi.requested_page > dw->dvi.last_page)
-               dw->dvi.requested_page = dw->dvi.last_page;
-}
diff --git a/xditview/Dvi.h b/xditview/Dvi.h
deleted file mode 100644 (file)
index 95311fa..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-* $XConsortium: Dvi.h,v 1.5 91/07/25 21:33:53 keith Exp $
-*/
-/* $XFree86$ */
-
-#ifndef _XtDvi_h
-#define _XtDvi_h
-
-/***********************************************************************
- *
- * Dvi Widget
- *
- ***********************************************************************/
-
-/* Parameters:
-
- Name               Class              RepType         Default Value
- ----               -----              -------         -------------
- background         Background         pixel           White
- foreground         Foreground         Pixel           Black
- fontMap            FontMap            char *          ...
- pageNumber         PageNumber         int             1
-*/
-
-#define XtNfontMap     "fontMap"
-#define XtNpageNumber  "pageNumber"
-#define XtNlastPageNumber   "lastPageNumber"
-#define XtNnoPolyText  "noPolyText"
-#define XtNseek                "seek"
-#define XtNscreenResolution "screenResolution"
-#define XtNpageWidth   "pageWidth"
-#define XtNpageHeight  "pageHeight"
-#define XtNsizeScale   "sizeScale"
-
-#define XtCFontMap     "FontMap"
-#define XtCPageNumber  "PageNumber"
-#define XtCLastPageNumber   "LastPageNumber"
-#define XtCNoPolyText  "NoPolyText"
-#define XtCSeek                "Seek"
-#define XtCScreenResolution "ScreenResolution"
-#define XtCPageWidth   "PageWidth"
-#define XtCPageHeight  "PageHeight"
-#define XtCSizeScale   "SizeScale"
-
-typedef struct _DviRec *DviWidget;  /* completely defined in DviPrivate.h */
-typedef struct _DviClassRec *DviWidgetClass;    /* completely defined in DviPrivate.h */
-
-extern WidgetClass dviWidgetClass;
-
-#endif /* _XtDvi_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/xditview/DviChar.c b/xditview/DviChar.c
deleted file mode 100644 (file)
index 3718c74..0000000
+++ /dev/null
@@ -1,678 +0,0 @@
-/* $XConsortium: DviChar.c,v 1.7 91/07/31 00:39:31 keith Exp $ */
-
-/*
- * DviChar.c
- *
- * Map DVI (ditrof output) character names to
- * font indexes and back
- */
-/* $XFree86$ */
-
-# include   <X11/Intrinsic.h>
-# include   "DviChar.h"
-
-# define allocHash()   ((DviCharNameHash *) XtMalloc (sizeof (DviCharNameHash)))
-
-struct map_list {
-       struct map_list *next;
-       DviCharNameMap  *map;
-};
-
-static struct map_list *world;
-
-static int     standard_maps_loaded = 0;
-static void    load_standard_maps (void);
-static int     hash_name (char *name);
-static void    dispose_hash(DviCharNameMap *map);
-static void    compute_hash(DviCharNameMap *map);
-
-DviCharNameMap *
-DviFindMap (encoding)
-       char    *encoding;
-{
-       struct map_list *m;
-
-       if (!standard_maps_loaded)
-               load_standard_maps ();
-       for (m = world; m; m=m->next)
-               if (!strcmp (m->map->encoding, encoding))
-                       return m->map;
-       return 0;
-}
-
-void
-DviRegisterMap (map)
-       DviCharNameMap  *map;
-{
-       struct map_list *m;
-
-       if (!standard_maps_loaded)
-               load_standard_maps ();
-       for (m = world; m; m = m->next)
-               if (!strcmp (m->map->encoding, map->encoding))
-                       break;
-       if (!m) {
-               m = (struct map_list *) XtMalloc (sizeof *m);
-               m->next = world;
-               world = m;
-       }
-       dispose_hash (map);
-       m->map = map;
-       compute_hash (map);
-}
-
-static void
-dispose_hash (map)
-       DviCharNameMap  *map;
-{
-       DviCharNameHash **buckets;
-       DviCharNameHash *h, *next;
-       int             i;
-
-       buckets = map->buckets;
-       for (i = 0; i < DVI_HASH_SIZE; i++) {
-               for (h = buckets[i]; h; h=next) {
-                       next = h->next;
-                       XtFree ((char *) h);
-               }
-       }
-}
-
-static int
-hash_name (name)
-       char    *name;
-{
-       int     i = 0;
-
-       while (*name)
-               i = (i << 1) ^ *name++;
-       if (i < 0)
-               i = -i;
-       return i;
-}
-
-static void
-compute_hash (map)
-       DviCharNameMap  *map;
-{
-       DviCharNameHash **buckets;
-       int             c, s, i;
-       DviCharNameHash *h;
-
-       buckets = map->buckets;
-       for (i = 0; i < DVI_HASH_SIZE; i++)
-               buckets[i] = 0;
-       for (c = 0; c < DVI_MAP_SIZE; c++)
-               for (s = 0; s < DVI_MAX_SYNONYMS; s++) {
-                       if (!map->dvi_names[c][s])
-                               break;
-                       i = hash_name (map->dvi_names[c][s]) % DVI_HASH_SIZE;
-                       h = allocHash ();
-                       h->next = buckets[i];
-                       buckets[i] = h;
-                       h->name = map->dvi_names[c][s];
-                       h->position = c;
-               }
-       
-}
-
-int
-DviCharIndex (map, name)
-       DviCharNameMap  *map;
-       char            *name;
-{
-       int             i;
-       DviCharNameHash *h;
-
-       i = hash_name (name) % DVI_HASH_SIZE;
-       for (h = map->buckets[i]; h; h=h->next)
-               if (!strcmp (h->name, name))
-                       return h->position;
-       return -1;
-}
-
-static DviCharNameMap ISO8859_1_map = {
-       "iso8859-1",
-       0,
-{
-{      0,              /* 0 */},
-{      0,              /* 1 */},
-{      0,              /* 2 */},
-{      0,              /* 3 */},
-{      0,              /* 4 */},
-{      0,              /* 5 */},
-{      0,              /* 6 */},
-{      0,              /* 7 */},
-{      0,              /* 8 */},
-{      0,              /* 9 */},
-{      0,              /* 10 */},
-{      0,              /* 11 */},
-{      0,              /* 12 */},
-{      0,              /* 13 */},
-{      0,              /* 14 */},
-{      0,              /* 15 */},
-{      0,              /* 16 */},
-{      0,              /* 17 */},
-{      0,              /* 18 */},
-{      0,              /* 19 */},
-{      0,              /* 20 */},
-{      0,              /* 21 */},
-{      0,              /* 22 */},
-{      0,              /* 23 */},
-{      0,              /* 24 */},
-{      0,              /* 25 */},
-{      0,              /* 26 */},
-{      0,              /* 27 */},
-{      0,              /* 28 */},
-{      0,              /* 29 */},
-{      0,              /* 30 */},
-{      0,              /* 31 */},
-{      0,              /* 32 */},
-{      "!",            /* 33 */},
-{      "\"",           /* 34 */},
-{      "#",            /* 35 */},
-{      "$",            /* 36 */},
-{      "%",            /* 37 */},
-{      "&",            /* 38 */},
-{      "'",            /* 39 */},
-{      "(",            /* 40 */},
-{      ")",            /* 41 */},
-{      "*",            /* 42 */},
-{      "+",            /* 43 */},
-{      ",",            /* 44 */},
-{      "-","\\-",      /* 45 */},
-{      ".",            /* 46 */},
-{      "/","sl",       /* 47 */},
-{      "0",            /* 48 */},
-{      "1",            /* 49 */},
-{      "2",            /* 50 */},
-{      "3",            /* 51 */},
-{      "4",            /* 52 */},
-{      "5",            /* 53 */},
-{      "6",            /* 54 */},
-{      "7",            /* 55 */},
-{      "8",            /* 56 */},
-{      "9",            /* 57 */},
-{      ":",            /* 58 */},
-{      ";",            /* 59 */},
-{      "<",            /* 60 */},
-{      "=","eq",       /* 61 */},
-{      ">",            /* 62 */},
-{      "?",            /* 63 */},
-{      "@",            /* 64 */},
-{      "A",            /* 65 */},
-{      "B",            /* 66 */},
-{      "C",            /* 67 */},
-{      "D",            /* 68 */},
-{      "E",            /* 69 */},
-{      "F",            /* 70 */},
-{      "G",            /* 71 */},
-{      "H",            /* 72 */},
-{      "I",            /* 73 */},
-{      "J",            /* 74 */},
-{      "K",            /* 75 */},
-{      "L",            /* 76 */},
-{      "M",            /* 77 */},
-{      "N",            /* 78 */},
-{      "O",            /* 79 */},
-{      "P",            /* 80 */},
-{      "Q",            /* 81 */},
-{      "R",            /* 82 */},
-{      "S",            /* 83 */},
-{      "T",            /* 84 */},
-{      "U",            /* 85 */},
-{      "V",            /* 86 */},
-{      "W",            /* 87 */},
-{      "X",            /* 88 */},
-{      "Y",            /* 89 */},
-{      "Z",            /* 90 */},
-{      "[",            /* 91 */},
-{      "\\",           /* 92 */},
-{      "]",            /* 93 */},
-{      "a^",           /* 94 */},
-{      "_","ru","ul",  /* 95 */},
-{      "`",            /* 96 */},
-{      "a",            /* 97 */},
-{      "b",            /* 98 */},
-{      "c",            /* 99 */},
-{      "d",            /* 100 */},
-{      "e",            /* 101 */},
-{      "f",            /* 102 */},
-{      "g",            /* 103 */},
-{      "h",            /* 104 */},
-{      "i",            /* 105 */},
-{      "j",            /* 106 */},
-{      "k",            /* 107 */},
-{      "l",            /* 108 */},
-{      "m",            /* 109 */},
-{      "n",            /* 110 */},
-{      "o",            /* 111 */},
-{      "p",            /* 112 */},
-{      "q",            /* 113 */},
-{      "r",            /* 114 */},
-{      "s",            /* 115 */},
-{      "t",            /* 116 */},
-{      "u",            /* 117 */},
-{      "v",            /* 118 */},
-{      "w",            /* 119 */},
-{      "x",            /* 120 */},
-{      "y",            /* 121 */},
-{      "z",            /* 122 */},
-{      "{",            /* 123 */},
-{      "|","or"        /* 124 */},
-{      "}",            /* 125 */},
-{      "a~","ap"       /* 126 */},
-{      0,              /* 127 */},
-{      0,              /* 128 */},
-{      0,              /* 129 */},
-{      0,              /* 130 */},
-{      0,              /* 131 */},
-{      0,              /* 132 */},
-{      0,              /* 133 */},
-{      0,              /* 134 */},
-{      0,              /* 135 */},
-{      0,              /* 136 */},
-{      0,              /* 137 */},
-{      0,              /* 138 */},
-{      0,              /* 139 */},
-{      0,              /* 140 */},
-{      0,              /* 141 */},
-{      0,              /* 142 */},
-{      0,              /* 143 */},
-{      0,              /* 144 */},
-{      0,              /* 145 */},
-{      0,              /* 146 */},
-{      0,              /* 147 */},
-{      0,              /* 148 */},
-{      0,              /* 149 */},
-{      0,              /* 150 */},
-{      0,              /* 151 */},
-{      0,              /* 152 */},
-{      0,              /* 153 */},
-{      0,              /* 154 */},
-{      0,              /* 155 */},
-{      0,              /* 156 */},
-{      0,              /* 157 */},
-{      0,              /* 158 */},
-{      0,              /* 159 */},
-{      0,              /* 160 */},
-{      "I!",           /* 161 */},
-{      "ct",           /* 162 */},
-{      "po",           /* 163 */},
-{      "cu",           /* 164 */},
-{      "$J",           /* 165 */},
-{      0,              /* 166 */},
-{      "sc",           /* 167 */},
-{      0,              /* 168 */},
-{      "co",           /* 169 */},
-{      0,              /* 170 */},
-{      "d<",           /* 171 */},
-{      "no",           /* 172 */},
-{      "hy",           /* 173 */},
-{      "rg",           /* 174 */},
-{      "ma",           /* 175 */},
-{      "de",           /* 176 */},
-{      "+-",           /* 177 */},
-{      0,              /* 178 */},
-{      0,              /* 179 */},
-{      "aa",           /* 180 */},
-{      "*m",           /* 181 */},
-{      "pp",           /* 182 */},
-{      0,              /* 183 */},
-{      "cd",           /* 184 */},
-{      0,              /* 185 */},
-{      0,              /* 186 */},
-{      "d>",           /* 187 */},
-{      "14",           /* 188 */},
-{      "12",           /* 189 */},
-{      "34",           /* 190 */},
-{      "I?",           /* 191 */},
-{      0,              /* 192 */},
-{      0,              /* 193 */},
-{      0,              /* 194 */},
-{      0,              /* 195 */},
-{      0,              /* 196 */},
-{      0,              /* 197 */},
-{      "AE",           /* 198 */},
-{      0,              /* 199 */},
-{      0,              /* 200 */},
-{      0,              /* 201 */},
-{      0,              /* 202 */},
-{      0,              /* 203 */},
-{      0,              /* 204 */},
-{      0,              /* 205 */},
-{      0,              /* 206 */},
-{      0,              /* 207 */},
-{      0,              /* 208 */},
-{      0,              /* 209 */},
-{      0,              /* 210 */},
-{      0,              /* 211 */},
-{      0,              /* 212 */},
-{      0,              /* 213 */},
-{      0,              /* 214 */},
-{      "mu",           /* 215 */},
-{      "O/",           /* 216 */},
-{      0,              /* 217 */},
-{      0,              /* 218 */},
-{      0,              /* 219 */},
-{      0,              /* 220 */},
-{      0,              /* 221 */},
-{      0,              /* 222 */},
-{      "ss",           /* 223 */},
-{      0,              /* 224 */},
-{      0,              /* 225 */},
-{      0,              /* 226 */},
-{      0,              /* 227 */},
-{      0,              /* 228 */},
-{      0,              /* 229 */},
-{      "ae",           /* 230 */},
-{      0,              /* 231 */},
-{      0,              /* 232 */},
-{      0,              /* 233 */},
-{      0,              /* 234 */},
-{      0,              /* 235 */},
-{      0,              /* 236 */},
-{      0,              /* 237 */},
-{      0,              /* 238 */},
-{      0,              /* 239 */},
-{      0,              /* 240 */},
-{      0,              /* 241 */},
-{      0,              /* 242 */},
-{      0,              /* 243 */},
-{      0,              /* 244 */},
-{      0,              /* 245 */},
-{      0,              /* 246 */},
-{      0,              /* 247 */},
-{      0,              /* 248 */},
-{      0,              /* 249 */},
-{      0,              /* 250 */},
-{      0,              /* 251 */},
-{      0,              /* 252 */},
-{      0,              /* 253 */},
-{      0,              /* 254 */},
-{      0,              /* 255 */},
-},
-{
-{   "fi",          "fi",   },
-{   "fl",          "fl",   },
-{   "ff",          "ff",   },
-{   "Fi",          "ffi",   },
-{   "Fl",          "ffl",   },
-{   0,             0,      },
-}
-};
-
-static DviCharNameMap Adobe_Symbol_map = {
-       "adobe-fontspecific",
-       1,
-{
-{      0,              /* 0 */},
-{      0,              /* 1 */},
-{      0,              /* 2 */},
-{      0,              /* 3 */},
-{      0,              /* 4 */},
-{      0,              /* 5 */},
-{      0,              /* 6 */},
-{      0,              /* 7 */},
-{      0,              /* 8 */},
-{      0,              /* 9 */},
-{      0,              /* 10 */},
-{      0,              /* 11 */},
-{      0,              /* 12 */},
-{      0,              /* 13 */},
-{      0,              /* 14 */},
-{      0,              /* 15 */},
-{      0,              /* 16 */},
-{      0,              /* 17 */},
-{      0,              /* 18 */},
-{      0,              /* 19 */},
-{      0,              /* 20 */},
-{      0,              /* 21 */},
-{      0,              /* 22 */},
-{      0,              /* 23 */},
-{      0,              /* 24 */},
-{      0,              /* 25 */},
-{      0,              /* 26 */},
-{      0,              /* 27 */},
-{      0,              /* 28 */},
-{      0,              /* 29 */},
-{      0,              /* 30 */},
-{      0,              /* 31 */},
-{      0,              /* 32 */},
-{      "!",            /* 33 */},
-{      "fa",           /* 34 */},
-{      "#",            /* 35 */},
-{      "te",           /* 36 */},
-{      "%",            /* 37 */},
-{      "&",            /* 38 */},
-{      "cm",           /* 39 */},
-{      "(",            /* 40 */},
-{      ")",            /* 41 */},
-{      "**",           /* 42 */},
-{      "+","pl",       /* 43 */},
-{      ",",            /* 44 */},
-{      "-","mi","\\-", /* 45 */},
-{      ".",            /* 46 */},
-{      "/","sl",       /* 47 */},
-{      "0",            /* 48 */},
-{      "1",            /* 49 */},
-{      "2",            /* 50 */},
-{      "3",            /* 51 */},
-{      "4",            /* 52 */},
-{      "5",            /* 53 */},
-{      "6",            /* 54 */},
-{      "7",            /* 55 */},
-{      "8",            /* 56 */},
-{      "9",            /* 57 */},
-{      ":",            /* 58 */},
-{      ";",            /* 59 */},
-{      "<",            /* 60 */},
-{      "=","eq",       /* 61 */},
-{      ">",            /* 62 */},
-{      "?",            /* 63 */},
-{      "=~",           /* 64 */},
-{      "*A",           /* 65 */},
-{      "*B",           /* 66 */},
-{      "*C",           /* 67 */},
-{      "*D",           /* 68 */},
-{      "*E",           /* 69 */},
-{      "*F",           /* 70 */},
-{      "*G",           /* 71 */},
-{      "*Y",           /* 72 */},
-{      "*I",           /* 73 */},
-{      0,              /* 74 */},
-{      "*K",           /* 75 */},
-{      "*L",           /* 76 */},
-{      "*M",           /* 77 */},
-{      "*N",           /* 78 */},
-{      "*O",           /* 79 */},
-{      "*P",           /* 80 */},
-{      "*H",           /* 81 */},
-{      "*R",           /* 82 */},
-{      "*S",           /* 83 */},
-{      "*T",           /* 84 */},
-{      "*U",           /* 85 */},
-{      "ts",           /* 86 */},
-{      "*W",           /* 87 */},
-{      "*C",           /* 88 */},
-{      "*Q",           /* 89 */},
-{      "*Z",           /* 90 */},
-{      "[",            /* 91 */},
-{      "tf",           /* 92 */},
-{      "]",            /* 93 */},
-{      "bt",           /* 94 */},
-{      "ul",           /* 95 */},
-{      "rn",           /* 96 */},
-{      "*a",           /* 97 */},
-{      "*b",           /* 98 */},
-{      "*x",           /* 99 */},
-{      "*d",           /* 100 */},
-{      "*e",           /* 101 */},
-{      "*f",           /* 102 */},
-{      "*g",           /* 103 */},
-{      "*y",           /* 104 */},
-{      "*i",           /* 105 */},
-{      0,              /* 106 */},
-{      "*k",           /* 107 */},
-{      "*l",           /* 108 */},
-{      "*m",           /* 109 */},
-{      "*n",           /* 110 */},
-{      "*o",           /* 111 */},
-{      "*p",           /* 112 */},
-{      "*h",           /* 113 */},
-{      "*r",           /* 114 */},
-{      "*s",           /* 115 */},
-{      "*t",           /* 116 */},
-{      "*u",           /* 117 */},
-{      0,              /* 118 */},
-{      "*w",           /* 119 */},
-{      "*c",           /* 120 */},
-{      "*q",           /* 121 */},
-{      "*z",           /* 122 */},
-{      "{",            /* 123 */},
-{      "|",            /* 124 */},
-{      "}",            /* 125 */},
-{      "a~","ap",      /* 126 */},
-{      0,              /* 127 */},
-{      0,              /* 128 */},
-{      0,              /* 129 */},
-{      0,              /* 130 */},
-{      0,              /* 131 */},
-{      0,              /* 132 */},
-{      0,              /* 133 */},
-{      0,              /* 134 */},
-{      0,              /* 135 */},
-{      0,              /* 136 */},
-{      0,              /* 137 */},
-{      0,              /* 138 */},
-{      0,              /* 139 */},
-{      0,              /* 140 */},
-{      0,              /* 141 */},
-{      0,              /* 142 */},
-{      0,              /* 143 */},
-{      0,              /* 144 */},
-{      0,              /* 145 */},
-{      0,              /* 146 */},
-{      0,              /* 147 */},
-{      0,              /* 148 */},
-{      0,              /* 149 */},
-{      0,              /* 150 */},
-{      0,              /* 151 */},
-{      0,              /* 152 */},
-{      0,              /* 153 */},
-{      0,              /* 154 */},
-{      0,              /* 155 */},
-{      0,              /* 156 */},
-{      0,              /* 157 */},
-{      0,              /* 158 */},
-{      0,              /* 159 */},
-{      0,              /* 160 */},
-{      0,              /* 161 */},
-{      "fm","mt",      /* 162 */},
-{      "<=",           /* 163 */},
-{      "/","sl"        /* 164 */},
-{      "if",           /* 165 */},
-{      0,              /* 166 */},
-{      "Cc",           /* 167 */},
-{      "Cd",           /* 168 */},
-{      "Ch",           /* 169 */},
-{      "Cs",           /* 170 */},
-{      "<>",           /* 171 */},
-{      "<-",           /* 172 */},
-{      "ua",           /* 173 */},
-{      "->",           /* 174 */},
-{      "da",           /* 175 */},
-{      "de",           /* 176 */},
-{      "+-",           /* 177 */},
-{      "sd",           /* 178 */},
-{      ">=",           /* 179 */},
-{      "mu",           /* 180 */},
-{      "pt",           /* 181 */},
-{      "pd",           /* 182 */},
-{      "bu",           /* 183 */},
-{      "di",           /* 184 */},
-{      "!=",           /* 185 */},
-{      "==",           /* 186 */},
-{      "~=",           /* 187 */},
-{      "..",           /* 188 */},
-{      "br",           /* 189 */},
-{      "em",           /* 190 */},
-{      "cr",           /* 191 */},
-{      "al",           /* 192 */},
-{      0,              /* 193 */},
-{      0,              /* 194 */},
-{      0,              /* 195 */},
-{      "ax",           /* 196 */},
-{      "a+",           /* 197 */},
-{      "es",           /* 198 */},
-{      "ca",           /* 199 */},
-{      "cu",           /* 200 */},
-{      "sp",           /* 201 */},
-{      "ip",           /* 202 */},
-{      "!s",           /* 203 */},
-{      "sb",           /* 204 */},
-{      "ib",           /* 205 */},
-{      "mo",           /* 206 */},
-{      "!m",           /* 207 */},
-{      "ag",           /* 208 */},
-{      "gr",           /* 209 */},
-{      0,              /* 210 */},
-{      0,              /* 211 */},
-{      0,              /* 212 */},
-{      0,              /* 213 */},
-{      "sr",           /* 214 */},
-{      "m.",           /* 215 */},
-{      "no",           /* 216 */},
-{      "an",           /* 217 */},
-{      "lo",           /* 218 */},
-{      "io",           /* 219 */},
-{      "<:",           /* 220 */},
-{      "u=",           /* 221 */},
-{      ":>",           /* 222 */},
-{      "d=",           /* 223 */},
-{      "dm",           /* 224 */},
-{      "L<",           /* 225 */},
-{      "rg",           /* 226 */},
-{      "co",           /* 227 */},
-{      "tm",           /* 228 */},
-{      0,              /* 229 */},
-{      0,              /* 230 */},
-{      0,              /* 231 */},
-{      0,              /* 232 */},
-{      "lc",           /* 233 */},
-{      0,              /* 234 */},
-{      "lf",           /* 235 */},
-{      "lt",           /* 236 */},
-{      "lk",           /* 237 */},
-{      "lb",           /* 238 */},
-{      "bv",           /* 239 */},
-{      "AL",           /* 240 */},
-{      "R>",           /* 241 */},
-{      "is",           /* 242 */},
-{      0,              /* 243 */},
-{      0,              /* 244 */},
-{      0,              /* 245 */},
-{      0,              /* 246 */},
-{      0,              /* 247 */},
-{      0,              /* 248 */},
-{      "rc",           /* 249 */},
-{      0,              /* 250 */},
-{      "rf",           /* 251 */},
-{      "rt",           /* 252 */},
-{      "rk",           /* 253 */},
-{      "rb",           /* 254 */},
-{      0,              /* 255 */},
-},
-{
-{      0,          0   },
-}
-};
-
-static void
-load_standard_maps ()
-{
-       standard_maps_loaded = 1;
-       DviRegisterMap (&ISO8859_1_map);
-       DviRegisterMap (&Adobe_Symbol_map);
-}
-
diff --git a/xditview/DviChar.h b/xditview/DviChar.h
deleted file mode 100644 (file)
index 1097f6a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * DviChar.h
- *
- * descriptions for mapping dvi names to
- * font indexes and back.  Dvi fonts are all
- * 256 elements (actually only 256-32 are usable).
- *
- * The encoding names are taken from X -
- * case insensitive, a dash seperating the
- * CharSetRegistry from the CharSetEncoding
- */
-/* $XFree86$ */
-
-#ifndef _DVICHAR_H_
-#define _DVICHAR_H_
-
-#include "Dvi.h"
-
-# define DVI_MAX_SYNONYMS      10
-# define DVI_MAP_SIZE          256
-# define DVI_HASH_SIZE         256
-# define DVI_MAX_LIGATURES     16
-
-typedef struct _dviCharNameHash {
-       struct _dviCharNameHash *next;
-       char                    *name;
-       int                     position;
-} DviCharNameHash;
-
-typedef struct _dviCharNameMap {
-    char               *encoding;
-    int                        special;
-    char               *dvi_names[DVI_MAP_SIZE][DVI_MAX_SYNONYMS];
-    char               *ligatures[DVI_MAX_LIGATURES][2];
-    DviCharNameHash    *buckets[DVI_HASH_SIZE];
-} DviCharNameMap;
-
-extern DviCharNameMap  *DviFindMap (char *);
-extern void            DviRegisterMap (DviCharNameMap *);
-#ifdef NOTDEF
-extern char            *DviCharName (DviCharNameMap *, int, int);
-#else
-#define DviCharName(map,index,synonym) ((map)->dvi_names[index][synonym])
-#endif
-extern int             DviCharIndex (DviCharNameMap *, char *);
-extern unsigned char   *DviCharIsLigature (DviCharNameMap *, char *);
-extern void            ResetFonts (DviWidget);
-
-#endif
diff --git a/xditview/DviP.h b/xditview/DviP.h
deleted file mode 100644 (file)
index 2ead024..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * $XConsortium: DviP.h,v 1.10 92/02/11 01:27:15 keith Exp $
- */
-/* $XFree86: xc/programs/xditview/DviP.h,v 1.4 2001/08/01 00:45:03 tsi Exp $ */
-
-/* 
- * DviP.h - Private definitions for Dvi widget
- */
-
-#ifndef _XtDviP_h
-#define _XtDviP_h
-
-#ifdef USE_XFT
-#include <X11/Xft/Xft.h>
-#endif
-
-#include "Dvi.h"
-#include <X11/Xaw/SimpleP.h>
-#include "DviChar.h"
-
-/***********************************************************************
- *
- * Dvi Widget Private Data
- *
- ***********************************************************************/
-
-/************************************
- *
- *  Class structure
- *
- ***********************************/
-
-/*
- * New fields for the Dvi widget class record
- */
-
-typedef struct _DviClass {
-       int             makes_compiler_happy;  /* not used */
-} DviClassPart;
-
-/*
- * Full class record declaration
- */
-
-typedef struct _DviClassRec {
-    CoreClassPart      core_class;
-    SimpleClassPart    simple_class;
-    DviClassPart       command_class;
-} DviClassRec;
-
-extern DviClassRec dviClassRec;
-
-/***************************************
- *
- *  Instance (widget) structure 
- *
- **************************************/
-
-/*
- * a list of fonts we've used for this widget
- */
-
-typedef struct _dviFontSizeList {
-       struct _dviFontSizeList *next;
-       int                     size;
-       char                    *x_name;
-#ifdef USE_XFT
-       XftFont                 *font;
-       Bool                    core;
-#else
-       XFontStruct             *font;
-#endif
-       int                     doesnt_exist;
-} DviFontSizeList;
-
-typedef struct _dviFontList {
-       struct _dviFontList     *next;
-       char                    *dvi_name;
-       char                    *x_name;
-       int                     dvi_number;
-       Boolean                 initialized;
-       Boolean                 scalable;
-       DviFontSizeList         *sizes;
-       DviCharNameMap          *char_map;
-} DviFontList;
-
-typedef struct _dviFontMap {
-       struct _dviFontMap      *next;
-       char                    *dvi_name;
-       char                    *x_name;
-} DviFontMap;
-
-#define DVI_TEXT_CACHE_SIZE    256
-#define DVI_CHAR_CACHE_SIZE    1024
-
-#ifdef USE_XFT
-typedef struct _dviTextItem {
-       char            *chars;
-       int             nchars;
-       int             x;
-       XftFont         *font;
-} DviTextItem;
-#endif
-
-typedef struct _dviCharCache {
-#ifdef USE_XFT
-       DviTextItem     cache[DVI_TEXT_CACHE_SIZE];
-#else
-       XTextItem       cache[DVI_TEXT_CACHE_SIZE];
-#endif
-       char            char_cache[DVI_CHAR_CACHE_SIZE];
-       int             index;
-       int             max;
-       int             char_index;
-       int             font_size;
-       int             font_number;
-#ifdef USE_XFT
-       XftFont         *font;
-#else
-       XFontStruct     *font;
-#endif
-       int             start_x, start_y;
-       int             x, y;
-} DviCharCache;
-
-typedef struct _dviState {
-       struct _dviState        *next;
-       int                     font_size;
-       int                     font_bound;
-       int                     font_number;
-       int                     line_style;
-       int                     line_width;
-       int                     x;
-       int                     y;
-} DviState;
-
-typedef struct _dviFileMap {
-       struct _dviFileMap      *next;
-       long                    position;
-       int                     page_number;
-} DviFileMap;
-
-/*
- * New fields for the Dvi widget record
- */
-
-typedef struct {
-       /*
-        * resource specifiable items
-        */
-       char            *font_map_string;
-       unsigned long   foreground;
-       int             requested_page;
-       int             last_page;
-       FILE            *file;
-       Boolean         seek;           /* file is "seekable" */
-#ifdef USE_XFT
-       XftFont         *default_font;
-#else
-       XFontStruct     *default_font;
-#endif
-       int             backing_store;
-       Boolean         noPolyText;
-       int             screen_resolution;
-       float           page_width;
-       float           page_height;
-       int             size_scale_set;
-       /*
-        * private state
-        */
-       FILE            *tmpFile;       /* used when reading stdin */
-       char            readingTmp;     /* reading now from tmp */
-       char            ungot;          /* have ungetc'd a char */
-       GC              normal_GC;
-#ifdef USE_XFT
-       XftDraw         *draw;
-       XftColor        black;
-#endif
-       DviFileMap      *file_map;
-       DviFontList     *fonts;
-       DviFontMap      *font_map;
-       int             current_page;
-       int             font_size;
-       int             font_number;
-       int             device_resolution;
-       int             line_width;
-       int             line_style;
-       int             desired_width;
-       int             desired_height;
-       int             size_scale;     /* font size scale */
-#ifdef USE_XFT
-       XftFont         *font;
-#else
-       XFontStruct     *font;
-#endif
-       int             display_enable;
-       double          scale;          /* device coordinates to pixels */
-       struct ExposedExtents {
-           int x1, y1, x2, y2;
-       }               extents;
-       DviState        *state;
-       DviCharCache    cache;
-} DviPart;
-
-extern int             DviGetAndPut(DviWidget, int *);
-
-#define DviGetIn(dw,cp)\
-    (dw->dvi.tmpFile ? (\
-       DviGetAndPut (dw, cp) \
-    ) :\
-       (*cp = getc (dw->dvi.file))\
-)
-
-#define DviGetC(dw, cp)\
-    (dw->dvi.readingTmp ? (\
-       ((*cp = getc (dw->dvi.tmpFile)) == EOF) ? (\
-           fseek (dw->dvi.tmpFile, 0l, 2),\
-           (dw->dvi.readingTmp = 0),\
-           DviGetIn (dw,cp)\
-       ) : (\
-           *cp\
-       )\
-    ) : (\
-       DviGetIn(dw,cp)\
-    )\
-)
-
-#define DviUngetC(dw, c)\
-    (dw->dvi.readingTmp ? (\
-       ungetc (c, dw->dvi.tmpFile)\
-    ) : ( \
-       (dw->dvi.ungot = 1),\
-       ungetc (c, dw->dvi.file)))
-
-#define ToX(dw,device)             ((int) ((device) * (dw)->dvi.scale + 0.5))
-#define ToDevice(dw,x)             ((int) ((x) / (dw)->dvi.scale + 0.5))
-#define SizeScale(dw)              ((dw)->dvi.size_scale ? (dw)->dvi.size_scale : 4)
-#define FontSizeInPixels(dw,size)   ((int) ((size) * (dw)->dvi.screen_resolution / (SizeScale(dw) * 72)))
-#define FontSizeInDevice(dw,size)   ((int) ((size) * (dw)->dvi.device_resolution / (SizeScale(dw) * 72)))
-
-/*
- * Full widget declaration
- */
-
-typedef struct _DviRec {
-    CorePart   core;
-    SimplePart simple;
-    DviPart    dvi;
-} DviRec;
-
-/* draw.c */
-extern void            HorizontalMove(DviWidget, int);
-extern void            HorizontalGoto(DviWidget, int);
-extern void            VerticalMove(DviWidget, int);
-extern void            VerticalGoto(DviWidget, int);
-extern void            FlushCharCache(DviWidget);
-extern void            SetGCForDraw(DviWidget);
-extern void            DrawLine(DviWidget, int, int);
-extern void            DrawCircle(DviWidget, int);
-extern void            DrawEllipse(DviWidget, int, int);
-extern void            DrawArc(DviWidget, int, int, int, int);
-extern void            DrawSpline(DviWidget, char *, int);
-
-/* font.c */
-extern void            ParseFontMap(DviWidget);
-extern void            DestroyFontMap(DviFontMap *);
-extern void            SetFontPosition(DviWidget, int, char *, char *);
-#ifdef USE_XFT
-extern XftFont *       QueryFont(DviWidget, int, int);
-#else
-extern XFontStruct *   QueryFont(DviWidget, int, int);
-#endif
-extern DviCharNameMap *        QueryFontMap(DviWidget, int);
-
-/* lex.c */
-extern char *          GetLine(DviWidget, char *, int);
-extern char *          GetWord(DviWidget, char *, int);
-extern int             GetNumber(DviWidget);
-
-/* page.c */
-extern void            DestroyFileMap(DviFileMap *);
-extern void            ForgetPagePositions(DviWidget);
-extern void            RememberPagePosition(DviWidget, int);
-extern long            SearchPagePosition(DviWidget, int);
-extern void            FileSeek(DviWidget, long);
-
-/* parse.c */
-extern int             ParseInput(DviWidget);
-
-/* Dvi.c */
-extern void            SetDeviceResolution(DviWidget, int);
-
-#endif /* _XtDviP_h */
diff --git a/xditview/Makefile.am b/xditview/Makefile.am
deleted file mode 100644 (file)
index d57f012..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-bin_PROGRAMS = xditview
-
-xditview_CFLAGS = $(XDITVIEW_CFLAGS)
-xditview_LDADD = $(XDITVIEW_LIBS) -lm
-
-xditview_SOURCES =     \
-        draw.c \
-        Dvi.c \
-        DviChar.c \
-        DviChar.h \
-        Dvi.h \
-        DviP.h \
-        font.c \
-        lex.c \
-        Menu.h \
-        page.c \
-        parse.c \
-        xditview.c \
-        XFontName.c \
-        XFontName.h
-
-appman_PRE = \
-        xditview.man
-
-# App default files  (*.ad)
-
-appdefaultdir = @appdefaultdir@
-
-APPDEFAULTFILES = \
-        Xditview \
-        Xditview-chrtr
-
-# Bitmaps referenced at runtime
-bitmapdir = $(includedir)/X11/bitmaps
-dist_bitmap_DATA = ldblarrow rdblarrow
-
-SUFFIXES = .ad
-
-.ad:
-       cp $< $@
-
-appdefault_DATA = $(APPDEFAULTFILES)
-
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) xdit.bm xdit_mask.bm
-
-CLEANFILES = $(APPDEFAULTFILES)
-
-
-appmandir = $(APP_MAN_DIR)
-
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-
-EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
-
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
diff --git a/xditview/Makefile.in b/xditview/Makefile.in
deleted file mode 100644 (file)
index 163c395..0000000
+++ /dev/null
@@ -1,860 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = xditview$(EXEEXT)
-DIST_COMMON = README $(am__configure_deps) $(dist_bitmap_DATA) \
-       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
-       install-sh missing mkinstalldirs
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
-       "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(bitmapdir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am_xditview_OBJECTS = xditview-draw.$(OBJEXT) xditview-Dvi.$(OBJEXT) \
-       xditview-DviChar.$(OBJEXT) xditview-font.$(OBJEXT) \
-       xditview-lex.$(OBJEXT) xditview-page.$(OBJEXT) \
-       xditview-parse.$(OBJEXT) xditview-xditview.$(OBJEXT) \
-       xditview-XFontName.$(OBJEXT)
-xditview_OBJECTS = $(am_xditview_OBJECTS)
-am__DEPENDENCIES_1 =
-xditview_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(xditview_SOURCES)
-DIST_SOURCES = $(xditview_SOURCES)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appdefaultDATA_INSTALL = $(INSTALL_DATA)
-appmanDATA_INSTALL = $(INSTALL_DATA)
-dist_bitmapDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appdefault_DATA) $(appman_DATA) $(dist_bitmap_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EXEEXT = @EXEEXT@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@
-TMP_XAW_LIBS = @TMP_XAW_LIBS@
-VERSION = @VERSION@
-XAW_USE_XPRINT_FALSE = @XAW_USE_XPRINT_FALSE@
-XAW_USE_XPRINT_TRUE = @XAW_USE_XPRINT_TRUE@
-XDITVIEW_CFLAGS = @XDITVIEW_CFLAGS@
-XDITVIEW_LIBS = @XDITVIEW_LIBS@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-
-# App default files  (*.ad)
-appdefaultdir = @appdefaultdir@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-xditview_CFLAGS = $(XDITVIEW_CFLAGS)
-xditview_LDADD = $(XDITVIEW_LIBS) -lm
-xditview_SOURCES = \
-        draw.c \
-        Dvi.c \
-        DviChar.c \
-        DviChar.h \
-        Dvi.h \
-        DviP.h \
-        font.c \
-        lex.c \
-        Menu.h \
-        page.c \
-        parse.c \
-        xditview.c \
-        XFontName.c \
-        XFontName.h
-
-appman_PRE = \
-        xditview.man
-
-APPDEFAULTFILES = \
-        Xditview \
-        Xditview-chrtr
-
-
-# Bitmaps referenced at runtime
-bitmapdir = $(includedir)/X11/bitmaps
-dist_bitmap_DATA = ldblarrow rdblarrow
-SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
-appdefault_DATA = $(APPDEFAULTFILES)
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) xdit.bm xdit_mask.bm \
-       $(appman_PRE)
-CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
-appmandir = $(APP_MAN_DIR)
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
-am--refresh:
-       @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           echo ' $(SHELL) ./config.status'; \
-           $(SHELL) ./config.status;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
-       else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h1
-       cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       rm -f stamp-h1
-       touch $@
-
-distclean-hdr:
-       -rm -f config.h stamp-h1
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
-
-clean-binPROGRAMS:
-       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-xditview$(EXEEXT): $(xditview_OBJECTS) $(xditview_DEPENDENCIES) 
-       @rm -f xditview$(EXEEXT)
-       $(LINK) $(xditview_LDFLAGS) $(xditview_OBJECTS) $(xditview_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-Dvi.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-DviChar.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-XFontName.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-draw.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-font.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-lex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-page.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-parse.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xditview-xditview.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-xditview-draw.o: draw.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-draw.o -MD -MP -MF "$(DEPDIR)/xditview-draw.Tpo" -c -o xditview-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-draw.Tpo" "$(DEPDIR)/xditview-draw.Po"; else rm -f "$(DEPDIR)/xditview-draw.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='draw.c' object='xditview-draw.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-draw.o `test -f 'draw.c' || echo '$(srcdir)/'`draw.c
-
-xditview-draw.obj: draw.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-draw.obj -MD -MP -MF "$(DEPDIR)/xditview-draw.Tpo" -c -o xditview-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-draw.Tpo" "$(DEPDIR)/xditview-draw.Po"; else rm -f "$(DEPDIR)/xditview-draw.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='draw.c' object='xditview-draw.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-draw.obj `if test -f 'draw.c'; then $(CYGPATH_W) 'draw.c'; else $(CYGPATH_W) '$(srcdir)/draw.c'; fi`
-
-xditview-Dvi.o: Dvi.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-Dvi.o -MD -MP -MF "$(DEPDIR)/xditview-Dvi.Tpo" -c -o xditview-Dvi.o `test -f 'Dvi.c' || echo '$(srcdir)/'`Dvi.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-Dvi.Tpo" "$(DEPDIR)/xditview-Dvi.Po"; else rm -f "$(DEPDIR)/xditview-Dvi.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Dvi.c' object='xditview-Dvi.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-Dvi.o `test -f 'Dvi.c' || echo '$(srcdir)/'`Dvi.c
-
-xditview-Dvi.obj: Dvi.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-Dvi.obj -MD -MP -MF "$(DEPDIR)/xditview-Dvi.Tpo" -c -o xditview-Dvi.obj `if test -f 'Dvi.c'; then $(CYGPATH_W) 'Dvi.c'; else $(CYGPATH_W) '$(srcdir)/Dvi.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-Dvi.Tpo" "$(DEPDIR)/xditview-Dvi.Po"; else rm -f "$(DEPDIR)/xditview-Dvi.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='Dvi.c' object='xditview-Dvi.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-Dvi.obj `if test -f 'Dvi.c'; then $(CYGPATH_W) 'Dvi.c'; else $(CYGPATH_W) '$(srcdir)/Dvi.c'; fi`
-
-xditview-DviChar.o: DviChar.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-DviChar.o -MD -MP -MF "$(DEPDIR)/xditview-DviChar.Tpo" -c -o xditview-DviChar.o `test -f 'DviChar.c' || echo '$(srcdir)/'`DviChar.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-DviChar.Tpo" "$(DEPDIR)/xditview-DviChar.Po"; else rm -f "$(DEPDIR)/xditview-DviChar.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='DviChar.c' object='xditview-DviChar.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-DviChar.o `test -f 'DviChar.c' || echo '$(srcdir)/'`DviChar.c
-
-xditview-DviChar.obj: DviChar.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-DviChar.obj -MD -MP -MF "$(DEPDIR)/xditview-DviChar.Tpo" -c -o xditview-DviChar.obj `if test -f 'DviChar.c'; then $(CYGPATH_W) 'DviChar.c'; else $(CYGPATH_W) '$(srcdir)/DviChar.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-DviChar.Tpo" "$(DEPDIR)/xditview-DviChar.Po"; else rm -f "$(DEPDIR)/xditview-DviChar.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='DviChar.c' object='xditview-DviChar.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-DviChar.obj `if test -f 'DviChar.c'; then $(CYGPATH_W) 'DviChar.c'; else $(CYGPATH_W) '$(srcdir)/DviChar.c'; fi`
-
-xditview-font.o: font.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-font.o -MD -MP -MF "$(DEPDIR)/xditview-font.Tpo" -c -o xditview-font.o `test -f 'font.c' || echo '$(srcdir)/'`font.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-font.Tpo" "$(DEPDIR)/xditview-font.Po"; else rm -f "$(DEPDIR)/xditview-font.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='font.c' object='xditview-font.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-font.o `test -f 'font.c' || echo '$(srcdir)/'`font.c
-
-xditview-font.obj: font.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-font.obj -MD -MP -MF "$(DEPDIR)/xditview-font.Tpo" -c -o xditview-font.obj `if test -f 'font.c'; then $(CYGPATH_W) 'font.c'; else $(CYGPATH_W) '$(srcdir)/font.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-font.Tpo" "$(DEPDIR)/xditview-font.Po"; else rm -f "$(DEPDIR)/xditview-font.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='font.c' object='xditview-font.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-font.obj `if test -f 'font.c'; then $(CYGPATH_W) 'font.c'; else $(CYGPATH_W) '$(srcdir)/font.c'; fi`
-
-xditview-lex.o: lex.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-lex.o -MD -MP -MF "$(DEPDIR)/xditview-lex.Tpo" -c -o xditview-lex.o `test -f 'lex.c' || echo '$(srcdir)/'`lex.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-lex.Tpo" "$(DEPDIR)/xditview-lex.Po"; else rm -f "$(DEPDIR)/xditview-lex.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lex.c' object='xditview-lex.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-lex.o `test -f 'lex.c' || echo '$(srcdir)/'`lex.c
-
-xditview-lex.obj: lex.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-lex.obj -MD -MP -MF "$(DEPDIR)/xditview-lex.Tpo" -c -o xditview-lex.obj `if test -f 'lex.c'; then $(CYGPATH_W) 'lex.c'; else $(CYGPATH_W) '$(srcdir)/lex.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-lex.Tpo" "$(DEPDIR)/xditview-lex.Po"; else rm -f "$(DEPDIR)/xditview-lex.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lex.c' object='xditview-lex.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-lex.obj `if test -f 'lex.c'; then $(CYGPATH_W) 'lex.c'; else $(CYGPATH_W) '$(srcdir)/lex.c'; fi`
-
-xditview-page.o: page.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-page.o -MD -MP -MF "$(DEPDIR)/xditview-page.Tpo" -c -o xditview-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-page.Tpo" "$(DEPDIR)/xditview-page.Po"; else rm -f "$(DEPDIR)/xditview-page.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='page.c' object='xditview-page.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c
-
-xditview-page.obj: page.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-page.obj -MD -MP -MF "$(DEPDIR)/xditview-page.Tpo" -c -o xditview-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-page.Tpo" "$(DEPDIR)/xditview-page.Po"; else rm -f "$(DEPDIR)/xditview-page.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='page.c' object='xditview-page.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`
-
-xditview-parse.o: parse.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-parse.o -MD -MP -MF "$(DEPDIR)/xditview-parse.Tpo" -c -o xditview-parse.o `test -f 'parse.c' || echo '$(srcdir)/'`parse.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-parse.Tpo" "$(DEPDIR)/xditview-parse.Po"; else rm -f "$(DEPDIR)/xditview-parse.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='parse.c' object='xditview-parse.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-parse.o `test -f 'parse.c' || echo '$(srcdir)/'`parse.c
-
-xditview-parse.obj: parse.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-parse.obj -MD -MP -MF "$(DEPDIR)/xditview-parse.Tpo" -c -o xditview-parse.obj `if test -f 'parse.c'; then $(CYGPATH_W) 'parse.c'; else $(CYGPATH_W) '$(srcdir)/parse.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-parse.Tpo" "$(DEPDIR)/xditview-parse.Po"; else rm -f "$(DEPDIR)/xditview-parse.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='parse.c' object='xditview-parse.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-parse.obj `if test -f 'parse.c'; then $(CYGPATH_W) 'parse.c'; else $(CYGPATH_W) '$(srcdir)/parse.c'; fi`
-
-xditview-xditview.o: xditview.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-xditview.o -MD -MP -MF "$(DEPDIR)/xditview-xditview.Tpo" -c -o xditview-xditview.o `test -f 'xditview.c' || echo '$(srcdir)/'`xditview.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-xditview.Tpo" "$(DEPDIR)/xditview-xditview.Po"; else rm -f "$(DEPDIR)/xditview-xditview.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xditview.c' object='xditview-xditview.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-xditview.o `test -f 'xditview.c' || echo '$(srcdir)/'`xditview.c
-
-xditview-xditview.obj: xditview.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-xditview.obj -MD -MP -MF "$(DEPDIR)/xditview-xditview.Tpo" -c -o xditview-xditview.obj `if test -f 'xditview.c'; then $(CYGPATH_W) 'xditview.c'; else $(CYGPATH_W) '$(srcdir)/xditview.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-xditview.Tpo" "$(DEPDIR)/xditview-xditview.Po"; else rm -f "$(DEPDIR)/xditview-xditview.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xditview.c' object='xditview-xditview.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-xditview.obj `if test -f 'xditview.c'; then $(CYGPATH_W) 'xditview.c'; else $(CYGPATH_W) '$(srcdir)/xditview.c'; fi`
-
-xditview-XFontName.o: XFontName.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-XFontName.o -MD -MP -MF "$(DEPDIR)/xditview-XFontName.Tpo" -c -o xditview-XFontName.o `test -f 'XFontName.c' || echo '$(srcdir)/'`XFontName.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-XFontName.Tpo" "$(DEPDIR)/xditview-XFontName.Po"; else rm -f "$(DEPDIR)/xditview-XFontName.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='XFontName.c' object='xditview-XFontName.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-XFontName.o `test -f 'XFontName.c' || echo '$(srcdir)/'`XFontName.c
-
-xditview-XFontName.obj: XFontName.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -MT xditview-XFontName.obj -MD -MP -MF "$(DEPDIR)/xditview-XFontName.Tpo" -c -o xditview-XFontName.obj `if test -f 'XFontName.c'; then $(CYGPATH_W) 'XFontName.c'; else $(CYGPATH_W) '$(srcdir)/XFontName.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xditview-XFontName.Tpo" "$(DEPDIR)/xditview-XFontName.Po"; else rm -f "$(DEPDIR)/xditview-XFontName.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='XFontName.c' object='xditview-XFontName.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xditview_CFLAGS) $(CFLAGS) -c -o xditview-XFontName.obj `if test -f 'XFontName.c'; then $(CYGPATH_W) 'XFontName.c'; else $(CYGPATH_W) '$(srcdir)/XFontName.c'; fi`
-uninstall-info-am:
-install-appdefaultDATA: $(appdefault_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-
-uninstall-appdefaultDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-install-appmanDATA: $(appman_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
-       done
-
-uninstall-appmanDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
-       done
-install-dist_bitmapDATA: $(dist_bitmap_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(bitmapdir)" || $(mkdir_p) "$(DESTDIR)$(bitmapdir)"
-       @list='$(dist_bitmap_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(dist_bitmapDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(bitmapdir)/$$f'"; \
-         $(dist_bitmapDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(bitmapdir)/$$f"; \
-       done
-
-uninstall-dist_bitmapDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_bitmap_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(bitmapdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bitmapdir)/$$f"; \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       $(am__remove_distdir)
-       mkdir $(distdir)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
-
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
-
-dist-zip: distdir
-       -rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
-
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       case '$(DIST_ARCHIVES)' in \
-       *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
-       *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
-       *.zip*) \
-         unzip $(distdir).zip ;;\
-       esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
-       chmod a-w $(distdir)
-       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-           $(DISTCHECK_CONFIGURE_FLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-               distuninstallcheck \
-         && chmod -R a-w "$$dc_install_base" \
-         && ({ \
-              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-             } || { rm -rf "$$dc_destdir"; exit 1; }) \
-         && rm -rf "$$dc_destdir" \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-       $(am__remove_distdir)
-       @(echo "$(distdir) archives ready for distribution: "; \
-         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-          || { echo "ERROR: files left after uninstall:" ; \
-               if test -n "$(DESTDIR)"; then \
-                 echo "  (check DESTDIR support)"; \
-               fi ; \
-               $(distuninstallcheck_listfiles) ; \
-               exit 1; } >&2
-distcleancheck: distclean
-       @if test '$(srcdir)' = . ; then \
-         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-         exit 1 ; \
-       fi
-       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-         || { echo "ERROR: files left in build directory after distclean:" ; \
-              $(distcleancheck_listfiles) ; \
-              exit 1; } >&2
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA) config.h
-installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(bitmapdir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-appdefaultDATA install-appmanDATA \
-       install-dist_bitmapDATA
-
-install-exec-am: install-binPROGRAMS
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-dist_bitmapDATA \
-       uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-       clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
-       install-data install-data-am install-dist_bitmapDATA \
-       install-exec install-exec-am install-info install-info-am \
-       install-man install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
-       ps ps-am tags uninstall uninstall-am uninstall-appdefaultDATA \
-       uninstall-appmanDATA uninstall-binPROGRAMS \
-       uninstall-dist_bitmapDATA uninstall-info-am
-
-
-.ad:
-       cp $< $@
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/xditview/Menu.h b/xditview/Menu.h
deleted file mode 100644 (file)
index c306b27..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $XConsortium: Menu.h,v 1.2 89/07/21 14:22:10 jim Exp $
- */
-
-#ifndef _XtMenu_h
-#define _XtMenu_h
-
-/***********************************************************************
- *
- * Menu Widget
- *
- ***********************************************************************/
-
-/* Parameters:
-
- Name               Class              RepType         Default Value
- ----               -----              -------         -------------
- background         Background         pixel           White
- border                     BorderColor        pixel           Black
- borderWidth        BorderWidth        int             1
- height                     Height             int             120
- mappedWhenManaged   MappedWhenManaged Boolean         True
- reverseVideo       ReverseVideo       Boolean         False
- width              Width              int             120
- x                  Position           int             0
- y                  Position           int             0
-
-*/
-
-#define XtNmenuEntries         "menuEntries"
-#define XtNhorizontalPadding   "horizontalPadding"
-#define XtNverticalPadding     "verticalPadding"
-#define XtNselection           "Selection"
-
-#define XtCMenuEntries         "MenuEntries"
-#define XtCPadding             "Padding"
-#define XtCSelection           "Selection"
-
-typedef struct _MenuRec *MenuWidget;  /* completely defined in MenuPrivate.h */
-typedef struct _MenuClassRec *MenuWidgetClass;    /* completely defined in MenuPrivate.h */
-
-extern WidgetClass menuWidgetClass;
-
-extern Widget  XawMenuCreate ();
-#endif /* _XtMenu_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/xditview/NEWS b/xditview/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xditview/README b/xditview/README
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xditview/XFontName.c b/xditview/XFontName.c
deleted file mode 100644 (file)
index b8d1a09..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-/* $XFree86: xc/programs/xditview/XFontName.c,v 1.2 2001/08/01 00:45:03 tsi Exp $ */
-/*
- * XFontName.c
- *
- * build/parse X Font name strings
- */
-
-# include      <X11/Xlib.h>
-# include      <X11/Intrinsic.h>
-# include      "XFontName.h"
-#include       <ctype.h>
-
-static char *
-extractStringField (
-       char            *name,
-       char            *buffer,
-       int             size,
-       unsigned int    *attrp,
-       unsigned int    bit)
-{
-       char    *buf = buffer;
-
-       if (!*name)
-               return 0;
-       while (*name && *name != '-' && size > 0) {
-               *buf++ = *name++;
-               --size;
-       }
-       if (size <= 0)
-               return 0;
-       *buf = '\0';
-       if (buffer[0] != '*' || buffer[1] != '\0')
-               *attrp |= bit;
-       if (*name == '-')
-               return name+1;
-       return name;
-}
-
-static char *
-extractUnsignedField (
-       char            *name,
-       unsigned int    *result,
-       unsigned int    *attrp,
-       unsigned int    bit)
-{
-       char            buf[256];
-       char            *c;
-       unsigned int    i;
-
-       name = extractStringField (name, buf, sizeof (buf), attrp, bit);
-       if (!name)
-               return 0;
-       if (!(*attrp & bit))
-               return name;
-       i = 0;
-       for (c = buf; *c; c++) {
-               if (!isdigit (*c))
-                       return 0;
-               i = i * 10 + (*c - '0');
-       }
-       *result = i;
-       return name;
-}
-
-Bool
-XParseFontName (fontNameString, fontName, fontNameAttributes)
-       XFontNameString fontNameString;
-       XFontName       *fontName;
-       unsigned int    *fontNameAttributes;
-{
-       char            *name = fontNameString;
-       XFontName       temp;
-       unsigned int    attributes = 0;
-
-#define GetString(field,bit)\
-       if (!(name = extractStringField \
-               (name, temp.field, sizeof (temp.field),\
-               &attributes, bit))) \
-               return False;
-
-#define GetUnsigned(field,bit)\
-       if (!(name = extractUnsignedField \
-               (name, &temp.field, \
-               &attributes, bit))) \
-               return False;
-
-       GetString (Registry, FontNameRegistry)
-       GetString (Foundry, FontNameFoundry)
-       GetString (FamilyName, FontNameFamilyName)
-       GetString (WeightName, FontNameWeightName)
-       GetString (Slant, FontNameSlant)
-       GetString (SetwidthName, FontNameSetwidthName)
-       GetString (AddStyleName, FontNameAddStyleName)
-       GetUnsigned (PixelSize, FontNamePixelSize)
-       GetUnsigned (PointSize, FontNamePointSize)
-       GetUnsigned (ResolutionX, FontNameResolutionX)
-       GetUnsigned (ResolutionY, FontNameResolutionY)
-       GetString (Spacing, FontNameSpacing)
-       GetUnsigned (AverageWidth, FontNameAverageWidth)
-       GetString (CharSetRegistry, FontNameCharSetRegistry)
-       if (!*name) {
-               temp.CharSetEncoding[0] = '\0';
-               attributes |= FontNameCharSetEncoding;
-       } else {
-               GetString (CharSetEncoding, FontNameCharSetEncoding)
-       }
-       *fontName = temp;
-       *fontNameAttributes = attributes;
-       return True;
-}
-
-static char *
-utoa (
-       unsigned int    u,
-       char            *s,
-       int             size)
-{
-       char    *t;
-
-       t = s + size;
-       *--t = '\0';
-       do
-               *--t = (u % 10) + '0';
-       while (u /= 10);
-       return t;
-}
-
-Bool
-XFormatFontName (fontName, fontNameAttributes, fontNameString)
-       XFontName       *fontName;
-       unsigned int    fontNameAttributes;
-       XFontNameString fontNameString;
-{
-       XFontNameString tmp;
-       char            *name = tmp, *f;
-       int             left = sizeof (tmp) - 1;
-       char            number[32];
-
-#define PutString(field, bit)\
-       f = (fontNameAttributes & bit) ? \
-               fontName->field \
-               : "*"; \
-       if ((left -= strlen (f)) < 0) \
-               return False; \
-       while (*f) \
-               if ((*name++ = *f++) == '-') \
-                       return False; 
-#define PutHyphen()\
-       if (--left < 0) \
-               return False; \
-       *name++ = '-';
-
-#define PutUnsigned(field, bit) \
-       f = (fontNameAttributes & bit) ? \
-               utoa (fontName->field, number, sizeof (number)) \
-               : "*"; \
-       if ((left -= strlen (f)) < 0) \
-               return False; \
-       while (*f) \
-               *name++ = *f++;
-
-       PutString (Registry, FontNameRegistry)
-       PutHyphen ();
-       PutString (Foundry, FontNameFoundry)
-       PutHyphen ();
-       PutString (FamilyName, FontNameFamilyName)
-       PutHyphen ();
-       PutString (WeightName, FontNameWeightName)
-       PutHyphen ();
-       PutString (Slant, FontNameSlant)
-       PutHyphen ();
-       PutString (SetwidthName, FontNameSetwidthName)
-       PutHyphen ();
-       PutString (AddStyleName, FontNameAddStyleName)
-       PutHyphen ();
-       PutUnsigned (PixelSize, FontNamePixelSize)
-       PutHyphen ();
-       PutUnsigned (PointSize, FontNamePointSize)
-       PutHyphen ();
-       PutUnsigned (ResolutionX, FontNameResolutionX)
-       PutHyphen ();
-       PutUnsigned (ResolutionY, FontNameResolutionY)
-       PutHyphen ();
-       PutString (Spacing, FontNameSpacing)
-       PutHyphen ();
-       PutUnsigned (AverageWidth, FontNameAverageWidth)
-       PutHyphen ();
-       PutString (CharSetRegistry, FontNameCharSetRegistry)
-       PutHyphen ();
-       PutString (CharSetEncoding, FontNameCharSetEncoding)
-       *name = '\0';
-       strcpy (fontNameString, tmp);
-       return True;
-}
-
-#if 0
-Bool
-XCompareFontName (
-       XFontName       *name1,
-       XFontName       *name2,
-       unsigned int    fontNameAttributes)
-{
-#define CompareString(field,bit) \
-       if (fontNameAttributes & bit) \
-               if (strcmp (name1->field, name2->field)) \
-                       return False;
-
-#define CompareUnsigned(field,bit) \
-       if (fontNameAttributes & bit) \
-               if (name1->field != name2->field) \
-                       return False;
-
-       CompareString (Registry, FontNameRegistry)
-       CompareString (Foundry, FontNameFoundry)
-       CompareString (FamilyName, FontNameFamilyName)
-       CompareString (WeightName, FontNameWeightName)
-       CompareString (Slant, FontNameSlant)
-       CompareString (SetwidthName, FontNameSetwidthName)
-       CompareString (AddStyleName, FontNameAddStyleName)
-       CompareUnsigned (PixelSize, FontNamePixelSize)
-       CompareUnsigned (PointSize, FontNamePointSize)
-       CompareUnsigned (ResolutionX, FontNameResolutionX)
-       CompareUnsigned (ResolutionY, FontNameResolutionY)
-       CompareString (Spacing, FontNameSpacing)
-       CompareUnsigned (AverageWidth, FontNameAverageWidth)
-       CompareString (CharSetRegistry, FontNameCharSetRegistry)
-       CompareString (CharSetEncoding, FontNameCharSetEncoding)
-       return True;
-}
-
-Bool
-XCopyFontName (
-       XFontName       *name1,
-       XFontName       *name2,
-       unsigned int    fontNameAttributes)
-{
-#define CopyString(field,bit) \
-       if (fontNameAttributes & bit) \
-               strcpy (name2->field, name1->field);
-
-#define CopyUnsigned(field,bit) \
-       if (fontNameAttributes & bit) \
-               name2->field = name1->field;
-
-       CopyString (Registry, FontNameRegistry)
-       CopyString (Foundry, FontNameFoundry)
-       CopyString (FamilyName, FontNameFamilyName)
-       CopyString (WeightName, FontNameWeightName)
-       CopyString (Slant, FontNameSlant)
-       CopyString (SetwidthName, FontNameSetwidthName)
-       CopyString (AddStyleName, FontNameAddStyleName)
-       CopyUnsigned (PixelSize, FontNamePixelSize)
-       CopyUnsigned (PointSize, FontNamePointSize)
-       CopyUnsigned (ResolutionX, FontNameResolutionX)
-       CopyUnsigned (ResolutionY, FontNameResolutionY)
-       CopyString (Spacing, FontNameSpacing)
-       CopyUnsigned (AverageWidth, FontNameAverageWidth)
-       CopyString (CharSetRegistry, FontNameCharSetRegistry)
-       CopyString (CharSetEncoding, FontNameCharSetEncoding)
-       return True;
-}
-#endif
diff --git a/xditview/XFontName.h b/xditview/XFontName.h
deleted file mode 100644 (file)
index b75ed9e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $XFree86$ */
-
-#ifndef _XFONTNAME_H_
-#define _XFONTNAME_H_
-
-typedef struct _xFontName {
-       char            Registry[256];
-       char            Foundry[256];
-       char            FamilyName[256];
-       char            WeightName[256];
-       char            Slant[3];
-       char            SetwidthName[256];
-       char            AddStyleName[256];
-       unsigned int    PixelSize;
-       unsigned int    PointSize;
-       unsigned int    ResolutionX;
-       unsigned int    ResolutionY;
-       char            Spacing[2];
-       unsigned int    AverageWidth;
-       char            CharSetRegistry[256];
-       char            CharSetEncoding[256];
-} XFontName;
-
-#define FontNameRegistry       (1<<0)
-#define FontNameFoundry                (1<<1)
-#define FontNameFamilyName     (1<<2)
-#define FontNameWeightName     (1<<3)
-#define FontNameSlant          (1<<4)
-#define FontNameSetwidthName   (1<<5)
-#define FontNameAddStyleName   (1<<6)
-#define FontNamePixelSize      (1<<7)
-#define FontNamePointSize      (1<<8)
-#define FontNameResolutionX    (1<<9)
-#define FontNameResolutionY    (1<<10)
-#define FontNameSpacing                (1<<11)
-#define FontNameAverageWidth   (1<<12)
-#define FontNameCharSetRegistry        (1<<13)
-#define FontNameCharSetEncoding        (1<<14)
-
-#define SlantRoman             "R"
-#define SlantItalic            "I"
-#define SlantOblique           "O"
-#define SlantReverseItalic     "RI"
-#define SlantReverseOblique    "RO"
-
-#define SpacingMonoSpaced      "M"
-#define SpacingProportional    "P"
-#define SpacingCharacterCell   "C"
-
-typedef char   XFontNameString[256];
-
-extern Bool    XParseFontName(XFontNameString, XFontName *, unsigned int *);
-extern Bool    XFormatFontName(XFontName *, unsigned int, XFontNameString);
-
-#endif
diff --git a/xditview/Xditview-chrtr.ad b/xditview/Xditview-chrtr.ad
deleted file mode 100644 (file)
index 345c190..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "Xditview"
-*Dvi.fontMap:\
-R      -*-charter-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-I      -*-charter-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-B      -*-charter-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-F      -*-charter-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-BI     -*-charter-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-C      -*-courier-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-CO     -*-courier-medium-o-normal--*-*-*-*-*-*-iso8859-1\n\
-CB     -*-courier-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-CF     -*-courier-bold-o-normal--*-*-*-*-*-*-iso8859-1\n\
-H      -*-helvetica-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-HO     -*-helvetica-medium-o-normal--*-*-*-*-*-*-iso8859-1\n\
-HB     -*-helvetica-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-HF     -*-helvetica-bold-o-normal--*-*-*-*-*-*-iso8859-1\n\
-N      -*-new century schoolbook-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-NI     -*-new century schoolbook-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-NB     -*-new century schoolbook-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-NF     -*-new century schoolbook-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-A      -*-charter-medium-r-normal--*-*-*-*-*-*-iso8859-1\n\
-AI     -*-charter-medium-i-normal--*-*-*-*-*-*-iso8859-1\n\
-AB     -*-charter-bold-r-normal--*-*-*-*-*-*-iso8859-1\n\
-AF     -*-charter-bold-i-normal--*-*-*-*-*-*-iso8859-1\n\
-S      -*-symbol-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific\n\
-S2     -*-symbol-medium-r-normal--*-*-*-*-*-*-adobe-fontspecific\n
diff --git a/xditview/Xditview.ad b/xditview/Xditview.ad
deleted file mode 100644 (file)
index e20734d..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-Xditview.geometry: 600x800
-*MenuButton*Font:      -*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1
-*SimpleMenu*Font:      -*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1
-*Text*Font:    -*-courier-medium-r-normal--*-120-*-*-*-*-iso8859-1
-
-*paned.allowResize:            true
-*paned.?.showGrip:             false
-*paned.?.skipAdjust:           false
-*paned.form.porthole.width:    600
-*paned.form.porthole.height:   800
-*paned.label.skipAdjust:       true
-
-*MenuButton.shapeStyle: oval
-*Command.shapeStyle: oval
-
-*fileMenuButton.label:         File
-*fileMenuButton.leftBitmap:    menu12
-*fileMenuButton.menuName:      fileMenu
-
-*fileMenu.openFile.label:      Open File
-*fileMenu.revisitFile.label:   Reopen File
-*fileMenu.setResolution.label: Set Screen Resolution
-*fileMenu.quit.label:          Quit
-
-*prevButton.bitmap:            ldblarrow
-*prevButton.internalHeight:    0
-*prevButton.Translations:      #override <BtnUp>: PreviousPage() unset()
-
-*pageNumber.translations: #override\
-     Ctrl<Key>J:    SetPageNumber()\n\
-     Ctrl<Key>M:    SetPageNumber()\n\
-     <Key>Linefeed: SetPageNumber()\n\
-     <Key>Return:   SetPageNumber()\n\
-     Ctrl<Key>O:    Noop()\n\
-     Meta<Key>I:    Noop()\n\
-     Ctrl<Key>N:    Noop()\n\
-     Ctrl<Key>P:    Noop()\n\
-     Ctrl<Key>Z:    Noop()\n\
-     Meta<Key>Z:    Noop()\n\
-     <Key>space:    NextPage()\n\
-     Ctrl<Key>v:    NextPage()\n\
-     Meta<Key>v:    PreviousPage()\n\
-     <Key>Next:            NextPage()\n\
-     <Key>Prior:    PreviousPage()\n\
-     <Key>Find:            OpenFile()
-*pageNumber*editType:  edit
-
-*nextButton.bitmap:            rdblarrow
-*nextButton.internalHeight:    0
-*nextButton.translations:      #override <BtnUp>: NextPage() unset()
-
-*viewport.allowResize: false
-*viewport.forceBars:   true
-*viewport.allowHoriz: true
-*viewport.allowVert: true
-
-*dvi.translations: #augment \
-       <Btn1Down>:     XawPositionSimpleMenu(popupMenu) MenuPopup(popupMenu)\n\
-       Ctrl<Key>v:     NextPage()\n\
-       Meta<Key>v:     PreviousPage()\n\
-       <Key>space:     NextPage()\n\
-       <Key>Next:      NextPage()\n\
-       <Key>Prior:     PreviousPage()\n\
-       <Key>Find:      OpenFile()
-*dvi.baseTranslations: #augment \
-       <Btn1Down>:     XawPositionSimpleMenu(popupMenu) MenuPopup(popupMenu)\n\
-       <Key>space:     NextPage()\n\
-       Ctrl<Key>v:     NextPage()\n\
-       Meta<Key>v:     PreviousPage()\n\
-       <Key>Next:      NextPage()\n\
-       <Key>Prior:     PreviousPage()\n\
-       <Key>Find:      OpenFile()
-*popupMenu.nextPage.label:     Next Page
-*popupMenu.previousPage.label: Previous Page
-*popupMenu.setResolution.label:        Set Screen Resolution
-*popupMenu.openFile.label:     Open File
-*popupMenu.revisitFile.label:  Reopen File
-*popupMenu.quit.label:         Quit
-
-*promptShell.allowShellResize: true
-*promptShell.promptDialog.value.translations: #override\
-       <Key>Return: Accept()
-*promptShell.promptDialog.value.baseTranslations: #override\
-       <Key>Return: Accept()
-
-*promptShell.promptDialog.accept.label: Accept
-*promptShell.promptDialog.accept.translations: #override\
-       <BtnUp>: Accept() unset()
-*promptShell.promptDialog.accept.baseTranslations: #override \
-       <BtnUp>: Accept() unset()
-
-*promptShell.promptDialog.cancel.label: Cancel
-*promptShell.promptDialog.cancel.translations: #override \
-       <BtnUp>: Cancel() unset()
-*promptShell.promptDialog.cancel.baseTranslations: #override \
-       <BtnUp>: Cancel() unset()
diff --git a/xditview/aclocal.m4 b/xditview/aclocal.m4
deleted file mode 100644 (file)
index 103df10..0000000
+++ /dev/null
@@ -1,1581 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-dnl Copyright 2005 Red Hat, Inc
-dnl 
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl 
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl 
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl 
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl 
-
-# XAW_CHECK_XPRINT_SUPPORT()
-# --------------------------
-# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 
-# library. If neither --enable-xprint nor --disable-xprint are given, 
-# the presence of an Xaw with Xprint support will be auto detected
-
-AC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
-       AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
-                       [use_xprint=$enableval],[use_xprint=auto])
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
-
-       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
-       if [[ ! -z $TMP_CHECK2 ]] ; then
-               if test $success = no ; then
-                       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
-                       xaw_use_xprint=no
-               fi
-       fi
-
-       if test "x$success" = "xyes"; then
-               $1_CFLAGS=$TMP_XAW_CFLAGS
-               $1_LIBS=$TMP_XAW_LIBS
-
-               AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
-       else
-               AC_MSG_ERROR([No suitable version of Xaw found])
-       fi
-])
-
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.1.2
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
-]) # XORG_MACROS_VERSION
-
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
-
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
-#
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
-
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([Whether to build pdf documentation])
-
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
-
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
-
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
-
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
-
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
-
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
-#
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
-
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
-
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
-#
-AC_DEFUN([XORG_WITH_LINT],[
-
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
-
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
-
-]) # XORG_WITH_LINT
-
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
-#
-
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
-
-]) # XORG_LINT_LIBRARY
-
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
-
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-])
-
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
diff --git a/xditview/compile b/xditview/compile
deleted file mode 100755 (executable)
index 1b1d232..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xditview/config.guess b/xditview/config.guess
deleted file mode 100755 (executable)
index 396482d..0000000
+++ /dev/null
@@ -1,1500 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-07-02'
-
-# This file 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[45])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    i*:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    x86:Interix*:[3456]*)
-       echo i586-pc-interix${UNAME_RELEASE}
-       exit ;;
-    EM64T:Interix*:[3456]*)
-       echo x86_64-unknown-interix${UNAME_RELEASE}
-       exit ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
-       exit ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/xditview/config.h.in b/xditview/config.h.in
deleted file mode 100644 (file)
index 424aa8e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAS_MKSTEMP
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Version number of package */
-#undef VERSION
diff --git a/xditview/config.sub b/xditview/config.sub
deleted file mode 100755 (executable)
index 387c18d..0000000
+++ /dev/null
@@ -1,1608 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-07-02'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
-               os=
-               basic_machine=$1
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64vr | mips64vrel \
-       | mips64orion | mips64orionel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | mt \
-       | msp430 \
-       | nios | nios2 \
-       | ns16k | ns32k \
-       | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-       | pyramid \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nios-* | nios2-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-       | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tron-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
-       | ymp-* \
-       | z8k-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16c)
-               basic_machine=cr16c-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-        -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-        -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/xditview/configure b/xditview/configure
deleted file mode 100755 (executable)
index 6962fb7..0000000
+++ /dev/null
@@ -1,5498 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for xditview 1.0.1.
-#
-# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 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.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-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
-
-
-
-
-# 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-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; }
-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
-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'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-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
-}
-
-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
-  :
-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; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-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_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='xditview'
-PACKAGE_TARNAME='xditview'
-PACKAGE_VERSION='1.0.1'
-PACKAGE_STRING='xditview 1.0.1'
-PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
-
-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
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-PKG_CONFIG
-TMP_XAW_CFLAGS
-TMP_XAW_LIBS
-XAW_USE_XPRINT_TRUE
-XAW_USE_XPRINT_FALSE
-XDITVIEW_CFLAGS
-XDITVIEW_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS
-appdefaultdir
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-APP_MAN_SUFFIX
-LIB_MAN_SUFFIX
-FILE_MAN_SUFFIX
-MISC_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-ADMIN_MAN_SUFFIX
-APP_MAN_DIR
-LIB_MAN_DIR
-FILE_MAN_DIR
-MISC_MAN_DIR
-DRIVER_MAN_DIR
-ADMIN_MAN_DIR
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-PKG_CONFIG
-TMP_XAW_CFLAGS
-TMP_XAW_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`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 ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`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 ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`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 ;;
-
-  -without-* | --without-*)
-    ac_package=`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 ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --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; }; }
-    ;;
-
-  *=*)
-    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; }; }
-    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
-    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}
-    ;;
-
-  esac
-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; }; }
-fi
-
-# Be sure to have absolute directory names.
-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
-  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; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-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
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-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; }; }
-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; }; }
-
-
-# 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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-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; }; }
-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; }; }
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # 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 xditview 1.0.1 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --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
-      --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
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-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/xditview]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of xditview 1.0.1:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-xprint         Enable XPrint support
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  PKG_CONFIG  path to pkg-config utility
-  TMP_XAW_CFLAGS
-              C compiler flags for TMP_XAW, overriding pkg-config
-  TMP_XAW_LIBS
-              linker flags for TMP_XAW, overriding pkg-config
-  APPDEFS_CFLAGS
-              C compiler flags for APPDEFS, overriding pkg-config
-  APPDEFS_LIBS
-              linker flags for APPDEFS, overriding pkg-config
-
-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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-_ACEOF
-ac_status=$?
-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
-    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,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`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/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-xditview configure 1.0.1
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 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
-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 xditview $as_me 1.0.1, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$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; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# 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=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    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;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## 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"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## 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"`;;
-       esac
-       echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## 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"
-  } >&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
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* 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"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
-  set x "$ac_default_prefix/share/config.site" \
-       "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-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;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  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;}
-    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;}
-  >$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,)
-      { 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;}
-      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;}
-      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=:
-      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=$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'" ;;
-    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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-
-
-am__api_version="1.9"
-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
-  { { 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; }; }
-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),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-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_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-  SET_MAKE=
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='xditview'
- VERSION='1.0.1'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
-fi
-
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
-fi
-
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-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
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    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
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  fi
-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
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    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
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-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; }; }
-
-# 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"
-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); }
-{ (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); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-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_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-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_link_default") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-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 )
-       ;;
-    [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;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-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
-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
-
-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
-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"
-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); }; 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
-# `rm'.
-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_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; }
-
-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.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  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; }; }
-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; }
-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
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  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_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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`
-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
-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
-/* end confdefs.h.  */
-
-int
-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
-  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
-/* end confdefs.h.  */
-
-int
-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
-
-       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
-/* end confdefs.h.  */
-
-int
-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
-  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; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-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
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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
-  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
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-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; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}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; } ;;
-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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-
-depcc="$CC"   am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-{ echo "$as_me:$LINENO: checking for mkstemp" >&5
-echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6; }
-if test "${ac_cv_func_mkstemp+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 mkstemp to an innocuous variant, in case <limits.h> declares mkstemp.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define mkstemp innocuous_mkstemp
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char mkstemp (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef mkstemp
-
-/* 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 mkstemp ();
-/* 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_mkstemp || defined __stub___mkstemp
-choke me
-#endif
-
-int
-main ()
-{
-return mkstemp ();
-  ;
-  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
-  ac_cv_func_mkstemp=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_mkstemp=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_mkstemp" >&5
-echo "${ECHO_T}$ac_cv_func_mkstemp" >&6; }
-if test $ac_cv_func_mkstemp = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAS_MKSTEMP 1
-_ACEOF
-
-fi
-
-
-# Checks for pkg-config packages
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; 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_ac_pt_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               PKG_CONFIG=""
-       fi
-
-fi
-
-       # Check whether --enable-xprint was given.
-if test "${enable_xprint+set}" = set; then
-  enableval=$enable_xprint; use_xprint=$enableval
-else
-  use_xprint=auto
-fi
-
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_CFLAGS"; then
-        pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_LIBS"; then
-        pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"`
-        else
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       success=yes
-fi
-       if [ ! -z $TMP_CHECK2 ] ; then
-               if test $success = no ; then
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_CFLAGS"; then
-        pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_LIBS"; then
-        pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"`
-        else
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       success=yes
-fi
-                       xaw_use_xprint=no
-               fi
-       fi
-
-       if test "x$success" = "xyes"; then
-               XDITVIEW_CFLAGS=$TMP_XAW_CFLAGS
-               XDITVIEW_LIBS=$TMP_XAW_LIBS
-
-
-
-if test "x$xaw_use_xprint" = "xyes"; then
-  XAW_USE_XPRINT_TRUE=
-  XAW_USE_XPRINT_FALSE='#'
-else
-  XAW_USE_XPRINT_TRUE='#'
-  XAW_USE_XPRINT_FALSE=
-fi
-
-       else
-               { { echo "$as_me:$LINENO: error: No suitable version of Xaw found" >&5
-echo "$as_me: error: No suitable version of Xaw found" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-
-
-
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for APPDEFS" >&5
-echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_CFLAGS"; then
-        pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_LIBS"; then
-        pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
-        else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" >&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
-fi
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    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;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (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 \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     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
-    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
-  else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-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"`
-  # 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'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${XAW_USE_XPRINT_TRUE}" && test -z "${XAW_USE_XPRINT_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-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
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## 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
-  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
-
-
-
-
-# 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-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; }
-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
-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'`
-
-# 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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&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 xditview $as_me 1.0.1, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      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
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-xditview config.status 1.0.1
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2006 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'
-_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.
-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=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$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; }; };;
-  --help | --hel | -h )
-    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; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-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
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
-  *) { { 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; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); 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"
-}  ||
-{
-  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.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-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
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$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
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-TMP_XAW_CFLAGS!$TMP_XAW_CFLAGS$ac_delim
-TMP_XAW_LIBS!$TMP_XAW_LIBS$ac_delim
-XAW_USE_XPRINT_TRUE!$XAW_USE_XPRINT_TRUE$ac_delim
-XAW_USE_XPRINT_FALSE!$XAW_USE_XPRINT_FALSE$ac_delim
-XDITVIEW_CFLAGS!$XDITVIEW_CFLAGS$ac_delim
-XDITVIEW_LIBS!$XDITVIEW_LIBS$ac_delim
-APPDEFS_CFLAGS!$APPDEFS_CFLAGS$ac_delim
-APPDEFS_LIBS!$APPDEFS_LIBS$ac_delim
-appdefaultdir!$appdefaultdir$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
-LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-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
-_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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim
-MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim
-DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim
-ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim
-APP_MAN_DIR!$APP_MAN_DIR$ac_delim
-LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim
-FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim
-MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim
-DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim
-ADMIN_MAN_DIR!$ADMIN_MAN_DIR$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-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-2.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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-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; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$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 `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) 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; }; };;
-      esac
-      ac_file_inputs="$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."
-    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;}
-    fi
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$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" |
-    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" || { { 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; }; }; }
-  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,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`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/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# 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/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $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;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  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' ;;
-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
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-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" | sed -f "$tmp/subs-2.sed" >$tmp/out
-
-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;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
- ;;
-  :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;}
-    else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
-    fi
-  else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
-  fi
-  rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $ac_file | $ac_file:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$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'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  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" |
-    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" || { { 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; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  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; }
-fi
-
diff --git a/xditview/depcomp b/xditview/depcomp
deleted file mode 100755 (executable)
index 04701da..0000000
+++ /dev/null
@@ -1,530 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
-  depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
-  DEPDIR      directory where to store dependencies.
-  depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
-  libtool     Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "depcomp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
-  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
-  # start of each line; $object doesn't have directory information.
-  # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-  stat=$?
-
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
-  # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
-  # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
-  "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # Remove any Libtool call
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    # Strip any option that makedepend may not understand.  Remove
-    # the object too, otherwise makedepend will parse it as a source file.
-    -*|$object)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
-    *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xditview/draw.c b/xditview/draw.c
deleted file mode 100644 (file)
index 78b707f..0000000
+++ /dev/null
@@ -1,546 +0,0 @@
-/*
- * $XConsortium: draw.c,v 1.8 94/04/17 20:43:35 gildea Exp $
- * $XFree86: xc/programs/xditview/draw.c,v 1.4 2001/08/01 00:45:03 tsi Exp $
- *
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
- *
- */
-
-/*
- * draw.c
- *
- * accept dvi function calls and translate to X
- */
-
-/*
-  Support for ditroff drawing commands added: lines, circles, ellipses,
-  arcs and splines.  Splines are approximated as short lines by iterating
-  a simple approximation algorithm.  This seems good enough for previewing.
-
-  David Evans <dre@cs.nott.ac.uk>, 14th March, 1990
-*/
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <math.h>
-#include "DviP.h"
-#include <stdlib.h>
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846264338327950
-#endif
-
-/*     the following are for use in the spline approximation algorithm */
-
-typedef struct Point {
-    double     x;
-    double     y;
-    struct Point       *next;
-} Point;
-
-#define        ITERATIONS      10      /* iterations to approximate spline */
-
-#define        midx(p,q)       ((p->x + q->x) / 2)     /* mid x point on pq */
-#define        midy(p,q)       ((p->y + q->y) / 2)     /* mid y point on pq */
-
-#define        length(p,q)     sqrt(((q->x - p->x)*(q->x - p->x)) \
-                            + ((q->y - p->y)*(q->y - p->y))) /* length of pq */
-
-Point  *spline = (Point *)NULL;        /* head of spline linked list */
-
-static void    ApproxSpline(int n);
-static void    DeletePoint(Point *p);
-static void    DrawSplineSegments(DviWidget dw);
-static int     GetSpline(char *s);
-static void    InsertPoint(Point *p, Point *q);
-static void    LineApprox(Point *p1, Point *p2, Point *p3);
-static Point * MakePoint(double x, double y);
-
-void
-HorizontalMove(dw, delta)
-       DviWidget       dw;
-       int             delta;
-{
-    dw->dvi.state->x += delta;
-}
-
-void
-HorizontalGoto(dw, NewPosition)
-       DviWidget       dw;
-       int             NewPosition;
-{
-    dw->dvi.state->x = NewPosition;
-}
-
-void
-VerticalMove(dw, delta)
-       DviWidget       dw;
-       int             delta;
-{
-    dw->dvi.state->y += delta;
-}
-
-void
-VerticalGoto(dw, NewPosition)
-       DviWidget       dw;
-       int             NewPosition;
-{
-    dw->dvi.state->y = NewPosition;
-}
-
-#ifdef USE_XFT
-static void
-DrawText (DviWidget dw)
-{
-    int            i;
-    XftFont *font;
-
-    font = dw->dvi.cache.font;
-    for (i = 0; i <= dw->dvi.cache.index; i++)
-    {
-       if (dw->dvi.cache.cache[i].font)
-           font = dw->dvi.cache.cache[i].font;
-       XftDrawString8 (dw->dvi.draw, &dw->dvi.black,
-                       font,
-                       dw->dvi.cache.cache[i].x,
-                       dw->dvi.cache.start_y,
-                       (unsigned char *) dw->dvi.cache.cache[i].chars,
-                       dw->dvi.cache.cache[i].nchars);
-    }
-}
-#endif
-
-void
-FlushCharCache (dw)
-       DviWidget       dw;
-{
-    int            xx, yx;
-
-    xx = ToX(dw, dw->dvi.state->x);
-    yx = ToX(dw, dw->dvi.state->y);
-    if (dw->dvi.cache.char_index != 0)
-    {
-#ifdef USE_XFT
-       DrawText (dw);
-#else
-       XDrawText (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
-                   dw->dvi.cache.start_x, dw->dvi.cache.start_y,
-                   dw->dvi.cache.cache, dw->dvi.cache.index + 1);
-#endif
-    }
-    dw->dvi.cache.index = 0;
-    dw->dvi.cache.max = DVI_TEXT_CACHE_SIZE;
-    if (dw->dvi.noPolyText)
-       dw->dvi.cache.max = 1;
-    dw->dvi.cache.char_index = 0;
-    dw->dvi.cache.cache[0].nchars = 0;
-    dw->dvi.cache.start_x = dw->dvi.cache.x = xx;
-    dw->dvi.cache.start_y = dw->dvi.cache.y = yx;
-}
-
-#if 0
-void
-ClearPage (DviWidget dw)
-{
-    if (dw->dvi.display_enable)
-       XClearWindow (XtDisplay (dw), XtWindow (dw));
-}
-#endif
-
-void
-SetGCForDraw (dw)
-    DviWidget  dw;
-{
-    int        lw;
-    if (dw->dvi.state->line_style != dw->dvi.line_style ||
-       dw->dvi.state->line_width != dw->dvi.line_width)
-    {
-       lw = ToX(dw, dw->dvi.state->line_width);
-       if (lw <= 1)
-           lw = 0;
-       XSetLineAttributes (XtDisplay (dw), dw->dvi.normal_GC,
-                           lw, LineSolid, CapButt, JoinMiter);
-       dw->dvi.line_style = dw->dvi.state->line_style;
-       dw->dvi.line_width = dw->dvi.state->line_width;
-    }
-}
-
-void
-DrawLine (dw, x, y)
-    DviWidget  dw;
-    int                x, y;
-{
-    if (dw->dvi.display_enable)
-       XDrawLine (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
-                  ToX(dw, dw->dvi.state->x), ToX(dw, dw->dvi.state->y),
-                  ToX(dw, dw->dvi.state->x + x), ToX(dw,dw->dvi.state->y + y));
-    dw->dvi.state->x += x;
-    dw->dvi.state->y += y;
-}
-
-void
-DrawCircle (dw, diameter)
-       DviWidget       dw;
-       int             diameter;
-{
-    if (dw->dvi.display_enable)
-       XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
-                 ToX(dw, dw->dvi.state->x),
-                 ToX(dw, dw->dvi.state->y - (diameter / 2)),
-                 ToX(dw, diameter), ToX(dw, diameter), 0, 360 * 64);
-    dw->dvi.state->x += diameter;
-}
-
-void
-DrawEllipse (dw, a, b)
-       DviWidget       dw;
-       int             a, b;
-{
-    if (dw->dvi.display_enable)
-       XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
-                 ToX(dw, dw->dvi.state->x), ToX(dw, dw->dvi.state->y - (b / 2)),
-                 ToX(dw,a), ToX(dw,b), 0, 360 * 64);
-    dw->dvi.state->x += a;
-}
-
-
-/*     Convert angle in degrees to 64ths of a degree */
-
-static int
-ConvertAngle(int theta)
-{
-    return(theta * 64);
-}
-
-void
-DrawArc (dw, x0, y0, x1, y1)
-       DviWidget       dw;
-       int             x0, y0, x1, y1;
-{
-    int        xc, yc, x2, y2, r;
-    int        angle1, angle2;
-
-    /* centre */
-    xc = dw->dvi.state->x + x0;
-    yc = dw->dvi.state->y + y0;
-
-    /* to */
-    x2 = xc + x1;
-    y2 = yc + y1;
-
-    dw->dvi.state->x = x2;
-    dw->dvi.state->y = y2;
-
-    if (dw->dvi.display_enable) {
-
-       /* radius */
-       r = (int)sqrt((float) x1 * x1 + (float) y1 * y1);
-
-       /* start and finish angles */
-       if (x0 == 0) {
-               if (y0 >= 0)
-                       angle1 = 90;
-               else
-                       angle1 = 270;
-       }
-       else {
-               angle1 = (int) (atan((double)(y0) / (double)(x0)) * 180 / M_PI);
-               if (x0 > 0)
-                       angle1 = 180 - angle1;
-               else
-                       angle1 = -angle1;
-       }
-
-       if (x1 == 0) {
-               if (y1 <= 0)
-                       angle2 = 90;
-               else
-                       angle2 = 270;
-       }
-       else {
-               angle2 = (int) (atan((double)(y1) / (double)(x1)) * 180 / M_PI);
-               if (x1 < 0)
-                       angle2 = 180 - angle2;
-               else
-                       angle2 = -angle2;
-       }
-
-       if (angle1 < 0)
-               angle1 += 360;
-       if (angle2 < 0)
-               angle2 += 360;
-
-       if (angle2 < angle1)
-               angle1 -= 360;
-       angle2 = angle2 - angle1;
-
-       angle1 = ConvertAngle(angle1);
-       angle2 = ConvertAngle(angle2);
-
-       XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
-                 ToX(dw, xc - r), ToX(dw, yc - r),
-                 ToX(dw, 2 * r), ToX(dw, 2 * r),
-                 angle1, angle2);
-    }
-}
-
-/* copy next non-blank string from p to temp, update p */
-
-static char *
-getstr(char *p, char *temp)
-{
-    while (*p == ' ' || *p == '\t' || *p == '\n')
-       p++;
-    if (*p == '\0') {
-       temp[0] = 0;
-       return((char *)NULL);
-    }
-    while (*p != ' ' && *p != '\t' && *p != '\n' && *p != '\0')
-       *temp++ = *p++;
-    *temp = '\0';
-    return(p);
-}
-
-
-/*     Draw a spline by approximating with short lines.      */
-
-/*ARGSUSED*/
-void
-DrawSpline (dw, s, len)
-       DviWidget       dw;
-       char            *s;
-       int             len;
-{
-    int                n;
-
-    /* get coordinate pairs into spline linked list */
-    if ((n = GetSpline(s)) <= 0)
-       return;
-
-    ApproxSpline(n);
-
-    DrawSplineSegments(dw);
-}
-
-
-/*     Parse string s to create a linked list of Point's with spline */
-/*     as its head.  Return the number of coordinate pairs found.    */
-
-static int
-GetSpline(s)
-    char *s;
-{
-    double     x, y, x1, y1;
-    int                n = 0;
-    Point      *pt;
-    char       *p = s, d[10];
-
-    if (!*p)
-       return(n);
-
-    pt = spline = MakePoint(0.0, 0.0);
-    n = 1;
-    x = y = 0.0;
-    p = s;
-    while (p && *p) {
-       if ((p = getstr(p, d)) == (char *)NULL)
-           break;
-       x1 = x + atof(d);
-       if ((p = getstr(p, d)) == (char *)NULL)
-           break;
-       y1 = y + atof(d);
-       pt->next = MakePoint(x1, y1);
-       pt = pt->next;
-       x = pt->x;
-       y = pt->y;
-       n++;
-    }
-
-    /* number of pairs of points */
-
-    return(n);
-}
-
-/*     Approximate a spline by lines generated by iterations of the      */
-/*     approximation algorithm from the original n points in the spline. */
-
-static void
-ApproxSpline(n)
-int n;
-{
-    int                mid, j;
-    Point      *p1, *p2, *p3, *p;
-
-    if (n < 3)
-       return;
-
-    /* number of mid-points to calculate */
-    mid = n - 3;
-
-    /* remember original points are stored as an array of n points */
-    /* so I can index it directly to calculate mid-points only.           */
-    if (mid > 0) {
-       p = spline->next;
-       j = 1;
-       while (j < n-2) {
-           p1 = p;
-           p = p->next;
-           p2 = p;
-           InsertPoint(p1, MakePoint(midx(p1, p2), midy(p1, p2)));
-           j++;
-       }
-    }
-
-    /* Now approximate curve by line segments.            */
-    /* There *should* be the correct number of points now! */
-
-    p = spline;
-    while (p != (Point *)NULL) {
-       p1 = p;
-       if ((p = p->next) == (Point *)NULL)
-           break;
-       p2 = p;
-       if ((p = p->next) == (Point *)NULL)
-           break;
-       p3 = p;         /* This point becomes first point of next curve */
-
-       LineApprox(p1, p2, p3);
-    }
-}
-
-
-/*     p1, p2, and p3 are initially 3 *consecutive* points on the curve. */
-/*     For each adjacent pair of points find the mid-point, insert this  */
-/*     in the linked list, delete the first of the two used (unless it   */
-/*     is the first for this curve).  Repeat this ITERATIONS times.      */
-
-/*ARGSUSED*/
-static void
-LineApprox(p1, p2, p3)
-Point  *p1, *p2, *p3;
-{
-    Point      *p4, *p;
-    int                reps = ITERATIONS;
-
-    while (reps) {
-       for (p = p1; p != (Point *)NULL && p != p3; ) {
-           InsertPoint(p, p4 = MakePoint( midx(p,p->next), midy(p,p->next) ));
-           if (p != p1)
-               DeletePoint(p);
-           p = p4->next;               /* skip inserted point! */
-       }
-       reps--;
-    }
-}
-
-
-/*     Traverse the linked list, calling DrawLine to approximate the */
-/*     spline curve.  Rounding errors are taken into account so that */
-/*     the "curve" is continuous, and ends up where expected.        */
-
-static void
-DrawSplineSegments(dw)
-DviWidget dw;
-{
-    Point      *p, *q;
-    double     x1, y1;
-    int                dx, dy;
-    double     xpos, ypos;
-
-    p = spline;
-    dx = dy = 0;
-
-    /* save the start position */
-
-    xpos = dw->dvi.state->x;
-    ypos = dw->dvi.state->y;
-
-    x1 = y1 = 0.0;
-
-    while (p != (Point *)NULL) {
-       dx = p->x - x1 + 0.5;
-       dy = p->y - y1 + 0.5;
-       DrawLine (dw, dx, dy);
-
-       x1 = p->x;
-       y1 = p->y;
-       dw->dvi.state->x = xpos + x1;
-       dw->dvi.state->y = ypos + y1;
-
-       q = p;
-       p = p->next;
-       XtFree((char *)q);
-    }
-    spline = (Point *)NULL;
-}
-
-
-/*     Malloc memory for a Point, and initialise the elements to x, y, NULL */
-/*     Return a pointer to the new Point.                                   */
-
-static Point *
-MakePoint(x, y)
-double x, y;
-{
-    Point      *p;
-
-    p = (Point *) XtMalloc (sizeof (Point));
-    p->x = x;
-    p->y = y;
-    p->next = (Point *)NULL;
-
-    return(p);
-}
-
-
-/*     Insert point q in linked list after point p. */
-
-static void
-InsertPoint(p, q)
-Point *p, *q;
-{
-    /* point q to the next point */
-    q->next = p->next;
-
-    /* point p to new inserted one */
-    p->next = q;
-}
-
-/*     Delete point p from the linked list. */
-
-static void
-DeletePoint(p)
-Point  *p;
-{
-    Point      *tmp;
-
-    tmp = p->next;
-    p->x = p->next->x;
-    p->y = p->next->y;
-    p->next = p->next->next;
-    XtFree((char *)tmp);
-}
diff --git a/xditview/font.c b/xditview/font.c
deleted file mode 100644 (file)
index 210a374..0000000
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * font.c
- *
- * map dvi fonts to X fonts
- */
-/* $XFree86: xc/programs/xditview/font.c,v 1.5 2001/08/27 23:35:12 dawes Exp $ */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include "DviP.h"
-#include "XFontName.h"
-
-static char *
-savestr (char *s)
-{
-       char    *n;
-
-       if (!s)
-               return 0;
-       n = XtMalloc (strlen (s) + 1);
-       if (n)
-               strcpy (n, s);
-       return n;
-}
-
-static DviFontList *
-LookupFontByPosition (DviWidget dw, int position)
-{
-       DviFontList     *f;
-
-       for (f = dw->dvi.fonts; f; f=f->next)
-               if (f->dvi_number == position)
-                       break;
-       return f;
-}
-
-static DviFontSizeList *
-LookupFontSizeBySize (DviWidget dw, DviFontList *f, int size)
-{
-    DviFontSizeList *fs, *best = 0;
-    int                    bestdist;
-    char           fontNameString[2048];
-    XFontName      fontName;
-    unsigned int    fontNameAttributes;
-    int                    dist;
-
-    if (f->scalable)
-    {
-       for (best = f->sizes; best; best = best->next)
-           if (best->size == size)
-               return best;
-       best = (DviFontSizeList *) XtMalloc (sizeof *best);
-       best->next = f->sizes;
-       best->size = size;
-       XParseFontName (f->x_name, &fontName, &fontNameAttributes);
-       fontNameAttributes &= ~(FontNamePixelSize|FontNameAverageWidth);
-       fontNameAttributes |= FontNameResolutionX;
-       fontNameAttributes |= FontNameResolutionY;
-       fontNameAttributes |= FontNamePointSize;
-       fontName.ResolutionX = dw->dvi.screen_resolution;
-       fontName.ResolutionY = dw->dvi.screen_resolution;
-       fontName.PointSize = size * 10 / dw->dvi.size_scale;
-       XFormatFontName (&fontName, fontNameAttributes, fontNameString);
-       best->x_name = savestr (fontNameString);
-#ifdef USE_XFT
-       /*
-        * Force a match of a core font for adobe-fontspecific
-        * encodings; we dont have a scalable font in
-        * the right encoding
-        */
-       best->core = False;
-       if (!strcmp (fontName.CharSetRegistry, "adobe") &&
-           !strcmp (fontName.CharSetEncoding, "fontspecific"))
-       {
-           best->core = True;
-       }
-#endif
-       best->doesnt_exist = 0;
-       best->font = 0;
-       f->sizes = best;
-    }
-    else
-    {
-       bestdist = 65536;
-       for (fs = f->sizes; fs; fs=fs->next) {
-           dist = size - fs->size;
-           if (dist < 0)
-               dist = -dist * 16;
-           if (dist < bestdist)
-           {
-               best = fs;
-               bestdist = dist;
-           }
-       }
-    }
-    return best;
-}
-
-static char *
-SkipFontNameElement (char *n)
-{
-       while (*n != '-')
-               if (!*++n)
-                       return 0;
-       return n+1;
-}
-
-# define SizePosition          8
-# define EncodingPosition      13
-
-#ifndef USE_XFT
-static int
-ConvertFontNameToSize (char *n)
-{
-       int     i, size;
-
-       for (i = 0; i < SizePosition; i++) {
-               n = SkipFontNameElement (n);
-               if (!n)
-                       return -1;
-       }
-       size = atoi (n);
-       return size/10;
-}
-#endif
-
-static char *
-ConvertFontNameToEncoding (char *n)
-{
-        int i;
-       for (i = 0; i < EncodingPosition; i++) {
-               n = SkipFontNameElement (n);
-               if (!n)
-                       return 0;
-       }
-       return n;
-}
-
-static void
-DisposeFontSizes (DviWidget dw, DviFontSizeList *fs)
-{
-    DviFontSizeList    *next;
-
-    for (; fs; fs=next) {
-       next = fs->next;
-       if (fs->x_name)
-               XtFree (fs->x_name);
-       if (fs->font)
-       {
-#ifdef USE_XFT
-           XftFontClose (XtDisplay (dw), fs->font);
-#else
-           XUnloadFont (XtDisplay (dw), fs->font->fid);
-           XFree ((char *)fs->font);
-#endif
-       }
-       XtFree ((char *) fs);
-    }
-}
-
-void
-ResetFonts (DviWidget dw)
-{
-    DviFontList        *f;
-    
-    for (f = dw->dvi.fonts; f; f = f->next)
-    {
-       if (f->initialized)
-       {
-           DisposeFontSizes (dw, f->sizes);
-           f->sizes = 0;
-           f->initialized = FALSE;
-           f->scalable = FALSE;
-       }
-    }
-    /* 
-     * force requery of fonts
-     */
-    dw->dvi.font = 0;
-    dw->dvi.font_number = -1;
-    dw->dvi.cache.font = 0;
-    dw->dvi.cache.font_number = -1;
-}
-
-static DviFontSizeList *
-InstallFontSizes (DviWidget dw, char *x_name, Boolean *scalablep)
-{
-#ifndef USE_XFT
-    char           fontNameString[2048];
-    char           **fonts;
-    int                    i, count;
-    int                    size;
-    DviFontSizeList *new;
-    XFontName      fontName;
-    unsigned int    fontNameAttributes;
-#endif
-    DviFontSizeList *sizes;
-
-    sizes = 0;
-#ifdef USE_XFT
-    *scalablep = TRUE;
-#else
-    *scalablep = FALSE;
-    if (!XParseFontName (x_name, &fontName, &fontNameAttributes))
-       return 0;
-    
-    fontNameAttributes &= ~(FontNamePixelSize|FontNamePointSize);
-    fontNameAttributes |= FontNameResolutionX;
-    fontNameAttributes |= FontNameResolutionY;
-    fontName.ResolutionX = dw->dvi.screen_resolution;
-    fontName.ResolutionY = dw->dvi.screen_resolution;
-    XFormatFontName (&fontName, fontNameAttributes, fontNameString);
-    fonts = XListFonts (XtDisplay (dw), fontNameString, 10000000, &count);
-    for (i = 0; i < count; i++) {
-       size = ConvertFontNameToSize (fonts[i]);
-       if (size == 0)
-       {
-           DisposeFontSizes (dw, sizes);
-           *scalablep = TRUE;
-           sizes = 0;
-           break;
-       }
-       if (size != -1) {
-           new = (DviFontSizeList *) XtMalloc (sizeof *new);
-           new->next = sizes;
-           new->size = size;
-           new->x_name = savestr (fonts[i]);
-           new->doesnt_exist = 0;
-           new->font = 0;
-           sizes = new;
-       }
-    }
-    XFreeFontNames (fonts);
-#endif
-    return sizes;
-}
-
-static DviFontList *
-InstallFont (DviWidget dw, int position, char *dvi_name, char *x_name)
-{
-    DviFontList        *f;
-    char               *encoding;
-
-    f = LookupFontByPosition (dw, position);
-    if (f) {
-       /*
-        * ignore gratuitous font loading
-        */
-       if (!strcmp (f->dvi_name, dvi_name) && !strcmp (f->x_name, x_name))
-           return f;
-
-       DisposeFontSizes (dw, f->sizes);
-       if (f->dvi_name)
-           XtFree (f->dvi_name);
-       if (f->x_name)
-           XtFree (f->x_name);
-    } else {
-       f = (DviFontList *) XtMalloc (sizeof (*f));
-       f->next = dw->dvi.fonts;
-       dw->dvi.fonts = f;
-    }
-    f->initialized = FALSE;
-    f->dvi_name = savestr (dvi_name);
-    f->x_name = savestr (x_name);
-    f->dvi_number = position;
-    f->sizes = 0;
-    f->scalable = FALSE;
-    if (f->x_name) {
-       encoding = ConvertFontNameToEncoding (f->x_name);
-       f->char_map = DviFindMap (encoding);
-    } else
-       f->char_map = 0;
-    /* 
-     * force requery of fonts
-     */
-    dw->dvi.font = 0;
-    dw->dvi.font_number = -1;
-    dw->dvi.cache.font = 0;
-    dw->dvi.cache.font_number = -1;
-    return f;
-}
-
-static char *
-MapDviNameToXName (DviWidget dw, char *dvi_name)
-{
-    DviFontMap *fm;
-    
-    for (fm = dw->dvi.font_map; fm; fm=fm->next)
-       if (!strcmp (fm->dvi_name, dvi_name))
-           return fm->x_name;
-    ++dvi_name;
-    for (fm = dw->dvi.font_map; fm; fm=fm->next)
-       if (!strcmp (fm->dvi_name, "R"))
-           return fm->x_name;
-    if (dw->dvi.font_map->x_name)
-       return dw->dvi.font_map->x_name;
-    return "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-1";
-}
-
-#ifdef NOTUSED
-static char *
-MapXNameToDviName (dw, x_name)
-       DviWidget       dw;
-       char            *x_name;
-{
-    DviFontMap *fm;
-    
-    for (fm = dw->dvi.font_map; fm; fm=fm->next)
-       if (!strcmp (fm->x_name, x_name))
-           return fm->dvi_name;
-    return 0;
-}
-#endif
-
-void
-ParseFontMap (dw)
-       DviWidget       dw;
-{
-    char               dvi_name[1024];
-    char               x_name[2048];
-    char               *m, *s;
-    DviFontMap *fm, *new;
-
-    if (dw->dvi.font_map)
-           DestroyFontMap (dw->dvi.font_map);
-    fm = 0;
-    m = dw->dvi.font_map_string;
-    while (*m) {
-       s = m;
-       while (*m && !isspace (*m))
-           ++m;
-       strncpy (dvi_name, s, m-s);
-       dvi_name[m-s] = '\0';
-       while (isspace (*m))
-           ++m;
-       s = m;
-       while (*m && *m != '\n')
-           ++m;
-       strncpy (x_name, s, m-s);
-       x_name[m-s] = '\0';
-       new = (DviFontMap *) XtMalloc (sizeof *new);
-       new->x_name = savestr (x_name);
-       new->dvi_name = savestr (dvi_name);
-       new->next = fm;
-       fm = new;
-       ++m;
-    }
-    dw->dvi.font_map = fm;
-}
-
-void
-DestroyFontMap (font_map)
-    DviFontMap *font_map;
-{
-    DviFontMap *next;
-
-    for (; font_map; font_map = next) {
-       next = font_map->next;
-       if (font_map->x_name)
-           XtFree (font_map->x_name);
-       if (font_map->dvi_name)
-           XtFree (font_map->dvi_name);
-       XtFree ((char *) font_map);
-    }
-}
-
-/*ARGSUSED*/
-void
-SetFontPosition (dw, position, dvi_name, extra)
-    DviWidget  dw;
-    int                position;
-    char       *dvi_name;
-    char       *extra; /* unused */
-{
-    char       *x_name;
-
-    x_name = MapDviNameToXName (dw, dvi_name);
-    (void) InstallFont (dw, position, dvi_name, x_name);
-}
-
-#ifdef USE_XFT
-XftFont *
-#else
-XFontStruct *
-#endif
-QueryFont (dw, position, size)
-    DviWidget  dw;
-    int                position;
-    int                size;
-{
-    DviFontList        *f;
-    DviFontSizeList    *fs;
-
-    f = LookupFontByPosition (dw, position);
-    if (!f)
-       return dw->dvi.default_font;
-    if (!f->initialized) {
-       f->sizes = InstallFontSizes (dw, f->x_name, &f->scalable);
-       f->initialized = TRUE;
-    }
-    fs = LookupFontSizeBySize (dw, f, size);
-    if (!fs)
-       return dw->dvi.default_font;
-    if (!fs->font) {
-       if (fs->x_name)
-       {
-#ifdef USE_XFT
-           XftPattern  *pat;
-           XftPattern  *match;
-           XftResult   result;
-
-           pat = XftXlfdParse (fs->x_name, False, False);
-           XftPatternAddBool (pat, XFT_CORE, fs->core);
-           match = XftFontMatch (XtDisplay (dw),
-                                 XScreenNumberOfScreen(dw->core.screen),
-                                 pat, &result);
-           XftPatternDestroy (pat);
-           if (match)
-           {
-               fs->font = XftFontOpenPattern (XtDisplay (dw),
-                                              match);
-               if (!fs->font)
-                   XftPatternDestroy (match);
-           }
-           else
-               fs->font = 0;
-#else
-           fs->font = XLoadQueryFont (XtDisplay (dw), fs->x_name);
-#endif
-       }
-       if (!fs->font)
-           fs->font = dw->dvi.default_font;
-    }
-    return fs->font;
-}
-
-DviCharNameMap *
-QueryFontMap (dw, position)
-       DviWidget       dw;
-       int             position;
-{
-       DviFontList     *f;
-
-       f = LookupFontByPosition (dw, position);
-       if (f)
-           return f->char_map;
-       else
-           return 0;
-}
-
-unsigned char *
-DviCharIsLigature (map, name)
-    DviCharNameMap  *map;
-    char           *name;
-{
-    int            i;
-
-    for (i = 0; i < DVI_MAX_LIGATURES; i++) {
-       if (!map->ligatures[i][0])
-           break;
-       if (!strcmp (name, map->ligatures[i][0]))
-           return (unsigned char *) map->ligatures[i][1];
-    }
-    return 0;
-}
-
-#if 0
-LoadFont (dw, position, size)
-       DviWidget       dw;
-       int             position;
-       int             size;
-{
-       XFontStruct     *font;
-
-       font = QueryFont (dw, position, size);
-       dw->dvi.font_number = position;
-       dw->dvi.font_size = size;
-       dw->dvi.font = font;
-       XSetFont (XtDisplay (dw), dw->dvi.normal_GC, font->fid);
-       return;
-}
-#endif
diff --git a/xditview/install-sh b/xditview/install-sh
deleted file mode 100755 (executable)
index 4d4a951..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
-
-    -T) no_target_directory=true
-       shift
-       continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    *)  # When -d is used, all remaining arguments are directories to create.
-       # When -t is used, the destination is already specified.
-       test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-       for arg
-       do
-          if test -n "$dstarg"; then
-           # $@ is not empty: it contains at least $arg.
-           set fnord "$@" "$dstarg"
-           shift # fnord
-         fi
-         shift # arg
-         dstarg=$arg
-       done
-       break;;
-  esac
-done
-
-if test -z "$1"; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
-       exit 1
-      fi
-      dst=$dst/`basename "$src"`
-    fi
-  fi
-
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
-
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
-
-    pathcomp=
-
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit
-      fi
-      pathcomp=$pathcomp/
-    done
-  fi
-
-  if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-  else
-    dstfile=`basename "$dst"`
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
-
-    # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-              || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-        }
-    }
-  fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xditview/ldblarrow b/xditview/ldblarrow
deleted file mode 100644 (file)
index 48bbeb0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define previous_width 11
-#define previous_height 11
-static char previous_bits[] = {
-   0x20, 0x04, 0x10, 0x02, 0x08, 0x01, 0x84, 0x00, 0x42, 0x00, 0x21, 0x00,
-   0x42, 0x00, 0x84, 0x00, 0x08, 0x01, 0x10, 0x02, 0x20, 0x04};
diff --git a/xditview/lex.c b/xditview/lex.c
deleted file mode 100644 (file)
index 12158ed..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $XFree86: xc/programs/xditview/lex.c,v 1.3 2000/12/04 21:01:01 dawes Exp $ */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-
-int
-DviGetAndPut(dw, cp)
-    DviWidget  dw;
-    int                *cp;
-{
-    if (dw->dvi.ungot)
-    {
-       dw->dvi.ungot = 0;
-       *cp = getc (dw->dvi.file);
-    }
-    else
-    {
-       *cp = getc (dw->dvi.file);
-       putc (*cp, dw->dvi.tmpFile);
-    }
-    return *cp;
-}
-
-char *
-GetLine(dw, Buffer, Length)
-       DviWidget       dw;
-       char    *Buffer;
-       int     Length;
-{
-       int     i = 0, c;
-       char    *p = Buffer;
-
-       Length--;                           /* Save room for final NULL */
-
-       while ((!p || i < Length) && DviGetC (dw, &c) != EOF && c != '\n')
-               if (p)
-                       *p++ = c;
-#if 0
-       if (c == '\n' && p)                 /* Retain the newline like fgets */
-               *p++ = c;
-#endif
-       if (c == '\n')
-               DviUngetC(dw, c);
-       if (p)
-               *p = '\0';
-       return (Buffer);
-}
-
-char *
-GetWord(dw, Buffer, Length)
-       DviWidget       dw;
-       char    *Buffer;
-       int     Length;
-{
-       int     i = 0, c;
-       char    *p = Buffer;
-
-       Length--;                           /* Save room for final NULL */
-       while (DviGetC(dw, &c) != EOF && isspace(c))
-               ;
-       if (c != EOF)
-               DviUngetC(dw, c);
-       while (i < Length && DviGetC(dw, &c) != EOF && !isspace(c))
-               if (p)
-                       *p++ = c;
-       if (c != EOF)
-               DviUngetC(dw, c);
-       if (p)
-               *p = '\0';
-       return (Buffer);
-}
-
-int
-GetNumber(dw)
-       DviWidget       dw;
-{
-       int     i = 0,  c;
-
-       while (DviGetC(dw, &c) != EOF && isspace(c))
-               ;
-       if (c != EOF)
-               DviUngetC(dw, c);
-       while (DviGetC(dw, &c) != EOF && isdigit(c))
-               i = i*10 + c - '0';
-       if (c != EOF)
-               DviUngetC(dw, c);
-       return (i);
-}
diff --git a/xditview/missing b/xditview/missing
deleted file mode 100755 (executable)
index 894e786..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f y.tab.h ]; then
-       echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case "$firstarg" in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case "$firstarg" in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xditview/mkinstalldirs b/xditview/mkinstalldirs
deleted file mode 100755 (executable)
index 259dbfc..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2005-06-29.22
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-errstatus=0
-dirmode=
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage"
-      exit $?
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --version)
-      echo "$0 $scriptversion"
-      exit $?
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error.  This is a problem when calling mkinstalldirs
-# from a parallel make.  We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
-  '')
-    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    else
-      # On NextStep and OpenStep, the `mkdir' command does not
-      # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
-      # exists.
-      test -d ./-p && rmdir ./-p
-      test -d ./--version && rmdir ./--version
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-       test ! -d ./--version; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    else
-      # Clean up after NextStep and OpenStep mkdir.
-      for d in ./-m ./-p ./--version "./$dirmode";
-      do
-        test -d $d && rmdir $d
-      done
-    fi
-    ;;
-esac
-
-for file
-do
-  case $file in
-    /*) pathcomp=/ ;;
-    *)  pathcomp= ;;
-  esac
-  oIFS=$IFS
-  IFS=/
-  set fnord $file
-  shift
-  IFS=$oIFS
-
-  for d
-  do
-    test "x$d" = x && continue
-
-    pathcomp=$pathcomp$d
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-       errstatus=$lasterr
-      else
-       if test ! -z "$dirmode"; then
-         echo "chmod $dirmode $pathcomp"
-         lasterr=
-         chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-         if test ! -z "$lasterr"; then
-           errstatus=$lasterr
-         fi
-       fi
-      fi
-    fi
-
-    pathcomp=$pathcomp/
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xditview/page.c b/xditview/page.c
deleted file mode 100644 (file)
index a1c65f1..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/* $XConsortium: page.c,v 1.5 91/07/26 00:40:20 keith Exp $ */
-/* $XFree86: xc/programs/xditview/page.c,v 1.3 2001/08/01 00:45:03 tsi Exp $ */
-
-/*
- * page.c
- *
- * map page numbers to file position
- */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xos.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-
-static DviFileMap *
-MapPageNumberToFileMap (DviWidget dw, int number)
-{
-       DviFileMap      *m;
-
-       for (m = dw->dvi.file_map; m; m=m->next)
-               if (m->page_number == number)
-                       break;
-       return m;
-}
-
-void
-DestroyFileMap (m)
-       DviFileMap      *m;
-{
-       DviFileMap      *next;
-
-       for (; m; m = next) {
-               next = m->next;
-               XtFree ((char *) m);
-       }
-}
-
-void
-ForgetPagePositions (dw)
-       DviWidget       dw;
-{
-       DestroyFileMap (dw->dvi.file_map);
-       dw->dvi.file_map = 0;
-}
-
-void
-RememberPagePosition(dw, number)
-       DviWidget       dw;
-       int             number;
-{
-       DviFileMap      *m;
-
-       if (!(m = MapPageNumberToFileMap (dw, number))) {
-               m = (DviFileMap *) XtMalloc (sizeof *m);
-               m->page_number = number;
-               m->next = dw->dvi.file_map;
-               dw->dvi.file_map = m;
-       }
-       if (dw->dvi.tmpFile)
-               m->position = ftell (dw->dvi.tmpFile);
-       else
-               m->position = ftell (dw->dvi.file);
-}
-
-long
-SearchPagePosition (dw, number)
-       DviWidget       dw;
-       int             number;
-{
-       DviFileMap      *m;
-
-       if (!(m = MapPageNumberToFileMap (dw, number)))
-               return -1;
-       return m->position;
-}
-
-void
-FileSeek(dw, position)
-DviWidget      dw;
-long           position;
-{
-       if (dw->dvi.tmpFile) {
-               dw->dvi.readingTmp = 1;
-               fseek (dw->dvi.tmpFile, position, 0);
-       } else
-               fseek (dw->dvi.file, position, 0);
-}
-
diff --git a/xditview/parse.c b/xditview/parse.c
deleted file mode 100644 (file)
index 0f5bc68..0000000
+++ /dev/null
@@ -1,475 +0,0 @@
-/* $XConsortium: parse.c,v 1.13 94/04/17 20:43:36 keith Exp $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xditview/parse.c,v 1.5tsi Exp $ */
-
-/*
- * parse.c
- *
- * parse dvi input
- */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-
-static void ParseDrawFunction(DviWidget dw, char *buf);
-static void ParseDeviceControl(DviWidget dw);
-static void PutCharacters(DviWidget dw, unsigned char *src, int len);
-static void push_env(DviWidget dw);
-static void pop_env(DviWidget dw);
-
-#define HorizontalMove(dw, delta)      ((dw)->dvi.state->x += (delta))
-
-#ifdef USE_XFT
-static int
-charWidth (DviWidget dw, XftFont *font, char c)
-{
-    XGlyphInfo extents;
-
-    XftTextExtents8 (XtDisplay (dw), font, 
-                    (unsigned char *) &c, 1, &extents);
-    return extents.xOff;
-}
-#else
-#define charWidth(dw,fi,c) (\
-    (fi)->per_char ?\
-       (fi)->per_char[(c) - (fi)->min_char_or_byte2].width\
-    :\
-       (fi)->max_bounds.width\
-)
-#endif
-    
-int
-ParseInput(dw)
-    DviWidget  dw;
-{
-       int             n, k;
-       int             c;
-       char            Buffer[BUFSIZ];
-       int             NextPage;
-       int             prevFont;
-       int             otherc;
-       unsigned char   tc;
-
-       /*
-        * make sure some state exists
-        */
-
-       if (!dw->dvi.state)
-           push_env (dw);
-       for (;;) {
-               switch (DviGetC(dw, &c)) {
-               case '\n':      
-                       break;
-               case ' ':       /* when input is text */
-               case 0:         /* occasional noise creeps in */
-                       break;
-               case '{':       /* push down current environment */
-                       push_env(dw);
-                       break;
-               case '}':
-                       pop_env(dw);
-                       break;
-               /*
-                * two motion digits plus a character
-                */
-               case '0': case '1': case '2': case '3': case '4':
-               case '5': case '6': case '7': case '8': case '9':
-                       HorizontalMove(dw, (c-'0')*10 +
-                                          DviGetC(dw,&otherc)-'0');
-                       /* fall through */
-               case 'c':       /* single ascii character */
-                       (void) DviGetC(dw,&c);
-                       if (c == ' ')
-                           break;
-                       tc = c;
-                       PutCharacters (dw, &tc, 1);
-                       break;
-               case 'C':
-                       GetWord(dw, Buffer, BUFSIZ);
-                       {
-                           DviCharNameMap      *map;
-                           int                 i;
-                           unsigned char       *ligature;
-                   
-                           c = -1;
-                           map = QueryFontMap (dw, dw->dvi.state->font_number);
-                           if (map)
-                           {
-                               c = DviCharIndex (map, Buffer);
-                               if (c == -1)
-                               {
-                                   ligature = DviCharIsLigature (map, Buffer);
-                                   if (ligature) {
-                                       i = strlen ((char *) ligature);
-                                       PutCharacters (dw, ligature, i);
-                                       break;
-                                   }
-                               }
-                           }
-                           prevFont = -1;
-                           if (c == -1) {
-                               for (i = 1; (map = QueryFontMap (dw, i)); i++)
-                                   if (map->special)
-                                       if ((c = DviCharIndex (map, Buffer)) != -1) {
-                                           prevFont = dw->dvi.state->font_number;
-                                           dw->dvi.state->font_number = i;
-                                           break;
-                                       }
-                           }
-                           if (c != -1)
-                           {
-                               tc = c;
-                               PutCharacters (dw, &tc, 1);
-                           }
-                           if (prevFont != -1)
-                               dw->dvi.state->font_number = prevFont;
-                       }
-                       break;
-               case 'D':       /* draw function */
-                       GetLine(dw, Buffer, BUFSIZ);
-                       ParseDrawFunction(dw, Buffer);
-                       break;
-               case 's':       /* ignore fractional sizes */
-                       n = GetNumber(dw);
-                       if (!dw->dvi.size_scale)
-                       {
-                           static int  guesses[] = { 1, 4, 100, 1000, 1 };
-                           int         i;
-
-                           for (i = 0; i < 4; i++)
-                               if (8 <= n/guesses[i] && n/guesses[i] <= 24)
-                               {
-                                   break;
-                               }
-                           dw->dvi.size_scale = guesses[i];
-                       }
-                       dw->dvi.state->font_size = n;
-                       dw->dvi.state->line_width = n * (dw->dvi.device_resolution / 
-                                                        (720 * dw->dvi.size_scale));
-                       break;
-               case 'f':
-                       n = GetNumber(dw);
-                       dw->dvi.state->font_number = n;
-                       break;
-               case 'H':       /* absolute horizontal motion */
-                       k = GetNumber(dw);
-                       HorizontalGoto(dw, k);
-                       break;
-               case 'h':       /* relative horizontal motion */
-                       k = GetNumber(dw);
-                       HorizontalMove(dw, k);
-                       break;
-               case 'w':       /* word space */
-                       break;
-               case 'V':
-                       n = GetNumber(dw);
-                       VerticalGoto(dw, n);
-                       break;
-               case 'v':
-                       n = GetNumber(dw);
-                       VerticalMove(dw, n);
-                       break;
-               case 'P':       /* new spread */
-                       break;
-               case 'p':       /* new page */
-                       (void) GetNumber(dw);
-                       NextPage = dw->dvi.current_page + 1;
-                       RememberPagePosition(dw, NextPage);
-                       FlushCharCache (dw);
-                       return(NextPage);
-               case 'n':       /* end of line */
-                       GetNumber(dw);
-                       GetNumber(dw);
-                       HorizontalGoto(dw, 0);
-                       break;
-               case '#':       /* comment */
-               case 'F':       /* file info */
-                       GetLine(dw, NULL, 0);
-                       break;
-               case 't':       /* text */
-                       GetLine(dw, Buffer, BUFSIZ);
-                       PutCharacters (dw, (unsigned char *)Buffer,
-                                      strlen (Buffer));
-                       dw->dvi.state->x = ToDevice (dw, dw->dvi.cache.x);
-                       break;
-               case 'x':       /* device control */
-                       ParseDeviceControl(dw);
-                       break;
-               case EOF:
-                       dw->dvi.last_page = dw->dvi.current_page;
-                       FlushCharCache (dw);
-                       return dw->dvi.current_page;
-               default:
-                       GetLine (dw, Buffer, BUFSIZ);
-                       fprintf (stderr, "Unknown command %s\n", Buffer);
-                       break;
-               }
-       }
-}
-
-static void
-push_env(dw)
-       DviWidget       dw;
-{
-       DviState        *new;
-
-       new = (DviState *) XtMalloc (sizeof (*new));
-       if (dw->dvi.state)
-               *new = *(dw->dvi.state);
-       else {
-               new->font_size = 10 * dw->dvi.size_scale;
-               new->font_number = 1;
-               new->line_style = 0;
-               new->line_width = 10;
-               new->x = 0;
-               new->y = 0;
-       }
-       new->next = dw->dvi.state;
-       dw->dvi.state = new;
-}
-
-static void
-pop_env(dw)
-       DviWidget       dw;
-{
-       DviState        *old;
-
-       old = dw->dvi.state;
-       dw->dvi.state = old->next;
-       XtFree ((char *) old);
-}
-
-static void
-InitTypesetter (DviWidget dw)
-{
-       while (dw->dvi.state)
-               pop_env (dw);
-       dw->dvi.size_scale = dw->dvi.size_scale_set;
-       push_env (dw);
-       FlushCharCache (dw);
-}
-
-static void
-SetFont (DviWidget dw)
-{
-    dw->dvi.cache.font_size = dw->dvi.state->font_size;
-    dw->dvi.cache.font_number = dw->dvi.state->font_number;
-    dw->dvi.cache.font = QueryFont (dw,
-                         dw->dvi.cache.font_number,
-                         dw->dvi.cache.font_size);
-}
-
-static void
-PutCharacters (dw, src, len)
-    DviWidget      dw;
-    unsigned char   *src;
-    int                    len;
-{
-    int            xx, yx;
-    int            fx, fy;
-    char    *dst;
-    int            c;
-
-    xx = ToX(dw, dw->dvi.state->x);
-    yx = ToX(dw, dw->dvi.state->y);
-    fy = FontSizeInPixels (dw, dw->dvi.state->font_size);
-    fx = fy * len;
-    /*
-     * quick and dirty extents calculation:
-     */
-    if (yx + fy >= dw->dvi.extents.y1 &&
-       yx - fy <= dw->dvi.extents.y2 &&
-       xx + fx >= dw->dvi.extents.x1 &&
-       xx - fx <= dw->dvi.extents.x2)
-    {
-#ifdef USE_XFT
-       XftFont     *font;
-       DviTextItem *text;
-#else
-       register XFontStruct    *font;
-       register XTextItem              *text;
-#endif
-
-       if (!dw->dvi.display_enable)
-           return;
-
-       if (yx != dw->dvi.cache.y ||
-           dw->dvi.cache.char_index + len > DVI_CHAR_CACHE_SIZE)
-           FlushCharCache (dw);
-       /*
-        * load a new font, if the current block is not empty,
-        * step to the next.
-        */
-       if (dw->dvi.cache.font_size != dw->dvi.state->font_size ||
-           dw->dvi.cache.font_number != dw->dvi.state->font_number)
-       {
-           SetFont (dw);
-           if (dw->dvi.cache.cache[dw->dvi.cache.index].nchars != 0) {
-               ++dw->dvi.cache.index;
-               if (dw->dvi.cache.index >= dw->dvi.cache.max)
-                   FlushCharCache (dw);
-               dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0;
-           }
-       }
-       if (xx != dw->dvi.cache.x) {
-           if (dw->dvi.cache.cache[dw->dvi.cache.index].nchars != 0) {
-               ++dw->dvi.cache.index;
-               if (dw->dvi.cache.index >= dw->dvi.cache.max)
-                   FlushCharCache (dw);
-               dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0;
-           }
-       }
-       if (!dw->dvi.cache.font)
-           SetFont (dw);
-       text = &dw->dvi.cache.cache[dw->dvi.cache.index];
-       font = dw->dvi.cache.font;
-       dst = &dw->dvi.cache.char_cache[dw->dvi.cache.char_index];
-       if (text->nchars == 0) {
-           text->chars = dst;
-#ifdef USE_XFT
-           text->x = xx;
-#else
-           text->delta = xx - dw->dvi.cache.x;
-#endif
-#ifdef USE_XFT
-           text->font = font;
-#endif
-           if (font != dw->dvi.font) {
-#ifndef USE_XFT
-               text->font = font->fid;
-#endif
-               dw->dvi.font = font;
-           }
-#ifndef USE_XFT
-           else
-               text->font = None;
-#endif
-           dw->dvi.cache.x = xx;
-       }
-       dw->dvi.cache.char_index += len;
-       text->nchars += len;
-       while (len--)
-       {
-           c = *src++;
-           *dst++ = c;
-           if (font)
-               dw->dvi.cache.x += charWidth(dw,font,c);
-       }
-    }
-}
-
-static void
-ParseDrawFunction(dw, buf)
-       DviWidget       dw;
-       char            *buf;
-{
-    int        n, m, n1, m1;
-
-    SetGCForDraw (dw);
-    switch (buf[0]) {
-    case 'l':                          /* draw a line */
-       sscanf(buf+1, "%d %d", &n, &m);
-       DrawLine(dw, n, m);
-       break;
-    case 'c':                          /* circle */
-       sscanf(buf+1, "%d", &n);
-       DrawCircle(dw, n);
-       break;
-    case 'e':                          /* ellipse */
-       sscanf(buf+1, "%d %d", &m, &n);
-       DrawEllipse(dw, m, n);
-       break;
-    case 'a':                          /* arc */
-       sscanf(buf+1, "%d %d %d %d", &n, &m, &n1, &m1);
-       DrawArc(dw, n, m, n1, m1);
-       break;
-    case '~':                          /* wiggly line */
-       DrawSpline(dw, buf+1,1);
-       break;
-    case 't':                          /* line width */
-       sscanf(buf+1, "%d", &n);
-       dw->dvi.state->line_width = n;
-       break;
-    case 's':                          /* line style */
-       sscanf(buf+1, "%d", &n);
-       /* XXX */
-       break;
-    default:
-       /* warning("unknown drawing function %s", buf); */
-       break;
-    }
-} 
-
-extern int LastPage, CurrentPage;
-
-static void
-ParseDeviceControl(dw)                         /* Parse the x commands */
-       DviWidget       dw;
-{
-    char str[20], str1[50];
-    int c, n;
-
-    GetWord (dw, str, 20);
-    switch (str[0]) {                  /* crude for now */
-    case 'T':                          /* output device */
-       GetWord(dw, str, 20);
-       break;
-    case 'i':                          /* initialize */
-       InitTypesetter (dw);
-       break;
-    case 't':                          /* trailer */
-       break;
-    case 'p':                          /* pause -- can restart */
-       break;
-    case 's':                          /* stop */
-       return;
-    case 'r':                          /* resolution when prepared */
-       SetDeviceResolution (dw, GetNumber (dw));
-       break;
-    case 'f':                          /* font used */
-       n = GetNumber(dw);
-       GetWord(dw, str, 20);
-       GetLine(dw, str1, 50);
-       SetFontPosition(dw, n, str, str1);
-       break;
-    case 'H':                          /* char height */
-       break;
-    case 'S':                          /* slant */
-       break;
-    }
-    while (DviGetC(dw,&c) != '\n')             /* skip rest of input line */
-           if (c == EOF)
-                   return;
-}
diff --git a/xditview/rdblarrow b/xditview/rdblarrow
deleted file mode 100644 (file)
index 19140c7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define next_width 11
-#define next_height 11
-static char next_bits[] = {
-   0x21, 0x00, 0x42, 0x00, 0x84, 0x00, 0x08, 0x01, 0x10, 0x02, 0x20, 0x04,
-   0x10, 0x02, 0x08, 0x01, 0x84, 0x00, 0x42, 0x00, 0x21, 0x00};
diff --git a/xditview/xdit.bm b/xditview/xdit.bm
deleted file mode 100644 (file)
index 0c7aa8c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#define xdit_width 32
-#define xdit_height 32
-static unsigned char xdit_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x02, 0x00, 0x00, 0x02,
-   0x8a, 0xa2, 0xfc, 0x03, 0x52, 0x14, 0x03, 0x04, 0x02, 0x80, 0x00, 0x08,
-   0x52, 0x54, 0x00, 0x10, 0x8a, 0x22, 0x8f, 0x23, 0x02, 0x20, 0x06, 0x21,
-   0x8a, 0x12, 0x8c, 0x40, 0x52, 0x14, 0x8c, 0x40, 0x02, 0x10, 0x58, 0x40,
-   0x52, 0x14, 0x30, 0x40, 0x8a, 0x12, 0x30, 0x40, 0x02, 0x10, 0x70, 0x40,
-   0x8a, 0x12, 0xc8, 0x40, 0x52, 0x24, 0xc4, 0xe0, 0x02, 0x20, 0x84, 0xe1,
-   0x52, 0x54, 0xce, 0xf3, 0x8a, 0xa2, 0x00, 0xf8, 0x02, 0x00, 0x03, 0xfc,
-   0x8a, 0x22, 0xfc, 0xf3, 0x52, 0x14, 0x00, 0xc2, 0x02, 0x00, 0x00, 0x02,
-   0x52, 0x14, 0x45, 0x02, 0x8a, 0xa2, 0x28, 0x02, 0x02, 0x00, 0x00, 0x02,
-   0x02, 0x00, 0x00, 0x02, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/xditview/xdit_mask.bm b/xditview/xdit_mask.bm
deleted file mode 100644 (file)
index a584629..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#define xdit_mask_width 32
-#define xdit_mask_height 32
-static unsigned char xdit_mask_bits[] = {
-   0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07,
-   0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x1f,
-   0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xc7,
-   0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07,
-   0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/xditview/xditview.c b/xditview/xditview.c
deleted file mode 100644 (file)
index 41f3bf4..0000000
+++ /dev/null
@@ -1,655 +0,0 @@
-/* $XConsortium: xditview.c,v 1.32 94/04/17 20:43:36 eswu Exp $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xditview/xditview.c,v 1.4tsi Exp $ */
-/*
- * xditview -- 
- *
- *   Display ditroff output in an X window
- */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xatom.h>
-#include <X11/Shell.h>
-#include <X11/Xos.h>           /* rindex declaration */
-#include <X11/Xaw/Paned.h>
-#include <X11/Xaw/Panner.h>
-#include <X11/Xaw/Porthole.h>
-#include <X11/Xaw/Viewport.h>
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/MenuButton.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/AsciiText.h>
-
-#include "Dvi.h"
-
-#include "xdit.bm"
-#include "xdit_mask.bm"
-#include <stdio.h>
-#include <stdlib.h>
-
-/* Command line options table.  Only resources are entered here...there is a
-   pass over the remaining options after XtParseCommand is let loose. */
-
-static XrmOptionDescRec options[] = {
-{"-page",          "*dvi.pageNumber",      XrmoptionSepArg,    NULL},
-{"-backingStore",   "*dvi.backingStore",    XrmoptionSepArg,   NULL},
-{"-noPolyText",            "*dvi.noPolyText",      XrmoptionNoArg,     "TRUE"},
-{"-resolution",            "*dvi.screenResolution",XrmoptionSepArg,    NULL},
-};
-
-static char    current_file_name[1024];
-static FILE    *current_file;
-
-static void MakePrompt(Widget, char *, void (*)(char *), char *);
-
-/*
- * Report the syntax for calling xditview.
- */
-
-static void
-Syntax(char *call)
-{
-       (void) printf ("Usage: %s [-fg <color>] [-bg <color>]\n", call);
-       (void) printf ("       [-bd <color>] [-bw <pixels>] [-help]\n");
-       (void) printf ("       [-display displayname] [-geometry geom]\n");
-       (void) printf ("       [-page <page-number>] [-backing <backing-store>]\n");
-       (void) printf ("       [-resolution <screen-resolution>]\n\n");
-       exit(1);
-}
-
-static void    NewResolution (char *resString);
-static void    NewFile (char *name);
-static void    DisplayPageNumber (void);
-static void    VisitFile (char *name, Boolean resetPage);
-static Widget  toplevel, paned, porthole, dvi;
-#ifdef NOTDEF
-static Widget  form, panner;
-#endif
-static Widget  popupMenu;
-static Widget  menuBar;
-static Widget  fileMenuButton, fileMenu;
-static Widget  pageNumber;
-
-static void    NextPage(Widget entry, XtPointer name, XtPointer data);
-static void    PreviousPage(Widget entry, XtPointer name, XtPointer data);
-static void    SetResolution(Widget entry, XtPointer name, XtPointer data);
-static void    OpenFile(Widget entry, XtPointer name, XtPointer data);
-static void    RevisitFile(Widget entry, XtPointer name, XtPointer data);
-static void    Quit(Widget entry, XtPointer closure, XtPointer data);
-
-struct menuEntry {
-    char    *name;
-    void    (*function)(Widget entry, XtPointer name, XtPointer data);
-};
-
-static struct menuEntry popupMenuEntries[] = {
-    { "nextPage",          NextPage },
-    { "previousPage",      PreviousPage },
-    { "setResolution",     SetResolution },
-    { "openFile",          OpenFile },
-    { "revisitFile",       RevisitFile },
-    { "quit",              Quit }
-};
-
-static struct menuEntry fileMenuEntries[] = {
-    { "openFile",          OpenFile },
-    { "revisitFile",       RevisitFile },
-    { "setResolution",     SetResolution },
-    { "quit",              Quit }
-};
-
-static void    NextPageAction(Widget, XEvent *, String *, Cardinal *);
-static void    PreviousPageAction(Widget, XEvent *, String *, Cardinal *);
-static void    SetResolutionAction(Widget, XEvent *, String *, Cardinal *);
-static void    OpenFileAction(Widget, XEvent *, String *, Cardinal *);
-static void    RevisitFileAction(Widget, XEvent *, String *, Cardinal *);
-static void    QuitAction(Widget, XEvent *, String *, Cardinal *);
-static void    AcceptAction(Widget, XEvent *, String *, Cardinal *);
-static void    CancelAction(Widget, XEvent *, String *, Cardinal *);
-static void    UpdatePageNumber(Widget, XEvent *, String *, Cardinal *);
-static void    Noop(Widget, XEvent *, String *, Cardinal *);
-
-XtActionsRec xditview_actions[] = {
-    { "NextPage",          NextPageAction },
-    { "PreviousPage",      PreviousPageAction },
-    { "SetResolution",     SetResolutionAction },
-    { "OpenFile",          OpenFileAction },
-    { "Quit",              QuitAction },
-    { "Accept",                    AcceptAction },
-    { "Cancel",                    CancelAction },
-    { "SetPageNumber",     UpdatePageNumber },
-    { "Noop",              Noop }
-};
-
-static Atom wm_delete_window;
-
-#ifdef NOTDEF
-/*     Function Name: PannerCallback
- *     Description: called when the panner has moved.
- *     Arguments: panner - the panner widget.
- *                 closure - *** NOT USED ***.
- *                 report_ptr - the panner record.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-static void 
-PannerCallback(Widget w, XtPointer closure, XtPointer report_ptr)
-{
-    Arg args[2];
-    XawPannerReport *report = (XawPannerReport *) report_ptr;
-
-    if (!dvi)
-       return;
-    XtSetArg (args[0], XtNx, -report->slider_x);
-    XtSetArg (args[1], XtNy, -report->slider_y);
-
-    XtSetValues(dvi, args, 2);
-}
-
-/*     Function Name: PortholeCallback
- *     Description: called when the porthole or its child has
- *                   changed 
- *     Arguments: porthole - the porthole widget.
- *                 panner_ptr - the panner widget.
- *                 report_ptr - the porthole record.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-static void 
-PortholeCallback(Widget w, XtPointer panner_ptr, XtPointer report_ptr)
-{
-    Arg args[10];
-    Cardinal n = 0;
-    XawPannerReport *report = (XawPannerReport *) report_ptr;
-    Widget panner = (Widget) panner_ptr;
-
-    XtSetArg (args[n], XtNsliderX, report->slider_x); n++;
-    XtSetArg (args[n], XtNsliderY, report->slider_y); n++;
-    if (report->changed != (XawPRSliderX | XawPRSliderY)) {
-       XtSetArg (args[n], XtNsliderWidth, report->slider_width); n++;
-       XtSetArg (args[n], XtNsliderHeight, report->slider_height); n++;
-       XtSetArg (args[n], XtNcanvasWidth, report->canvas_width); n++;
-       XtSetArg (args[n], XtNcanvasHeight, report->canvas_height); n++;
-    }
-    XtSetValues (panner, args, n);
-}
-#endif
-
-int
-main(int argc, char **argv)
-{
-    char           *file_name = 0;
-    int                    i;
-    XtAppContext    xtcontext;
-    Arg                    topLevelArgs[2];
-    Widget          entry;
-
-    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
-
-    toplevel = XtAppInitialize(&xtcontext, "Xditview",
-                              options, XtNumber (options),
-                              &argc, argv, NULL, NULL, 0);
-    if (argc > 2)
-       Syntax(argv[0]);
-
-    XtAppAddActions(xtcontext, xditview_actions, XtNumber (xditview_actions));
-    XtOverrideTranslations
-       (toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: Quit()"));
-
-    XtSetArg (topLevelArgs[0], XtNiconPixmap,
-             XCreateBitmapFromData (XtDisplay (toplevel),
-                                    XtScreen(toplevel)->root,
-                                    (char *) xdit_bits,
-                                    xdit_width, xdit_height));
-                                   
-    XtSetArg (topLevelArgs[1], XtNiconMask,
-             XCreateBitmapFromData (XtDisplay (toplevel),
-                                    XtScreen(toplevel)->root,
-                                    (char *) xdit_mask_bits, 
-                                    xdit_mask_width, xdit_mask_height));
-    XtSetValues (toplevel, topLevelArgs, 2);
-    if (argc > 1)
-       file_name = argv[1];
-
-    /*
-     * create the popup menu and insert the entries
-     */
-    popupMenu = XtCreatePopupShell ("popupMenu", simpleMenuWidgetClass, toplevel,
-                                   NULL, 0);
-    for (i = 0; i < XtNumber (popupMenuEntries); i++) {
-       entry = XtCreateManagedWidget(popupMenuEntries[i].name, 
-                                     smeBSBObjectClass, popupMenu,
-                                     NULL, (Cardinal) 0);
-       XtAddCallback(entry, XtNcallback, popupMenuEntries[i].function, NULL);
-    }
-
-    paned = XtCreateManagedWidget("paned", panedWidgetClass, toplevel,
-                                   NULL, (Cardinal) 0);
-    menuBar = XtCreateManagedWidget ("menuBar", boxWidgetClass, paned, 0, 0);
-
-    fileMenuButton = XtCreateManagedWidget ("fileMenuButton", menuButtonWidgetClass,
-                                   menuBar, NULL, (Cardinal) 0);
-    fileMenu = XtCreatePopupShell ("fileMenu", simpleMenuWidgetClass,
-                                   fileMenuButton, NULL, (Cardinal) 0);
-    for (i = 0; i < XtNumber (fileMenuEntries); i++) {
-       entry = XtCreateManagedWidget(fileMenuEntries[i].name,
-                                     smeBSBObjectClass, fileMenu,
-                                     NULL, (Cardinal) 0);
-       XtAddCallback (entry, XtNcallback, fileMenuEntries[i].function, NULL);
-    }
-
-    (void) XtCreateManagedWidget ("prevButton", commandWidgetClass,
-                                 menuBar, NULL, (Cardinal) 0);
-
-    pageNumber = XtCreateManagedWidget("pageNumber", asciiTextWidgetClass,
-                                       menuBar, NULL, (Cardinal) 0);
-  
-    (void) XtCreateManagedWidget ("nextButton", commandWidgetClass,
-                                 menuBar, NULL, (Cardinal) 0);
-
-#ifdef NOTDEF
-    form = XtCreateManagedWidget ("form", formWidgetClass, paned,
-                                   NULL, (Cardinal) 0);
-    panner = XtCreateManagedWidget ("panner", pannerWidgetClass,
-                                   form, NULL, 0);
-    porthole = XtCreateManagedWidget ("porthole", portholeWidgetClass,
-                                     form, NULL, 0);
-    XtAddCallback(porthole, 
-                 XtNreportCallback, PortholeCallback, (XtPointer) panner);
-    XtAddCallback(panner, 
-                 XtNreportCallback, PannerCallback, (XtPointer) porthole);
-#else
-    porthole = XtCreateManagedWidget ("viewport", viewportWidgetClass,
-                                     paned, NULL, 0);
-#endif
-    dvi = XtCreateManagedWidget ("dvi", dviWidgetClass, porthole, NULL, 0);
-    if (file_name)
-       VisitFile (file_name, FALSE);
-    XtRealizeWidget (toplevel);
-    wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
-                                  False);
-    (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
-                            &wm_delete_window, 1);
-    XtAppMainLoop(xtcontext);
-
-    return 0;
-}
-
-static void
-DisplayPageNumber ()
-{
-    Arg        arg[2];
-    int        actual_number, last_page;
-    XawTextBlock    text;
-    int                    length;
-    char           value[128];
-    char           *cur;
-
-    XtSetArg (arg[0], XtNpageNumber, &actual_number);
-    XtSetArg (arg[1], XtNlastPageNumber, &last_page);
-    XtGetValues (dvi, arg, 2);
-    if (actual_number == 0)
-       sprintf (value, "<none>");
-    else if (last_page > 0)
-       sprintf (value, "%d of %d", actual_number, last_page);
-    else
-       sprintf (value, "%d", actual_number);
-    text.firstPos = 0;
-    text.length = strlen (value);
-    text.ptr = value;
-    text.format = FMT8BIT;
-    XtSetArg (arg[0], XtNstring, &cur);
-    XtGetValues (XawTextGetSource (pageNumber), arg, 1);
-    length = strlen (cur);
-    XawTextReplace (pageNumber, 0, length, &text);
-}
-
-static void
-SetPageNumber (int number)
-{
-    Arg        arg[1];
-
-    XtSetArg (arg[0], XtNpageNumber, number);
-    XtSetValues (dvi, arg, 1);
-    DisplayPageNumber ();
-}
-
-static void
-UpdatePageNumber (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    char    *string;
-    Arg            arg[1];
-
-    XtSetArg (arg[0], XtNstring, &string);
-    XtGetValues (XawTextGetSource(pageNumber), arg, 1);
-    SetPageNumber (atoi(string));
-}
-
-static void
-NewResolution(resString)
-char   *resString;
-{
-    int        res;
-    Arg        arg[1];
-    
-    res = atoi (resString);
-    if (res <= 0)
-       return;
-    XtSetArg (arg[0], XtNscreenResolution, res);
-    XtSetValues (dvi, arg, 1);
-}
-
-static void
-VisitFile (char *name, Boolean resetPage)
-{
-    Arg            arg[3];
-    char    *n;
-    FILE    *new_file;
-    Boolean seek = 0;
-    int            i;
-
-    if (current_file) {
-       if (!strcmp (current_file_name, "-"))
-           ;
-       else if (current_file_name[0] == '|')
-           pclose (current_file);
-       else
-           fclose (current_file);
-    }
-    if (!strcmp (name, "-"))
-       new_file = stdin;
-    else if (name[0] == '|')
-       new_file = popen (name+1, "r");
-    else {
-       new_file = fopen (name, "r");
-       seek = 1;
-    }
-    if (!new_file) {
-       /* XXX display error message */
-       return;
-    }
-    i = 0;
-    XtSetArg (arg[i], XtNfile, new_file); i++;
-    XtSetArg (arg[i], XtNseek, seek); i++;
-    if (resetPage) {
-       XtSetArg (arg[i], XtNpageNumber, 1); i++;
-    }
-    XtSetValues (dvi, arg, i);
-    XtSetArg (arg[0], XtNtitle, name);
-    if (name[0] != '/' && (n = rindex (name, '/')))
-       n = n + 1;
-    else
-       n = name;
-    XtSetArg (arg[1], XtNiconName, n);
-    XtSetValues (toplevel, arg, 2);
-    strcpy (current_file_name, name);
-    current_file = new_file;
-    DisplayPageNumber ();
-}
-
-static void
-NewFile (name)
-char   *name;
-{
-    VisitFile (name, TRUE);
-}
-
-static char fileBuf[1024];
-static char resolutionBuf[1024];
-
-static void
-ResetMenuEntry (Widget entry)
-{
-    Arg        arg[1];
-
-    XtSetArg (arg[0], XtNpopupOnEntry, entry);
-    XtSetValues (XtParent(entry) , arg, (Cardinal) 1);
-}
-
-/*ARGSUSED*/
-static void
-NextPage (entry, name, data)
-    Widget  entry;
-    XtPointer name, data;
-{
-    NextPageAction(entry, NULL, NULL, NULL);
-    ResetMenuEntry (entry);
-}
-
-static void
-NextPageAction (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    Arg        args[1];
-    int        number;
-
-    XtSetArg (args[0], XtNpageNumber, &number);
-    XtGetValues (dvi, args, 1);
-    SetPageNumber (number+1);
-}
-
-/*ARGSUSED*/
-static void
-PreviousPage (entry, name, data)
-    Widget  entry;
-    XtPointer name, data;
-{
-    PreviousPageAction (entry, NULL, NULL, NULL);
-    ResetMenuEntry (entry);
-}
-
-static void
-PreviousPageAction (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    Arg        args[1];
-    int        number;
-
-    XtSetArg (args[0], XtNpageNumber, &number);
-    XtGetValues (dvi, args, 1);
-    SetPageNumber (number-1);
-}
-
-/*ARGSUSED*/
-static void
-SetResolution (entry, name, data)
-    Widget  entry;
-    XtPointer name, data;
-{
-    SetResolutionAction (entry, NULL, NULL, NULL);
-    ResetMenuEntry (entry);
-}
-
-static void
-SetResolutionAction (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    Arg            args[1];
-    int            cur;
-
-    XtSetArg (args[0], XtNscreenResolution, &cur);
-    XtGetValues (dvi, args, 1);
-    sprintf (resolutionBuf, "%d", cur);
-    MakePrompt (toplevel, "Screen resolution:", NewResolution, resolutionBuf);
-}
-
-/*ARGSUSED*/
-static void
-OpenFile (entry, name, data)
-    Widget  entry;
-    XtPointer name, data;
-{
-    OpenFileAction (entry, NULL, NULL, NULL);
-    ResetMenuEntry (entry);
-}
-
-static void
-OpenFileAction (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    if (current_file_name[0])
-       strcpy (fileBuf, current_file_name);
-    else
-       fileBuf[0] = '\0';
-    MakePrompt (toplevel, "File to open:", NewFile, fileBuf);
-}
-
-/*ARGSUSED*/
-static void
-RevisitFile (entry, name, data)
-    Widget  entry;
-    XtPointer name, data;
-{
-    RevisitFileAction (entry, NULL, NULL, NULL);
-    ResetMenuEntry (entry);
-}
-
-static void
-RevisitFileAction (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    if (current_file_name[0])
-       VisitFile (current_file_name, FALSE);
-}
-
-/*ARGSUSED*/
-static void
-Quit (entry, closure, data)
-    Widget  entry;
-    XtPointer closure, data;
-{
-    QuitAction (entry, NULL, NULL, NULL);
-}
-
-static void
-QuitAction (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-    exit (0);
-}
-
-Widget promptShell, promptDialog;
-void   (*promptfunction)(char *);
-
-/* ARGSUSED */
-static
-void CancelAction (widget, event, params, num_params)
-    Widget     widget;
-    XEvent     *event;
-    String     *params;
-    Cardinal   *num_params;
-{
-    if (promptShell) {
-       XtSetKeyboardFocus(toplevel, (Widget) None);
-       XtDestroyWidget(promptShell);
-       promptShell = (Widget) 0;
-    }
-}
-
-
-/* ARGSUSED */
-static
-void AcceptAction (widget, event, params, num_params)
-    Widget     widget;
-    XEvent     *event;
-    String     *params;
-    Cardinal   *num_params;
-{
-    (*promptfunction)(XawDialogGetValueString(promptDialog));
-    CancelAction (widget, event, params, num_params);
-}
-
-static
-void Noop (Widget w, XEvent *xev, String *s, Cardinal *c)
-{
-}
-
-static void
-MakePrompt(centerw, prompt, func, def)
-Widget centerw;
-char *prompt;
-void (*func)(char *);
-char   *def;
-{
-    static Arg dialogArgs[] = {
-       {XtNlabel, (XtArgVal) 0},
-       {XtNvalue, (XtArgVal) 0},
-    };
-    Arg valueArgs[1];
-    Arg centerArgs[2];
-    Position   source_x, source_y;
-    Position   dest_x, dest_y;
-    Dimension center_width, center_height;
-    Dimension prompt_width, prompt_height;
-    Widget  valueWidget;
-    
-    CancelAction ((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0);
-    promptShell = XtCreatePopupShell ("promptShell", transientShellWidgetClass,
-                                     toplevel, NULL, (Cardinal) 0);
-    dialogArgs[0].value = (XtArgVal)prompt;
-    dialogArgs[1].value = (XtArgVal)def;
-    promptDialog = XtCreateManagedWidget( "promptDialog", dialogWidgetClass,
-                   promptShell, dialogArgs, XtNumber (dialogArgs));
-    XawDialogAddButton(promptDialog, "accept", NULL, NULL);
-    XawDialogAddButton(promptDialog, "cancel", NULL, NULL);
-    valueWidget = XtNameToWidget (promptDialog, "value");
-    if (valueWidget) {
-       XtSetArg (valueArgs[0], XtNresizable, TRUE);
-       XtSetValues (valueWidget, valueArgs, 1);
-       /*
-        * as resizable isn't set until just above, the
-        * default value will be displayed incorrectly.
-        * rectify the situation by resetting the values
-        */
-        XtSetValues (promptDialog, dialogArgs, XtNumber (dialogArgs));
-    }
-    XtSetKeyboardFocus (promptDialog, valueWidget);
-    XtSetKeyboardFocus (toplevel, valueWidget);
-    XtRealizeWidget (promptShell);
-    /*
-     * place the widget in the center of the "parent"
-     */
-    XtSetArg (centerArgs[0], XtNwidth, &center_width);
-    XtSetArg (centerArgs[1], XtNheight, &center_height);
-    XtGetValues (centerw, centerArgs, 2);
-    XtSetArg (centerArgs[0], XtNwidth, &prompt_width);
-    XtSetArg (centerArgs[1], XtNheight, &prompt_height);
-    XtGetValues (promptShell, centerArgs, 2);
-    source_x = (int)(center_width - prompt_width) / 2;
-    source_y = (int)(center_height - prompt_height) / 3;
-    XtTranslateCoords (centerw, source_x, source_y, &dest_x, &dest_y);
-    XtSetArg (centerArgs[0], XtNx, dest_x);
-    XtSetArg (centerArgs[1], XtNy, dest_y);
-    XtSetValues (promptShell, centerArgs, 2);
-    XtMapWidget(promptShell);
-    promptfunction = func;
-}
diff --git a/xditview/xditview.man b/xditview/xditview.man
deleted file mode 100644 (file)
index c75c8a8..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-.\" $XConsortium: xditview.man,v 1.10 94/04/17 20:43:37 gildea Exp $
-.\"
-.\" $XFree86: xc/programs/xditview/xditview.man,v 1.4 2003/03/19 01:49:28 dawes Exp $
-.\"
-.TH XDITVIEW 1 __xorgversion__
-.SH NAME
-xditview \- display ditroff output
-.SH SYNOPSIS
-.B xditview
-[ \-\fItoolkitoption\fP .\|.\|. ] [ \-\fIoption\fP .\|.\|. ] [ \fIfilename\fP ]
-.SH DESCRIPTION
-The
-.I xditview 
-program displays
-.I ditroff
-output on an X display.  It uses no special
-metrics and automatically converts the printer coordinates into screen
-coordinates; using the user-specified screen resolution, rather than the
-actual resolution so that the appropriate fonts can be found.  If
-``\fB\-\fP'' is given as the
-.I filename,
-.I xditview
-reads from standard input.
-If ``\fB|\fP'' is the first character of
-.I filename,
-.I xditview
-forks
-.I sh
-to run the rest of the ``file name'' and uses the
-standard output of that command.
-.SH OPTIONS
-.I Xditview
-accepts all of the standard X Toolkit command line options along with the 
-additional options listed below:
-.TP 8
-.B \-page \fIpage-number\fP
-This option specifies the page number of the document to be displayed at
-start up time.
-.TP 8
-.B \-resolution \fIscreen-resolution\fP
-This specifies the desired screen resolution to use; fonts will be opened by
-requesting this resolution field in the XLFD names.
-.TP 8
-.B \-noPolyText
-Some X servers incorrectly implement PolyText with multiple strings
-per request.  This option suppresses the use of this feature in
-.I xditview.
-.TP 8
-.B \-backingStore \fIbacking-store-type\fP
-Redisplay can take up to a second or so; this option causes
-the server to save the window contents so that when it is scrolled around the
-viewport, the window is painted from contents saved in backing store. 
-\fIbacking-store-type\fP can be one of \fBAlways\fP, \fPWhenMapped\fP or
-\fPNotUseful\fP.
-.PP
-The following standard X Toolkit command line arguments are commonly used with 
-.I xditview:
-.TP 8
-.B \-bg \fIcolor\fP
-This option specifies the color to use for the background of the window.  
-The default is \fIwhite\fP.
-.TP 8
-.B \-bd \fIcolor\fP
-This option specifies the color to use for the border of the window.
-The default is \fIblack\fP.
-.TP 8
-.B \-bw \fInumber\fP
-This option specifies the width in pixels of the border surrounding the window.
-.TP 8
-.B \-fg \fIcolor\fP
-This option specifies the color to use for displaying text.  The default is 
-\fIblack\fP.
-.TP 8
-.B \-fn \fIfont\fP
-This option specifies the font to be used for displaying widget text.  The
-default is \fIfixed\fP.
-.TP 8
-.B \-rv
-This option indicates that reverse video should be simulated by swapping
-the foreground and background colors.
-.TP 8
-.B \-geometry \fIgeometry\fP
-This option specifies the preferred size and position of the window.
-.TP 8
-.B \-display \fIhost\fP:\fIdisplay\fP
-This option specifies the X server to contact.
-.TP 8
-.B \-xrm \fIresourcestring\fP
-This option specifies a resource string to be used.
-.SH X DEFAULTS
-This program uses a
-.I Dvi
-widget.  It understands all of the core resource names and
-classes as well as:
-.PP
-.TP 8
-.B width (\fPclass\fB Width)
-Specifies the width of the window.
-.TP 8
-.B height (\fPclass\fB Height)
-Specifies the height of the window.
-.TP 8
-.B foreground (\fPclass\fB Foreground)
-Specifies the default foreground color.
-.TP 8
-.B font (\fPclass\fB Font)
-Specifies the font to be used for error messages.
-.TP 8
-.B FontMap (\fBclass\fB FontMap)
-To associate the
-.I ditroff
-fonts with appropriate X fonts, this string
-resource contains a set of new-line separated specifications, each of which
-consists of a ditroff name, some white space and an XLFD pattern with *
-characters in appropriate places to allow all sizes to be listed.  The
-default fontMap is:
-.nf
-.sp
-R      \-*\-times\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-I      \-*\-times\-medium\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-B      \-*\-times\-bold\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-F      \-*\-times\-bold\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-BI     \-*\-times\-bold\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-C      \-*\-courier\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-CO     \-*\-courier\-medium\-o\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-CB     \-*\-courier\-bold\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-CF     \-*\-courier\-bold\-o\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-H      \-*\-helvetica\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-HO     \-*\-helvetica\-medium\-o\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-HB     \-*\-helvetica\-bold\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-HF     \-*\-helvetica\-bold\-o\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-N      \-*\-new century schoolbook\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-NI     \-*\-new century schoolbook\-medium\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-NB     \-*\-new century schoolbook\-bold\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-NF     \-*\-new century schoolbook\-bold\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-A      \-*\-charter\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-AI     \-*\-charter\-medium\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-AB     \-*\-charter\-bold\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-AF     \-*\-charter\-bold\-i\-normal\-\^\-*\-*\-*\-*\-*\-*\-iso8859\-1\en\e
-S      \-*\-symbol\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-adobe\-fontspecific\en\e
-S2     \-*\-symbol\-medium\-r\-normal\-\^\-*\-*\-*\-*\-*\-*\-adobe\-fontspecific\en
-.sp
-.fi
-.SH "USING XDITVIEW WITH DITROFF"
-.PP
-You can use any ditroff output file with
-.I xditview,
-although files which use
-the fonts appropriate to the fontMap will look more accurate on the screen.
-On servers which support scaled fonts, all requested font sizes will be
-accurately reflected on the screen; for servers which do not support scaled
-.I xditview
-will use the closest font from the same family.
-.SH "SEE ALSO"
-.IR X (__miscmansuffix__),
-.IR xrdb (1),
-.IR ditroff (1),
-.I "X Logical Font Description Conventions"
-.SH ORIGIN
-Portions of this program originated in
-.I xtroff which was derived
-from
-.I suntroff.  
-.SH COPYRIGHT
-Copyright 1994 X Consortium
-.br
-See \fIX\fP(1) for a full statement of rights and permissions.
-.SH AUTHORS
-Keith Packard (MIT X Consortium)
-.br
-Richard L. Hyde (Purdue)
-.br
-David Slattengren (Berkeley)
-.br
-Malcom Slaney (Schlumberger Palo Alto Research)
-.br
-Mark Moraes (University of Toronto)
diff --git a/xedit/AUTHORS b/xedit/AUTHORS
deleted file mode 100644 (file)
index 65e5b4c..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-(Original author based on manpage)
-Chris D. Peterson, MIT X Consortium
-commands.c
-util.c
-xedit.c
-xedit.h
-
-
-------------------------------------------------------------------------
-Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-xedit:
-hook.c
-hash.c
-ispell.c
-lisp.c
-options.c
-tags.c
-util.h
-
-xedit lisp interface:
-lisp/bytecode.c
-lisp/bytecode.h
-lisp/compile.c
-lisp/core.c
-lisp/core.h
-lisp/debugger.c
-lisp/debugger.h
-lisp/format.c
-lisp/format.h
-lisp/internal.h
-lisp/io.c
-lisp/io.h
-lisp/hash.c
-lisp/hash.h
-lisp/helper.c
-lisp/helper.h
-lisp/lisp.c
-lisp/lisp.h
-lisp/math.c
-lisp/math.h
-lisp/mathimp.c
-lisp/package.c
-lisp/package.h
-lisp/pathname.c
-lisp/pathname.h
-lisp/private.h
-lisp/read.c
-lisp/read.h
-lisp/regex.c
-lisp/regex.h
-lisp/require.c
-lisp/require.h
-lisp/stream.c
-lisp/stream.h
-lisp/string.c
-lisp/string.h
-lisp/struct.c
-lisp/struct.h
-lisp/time.c
-lisp/time.h
-lisp/write.c
-lisp/write.h
-lisp/xedit.c
-lisp/xedit.h
-
-bignum math library:
-lisp/mp/mp.h
-lisp/mp/mpr.c
-lisp/mp/mpi.c
-lisp/mp/mp.c
-
-command line lisp interpreter:
-lisp/lsp.c
-
-regex library:
-lisp/re/re.c
-lisp/re/re.h
-lisp/re/reo.c
-lisp/re/rep.h
-lisp/re/rec.c
-lisp/re/tests.c
-lisp/re/tests.txt
-
-source files to test the lisp interpreter:
-lisp/test/widgets.lsp
-lisp/test/list.lsp
-lisp/test/hello.lsp
-lisp/test/regex.lsp
-lisp/test/stream.lsp
-lisp/test/math.lsp
-
-lisp binary modules:
-lisp/modules/psql.c
-lisp/modules/x11.c
-lisp/modules/xaw.c
-lisp/modules/xt.c
-
-lisp source modules:
-lisp/modules/indent.lsp
-lisp/modules/lisp.lsp
-lisp/modules/syntax.lsp
-lisp/modules/xedit.lsp
-
-lisp syntax highlight and indentation rules definitions:
-lisp/modules/progmodes/c.lsp
-lisp/modules/progmodes/html.lsp
-lisp/modules/progmodes/imake.lsp
-lisp/modules/progmodes/lisp.lsp
-lisp/modules/progmodes/make.lsp
-lisp/modules/progmodes/man.lsp
-lisp/modules/progmodes/patch.lsp
-lisp/modules/progmodes/rpm.lsp
-lisp/modules/progmodes/sgml.lsp
-lisp/modules/progmodes/sh.lsp
-lisp/modules/progmodes/xconf.lsp
-lisp/modules/progmodes/xlog.lsp
-lisp/modules/progmodes/xrdb.lsp
-
-
-------------------------------------------------------------------------
-Files required when compiling with xprint support:
-
-(Based on Copyright notice)
-Roland Mainz <roland.mainz@nrubsig.org>
-xedit:
-print.c
-print.h
-printdialog.c
-printdialog.h
-printdialogprivates.h
-
-
-------------------------------------------------------------------------
-Files required for systems that don't have the required calls in the
-standard libraries:
-
-(Based on Copyright notice)
-Jan-Simon Pendry
-realpath.c
-
-(No author information, using CVS tag)
-David Dawes <dawes@XFree86.Org>
-strcasecmp.c
diff --git a/xedit/COPYING b/xedit/COPYING
deleted file mode 100644 (file)
index 4e83706..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-
-Copyright (c) 1987, 1993
-     The Regents of the University of California.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement:
-     This product includes software developed by the University of
-     California, Berkeley and its contributors.
-4. Neither the name of the University nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-
-
-
-
-Copyright (c) 1994
-       The Regents of the University of California.  All rights reserved.
-
-This code is derived from software contributed to Berkeley by
-Jan-Simon Pendry.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement:
-       This product includes software developed by the University of
-       California, Berkeley and its contributors.
-4. Neither the name of the University nor the names of its contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-
-
-
-
-                         COPYRIGHT 1987
-                  DIGITAL EQUIPMENT CORPORATION
-                      MAYNARD, MASSACHUSETTS
-                       ALL RIGHTS RESERVED.
-
-THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
-SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
-DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
-ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
-
-IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
-APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
-SET FORTH ABOVE.
-
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided
-that the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Digital Equipment Corporation not be
-used in advertising or publicity pertaining to distribution of the software
-without specific, written prior permission.
-
-
-
-
-
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-
-
-
-Copyright (c) 1999-2002 by The XFree86 Project, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-Except as contained in this notice, the name of the XFree86 Project shall
-not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from the
-XFree86 Project.
-
-
-
-
-
-Copyright (c) 2007 Paulo Cesar Pereira de Andrade
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/xedit/ChangeLog b/xedit/ChangeLog
deleted file mode 100644 (file)
index da4f7e8..0000000
+++ /dev/null
@@ -1,796 +0,0 @@
-commit 0d133999449ce7c5db19d46680430ab16e81e4fd
-Author: Peter Breitenlohner <peb@mppmu.mpg.de>
-Date:   Thu Nov 6 21:19:56 2008 +0100
-
-    enabled VPATH build
-
-commit f5edc6424b6553d58e271f64471cef32e063dd19
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Wed Oct 8 19:21:28 2008 -0300
-
-    Rewrite double click confirmation code.
-    
-      Remove the double_click global boolean, and change dc_state to a bit
-    field, instead of a single state variable.
-      The old code was the xedit original code with minimal changes, but was
-    a bit confusing when two confirmations would be required.
-      Also, this patch moves the check for file overwriting before
-    MaybeCreateFile() as it can actually call creat(), what means that it
-    can no longer ask for confirmations, as the file has been just backed up,
-    and a zero sized one created.
-
-commit d96491aad5542f052b722b94d86f0ce7661ae98b
-Merge: cc7cb04... f1efec7...
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Fri Sep 26 17:47:32 2008 -0300
-
-    Merge branch 'master' of ssh://pcpa@git.freedesktop.org/git/xorg/app/xedit
-
-commit cc7cb041c4144f1401fd520f05018028c0e0c87e
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Fri Sep 26 17:34:50 2008 -0300
-
-    Proper implementation of AddDoubleClickCallback
-    
-      I tracked it down to
-    http://cvsweb.xfree86.org/cvsweb/xc/programs/xedit/commands.c?rev=1.5&content-type=text/vnd.viewcvs-markup
-    After my patches to libXaw. Instead of checking for
-    "if (XtIsSubclass(w, asciiSrcObjectClass)) {" it should really
-    do something like "if (isXaw7orNewer) {". But I believe only XFree86
-    and Xorg versions of Xaw have the XawVersion macro in XawInit.h...
-    
-      This corrects the problem described in
-    http://bugs.freedesktop.org/show_bug.cgi?id=17726
-    
-      And the main reason is that xedit always default'ed to use a 8 bits
-    iso8859-x locale, while in Xorg it was modified to use multibyte by
-    default.
-
-commit f1efec76814500a14acf7c64184ebef1a28e264d
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Mon Aug 4 13:22:52 2008 -0700
-
-    Fixed filename conflict during compilation on case-insensitive file systems.
-
-commit dc857b78c00432de6d57124ca2e060ef0a76684f
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Thu Jul 31 14:17:17 2008 -0300
-
-    Correct make dist and update to xedit-1.1.1.
-
-commit bc470a831ee3c8d5aa254661122187048f245c92
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Wed Jul 30 18:52:32 2008 -0300
-
-    Update to xedit 1.1.0.
-
-commit fb6c60031936bdaaeb808fb61b3073bdb058607a
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Thu Jul 10 16:38:09 2008 -0300
-
-      Update file type pattern matching.
-    
-      Consider a file ending in .l a lisp source file.
-      Allow an arbitrary number of bytes following the filename for xconf
-    and xlog modes.
-      Don't use make mode for "Imakefile". Require a slash before [Mm]akefile.*.
-
-commit ed21e75c45e92c4c52f80bdb5fba0e17f5afaca1
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Jul 8 18:53:50 2008 -0300
-
-      CancelFindFile is almost the same as XeditFocus, and could be merged in a
-    same Xt action. For the moment, automatically leave line_edit in XeditFocus.
-    
-      There is one other bug that should be fixed, that I am trying to repeat
-    (having the same file loaded twice when using tags) before a new release.
-    
-      Thre is also a problem in Xaw when deleting large amounts of selections
-    that crashes xedit, aparently due to Xaw Text widget doing some wrong math
-    and attempting to allocate a huge chunk of memory.
-
-commit c23ce2ff2439f09d00dc2c226562d44f02ca591a
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Sat May 10 21:38:23 2008 -0300
-
-    Fix an off by one error check that can lead to an infinite loop.
-    
-      This can happen when using the line edit mode to search&replace regexes.
-
-commit 2b4ebe868b660a69800dc5fe801bbcc05ccaefac
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Sat May 10 21:36:36 2008 -0300
-
-    Warn if a newer version of a file exists before overwritting it.
-
-commit 0b8304c49ab2958bc2b4ef7286467a71faa38f41
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Sat Apr 12 17:43:04 2008 -0300
-
-    Add python mode.
-    
-      This mode adds syntax highlight and automatic indentation.
-      Unlike most other modes with automatic indentation, this mode most
-    only reads one line back to figure the proper indentation.
-      Some features include:
-    o When the first character in a line is typped, it automatically
-      moves it to the proper tab stop.
-    o Increments one indentation level if line ends in ':'.
-    o Properly handle vector/hash table declarations.
-
-commit 614563884d2b19e514af233089e392127c4f4027
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Sun Mar 16 20:51:25 2008 -0300
-
-    Compile warning fixes.
-    
-      Add parenthesis around a test where after macro expansion it looked like
-    boolexpr==boolres==boolres.
-      "Ansifiy" a function without arguments.
-
-commit 60643e8f0dcd86e65400160c0a6e264e7a2a081c
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 22:28:04 2008 -0300
-
-    Support multiple make jobs.
-    
-      Minor patch to avoid requiring xedit to have some special rule in a
-    buildsystem that defaults to something like "make -j 16".
-
-commit ee636f8565931f8d897b6c8c07eb08d41695778c
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:52:58 2008 -0300
-
-    Fix an incorrect buffer size calculation and allocation.
-
-commit 5bd8082a9788a1b5343eb03400944a03e4250577
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Wed Mar 12 21:59:34 2008 -0300
-
-    Add perl and "auto tools" modes.
-    
-      Auto mode has only syntax highlight mode; needs some tweaking to
-    ignore "'" characters where they are allowed, i.e. usually descriptions.
-      Perl mode has syntax highlight and indentation support. May need
-    some tweaking for some files where it may parse back too much lines before
-    assuming the indentation is correct.
-
-commit a17bf690a8f80f252c3a831c79d6e8d11ce8d66c
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:51:57 2008 -0300
-
-    Add support for scrolling textwindow with mouse wheel.
-
-commit b1dd01f67a48785678209b90c1b0e4f44621c146
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Wed Mar 12 21:53:48 2008 -0300
-
-    Add a tags interface to xedit.
-    
-      To use the tags, first create a tags file with a command like "ctags -R".
-      The interface can be disabled with resources, see the updated man page.
-      Tag files are searched descending to the root directory.
-      Multiple tags files are properly handled, and multiple symbol definitions
-    can be searched.
-
-commit 3468f9f2cb65294771e1095a14b7263ae0a6a043
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:50:13 2008 -0300
-
-    Update syntax highlight table and some minor tweaks including:
-    
-    o Don't cause an warning due to an unused variable after macro expansion
-      in some indentation tables.
-    o Properly handle c++ style comments in preprocessor lines. Also highlight
-      strings and character constants.
-    o Change color of "quote" property in lisp mode. This is mainly due to
-      an undesirable side effect of using the same XrmQuark in different
-      syntax highlight definitions, causing the first one to be used, and
-      later defined ones to be ignored.
-
-commit 371c42ab955357d586cf4501762f6e9cf1be53b8
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:49:14 2008 -0300
-
-    Add support to enter line number in command line.
-    
-    This works the same way as for vi, i.e. "xedit file +num" will load
-    file and move cursor to line "num".
-
-commit cb30367f10f2e38065d336d331afdc50900de76d
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:48:58 2008 -0300
-
-    Generic lisp interface bug fixes including:
-    
-    o Allow calling disassemble in all function types
-    o Don't limit amount of bytes to generate a hash table
-    o Allow "unreadable" symbol names to be keywords
-
-commit 953664369cc66ba17c7b9c1939fd9d7f6c6137ad
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:48:39 2008 -0300
-
-    Fix several problems in the line edit mode.
-    
-    Also allow replacing control characters in the replace pattern as well
-    as nul characters.
-
-commit a2c47d3487aaf4667926195ba3f5b05b94626daf
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:46:58 2008 -0300
-
-    Fix several generic bugs including:
-    
-    o Several memory read/write errors.
-    o Implement smarter XeditPrintf that will show how many times a text
-      has been printed.
-    o Check all arguments to XeditPrintf to ensure the '%' character cannot
-      be sent to it.
-    o Some minor reindentation to code that still had the original 2 spaces
-      indentation.
-
-commit a1949714b99a502a57b3dd7a99e619c10211d9fc
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:46:38 2008 -0300
-
-    Make ispell interface work correctly again.
-    
-    This new interface should work properly with asciiSrc and multiSrc widgets,
-    i.e. single byte and multibyte.
-    Also added an empty dictionary entry that is understood by aspell as the
-    "default" dictionary.
-    Code is also more robust to detect aspell exiting too early.
-
-commit f1d58be104f4020ef718a542d7f5ca72cd1f531b
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:44:25 2008 -0300
-
-    Readd support for *international resource and default to false.
-    
-    This allows several features, like syntax highlight and indentation,
-    turned off to be enabled again.
-
-commit 7d5dbf4a19ec6bbd36784f5d7307629b69dda873
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Wed Mar 12 21:52:30 2008 -0300
-
-    Add a generic hash table interface to replace the other implementations.
-
-commit 2f7992eaefb19f23c127e15624ba38208c03439b
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:43:04 2008 -0300
-
-    Update build for sane defaults.
-    
-    Check for existing system functions.
-    Don't add test program sources with main functions to libraries.
-    Build test programs.
-
-commit 19e3f51f9758e2708fb4abfa364b346591089bcd
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Mar 11 21:41:45 2008 -0300
-
-    Add updated/meaningful README, COPYING and AUTHORS files.
-
-commit 618a07e8131f49bbda77d2cfe5832218a561a5c8
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Jul 1 18:17:44 2008 -0300
-
-    Fix a bug in the regex library
-    
-    The bug causes the regex parser to enter an infinite loop with certain
-    special patterns with alternatives. Test cases also added to ensure
-    the bug will be triggered by the tests if it is somehow reinstantiated.
-    
-    Also testing commit to xedit git repository.
-
-commit 946b5b745d9d326799a23f7210b799e1b690643d
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Dec 6 16:37:12 2007 -0500
-
-    Replace static ChangeLog with dist-hook to generate from git log
-
-commit dd27b05c49b6e747203c83a96ca812993b2a2def
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Mon Sep 3 05:51:19 2007 -0400
-
-    Add *~ to .gitignore to skip patch/emacs droppings
-
-commit e582ba82e04632157c8a7ead56b62da7ba0eddfe
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Aug 23 19:24:44 2007 -0400
-
-    Rename .cvsignore to .gitignore
-
-commit baafaa1dee42640d15f4e74ff43b0ee3343de940
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Apr 26 23:39:19 2006 +0000
-
-    Bump to 1.0.2
-
-commit 86e42e7030394b58d9b16eddd9ccc90efa3a11b2
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Apr 3 19:42:16 2006 +0000
-
-    Bug #6480: Cygwin build fix. (Yaakov Selkowitz)
-
-commit beae4e7a8875dfe3bdae54bd3f48b922a8f8a3c1
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:49 2005 +0000
-
-    Update package version for X11R7 release.
-
-commit ac432c05b782f4d97943de23b97d4b3878e8fe02
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:43 2005 +0000
-
-    Stub COPYING files
-
-commit 814ad517c4de7dfecbc51636e00a62289af45a8f
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:06 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit e70ce0696695b7e6d627d046c19c3b6c9a8ce3da
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 7 16:17:59 2005 +0000
-
-    Change to use the app-defaults default dir configured in libXt.
-
-commit 6090b669a399c4663517b845d76945c6c2f97ef9
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:48:21 2005 +0000
-
-    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-commit 2abc4c46f8d89aa95262db207f7796ee4ee2e2ea
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:49:19 2005 +0000
-
-    Update package version number for X11R7 RC3 release.
-
-commit 83a772ee412acc4cea221e1eb416dfb641f074ed
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:41 2005 +0000
-
-    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
-        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
-
-commit 08e9327b251c7bebf85befe0c927ed82183ac874
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:35:00 2005 +0000
-
-    Another pass at .cvsignores for apps.
-
-commit e63cf486fac692f01a5717da970eaee2b711acec
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:52 2005 +0000
-
-    Add/improve .cvsignore files for apps.
-
-commit 312e176e35cb16b7ea2ab4ea706132786a4aa511
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sun Nov 20 04:13:45 2005 +0000
-
-    Add dependency on xp module when building with Xprint support.
-
-commit cd2d0c1372d85eba2c097c652004f97eb0821cd1
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Nov 9 21:09:20 2005 +0000
-
-    Update package version number for X11R7 RC2 release.
-
-commit 0d4e6039465c3ecadaf76c0558ecc77931c0aa54
-Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
-Date:   Fri Oct 28 15:45:02 2005 +0000
-
-    build fix
-
-commit 4f20443995b7e8b90058be829bbbbad8f5f8c935
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Sun Oct 23 20:03:47 2005 +0000
-
-    Bug #1860: Prevent walking off the end of the scan_types array.
-
-commit 83ba7062d74bb228ba9daddd1f4524dee905d4f2
-Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
-Date:   Fri Oct 21 08:18:25 2005 +0000
-
-    remove redundant include
-
-commit d9db7305c78e1b93c9b15f73356b8afd5cb26709
-Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
-Date:   Thu Oct 20 18:24:27 2005 +0000
-
-    programs/xedit/xedit.h
-    //bugs.freedesktop.org/show_bug.cgi?id=790)
-
-commit 54c3139890ae810b4c18eed15c82303917bcb2b9
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:53 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit 3dbe6f823ce929fee91555933312c2ad81c6f371
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Oct 18 00:32:55 2005 +0000
-
-    Change default install dir for app-default files from
-        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
-        the monolith & allow localization
-
-commit cd4bfca48225f3eb78095f4437be8667c9dde5a6
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:22 2005 +0000
-
-    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
-        work better with BSD make
-
-commit 636d350681f43816c658e09704242e0cad31de56
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sun Oct 16 06:06:57 2005 +0000
-
-    Change man sources from xedit.1 to xedit.man to allow the man page to be
-        processed. Move man page to top level dir to pass check-tarball test.
-
-commit 47709c7118e6280221931189019a3fab1bfdc691
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:44 2005 +0000
-
-    Use sed to fill in variables in man page
-
-commit 1c94f8dbcfcf16a01e792942632d0a89df6d0768
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 5 03:27:56 2005 +0000
-
-    Add missing files to EXTRA_DIST
-
-commit ebd7eea10cf5add145b0428e953fce3691b8423a
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Sep 28 03:04:23 2005 +0000
-
-    Don't override , automake predefines it.
-
-commit dad8235ff737556e2eaa645a5d7b48641eba270a
-Author: Kristian Høgsberg <krh@redhat.com>
-Date:   Tue Sep 27 20:20:36 2005 +0000
-
-    Only add -DINCLUDE_XPRINT_SUPPORT if the Xaw version supports it.
-
-commit bc2182af2f8d9455f9caeb686b71cae4ff1bc0bc
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sun Aug 28 17:58:39 2005 +0000
-
-    Install the lisp files.
-
-commit d0691d15ae7cf68c8a617322a2a4a77d36c704d1
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:32 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit aebfa8db8c0069d4474841414012b7f19ec14d53
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sat Jul 23 16:12:58 2005 +0000
-
-    Fix DEP_* reference
-
-commit d9d6a51c74d055e93b2fb8450ef9de162e35945f
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sat Jul 23 16:12:33 2005 +0000
-
-    - fix DEP_* references
-    - fix GNU-make only rule for app-defaults
-
-commit 0842c698bd90b2f47d808d47b37912a7a0e3ba78
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Jul 20 19:31:52 2005 +0000
-
-    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
-        configure cache, you cache it, and the cached value is probably wrong.
-
-commit c46761f286f8c9a41ee0e510211b5ed667a78479
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Tue Jul 12 18:45:46 2005 +0000
-
-    - lib/lbxutil/lbxutil.pc.in: link to lbxutil, not Xfixes
-    - symlink.sh: add xedit.h, add xedit/lis/mp directory, add xfs
-    - xc/programs/xedit: include "lisp/../xedit.h" instead of xedit/xedit.h
-    - Change include of "foo.h" to <X11/.../foo.h> in various places in
-        xc/programs/lbxproxy and xc/programs/xfs
-    - add build system for xfs
-    - add forgotten lbxproxytrans.c file
-
-commit fc1f512d7cd7876f79190511315fe219667b2e81
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Tue Jul 12 17:41:52 2005 +0000
-
-    Build system for xprint
-
-commit 6bc36c6c67fed984af4f60224a7ea693d1b7d217
-Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
-Date:   Wed Apr 20 16:18:03 2005 +0000
-
-    Move variable declaration to top. Makes gcc2 happy.
-
-commit 33c2d047571cd4ebce2eb630515fc33aa3f05b98
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Mon Apr 11 01:06:15 2005 +0000
-
-    xc/programs/Xserver/Xprint/attributes.c
-    xc/programs/glxgears/glxgears.c
-    xc/programs/xdbedizzy/xdbedizzy.c
-    xc/programs/xedit/Imakefile
-    xc/programs/xedit/Xedit-xprint.ad
-    xc/programs/xedit/util.c
-    xc/programs/xedit/xedit.h
-    xc/programs/xlogo/print.c
-    xc/programs/xlogo/xlogo.c
-    xc/programs/xlogo/xlogo.h
-    xc/programs/xman/Imakefile
-    xc/programs/xman/print.h
-    xc/programs/xmore/Imakefile
-    xc/programs/xmore/print.c
-    xc/programs/xmore/print.h
-    xc/programs/xmore/printdialog.c
-    xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
-    xc/programs/xphelloworld/xphelloworld/xphelloworld.c
-    xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c
-    xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c
-    //bugs.freedesktop.org/show_bug.cgi?id=790) attachment #2379
-        (https://bugs.freedesktop.org/attachment.cgi?id=2379) Implement support
-        client+Xserver support for passing output (stdout+stderr) of the
-        spooler command started by the Xprint server back to the application
-        using the "xp-spooler-command-results" XPJobAttr attribute
-        (applications can fetch the attribute value after the XPEndJobNotify
-        event was received; more details can be found in
-        http://xprint.mozdev.org/docs/dtprint_fspec.ps).
-
-commit bd31ddba0725738848be8298a7b1dd691c103fa3
-Author: Egbert Eich <eich@suse.de>
-Date:   Mon Apr 4 10:17:07 2005 +0000
-
-    Fixed sentinels in Xt, editres and xedit to reduce number of warnings with
-        gcc4 (Andreas Schwab).
-
-commit dfb0b2dac20f575a7be260895f2847daeeacb819
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Mon Jan 3 01:06:36 2005 +0000
-
-    xc/lib/XprintAppUtil/xpapputil.c
-    xc/lib/XprintAppUtil/xpapputil.h
-    xc/lib/XprintUtil/xprintutil.c
-    xc/lib/XprintUtil/xprintutil.h
-    xc/programs/glxgears/glxgears.c
-    xc/programs/xdbedizzy/xdbedizzy.c
-    xc/programs/xedit/Xedit-xprint.ad
-    xc/programs/xedit/commands.c
-    xc/programs/xlogo/print.c
-    xc/programs/xlsfonts/xlsfonts.c
-    xc/programs/xlsfonts/xlsfonts.man
-    xc/programs/xlsfonts/xlsfonts.sgml
-    xc/programs/xman/Xman-xprint.ad
-    xc/programs/xman/handler.c
-    xc/programs/xman/print.c
-    xc/programs/xman/print.h
-    xc/programs/xmore/XMore.ad
-    xc/programs/xmore/print.c
-    xc/programs/xmore/print.h
-    xc/programs/xmore/printdialog.c
-    xc/programs/xmore/printdialog.h
-    xc/programs/xmore/printdialogprivates.h
-    xc/programs/xmore/xmore.c
-    xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
-    xc/programs/xphelloworld/xphelloworld/xphelloworld.c
-    xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c
-    xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c
-    xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.c
-    xc/programs/xplsprinters/xplsprinters.c
-    //bugs.freedesktop.org/show_bug.cgi?id=1706) attachment #1615
-        (https://bugs.freedesktop.org/attachment.cgi?id=1615): XprintUtils
-        2004/Q3 update. This adds various new features to the XprintUtils
-        library including support for page resolutions where
-        X_resolution!=Y_resolution, listfonts-mode control and initial
-        framework for the COLORSPACE extension. Patch by Roland Mainz
-        <roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>.
-
-commit 5581ed55c6918f69786d63e9a401f9d8b33a66d2
-Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
-Date:   Sat Dec 4 00:43:16 2004 +0000
-
-    Encoding of numerous files changed to UTF-8
-
-commit 4d6b4556b8517ac36d6f87837dfb936872581b12
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Tue Oct 12 22:46:40 2004 +0000
-
-    Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1601 - Fix
-        problems with wrong page counts in xedit&co. when a global "*geometry"
-        resource was overriding the internal geometry management used by
-        XawPrintShell(=usually adjust to current page size, the resource was
-        turning this into a static value). (Original patch by Felix Schulte
-        <felix.schulte@gmail.com>)
-
-commit 98e553431586c07fe0534c01c0a6e1b15ddc8958
-Author: Egbert Eich <eich@suse.de>
-Date:   Tue Sep 21 17:57:40 2004 +0000
-
-    Merged over libXpm security fix provided by Chris Evans, Matthieu Herrb and
-        Alan Coopersmith from release 6.8.1.
-    Fail during initialization with error if font/fontset is not set for
-        widget. This prevents a sig11 later when the non-existent font/fontset
-        structs are referenced.
-    Check if xf86Info.kbdProc pointer is really set before calling it on abort
-        as this pointer won't be set if the new modular keyboard driver is used
-        (Matthias Hopf).
-    Added new libs to the bindist control files.
-    Removed inclusion of unnecessary kernel header on Linux. This may fail in
-        an -ansi environment.
-
-commit 3981cffbb6f4f4fe4227481c51083063a9ea995e
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Sep 2 08:40:32 2004 +0000
-
-    Restore xman and xedit changes that were previously reverted, and make
-        Xprint support optional (Bug #1273, Roland Mainz).
-
-commit 6b12ddbb33c8722e50e7f69f456ba0ba72b76ddd
-Author: Kristian Høgsberg <krh@redhat.com>
-Date:   Mon Aug 16 16:36:16 2004 +0000
-
-    As discussed and agreed on on the release-wranglers meeting of August 16,
-        I'm committing the patch from bug #1060 to back out unconditional
-        Xprint functionality.
-    Back out Xprint changes.
-    Revert xman to CVS of June 5, revert xlogo to CVS of May 8, revert xedit to
-        CVS of April 25, to back out unconditional Xprint support.
-    Fix up Xprint config logic to be like the rest of the extensions:
-        BuildXprint is a one-stop option for disabling everything Xprint
-        related. XprtServer controls building Xprt, BuildXprintLib controls
-        building Xprint libs and BuildXprintClients controls building clients
-        related to Xprint. BuiltXprint defaults to YES and the other options
-        respects relevant settings, i.e. BuildServer and BuildServersOnly.
-    Build Xaw regardless of BuildXprintLib setting.
-    Only build xphelloworld, xplsprinters and xprehashprinterlist when
-        BuildXprintClients it YES. Disable building xmore, it has always
-        supported XawPrintShell.
-    Make Xprint support depend on BuildXprintLib.
-
-commit d980ac394b3f828ce3c03d5894218d712d7b2846
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Thu Jul 29 00:40:35 2004 +0000
-
-    Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=938 - Update
-        XawPrintShell per feedback and review comments.
-
-commit d88d25361d5c03e126f040d08c4e005494ca9bfe
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Tue Jun 8 02:44:35 2004 +0000
-
-    Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=668 - Add print
-        support to xman
-
-commit cf44083fa20c4f39a89a63ced16974c832039325
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Sun May 30 22:44:01 2004 +0000
-
-    Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=695 - Add print
-        support to Xedit
-
-commit 3b70888a54396c1b5ab67be863b189c7b8775695
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Sun May 30 00:52:30 2004 +0000
-
-    Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=693 - XMore and
-        XawPrintDialog work-in-progress, fixing various problems and adding
-        framework for i18n.
-
-commit aa3ab858ee6f5e51e0816dac708142bbcc38da5b
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Mon May 24 03:17:44 2004 +0000
-
-    Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=611 -
-        Adding simple text viewer (xmore)
-
-commit 5d7513ad1d0c061f97373b684d669ebf98d7867e
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu May 6 17:31:17 2004 +0000
-
-    BugZilla #601: Fixing makedepend choking on floating point exception
-        because CHAR_BIT is defined to __CHAR_BIT__ which is a compiler
-        intrinsic define. BugZilla #605: Fixing build on IA64 which is broken
-        due to the inclusion of the kernel header asm/page.h. Kernel headers
-        however don't work with
-    -ansi. The inclusion of asm/page.h can however savely be removed as it
-        there are plenty of other ways to determine the page size.
-
-commit 9f5d0de96f079e84c648a0173bffac8ec2c3bef5
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:46 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit 91547cc15f41faa1a55f2d764f67abd24777e9be
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:35:19 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit 8293776acb1b916f1f7199e975bae4d370668243
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:13:05 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit b7c2da33938e1091850181d827a9ef6f51575883
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:24 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit e502fd1629139ee9e5df1f0bdeb454710ab6adfa
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:24:06 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit dc1aded02ad02936526d5528b6504121cf86e1b1
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Mon Feb 23 20:35:39 2004 +0000
-
-    Import most of XFree86 4.4RC3. This import excludes files which have the
-        new license. If we want to, later we can import 4.4RC3 again and pick
-        up the files that have the new license, but for now the vendor branch
-        is "pure."
-
-commit 71331fcaaca36aadf8f4857526a4ca2162b71df4
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Jan 29 08:09:08 2004 +0000
-
-    Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
-
-commit 39a948f028c2e3cb3083d7d2f847acbd27facc23
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Dec 19 20:55:55 2003 +0000
-
-    XFree86 4.3.99.902 (RC 2)
-
-commit 54593d8ebb341f7c2a0321fbf4207d7848b44a7f
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Dec 19 20:55:55 2003 +0000
-
-    Initial revision
-
-commit 0912e16e368c939d60f7b1400a247c6e5f080ff6
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Thu Dec 4 22:03:48 2003 +0000
-
-    XFree86 4.3.99.901 (RC 1)
-
-commit 10dc4a2c37597e02c12a9df3e9dba02a73bfc11b
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:29:12 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit 8ae60bfe8a4b233100f5128859c76239e5789f70
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:22 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 0a193e032ba1ecf3f003e027e833dc9d274cb740
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:22 2003 +0000
-
-    Initial revision
diff --git a/xedit/INSTALL b/xedit/INSTALL
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xedit/Makefile.am b/xedit/Makefile.am
deleted file mode 100644 (file)
index 1a32798..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-bin_PROGRAMS = xedit
-noinst_LIBRARIES = liblisp.a libre.a libmp.a
-noinst_PROGRAMS = lisp/lsp lisp/re/tests
-
-#
-#    libmp.a
-#
-
-libmp_a_CFLAGS =
-libmp_a_SOURCES = \
-       lisp/mp/mp.c    \
-       lisp/mp/mp.h    \
-       lisp/mp/mpi.c   \
-       lisp/mp/mpr.c
-
-#
-#    liblisp.a
-#
-
-liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
-liblisp_a_SOURCES = \
-       lisp/bytecode.c \
-       lisp/bytecode.h \
-       lisp/core.c \
-       lisp/core.h \
-       lisp/debugger.c \
-       lisp/debugger.h \
-       lisp/format.c \
-       lisp/format.h \
-       lisp/hash.c \
-       lisp/hash.h \
-       lisp/helper.c \
-       lisp/helper.h \
-       lisp/internal.h \
-       lisp/io.c \
-       lisp/io.h \
-       lisp/lisp.c \
-       lisp/lisp.h \
-       lisp/math.c \
-       lisp/math.h \
-       lisp/package.c \
-       lisp/package.h \
-       lisp/pathname.c \
-       lisp/pathname.h \
-       lisp/private.h \
-       lisp/read.c \
-       lisp/read.h \
-       lisp/regex.c \
-       lisp/regex.h \
-       lisp/require.c \
-       lisp/require.h \
-       lisp/stream.c \
-       lisp/stream.h \
-       lisp/string.c \
-       lisp/string.h \
-       lisp/struct.c \
-       lisp/struct.h \
-       lisp/time.c \
-       lisp/time.h \
-       lisp/write.c \
-       lisp/write.h \
-       lisp/xedit.c \
-       lisp/xedit.h
-
-if NEED_UNSETENV
-liblisp_a_SOURCES += lisp/env.c
-endif
-
-#
-#     libre.a
-#
-
-libre_a_CFLAGS = 
-libre_a_SOURCES = \
-       lisp/re/re.c \
-       lisp/re/rec.c \
-       lisp/re/re.h \
-       lisp/re/reo.c \
-       lisp/re/rep.h
-
-#
-#     xedit
-#   
-xedit_DEPENDENCIES = liblisp.a libmp.a libre.a
-xedit_CFLAGS = $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT
-xedit_LDADD = -L. -lre -llisp -lmp $(PKGDEPS_LIBS) -lm
-
-xedit_SOURCES =        \
-        commands.c \
-       hash.c \
-        hook.c \
-        ispell.c \
-        lisp.c \
-        options.c \
-       tags.c \
-        util.c \
-       util.h \
-        xedit.c \
-       xedit.h
-
-if NEED_REALPATH
-xedit_SOURCES += realpath.c
-endif
-
-if NEED_STRCASECMP
-xedit_SOURCES += strcasecmp.c
-endif
-
-if USE_XPRINT
-xedit_CFLAGS += -DINCLUDE_XPRINT_SUPPORT
-
-xedit_SOURCES += \
-        print.c \
-        printdialog.c \
-        printdialog.h \
-        printdialogprivates.h \
-        print.h
-endif
-
-# lisp/lsp
-lisp_lsp_DEPENDENCIES = liblisp.a libre.a libmp.a
-lisp_lsp_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
-lisp_lsp_LDADD = -L. -llisp -lre -lmp -lm
-lisp_lsp_SOURCES = \
-       hash.c \
-       lisp/lsp.c
-
-if NEED_REALPATH
-lisp_lsp_SOURCES += realpath.c
-endif
-
-if NEED_STRCASECMP
-lisp_lsp_SOURCES += strcasecmp.c
-endif
-
-# re/tests
-lisp_re_tests_DEPENDENCIES = libre.a
-lisp_re_tests_CFLAGS = -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
-lisp_re_tests_LDADD = -L. -lre
-lisp_re_tests_SOURCES = lisp/re/tests.c
-
-
-# App default files  (*.ad)
-
-APPDEFAULTFILES = \
-        app-defaults/Xedit-color \
-       app-defaults/Xedit
-
-if USE_XPRINT
-app-defaults/Xedit.ad: 
-       test -d app-defaults || mkdir app-defaults
-       cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad
-else
-app-defaults/Xedit.ad:
-       test -d app-defaults || mkdir app-defaults
-       cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad
-endif
-
-SUFFIXES = .ad 
-
-.ad:
-       test -d app-defaults || mkdir app-defaults
-       cp $< $@
-
-appdefaultdir = @appdefaultdir@
-appdefault_DATA = $(APPDEFAULTFILES)
-
-CLEANFILES = $(APPDEFAULTFILES) app-defaults/Xedit.ad
-
-lispdir = $(LISPDIR)
-dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
-       ${srcdir}/lisp/modules/xedit.lsp \
-       ${srcdir}/lisp/modules/syntax.lsp \
-       ${srcdir}/lisp/modules/indent.lsp
-
-progmodesdir = $(LISPDIR)/progmodes
-dist_progmodes_DATA = \
-       ${srcdir}/lisp/modules/progmodes/auto.lsp \
-       ${srcdir}/lisp/modules/progmodes/c.lsp \
-       ${srcdir}/lisp/modules/progmodes/html.lsp \
-       ${srcdir}/lisp/modules/progmodes/imake.lsp \
-       ${srcdir}/lisp/modules/progmodes/lisp.lsp \
-       ${srcdir}/lisp/modules/progmodes/make.lsp \
-       ${srcdir}/lisp/modules/progmodes/man.lsp \
-       ${srcdir}/lisp/modules/progmodes/patch.lsp \
-       ${srcdir}/lisp/modules/progmodes/perl.lsp \
-       ${srcdir}/lisp/modules/progmodes/python.lsp \
-       ${srcdir}/lisp/modules/progmodes/rpm.lsp \
-       ${srcdir}/lisp/modules/progmodes/sgml.lsp \
-       ${srcdir}/lisp/modules/progmodes/sh.lsp \
-       ${srcdir}/lisp/modules/progmodes/xconf.lsp \
-       ${srcdir}/lisp/modules/progmodes/xlog.lsp \
-       ${srcdir}/lisp/modules/progmodes/xrdb.lsp
-
-appman_PRE = xedit.man
-
-EXTRA_DIST = \
-       app-defaults/Xedit-color.ad \
-       app-defaults/Xedit-xprint.ad \
-       app-defaults/Xedit-noxprint.ad \
-       app-defaults/Xedit-sample \
-       lisp/README \
-       lisp/TODO \
-       lisp/compile.c \
-       lisp/env.c \
-       lisp/mathimp.c \
-       lisp/modules/psql.c \
-       lisp/modules/x11.c \
-       lisp/modules/xaw.c \
-       lisp/modules/xt.c \
-       lisp/re/README \
-       lisp/re/tests.txt \
-       lisp/test/hello.lsp \
-       lisp/test/list.lsp \
-       lisp/test/math.lsp \
-       lisp/test/psql-1.lsp \
-       lisp/test/psql-2.lsp \
-       lisp/test/psql-3.lsp \
-       lisp/test/regex.lsp \
-       lisp/test/stream.lsp \
-       lisp/test/widgets.lsp
-
-appmandir = $(APP_MAN_DIR)
-
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-
-EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
-
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
-
-EXTRA_DIST += ChangeLog
-MAINTAINERCLEANFILES = ChangeLog
-
-.PHONY: ChangeLog
-
-ChangeLog:
-       (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
-
-dist-hook: ChangeLog
diff --git a/xedit/Makefile.in b/xedit/Makefile.in
deleted file mode 100644 (file)
index 4a59562..0000000
+++ /dev/null
@@ -1,1705 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-
-
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = xedit$(EXEEXT)
-noinst_PROGRAMS = lisp/lsp$(EXEEXT) lisp/re/tests$(EXEEXT)
-@NEED_UNSETENV_TRUE@am__append_1 = lisp/env.c
-@NEED_REALPATH_TRUE@am__append_2 = realpath.c
-@NEED_STRCASECMP_TRUE@am__append_3 = strcasecmp.c
-@USE_XPRINT_TRUE@am__append_4 = -DINCLUDE_XPRINT_SUPPORT
-@USE_XPRINT_TRUE@am__append_5 = \
-@USE_XPRINT_TRUE@        print.c \
-@USE_XPRINT_TRUE@        printdialog.c \
-@USE_XPRINT_TRUE@        printdialog.h \
-@USE_XPRINT_TRUE@        printdialogprivates.h \
-@USE_XPRINT_TRUE@        print.h
-
-@NEED_REALPATH_TRUE@am__append_6 = realpath.c
-@NEED_STRCASECMP_TRUE@am__append_7 = strcasecmp.c
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(dist_lisp_DATA) \
-       $(dist_progmodes_DATA) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       compile config.guess config.sub depcomp install-sh missing
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = app-defaults/Xedit
-CONFIG_CLEAN_VPATH_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-liblisp_a_AR = $(AR) $(ARFLAGS)
-liblisp_a_LIBADD =
-am__liblisp_a_SOURCES_DIST = lisp/bytecode.c lisp/bytecode.h \
-       lisp/core.c lisp/core.h lisp/debugger.c lisp/debugger.h \
-       lisp/format.c lisp/format.h lisp/hash.c lisp/hash.h \
-       lisp/helper.c lisp/helper.h lisp/internal.h lisp/io.c \
-       lisp/io.h lisp/lisp.c lisp/lisp.h lisp/math.c lisp/math.h \
-       lisp/package.c lisp/package.h lisp/pathname.c lisp/pathname.h \
-       lisp/private.h lisp/read.c lisp/read.h lisp/regex.c \
-       lisp/regex.h lisp/require.c lisp/require.h lisp/stream.c \
-       lisp/stream.h lisp/string.c lisp/string.h lisp/struct.c \
-       lisp/struct.h lisp/time.c lisp/time.h lisp/write.c \
-       lisp/write.h lisp/xedit.c lisp/xedit.h lisp/env.c
-@NEED_UNSETENV_TRUE@am__objects_1 = liblisp_a-env.$(OBJEXT)
-am_liblisp_a_OBJECTS = liblisp_a-bytecode.$(OBJEXT) \
-       liblisp_a-core.$(OBJEXT) liblisp_a-debugger.$(OBJEXT) \
-       liblisp_a-format.$(OBJEXT) liblisp_a-hash.$(OBJEXT) \
-       liblisp_a-helper.$(OBJEXT) liblisp_a-io.$(OBJEXT) \
-       liblisp_a-lisp.$(OBJEXT) liblisp_a-math.$(OBJEXT) \
-       liblisp_a-package.$(OBJEXT) liblisp_a-pathname.$(OBJEXT) \
-       liblisp_a-read.$(OBJEXT) liblisp_a-regex.$(OBJEXT) \
-       liblisp_a-require.$(OBJEXT) liblisp_a-stream.$(OBJEXT) \
-       liblisp_a-string.$(OBJEXT) liblisp_a-struct.$(OBJEXT) \
-       liblisp_a-time.$(OBJEXT) liblisp_a-write.$(OBJEXT) \
-       liblisp_a-xedit.$(OBJEXT) $(am__objects_1)
-liblisp_a_OBJECTS = $(am_liblisp_a_OBJECTS)
-libmp_a_AR = $(AR) $(ARFLAGS)
-libmp_a_LIBADD =
-am_libmp_a_OBJECTS = libmp_a-mp.$(OBJEXT) libmp_a-mpi.$(OBJEXT) \
-       libmp_a-mpr.$(OBJEXT)
-libmp_a_OBJECTS = $(am_libmp_a_OBJECTS)
-libre_a_AR = $(AR) $(ARFLAGS)
-libre_a_LIBADD =
-am_libre_a_OBJECTS = libre_a-re.$(OBJEXT) libre_a-rec.$(OBJEXT) \
-       libre_a-reo.$(OBJEXT)
-libre_a_OBJECTS = $(am_libre_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
-       "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(lispdir)" \
-       "$(DESTDIR)$(progmodesdir)"
-PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-am__lisp_lsp_SOURCES_DIST = hash.c lisp/lsp.c realpath.c strcasecmp.c
-@NEED_REALPATH_TRUE@am__objects_2 = lisp_lsp-realpath.$(OBJEXT)
-@NEED_STRCASECMP_TRUE@am__objects_3 = lisp_lsp-strcasecmp.$(OBJEXT)
-am_lisp_lsp_OBJECTS = lisp_lsp-hash.$(OBJEXT) lisp_lsp-lsp.$(OBJEXT) \
-       $(am__objects_2) $(am__objects_3)
-lisp_lsp_OBJECTS = $(am_lisp_lsp_OBJECTS)
-lisp_lsp_LINK = $(CCLD) $(lisp_lsp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
-am__dirstamp = $(am__leading_dot)dirstamp
-am_lisp_re_tests_OBJECTS = lisp_re_tests-tests.$(OBJEXT)
-lisp_re_tests_OBJECTS = $(am_lisp_re_tests_OBJECTS)
-lisp_re_tests_LINK = $(CCLD) $(lisp_re_tests_CFLAGS) $(CFLAGS) \
-       $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am__xedit_SOURCES_DIST = commands.c hash.c hook.c ispell.c lisp.c \
-       options.c tags.c util.c util.h xedit.c xedit.h realpath.c \
-       strcasecmp.c print.c printdialog.c printdialog.h \
-       printdialogprivates.h print.h
-@NEED_REALPATH_TRUE@am__objects_4 = xedit-realpath.$(OBJEXT)
-@NEED_STRCASECMP_TRUE@am__objects_5 = xedit-strcasecmp.$(OBJEXT)
-@USE_XPRINT_TRUE@am__objects_6 = xedit-print.$(OBJEXT) \
-@USE_XPRINT_TRUE@      xedit-printdialog.$(OBJEXT)
-am_xedit_OBJECTS = xedit-commands.$(OBJEXT) xedit-hash.$(OBJEXT) \
-       xedit-hook.$(OBJEXT) xedit-ispell.$(OBJEXT) \
-       xedit-lisp.$(OBJEXT) xedit-options.$(OBJEXT) \
-       xedit-tags.$(OBJEXT) xedit-util.$(OBJEXT) \
-       xedit-xedit.$(OBJEXT) $(am__objects_4) $(am__objects_5) \
-       $(am__objects_6)
-xedit_OBJECTS = $(am_xedit_OBJECTS)
-am__DEPENDENCIES_1 =
-xedit_LINK = $(CCLD) $(xedit_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(liblisp_a_SOURCES) $(libmp_a_SOURCES) $(libre_a_SOURCES) \
-       $(lisp_lsp_SOURCES) $(lisp_re_tests_SOURCES) $(xedit_SOURCES)
-DIST_SOURCES = $(am__liblisp_a_SOURCES_DIST) $(libmp_a_SOURCES) \
-       $(libre_a_SOURCES) $(am__lisp_lsp_SOURCES_DIST) \
-       $(lisp_re_tests_SOURCES) $(am__xedit_SOURCES_DIST)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-DATA = $(appdefault_DATA) $(appman_DATA) $(dist_lisp_DATA) \
-       $(dist_progmodes_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMTAR = @AMTAR@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EXEEXT = @EXEEXT@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LISPDIR = @LISPDIR@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-MKDIR_P = @MKDIR_P@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKGDEPS_CFLAGS = @PKGDEPS_CFLAGS@
-PKGDEPS_LIBS = @PKGDEPS_LIBS@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-
-# App default files
-appdefaultdir = @appdefaultdir@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-noinst_LIBRARIES = liblisp.a libre.a libmp.a
-
-#
-#    libmp.a
-#
-libmp_a_CFLAGS = 
-libmp_a_SOURCES = \
-       lisp/mp/mp.c    \
-       lisp/mp/mp.h    \
-       lisp/mp/mpi.c   \
-       lisp/mp/mpr.c
-
-
-#
-#    liblisp.a
-#
-liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS)
-liblisp_a_SOURCES = lisp/bytecode.c lisp/bytecode.h lisp/core.c \
-       lisp/core.h lisp/debugger.c lisp/debugger.h lisp/format.c \
-       lisp/format.h lisp/hash.c lisp/hash.h lisp/helper.c \
-       lisp/helper.h lisp/internal.h lisp/io.c lisp/io.h lisp/lisp.c \
-       lisp/lisp.h lisp/math.c lisp/math.h lisp/package.c \
-       lisp/package.h lisp/pathname.c lisp/pathname.h lisp/private.h \
-       lisp/read.c lisp/read.h lisp/regex.c lisp/regex.h \
-       lisp/require.c lisp/require.h lisp/stream.c lisp/stream.h \
-       lisp/string.c lisp/string.h lisp/struct.c lisp/struct.h \
-       lisp/time.c lisp/time.h lisp/write.c lisp/write.h lisp/xedit.c \
-       lisp/xedit.h $(am__append_1)
-
-#
-#     libre.a
-#
-libre_a_CFLAGS = 
-libre_a_SOURCES = \
-       lisp/re/re.c \
-       lisp/re/rec.c \
-       lisp/re/re.h \
-       lisp/re/reo.c \
-       lisp/re/rep.h
-
-
-#
-#     xedit
-#   
-xedit_DEPENDENCIES = liblisp.a libmp.a libre.a
-xedit_CFLAGS = $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE \
-       -DXEDIT $(am__append_4)
-xedit_LDADD = -L. -lre -llisp -lmp $(PKGDEPS_LIBS) -lm
-xedit_SOURCES = commands.c hash.c hook.c ispell.c lisp.c options.c \
-       tags.c util.c util.h xedit.c xedit.h $(am__append_2) \
-       $(am__append_3) $(am__append_5)
-
-# lisp/lsp
-lisp_lsp_DEPENDENCIES = liblisp.a libre.a libmp.a
-lisp_lsp_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE
-lisp_lsp_LDADD = -L. -llisp -lre -lmp -lm
-lisp_lsp_SOURCES = hash.c lisp/lsp.c $(am__append_6) $(am__append_7)
-
-# re/tests
-lisp_re_tests_DEPENDENCIES = libre.a
-lisp_re_tests_CFLAGS = -I$(top_srcdir)/lisp/re -D_BSD_SOURCE
-lisp_re_tests_LDADD = -L. -lre
-lisp_re_tests_SOURCES = lisp/re/tests.c
-appdefault_DATA = \
-        app-defaults/Xedit-color \
-       app-defaults/Xedit
-
-lispdir = $(LISPDIR)
-dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \
-       ${srcdir}/lisp/modules/xedit.lsp \
-       ${srcdir}/lisp/modules/syntax.lsp \
-       ${srcdir}/lisp/modules/indent.lsp
-
-progmodesdir = $(LISPDIR)/progmodes
-dist_progmodes_DATA = \
-       ${srcdir}/lisp/modules/progmodes/auto.lsp \
-       ${srcdir}/lisp/modules/progmodes/c.lsp \
-       ${srcdir}/lisp/modules/progmodes/html.lsp \
-       ${srcdir}/lisp/modules/progmodes/imake.lsp \
-       ${srcdir}/lisp/modules/progmodes/lisp.lsp \
-       ${srcdir}/lisp/modules/progmodes/make.lsp \
-       ${srcdir}/lisp/modules/progmodes/man.lsp \
-       ${srcdir}/lisp/modules/progmodes/patch.lsp \
-       ${srcdir}/lisp/modules/progmodes/perl.lsp \
-       ${srcdir}/lisp/modules/progmodes/python.lsp \
-       ${srcdir}/lisp/modules/progmodes/rpm.lsp \
-       ${srcdir}/lisp/modules/progmodes/sgml.lsp \
-       ${srcdir}/lisp/modules/progmodes/sh.lsp \
-       ${srcdir}/lisp/modules/progmodes/xconf.lsp \
-       ${srcdir}/lisp/modules/progmodes/xlog.lsp \
-       ${srcdir}/lisp/modules/progmodes/xrdb.lsp
-
-appman_PRE = xedit.man
-EXTRA_DIST = app-defaults/Xedit-color app-defaults/Xedit-xprint \
-       app-defaults/Xedit-noxprint app-defaults/Xedit-sample \
-       lisp/README lisp/TODO lisp/compile.c lisp/env.c lisp/mathimp.c \
-       lisp/modules/psql.c lisp/modules/x11.c lisp/modules/xaw.c \
-       lisp/modules/xt.c lisp/re/README lisp/re/tests.txt \
-       lisp/test/hello.lsp lisp/test/list.lsp lisp/test/math.lsp \
-       lisp/test/psql-1.lsp lisp/test/psql-2.lsp lisp/test/psql-3.lsp \
-       lisp/test/regex.lsp lisp/test/stream.lsp lisp/test/widgets.lsp \
-       $(appman_PRE) ChangeLog
-appmandir = $(APP_MAN_DIR)
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-CLEANFILES = $(appman_DATA)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
-MAINTAINERCLEANFILES = ChangeLog
-all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
-am--refresh:
-       @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           echo ' $(SHELL) ./config.status'; \
-           $(SHELL) ./config.status;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       $(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-
-config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-       else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h1
-       cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
-       rm -f stamp-h1
-       touch $@
-
-distclean-hdr:
-       -rm -f config.h stamp-h1
-
-clean-noinstLIBRARIES:
-       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-liblisp.a: $(liblisp_a_OBJECTS) $(liblisp_a_DEPENDENCIES) 
-       -rm -f liblisp.a
-       $(liblisp_a_AR) liblisp.a $(liblisp_a_OBJECTS) $(liblisp_a_LIBADD)
-       $(RANLIB) liblisp.a
-libmp.a: $(libmp_a_OBJECTS) $(libmp_a_DEPENDENCIES) 
-       -rm -f libmp.a
-       $(libmp_a_AR) libmp.a $(libmp_a_OBJECTS) $(libmp_a_LIBADD)
-       $(RANLIB) libmp.a
-libre.a: $(libre_a_OBJECTS) $(libre_a_DEPENDENCIES) 
-       -rm -f libre.a
-       $(libre_a_AR) libre.a $(libre_a_OBJECTS) $(libre_a_LIBADD)
-       $(RANLIB) libre.a
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       for p in $$list; do echo "$$p $$p"; done | \
-       sed 's/$(EXEEXT)$$//' | \
-       while read p p1; do if test -f $$p; \
-         then echo "$$p"; echo "$$p"; else :; fi; \
-       done | \
-       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-       sed 'N;N;N;s,\n, ,g' | \
-       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-           if ($$2 == $$4) files[d] = files[d] " " $$1; \
-           else { print "f", $$3 "/" $$4, $$1; } } \
-         END { for (d in files) print "f", d, files[d] }' | \
-       while read type dir files; do \
-           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-           test -z "$$files" || { \
-             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-           } \
-       ; done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       files=`for p in $$list; do echo "$$p"; done | \
-         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/' `; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-
-clean-noinstPROGRAMS:
-       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-lisp/$(am__dirstamp):
-       @$(MKDIR_P) lisp
-       @: > lisp/$(am__dirstamp)
-lisp/lsp$(EXEEXT): $(lisp_lsp_OBJECTS) $(lisp_lsp_DEPENDENCIES) lisp/$(am__dirstamp)
-       @rm -f lisp/lsp$(EXEEXT)
-       $(lisp_lsp_LINK) $(lisp_lsp_OBJECTS) $(lisp_lsp_LDADD) $(LIBS)
-lisp/re/$(am__dirstamp):
-       @$(MKDIR_P) lisp/re
-       @: > lisp/re/$(am__dirstamp)
-lisp/re/tests$(EXEEXT): $(lisp_re_tests_OBJECTS) $(lisp_re_tests_DEPENDENCIES) lisp/re/$(am__dirstamp)
-       @rm -f lisp/re/tests$(EXEEXT)
-       $(lisp_re_tests_LINK) $(lisp_re_tests_OBJECTS) $(lisp_re_tests_LDADD) $(LIBS)
-xedit$(EXEEXT): $(xedit_OBJECTS) $(xedit_DEPENDENCIES) 
-       @rm -f xedit$(EXEEXT)
-       $(xedit_LINK) $(xedit_OBJECTS) $(xedit_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-bytecode.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-core.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-debugger.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-env.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-format.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-hash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-helper.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-io.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-lisp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-math.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-package.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-pathname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-read.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-regex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-require.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-stream.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-string.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-struct.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-time.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-write.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblisp_a-xedit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmp_a-mp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmp_a-mpi.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmp_a-mpr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libre_a-re.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libre_a-rec.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libre_a-reo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lisp_lsp-hash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lisp_lsp-lsp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lisp_lsp-realpath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lisp_lsp-strcasecmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lisp_re_tests-tests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-commands.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-hash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-hook.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-ispell.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-lisp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-options.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-print.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-printdialog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-realpath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-strcasecmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-tags.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-util.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xedit-xedit.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-liblisp_a-bytecode.o: lisp/bytecode.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-bytecode.o -MD -MP -MF $(DEPDIR)/liblisp_a-bytecode.Tpo -c -o liblisp_a-bytecode.o `test -f 'lisp/bytecode.c' || echo '$(srcdir)/'`lisp/bytecode.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-bytecode.Tpo $(DEPDIR)/liblisp_a-bytecode.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/bytecode.c' object='liblisp_a-bytecode.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-bytecode.o `test -f 'lisp/bytecode.c' || echo '$(srcdir)/'`lisp/bytecode.c
-
-liblisp_a-bytecode.obj: lisp/bytecode.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-bytecode.obj -MD -MP -MF $(DEPDIR)/liblisp_a-bytecode.Tpo -c -o liblisp_a-bytecode.obj `if test -f 'lisp/bytecode.c'; then $(CYGPATH_W) 'lisp/bytecode.c'; else $(CYGPATH_W) '$(srcdir)/lisp/bytecode.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-bytecode.Tpo $(DEPDIR)/liblisp_a-bytecode.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/bytecode.c' object='liblisp_a-bytecode.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-bytecode.obj `if test -f 'lisp/bytecode.c'; then $(CYGPATH_W) 'lisp/bytecode.c'; else $(CYGPATH_W) '$(srcdir)/lisp/bytecode.c'; fi`
-
-liblisp_a-core.o: lisp/core.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-core.o -MD -MP -MF $(DEPDIR)/liblisp_a-core.Tpo -c -o liblisp_a-core.o `test -f 'lisp/core.c' || echo '$(srcdir)/'`lisp/core.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-core.Tpo $(DEPDIR)/liblisp_a-core.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/core.c' object='liblisp_a-core.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-core.o `test -f 'lisp/core.c' || echo '$(srcdir)/'`lisp/core.c
-
-liblisp_a-core.obj: lisp/core.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-core.obj -MD -MP -MF $(DEPDIR)/liblisp_a-core.Tpo -c -o liblisp_a-core.obj `if test -f 'lisp/core.c'; then $(CYGPATH_W) 'lisp/core.c'; else $(CYGPATH_W) '$(srcdir)/lisp/core.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-core.Tpo $(DEPDIR)/liblisp_a-core.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/core.c' object='liblisp_a-core.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-core.obj `if test -f 'lisp/core.c'; then $(CYGPATH_W) 'lisp/core.c'; else $(CYGPATH_W) '$(srcdir)/lisp/core.c'; fi`
-
-liblisp_a-debugger.o: lisp/debugger.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-debugger.o -MD -MP -MF $(DEPDIR)/liblisp_a-debugger.Tpo -c -o liblisp_a-debugger.o `test -f 'lisp/debugger.c' || echo '$(srcdir)/'`lisp/debugger.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-debugger.Tpo $(DEPDIR)/liblisp_a-debugger.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/debugger.c' object='liblisp_a-debugger.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-debugger.o `test -f 'lisp/debugger.c' || echo '$(srcdir)/'`lisp/debugger.c
-
-liblisp_a-debugger.obj: lisp/debugger.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-debugger.obj -MD -MP -MF $(DEPDIR)/liblisp_a-debugger.Tpo -c -o liblisp_a-debugger.obj `if test -f 'lisp/debugger.c'; then $(CYGPATH_W) 'lisp/debugger.c'; else $(CYGPATH_W) '$(srcdir)/lisp/debugger.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-debugger.Tpo $(DEPDIR)/liblisp_a-debugger.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/debugger.c' object='liblisp_a-debugger.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-debugger.obj `if test -f 'lisp/debugger.c'; then $(CYGPATH_W) 'lisp/debugger.c'; else $(CYGPATH_W) '$(srcdir)/lisp/debugger.c'; fi`
-
-liblisp_a-format.o: lisp/format.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-format.o -MD -MP -MF $(DEPDIR)/liblisp_a-format.Tpo -c -o liblisp_a-format.o `test -f 'lisp/format.c' || echo '$(srcdir)/'`lisp/format.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-format.Tpo $(DEPDIR)/liblisp_a-format.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/format.c' object='liblisp_a-format.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-format.o `test -f 'lisp/format.c' || echo '$(srcdir)/'`lisp/format.c
-
-liblisp_a-format.obj: lisp/format.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-format.obj -MD -MP -MF $(DEPDIR)/liblisp_a-format.Tpo -c -o liblisp_a-format.obj `if test -f 'lisp/format.c'; then $(CYGPATH_W) 'lisp/format.c'; else $(CYGPATH_W) '$(srcdir)/lisp/format.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-format.Tpo $(DEPDIR)/liblisp_a-format.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/format.c' object='liblisp_a-format.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-format.obj `if test -f 'lisp/format.c'; then $(CYGPATH_W) 'lisp/format.c'; else $(CYGPATH_W) '$(srcdir)/lisp/format.c'; fi`
-
-liblisp_a-hash.o: lisp/hash.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-hash.o -MD -MP -MF $(DEPDIR)/liblisp_a-hash.Tpo -c -o liblisp_a-hash.o `test -f 'lisp/hash.c' || echo '$(srcdir)/'`lisp/hash.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-hash.Tpo $(DEPDIR)/liblisp_a-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/hash.c' object='liblisp_a-hash.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-hash.o `test -f 'lisp/hash.c' || echo '$(srcdir)/'`lisp/hash.c
-
-liblisp_a-hash.obj: lisp/hash.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-hash.obj -MD -MP -MF $(DEPDIR)/liblisp_a-hash.Tpo -c -o liblisp_a-hash.obj `if test -f 'lisp/hash.c'; then $(CYGPATH_W) 'lisp/hash.c'; else $(CYGPATH_W) '$(srcdir)/lisp/hash.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-hash.Tpo $(DEPDIR)/liblisp_a-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/hash.c' object='liblisp_a-hash.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-hash.obj `if test -f 'lisp/hash.c'; then $(CYGPATH_W) 'lisp/hash.c'; else $(CYGPATH_W) '$(srcdir)/lisp/hash.c'; fi`
-
-liblisp_a-helper.o: lisp/helper.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-helper.o -MD -MP -MF $(DEPDIR)/liblisp_a-helper.Tpo -c -o liblisp_a-helper.o `test -f 'lisp/helper.c' || echo '$(srcdir)/'`lisp/helper.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-helper.Tpo $(DEPDIR)/liblisp_a-helper.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/helper.c' object='liblisp_a-helper.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-helper.o `test -f 'lisp/helper.c' || echo '$(srcdir)/'`lisp/helper.c
-
-liblisp_a-helper.obj: lisp/helper.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-helper.obj -MD -MP -MF $(DEPDIR)/liblisp_a-helper.Tpo -c -o liblisp_a-helper.obj `if test -f 'lisp/helper.c'; then $(CYGPATH_W) 'lisp/helper.c'; else $(CYGPATH_W) '$(srcdir)/lisp/helper.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-helper.Tpo $(DEPDIR)/liblisp_a-helper.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/helper.c' object='liblisp_a-helper.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-helper.obj `if test -f 'lisp/helper.c'; then $(CYGPATH_W) 'lisp/helper.c'; else $(CYGPATH_W) '$(srcdir)/lisp/helper.c'; fi`
-
-liblisp_a-io.o: lisp/io.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-io.o -MD -MP -MF $(DEPDIR)/liblisp_a-io.Tpo -c -o liblisp_a-io.o `test -f 'lisp/io.c' || echo '$(srcdir)/'`lisp/io.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-io.Tpo $(DEPDIR)/liblisp_a-io.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/io.c' object='liblisp_a-io.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-io.o `test -f 'lisp/io.c' || echo '$(srcdir)/'`lisp/io.c
-
-liblisp_a-io.obj: lisp/io.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-io.obj -MD -MP -MF $(DEPDIR)/liblisp_a-io.Tpo -c -o liblisp_a-io.obj `if test -f 'lisp/io.c'; then $(CYGPATH_W) 'lisp/io.c'; else $(CYGPATH_W) '$(srcdir)/lisp/io.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-io.Tpo $(DEPDIR)/liblisp_a-io.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/io.c' object='liblisp_a-io.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-io.obj `if test -f 'lisp/io.c'; then $(CYGPATH_W) 'lisp/io.c'; else $(CYGPATH_W) '$(srcdir)/lisp/io.c'; fi`
-
-liblisp_a-lisp.o: lisp/lisp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-lisp.o -MD -MP -MF $(DEPDIR)/liblisp_a-lisp.Tpo -c -o liblisp_a-lisp.o `test -f 'lisp/lisp.c' || echo '$(srcdir)/'`lisp/lisp.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-lisp.Tpo $(DEPDIR)/liblisp_a-lisp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/lisp.c' object='liblisp_a-lisp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-lisp.o `test -f 'lisp/lisp.c' || echo '$(srcdir)/'`lisp/lisp.c
-
-liblisp_a-lisp.obj: lisp/lisp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-lisp.obj -MD -MP -MF $(DEPDIR)/liblisp_a-lisp.Tpo -c -o liblisp_a-lisp.obj `if test -f 'lisp/lisp.c'; then $(CYGPATH_W) 'lisp/lisp.c'; else $(CYGPATH_W) '$(srcdir)/lisp/lisp.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-lisp.Tpo $(DEPDIR)/liblisp_a-lisp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/lisp.c' object='liblisp_a-lisp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-lisp.obj `if test -f 'lisp/lisp.c'; then $(CYGPATH_W) 'lisp/lisp.c'; else $(CYGPATH_W) '$(srcdir)/lisp/lisp.c'; fi`
-
-liblisp_a-math.o: lisp/math.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-math.o -MD -MP -MF $(DEPDIR)/liblisp_a-math.Tpo -c -o liblisp_a-math.o `test -f 'lisp/math.c' || echo '$(srcdir)/'`lisp/math.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-math.Tpo $(DEPDIR)/liblisp_a-math.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/math.c' object='liblisp_a-math.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-math.o `test -f 'lisp/math.c' || echo '$(srcdir)/'`lisp/math.c
-
-liblisp_a-math.obj: lisp/math.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-math.obj -MD -MP -MF $(DEPDIR)/liblisp_a-math.Tpo -c -o liblisp_a-math.obj `if test -f 'lisp/math.c'; then $(CYGPATH_W) 'lisp/math.c'; else $(CYGPATH_W) '$(srcdir)/lisp/math.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-math.Tpo $(DEPDIR)/liblisp_a-math.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/math.c' object='liblisp_a-math.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-math.obj `if test -f 'lisp/math.c'; then $(CYGPATH_W) 'lisp/math.c'; else $(CYGPATH_W) '$(srcdir)/lisp/math.c'; fi`
-
-liblisp_a-package.o: lisp/package.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-package.o -MD -MP -MF $(DEPDIR)/liblisp_a-package.Tpo -c -o liblisp_a-package.o `test -f 'lisp/package.c' || echo '$(srcdir)/'`lisp/package.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-package.Tpo $(DEPDIR)/liblisp_a-package.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/package.c' object='liblisp_a-package.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-package.o `test -f 'lisp/package.c' || echo '$(srcdir)/'`lisp/package.c
-
-liblisp_a-package.obj: lisp/package.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-package.obj -MD -MP -MF $(DEPDIR)/liblisp_a-package.Tpo -c -o liblisp_a-package.obj `if test -f 'lisp/package.c'; then $(CYGPATH_W) 'lisp/package.c'; else $(CYGPATH_W) '$(srcdir)/lisp/package.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-package.Tpo $(DEPDIR)/liblisp_a-package.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/package.c' object='liblisp_a-package.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-package.obj `if test -f 'lisp/package.c'; then $(CYGPATH_W) 'lisp/package.c'; else $(CYGPATH_W) '$(srcdir)/lisp/package.c'; fi`
-
-liblisp_a-pathname.o: lisp/pathname.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-pathname.o -MD -MP -MF $(DEPDIR)/liblisp_a-pathname.Tpo -c -o liblisp_a-pathname.o `test -f 'lisp/pathname.c' || echo '$(srcdir)/'`lisp/pathname.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-pathname.Tpo $(DEPDIR)/liblisp_a-pathname.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/pathname.c' object='liblisp_a-pathname.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-pathname.o `test -f 'lisp/pathname.c' || echo '$(srcdir)/'`lisp/pathname.c
-
-liblisp_a-pathname.obj: lisp/pathname.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-pathname.obj -MD -MP -MF $(DEPDIR)/liblisp_a-pathname.Tpo -c -o liblisp_a-pathname.obj `if test -f 'lisp/pathname.c'; then $(CYGPATH_W) 'lisp/pathname.c'; else $(CYGPATH_W) '$(srcdir)/lisp/pathname.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-pathname.Tpo $(DEPDIR)/liblisp_a-pathname.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/pathname.c' object='liblisp_a-pathname.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-pathname.obj `if test -f 'lisp/pathname.c'; then $(CYGPATH_W) 'lisp/pathname.c'; else $(CYGPATH_W) '$(srcdir)/lisp/pathname.c'; fi`
-
-liblisp_a-read.o: lisp/read.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-read.o -MD -MP -MF $(DEPDIR)/liblisp_a-read.Tpo -c -o liblisp_a-read.o `test -f 'lisp/read.c' || echo '$(srcdir)/'`lisp/read.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-read.Tpo $(DEPDIR)/liblisp_a-read.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/read.c' object='liblisp_a-read.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-read.o `test -f 'lisp/read.c' || echo '$(srcdir)/'`lisp/read.c
-
-liblisp_a-read.obj: lisp/read.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-read.obj -MD -MP -MF $(DEPDIR)/liblisp_a-read.Tpo -c -o liblisp_a-read.obj `if test -f 'lisp/read.c'; then $(CYGPATH_W) 'lisp/read.c'; else $(CYGPATH_W) '$(srcdir)/lisp/read.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-read.Tpo $(DEPDIR)/liblisp_a-read.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/read.c' object='liblisp_a-read.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-read.obj `if test -f 'lisp/read.c'; then $(CYGPATH_W) 'lisp/read.c'; else $(CYGPATH_W) '$(srcdir)/lisp/read.c'; fi`
-
-liblisp_a-regex.o: lisp/regex.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-regex.o -MD -MP -MF $(DEPDIR)/liblisp_a-regex.Tpo -c -o liblisp_a-regex.o `test -f 'lisp/regex.c' || echo '$(srcdir)/'`lisp/regex.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-regex.Tpo $(DEPDIR)/liblisp_a-regex.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/regex.c' object='liblisp_a-regex.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-regex.o `test -f 'lisp/regex.c' || echo '$(srcdir)/'`lisp/regex.c
-
-liblisp_a-regex.obj: lisp/regex.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-regex.obj -MD -MP -MF $(DEPDIR)/liblisp_a-regex.Tpo -c -o liblisp_a-regex.obj `if test -f 'lisp/regex.c'; then $(CYGPATH_W) 'lisp/regex.c'; else $(CYGPATH_W) '$(srcdir)/lisp/regex.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-regex.Tpo $(DEPDIR)/liblisp_a-regex.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/regex.c' object='liblisp_a-regex.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-regex.obj `if test -f 'lisp/regex.c'; then $(CYGPATH_W) 'lisp/regex.c'; else $(CYGPATH_W) '$(srcdir)/lisp/regex.c'; fi`
-
-liblisp_a-require.o: lisp/require.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-require.o -MD -MP -MF $(DEPDIR)/liblisp_a-require.Tpo -c -o liblisp_a-require.o `test -f 'lisp/require.c' || echo '$(srcdir)/'`lisp/require.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-require.Tpo $(DEPDIR)/liblisp_a-require.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/require.c' object='liblisp_a-require.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-require.o `test -f 'lisp/require.c' || echo '$(srcdir)/'`lisp/require.c
-
-liblisp_a-require.obj: lisp/require.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-require.obj -MD -MP -MF $(DEPDIR)/liblisp_a-require.Tpo -c -o liblisp_a-require.obj `if test -f 'lisp/require.c'; then $(CYGPATH_W) 'lisp/require.c'; else $(CYGPATH_W) '$(srcdir)/lisp/require.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-require.Tpo $(DEPDIR)/liblisp_a-require.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/require.c' object='liblisp_a-require.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-require.obj `if test -f 'lisp/require.c'; then $(CYGPATH_W) 'lisp/require.c'; else $(CYGPATH_W) '$(srcdir)/lisp/require.c'; fi`
-
-liblisp_a-stream.o: lisp/stream.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-stream.o -MD -MP -MF $(DEPDIR)/liblisp_a-stream.Tpo -c -o liblisp_a-stream.o `test -f 'lisp/stream.c' || echo '$(srcdir)/'`lisp/stream.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-stream.Tpo $(DEPDIR)/liblisp_a-stream.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/stream.c' object='liblisp_a-stream.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-stream.o `test -f 'lisp/stream.c' || echo '$(srcdir)/'`lisp/stream.c
-
-liblisp_a-stream.obj: lisp/stream.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-stream.obj -MD -MP -MF $(DEPDIR)/liblisp_a-stream.Tpo -c -o liblisp_a-stream.obj `if test -f 'lisp/stream.c'; then $(CYGPATH_W) 'lisp/stream.c'; else $(CYGPATH_W) '$(srcdir)/lisp/stream.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-stream.Tpo $(DEPDIR)/liblisp_a-stream.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/stream.c' object='liblisp_a-stream.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-stream.obj `if test -f 'lisp/stream.c'; then $(CYGPATH_W) 'lisp/stream.c'; else $(CYGPATH_W) '$(srcdir)/lisp/stream.c'; fi`
-
-liblisp_a-string.o: lisp/string.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-string.o -MD -MP -MF $(DEPDIR)/liblisp_a-string.Tpo -c -o liblisp_a-string.o `test -f 'lisp/string.c' || echo '$(srcdir)/'`lisp/string.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-string.Tpo $(DEPDIR)/liblisp_a-string.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/string.c' object='liblisp_a-string.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-string.o `test -f 'lisp/string.c' || echo '$(srcdir)/'`lisp/string.c
-
-liblisp_a-string.obj: lisp/string.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-string.obj -MD -MP -MF $(DEPDIR)/liblisp_a-string.Tpo -c -o liblisp_a-string.obj `if test -f 'lisp/string.c'; then $(CYGPATH_W) 'lisp/string.c'; else $(CYGPATH_W) '$(srcdir)/lisp/string.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-string.Tpo $(DEPDIR)/liblisp_a-string.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/string.c' object='liblisp_a-string.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-string.obj `if test -f 'lisp/string.c'; then $(CYGPATH_W) 'lisp/string.c'; else $(CYGPATH_W) '$(srcdir)/lisp/string.c'; fi`
-
-liblisp_a-struct.o: lisp/struct.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-struct.o -MD -MP -MF $(DEPDIR)/liblisp_a-struct.Tpo -c -o liblisp_a-struct.o `test -f 'lisp/struct.c' || echo '$(srcdir)/'`lisp/struct.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-struct.Tpo $(DEPDIR)/liblisp_a-struct.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/struct.c' object='liblisp_a-struct.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-struct.o `test -f 'lisp/struct.c' || echo '$(srcdir)/'`lisp/struct.c
-
-liblisp_a-struct.obj: lisp/struct.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-struct.obj -MD -MP -MF $(DEPDIR)/liblisp_a-struct.Tpo -c -o liblisp_a-struct.obj `if test -f 'lisp/struct.c'; then $(CYGPATH_W) 'lisp/struct.c'; else $(CYGPATH_W) '$(srcdir)/lisp/struct.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-struct.Tpo $(DEPDIR)/liblisp_a-struct.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/struct.c' object='liblisp_a-struct.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-struct.obj `if test -f 'lisp/struct.c'; then $(CYGPATH_W) 'lisp/struct.c'; else $(CYGPATH_W) '$(srcdir)/lisp/struct.c'; fi`
-
-liblisp_a-time.o: lisp/time.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-time.o -MD -MP -MF $(DEPDIR)/liblisp_a-time.Tpo -c -o liblisp_a-time.o `test -f 'lisp/time.c' || echo '$(srcdir)/'`lisp/time.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-time.Tpo $(DEPDIR)/liblisp_a-time.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/time.c' object='liblisp_a-time.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-time.o `test -f 'lisp/time.c' || echo '$(srcdir)/'`lisp/time.c
-
-liblisp_a-time.obj: lisp/time.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-time.obj -MD -MP -MF $(DEPDIR)/liblisp_a-time.Tpo -c -o liblisp_a-time.obj `if test -f 'lisp/time.c'; then $(CYGPATH_W) 'lisp/time.c'; else $(CYGPATH_W) '$(srcdir)/lisp/time.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-time.Tpo $(DEPDIR)/liblisp_a-time.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/time.c' object='liblisp_a-time.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-time.obj `if test -f 'lisp/time.c'; then $(CYGPATH_W) 'lisp/time.c'; else $(CYGPATH_W) '$(srcdir)/lisp/time.c'; fi`
-
-liblisp_a-write.o: lisp/write.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-write.o -MD -MP -MF $(DEPDIR)/liblisp_a-write.Tpo -c -o liblisp_a-write.o `test -f 'lisp/write.c' || echo '$(srcdir)/'`lisp/write.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-write.Tpo $(DEPDIR)/liblisp_a-write.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/write.c' object='liblisp_a-write.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-write.o `test -f 'lisp/write.c' || echo '$(srcdir)/'`lisp/write.c
-
-liblisp_a-write.obj: lisp/write.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-write.obj -MD -MP -MF $(DEPDIR)/liblisp_a-write.Tpo -c -o liblisp_a-write.obj `if test -f 'lisp/write.c'; then $(CYGPATH_W) 'lisp/write.c'; else $(CYGPATH_W) '$(srcdir)/lisp/write.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-write.Tpo $(DEPDIR)/liblisp_a-write.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/write.c' object='liblisp_a-write.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-write.obj `if test -f 'lisp/write.c'; then $(CYGPATH_W) 'lisp/write.c'; else $(CYGPATH_W) '$(srcdir)/lisp/write.c'; fi`
-
-liblisp_a-xedit.o: lisp/xedit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-xedit.o -MD -MP -MF $(DEPDIR)/liblisp_a-xedit.Tpo -c -o liblisp_a-xedit.o `test -f 'lisp/xedit.c' || echo '$(srcdir)/'`lisp/xedit.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-xedit.Tpo $(DEPDIR)/liblisp_a-xedit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/xedit.c' object='liblisp_a-xedit.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-xedit.o `test -f 'lisp/xedit.c' || echo '$(srcdir)/'`lisp/xedit.c
-
-liblisp_a-xedit.obj: lisp/xedit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-xedit.obj -MD -MP -MF $(DEPDIR)/liblisp_a-xedit.Tpo -c -o liblisp_a-xedit.obj `if test -f 'lisp/xedit.c'; then $(CYGPATH_W) 'lisp/xedit.c'; else $(CYGPATH_W) '$(srcdir)/lisp/xedit.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-xedit.Tpo $(DEPDIR)/liblisp_a-xedit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/xedit.c' object='liblisp_a-xedit.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-xedit.obj `if test -f 'lisp/xedit.c'; then $(CYGPATH_W) 'lisp/xedit.c'; else $(CYGPATH_W) '$(srcdir)/lisp/xedit.c'; fi`
-
-liblisp_a-env.o: lisp/env.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-env.o -MD -MP -MF $(DEPDIR)/liblisp_a-env.Tpo -c -o liblisp_a-env.o `test -f 'lisp/env.c' || echo '$(srcdir)/'`lisp/env.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-env.Tpo $(DEPDIR)/liblisp_a-env.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/env.c' object='liblisp_a-env.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-env.o `test -f 'lisp/env.c' || echo '$(srcdir)/'`lisp/env.c
-
-liblisp_a-env.obj: lisp/env.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -MT liblisp_a-env.obj -MD -MP -MF $(DEPDIR)/liblisp_a-env.Tpo -c -o liblisp_a-env.obj `if test -f 'lisp/env.c'; then $(CYGPATH_W) 'lisp/env.c'; else $(CYGPATH_W) '$(srcdir)/lisp/env.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/liblisp_a-env.Tpo $(DEPDIR)/liblisp_a-env.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/env.c' object='liblisp_a-env.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblisp_a_CFLAGS) $(CFLAGS) -c -o liblisp_a-env.obj `if test -f 'lisp/env.c'; then $(CYGPATH_W) 'lisp/env.c'; else $(CYGPATH_W) '$(srcdir)/lisp/env.c'; fi`
-
-libmp_a-mp.o: lisp/mp/mp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -MT libmp_a-mp.o -MD -MP -MF $(DEPDIR)/libmp_a-mp.Tpo -c -o libmp_a-mp.o `test -f 'lisp/mp/mp.c' || echo '$(srcdir)/'`lisp/mp/mp.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmp_a-mp.Tpo $(DEPDIR)/libmp_a-mp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/mp/mp.c' object='libmp_a-mp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -c -o libmp_a-mp.o `test -f 'lisp/mp/mp.c' || echo '$(srcdir)/'`lisp/mp/mp.c
-
-libmp_a-mp.obj: lisp/mp/mp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -MT libmp_a-mp.obj -MD -MP -MF $(DEPDIR)/libmp_a-mp.Tpo -c -o libmp_a-mp.obj `if test -f 'lisp/mp/mp.c'; then $(CYGPATH_W) 'lisp/mp/mp.c'; else $(CYGPATH_W) '$(srcdir)/lisp/mp/mp.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmp_a-mp.Tpo $(DEPDIR)/libmp_a-mp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/mp/mp.c' object='libmp_a-mp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -c -o libmp_a-mp.obj `if test -f 'lisp/mp/mp.c'; then $(CYGPATH_W) 'lisp/mp/mp.c'; else $(CYGPATH_W) '$(srcdir)/lisp/mp/mp.c'; fi`
-
-libmp_a-mpi.o: lisp/mp/mpi.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -MT libmp_a-mpi.o -MD -MP -MF $(DEPDIR)/libmp_a-mpi.Tpo -c -o libmp_a-mpi.o `test -f 'lisp/mp/mpi.c' || echo '$(srcdir)/'`lisp/mp/mpi.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmp_a-mpi.Tpo $(DEPDIR)/libmp_a-mpi.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/mp/mpi.c' object='libmp_a-mpi.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -c -o libmp_a-mpi.o `test -f 'lisp/mp/mpi.c' || echo '$(srcdir)/'`lisp/mp/mpi.c
-
-libmp_a-mpi.obj: lisp/mp/mpi.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -MT libmp_a-mpi.obj -MD -MP -MF $(DEPDIR)/libmp_a-mpi.Tpo -c -o libmp_a-mpi.obj `if test -f 'lisp/mp/mpi.c'; then $(CYGPATH_W) 'lisp/mp/mpi.c'; else $(CYGPATH_W) '$(srcdir)/lisp/mp/mpi.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmp_a-mpi.Tpo $(DEPDIR)/libmp_a-mpi.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/mp/mpi.c' object='libmp_a-mpi.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -c -o libmp_a-mpi.obj `if test -f 'lisp/mp/mpi.c'; then $(CYGPATH_W) 'lisp/mp/mpi.c'; else $(CYGPATH_W) '$(srcdir)/lisp/mp/mpi.c'; fi`
-
-libmp_a-mpr.o: lisp/mp/mpr.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -MT libmp_a-mpr.o -MD -MP -MF $(DEPDIR)/libmp_a-mpr.Tpo -c -o libmp_a-mpr.o `test -f 'lisp/mp/mpr.c' || echo '$(srcdir)/'`lisp/mp/mpr.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmp_a-mpr.Tpo $(DEPDIR)/libmp_a-mpr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/mp/mpr.c' object='libmp_a-mpr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -c -o libmp_a-mpr.o `test -f 'lisp/mp/mpr.c' || echo '$(srcdir)/'`lisp/mp/mpr.c
-
-libmp_a-mpr.obj: lisp/mp/mpr.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -MT libmp_a-mpr.obj -MD -MP -MF $(DEPDIR)/libmp_a-mpr.Tpo -c -o libmp_a-mpr.obj `if test -f 'lisp/mp/mpr.c'; then $(CYGPATH_W) 'lisp/mp/mpr.c'; else $(CYGPATH_W) '$(srcdir)/lisp/mp/mpr.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libmp_a-mpr.Tpo $(DEPDIR)/libmp_a-mpr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/mp/mpr.c' object='libmp_a-mpr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmp_a_CFLAGS) $(CFLAGS) -c -o libmp_a-mpr.obj `if test -f 'lisp/mp/mpr.c'; then $(CYGPATH_W) 'lisp/mp/mpr.c'; else $(CYGPATH_W) '$(srcdir)/lisp/mp/mpr.c'; fi`
-
-libre_a-re.o: lisp/re/re.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -MT libre_a-re.o -MD -MP -MF $(DEPDIR)/libre_a-re.Tpo -c -o libre_a-re.o `test -f 'lisp/re/re.c' || echo '$(srcdir)/'`lisp/re/re.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libre_a-re.Tpo $(DEPDIR)/libre_a-re.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/re.c' object='libre_a-re.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -c -o libre_a-re.o `test -f 'lisp/re/re.c' || echo '$(srcdir)/'`lisp/re/re.c
-
-libre_a-re.obj: lisp/re/re.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -MT libre_a-re.obj -MD -MP -MF $(DEPDIR)/libre_a-re.Tpo -c -o libre_a-re.obj `if test -f 'lisp/re/re.c'; then $(CYGPATH_W) 'lisp/re/re.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/re.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libre_a-re.Tpo $(DEPDIR)/libre_a-re.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/re.c' object='libre_a-re.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -c -o libre_a-re.obj `if test -f 'lisp/re/re.c'; then $(CYGPATH_W) 'lisp/re/re.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/re.c'; fi`
-
-libre_a-rec.o: lisp/re/rec.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -MT libre_a-rec.o -MD -MP -MF $(DEPDIR)/libre_a-rec.Tpo -c -o libre_a-rec.o `test -f 'lisp/re/rec.c' || echo '$(srcdir)/'`lisp/re/rec.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libre_a-rec.Tpo $(DEPDIR)/libre_a-rec.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/rec.c' object='libre_a-rec.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -c -o libre_a-rec.o `test -f 'lisp/re/rec.c' || echo '$(srcdir)/'`lisp/re/rec.c
-
-libre_a-rec.obj: lisp/re/rec.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -MT libre_a-rec.obj -MD -MP -MF $(DEPDIR)/libre_a-rec.Tpo -c -o libre_a-rec.obj `if test -f 'lisp/re/rec.c'; then $(CYGPATH_W) 'lisp/re/rec.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/rec.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libre_a-rec.Tpo $(DEPDIR)/libre_a-rec.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/rec.c' object='libre_a-rec.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -c -o libre_a-rec.obj `if test -f 'lisp/re/rec.c'; then $(CYGPATH_W) 'lisp/re/rec.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/rec.c'; fi`
-
-libre_a-reo.o: lisp/re/reo.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -MT libre_a-reo.o -MD -MP -MF $(DEPDIR)/libre_a-reo.Tpo -c -o libre_a-reo.o `test -f 'lisp/re/reo.c' || echo '$(srcdir)/'`lisp/re/reo.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libre_a-reo.Tpo $(DEPDIR)/libre_a-reo.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/reo.c' object='libre_a-reo.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -c -o libre_a-reo.o `test -f 'lisp/re/reo.c' || echo '$(srcdir)/'`lisp/re/reo.c
-
-libre_a-reo.obj: lisp/re/reo.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -MT libre_a-reo.obj -MD -MP -MF $(DEPDIR)/libre_a-reo.Tpo -c -o libre_a-reo.obj `if test -f 'lisp/re/reo.c'; then $(CYGPATH_W) 'lisp/re/reo.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/reo.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libre_a-reo.Tpo $(DEPDIR)/libre_a-reo.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/reo.c' object='libre_a-reo.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libre_a_CFLAGS) $(CFLAGS) -c -o libre_a-reo.obj `if test -f 'lisp/re/reo.c'; then $(CYGPATH_W) 'lisp/re/reo.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/reo.c'; fi`
-
-lisp_lsp-hash.o: hash.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-hash.o -MD -MP -MF $(DEPDIR)/lisp_lsp-hash.Tpo -c -o lisp_lsp-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-hash.Tpo $(DEPDIR)/lisp_lsp-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hash.c' object='lisp_lsp-hash.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
-
-lisp_lsp-hash.obj: hash.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-hash.obj -MD -MP -MF $(DEPDIR)/lisp_lsp-hash.Tpo -c -o lisp_lsp-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-hash.Tpo $(DEPDIR)/lisp_lsp-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hash.c' object='lisp_lsp-hash.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`
-
-lisp_lsp-lsp.o: lisp/lsp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-lsp.o -MD -MP -MF $(DEPDIR)/lisp_lsp-lsp.Tpo -c -o lisp_lsp-lsp.o `test -f 'lisp/lsp.c' || echo '$(srcdir)/'`lisp/lsp.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-lsp.Tpo $(DEPDIR)/lisp_lsp-lsp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/lsp.c' object='lisp_lsp-lsp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-lsp.o `test -f 'lisp/lsp.c' || echo '$(srcdir)/'`lisp/lsp.c
-
-lisp_lsp-lsp.obj: lisp/lsp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-lsp.obj -MD -MP -MF $(DEPDIR)/lisp_lsp-lsp.Tpo -c -o lisp_lsp-lsp.obj `if test -f 'lisp/lsp.c'; then $(CYGPATH_W) 'lisp/lsp.c'; else $(CYGPATH_W) '$(srcdir)/lisp/lsp.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-lsp.Tpo $(DEPDIR)/lisp_lsp-lsp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/lsp.c' object='lisp_lsp-lsp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-lsp.obj `if test -f 'lisp/lsp.c'; then $(CYGPATH_W) 'lisp/lsp.c'; else $(CYGPATH_W) '$(srcdir)/lisp/lsp.c'; fi`
-
-lisp_lsp-realpath.o: realpath.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-realpath.o -MD -MP -MF $(DEPDIR)/lisp_lsp-realpath.Tpo -c -o lisp_lsp-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-realpath.Tpo $(DEPDIR)/lisp_lsp-realpath.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='realpath.c' object='lisp_lsp-realpath.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c
-
-lisp_lsp-realpath.obj: realpath.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-realpath.obj -MD -MP -MF $(DEPDIR)/lisp_lsp-realpath.Tpo -c -o lisp_lsp-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-realpath.Tpo $(DEPDIR)/lisp_lsp-realpath.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='realpath.c' object='lisp_lsp-realpath.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi`
-
-lisp_lsp-strcasecmp.o: strcasecmp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-strcasecmp.o -MD -MP -MF $(DEPDIR)/lisp_lsp-strcasecmp.Tpo -c -o lisp_lsp-strcasecmp.o `test -f 'strcasecmp.c' || echo '$(srcdir)/'`strcasecmp.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-strcasecmp.Tpo $(DEPDIR)/lisp_lsp-strcasecmp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='strcasecmp.c' object='lisp_lsp-strcasecmp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-strcasecmp.o `test -f 'strcasecmp.c' || echo '$(srcdir)/'`strcasecmp.c
-
-lisp_lsp-strcasecmp.obj: strcasecmp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -MT lisp_lsp-strcasecmp.obj -MD -MP -MF $(DEPDIR)/lisp_lsp-strcasecmp.Tpo -c -o lisp_lsp-strcasecmp.obj `if test -f 'strcasecmp.c'; then $(CYGPATH_W) 'strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/strcasecmp.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_lsp-strcasecmp.Tpo $(DEPDIR)/lisp_lsp-strcasecmp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='strcasecmp.c' object='lisp_lsp-strcasecmp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_lsp_CFLAGS) $(CFLAGS) -c -o lisp_lsp-strcasecmp.obj `if test -f 'strcasecmp.c'; then $(CYGPATH_W) 'strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/strcasecmp.c'; fi`
-
-lisp_re_tests-tests.o: lisp/re/tests.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_re_tests_CFLAGS) $(CFLAGS) -MT lisp_re_tests-tests.o -MD -MP -MF $(DEPDIR)/lisp_re_tests-tests.Tpo -c -o lisp_re_tests-tests.o `test -f 'lisp/re/tests.c' || echo '$(srcdir)/'`lisp/re/tests.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_re_tests-tests.Tpo $(DEPDIR)/lisp_re_tests-tests.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/tests.c' object='lisp_re_tests-tests.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_re_tests_CFLAGS) $(CFLAGS) -c -o lisp_re_tests-tests.o `test -f 'lisp/re/tests.c' || echo '$(srcdir)/'`lisp/re/tests.c
-
-lisp_re_tests-tests.obj: lisp/re/tests.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_re_tests_CFLAGS) $(CFLAGS) -MT lisp_re_tests-tests.obj -MD -MP -MF $(DEPDIR)/lisp_re_tests-tests.Tpo -c -o lisp_re_tests-tests.obj `if test -f 'lisp/re/tests.c'; then $(CYGPATH_W) 'lisp/re/tests.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/tests.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/lisp_re_tests-tests.Tpo $(DEPDIR)/lisp_re_tests-tests.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp/re/tests.c' object='lisp_re_tests-tests.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lisp_re_tests_CFLAGS) $(CFLAGS) -c -o lisp_re_tests-tests.obj `if test -f 'lisp/re/tests.c'; then $(CYGPATH_W) 'lisp/re/tests.c'; else $(CYGPATH_W) '$(srcdir)/lisp/re/tests.c'; fi`
-
-xedit-commands.o: commands.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-commands.o -MD -MP -MF $(DEPDIR)/xedit-commands.Tpo -c -o xedit-commands.o `test -f 'commands.c' || echo '$(srcdir)/'`commands.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-commands.Tpo $(DEPDIR)/xedit-commands.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='commands.c' object='xedit-commands.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-commands.o `test -f 'commands.c' || echo '$(srcdir)/'`commands.c
-
-xedit-commands.obj: commands.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-commands.obj -MD -MP -MF $(DEPDIR)/xedit-commands.Tpo -c -o xedit-commands.obj `if test -f 'commands.c'; then $(CYGPATH_W) 'commands.c'; else $(CYGPATH_W) '$(srcdir)/commands.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-commands.Tpo $(DEPDIR)/xedit-commands.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='commands.c' object='xedit-commands.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-commands.obj `if test -f 'commands.c'; then $(CYGPATH_W) 'commands.c'; else $(CYGPATH_W) '$(srcdir)/commands.c'; fi`
-
-xedit-hash.o: hash.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-hash.o -MD -MP -MF $(DEPDIR)/xedit-hash.Tpo -c -o xedit-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-hash.Tpo $(DEPDIR)/xedit-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hash.c' object='xedit-hash.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
-
-xedit-hash.obj: hash.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-hash.obj -MD -MP -MF $(DEPDIR)/xedit-hash.Tpo -c -o xedit-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-hash.Tpo $(DEPDIR)/xedit-hash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hash.c' object='xedit-hash.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`
-
-xedit-hook.o: hook.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-hook.o -MD -MP -MF $(DEPDIR)/xedit-hook.Tpo -c -o xedit-hook.o `test -f 'hook.c' || echo '$(srcdir)/'`hook.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-hook.Tpo $(DEPDIR)/xedit-hook.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hook.c' object='xedit-hook.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-hook.o `test -f 'hook.c' || echo '$(srcdir)/'`hook.c
-
-xedit-hook.obj: hook.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-hook.obj -MD -MP -MF $(DEPDIR)/xedit-hook.Tpo -c -o xedit-hook.obj `if test -f 'hook.c'; then $(CYGPATH_W) 'hook.c'; else $(CYGPATH_W) '$(srcdir)/hook.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-hook.Tpo $(DEPDIR)/xedit-hook.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hook.c' object='xedit-hook.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-hook.obj `if test -f 'hook.c'; then $(CYGPATH_W) 'hook.c'; else $(CYGPATH_W) '$(srcdir)/hook.c'; fi`
-
-xedit-ispell.o: ispell.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-ispell.o -MD -MP -MF $(DEPDIR)/xedit-ispell.Tpo -c -o xedit-ispell.o `test -f 'ispell.c' || echo '$(srcdir)/'`ispell.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-ispell.Tpo $(DEPDIR)/xedit-ispell.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ispell.c' object='xedit-ispell.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-ispell.o `test -f 'ispell.c' || echo '$(srcdir)/'`ispell.c
-
-xedit-ispell.obj: ispell.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-ispell.obj -MD -MP -MF $(DEPDIR)/xedit-ispell.Tpo -c -o xedit-ispell.obj `if test -f 'ispell.c'; then $(CYGPATH_W) 'ispell.c'; else $(CYGPATH_W) '$(srcdir)/ispell.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-ispell.Tpo $(DEPDIR)/xedit-ispell.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='ispell.c' object='xedit-ispell.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-ispell.obj `if test -f 'ispell.c'; then $(CYGPATH_W) 'ispell.c'; else $(CYGPATH_W) '$(srcdir)/ispell.c'; fi`
-
-xedit-lisp.o: lisp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-lisp.o -MD -MP -MF $(DEPDIR)/xedit-lisp.Tpo -c -o xedit-lisp.o `test -f 'lisp.c' || echo '$(srcdir)/'`lisp.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-lisp.Tpo $(DEPDIR)/xedit-lisp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp.c' object='xedit-lisp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-lisp.o `test -f 'lisp.c' || echo '$(srcdir)/'`lisp.c
-
-xedit-lisp.obj: lisp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-lisp.obj -MD -MP -MF $(DEPDIR)/xedit-lisp.Tpo -c -o xedit-lisp.obj `if test -f 'lisp.c'; then $(CYGPATH_W) 'lisp.c'; else $(CYGPATH_W) '$(srcdir)/lisp.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-lisp.Tpo $(DEPDIR)/xedit-lisp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='lisp.c' object='xedit-lisp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-lisp.obj `if test -f 'lisp.c'; then $(CYGPATH_W) 'lisp.c'; else $(CYGPATH_W) '$(srcdir)/lisp.c'; fi`
-
-xedit-options.o: options.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-options.o -MD -MP -MF $(DEPDIR)/xedit-options.Tpo -c -o xedit-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-options.Tpo $(DEPDIR)/xedit-options.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='options.c' object='xedit-options.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
-
-xedit-options.obj: options.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-options.obj -MD -MP -MF $(DEPDIR)/xedit-options.Tpo -c -o xedit-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-options.Tpo $(DEPDIR)/xedit-options.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='options.c' object='xedit-options.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
-
-xedit-tags.o: tags.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-tags.o -MD -MP -MF $(DEPDIR)/xedit-tags.Tpo -c -o xedit-tags.o `test -f 'tags.c' || echo '$(srcdir)/'`tags.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-tags.Tpo $(DEPDIR)/xedit-tags.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tags.c' object='xedit-tags.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-tags.o `test -f 'tags.c' || echo '$(srcdir)/'`tags.c
-
-xedit-tags.obj: tags.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-tags.obj -MD -MP -MF $(DEPDIR)/xedit-tags.Tpo -c -o xedit-tags.obj `if test -f 'tags.c'; then $(CYGPATH_W) 'tags.c'; else $(CYGPATH_W) '$(srcdir)/tags.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-tags.Tpo $(DEPDIR)/xedit-tags.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='tags.c' object='xedit-tags.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-tags.obj `if test -f 'tags.c'; then $(CYGPATH_W) 'tags.c'; else $(CYGPATH_W) '$(srcdir)/tags.c'; fi`
-
-xedit-util.o: util.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-util.o -MD -MP -MF $(DEPDIR)/xedit-util.Tpo -c -o xedit-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-util.Tpo $(DEPDIR)/xedit-util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='xedit-util.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
-
-xedit-util.obj: util.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-util.obj -MD -MP -MF $(DEPDIR)/xedit-util.Tpo -c -o xedit-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-util.Tpo $(DEPDIR)/xedit-util.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='util.c' object='xedit-util.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
-
-xedit-xedit.o: xedit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-xedit.o -MD -MP -MF $(DEPDIR)/xedit-xedit.Tpo -c -o xedit-xedit.o `test -f 'xedit.c' || echo '$(srcdir)/'`xedit.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-xedit.Tpo $(DEPDIR)/xedit-xedit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xedit.c' object='xedit-xedit.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-xedit.o `test -f 'xedit.c' || echo '$(srcdir)/'`xedit.c
-
-xedit-xedit.obj: xedit.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-xedit.obj -MD -MP -MF $(DEPDIR)/xedit-xedit.Tpo -c -o xedit-xedit.obj `if test -f 'xedit.c'; then $(CYGPATH_W) 'xedit.c'; else $(CYGPATH_W) '$(srcdir)/xedit.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-xedit.Tpo $(DEPDIR)/xedit-xedit.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xedit.c' object='xedit-xedit.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-xedit.obj `if test -f 'xedit.c'; then $(CYGPATH_W) 'xedit.c'; else $(CYGPATH_W) '$(srcdir)/xedit.c'; fi`
-
-xedit-realpath.o: realpath.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-realpath.o -MD -MP -MF $(DEPDIR)/xedit-realpath.Tpo -c -o xedit-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-realpath.Tpo $(DEPDIR)/xedit-realpath.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='realpath.c' object='xedit-realpath.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c
-
-xedit-realpath.obj: realpath.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-realpath.obj -MD -MP -MF $(DEPDIR)/xedit-realpath.Tpo -c -o xedit-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-realpath.Tpo $(DEPDIR)/xedit-realpath.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='realpath.c' object='xedit-realpath.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi`
-
-xedit-strcasecmp.o: strcasecmp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-strcasecmp.o -MD -MP -MF $(DEPDIR)/xedit-strcasecmp.Tpo -c -o xedit-strcasecmp.o `test -f 'strcasecmp.c' || echo '$(srcdir)/'`strcasecmp.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-strcasecmp.Tpo $(DEPDIR)/xedit-strcasecmp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='strcasecmp.c' object='xedit-strcasecmp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-strcasecmp.o `test -f 'strcasecmp.c' || echo '$(srcdir)/'`strcasecmp.c
-
-xedit-strcasecmp.obj: strcasecmp.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-strcasecmp.obj -MD -MP -MF $(DEPDIR)/xedit-strcasecmp.Tpo -c -o xedit-strcasecmp.obj `if test -f 'strcasecmp.c'; then $(CYGPATH_W) 'strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/strcasecmp.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-strcasecmp.Tpo $(DEPDIR)/xedit-strcasecmp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='strcasecmp.c' object='xedit-strcasecmp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-strcasecmp.obj `if test -f 'strcasecmp.c'; then $(CYGPATH_W) 'strcasecmp.c'; else $(CYGPATH_W) '$(srcdir)/strcasecmp.c'; fi`
-
-xedit-print.o: print.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-print.o -MD -MP -MF $(DEPDIR)/xedit-print.Tpo -c -o xedit-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-print.Tpo $(DEPDIR)/xedit-print.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='print.c' object='xedit-print.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c
-
-xedit-print.obj: print.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-print.obj -MD -MP -MF $(DEPDIR)/xedit-print.Tpo -c -o xedit-print.obj `if test -f 'print.c'; then $(CYGPATH_W) 'print.c'; else $(CYGPATH_W) '$(srcdir)/print.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-print.Tpo $(DEPDIR)/xedit-print.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='print.c' object='xedit-print.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-print.obj `if test -f 'print.c'; then $(CYGPATH_W) 'print.c'; else $(CYGPATH_W) '$(srcdir)/print.c'; fi`
-
-xedit-printdialog.o: printdialog.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-printdialog.o -MD -MP -MF $(DEPDIR)/xedit-printdialog.Tpo -c -o xedit-printdialog.o `test -f 'printdialog.c' || echo '$(srcdir)/'`printdialog.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-printdialog.Tpo $(DEPDIR)/xedit-printdialog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='printdialog.c' object='xedit-printdialog.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-printdialog.o `test -f 'printdialog.c' || echo '$(srcdir)/'`printdialog.c
-
-xedit-printdialog.obj: printdialog.c
-@am__fastdepCC_TRUE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -MT xedit-printdialog.obj -MD -MP -MF $(DEPDIR)/xedit-printdialog.Tpo -c -o xedit-printdialog.obj `if test -f 'printdialog.c'; then $(CYGPATH_W) 'printdialog.c'; else $(CYGPATH_W) '$(srcdir)/printdialog.c'; fi`
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/xedit-printdialog.Tpo $(DEPDIR)/xedit-printdialog.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='printdialog.c' object='xedit-printdialog.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xedit_CFLAGS) $(CFLAGS) -c -o xedit-printdialog.obj `if test -f 'printdialog.c'; then $(CYGPATH_W) 'printdialog.c'; else $(CYGPATH_W) '$(srcdir)/printdialog.c'; fi`
-install-appdefaultDATA: $(appdefault_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
-       done
-
-uninstall-appdefaultDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
-install-appmanDATA: $(appman_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
-       done
-
-uninstall-appmanDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
-install-dist_lispDATA: $(dist_lisp_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(lispdir)" || $(MKDIR_P) "$(DESTDIR)$(lispdir)"
-       @list='$(dist_lisp_DATA)'; test -n "$(lispdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(lispdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(lispdir)" || exit $$?; \
-       done
-
-uninstall-dist_lispDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_lisp_DATA)'; test -n "$(lispdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(lispdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(lispdir)" && rm -f $$files
-install-dist_progmodesDATA: $(dist_progmodes_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(progmodesdir)" || $(MKDIR_P) "$(DESTDIR)$(progmodesdir)"
-       @list='$(dist_progmodes_DATA)'; test -n "$(progmodesdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(progmodesdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(progmodesdir)" || exit $$?; \
-       done
-
-uninstall-dist_progmodesDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_progmodes_DATA)'; test -n "$(progmodesdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(progmodesdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(progmodesdir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       set x; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       shift; \
-       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         if test $$# -gt 0; then \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             "$$@" $$unique; \
-         else \
-           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-             $$unique; \
-         fi; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && $(am__cd) $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       $(am__remove_distdir)
-       test -d "$(distdir)" || mkdir "$(distdir)"
-       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       list='$(DISTFILES)'; \
-         dist_files=`for file in $$list; do echo $$file; done | \
-         sed -e "s|^$$srcdirstrip/||;t" \
-             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-       case $$dist_files in \
-         */*) $(MKDIR_P) `echo "$$dist_files" | \
-                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-                          sort -u` ;; \
-       esac; \
-       for file in $$dist_files; do \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         if test -d $$d/$$file; then \
-           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-           if test -d "$(distdir)/$$file"; then \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-         else \
-           test -f "$(distdir)/$$file" \
-           || cp -p $$d/$$file "$(distdir)/$$file" \
-           || exit 1; \
-         fi; \
-       done
-       $(MAKE) $(AM_MAKEFLAGS) \
-         top_distdir="$(top_distdir)" distdir="$(distdir)" \
-         dist-hook
-       -test -n "$(am__skip_mode_fix)" \
-       || find "$(distdir)" -type d ! -perm -755 \
-               -exec chmod u+rwx,go+rx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r "$(distdir)"
-dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-dist-lzma: distdir
-       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-       $(am__remove_distdir)
-
-dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
-       $(am__remove_distdir)
-
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
-
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
-
-dist-zip: distdir
-       -rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
-
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       case '$(DIST_ARCHIVES)' in \
-       *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
-       *.tar.bz2*) \
-         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.lzma*) \
-         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
-       *.tar.xz*) \
-         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
-       *.zip*) \
-         unzip $(distdir).zip ;;\
-       esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
-       chmod a-w $(distdir)
-       test -d $(distdir)/_build || exit 0; \
-       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-           $(DISTCHECK_CONFIGURE_FLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-               distuninstallcheck \
-         && chmod -R a-w "$$dc_install_base" \
-         && ({ \
-              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-             } || { rm -rf "$$dc_destdir"; exit 1; }) \
-         && rm -rf "$$dc_destdir" \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
-         && cd "$$am__cwd" \
-         || exit 1
-       $(am__remove_distdir)
-       @(echo "$(distdir) archives ready for distribution: "; \
-         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-          || { echo "ERROR: files left after uninstall:" ; \
-               if test -n "$(DESTDIR)"; then \
-                 echo "  (check DESTDIR support)"; \
-               fi ; \
-               $(distuninstallcheck_listfiles) ; \
-               exit 1; } >&2
-distcleancheck: distclean
-       @if test '$(srcdir)' = . ; then \
-         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-         exit 1 ; \
-       fi
-       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-         || { echo "ERROR: files left in build directory after distclean:" ; \
-              $(distcleancheck_listfiles) ; \
-              exit 1; } >&2
-check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(DATA) config.h
-installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(lispdir)" "$(DESTDIR)$(progmodesdir)"; do \
-         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-       -rm -f lisp/$(am__dirstamp)
-       -rm -f lisp/re/$(am__dirstamp)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
-       clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-appdefaultDATA install-appmanDATA \
-       install-dist_lispDATA install-dist_progmodesDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-binPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-dist_lispDATA \
-       uninstall-dist_progmodesDATA
-
-.MAKE: all install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-       clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
-       clean-noinstPROGRAMS ctags dist dist-all dist-bzip2 dist-gzip \
-       dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-       distcheck distclean distclean-compile distclean-generic \
-       distclean-hdr distclean-tags distcleancheck distdir \
-       distuninstallcheck dvi dvi-am html html-am info info-am \
-       install install-am install-appdefaultDATA install-appmanDATA \
-       install-binPROGRAMS install-data install-data-am \
-       install-dist_lispDATA install-dist_progmodesDATA install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-appdefaultDATA \
-       uninstall-appmanDATA uninstall-binPROGRAMS \
-       uninstall-dist_lispDATA uninstall-dist_progmodesDATA
-
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
-
-.PHONY: ChangeLog
-
-ChangeLog:
-       (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
-
-dist-hook: ChangeLog
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/xedit/NEWS b/xedit/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xedit/README b/xedit/README
deleted file mode 100644 (file)
index 4188af3..0000000
+++ /dev/null
@@ -1,604 +0,0 @@
-      Xedit is a simple text editor for X.
-
-      Please check xedit(1) for  information about resources  and configurable
-  options.
-
-      The authors  file should  list the  original authors  of all  files, but
-  unfortunately most  collaborators and  people that  changed portions  of the
-  code is not listed.
-
-
-      List of default keyboard commands.
-  Uppercase letters means both, uppercase and lowercase.
-  Lowercase letter usually means Shift key is not pressed.
-  C-    Means Control key.
-  M-    Means Meta key.
-        Usually Alt key has the same effect.
-  S-    Means Shift key.
-
-  C-A   Move cursor to beginning of line.
-  C-B or Left
-        Move cursor backwards one character.
-  C-C   Insert CUT_BUFFER0 selection at cursor position.
-  C-D   Delete next character.
-  C-E   Move cursor to end of line.
-  C-F or Right
-        Move cursor forwards one character.
-  C-G   Keyboard reset.
-        Use it to switch direction in the Undo stack, i.e. switch between
-        Undo and Redo.
-        It can also be used to stop the lisp interpreter if it is executing
-        code.
-  C-H   Deletes character before cursor.
-  C-J   Adds a newline and indent.
-        If the current buffer is the *scratch* buffer, it will work
-        like C-X,C-E, but print the lisp output directly to the scratch
-        buffer. Examples:
-        (list 1 2 3) C-J will print (1 2 3) and move the cursor to
-        the next line.
-  C-K   Deletes text from cursor position to end of line.
-  C-L   Redraw text window.
-  C-M   Adds a newline.
-  C-N or Down
-        Move cursor to next line.
-  C-O   Adds one newline at cursor position without moving cursor.
-  C-P or Up
-        Move cursor to previous line.
-  C-R   Opens search dialog, searching backwards.
-  C-S   Opens search dialog, searching forwards.
-  C-T   Transpose characters.
-  C-U   Starts multiply mode.
-        Multiply mode means that most keyboard commands will be repeated
-        by its parameter. After pressing C-U type a number, that can be
-        negative. Examples:
-        C-U 10 C-F  will move the cursor 10 characters forwards
-        C-U -10 C-F will move the cursor 10 characters backwards
-        If no number is specified, or if the number zero is specified,
-        the default value is 4.
-  C-V or PageDown
-        Move cursor to next page.
-  C-W   Kills current selection.
-        C-W is also useful when there is no active selection, to return to
-        the previous position the left mouse was clicked in the text window.
-  C-Y   Inserts SECONDARY selection.
-        This usually means text delete with commands other than by just
-        pressing Backspace or Delete (that can be multiplied)
-  C-Z   Scroll one line up.
-  M-B or C-Left
-        Move cursor backwards one word.
-        C-Left only moves over alphabetic or numeric characters
-  M-C   Capitalize word under cursor position, or next word.
-  M-F or C-Right
-        Move cursor forwards one word.
-        C-Right only moves over alphabetic or numeric characters.
-  M-I   Opens  a dialog prompting for a file name to be inserted at the
-        cursor position.
-        (This isn't very user friendly, this is a cavemen interface, you will
-        love it, you will never use it).
-  M-K   Kills text from cursor position to end of paragraph.
-  M-L   Downcase word at cursor position or next word.
-  M-Q   Format paragraph.
-        Xedit interfaces Xaw code that allows several types of text
-        formatting. To use it, you need to Select "Auto Fill" in the
-        "Edit Menu" and select values for "Break Columns". After that,
-        Select "Edit Menu"->"Justification" for the available options.
-        Text typed will usually be automatically corrected, but if you
-        need to change text in the middle of a previous line, use M-Q
-        to reformat, and C-_ to undo if required.
-        Examples of text:
-
-                    This text with align
-                    left and break
-                    columns at 20 and
-                    40.
-
-                         This text with align
-                              right and break
-                            columns at 25 and
-                            45. Remember that
-                            Auto Fill must be
-                         selected. And it may
-                         be required to press
-                          M-Q when going back
-                             to edit previous
-                                       lines.
-
-                                         This text with align center
-                                         and break columns at 40 and
-                                        70. A good tip is to make sure
-                                         there are empty lines before
-                                        and after the aligned text, so
-                                        that M-Q will not format more
-                                             text than it should.
-
-                 This text  with full  align,
-               note that  it will  spread the
-               words  to   fully   fill   the
-               configured break  columns,  in
-               this case 15 and 45. Also note
-               that  it  doesn't  remove  any
-               extra  indentation   from  the
-               first  line.   This   may   be
-               considered a  bug or  feature,
-               but  it   doesn't  respect   2
-               spaces after  an '.'  dot. And
-               it doesn't align the last line
-               of text.
-
-  This text with Auto Fill disabled. When Auto  Fill is disabled, tabs are
-usually preserved, like this,          and                     this. But it
-will basically format the text to not be larger than the text widget screen
-width and. But it the screen is scrolled horizontally, it will not work as
-expected, the advantage over the above interface is that is considers font
-characters width, while the other interface assumes fixed width characters.
-
-        Notice that "auto formatting" with Auto Fill mode is done when
-        pressing enter, but information isn't saved per paragraph, so
-        if values of align or break columns are changed, trying to edit
-        a text block with different configuration will not give the expected
-        results.
-        Also notice that lines starting with non printable characters aren't
-        automatically formatted. This is helpful for some editing modes
-        where symbols can be used before lines in a paragraph. If you don't
-        need this feature, usually pressing Space or Tab is enough to put the
-        cursor at the proper position.
-  M-U   Upcase word at cursor position or next word.
-  M-V or PageUp
-        Move cursor to previous page.
-  M-Y   Kill ring yank feature. Basically it will circulate over all
-        text that has been cut in the current session. Keep pressing it
-        until happy :-)
-  M-Z   Scrolls one line down.
-  M-D   Kill word at cursor position or next word.
-  S-M-D Delete word at cursor position or next word.
-        Does not go to the kill ring.
-  M-H or M-Delete or M-Backspace.
-        Kill word at cursor position or previous word.
-  S-M-H or S-M-Delete or S-M-Backspace
-        Delete word at cursor position or previous word.
-        Does not go to the kill ring.
-  M-.   Find definition/declaration of symbol string of selected text, and/or
-        finds next tag when more than one definition exists for the symbol.
-  M-< or Home
-        Move cursor to beginning of file.
-  M-> or End
-        Move cursor to end of file.
-  M-] or C-Down
-        Move cursor to next paragraph.
-  M-[ or C-Up
-        Move cursor to previous paragraph.
-  C-_ or C-X,U
-        Undo.
-        If enabled in the given textwidget. Not enabled by default in the
-        message window and filename window, or any of the other text widgets
-        in the several available dialogs.
-  C-\ or C-Kanji
-        Reconnect Input Method.
-        In international mode (probably broken interface).
-  S-Insert
-        Insert PRIMARY selection from CUT_BUFFER0.
-  C-Q
-        Followed by any character, will insert the next typed character
-        useful to insert control characters. For example C-Q,C-L will
-        insert ^L at the cursor position.
-  LeftMouseButton
-        When pressed marks the start of a PRIMARY selection at CUTBUFFER0
-        When moved while pressed extends the selection.
-  MiddleMouseButton
-        When pressed, inserts the PRIMARY selection at CUTBUFFER0 at
-        the cursor position.
-  RightMouseButton
-        Can be used to adjust a selection done with LeftMouseButton.
-  C-A,Tab
-        If the loaded file has a indentation rules file, C or Lisp, xedit
-        will reindent the line. Also, entering a fresh character on a
-        newline should be enough to move the cursor to the proper position.
-        To override it, you may need to use the C-U to multiply the action,
-        as it will only indent if only one character was added.
-  C-X,C-C or (Pressing the Quit button)
-        Exits xedit.
-        If there are unsaved files, a message will be printed asking to
-        "exit" again, or save the files.
-  C-X,C-E
-        Execute lisp expression before the cursor position.
-  C-X,C-F
-        Changes keyboard input focus to the filename text input window.
-        In this mode, pressing Tab will try to complete the filename
-        being typed.
-        When more than one match exists, pressing Tab again will display
-        the directory navigation window.
-        The initial search path usually is the basename of the file loaded
-        in the current textwindow, or currently directory from where
-        xedit was started if the *scratch* is the current "buffer".
-        The character ~ can be used as a shortcut for the home directory
-        and ~username will be replaced by the home directory of "username"
-        if it exists.
-  C-X,C-S or (Pressing the Save button)
-        Saves the file in the current text window.
-  C-X,Tab
-        Indents the current paragraph.
-        Use the C-U modifier to specify the number of spaces to insert
-        or remove if the C-U parameter is negative.
-  C-X,0
-        Deletes the current window.
-        The file being edited is not unloaded.
-  C-X,1
-        Deletes the other window.
-        The file being edited is not unloaded.
-  C-X,2
-        Splits vertically the current window.
-  C-X,3
-        Splits vertically the current window.
-  C-X,b
-        Switch the contents of the current window to the next file in
-        the list of loaded files.
-  C-X,d
-        Displays the directory listing window.
-        In this window, it is possible to navigate in the file system
-        to choose a file to edit.
-        Usually, this is the same as pressing C-X,C-F,Tab
-        See C-X,C-F for more information.
-  C-X,k
-        Unloads the file being edited.
-        If the file has not been saved, a message will be displayed,
-        asking to either press C-X,k again, or save the file
-        The *scratch* buffer cannot be killed and will always
-        prints a warning when exiting xedit. This is the expected behavior.
-  C-X,o
-        Switch input focus to the other window, making it the current one
-        If the editor doesn't have splited windows, this command is ignored.
-  Insert
-        Switches between insert and overwrite mode.
-        In overwrite mode text is typed over existing file contents,
-        only extending the file contents when typing at the end of
-        a line (or file).
-  Escape
-        Enters the line edit mode.
-        In this mode it is possible to use regex expressions to search and
-        replace the contents of the file loaded in the current text window.
-        Refer to the xedit(1) manpage for more information of the regex
-        expression format.
-        Note that the regex used by xedit isn't IEEE Std 1003.2 compliant,
-        and not compliant with most regex implementations in that it doesn't
-        support some complex search patterns, usually involving patterns
-        like ((.*)+)? that may require too much restarts or have several
-        correct interpretations for multiple matches. Also, it always does
-        minimal matching, and it is not configurable like in pcre, example:
-        searching "a1a1a1" with the pattern "(.*)\d" will find "a1" and
-        not "a1a1a1" as could be expected.
-        Please refer to lisp/re/README for more information on the supported
-        regex expressions.
-  C-LeftMouseButton
-        Displays the "File Menu" from where it is possible to select a
-        new file to be edited in the current window.
-  C-MiddleMouseButton
-        Displays the "Edit Menu" that usually has the following options:
-     +------------------+-------------+
-     | Wrapping      -> | Never       |
-     |                  | Line        |
-     |                  | Word        |
-     | Auto Fill        +-------------+
-     |                  +-------------+
-     | Justification -> | Left        |
-     |                  | Right       |
-     |                  | Center      |
-     |                  | Full        |
-     |                  +-------------+
-     | Break Columns... |
-     |                  +-------------+
-     | Scrollbars    -> | Vertical    |
-     |                  | Horizontal  |
-     |                  +-------------+
-     |                  +-------------+
-     | Edit Mode     -> | Plain/None  |
-     |                  | C/C++       |
-     |                  | Lisp/Scheme |
-     |                  | X imake     |
-     |                  | Makefile    |
-     |                  | Unix shell  |
-     |                  | SGML        |
-     |                  | HTML        |
-     |                  | Man page    |
-     |                  | X resource  |
-     |                  | XF86Config  |
-     |                  | RPM spec    |
-     |                  | XFree86 log |
-     |                  | Patch file  |
-     +------------------+-------------+
-        "Wrapping" is disabled if "Auto Fill" is enabled.
-        "Justification" and "Break Columns..." are enabled if "Auto Fill"
-        is also enabled.
-        "Edit Mode" lists the available syntax highlight and indentation
-        rules defined.
-        Note that most of these options don't work in "international" mode.
-        Several xedit interfaces works only with 8 bits encodings, and
-        doesn't properly handle UTF-8.
-  C-RightMouseButton
-        Displays the "Option Menu".
-        Currently the only option is an Ispell frontend.
-  FourthMouseButton (usually also moving up the mouse wheel)
-        Scroll one line down
-  FifthMouseButton (usually also moving down the mouse wheel)
-        Scroll one line up
-
-
-
-      There  is   also   some   documentation   in   lisp/README,   lisp/TODO,
-  lisp/re/README, lisp/re/tests.txt, and comments/justifications/wishlists for
-  the cases the interpreter fail to give the proper result for a given test.
-
-      The  lisp  interpreter  implements  most  of   a  standard  COMMON  LISP
-  environment, but the  compiler generates only  byte code and  not everything
-  can be compiled, in those cases the interpreter  does the work. Examples are
-  constructs involving  UNWIND-PROTECT or  any  kind of  jump  outside of  the
-  current function body.
-
-      For more  information please  consult any  COMMON LISP  documentation or
-  tutorial.
-
-
-
-      Simple tutorial on writing a "foolang" syntax highlight mode for xedit.
-
-  Create a file called foolang.lsp
-  Add:
-  --
-  (require "syntax")
-  (require "indent")
-  (in-package "XEDIT")
-  --
-  to foolang.lsp
-  Check the available files if you want a custom property, or to know about
-  the available ones. One example is:
-  --
-  (defsynprop *prop-foolang*
-    "foolang"
-    :font       "fixed"
-    :foreground "rgb:a/b/c"
-    :background "rgb:1/2/3"
-    :underline  t
-    :overstrike t)
-  --
-  Check  lisp/modules/xedit.lsp  for   the  other  options,   like  subscript,
-  superscript and/or combining XLFD properties.
-  Create a syntax definition for foolang. Check the definition of defsyntax in
-  lisp/modules/syntax.lsp for more details. One example for foolang is:
-  --
-  (defsyntax *foolang-mode* :foolang nil nil nil
-    ;; use the sample property created for foolang whenever the string
-    ;; foolang is found at the toplevel
-    (syntoken "\\<foolang\\>" :property *prop-foolang*)
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; process C style comments
-    (syntoken "/*" :nospec t :begin :comment :contained t)
-      ;; contained is an option to not "export" this definition to child
-      ;; tables
-
-    (syntable :comment *prop-comment* #'default-indent
-      ;; #'default-indent means a very simple indent that follows indentation
-      ;; of previous line. Use nil for no indentation
-
-      ;; Don't start a new table, instead flag as an error if nested
-      (syntoken "/*" :nospec t :property *prop-error*)
-        ;; :nospec t sets the RE_NOSPEC flag for the regex, i.e. searches
-        ;; a literal string, and * will not be a special character
-
-      (syntoken "XXX|TODO|FIXME" :property *prop-annotation*)
-        ;; just to make it easier to flag some important comment
-
-      (syntoken "*/" :nospec t :switch -1)
-        ;; The :switch argument is the number of tables to "pop", in
-        ;; this case, we are at table :comment, and :switch -1 returns
-        ;; to table :foolang, that is the "root" table
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Process lisp comments that can nest
-    (syntable :lisp-comment *prop-comment* nil
-
-      ;; Start a comment, possibly nested
-      (syntoken "#|" :nospec t :begin :lisp-comment)
-
-      ;; Returns to previous comment in stack or to main :foolang table
-      (syntoken "|#" :nospec t :switch -1)
-
-      ;; For easier flagging important comments
-      (syntoken "XXX|FIXME|TODO" :property *prop-annotation*)
-    )
-
-    ;; This is usually in the end of the list, but can be anywhere,
-    ;; just that if it isn't at the end, conflicting rules are resolved
-    ;; by declaration order
-    (synaugment :lisp-comment)
-      ;; Adds the :lisp-comment table to :foolang table
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Lisp like strings that don't need a \ at the end of the line
-    (syntable :lisp-string *prop-string* nil
-      ;; ignore a escaped " in the middle of the string
-      (syntoken "\\\\.")
-        ;; Note that no options are used, just keep using the current
-        ;; property. Unfortunately, backslashes must be escaped twice.
-        ;; Once for the lisp reader and once for the regex compiler.
-
-      (syntoken "\"" :nospec: t :switch -1)
-        ;; :nospec is used just to create a faster regex. switch -1
-        ;; returns to the previous syntax table. It isn't an error to
-        ;; try to go down the "root" table, but if that happens, it
-        ;; probably means either wrong syntax definition of malformed input.
-    )
-
-    (synaugment :lisp-string)
-      ;; Adds the :lisp-string table to :foolang table
-      ;; Note that since there isn't a rule to start a string in the
-      ;; :lisp-string table, it cannot nest, maybe because the ending
-      ;; character is the starting character ? :-))
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; C style string rules
-    (syntable :string *prop-string* nil
-      ;; Ignore escaped characters
-      (syntoken "\\\\.")
-
-    ;; Match, most, printf arguments.
-    (syntoken "%%|%([+-]?\\d+)?(l?[deEfgiouxX]|[cdeEfgiopsuxX])"
-        :property *prop-format*)
-      ;; Just for fun. This makes easier to see printf formats in strings
-      ;; *prop-format* is *prop-string* with the :underline option
-
-    (syntoken "\\\\$")
-    ;; a backslash extends the string to the next line
-
-    ;; A nonscaped " inside a string finishes it, since this table doesn't
-    ;; have sub tables, and cannot nest, should return to :foolang table
-    ;; from here
-    (syntoken "\"" :nospec t :switch -1)
-
-    ;; This token rule starts a new table called :error because end of line
-    ;; has been matched. Note that it is defined last, so that a line
-    ;; ending with " or \ will be processed first.
-    (syntoken ".?$" :begin :error)
-
-    (synaugment :string)
-      ;; Adds the :string table to :foolang table
-
-    ;; This table is used by :string, but could be shared for other patterns
-    ;; like characters constants, etc.
-    ;; It uses :switch -2 because it is started inside the :string table,
-    ;; but it is also a table, so, pops two tables from the table stack
-    (syntable :error *prop-error* nil
-       (syntoken "^.*$" :switch -2)
-    )
-  )
-  --
-
-      Indentation rules are significantly  more complex. I suggest  looking at
-  lisp/modules/indent.lsp   for   the   macros   and   function   definitions;
-  and lisp/modules/progmodes/lisp.lsp and lisp/modules/progmodes/c.lsp for two
-  sample  implementations   of   indentation   for   Lisp/Scheme   and   C/C++
-  respectively.
-
-      Note also  that indentation  is parsed  backwards, what  can cause  some
-  confusion, and make "visualization" of order or precedence of evaluation for
-  rules harder to understand.
-
-      A simple indentation rules definition for foolang could be:
-
-  --
-  (defindent *foolang-mode-indent* :foolang
-    ;; This must be the first token and usually the only token matching
-    ;; BOL (Beginning of Line)
-    (indtoken "^\\s*"   :indent
-      :code (or *offset* (setq *offset* (+ *ind-offset* *ind-length*))))
-      ;; the keyword :indent is a pattern put on a list when there is
-      ;; a match, so that later patterns can be "reduced" by some other
-      ;; rule, i.e.:  (:indent :indent) could be reduced to (:indent)
-
-    (indtoken "//.*$"   nil)
-      ;; C++ style comment. Returning nil instead of a token basically
-      ;; ignores the token, as it should not enter the reduction pattern
-      ;; list
-
-    ;; Sample C comment pattern
-    (indtoken "*/" :ccomment :nospec t :begin :comment)
-      ;; Note that the indaugment macro doesn't need to be used, and actually
-      ;; would be an error. In this example, the indentation compiler checks
-      ;; the :begin :comment and handles it internally, as it already needs
-      ;; to check for things like typos, unreachable labels, detectable
-      ;; non resolving rules, etc. There is runtime check also, so it should
-      ;; never enter an infinite loop when trying to resolve reduction rules.
-      ;; Check lisp/modules/indent.lsp:(compile-indent-table) for the
-      ;; implementation and more comments.
-
-    ;; Indentation rules also have stacked tables
-    (indtable :comment
-      (indtoken "/*" :ocomment :nospec t :switch -1))
-      ;; Note that the name is :ocomment (open comment), but that the
-      ;; the table is finished when matching the open comment pattern
-
-    ;; A simple initialization of a variable used by the indentation rules
-    (indinit       (parens 0))
-      ;; This variable can be declared anywhere in the body of defindent,
-      ;; It will be properly moved to a "variables declaration section"
-      ;; when expanding and compiling the table.
-
-    (indtoken "("  :oparen  :nospec t  :code (incf parens))
-    (indtoken ")"  :cparen  :nospec t  :code (decf parens))
-      ;; These two tokes add the patterns :oparen and :cparen to the
-      ;; "pattern list", and also have code to remember the balancing
-      ;; of parenthesis.
-
-
-    ;; One of the simplest reduction rules :-)
-    (indreduce nil
-      t
-      ((:comment)))
-      ;; Once the boundings of a comment are found, just ignore it, like
-      ;; what was done with the // pattern, but in that case, the boundings
-      ;; were readily available.
-      ;; The t (True) parameter means that this rule is always evaluated,
-      ;; but conditional code may be used, and implicit code may be added
-      ;; to the end of the indreduce macro.
-      ;; Since it is a macro, code can be compiled to optimized bytecode
-      ;; after the macro is expanded.
-
-    (indinit    (indent 0))
-      ;; Note that there is a special *indent* variable that should hold the
-      ;; proper indentation value, but it may be required to "overwrite"
-      ;; without forgetting that value, for things like:
-      ;;
-      ;;  foo(bar(baz(blah
-      ;;      ^       ^
-      ;;      |       |
-      ;;      indent  |
-      ;;              effective indentation to be used
-      ;;
-      ;; where it is desirable to align the code in the next line with the
-      ;; last open parenthesis.
-
-
-      Since the  interface is,  unfortunately,  complex enough  to not  expect
-  casual users to have something like a $HOME/.xedit file,  if you want to add
-  new modes, please check lisp/modules/xedit.lsp:*auto-modes*
-
-      There is some documentation about the variable. It should be possible to
-  change/update the variable from the lisp interface  in the *scratch* buffer,
-  but for  safety, it  is suggested  that  if you  add new  rules, you  should
-  restart  xedit  after  it.  Also  note  that  there   is  compiled  code  in
-  lisp/xedit.c that expects that variable to follow an specific format.
-
-      You may notice that several .lsp files  aren't "properly indented"; this
-  is because the lisp indentation rules  file was made long after  most of the
-  other files were done, and it was considered  a bad practice to gratuitously
-  reindent all files.
-
-
-
-      At the  time  of this  writing,  the ispell  interface  should be  again
-  functional, but it may be required to use some  old ispell program to handle
-  non utf8 text. But it should work properly for  the english language, and in
-  international mode, should work with any language. But there are problems in
-  international mode not fixed.
-
-      I  (Paulo  Cesar)  considered  several  times   to   extend  the  normal
-  textwidget to handle  utf8, but this  is probably  a lot of  work/time badly
-  spent and I prefer  to work on other  personal projects, but still  xedit is
-  the editor I use for programming. The XPRINT support unfortunately is broken
-  due to it. Note that xedit,  like pretty much any other  Xaw application can
-  be linked against  Xaw with  XPRINT support. In  the case  of xedit,  a flag
-  could be used, like the "international" variable to, at runtime, disable all
-  the related code, if required.
-
-      Also at the time of this writing, the tags  interface was added, as well
-  as several other bug fixes. The tags interface is documented in the manpage,
-  but the action  shortcut may  not be clear.  The default  shortcut is  M-. .
-  There is no support for more  than one tags file, or changing  the tags file
-  at runtime. But  the code  should be  easy to  adapt for  this case,  as all
-  related functions receive pointers to the appropriate structures. One option
-  could be to descend  from the directory of  the loaded file searching  for a
-  tags file, and then associate the file with the tags definition, if it isn't
-  already loaded. Shouldn't be  hard to implement. For  "inter project" files,
-  it should be better to  have one xedit window per  "project", i.e. searching
-  the definition of something  like a libc  symbol should probably be  done in
-  another xedit window.
diff --git a/xedit/app-defaults/Xedit-color.ad b/xedit/app-defaults/Xedit-color.ad
deleted file mode 100644 (file)
index da811b9..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-! $XFree86: xc/programs/xedit/Xedit-color.ad,v 1.14 2002/11/10 23:21:56 paulo Exp $
-
-#include "Xedit"
-
-*background:                   gray70
-*foreground:                   gray15
-*borderColor:                  gray40
-*Command.highlightThickness:   1
-*Command.backgroundPixmap:     gradient:vertical?dimension=18&start=gray90&end=gray65
-*Command.foreground:           gray20
-*Command.displayList:\
-foreground     gray92;\
-line           1,0,-2,0;\
-foreground     gray95;\
-line           2,1,-3,1;\
-foreground     gray74;\
-segments       3,-3,-4,-3, 2,-4,-3,-4, 1,-6,-2,-6;\
-point          -1,-1;\
-foreground     gray80;\
-line           0,0,0,-1;\
-point          -1,0
-
-*Command.translations: #override \
-<Btn1Down>:    set-values(1, foreground, gray20, background, rgb:d/5/5) set()\n\
-Button1<Leave>: reset() set-values(1, foreground, gray20, background, gray70)\n\
-<Btn1Up>:      notify() unset()
-
-*Toggle.foreground:            gray30
-*Toggle.background:            gray82
-*Toggle.borderColor:           gray90
-*Toggle.displayList:\
-foreground     gray75;\
-segments       0,1,0,-2,-1,1,-1,-2;\
-foreground     gray80;\
-segments       0,0,-1,0,0,-1,-1,-1;\
-points         1,1,1,-2,-2,1, -2,-2
-
-*bc_label.backgroundPixmap:    gradient:vertical?dimension=18&start=gray90&end=gray65
-*bc_label.displayList:\
-foreground     gray92;\
-line           1,0,-2,0;\
-foreground     gray95;\
-line           2,1,-3,1;\
-foreground     gray74;\
-segments       3,-2,-4,-2, 2,-3,-3,-3, 1,-5,-2,-5
-*bc_label.foreground:          gray20
-
-*formWindow.backgroundPixmap:  gradient:vertical?dimension=18&start=gray90&end=gray65
-*formWindow.displayList:\
-foreground     gray92;\
-line           1,0,-2,0;\
-foreground     gray95;\
-line           2,1,-3,1;\
-foreground     gray74;\
-segments       3,-2,-4,-2, 2,-3,-3,-3, 1,-5,-2,-5
-*formWindow*backgroundPixmap:  ParentRelative
-*formWindow*foreground:                gray20
-*formWindow*background:                gray74
-*formWindow.labelWindow.background:    gray80
-*formWindow.labelWindow.displayList:\
-line-style     onoffdash;\
-foreground     gray30;\
-background     gray96;\
-draw-rect      3,2,15,14;\
-foreground     gray78;\
-fill-rect      4,3,15,14
-
-*dirlabel.foreground:          gray20
-*dirlabel.backgroundPixmap:    gradient:vertical?dimension=18&start=gray90&end=gray65
-*dirlabel.displayList:\
-foreground     gray92;\
-line           1,0,-2,0;\
-foreground     gray95;\
-line           2,1,-3,1;\
-foreground     gray74;\
-segments       3,-2,-4,-2, 2,-3,-3,-3, 1,-5,-2,-5
-*dirwindow.background:         gray96
-
-*internalBorderColor:          gray40
-
-*Text*Text.background:         gray96
-*Text.background:              gray96
-*Text.?.background:            gray96
-*Text*cursorColor:             rgb:d/5/5
-*Text.displayList:\
-foreground     white;\
-line           1,-1,-2,-1;\
-foreground     gray88;\
-line           1,0,-2,0
-
-*Scrollbar.foreground:         rgb:a/5/5
-*Scrollbar.background:         gray60
-*Text.Scrollbar.background:    gray60
-*Scrollbar.backgroundPixmap:   gradient:horizontal?dimension=14&start=gray70&end=gray85
-*hScrollbar.backgroundPixmap:  gradient:vertical?dimension=14&start=gray85&end=gray70
-*hScrollbar.displayList:\
-foreground     gray85;\
-segments       1,-1,-2,-1,1,0,-2,0
-*vScrollbar.displayList:\
-foreground     gray85;\
-segments       0,1,0,-2,-1,1,-1,-2
-*Scrollbar.thumb:              vlines2
-*hScrollbar.thumb:             hlines2
-
-*SimpleMenu*borderWidth:               0
-*SimpleMenu*backgroundPixmap:  xlogo11?foreground=gray90&background=gray88
-*SimpleMenu*background:                gray90
-*SimpleMenu*foreground:                gray20
-*SimpleMenu.VerticalMargins:   3
-*SimpleMenu.HorizontalMargins: 3
-*SimpleMenu.SimpleMenu.VerticalMargins:        3
-*SimpleMenu.SimpleMenu.HorizontalMargins:      3
-*SimpleMenu.menuLabel.foreground:      rgb:d/5/5
-*SimpleMenu*displayList:\
-foreground     gray70;\
-lines          +2,-2,-2,-2,-2,+2;\
-foreground     gray95;\
-lines          -2,+1,+1,+1,+1,-2;\
-foreground     gray30;\
-lines          +1,-1,-1,-1,-1,+1;\
-foreground     gray80;\
-lines          -1,+0,+0,+0,+0,-1
-
-*TransientShell.backgroundPixmap:      xlogo11?foreground=gray90&background=gray87
-*TransientShell.Form.backgroundPixmap:         ParentRelative
-*TransientShell.Form.Label.backgroundPixmap:   ParentRelative
-
-*ispell*Scrollbar.borderColor: gray50
-*ispell*Scrollbar.displayList:
-*ispell*List.background:       gray96
-*ispell*word.background:       gray96
-*ispell*word.backgroundPixmap: XtUnspecifiedPixmap
-*ispell*word.translations:\
-<Enter>:       highlight()\n\
-<Leave>:       reset()\n\
-<Btn1Down>:    set()\n\
-<Btn1Up>:      notify() unset()\n
-*ispell*word.displayList:
-*ispell.Form.Form.borderColor: gray80
-*ispell.Form.Form.displayList: \
-foreground     gray90;\
-lines          +1,-1,-1,-1,-1,+1;\
-foreground     gray30;\
-lines          -1,+0,+0,+0,+0,-1;\
-foreground     gray60;\
-lines          +2,-2,-2,-2,-2,+2
-*ispell*status.backgroundPixmap:       XtUnspecifiedPixmap
-*ispell*status.background:     gray96
-*ispell*terse.justify:         right
-*ispell*terse.internalWidth:   10
-*ispell*terse.background:      gray75
-*ispell*terse.foreground:      gray20
-*ispell*terse.highlightThickness:      0
-*ispell*terse.displayList:\
-line-style     solid;\
-foreground     gray70;\
-fill-arc       6,4,14,12;\
-foreground     gray90;\
-draw-arc       6,4,14,12,45,180;\
-draw-lines     +0,-1,-1,-1,-1,+0;\
-foreground     gray50;\
-draw-arc       6,4,14,12,225,180;\
-draw-lines     -2,+0,+0,+0,+0,-2;\
-foreground     gray45;\
-dashes         2,1;\
-line-style     onoffdash;\
-draw-rect      +1,+1,-2,-2
-*ispell*options.MenuButton.borderColor:        gray70
-*ispell*options.MenuButton.background: gray78
-*ispell*options.MenuButton.backgroundPixmap:   gradient:vertical?dimension=18&start=gray90&end=gray65
-*ispell*options.MenuButton.displayList:\
-foreground     gray60;\
-lines          +2,-2,-2,-2,-2,+2;\
-foreground     gray95;\
-lines          -3,+1,+1,+1,+1,-3;\
-foreground     gray78;\
-points         -2,+1,+1,-2
-
-*tip.foreground:       rgb:48/48/00
-*tip.backgroundPixmap: None
-*tip.borderWidth:      0
-*tip.rightMargin:      7
-*tip.bottomMargin:     3
-*tip.displayList:\
-foreground     rgb:f/e/8;\
-fill-rect      1,1,-2,-2;\
-foreground     rgb:d/c/6;\
-draw-segments  0,1,0,-3,1,-2,-3,-2,-2,-3,-2,1,-3,0,1,0;\
-foreground     rgb:a/8/4;\
-draw-lines     2,-1, -2,-1, -1,-2, -1,2
-
-*grip.foreground:      gray10
-*grip.displayList:\
-foreground     gray80;\
-points         0,0,0,-1,-1,-1,-1,0
diff --git a/xedit/app-defaults/Xedit-noxprint.ad b/xedit/app-defaults/Xedit-noxprint.ad
deleted file mode 100644 (file)
index b626bf3..0000000
+++ /dev/null
@@ -1,468 +0,0 @@
-! $XFree86: xc/programs/xedit/Xedit.ad,v 1.23 2002/09/22 07:09:05 paulo Exp $
-
-*geometry:                             590x440
-*input:                                        TRUE
-*enableBackups:                                True
-*backupNameSuffix:                     ~
-*changedBitmap:                                xlogo11
-*international:                                False
-
-*hints:\
-Use Control-S and Control-R to Search.\n\
-Use Control-Shift-_ to Undo. Control-G to switch between Undo and Redo.\n\
-Use Control-A to jump to the beginning of the line.\n\
-Use Control-E to jump to the end of the line.\n\
-Use Control-T to transpose characters.\n\
-Use Control-K to cut to the end of the line. Control-Y to paste.\n\
-Use Control-Q to escape control characters.\n\
-Use Control-U[,<number>] to multiply actions. Control-G to cancel.\n\
-Use Control-Z to scroll one line up. Meta-Z to scroll one line down.\n\
-Use Meta-Q to format a paragraph.\n\
-Use Right-Button to extend selections.\n\
-Use Meta-I to insert a file.\n\
-Use Control-W to delete a selection, and/or jump to the selection mark.\n\
-Use Control-X,Control-F to find a file. Tab for filename completion.\n\
-Use Control-X,Control-S to save.\n\
-Use Control-X,Control-C to exit.\n\
-Use Control-C to paste the selection at CUT_BUFFER0.\n\
-Use Control Left-Button to popup the File Menu.\n\
-Use Control Middle-Button to popup the Edit Menu.\n\
-Use Control Right-Button to popup the Option Menu.\n\
-Use Control-X,Tab to Indent.\n\
-Use Control-X,0 to delete current splitted window.\n\
-Use Control-X,1 to delete other splitted window.\n\
-Use Control-X,2 to split the window vertically.\n\
-Use Control-X,3 to split the window horizontally.\n\
-Use Control-X,b to switch to another file.\n\
-Use Control-X,d to list directory. Control-G to Cancel.\n\
-Use Control-X,k to close file being edited.\n\
-Use Control-X,o to switch to another splitted window.\n\
-Use Control-X,u to undo. Control-G to switch between Undo and Redo.\n\
-Use Insert to toggle Overwrite mode.\n\
-Use Control-G to interrupt the lisp subprocess.\n\
-Use Escape to enter or leave regex search and replace mode.\n\
-Use Alt-. to search tags for the selected symbol or find the next match.
-
-*formWindow*defaultDistance:           2
-*formWindow.?.borderWidth:             0
-*formWindow.min:                       18
-*formWindow.max:                       18
-*formWindow.showGrip:                  False
-*positionWindow.fromHoriz:             labelWindow
-*positionWindow.horizDistance:         0
-*positionWindow.left:                  chainRight
-*positionWindow.right:                 chainRight
-*positionWindow.width:                 90
-*positionWindow.label:                 error
-*positionWindow.justify:               left
-*labelWindow*justify:                  center
-*labelWindow*label:                    no file yet
-*labelWindow.left:                     chainLeft
-*labelWindow.right:                    chainRight
-
-*quit.label:                           Quit
-*quit.tip:                             Close xedit window
-*save.label:                           Save
-*save.tip:                             Save current file
-*load.label:                           Load
-*load.tip:                             Load a new file
-
-*buttons*orientation:                  horizontal
-*buttons*showGrip:                     False
-*buttons.min:                          18
-
-*messageWindow.height:                 50
-*messageWindow.min:                    18
-*Paned*Text*allowResize:               True
-
-*messageWindow.autoFill:               False
-*messageWindow.scrollVertical:         Never
-
-*editWindow.autoFill:                  False
-*editWindow.scrollVertical:            Always
-*editWindow.showGrip:                  True
-xedit.textSource*enableUndo:           True
-
-*bc_label*label:                       Use Control-S and Control-R to Search.
-*bc_label*showGrip:                    False
-*bc_label.min:                         18
-
-*dirlabel.showGrip:                    False
-*dirlabel.min:                         18
-*dirlabel.max:                         18
-
-*dirwindow.defaultColumns:             0
-*dirwindow.verticalList:               True
-
-*viewport.forceBars:                   True
-*viewport.allowVert:                   1
-
-*insertFile*text.width:                        141
-*insertFile*text.?.pieceSize:          256
-*search*searchText.width:              157
-*search*replaceText.width:             157
-*search*case.horizDistance:            25
-*search*Text.?.pieceSize:              256
-
-*SimpleMenu.BackingStore:              NotUseful
-*SimpleMenu.menuLabel.vertSpace:       80
-*SimpleMenu.SmeBSB.HorizontalMargins:  16
-*SimpleMenu.justify:                   center
-*SimpleMenu.menuLabel.height:          250
-*SimpleMenu*cursor:                    left_ptr
-
-*fileMenu.label:                       File Menu
-*optionsMenu.label:                    Option Menu
-*optionsMenu.ispell.label:             ispell...
-*editMenu.label:                       Edit Menu
-*editMenu.wrapMenuItem.label:          Wrapping
-*editMenu.wrapMenuItem.leftBitmap:     menu12
-*wrapMenu.never.label:                 Never
-*wrapMenu.line.label:                  Line
-*wrapMenu.word.label:                  Word
-*editMenu.autoFill.label:              Auto Fill
-*editMenu.justifyMenuItem.label:       Justification
-*editMenu.justifyMenuItem.leftBitmap:  menu12
-*justifyMenu.left.label:               Left
-*justifyMenu.right.label:              Right
-*justifyMenu.center.label:             Center
-*justifyMenu.full.label:               Full
-*editMenu.breakColumns.label:          Break Columns...
-*editMenu.scrollMenuItem.label:                Scrollbars
-*editMenu.scrollMenuItem.leftBitmap:   menu12
-*scrollMenu.vertical.label:            Vertical
-*scrollMenu.horizontal.label:          Horizontal
-*editMenu.modeMenuItem.leftBitmap:     menu12
-*editMenu.modeMenuItem.label:          Edit Mode
-*editModes.none.label:                 Plain/None
-
-*TransientShell*Text.translations: #override \
-c<Key>S:       no-op(r)\n\
-c<Key>R:       no-op(r)\n\
-m<Key>I:       no-op(r)
-
-*search.translations: #override \
-<Create>:get-values(my, $w, width, $h, height)\
-       set-values(1, minWidth, $w, minHeight, $h, maxHeight, $h, allowShellResize, False)
-
-*insertFile.title:                     Insert File
-*insertFile.translations: #override \
-<Create>:get-values(my, $w, width, $h, height)\
-       set-values(1, minWidth, $w, minHeight, $h, maxHeight, $h, allowShellResize, False)
-
-*baseTranslations: #override \
-<Ctrl>X,<Ctrl>C:quit()\n\
-<Ctrl>X,<Ctrl>S:save-file()\n\
-<Ctrl>X,<Ctrl>F:find-file()\n\
-<Key>Escape:   line-edit()
-
-*messageWindow.Translations: #override \
-<Ctrl>X,<Ctrl>C:quit()\n\
-<Ctrl>X,<Ctrl>S:save-file()\n\
-<Ctrl>X,<Ctrl>F:find-file()\n\
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*searchText.Translations: #override \
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*replaceText.Translations: #override \
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*editWindow.translations: #override \
-<Ctrl>X,<Ctrl>E:lisp-eval()\n\
-<Ctrl>X,<Key>Tab:indent()\n\
-<Ctrl>X,:<Key>0:delete-window(current)\n\
-<Ctrl>X,:<Key>1:delete-window(other)\n\
-<Ctrl>X,:<Key>2:split-window(vertical)\n\
-<Ctrl>X,:<Key>3:split-window(horizontal)\n\
-<Ctrl>X,!l @Num_Lock<Key>b:switch-source()\n\
-<Ctrl>X,!l <Key>b:switch-source()\n\
-<Ctrl>X,!@Num_Lock<Key>b:switch-source()\n\
-<Ctrl>X,!<Key>b:switch-source()\n\
-<Ctrl>X,!l @Num_Lock<Key>d:dir-window()\n\
-<Ctrl>X,!l <Key>d:dir-window()\n\
-<Ctrl>X,!@Num_Lock<Key>d:dir-window()\n\
-<Ctrl>X,!<Key>d:dir-window()\n\
-<Ctrl>X,!l @Num_Lock<Key>k:kill-file()\n\
-<Ctrl>X,!l <Key>k:kill-file()\n\
-<Ctrl>X,!@Num_Lock<Key>k:kill-file()\n\
-<Ctrl>X,!<Key>k:kill-file()\n\
-<Ctrl>X,!l @Num_Lock<Key>o:other-window()\n\
-<Ctrl>X,!l <Key>o:other-window()\n\
-<Ctrl>X,!@Num_Lock<Key>o:other-window()\n\
-<Ctrl>X,!<Key>o:other-window()\n\
-<Ctrl>X,!l @Num_Lock<Key>u:undo()\n\
-<Ctrl>X,!l <Key>u:undo()\n\
-<Ctrl>X,!@Num_Lock<Key>u:undo()\n\
-<Ctrl>X,!<Key>u:undo()\n\
-<Ctrl>G:       xedit-keyboard-reset()\n\
-<Ctrl>J:       xedit-print-lisp-eval()\n\
-:m<Key>.:      tags()\n\
-<Key>Tab:      insert-char()\n\
-!l @Num_Lock<Key>b:insert-char()\n\
-!l <Key>b:     insert-char()\n\
-!@Num_Lock<Key>b:insert-char()\n\
-!<Key>b:       insert-char()\n\
-!l @Num_Lock<Key>d:insert-char()\n\
-!l <Key>d:     insert-char()\n\
-!@Num_Lock<Key>d:insert-char()\n\
-!<Key>d:       insert-char()\n\
-!l <Key>k:     insert-char()\n\
-!l @Num_Lock<Key>k:insert-char()\n\
-!@Num_Lock<Key>k:insert-char()\n\
-!<Key>k:       insert-char()\n\
-!l @Num_Lock<Key>o:insert-char()\n\
-!l <Key>o:     insert-char()\n\
-!@Num_Lock<Key>o:insert-char()\n\
-!<Key>o:       insert-char()\n\
-!l @Num_Lock<Key>u:insert-char()\n\
-!l <Key>u:     insert-char()\n\
-!@Num_Lock<Key>u:insert-char()\n\
-!<Key>u:       insert-char()\n\
-~s <Key>Insert:        toggle-overwrite()\n\
-c l @Num_Lock<Btn1Down>:xedit-focus() popup-menu(fileMenu)\n\
-c @Num_Lock<Btn1Down>:xedit-focus() popup-menu(fileMenu)\n\
-c l<Btn1Down>: xedit-focus() popup-menu(fileMenu)\n\
-c<Btn1Down>:   xedit-focus() popup-menu(fileMenu)\n\
-c l @Num_Lock<Btn2Down>:xedit-focus() popup-menu(editMenu)\n\
-c @Num_Lock<Btn2Down>:xedit-focus() popup-menu(editMenu)\n\
-c l<Btn2Down>: xedit-focus() popup-menu(editMenu)\n\
-c<Btn2Down>:   xedit-focus() popup-menu(editMenu)\n\
-c l @Num_Lock<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c @Num_Lock<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c l<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c<Btn3Down>:   xedit-focus() popup-menu(optionsMenu)\n\
-<Btn1Down>:    xedit-focus() select-start()\n\
-<Btn4Down>:    scroll-one-line-down()\n\
-<Btn5Down>:    scroll-one-line-up()
-
-*filename.?.pieceSize:                 256
-*filename.translations: #override \
-c<Key>S:       no-op(r)\n\
-c<Key>R:       no-op(r)\n\
-m<Key>I:       no-op(r)\n\
-c<Key>G:       cancel-find-file()\n\
-<Key>Return:   load-file()\n\
-<Key>Tab:      file-completion(h)\n\
-<Key>Escape:   cancel-find-file()\n\
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*ispell.translations:  #override \
-<Message>WM_PROTOCOLS: ispell(end)
-
-! Sample dictionary, word chars and text mode resources setup
-!*ispell.dictionary:                   br
-!*ispell.dictionaries:                 br american americanmed+ english
-!*ispell*br.wordChars:                 áéíóúçÁÉÍÓÚÇàÀâêôÂÊÔüÜãõÃÕ-
-*ispell.ispellCommand:                 /usr/bin/aspell -B -m
-*ispell.lookCommand:                   /bin/egrep
-!*ispell*text.skipLines:               .#
-
-*ispell.geometry:                      0x0
-*ispell.minWidth:                      320
-*ispell.minHeight:                     245
-*ispell*Label.borderWidth:             0
-*ispell*Label.internalHeight:          4
-*ispell*Label.justify:                 right
-*ispell*Label.width:                   112
-*ispell*Label.left:                    chainLeft
-*ispell*Label.right:                   chainLeft
-*ispell*Label.top:                     chainTop
-*ispell*Label.bottom:                  chainTop
-*ispell*mispelled.label:               Misspelled word:
-*ispell*mispelled.top:                 chainTop
-*ispell*mispelled.bottom:              chainTop
-*ispell*mispelled.internalWidth:       0
-*ispell*repeated.label:                        Repeated words:
-*ispell*repeated.internalWidth:                0
-*ispell*replacement.label:             Replace with:
-*ispell*word.fromHoriz:                        mispelled
-*ispell*word.justify:                  left
-*ispell*word.borderWidth:              1
-*ispell*word.internalWidth:            4
-*ispell*word.internalHeight:           3
-*ispell*word.width:                    194
-*ispell*word.left:                     chainLeft
-*ispell*word.right:                    chainRight
-*ispell*word.top:                      chainTop
-*ispell*word.bottom:                   chainTop
-*ispell*word.label:
-*ispell*word.tip:                      Press here to select this text
-*ispell*word.highlightThickness:       0
-*ispell*text.fromHoriz:                        replacement
-*ispell*replacement.fromVert:          mispelled
-*ispell*replacement.internalWidth:     0
-*ispell*form.text.fromVert:            word
-*ispell*form.text.width:               194
-*ispell*form.text.top:                 chainTop
-*ispell*form.text.bottom:              chainTop
-*ispell*form.text.left:                        chainLeft
-*ispell*form.text.right:               chainRight
-*ispell*form.text.leftMargin:          4
-*ispell*form.text.?.pieceSize:         256
-*ispell*suggestions.label:             Suggestions:
-*ispell*suggestions.fromVert:          replacement
-*ispell*suggestions.internalWidth:     0
-*ispell*viewport.fromHoriz:            suggestions
-*ispell*viewport.fromVert:             text
-*ispell*viewport.width:                        194
-*ispell*viewport.height:               143
-*ispell*viewport.top:                  chainTop
-*ispell*viewport.bottom:               chainBottom
-*ispell*viewport.left:                 chainLeft
-*ispell*viewport.right:                        chainRight
-*ispell*viewport.forceBars:            1
-*ispell*viewport.allowVert:            1
-*ispell*list.defaultColumns:           1
-*ispell*list.longest:                  16384
-*ispell*commands.vertDistance:         5
-*ispell*commands.fromVert:             suggestions
-*ispell*commands.top:                  chainBottom
-*ispell*commands.bottom:               chainBottom
-*ispell*commands.right:                        chainLeft
-*ispell*commands.left:                 chainLeft
-*ispell*check.label:                   Check
-*ispell*check.width:                   54
-*ispell*check.tip:                     Ask ispell about the word in the text field
-*ispell*look.label:                    Look
-*ispell*look.fromHoriz:                        check
-*ispell*look.horizDistance:            0
-*ispell*look.width:                    46
-*ispell*look.tip:                      Runs the look command
-*ispell*undo.fromVert:                 check
-*ispell*undo.label:                    Undo
-*ispell*undo.width:                    102
-*ispell*undo.tip:                      Undo last action
-*ispell*replace.fromVert:              undo
-*ispell*replace.label:                 Replace
-*ispell*replace.tip:                   Replace occurence of the word
-*ispell*replaceAll.fromVert:           undo
-*ispell*replaceAll.fromHoriz:          replace
-*ispell*replaceAll.label:              All
-*ispell*replaceAll.tip:                        Replace all occurences of the word
-*ispell*ignore.fromVert:               replace
-*ispell*ignore.label:                  Ignore
-*ispell*ignore.tip:                    Ignore this word
-*ispell*ignoreAll.fromVert:            replaceAll
-*ispell*ignoreAll.fromHoriz:           ignore
-*ispell*ignoreAll.label:               All
-*ispell*ignoreAll.tip:                 Ignore all ocurrences of the word
-*ispell*add.fromVert:                  ignore
-*ispell*add.label:                     Add
-*ispell*add.width:                     50
-*ispell*add.tip:                       Add word to your private dictionary
-*ispell*addUncap.fromVert:             ignoreAll
-*ispell*addUncap.fromHoriz:            add
-*ispell*addUncap.label:                        Uncap
-*ispell*addUncap.horizDistance:                0
-*ispell*addUncap.width:                        50
-*ispell*addUncap.tip:                  Add word uncapitalized, to your private dictionary
-*ispell*suspend.fromVert:              add
-*ispell*suspend.label:                 Suspend
-*ispell*suspend.width:                 57
-*ispell*suspend.tip:                   Suspend ispell execution
-*ispell*cancel.fromHoriz:              suspend
-*ispell*cancel.fromVert:               addUncap
-*ispell*cancel.label:                  Close
-*ispell*cancel.width:                  43
-*ispell*cancel.horizDistance:          0
-*ispell*cancel.tip:                    Terminates ispell process
-*ispell*replace.width:                 65
-*ispell*ignore.width:                  65
-*ispell*replaceAll.width:              35
-*ispell*replaceAll.horizDistance:      0
-*ispell*ignoreAll.width:               35
-*ispell*ignoreAll.horizDistance:       0
-*ispell*terse.fromVert:                        cancel
-*ispell*terse.Label:                   Terse Mode
-*ispell*terse.width:                   104
-*ispell*terse.borderWidth:             0
-*ispell*terse.tip:                     Switch terse mode
-*ispell*status.fromVert:               viewport
-*ispell*status.fromHoriz:              suggestions
-*ispell*status.top:                    chainBottom
-*ispell*status.bottom:                 chainBottom
-*ispell*status.left:                   chainLeft
-*ispell*status.right:                  chainRight
-*ispell*status.width:                  194
-*ispell*status.borderWidth:            1
-*ispell*status.justify:                        left
-*ispell*status.internalHeight:         2
-*ispell*status.vertDistance:           2
-*ispell*options.fromVert:              status
-*ispell*options.fromHoriz:             commands
-*ispell*options.bottom:                        chainBottom
-*ispell*options.top:                   chainBottom
-*ispell*options.left:                  chainLeft
-*ispell*options.right:                 chainRight
-*ispell*options.dict.width:            121
-*ispell*options.horizDistance:         2
-*ispell*options.vertDistance:          2
-*ispell*options.defaultDistance:       2
-*ispell*dict.highlightThickness:       0
-*ispell*dict.justify:                  left
-*ispell*dict.resizable:                        False
-*ispell*dict.leftBitmap:               menu12
-*ispell*dict.label:                    Dictionary
-*ispell*dict.tip:                      Change dictionary
-*ispell*options.format.width:          65
-*ispell*format.highlightThickness:     0
-*ispell*format.justify:                        left
-*ispell*format.resizable:              False
-*ispell*format.leftBitmap:             menu12
-*ispell*format.fromHoriz:              dict
-*ispell*format.horizDistance:          0
-*ispell*format.tip:                    Select text type
-
-*columns.minWidth:                     140
-*columns.minHeight:                    76
-*columns.maxWidth:                     140
-*columns.maxHeight:                    76
-*columns.form*defaultDistance:         4
-*columns*left:                         chainLeft
-*columns*right:                                chainLeft
-*columns*top:                          chainTop
-*columns*bottom:                       chainTop
-*columns*Label.width:                  96
-*columns*Label.borderWidth:            0
-*columns*Label.internalHeight:         4
-*columns*Label.internalWidth:          2
-*columns*Label.justify:                        right
-*columns*Text.width:                   30
-*columns*Command.width:                        58
-*columns*leftLabel.label:              Left Column:
-*columns*left.fromHoriz:               leftLabel
-*columns*rightLabel.label:             Right Column:
-*columns*rightLabel.fromVert:          leftLabel
-*columns*right.fromHoriz:              rightLabel
-*columns*right.fromVert:               left
-*columns*ok.fromVert:                  rightLabel
-*columns*cancel.fromHoriz:             ok
-*columns*cancel.fromVert:              rightLabel
-*columns*cancel.horizDistance:         12
-*columns*Text.?.pieceSize:             8
-
-*columns*Text.translations: #override \
-c<Key>S:       no-op(r)\n\
-c<Key>R:       no-op(r)\n\
-m<Key>I:       no-op(r)\n\
-<Key>Return:   set-columns(ok)\n\
-<Key>Tab:      change-field()\n\
-c<Key>G:       set-columns(cancel)\n\
-<Key>Escape:   set-columns(cancel)\n\
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*columns.translations: #override \
-<Message>WM_PROTOCOLS: set-columns(cancel)
-
-! EOF.
diff --git a/xedit/app-defaults/Xedit-sample b/xedit/app-defaults/Xedit-sample
deleted file mode 100644 (file)
index cd4786a..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-! $XFree86: xc/programs/xedit/Xedit-sample,v 1.7 1999/06/06 08:49:13 dawes Exp $
-
-Xedit*insertFile*text.width:           150
-Xedit*search*searchText.width:         192
-Xedit*search*replaceText.width:                192
-Xedit*search*case.horizDistance:       14
-Xedit*Text.autoFill:                   false
-Xedit*cursorColor:                     red
-Xedit.geometry:                                600x400
-Xedit*font:                            -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1
-Xedit*Text.?.font:                     -*-courier-medium-r-*-*-12-*-*-*-*-*-*-1
-Xedit*Text.rightMargin:                        0
-Xedit*filename.backgroundPixmap:       gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e
-Xedit*filename.topMargin:              3
-Xedit*messageWindow.backgroundPixmap:  gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e
-Xedit*editWindow.backgroundPixmap:     gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e
-Xedit*editWindow.wrap:                 Never
-Xedit*formWindow*font:                 -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1
-Xedit*formWindow*background:           rgb:9/0/2
-Xedit*formWindow*foreground:           rgb:d/c/8
-Xedit*formWindow*backgroundPixmap:     XtUnspecifiedPixmap
-Xedit*formWindow.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*bc_label.background:             rgb:9/0/2
-Xedit*bc_label.foreground:             rgb:d/c/8
-Xedit*bc_label.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*Scrollbar.background:            rgb:e/c/c
-Xedit*Scrollbar.foreground:            rgb:a/7/7
-Xedit*Scrollbar.borderColor:           rgb:9/8/8
-Xedit*vScrollbar.thumb:                        hlines2
-Xedit*hScrollbar.thumb:                        vlines2
-Xedit*Scrollbar.width:                 12
-Xedit*Scrollbar.height:                        12
-Xedit*Scrollbar.backgroundPixmap:      gray3?background=rgb:c/a/a&foreground=rgb:d/b/b
-Xedit*Scrollbar.displayList:\
-foreground     rgb:7/4/4;\
-draw-lines     +0,-1,-1,-1,-1,+0;\
-foreground     rgb:4/2/2;\
-draw-lines     -2,+0,+0,+0,+0,-2
-Xedit*Paned.internalBorderColor:       rgb:9/8/8
-Xedit*buttons.internalBorderColor:     rgb:8/7/7
-Xedit*Grip.width:                      10
-Xedit*Grip.height:                     10
-Xedit*Grip.foreground:                 IndianRed3
-Xedit*Grip.displayList:\
-foreground     IndianRed1;\
-draw-rect      +0,+0,-2,-2;\
-foreground     IndianRed4;\
-draw-lines     +1,-1,-1,-1,-1,+1
-Xedit*Command.internalWidth:           8
-Xedit*Command.internalHeight:          2
-Xedit*Command.borderWidth:             0
-Xedit*Command.background:              rgb:9/0/2
-Xedit*Command.foreground:              rgb:d/c/8
-Xedit*Command.highlightThickness:      0
-Xedit*Command.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*Toggle.borderWidth:              1
-Xedit*Toggle.borderColor:              rgb:a/9/9
-Xedit*Toggle.background:               rgb:f/e/e
-Xedit*Toggle.foreground:               rgb:9/0/2
-Xedit*Toggle.highlightThickness:       1
-Xedit*Toggle.internalWidth:            10
-Xedit*Toggle.internalHeight:           2
-Xedit*Toggle.justify:                  left
-Xedit*Toggle.displayList:\
-foreground     rgb:6/0/1;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:d/2/3;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*Form.background:                 rgb:f/e/e
-Xedit*Form.Label.background:           rgb:f/e/e
-Xedit*Form.backgroundPixmap:           gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e
-Xedit*Form.Label.backgroundPixmap:     ParentRelative
-Xedit*Form*Text.backgroundPixmap:      gradient:vertical?dimension=3&start=rgb:dc/cc/cc&end=rgb:ec/dc/dc
-Xedit*Form.Text.leftMargin:            5
-Xedit*Form.Text.rightMargin:           4
-Xedit*Form.Text.topMargin:             2
-Xedit*Form.Text.bottomMargin:          2
-Xedit*Form.Text.borderWidth:           2
-Xedit*Form.Text.borderColor:           rgb:9/0/2
-Xedit*Form.Text.displayList:\
-foreground     gray50;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     gray80;\
-draw-rect      +1,+1,-1,-1
-Xedit*Form.Label.font:                 fixed
-Xedit*Form.Command.internalWidth:      8
-Xedit*Form.Command.internalHeight:     4
-Xedit*Form.Command.borderWidth:                0
-Xedit*Form.Command.background:         rgb:9/0/2
-Xedit*Form.Command.foreground:         rgb:d/c/8
-Xedit*Form.Command.highlightThickness: 0
-Xedit*Form.Command.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:d/0/3;\
-draw-lines     -2,+1,+1,+1,+1,-2;\
-foreground     rgb:b/2/3;\
-draw-lines     +3,-3,-3,-3,-3,+3;\
-foreground     rgb:8/0/1;\
-draw-lines     -3,+2,+2,+2,+2,-3;\
-foreground     rgb:9/8/8;\
-draw-lines     +2,-1,-1,-1,-1,+2;\
-foreground     rgb:f/e/e;\
-draw-lines     -1,+1,-1,+0,+0,+0,+0,-1,+1,-1
-Xedit*SimpleMenu.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2;\
-foreground     rgb:a/1/3;\
-fill-rect      +3,+4,-4,+22;\
-foreground     rgb:b/a/6;\
-draw-line      +4,+4,-5,+4;\
-draw-line      +4,+22,-5,+22
-Xedit*SimpleMenu.VerticalMargins:      2
-Xedit*SimpleMenu.HorizontalMargins:    2
-Xedit*SimpleMenu.borderWidth:          0
-Xedit*SimpleMenu.?.foreground:         rgb:d/c/8
-Xedit*SimpleMenu.background:           rgb:9/0/2
-Xedit*dirlabel*font:                   -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1
-Xedit*dirlabel*background:             rgb:9/0/2
-Xedit*dirlabel*foreground:             rgb:d/c/8
-Xedit*dirlabel*backgroundPixmap:       XtUnspecifiedPixmap
-Xedit*dirlabel.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*dirwindow*font:                  -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1
-Xedit*dirwindow*foreground:            rgb:9/0/2
-Xedit*dirwindow.backgroundPixmap:      gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e
-Xedit*viewport*Scrollbar.thumb:                hlines2
-Xedit*ispell*text.width:               192
-Xedit*ispell.form.defaultDistance:     4
-Xedit*ispell*commands.Command.vertDistance:    0
-Xedit*ispell*commands.Command.height:  22
-Xedit*ispell*commands.check.vertDistance:      3
-Xedit*ispell*commands.look.vertDistance:       3
-Xedit*ispell*replaceAll.width:         39
-Xedit*ispell*ignoreAll.width:          39
-Xedit*ispell*check.width:              54
-Xedit*ispell*look.width:               50
-Xedit*ispell*undo.width:               104
-Xedit*ispell*add.width:                        52
-Xedit*ispell*addUncap.width:           52
-Xedit*ispell*suspend.width:            60
-Xedit*ispell*suspend.internalWidth:    0
-Xedit*ispell*cancel.width:             44
-Xedit*ispell*cancel.internalWidth:     0
-Xedit*ispell*terse.width:              101
-Xedit*ispell*terse.height:             18
-Xedit*ispell*terse.vertDistance:       2
-Xedit*ispell*replace.internalWidth:    0
-Xedit*ispell*viewport.height:          139
-Xedit*ispell*list.foreground:          rgb:9/0/2
-Xedit*ispell*list.backgroundPixmap:    gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e
-Xedit*ispell*borderColor:              rgb:9/0/2
-Xedit*ispell*word.font:                        -*-courier-medium-r-*-*-12-*-*-*-*-*-*-1
-Xedit*ispell*word.displayList:
-Xedit*ispell*word.foreground:          black
-Xedit*ispell*word.background:          rgb:f/e/e
-Xedit*ispell*word.borderWidth:         1
-Xedit*ispell*word.height:              18
-Xedit*SimpleMenu.SimpleMenu.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*columns*Label.width:             84
-Xedit*columns.minWidth:                        130
-Xedit*columns.minHeight:               80
-Xedit*columns.maxWidth:                        130
-Xedit*columns.maxHeight:               80
-Xedit*columns*cancel.horizDistance:    6
-Xedit*ispell*SimpleMenu.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*ispell*MenuButton.borderColor:           rgb:f/e/e
-Xedit*ispell*MenuButton.background:            rgb:9/0/2
-Xedit*ispell*MenuButton.foreground:            rgb:d/c/8
-Xedit*ispell*MenuButton.highlightThickness:    0
-Xedit*ispell*MenuButton.displayList:\
-foreground     rgb:3/0/1;\
-draw-lines     +1,-1,-1,-1,-1,+1;\
-foreground     rgb:d/0/3;\
-draw-lines     -1,+0,+0,+0,+0,-1;\
-foreground     rgb:b/2/3;\
-draw-lines     +2,-2,-2,-2,-2,+2;\
-foreground     rgb:8/0/1;\
-draw-lines     -2,+1,+1,+1,+1,-2
-Xedit*tip.background:  yellow
diff --git a/xedit/app-defaults/Xedit-xprint.ad b/xedit/app-defaults/Xedit-xprint.ad
deleted file mode 100644 (file)
index 34ed4e9..0000000
+++ /dev/null
@@ -1,565 +0,0 @@
-! $XFree86: xc/programs/xedit/Xedit.ad,v 1.23 2002/09/22 07:09:05 paulo Exp $
-
-*geometry:                             590x440
-*input:                                        TRUE
-*enableBackups:                                True
-*backupNameSuffix:                     ~
-*changedBitmap:                                xlogo11
-*international:                         True
-
-*hints:\
-Use Control-S and Control-R to Search.\n\
-Use Control-Shift-_ to Undo. Control-G to switch between Undo and Redo.\n\
-Use Control-A to jump to the beginning of the line.\n\
-Use Control-E to jump to the end of the line.\n\
-Use Control-T to transpose characters.\n\
-Use Control-K to cut to the end of the line. Control-Y to paste.\n\
-Use Control-Q to escape control characters.\n\
-Use Control-U[,<number>] to multiply actions. Control-G to cancel.\n\
-Use Control-Z to scroll one line up. Meta-Z to scroll one line down.\n\
-Use Meta-Q to format a paragraph.\n\
-Use Right-Button to extend selections.\n\
-Use Meta-I to insert a file.\n\
-Use Control-W to delete a selection, and/or jump to the selection mark.\n\
-Use Control-X,Control-F to find a file. Tab for filename completion.\n\
-Use Control-X,Control-S to save.\n\
-Use Control-X,Control-C to exit.\n\
-Use Control-C to paste the selection at CUT_BUFFER0.\n\
-Use Control Left-Button to popup the File Menu.\n\
-Use Control Middle-Button to popup the Edit Menu.\n\
-Use Control Right-Button to popup the Option Menu.\n\
-Use Control-X,Tab to Indent.\n\
-Use Control-X,0 to delete current splitted window.\n\
-Use Control-X,1 to delete other splitted window.\n\
-Use Control-X,2 to split the window vertically.\n\
-Use Control-X,3 to split the window horizontally.\n\
-Use Control-X,b to switch to another file.\n\
-Use Control-X,d to list directory. Control-G to Cancel.\n\
-Use Control-X,k to close file being edited.\n\
-Use Control-X,o to switch to another splitted window.\n\
-Use Control-X,u to undo. Control-G to switch between Undo and Redo.\n\
-Use Insert to toggle Overwrite mode.\n\
-Use Control-G to interrupt the lisp subprocess
-
-*formWindow*defaultDistance:           2
-*formWindow.?.borderWidth:             0
-*formWindow.min:                       18
-*formWindow.max:                       18
-*formWindow.showGrip:                  False
-*positionWindow.fromHoriz:             labelWindow
-*positionWindow.horizDistance:         0
-*positionWindow.left:                  chainRight
-*positionWindow.right:                 chainRight
-*positionWindow.width:                 90
-*positionWindow.label:                 error
-*positionWindow.justify:               left
-*labelWindow*justify:                  center
-*labelWindow*label:                    no file yet
-*labelWindow.left:                     chainLeft
-*labelWindow.right:                    chainRight
-
-*quit.label:                           Quit
-*quit.tip:                             Close xedit window
-*save.label:                           Save
-*save.tip:                             Save current file
-*load.label:                           Load
-*load.tip:                             Load a new file
-*print.label:                          Print
-*print.tip:                            Print current file
-
-*buttons*orientation:                  horizontal
-*buttons*showGrip:                     False
-*buttons.min:                          18
-
-*messageWindow.height:                 70
-*messageWindow.min:                    18
-*Paned*Text*allowResize:               True
-
-*messageWindow.autoFill:               False
-*messageWindow.scrollVertical:         Never
-
-*editWindow.autoFill:                  False
-*editWindow.scrollVertical:            Always
-*editWindow.showGrip:                  True
-xedit.textSource*enableUndo:           True
-
-*bc_label*label:                       Use Control-S and Control-R to Search.
-*bc_label*showGrip:                    False
-*bc_label.min:                         18
-
-*dirlabel.showGrip:                    False
-*dirlabel.min:                         18
-*dirlabel.max:                         18
-
-*dirwindow.defaultColumns:             0
-*dirwindow.verticalList:               True
-
-*viewport.forceBars:                   True
-*viewport.allowVert:                   1
-
-*insertFile*text.width:                        141
-*insertFile*text.?.pieceSize:          256
-*search*searchText.width:              157
-*search*replaceText.width:             157
-*search*case.horizDistance:            25
-*search*Text.?.pieceSize:              256
-
-*SimpleMenu.BackingStore:              NotUseful
-*SimpleMenu.menuLabel.vertSpace:       80
-*SimpleMenu.SmeBSB.HorizontalMargins:  16
-*SimpleMenu.justify:                   center
-*SimpleMenu.menuLabel.height:          250
-*SimpleMenu*cursor:                    left_ptr
-
-*fileMenu.label:                       File Menu
-*optionsMenu.label:                    Option Menu
-*optionsMenu.ispell.label:             ispell...
-*editMenu.label:                       Edit Menu
-*editMenu.wrapMenuItem.label:          Wrapping
-*editMenu.wrapMenuItem.leftBitmap:     menu12
-*wrapMenu.never.label:                 Never
-*wrapMenu.line.label:                  Line
-*wrapMenu.word.label:                  Word
-*editMenu.autoFill.label:              Auto Fill
-*editMenu.justifyMenuItem.label:       Justification
-*editMenu.justifyMenuItem.leftBitmap:  menu12
-*justifyMenu.left.label:               Left
-*justifyMenu.right.label:              Right
-*justifyMenu.center.label:             Center
-*justifyMenu.full.label:               Full
-*editMenu.breakColumns.label:          Break Columns...
-*editMenu.scrollMenuItem.label:                Scrollbars
-*editMenu.scrollMenuItem.leftBitmap:   menu12
-*scrollMenu.vertical.label:            Vertical
-*scrollMenu.horizontal.label:          Horizontal
-*editMenu.modeMenuItem.leftBitmap:     menu12
-*editMenu.modeMenuItem.label:          Edit Mode
-*editModes.none.label:                 Plain/None
-
-*TransientShell*Text.translations: #override \
-c<Key>S:       no-op(r)\n\
-c<Key>R:       no-op(r)\n\
-m<Key>I:       no-op(r)
-
-*search.translations: #override \
-<Create>:get-values(my, $w, width, $h, height)\
-       set-values(1, minWidth, $w, minHeight, $h, maxHeight, $h, allowShellResize, False)
-
-*insertFile.title:                     Insert File
-*insertFile.translations: #override \
-<Create>:get-values(my, $w, width, $h, height)\
-       set-values(1, minWidth, $w, minHeight, $h, maxHeight, $h, allowShellResize, False)
-
-*baseTranslations: #override \
-<Ctrl>X,<Ctrl>C:quit()\n\
-<Ctrl>X,<Ctrl>S:save-file()\n\
-<Ctrl>X,<Ctrl>P:print-file()\n\
-<Ctrl>X,<Ctrl>F:find-file()\n\
-<Key>Escape:   line-edit()
-
-*messageWindow.Translations: #override \
-<Ctrl>X,<Ctrl>C:quit()\n\
-<Ctrl>X,<Ctrl>S:save-file()\n\
-<Ctrl>X,<Ctrl>P:print-file()\n\
-<Ctrl>X,<Ctrl>F:find-file()\n\
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*searchText.Translations: #override \
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*replaceText.Translations: #override \
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*editWindow.translations: #override \
-<Ctrl>X,<Ctrl>E:lisp-eval()\n\
-<Ctrl>X,<Key>Tab:indent()\n\
-<Ctrl>X,:<Key>0:delete-window(current)\n\
-<Ctrl>X,:<Key>1:delete-window(other)\n\
-<Ctrl>X,:<Key>2:split-window(vertical)\n\
-<Ctrl>X,:<Key>3:split-window(horizontal)\n\
-<Ctrl>X,!l @Num_Lock<Key>b:switch-source()\n\
-<Ctrl>X,!l <Key>b:switch-source()\n\
-<Ctrl>X,!@Num_Lock<Key>b:switch-source()\n\
-<Ctrl>X,!<Key>b:switch-source()\n\
-<Ctrl>X,!l @Num_Lock<Key>d:dir-window()\n\
-<Ctrl>X,!l <Key>d:dir-window()\n\
-<Ctrl>X,!@Num_Lock<Key>d:dir-window()\n\
-<Ctrl>X,!<Key>d:dir-window()\n\
-<Ctrl>X,!l @Num_Lock<Key>k:kill-file()\n\
-<Ctrl>X,!l <Key>k:kill-file()\n\
-<Ctrl>X,!@Num_Lock<Key>k:kill-file()\n\
-<Ctrl>X,!<Key>k:kill-file()\n\
-<Ctrl>X,!l @Num_Lock<Key>o:other-window()\n\
-<Ctrl>X,!l <Key>o:other-window()\n\
-<Ctrl>X,!@Num_Lock<Key>o:other-window()\n\
-<Ctrl>X,!<Key>o:other-window()\n\
-<Ctrl>X,!l @Num_Lock<Key>u:undo()\n\
-<Ctrl>X,!l <Key>u:undo()\n\
-<Ctrl>X,!@Num_Lock<Key>u:undo()\n\
-<Ctrl>X,!<Key>u:undo()\n\
-<Ctrl>G:       xedit-keyboard-reset()\n\
-<Ctrl>J:       xedit-print-lisp-eval()\n\
-<Key>Tab:      insert-char()\n\
-!l @Num_Lock<Key>b:insert-char()\n\
-!l <Key>b:     insert-char()\n\
-!@Num_Lock<Key>b:insert-char()\n\
-!<Key>b:       insert-char()\n\
-!l @Num_Lock<Key>d:insert-char()\n\
-!l <Key>d:     insert-char()\n\
-!@Num_Lock<Key>d:insert-char()\n\
-!<Key>d:       insert-char()\n\
-!l <Key>k:     insert-char()\n\
-!l @Num_Lock<Key>k:insert-char()\n\
-!@Num_Lock<Key>k:insert-char()\n\
-!<Key>k:       insert-char()\n\
-!l @Num_Lock<Key>o:insert-char()\n\
-!l <Key>o:     insert-char()\n\
-!@Num_Lock<Key>o:insert-char()\n\
-!<Key>o:       insert-char()\n\
-!l @Num_Lock<Key>u:insert-char()\n\
-!l <Key>u:     insert-char()\n\
-!@Num_Lock<Key>u:insert-char()\n\
-!<Key>u:       insert-char()\n\
-~s <Key>Insert:        toggle-overwrite()\n\
-c l @Num_Lock<Btn1Down>:xedit-focus() popup-menu(fileMenu)\n\
-c @Num_Lock<Btn1Down>:xedit-focus() popup-menu(fileMenu)\n\
-c l<Btn1Down>: xedit-focus() popup-menu(fileMenu)\n\
-c<Btn1Down>:   xedit-focus() popup-menu(fileMenu)\n\
-c l @Num_Lock<Btn2Down>:xedit-focus() popup-menu(editMenu)\n\
-c @Num_Lock<Btn2Down>:xedit-focus() popup-menu(editMenu)\n\
-c l<Btn2Down>: xedit-focus() popup-menu(editMenu)\n\
-c<Btn2Down>:   xedit-focus() popup-menu(editMenu)\n\
-c l @Num_Lock<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c @Num_Lock<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c l<Btn3Down>:xedit-focus() popup-menu(optionsMenu)\n\
-c<Btn3Down>:   xedit-focus() popup-menu(optionsMenu)\n\
-<Btn1Down>:    xedit-focus() select-start()\n\
-<Btn4Down>:    scroll-one-line-down()\n\
-<Btn5Down>:    scroll-one-line-up()
-
-*filename.?.pieceSize:                 256
-*filename.translations: #override \
-c<Key>S:       no-op(r)\n\
-c<Key>R:       no-op(r)\n\
-m<Key>I:       no-op(r)\n\
-c<Key>G:       cancel-find-file()\n\
-<Key>Return:   load-file()\n\
-<Key>Tab:      file-completion(h)\n\
-<Key>Escape:   cancel-find-file()\n\
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*ispell.translations:  #override \
-<Message>WM_PROTOCOLS: ispell(end)
-
-! Sample dictionary, word chars and text mode resources setup
-!*ispell.dictionary:                   br
-!*ispell.dictionaries:                 br american americanmed+ english
-!*ispell*br.wordChars:                 áéíóúçÁÉÍÓÚÇàÀâêôÂÊÔüÜãõÃÕ-
-*ispell.ispellCommand:                 /usr/bin/aspell -B -m
-*ispell.lookCommand:                   /bin/egrep
-!*ispell*text.skipLines:               .#
-
-*ispell.geometry:                      0x0
-*ispell.minWidth:                      320
-*ispell.minHeight:                     245
-*ispell*Label.borderWidth:             0
-*ispell*Label.internalHeight:          4
-*ispell*Label.justify:                 right
-*ispell*Label.width:                   112
-*ispell*Label.left:                    chainLeft
-*ispell*Label.right:                   chainLeft
-*ispell*Label.top:                     chainTop
-*ispell*Label.bottom:                  chainTop
-*ispell*mispelled.label:               Misspelled word:
-*ispell*mispelled.top:                 chainTop
-*ispell*mispelled.bottom:              chainTop
-*ispell*mispelled.internalWidth:       0
-*ispell*repeated.label:                        Repeated words:
-*ispell*repeated.internalWidth:                0
-*ispell*replacement.label:             Replace with:
-*ispell*word.fromHoriz:                        mispelled
-*ispell*word.justify:                  left
-*ispell*word.borderWidth:              1
-*ispell*word.internalWidth:            4
-*ispell*word.internalHeight:           3
-*ispell*word.width:                    194
-*ispell*word.left:                     chainLeft
-*ispell*word.right:                    chainRight
-*ispell*word.top:                      chainTop
-*ispell*word.bottom:                   chainTop
-*ispell*word.label:
-*ispell*word.tip:                      Press here to select this text
-*ispell*word.highlightThickness:       0
-*ispell*text.fromHoriz:                        replacement
-*ispell*replacement.fromVert:          mispelled
-*ispell*replacement.internalWidth:     0
-*ispell*form.text.fromVert:            word
-*ispell*form.text.width:               194
-*ispell*form.text.top:                 chainTop
-*ispell*form.text.bottom:              chainTop
-*ispell*form.text.left:                        chainLeft
-*ispell*form.text.right:               chainRight
-*ispell*form.text.leftMargin:          4
-*ispell*form.text.?.pieceSize:         256
-*ispell*suggestions.label:             Suggestions:
-*ispell*suggestions.fromVert:          replacement
-*ispell*suggestions.internalWidth:     0
-*ispell*viewport.fromHoriz:            suggestions
-*ispell*viewport.fromVert:             text
-*ispell*viewport.width:                        194
-*ispell*viewport.height:               143
-*ispell*viewport.top:                  chainTop
-*ispell*viewport.bottom:               chainBottom
-*ispell*viewport.left:                 chainLeft
-*ispell*viewport.right:                        chainRight
-*ispell*viewport.forceBars:            1
-*ispell*viewport.allowVert:            1
-*ispell*list.defaultColumns:           1
-*ispell*list.longest:                  16384
-*ispell*commands.vertDistance:         5
-*ispell*commands.fromVert:             suggestions
-*ispell*commands.top:                  chainBottom
-*ispell*commands.bottom:               chainBottom
-*ispell*commands.right:                        chainLeft
-*ispell*commands.left:                 chainLeft
-*ispell*check.label:                   Check
-*ispell*check.width:                   54
-*ispell*check.tip:                     Ask ispell about the word in the text field
-*ispell*look.label:                    Look
-*ispell*look.fromHoriz:                        check
-*ispell*look.horizDistance:            0
-*ispell*look.width:                    46
-*ispell*look.tip:                      Runs the look command
-*ispell*undo.fromVert:                 check
-*ispell*undo.label:                    Undo
-*ispell*undo.width:                    102
-*ispell*undo.tip:                      Undo last action
-*ispell*replace.fromVert:              undo
-*ispell*replace.label:                 Replace
-*ispell*replace.tip:                   Replace occurence of the word
-*ispell*replaceAll.fromVert:           undo
-*ispell*replaceAll.fromHoriz:          replace
-*ispell*replaceAll.label:              All
-*ispell*replaceAll.tip:                        Replace all occurences of the word
-*ispell*ignore.fromVert:               replace
-*ispell*ignore.label:                  Ignore
-*ispell*ignore.tip:                    Ignore this word
-*ispell*ignoreAll.fromVert:            replaceAll
-*ispell*ignoreAll.fromHoriz:           ignore
-*ispell*ignoreAll.label:               All
-*ispell*ignoreAll.tip:                 Ignore all ocurrences of the word
-*ispell*add.fromVert:                  ignore
-*ispell*add.label:                     Add
-*ispell*add.width:                     50
-*ispell*add.tip:                       Add word to your private dictionary
-*ispell*addUncap.fromVert:             ignoreAll
-*ispell*addUncap.fromHoriz:            add
-*ispell*addUncap.label:                        Uncap
-*ispell*addUncap.horizDistance:                0
-*ispell*addUncap.width:                        50
-*ispell*addUncap.tip:                  Add word uncapitalized, to your private dictionary
-*ispell*suspend.fromVert:              add
-*ispell*suspend.label:                 Suspend
-*ispell*suspend.width:                 57
-*ispell*suspend.tip:                   Suspend ispell execution
-*ispell*cancel.fromHoriz:              suspend
-*ispell*cancel.fromVert:               addUncap
-*ispell*cancel.label:                  Close
-*ispell*cancel.width:                  43
-*ispell*cancel.horizDistance:          0
-*ispell*cancel.tip:                    Terminates ispell process
-*ispell*replace.width:                 65
-*ispell*ignore.width:                  65
-*ispell*replaceAll.width:              35
-*ispell*replaceAll.horizDistance:      0
-*ispell*ignoreAll.width:               35
-*ispell*ignoreAll.horizDistance:       0
-*ispell*terse.fromVert:                        cancel
-*ispell*terse.Label:                   Terse Mode
-*ispell*terse.width:                   104
-*ispell*terse.borderWidth:             0
-*ispell*terse.tip:                     Switch terse mode
-*ispell*status.fromVert:               viewport
-*ispell*status.fromHoriz:              suggestions
-*ispell*status.top:                    chainBottom
-*ispell*status.bottom:                 chainBottom
-*ispell*status.left:                   chainLeft
-*ispell*status.right:                  chainRight
-*ispell*status.width:                  194
-*ispell*status.borderWidth:            1
-*ispell*status.justify:                        left
-*ispell*status.internalHeight:         2
-*ispell*status.vertDistance:           2
-*ispell*options.fromVert:              status
-*ispell*options.fromHoriz:             commands
-*ispell*options.bottom:                        chainBottom
-*ispell*options.top:                   chainBottom
-*ispell*options.left:                  chainLeft
-*ispell*options.right:                 chainRight
-*ispell*options.dict.width:            121
-*ispell*options.horizDistance:         2
-*ispell*options.vertDistance:          2
-*ispell*options.defaultDistance:       2
-*ispell*dict.highlightThickness:       0
-*ispell*dict.justify:                  left
-*ispell*dict.resizable:                        False
-*ispell*dict.leftBitmap:               menu12
-*ispell*dict.label:                    Dictionary
-*ispell*dict.tip:                      Change dictionary
-*ispell*options.format.width:          65
-*ispell*format.highlightThickness:     0
-*ispell*format.justify:                        left
-*ispell*format.resizable:              False
-*ispell*format.leftBitmap:             menu12
-*ispell*format.fromHoriz:              dict
-*ispell*format.horizDistance:          0
-*ispell*format.tip:                    Select text type
-
-*columns.minWidth:                     140
-*columns.minHeight:                    76
-*columns.maxWidth:                     140
-*columns.maxHeight:                    76
-*columns.form*defaultDistance:         4
-*columns*left:                         chainLeft
-*columns*right:                                chainLeft
-*columns*top:                          chainTop
-*columns*bottom:                       chainTop
-*columns*Label.width:                  96
-*columns*Label.borderWidth:            0
-*columns*Label.internalHeight:         4
-*columns*Label.internalWidth:          2
-*columns*Label.justify:                        right
-*columns*Text.width:                   30
-*columns*Command.width:                        58
-*columns*leftLabel.label:              Left Column:
-*columns*left.fromHoriz:               leftLabel
-*columns*rightLabel.label:             Right Column:
-*columns*rightLabel.fromVert:          leftLabel
-*columns*right.fromHoriz:              rightLabel
-*columns*right.fromVert:               left
-*columns*ok.fromVert:                  rightLabel
-*columns*cancel.fromHoriz:             ok
-*columns*cancel.fromVert:              rightLabel
-*columns*cancel.horizDistance:         12
-*columns*Text.?.pieceSize:             8
-
-*columns*Text.translations: #override \
-c<Key>S:       no-op(r)\n\
-c<Key>R:       no-op(r)\n\
-m<Key>I:       no-op(r)\n\
-<Key>Return:   set-columns(ok)\n\
-<Key>Tab:      change-field()\n\
-c<Key>G:       set-columns(cancel)\n\
-<Key>Escape:   set-columns(cancel)\n\
-<Enter>:       no-op()\n\
-<Leave>:       no-op()\n\
-<Btn1Down>:    set-keyboard-focus() select-start()
-
-*columns.translations: #override \
-<Message>WM_PROTOCOLS: set-columns(cancel)
-
-! Use "white" as background for printing
-*printshell*background:   white
-
-! Print dialog
-*printdialogshell*geometry:                       600x120
-*printdialogshell*title:                          Print
-*printdialogshell*main*ok.fromVert:               innerform
-*printdialogshell*main*ok.label:                  Print
-*printdialogshell*main*ok.tip:                    Print
-*printdialogshell*main*setup.fromHoriz:           ok
-*printdialogshell*main*setup.fromVert:            innerform
-*printdialogshell*main*setup.label:               Setup...
-*printdialogshell*main*setup.tip:                 Configure print job options (page size, orientation, etc.)
-*printdialogshell*main*cancel.fromHoriz:          setup
-*printdialogshell*main*cancel.fromVert:           innerform
-*printdialogshell*main*cancel.label:              Cancel
-*printdialogshell*main*cancel.tip:                Cancel printing
-*printdialogshell*main*desclabel.label:           Printer Description:
-*printdialogshell*main*desclabel.tip:             Short description of printer
-*printdialogshell*main*desc.fromHoriz:            desclabel
-*printdialogshell*main*desc.tip:                  Short description of printer
-*printdialogshell*main*info.fromHoriz:            desc
-*printdialogshell*main*info.label:                Printer info...
-*printdialogshell*main*info.tip:                  Display additional information about this printer
-*printdialogshell*main*namelabel.fromVert:        desclabel
-*printdialogshell*main*namelabel.label:           Printer Name:
-*printdialogshell*main*namelabel.tip:             Name of selected printer
-*printdialogshell*main*name.fromHoriz:            namelabel
-*printdialogshell*main*name.fromVert:             desclabel
-*printdialogshell*main*name.tip:                  Name of selected printer
-*printdialogshell*main*selectprinter.fromHoriz:   name
-*printdialogshell*main*selectprinter.fromVert:    desclabel
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.tip:         Select a different printer
-*printdialogshell*main*filenamelabel.fromVert:    namelabel
-*printdialogshell*main*filenamelabel.label:       File Name:
-*printdialogshell*main*filenamelabel.tip:         File where the output should be stored
-*printdialogshell*main*filename.fromHoriz:        filenamelabel
-*printdialogshell*main*filename.fromVert:         namelabel
-*printdialogshell*main*filename.tip:              File where the output should be stored
-*printdialogshell*main*selectfile.fromHoriz:      filename
-*printdialogshell*main*selectfile.fromVert:       namelabel
-*printdialogshell*main*selectfile.label:          Select File...
-*printdialogshell*main*selectfile.tip:            Select file where the output should be stored
-*printdialogshell*main*printtoprinter.fromVert:   filenamelabel
-*printdialogshell*main*printtoprinter.label:      Print to Printer
-*printdialogshell*main*printtoprinter.tip:        Send print job to printer
-*printdialogshell*main*printtofile.fromVert:      filenamelabel
-*printdialogshell*main*printtofile.fromHoriz:     printtoprinter
-*printdialogshell*main*printtofile.label:         Print to File
-*printdialogshell*main*printtofile.tip:           Save print job in a file
-
-! Print job options dialog
-*printdialogshell*setup*geometry:                     600x400
-*printdialogshell*setup*title:                        Print: Print job options
-*printdialogshell*setup*ok.fromVert:                  list
-*printdialogshell*setup*ok.label:                     OK
-*printdialogshell*setup*ok.tip:                       Commit changes
-*printdialogshell*setup*cancel.fromHoriz:             ok
-*printdialogshell*setup*cancel.fromVert:              list
-*printdialogshell*setup*cancel.label:                 Cancel
-*printdialogshell*setup*cancel.tip:                   Cancel and reset to defaults
-*printdialogshell*setup*paperlist.tip:                Select paper size
-*printdialogshell*setup*resolutionlist.fromHoriz:     paperlist
-*printdialogshell*setup*resolutionlist.tip:           Select page resolution
-*printdialogshell*setup*orientationlist.fromHoriz:    resolutionlist
-*printdialogshell*setup*orientationlist.tip:          Select page orientation
-*printdialogshell*setup*plexlist.fromHoriz:           orientationlist
-*printdialogshell*setup*plexlist.tip:                 Select page plex mode (simplex, duplex, etc.)
-*printdialogshell*setup*colorspacelist.fromHoriz:     plexlist
-*printdialogshell*setup*colorspacelist.tip:           Select color space (color, grayscale, CYMK, etc.)
-*printdialogshell*setup*jobcopieslabel.fromVert:      paperlist
-*printdialogshell*setup*jobcopieslabel.tip:           Set number of job copies
-*printdialogshell*setup*jobcopieslabel.label:         Job Copies:
-*printdialogshell*setup*jobcopies.fromHoriz:          jobcopieslabel
-*printdialogshell*setup*jobcopies.fromVert:           paperlist
-*printdialogshell*setup*jobcopies.tip:                Set number of job copies
-
-! Printer selection
-*printdialogshell*printerselection*geometry:          400x150
-*printdialogshell*printerselection*title:             Print: Select printer
-*printdialogshell*printerselection*ok.fromVert:       list
-*printdialogshell*printerselection*ok.label:          OK
-*printdialogshell*printerselection*ok.tip:            Switch printer
-*printdialogshell*printerselection*cancel.fromHoriz:  ok
-*printdialogshell*printerselection*cancel.fromVert:   list
-*printdialogshell*printerselection*cancel.label:      Cancel
-*printdialogshell*printerselection*cancel.tip:        Cancel printer selection
-*printdialogshell*printerselection*list.tip:          Select printer name from list
-
-! Select job file
-*printdialogshell*selectfile*geometry:          400x80
-*printdialogshell*selectfile*title:             Print: Select job file
-*printdialogshell*selectfile*dialog.label:      Select Filename:
-
-! EOF.
diff --git a/xedit/commands.c b/xedit/commands.c
deleted file mode 100644 (file)
index 4461218..0000000
+++ /dev/null
@@ -1,1196 +0,0 @@
-/* $XConsortium: commands.c,v 1.33 91/10/21 14:32:18 eswu Exp $ */
-
-/*
- *                       COPYRIGHT 1987
- *                DIGITAL EQUIPMENT CORPORATION
- *                    MAYNARD, MASSACHUSETTS
- *                     ALL RIGHTS RESERVED.
- *
- * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
- * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
- * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
- * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
- *
- * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
- * APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
- * SET FORTH ABOVE.
- *
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Digital Equipment Corporation not be 
- * used in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission.
- */
-/* $XFree86: xc/programs/xedit/commands.c,v 1.29tsi Exp $ */
-
-#include <X11/Xfuncs.h>
-#include <X11/Xos.h>
-#include "xedit.h"
-#ifdef INCLUDE_XPRINT_SUPPORT
-#include "printdialog.h"
-#include "print.h"
-#endif /* INCLUDE_XPRINT_SUPPORT */
-#ifdef CRAY
-#include <unistd.h>
-#endif
-#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
-#include <string.h>
-#include <dirent.h>
-#include <pwd.h>
-#include <sys/stat.h>
-#include <X11/Xmu/SysUtil.h>
-#include <X11/IntrinsicP.h>
-#include <X11/Xaw/TextSrcP.h>
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#define Log(x)   { if (True) printf x; }
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-static Widget printdialog_shell = NULL;
-static Widget printdialog       = NULL;
-static char   printJobNameBuffer[PATH_MAX+256];
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
-void ResetSourceChanged(xedit_flist_item*);
-static void ResetDC(Widget, XtPointer, XtPointer);
-
-static void AddDoubleClickCallback(Widget, Bool);
-static Bool ReallyDoLoad(char*, char*);
-static char *makeBackupName(String, String, unsigned);
-
-/*
- * External
- */
-extern void _XawTextShowPosition(TextWidget);
-
-extern Widget scratch, texts[3], labels[3];
-
-#define DC_UNSAVED     (1 << 0)
-#define DC_LOADED      (1 << 1)
-#define DC_CLOBBER     (1 << 2)
-#define DC_KILL                (1 << 3)
-#define DC_SAVE                (1 << 4)
-#define DC_NEWER       (1 << 5)
-static int dc_state;
-
-static void
-AddDoubleClickCallback(Widget w, Bool state)
-{
-    if (state)
-       XtAddCallback(w, XtNcallback, ResetDC, NULL);
-    else
-       XtRemoveCallback(w, XtNcallback, ResetDC, NULL);
-}
-  
-/*     Function Name: ResetDC
- *     Description: Resets the double click flag.
- *     Arguments: w - the text widget.
- *                 junk, garbage - *** NOT USED ***
- *     Returns: none.
- */
-
-/* ARGSUSED */
-static void
-ResetDC(Widget w, XtPointer junk, XtPointer garbage)
-{
-    AddDoubleClickCallback(w, FALSE);
-}
-
-/*ARGSUSED*/
-void
-QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    DoQuit(w, NULL, NULL);
-}
-
-/*ARGSUSED*/
-void
-DoQuit(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    unsigned i;
-    Bool source_changed = False;
-
-    if (!(dc_state & DC_UNSAVED)) {
-       for (i = 0; i < flist.num_itens; i++)
-           if (flist.itens[i]->flags & CHANGED_BIT) {
-               source_changed = True;
-               break;
-           }
-    }
-    if (!source_changed) {
-#ifndef __UNIXOS2__
-       XeditLispCleanUp();
-#endif
-       exit(0);
-    }
-
-    XeditPrintf("Unsaved changes. Save them, or Quit again.\n");
-    Feep();
-    dc_state |= DC_UNSAVED;
-    AddDoubleClickCallback(XawTextGetSource(textwindow), True);
-}
-
-static char *
-makeBackupName(String buf, String filename, unsigned len)
-{
-    if (app_resources.backupNamePrefix
-       && strlen(app_resources.backupNamePrefix)) {
-       if (strchr(app_resources.backupNamePrefix, '/'))
-           XmuSnprintf(buf, len, "%s%s%s", app_resources.backupNamePrefix,
-                       filename, app_resources.backupNameSuffix);
-       else {
-           char fname[BUFSIZ];
-           char *name, ch;
-
-           strncpy(fname, filename, sizeof(fname) - 1);
-           fname[sizeof(fname) - 1] = '\0';
-           if ((name = strrchr(fname, '/')) != NULL)
-               ++name;
-           else
-               name = filename;
-           ch = *name;
-           *name = '\0';
-           ++name;
-           XmuSnprintf(buf, len, "%s%s%c%s%s",
-                       fname, app_resources.backupNamePrefix, ch, name,
-                       app_resources.backupNameSuffix);
-       }
-    }
-    else
-       XmuSnprintf(buf, len, "%s%s",
-                   filename, app_resources.backupNameSuffix);
-
-    return (strcmp(filename, buf) ? buf : NULL);
-}
-  
-#if defined(USG) && !defined(CRAY)
-int rename (from, to)
-    char *from, *to;
-{
-    (void) unlink (to);
-    if (link (from, to) == 0) {
-        unlink (from);
-        return 0;
-    } else {
-        return -1;
-    }
-}
-#endif
-
-/*ARGSUSED*/
-void
-SaveFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    if (line_edit) {
-       /* Don't try to save buffer with regex string.
-        * Call CancelFindFile() to leave line_edit mode.
-        */
-       XeditPrintf("Save: Leaving line edit mode -- nothing saved.\n");
-       CancelFindFile(w, event, params, num_params);
-       Feep();
-    }
-    else
-       DoSave(w, NULL, NULL);
-}
-
-/*ARGSUSED*/
-void
-DoSave(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    String name = GetString(filenamewindow);
-    String filename = ResolveName(name);
-    FileAccess file_access;
-    xedit_flist_item *item;
-    Boolean exists;
-    Widget source = XawTextGetSource(textwindow);
-    char buffer[BUFSIZ];
-    struct stat st;
-    static char *nothing_saved = " -- nothing saved.\n";
-
-    if (!filename) {
-       XmuSnprintf(buffer, sizeof(buffer), "%s%s",
-                   "Save: Can't resolve pathname",  nothing_saved);
-       goto error;
-    }
-    else if (*name == '\0') {
-       XmuSnprintf(buffer, sizeof(buffer), "%s%s",
-                   "Save: No filename specified", nothing_saved);
-       goto error;
-    }
-
-    item = FindTextSource(NULL, filename);
-    if (item != NULL && item->source != source) {
-       if (!(dc_state & DC_LOADED)) {
-           XmuSnprintf(buffer, sizeof(buffer), "%s%s%s%s",
-                       "Save: file ", name, " is already loaded, "
-                       "Save again to unload it", nothing_saved);
-           Feep();
-           dc_state |= DC_LOADED;
-           AddDoubleClickCallback(XawTextGetSource(textwindow), True);
-           goto error;
-       }
-       else {
-           KillTextSource(item);
-           item = FindTextSource(source = XawTextGetSource(textwindow), NULL);
-           dc_state &= ~DC_LOADED;
-       }
-    }
-    else if (item && !(item->flags & CHANGED_BIT)) {
-       if (!(dc_state & DC_SAVE)) {
-           XmuSnprintf(buffer, sizeof(buffer), "%s%s",
-                       "Save: No changes need to be saved, "
-                       "save again to override", nothing_saved);
-           Feep();
-           dc_state |= DC_SAVE;
-           AddDoubleClickCallback(XawTextGetSource(textwindow), True);
-           goto error;
-       }
-       else
-           dc_state &= ~DC_SAVE;
-    }
-
-    file_access = CheckFilePermissions(filename, &exists);
-    if (exists) {
-       if (stat(filename, &st) != 0) {
-           XmuSnprintf(buffer, sizeof(buffer), "%s%s%s",
-                       "Save: cannot stat ", name, nothing_saved);
-           goto error;
-       }
-       else if (!S_ISREG(st.st_mode)) {
-           XmuSnprintf(buffer, sizeof(buffer), "%s%s%s%s",
-                       "Save: file ", name, "is not a regular file",
-                       nothing_saved);
-           goto error;
-       }
-    }
-
-    if (!item || strcmp(item->filename, filename)) {
-       if (file_access == WRITE_OK && exists) {
-           if (!(dc_state & DC_CLOBBER)) {
-               XmuSnprintf(buffer, sizeof(buffer), "%s%s%s%s",
-                           "Save: file ", name, " already exists, "
-                           "save again to override", nothing_saved);
-               Feep();
-               dc_state |= DC_CLOBBER;
-               AddDoubleClickCallback(XawTextGetSource(textwindow), True);
-               goto error;
-           }
-           else
-               dc_state &= ~DC_CLOBBER;
-       }
-       if (!item)
-           item = FindTextSource(source, NULL);
-    }
-
-    if (item && item->mtime && exists && item->mtime < st.st_mtime) {
-       if (!(dc_state & DC_NEWER)) {
-           XmuSnprintf(buffer, sizeof(buffer), "%s%s",
-                       "Save: Newer file exists, "
-                       "save again to override", nothing_saved);
-           Feep();
-           dc_state |= DC_NEWER;
-           AddDoubleClickCallback(XawTextGetSource(textwindow), True);
-           goto error;
-       }
-       else
-           dc_state &= DC_NEWER;
-    }
-
-    if (app_resources.enableBackups && exists) {
-       char backup_file[BUFSIZ];
-
-       if (makeBackupName(backup_file, filename, sizeof(backup_file)) == NULL
-           || rename(filename, backup_file) != 0) {
-           XeditPrintf("Error backing up file: %s\n", filename);
-       }
-    }
-
-    switch (file_access = MaybeCreateFile(filename)) {
-       case NO_READ:
-       case READ_OK:
-           XeditPrintf("File %s could not be opened for writing.\n", name);
-           Feep();
-           break;
-       case WRITE_OK:
-           if (XawAsciiSaveAsFile(source, filename)) {
-               int i;
-               Arg args[1];
-
-               XmuSnprintf(buffer, sizeof(buffer),
-                           "%s       Read - Write", name);
-               XtSetArg(args[0], XtNlabel, buffer);
-               for (i = 0; i < 3; i++)
-                   if (XawTextGetSource(texts[i]) == source)
-                       XtSetValues(labels[i], args, 1);
-
-               XeditPrintf("Saved file: %s\n", name);
-
-               if (item && item->source != scratch) {
-                   XtSetArg(args[0], XtNlabel, filename);
-                   XtSetValues(item->sme, args, 1);
-
-                   XtSetArg(args[0], XtNeditType, XawtextEdit);
-                   XtSetValues(item->source, args, 1);
-
-                   XtFree(item->name);
-                   XtFree(item->filename);
-                   item->name = XtNewString(name);
-                   item->filename = XtNewString(filename);
-                   item->flags = EXISTS_BIT;
-               }
-               else {
-                   item = flist.itens[0];
-                   XtRemoveCallback(scratch, XtNcallback, SourceChanged,
-                                    (XtPointer)item);
-                   item->source = scratch =
-                   XtVaCreateWidget("textSource", international ?
-                                    multiSrcObjectClass :
-                                    asciiSrcObjectClass,
-                                    topwindow,
-                                    XtNtype, XawAsciiFile,
-                                    XtNeditType, XawtextEdit,
-                                    NULL, NULL);
-                   ResetSourceChanged(item);
-                   XtAddCallback(scratch, XtNcallback, SourceChanged,
-                                 (XtPointer)item);
-
-                   item = AddTextSource(source, name, filename, EXISTS_BIT,
-                                        file_access);
-                   XtAddCallback(item->source, XtNcallback, SourceChanged,
-                                 (XtPointer)item);
-               }
-
-               /* Keep file protection mode */
-               if (item->mode)
-                   chmod(filename, item->mode);
-
-               /* Remember time of last modification */
-               if (stat(filename, &st) == 0)
-                   item->mtime = st.st_mtime;
-
-               item->flags |= EXISTS_BIT;
-               ResetSourceChanged(item);
-           }
-           else {
-               XeditPrintf("Error saving file: %s\n",  name);
-               Feep();
-           }
-           break;
-       default:
-           Feep();
-           break;
-    }
-
-    return;
-error:
-    XeditPrintf("%s", buffer);
-    Feep();
-}
-
-/*ARGSUSED*/
-void
-DoLoad(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    if (ReallyDoLoad(GetString(filenamewindow), ResolveName(NULL))) {
-        SwitchDirWindow(False);
-        XtSetKeyboardFocus(topwindow, textwindow);
-    }
-}
-
-Bool
-LoadFileInTextwindow(char *name, char *resolved_name)
-{
-    return (ReallyDoLoad(name, resolved_name));
-}
-
-static Bool
-ReallyDoLoad(char *name, char *filename)
-{
-    Arg args[5];
-    Cardinal num_args = 0;
-    xedit_flist_item *item;
-    Widget source = XawTextGetSource(textwindow);
-
-    if (!filename) {
-       XeditPrintf("Load: Can't resolve pathname.\n");
-       Feep();
-       return (False);
-    }
-    else if (*name == '\0') {
-       XeditPrintf("Load: No file specified.\n");
-       Feep();
-    }
-    if ((item = FindTextSource(NULL, filename)) != NULL) {
-       SwitchTextSource(item);
-       return (True);
-    }
-    else {
-       struct stat st;
-
-       if (stat(filename, &st) == 0 && !S_ISREG(st.st_mode)) {
-           if (S_ISDIR(st.st_mode)) {
-               char path[BUFSIZ + 1];
-
-               strncpy(path, filename, sizeof(path) - 2);
-               path[sizeof(path) - 2] = '\0';
-               if (*path) {
-                   if (path[strlen(path) - 1] != '/')
-                       strcat(path, "/");
-               }
-               else
-                   strcpy(path, "./");
-               XtSetArg(args[0], XtNlabel, "");
-               XtSetValues(dirlabel, args, 1);
-               SwitchDirWindow(True);
-               DirWindowCB(dirwindow, path, NULL);
-               return (False);
-           }
-       }
-    }
-
-    {
-       Boolean exists;
-       int flags;
-       FileAccess file_access;
-
-       switch( file_access = CheckFilePermissions(filename, &exists) ) {
-       case NO_READ:
-           if (exists)
-               XeditPrintf("File %s, %s", name,
-                           "exists, and could not be opened for reading.\n");
-           else
-               XeditPrintf("File %s %s %s",  name,
-                           "does not exist, and",
-                           "the directory could not be opened for writing.\n");
-
-           Feep();
-           return (False);
-       case READ_OK:
-           XtSetArg(args[num_args], XtNeditType, XawtextRead); num_args++;
-           XeditPrintf("File %s opened READ ONLY.\n", name);
-           break;
-       case WRITE_OK:
-           XtSetArg(args[num_args], XtNeditType, XawtextEdit); num_args++;
-           XeditPrintf("File %s opened read - write.\n", name);
-           break;
-       default:
-           Feep();
-           return (False);
-       }
-
-       if (exists) {
-           flags = EXISTS_BIT;
-           XtSetArg(args[num_args], XtNstring, filename); num_args++;
-       }
-       else {
-           flags = 0;
-           XtSetArg(args[num_args], XtNstring, NULL); num_args++;
-       }
-
-       source = XtVaCreateWidget("textSource", international ?
-                                 multiSrcObjectClass :
-                                 asciiSrcObjectClass,
-                                 topwindow,
-                                 XtNtype, XawAsciiFile,
-                                 XtNeditType, XawtextEdit,
-                                 NULL, NULL);
-       XtSetValues(source, args, num_args);
-
-       item = AddTextSource(source, name, filename, flags, file_access);
-       XtAddCallback(item->source, XtNcallback, SourceChanged,
-                     (XtPointer)item);
-       if (exists && file_access == WRITE_OK) {
-           struct stat st;
-
-           if (stat(item->filename, &st) == 0) {
-               item->mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
-               item->mtime = st.st_mtime;
-           }
-       }
-       SwitchTextSource(item);
-       ResetSourceChanged(item);
-    }
-
-    return (True);
-}
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-static void
-printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XawPrintDialogClosePrinterConnection(printdialog, False);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XawPrintDialogCallbackStruct *pdcs = (XawPrintDialogCallbackStruct *)callData;
-    Cardinal                      n;
-    Arg                           args[2];
-    Widget                        textsource;
-
-    Log(("printOKXtProc: OK.\n"));
-    
-    /* Get TextSource object */
-    n = 0;
-    XtSetArg(args[n], XtNtextSource, &textsource); n++;
-    XtGetValues(textwindow, args, n);
-    
-    Assertion(textsource != NULL, (("printOKXtProc: textsource == NULL.\n")));
-   
-    /* ||printJobNameBuffer| must live as long the print job prints
-     * because it is used for the job title AND the page headers... */
-    sprintf(printJobNameBuffer, "Xedit print job");
-
-    DoPrintTextSource("Xedit",
-                      textsource, topwindow,
-                      pdcs->pdpy, pdcs->pcontext, pdcs->colorspace,
-                      printshellDestroyXtProc,
-                      printJobNameBuffer,
-                      pdcs->printToFile?pdcs->printToFileName:NULL);
-
-    XtPopdown(printdialog_shell);
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    Log(("printCancelXtProc: cancel.\n"));
-    XtPopdown(printdialog_shell);
-    
-    Log(("destroying print dialog shell...\n"));
-    XtDestroyWidget(printdialog_shell);
-    printdialog_shell = NULL;
-    printdialog       = NULL;
-    Log(("... done\n"));
-}
-
-
-/*ARGSUSED*/
-void
-PrintFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    DoPrint(w, NULL, NULL);
-}
-
-/*ARGSUSED*/
-void
-DoPrint(Widget w, XtPointer client_data, XtPointer call_data)
-{
-  Dimension   width, height;
-  Position    x, y;
-  Widget      parent = topwindow;
-  Log(("print!\n"));
-  
-  if (!printdialog) {
-    int n;
-    Arg args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    printdialog_shell = XtCreatePopupShell("printdialogshell",
-                                           transientShellWidgetClass,
-                                           topwindow, args, n);
-    n = 0;
-    printdialog = XtCreateManagedWidget("printdialog", printDialogWidgetClass,
-                                        printdialog_shell, args, n);
-    XtAddCallback(printdialog, XawNOkCallback,     printOKXtProc,     NULL);
-    XtAddCallback(printdialog, XawNCancelCallback, printCancelXtProc, NULL);
-
-    XtRealizeWidget(printdialog_shell);
-  }
-
-  /* Center dialog */
-  XtVaGetValues(printdialog_shell,
-      XtNwidth,  &width,
-      XtNheight, &height,
-      NULL);
-
-  x = (Position)(XWidthOfScreen( XtScreen(parent)) - width)  / 2;
-  y = (Position)(XHeightOfScreen(XtScreen(parent)) - height) / 3;
-
-  XtVaSetValues(printdialog_shell,
-      XtNx, x,
-      XtNy, y,
-      NULL);
-        
-  XtPopup(printdialog_shell, XtGrabNonexclusive);
-}
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
-/*     Function Name: SourceChanged
- *     Description: A callback routine called when the source has changed.
- *     Arguments: w - the text source that has changed.
- *                client_data - xedit_flist_item associated with text buffer.
- *                 call_data - NULL is unchanged
- *     Returns: none.
- */
-/*ARGSUSED*/
-void
-SourceChanged(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    xedit_flist_item *item = (xedit_flist_item*)client_data;
-    Bool changed = (Bool)(long)call_data;
-
-    if (changed) {
-       if (item->flags & CHANGED_BIT)
-           return;
-       item->flags |= CHANGED_BIT;
-    }
-    else {
-       if (item->flags & CHANGED_BIT)
-           ResetSourceChanged(item);
-       return;
-    }
-
-    if (flist.pixmap) {
-       Arg args[1];
-       Cardinal num_args;
-       int i;
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNleftBitmap, flist.pixmap);  ++num_args;
-       XtSetValues(item->sme, args, num_args);
-
-       for (i = 0; i < 3; i++)
-           if (XawTextGetSource(texts[i]) == item->source)
-               XtSetValues(labels[i], args, num_args);
-    }
-}
-
-/*     Function Name: ResetSourceChanged.
- *     Description: Sets the source changed to FALSE, and
- *                   registers a callback to set it to TRUE when
- *                   the source has changed.
- *     Arguments: item - item with widget to register the callback on.
- *     Returns: none.
- */
-
-void
-ResetSourceChanged(xedit_flist_item *item)
-{
-    Arg args[1];
-    Cardinal num_args;
-    int i;
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNleftBitmap, None);     ++num_args;
-    XtSetValues(item->sme, args, num_args);
-
-    dc_state = 0;
-    for (i = 0; i < 3; i++) {
-       if (XawTextGetSource(texts[i]) == item->source)
-           XtSetValues(labels[i], args, num_args);
-       AddDoubleClickCallback(XawTextGetSource(texts[i]), False);
-    }
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNsourceChanged, False); ++num_args;
-    XtSetValues(item->source, args, num_args);
-
-    item->flags &= ~CHANGED_BIT;
-}
-
-/*ARGSUSED*/
-void
-KillFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    xedit_flist_item *item = FindTextSource(XawTextGetSource(textwindow), NULL);
-
-    if (item->source == scratch) {
-       Feep();
-       return;
-    }
-
-    if (item->flags & CHANGED_BIT) {
-       if (!(dc_state & DC_KILL)) {
-           XeditPrintf("Kill: Unsaved changes. Kill again to override.\n");
-           Feep();
-           dc_state |= DC_KILL;
-           AddDoubleClickCallback(XawTextGetSource(textwindow), True);
-           return;
-       }
-       dc_state &= ~DC_KILL;
-    }
-    KillTextSource(item);
-}
-
-/*ARGSUSED*/
-void
-FindFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    char *string;
-    char *slash;
-    XawTextBlock block;
-    XawTextPosition end = XawTextSourceScan(XawTextGetSource(filenamewindow),
-                                           0, XawstAll, XawsdRight, 1, True);
-
-    if (!line_edit) {
-       string = GetString(filenamewindow);
-       if (string)
-           slash = strrchr(string, '/');
-    }
-    else {
-       string = "";
-       slash = NULL;
-       line_edit = False;
-    }
-
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.ptr = string;
-    block.length = slash ? slash - string + 1 : 0;
-
-    if (block.length != end)
-       XawTextReplace(filenamewindow, 0, end, &block);
-    XawTextSetInsertionPoint(filenamewindow, end);
-    XtSetKeyboardFocus(topwindow, filenamewindow);
-}
-
-/*ARGSUSED*/
-void
-LoadFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    if (line_edit)
-       LineEdit(textwindow);
-    else if (ReallyDoLoad(GetString(filenamewindow), ResolveName(NULL))) {
-       SwitchDirWindow(False);
-       XtSetKeyboardFocus(topwindow, textwindow);
-    }
-}
-
-/*ARGSUSED*/
-void
-CancelFindFile(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Arg args[1];
-    xedit_flist_item *item;
-
-    XtSetKeyboardFocus(topwindow, textwindow);
-
-    item = FindTextSource(XawTextGetSource(textwindow), NULL);
-
-    if (item->source != scratch)
-       XtSetArg(args[0], XtNstring, item->name);
-    else
-       XtSetArg(args[0], XtNstring, NULL);
-
-    XtSetValues(filenamewindow, args, 1);
-    /* XXX This probably should be done by the TextWidget, i.e. notice
-     * if the cursor became inivisible due to an horizontal scroll */
-    _XawTextShowPosition((TextWidget)filenamewindow);
-
-   if (XtIsManaged(XtParent(dirwindow)))
-       SwitchDirWindow(False);
-
-    line_edit = False;
-}
-
-static int
-compar(_Xconst void *a, _Xconst void *b)
-{
-    return (strcmp(*(char **)a, *(char **)b));
-}
-
-/*ARGSUSED*/
-void
-FileCompletion(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    XawTextBlock block;
-    String text;
-    int length;
-    char **matches, *save, *dir_name, *file_name, match[257];
-    unsigned n_matches, len, mlen, buflen;
-    DIR *dir;
-    Bool changed, slash = False, has_dot = False;
-#define        SM_NEVER        0
-#define SM_HINT                1
-#define SM_ALWAYS      2
-    int show_matches;
-
-    text = GetString(filenamewindow);
-
-    if (!text) {
-       Feep();
-       return;
-    }
-    else if (line_edit) {
-       Feep();
-       line_edit = 0;
-    }
-
-    {
-       XawTextPosition pos = XawTextGetInsertionPoint(w);
-       char *cslash = strchr(&text[pos], '/'), *cdot = strchr(&text[pos], '.');
-
-       if (cslash != NULL || cdot != NULL) {
-           if (cslash != NULL && (cdot == NULL || cdot > cslash)) {
-               length = cslash - text;
-               slash = True;
-           }
-           else {
-               length = cdot - text;
-               has_dot = True;
-           }
-       }
-       else
-           length = strlen(text);
-    }
-
-    if (*num_params == 1 && length == strlen(text)) {
-       switch (params[0][0]) {
-       case 'n':               /* Never */
-       case 'N':
-           show_matches = SM_NEVER;
-           break;
-       case 'h':               /* Hint */
-       case 'H':
-           show_matches = SM_HINT;
-           break;
-       case 'a':               /* Always */
-       case 'A':
-           show_matches = SM_ALWAYS;
-           break;
-       default:
-           show_matches = SM_NEVER;
-           XtAppWarning(XtWidgetToApplicationContext(w),
-                        "Bad argument to file-completion, "
-                        "must be Never, Hint or Always");
-           break;
-       }
-    }
-    else
-       show_matches = SM_NEVER;
-
-    matches = NULL;
-    n_matches = buflen = 0;
-    save = XtMalloc(length + 1);
-    memmove(save, text, length);
-    save[length] = '\0';
-
-    if (save[0] == '~' && save[1]) {
-       char *slash2 = strchr(save, '/');
-
-       if (slash2) {
-           struct passwd *pw;
-           char home[BUFSIZ];
-           char *name;
-           int slen = strlen(save), diff = slash2 - save;
-
-           *slash2 = '\0';
-           name = save + 1;
-           if (strlen(name) != 0)
-               pw = getpwnam(name);
-           else
-               pw = getpwuid(getuid());
-
-           if (pw) {
-               char fname[BUFSIZ];
-               int hlen;
-
-               strncpy(home, pw->pw_dir, sizeof(home) - 1);
-               home[sizeof(home) - 1] = '\0';
-               hlen = strlen(home);
-               strncpy(fname, slash2 + 1, sizeof(fname) - 1);
-               fname[sizeof(fname) - 1] = '\0';
-               save = XtRealloc(save, slen - diff + hlen + 2);
-               (void)memmove(save, home, hlen);
-               save[hlen] = '/';
-               strcpy(&save[hlen + 1], fname);
-
-               /* expand directory */
-               block.length = strlen(save);
-               block.ptr = save;
-               block.firstPos = 0;
-               block.format = FMT8BIT;
-               XawTextReplace(filenamewindow, 0, length, &block);
-               XawTextSetInsertionPoint(filenamewindow, length = block.length);
-           }
-           else
-               *slash2 = '/';
-       }
-    }
-
-    if ((file_name = strrchr(save, '/')) != NULL) {
-       *file_name = '\0';
-       ++file_name;
-       dir_name = save;
-       if (!file_name[0])
-           slash = True;
-       if (!dir_name[0])
-           dir_name = "/";
-    }
-    else {
-       dir_name = ".";
-       file_name = save;
-    }
-    len = strlen(file_name);
-
-    if ((dir = opendir(dir_name)) != NULL) {
-       char path[BUFSIZ], *pptr;
-       struct dirent *ent;
-       int isdir = 0, first = 1, bytes;
-
-       XmuSnprintf(path, sizeof(path), "%s/", dir_name);
-       pptr = path + strlen(path);
-       bytes = sizeof(path) - (pptr - path) - 1;
-
-       mlen = 0;
-       match[0] = '\0';
-       while ((ent = readdir(dir)) != NULL) {
-           unsigned d_namlen = strlen(ent->d_name);
-
-           if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
-               continue;
-           if (d_namlen >= len && strncmp(ent->d_name, file_name, len) == 0) {
-               char *tmp = &(ent->d_name[len]), *mat = match;
-               struct stat st;
-               Bool is_dir = FALSE;
-
-               strncpy(pptr, ent->d_name, bytes);
-               pptr[bytes] = '\0';
-               if (stat(path, &st) != 0)
-                   /* Should check errno, may be a broken symbolic link
-                    * a directory with r-- permission, etc */
-                   continue;
-               else if (first || show_matches != SM_NEVER) {
-                   is_dir = S_ISDIR(st.st_mode);
-               }
-
-               if (first) {
-                   strncpy(match, tmp, sizeof(match) - 1);
-                   match[sizeof(match) - 2] = '\0';
-                   mlen = strlen(match);
-                   first = 0;
-                   isdir = is_dir;
-               }
-               else {
-                   while (*tmp && *mat && *tmp++ == *mat)
-                       ++mat;
-                   if (mlen > mat - match) {
-                       mlen = mat - match;
-                       match[mlen] = '\0';
-                   }
-               }
-               if (show_matches != SM_NEVER) {
-                   matches = (char **)XtRealloc((char*)matches, sizeof(char**)
-                                                * (n_matches + 1));
-                   buflen += d_namlen + 1;
-                   if (is_dir) {
-                       matches[n_matches] = XtMalloc(d_namlen + 2);
-                       strcpy(matches[n_matches], ent->d_name);
-                       strcat(matches[n_matches], "/");
-                       ++buflen;
-                   }
-                   else
-                       matches[n_matches] = XtNewString(ent->d_name);
-               }
-               else if (mlen == 0 && n_matches >= 1) {
-                   ++n_matches;
-                   break;
-               }
-               ++n_matches;
-           }
-       }
-
-       closedir(dir);
-       changed = mlen != 0;
-
-       if (first || n_matches) {
-           Bool free_matches = True, add_slash = n_matches == 1 && isdir && !slash;
-
-           if (mlen && has_dot && match[mlen - 1] == '.')
-               --mlen;
-
-           if (mlen || add_slash) {
-               XawTextPosition pos;
-
-               block.firstPos = 0;
-               block.format = FMT8BIT;
-               if (mlen) {
-                   pos = length;
-                   block.length = mlen;
-                   block.ptr = match;
-                   XawTextReplace(filenamewindow, pos, pos, &block);
-                   XawTextSetInsertionPoint(filenamewindow, pos + block.length);
-               }
-               if (add_slash) {
-                   XawTextPosition actual = XawTextGetInsertionPoint(w);
-
-                   pos = XawTextSourceScan(XawTextGetSource(w), 0, XawstAll,
-                                           XawsdRight, 1, True);
-                   block.length = 1;
-                   block.ptr = "/";
-                   XawTextReplace(filenamewindow, pos, pos, &block);
-                   if (actual == pos)
-                       XawTextSetInsertionPoint(filenamewindow, pos + 1);
-               }
-           }
-           else if (n_matches != 1 || isdir) {
-               if (show_matches == SM_NEVER)
-                   Feep();
-           }
-
-           if (show_matches != SM_NEVER) {
-               if (show_matches == SM_ALWAYS || (!changed && n_matches != 1)) {
-                   char **list = NULL, *label;
-                   int n_list;
-                   Arg args[2];
-
-                   XtSetArg(args[0], XtNlist, &list);
-                   XtSetArg(args[1], XtNnumberStrings, &n_list);
-                   XtGetValues(dirwindow, args, 2);
-
-                   matches = (char **)XtRealloc((char*)matches, sizeof(char**)
-                                                * (n_matches + 2));
-                   matches[n_matches++] = XtNewString("./");
-                   matches[n_matches++] = XtNewString("../");
-                   qsort(matches, n_matches, sizeof(char*), compar);
-                   XtSetArg(args[0], XtNlist, matches);
-                   XtSetArg(args[1], XtNnumberStrings, n_matches);
-                   XtSetValues(dirwindow, args, 2);
-                   if (n_list > 0
-                       && (n_list != 1 || list[0] != XtName(dirwindow))) {
-                       while (--n_list > -1)
-                           XtFree(list[n_list]);
-                       XtFree((char*)list);
-                   }
-
-                   label = ResolveName(dir_name);
-                   XtSetArg(args[0], XtNlabel, label);
-                   XtSetValues(dirlabel, args, 1);
-                   SwitchDirWindow(True);
-                   free_matches = False;
-               }
-           }
-           if (free_matches && matches) {
-               while (--n_matches > -1)
-                   XtFree(matches[n_matches]);
-               XtFree((char*)matches);
-           }
-       }
-       else
-           Feep();
-    }
-    else
-       Feep();
-
-    XtFree(save);
-}
-
-/*ARGSUSED*/
-void
-DirWindowCB(Widget w, XtPointer user_data, XtPointer call_data)
-{
-    XawListReturnStruct *file_info = (XawListReturnStruct *)call_data;
-    char *dir_name, *string, path[BUFSIZ];
-    Arg args[2];
-
-    if (file_info == NULL)
-       string = (char *)user_data;
-    else
-       string = file_info->string;
-
-    XtSetArg(args[0], XtNlabel, &dir_name);
-    XtGetValues(dirlabel, args, 1);
-    if (*dir_name == '\0') {
-       strncpy(path, string, sizeof(path) - 1);
-       path[sizeof(path) - 1] = '\0';
-    }
-    else if (strcmp(dir_name, "/") == 0)
-       XmuSnprintf(path, sizeof(path), "/%s", string);
-    else
-       XmuSnprintf(path, sizeof(path), "%s/%s", dir_name, string);
-
-    if (*string && string[strlen(string) - 1] == '/') {
-       DIR *dir;
-
-       if ((dir = opendir(path)) != NULL) {
-           struct dirent *ent;
-           struct stat st;
-           unsigned d_namlen;
-           Bool isdir;
-           char **entries = NULL, **list = NULL;
-           int n_entries = 0, n_list = 0;
-           char *label, *pptr = path + strlen(path);
-           int bytes = sizeof(path) - (pptr - path) - 1;
-
-           while ((ent = readdir(dir)) != NULL) {
-               d_namlen = strlen(ent->d_name);
-               strncpy(pptr, ent->d_name, bytes);
-               pptr[bytes] = '\0';
-               if (stat(path, &st) != 0)
-                   /* Should check errno, may be a broken symbolic link
-                    * a directory with r-- permission, etc */
-                   continue;
-               else
-                   isdir = S_ISDIR(st.st_mode);
-
-               entries = (char **)XtRealloc((char*)entries, sizeof(char*)
-                                            * (n_entries + 1));
-               if (isdir) {
-                   entries[n_entries] = XtMalloc(d_namlen + 2);
-                   strcpy(entries[n_entries], ent->d_name);
-                   strcat(entries[n_entries], "/");
-               }
-               else
-                   entries[n_entries] = XtNewString(ent->d_name);
-               ++n_entries;
-           }
-           closedir(dir);
-
-           XtSetArg(args[0], XtNlist, &list);
-           XtSetArg(args[1], XtNnumberStrings, &n_list);
-           XtGetValues(dirwindow, args, 2);
-
-           if (n_entries == 0) {
-               entries = (char**)XtMalloc(sizeof(char*) * 2);
-               /* Directory has read but not execute permission? */
-               entries[n_entries++] = XtNewString("./");
-               entries[n_entries++] = XtNewString("../");
-           }
-           qsort(entries, n_entries, sizeof(char*), compar);
-           XtSetArg(args[0], XtNlist, entries);
-           XtSetArg(args[1], XtNnumberStrings, n_entries);
-           XtSetValues(dirwindow, args, 2);
-           if (n_list > 0
-               && (n_list != 1 || list[0] != XtName(dirwindow))) {
-               while (--n_list > -1)
-                   XtFree(list[n_list]);
-               XtFree((char*)list);
-           }
-
-           *pptr = '\0';
-           if ((label = ResolveName(path)) == NULL) {
-               Feep();
-               label = path;
-           }
-           XtSetArg(args[0], XtNlabel, label);
-           XtSetValues(dirlabel, args, 1);
-
-           strncpy(path, label, sizeof(path) - 2);
-           if (*path && path[strlen(path) - 1] != '/')
-               strcat(path, "/");
-           XtSetArg(args[0], XtNstring, path);
-           XtSetValues(filenamewindow, args, 1);
-           XtSetKeyboardFocus(topwindow, filenamewindow);
-           XawTextSetInsertionPoint(filenamewindow, strlen(path));
-       }
-       else
-           Feep();
-    }
-    else {
-       (void)ReallyDoLoad(path, path);
-       SwitchDirWindow(False);
-       XtSetKeyboardFocus(topwindow, textwindow);
-    }
-}
diff --git a/xedit/compile b/xedit/compile
deleted file mode 100755 (executable)
index c0096a7..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2009-10-06.20; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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 <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/xedit/config.h.in b/xedit/config.h.in
deleted file mode 100644 (file)
index f859945..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* 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
-
-/* Major version of this package */
-#undef PACKAGE_VERSION_MAJOR
-
-/* Minor version of this package */
-#undef PACKAGE_VERSION_MINOR
-
-/* Patch version of this package */
-#undef PACKAGE_VERSION_PATCHLEVEL
-
-/* Version number of package */
-#undef VERSION
diff --git a/xedit/configure.ac b/xedit/configure.ac
deleted file mode 100644 (file)
index 64fc0b1..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-
-dnl  Copyright 2005 Red Hat, Inc.
-dnl 
-dnl  Permission to use, copy, modify, distribute, and sell this software and its
-dnl  documentation for any purpose is hereby granted without fee, provided that
-dnl  the above copyright notice appear in all copies and that both that
-dnl  copyright notice and this permission notice appear in supporting
-dnl  documentation, and that the name of Red Hat not be used in
-dnl  advertising or publicity pertaining to distribution of the software without
-dnl  specific, written prior permission.  Red Hat makes no
-dnl  representations about the suitability of this software for any purpose.  It
-dnl  is provided "as is" without express or implied warranty.
-dnl 
-dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-dnl  PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Process this file with autoconf to create configure.
-
-AC_PREREQ([2.57])
-AC_INIT(xedit,[1.1.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xedit)
-AM_INIT_AUTOMAKE([dist-bzip2])
-AM_MAINTAINER_MODE
-
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-PKG_PROG_PKG_CONFIG
-
-AC_ARG_ENABLE(xprint,
-             AS_HELP_STRING([--enable-xprint],
-                            [Compile with xprint support (default: disabled)]),
-             [enable_xprint=$enableval], [enable_xprint=no])
-AM_CONDITIONAL(USE_XPRINT, test x$enable_xprint = xyes)
-if test x$enable_xprint = xyes; then
-   PKG_CHECK_MODULES(PKGDEPS, xprintutil xp xaw8)
-else
-   PKG_CHECK_MODULES(PKGDEPS, xaw7)
-fi
-
-AC_ARG_WITH(lispdir, AS_HELP_STRING([--with-lispdir=PATH],
-           [Directory to install lisp files (default: $libdir/X11/xedit/lisp)]),
-           [ lispdir="$withval"],
-           [ lispdir=${libdir}/X11/xedit/lisp ])
-LISPDIR=$lispdir
-AC_SUBST(LISPDIR)
-
-AC_CHECK_FUNC(realpath, [], [have_realpath=yes])
-AM_CONDITIONAL(NEED_REALPATH, test x$have_realpath = xyes)
-AC_CHECK_FUNC(strcasecmp, [], [have_strcasecmp=yes])
-AM_CONDITIONAL(NEED_STRCASECMP, test x$have_strcasecmp = xyes)
-AC_CHECK_FUNC(unsetenv, [], [have_unsetenv=yes])
-AM_CONDITIONAL(NEED_UNSETENV, test x$have_unsetenv = xyes)
-
-AC_SUBST(PKGDEPS_CFLAGS)
-AC_SUBST(PKGDEPS_LIBS)
-
-PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-AC_SUBST(appdefaultdir)
-
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-
-AC_OUTPUT([Makefile])
diff --git a/xedit/hash.c b/xedit/hash.c
deleted file mode 100644 (file)
index 4f3e14a..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Copyright (c) 2007,2008 Paulo Cesar Pereira de Andrade
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Paulo Cesar Pereira de Andrade
- */
-
-#include "util.h"
-#include <stdlib.h>
-#include <string.h>
-
-/*
- *   This is a very simplified and adapted version of the hash tables I am
- * using in a personal project. It was added to try to have a single hash
- * table implementation in xedit. The lisp (for user code) version was not
- * converted, but the following hastables have been converted:
- *  ispell.c - list of replace and ignore words
- *  hook.c   - list of auto replace words
- *  internal lisp data structures:
- *     atoms
- *     strings
- *     packages
- *     opaque types
- *   also, all code traversing hash tables is now using
- *     hash_iter_first() and hash_iter_next()
- *  conversion isn't as good as I originally wanted, code is using hash_check
- *  instead of hash_get, but this is due to the code not having a basic
- *  { void *data; int length; } object to store string like objects
- *
- *   Also, this hash table implementation was added mainly for the tags
- * support.
- */
-
-/*
- * Prototypes
- */
-static int hash_equal(hash_table *hash, hash_key *left, hash_key *right);
-static unsigned int hash_data(char *value, unsigned int length);
-static unsigned int hash_value(hash_key *key);
-
-
-/*
- * Implementation
- */
-static int
-hash_equal(hash_table *hash, hash_key *left, hash_key *right)
-{
-    if (left->length == right->length) {
-       if (left == right)
-           return (1);
-       if (hash->compare)
-           return (hash->compare(left, right));
-       return (memcmp(left->value, right->value, left->length) == 0);
-    }
-
-    return (0);
-}
-
-static unsigned int
-hash_data(char *value, unsigned int length)
-{
-    char               *ptr;
-    unsigned int       i, key;
-
-    for (i = key = 0, ptr = value; i < length; i++)
-       key = (key << (key & 1)) ^ ptr[i];
-
-    return (key);
-}
-
-static unsigned int
-hash_value(hash_key *key)
-{
-    return (hash_data(key->value, key->length));
-}
-
-hash_table *
-hash_new(unsigned int length, hash_compare compare)
-{
-    hash_table *hash;
-
-    hash = calloc(1, sizeof(hash_table));
-    if (hash) {
-       hash->entries = calloc(length, sizeof(hash_entry *));
-       if (hash->entries) {
-           hash->length = length;
-           hash->compare = compare;
-           hash->iter.offset = -1;
-       }
-       else {
-           free(hash);
-           hash = (hash_table *)0;
-       }
-    }
-
-    return (hash);
-}
-
-hash_entry *
-hash_put(hash_table *hash, hash_entry *entry)
-{
-    unsigned int       key;
-    hash_entry         *prev, *ptr;
-
-    /* Offset in hash table vector for this entry */
-    key = hash_value(entry->key) % hash->length;
-
-    /* We hope this is nil for most calls */
-    ptr = hash->entries[key];
-
-    /* Check if clashed with another entry */
-    for (prev = ptr; ptr; prev = ptr, ptr = ptr->next) {
-       /* Replace current entry */
-       if (hash_equal(hash, entry->key, ptr->key)) {
-           /* If not trying to readd same value */
-           if (entry != ptr) {
-               if (ptr == prev)
-                   hash->entries[key] = entry;
-               else
-                   prev->next = entry;
-               entry->next = ptr->next;
-               /* Finished */
-           }
-           else
-               ptr = (hash_entry *)0;
-           goto hash_put_done;
-       }
-    }
-
-    /* Add new entry */
-    if (prev == (hash_entry *)0)
-       /* If no entry in offset */
-       hash->entries[key] = entry;
-    else
-       /* Add to end of clashing list */
-       prev->next = entry;
-    entry->next = (hash_entry *)0;
-
-    /* Increase sum of entries counter*/
-    ++hash->count;
-
-hash_put_done:
-    /* ptr will be nil if no entry was replaced, of tried to add
-     * again an entry already in the hash table */
-    return (ptr);
-}
-
-hash_entry *
-hash_get(hash_table *hash, hash_key *name)
-{
-    unsigned int       key;
-    hash_entry         *entry;
-
-    key = hash_value(name) % hash->length;
-    for (entry = hash->entries[key]; entry; entry = entry->next) {
-       if (hash_equal(hash, name, entry->key)) {
-
-           return (entry);
-       }
-    }
-
-    return ((hash_entry *)0);
-}
-
-hash_entry *
-hash_check(hash_table *hash, char *name, unsigned int length)
-{
-    unsigned int       key;
-    hash_entry         *entry;
-
-    key = hash_data(name, length) % hash->length;
-    for (entry = hash->entries[key]; entry; entry = entry->next) {
-       if (length == entry->key->length &&
-           memcmp(name, entry->key->value, length) == 0) {
-
-           return (entry);
-       }
-    }
-
-    return ((hash_entry *)0);
-}
-
-hash_entry *
-hash_rem_no_free(hash_table *hash, hash_entry *entry)
-{
-    unsigned int       key;
-    hash_entry         *ptr, *prev;
-
-    key = hash_value(entry->key) % hash->length;
-    for (ptr = prev = hash->entries[key]; ptr; prev = ptr, ptr = ptr->next) {
-       if (ptr == entry) {
-           --hash->count;
-           if (ptr == prev)
-               hash->entries[key] = ptr->next;
-           else
-               prev->next = ptr->next;
-           break;
-       }
-    }
-
-    if (ptr && ptr == hash->iter.entry)
-       hash->iter.entry = ptr->next;
-
-    /* If entry wasn't in hash table ptr will be nil */
-    return (ptr);
-}
-
-void
-hash_rem(hash_table *hash, hash_entry *entry)
-{
-    entry = hash_rem_no_free(hash, entry);
-    if (entry) {
-       free(entry->key->value);
-       free(entry->key);
-       free(entry);
-    }
-}
-
-void
-hash_rehash(hash_table *hash, unsigned int length)
-{
-    unsigned int       i, key;
-    hash_entry         *entry, *next, **entries;
-
-    entries = (hash_entry **)calloc(length, sizeof(hash_entry *));
-    if (entries) {
-       /* Populate the new table, note that clashes are now in reverse order */
-       for (i = 0; i < hash->length; i++) {
-           for (entry = hash->entries[i]; entry; entry = next) {
-               next = entry->next;
-               key = hash_value(entry->key) % length;
-               entry->next = entries[key];
-               entries[key] = entry;
-           }
-       }
-
-       /* Finish updating hash table */
-       free(hash->entries);
-       hash->entries = entries;
-       hash->length = length;
-    }
-    hash->iter.offset = -1;
-}
-
-hash_entry *
-hash_iter_first(hash_table *hash)
-{
-    hash->iter.offset = 0;
-    hash->iter.entry = (hash_entry *)0;
-
-    return (hash_iter_next(hash));
-}
-
-hash_entry *
-hash_iter_next(hash_table *hash)
-{
-    if (hash->iter.offset >= 0) {
-       if (hash->iter.entry) {
-           if ((hash->iter.entry = hash->iter.entry->next))
-               return (hash->iter.entry);
-           ++hash->iter.offset;
-       }
-       for (; hash->iter.offset < hash->length; hash->iter.offset++) {
-           if ((hash->iter.entry = hash->entries[hash->iter.offset]))
-               return (hash->iter.entry);
-       }
-       hash->iter.entry = (hash_entry *)0;
-       hash->iter.offset = -1;
-    }
-
-    return ((hash_entry *)0);
-}
-
-void
-hash_clr(hash_table *hash)
-{
-    unsigned int       i;
-    hash_entry         *entry, *next;
-
-    /* Extra data should be free'd with the iterator */
-    for (i = 0; i < hash->length; i++) {
-       entry = hash->entries[i];
-       if (entry) {
-           for (next = entry; entry; entry = next) {
-               next = entry->next;
-               free(entry->key->value);
-               free(entry->key);
-               free(entry);
-           }
-           hash->entries[i] = (hash_entry *)0;
-       }
-    }
-
-    hash->count = 0;
-    hash->iter.offset = -1;
-}
-
-void
-hash_del(hash_table *hash)
-{
-    hash_clr(hash);
-    free(hash->entries);
-    free(hash);
-}
diff --git a/xedit/hook.c b/xedit/hook.c
deleted file mode 100644 (file)
index 7dd6da0..0000000
+++ /dev/null
@@ -1,1265 +0,0 @@
-/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/hook.c,v 1.9 2003/01/08 05:07:40 paulo Exp $ */
-
-/*
- * This file is intended to be used to add all the necessary hooks to xedit
- * emulate certain features of emacs (and other text editors) that are better
- * kept only in xedit, to avoid unnecessary code in the Text Widget.
- *
- * The code here is not finished, and will probably be changed frequently.
- */
-
-#include "xedit.h"
-#include "re.h"
-#include "util.h"
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-/*
- * Types
- */
-typedef struct _ReplaceEntry {
-    hash_key *word;
-    struct _ReplaceEntry *next;
-    char *replace;
-} ReplaceEntry;
-
-typedef enum {
-    SubstituteDisabled,
-    SubstituteAsk,
-    SubstituteNo,
-    SubstituteYes
-} SubstitutionState;
-
-typedef struct _EditInfo {
-    /* Xedit regex data */
-    re_cod regex;
-    re_mat mats[10];
-
-    /* Last command entered */
-    char command[128];
-
-    /* String and flags used to compile regex */
-    char pattern[64];
-    char subst_pattern[64];
-    int pat_length;
-    int flags;
-
-    /* Substitution buffer */
-    char subst[64];
-    int soff, slen, sref;
-
-    /* For interactive substitution */
-    int callback;
-    Widget widget;
-    char *text_line;
-    SubstitutionState state;
-    XawTextPosition from, to, start, end, first, last;
-
-    /* Use if need to allocate a buffer to pass the entire line to reexec */
-    char *line;
-    long lsize;
-
-    /* Buffer to prepare replacement, if needs to expand backreferences */
-    char *buffer;
-    long bsize;
-} EditInfo;
-
-/*
- * Prototypes
- */
-static void ActionHook(Widget, XtPointer, String, XEvent*, String*, Cardinal*);
-static void AutoReplaceHook(Widget, String, XEvent*);
-static Bool StartAutoReplace(void);
-static char *ReplacedWord(char*, char*);
-static void AutoReplace(Widget, XEvent*);
-static void AutoReplaceCallback(Widget, XtPointer, XtPointer);
-
-static void SubstituteHook(Widget w, String action, XEvent *event);
-static void SubstituteCallback(Widget, XtPointer, XtPointer);
-
-/*
- * Initialization
- */
-#define STRTBLSZ       11
-static hash_table *replace_hash;
-static EditInfo einfo;
-extern Widget scratch;
-
-/*
- * Implementation
- */
-Bool
-StartHooks(XtAppContext app)
-{
-    static Bool first_time = True;
-
-    if (first_time) {
-       StartAutoReplace();
-       (void)XtAppAddActionHook(app, ActionHook, NULL);
-       first_time = False;
-
-       return (True);
-    }
-    return (False);
-}
-
-/*ARGSUSED*/
-static void
-ActionHook(Widget w, XtPointer client_data, String action, XEvent *event,
-          String *params, Cardinal *num_params)
-{
-    AutoReplaceHook(w, action, event);
-    SubstituteHook(w, action, event);
-}
-
-/*** auto replace ***/
-struct {
-    Widget widget;
-    String text;
-    Cardinal length;
-    XawTextPosition left, right;
-    Bool replace;
-    Bool enabled;
-} auto_replace;
-
-static void
-AutoReplaceHook(Widget w, String action, XEvent *event)
-{
-    static Bool multiply;
-
-    if (w != textwindow || !auto_replace.enabled)
-       return;
-
-    if (auto_replace.widget != textwindow) {
-       if (auto_replace.replace) {
-           auto_replace.replace = False;
-           XtRemoveCallback(auto_replace.widget, XtNpositionCallback,
-                            AutoReplaceCallback, NULL);
-       }
-    }
-    else if (strcmp(action, "multiply") == 0) {
-       multiply = True;
-       return;
-    }
-    else if (strcmp(action, "numeric") == 0) {
-       if (multiply)
-           return;
-    }
-    else if (strcmp(action, "insert-char") && strcmp(action, "newline") &&
-       strcmp(action, "newline-and-indent")) {
-       return;
-    }
-    multiply = False;
-
-    AutoReplace(w, event);
-}
-
-static Bool
-StartAutoReplace(void)
-{
-    Bool esc;
-    int len, llen, rlen, count = 0;
-    char ch, *tmp, *left, *right, *replace = app_resources.auto_replace;
-
-    if (!replace || !*replace)
-       return (False);
-
-    replace_hash = hash_new(STRTBLSZ, NULL);
-
-    left = XtMalloc(llen = 256);
-    right = XtMalloc(rlen = 256);
-    while (*replace) {
-       /* skip white spaces */
-       while (*replace && isspace(*replace))
-           ++replace;
-       if (!*replace)
-           break;
-
-       /* read left */
-       tmp = replace;
-       while (*replace && !isspace(*replace))
-           ++replace;
-       len = replace - tmp;
-       if (len >= llen)
-           left = XtRealloc(left, llen = len + 1);
-       strncpy(left, tmp, len);
-       left[len] = '\0';
-
-       /* skip white spaces */
-       while (*replace && isspace(*replace))
-           ++replace;
-
-       /* read right */
-       len = 0;
-       esc = False;
-       while ((ch = *replace) != '\0') {
-           ++replace;
-           if (len + 2 >= rlen)
-               right = XtRealloc(right, rlen += 256);
-           if (ch == '\\') {
-               if (esc)
-                   right[len++] = '\\';
-               esc = !esc;
-               continue;
-           }
-           else if (ch == '\n' && !esc)
-               break;
-           else
-               right[len++] = ch;
-           esc = False;
-       }
-       right[len] = '\0';
-
-       (void)ReplacedWord(left, right);
-       ++count;
-    }
-    XtFree(left);
-    XtFree(right);
-
-    return (auto_replace.enabled = count > 0);
-}
-
-static char *
-ReplacedWord(char *word, char *replace)
-{
-    int length;
-    ReplaceEntry *entry;
-
-    length = strlen(word);
-    entry = (ReplaceEntry *)hash_check(replace_hash, word, length);
-    if (entry == NULL && replace != NULL) {
-       entry = XtNew(ReplaceEntry);
-       entry->word = XtNew(hash_key);
-       entry->word->value = XtNewString(word);
-       entry->word->length = length;
-       entry->next = NULL;
-       entry->replace = XtNewString(replace);
-       hash_put(replace_hash, (hash_entry *)entry);
-    }
-    else if (replace) {
-       XtFree(entry->replace);
-       entry->replace = XtNewString(replace);
-    }
-
-    return (entry ? entry->replace : NULL);
-}
-
-static void
-AutoReplace(Widget w, XEvent *event)
-{
-    static XComposeStatus compose = {NULL, 0};
-    KeySym keysym;
-    XawTextBlock block;
-    XawTextPosition left, right, pos;
-    Widget source;
-    int i, len, size;
-    char *str, buf[32], mb[sizeof(wchar_t)];
-
-    size = XLookupString((XKeyEvent*)event, mb, sizeof(mb), &keysym, &compose);
-
-    if (size != 1 || isalnum(*mb))
-       return;
-
-    source = XawTextGetSource(w);
-    right = XawTextGetInsertionPoint(w);
-    left = XawTextSourceScan(source, right, XawstWhiteSpace,
-                            XawsdLeft, 1, False);
-
-    if (left < 0 || left == right)
-       return;
-
-    len = 0;
-    str = buf;
-    size = sizeof(buf);
-    pos = left;
-    while (pos < right) {
-       pos = XawTextSourceRead(source, pos, &block, right - pos);
-       for (i = 0; i < block.length; i++) {
-           if (block.format == FMT8BIT)
-               *mb = block.ptr[i];
-           else
-               wctomb(mb, ((wchar_t*)block.ptr)[i]);
-           str[len++] = *mb;
-           if (len + 2 >= size) {
-               if (str == buf)
-                   str = XtMalloc(size += sizeof(buf));
-               else
-                   str = XtRealloc(str, size += sizeof(buf));
-           }
-       }
-    }
-    str[len] = '\0';
-    if ((auto_replace.text = ReplacedWord(str, NULL)) != NULL) {
-       auto_replace.length = strlen(auto_replace.text);
-       auto_replace.left = left;
-       auto_replace.right = right;
-       auto_replace.replace = True;
-       XtAddCallback(auto_replace.widget = w, XtNpositionCallback,
-                     AutoReplaceCallback, NULL);
-    }
-    if (str != buf)
-       XtFree(str);
-}
-
-/*ARGSUSED*/
-static void
-AutoReplaceCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    int i, inc;
-    XawTextBlock block, text;
-    char buffer[1024], mb[sizeof(wchar_t)];
-    XawTextPosition left, right, pos;
-
-    if (!auto_replace.replace || w != auto_replace.widget)
-       return;
-
-    XtRemoveCallback(auto_replace.widget, XtNpositionCallback,
-                    AutoReplaceCallback, NULL);
-    auto_replace.replace = False;
-
-    inc = XawTextGetInsertionPoint(w) - auto_replace.right;
-    if (auto_replace.length + inc > sizeof(buffer))
-       block.ptr = XtMalloc(auto_replace.length + inc);
-    else
-       block.ptr = buffer;
-    memcpy(block.ptr, auto_replace.text, auto_replace.length);
-
-    block.length = auto_replace.length;
-    pos = left = auto_replace.right;
-    right = left + inc;
-    while (pos < right) {
-       pos = XawTextSourceRead(XawTextGetSource(w), pos, &text, inc);
-       for (i = 0; i < text.length; i++) {
-           if (text.format == FMT8BIT)
-               *mb = text.ptr[i];
-           else
-               wctomb(mb, ((wchar_t*)text.ptr)[i]);
-           block.ptr[block.length++] = *mb;
-       }
-    }
-
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-
-    if (XawTextReplace(w, auto_replace.left, auto_replace.right + inc,
-                      &block) == XawEditDone)
-       XawTextSetInsertionPoint(w, auto_replace.left + block.length);
-
-    if (block.ptr != buffer)
-       XtFree(block.ptr);
-}
-
-/*ARGUSED*/
-void
-LineEditAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    XawTextBlock block;
-
-    if (international) {
-       /* XXX FIXME */
-        fprintf(stderr, "LineEditAction: Not working in international mode.\n");
-       return;
-    }
-
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.ptr = einfo.command;
-    block.length = strlen(einfo.command);
-
-    XawTextReplace(filenamewindow, 0,
-                  XawTextLastPosition(filenamewindow), &block);
-    XtSetKeyboardFocus(topwindow, filenamewindow);
-    line_edit = True;
-}
-
-void
-LineEdit(Widget w)
-{
-    /* Global usage variables */
-    XawTextPosition from, to, first, last, position, length, redisplay;
-    int replace, compile, ecode, nth, flags, count, etype;
-    char *command, *line, buffer[128];
-    XawTextBlock block;
-    Widget source;
-    XawTextScanDirection direction;
-    xedit_flist_item *item;
-
-    /* Variables used while parsing command */
-    int state, action, offset, icase, confirm;
-    long lfrom, lto, lfinc, ltinc, number;
-    char *ptr, *pstart, *pend, *rstart, *rend, *tmp;
-
-    /* Variables used in the search/replace loop */
-    int len;
-    XawTextPosition adjust = 0;
-
-    command = GetString(filenamewindow);
-    length = strlen(command);
-    if (length >= sizeof(einfo.command)) {
-       Feep();
-       return;
-    }
-
-    item = FindTextSource(XawTextGetSource(w), NULL);
-    source = item->source;
-    position = XawTextGetInsertionPoint(w);
-    first = XawTextSourceScan(source, 0, XawstAll, XawsdLeft, 1, True);
-    last = XawTextSourceScan(source, 0, XawstAll, XawsdRight, 1, True);
-    compile = redisplay = nth = count = confirm = 0;
-    direction = XawsdRight;
-    flags = RE_STARTEND;
-
-       /* Error types */
-#define T_NONE         0
-#define T_OPTION       1
-#define T_ICASE                2
-#define T_COMMAND      3
-#define T_REPLACE      4
-#define T_SEARCH       5
-#define T_BACKSLASH    6
-#define T_DIRECTION    7
-#define T_COMMA                8
-#define T_OFFSET       9
-#define T_INCREMENT    10
-#define T_NUMBER       11
-#define T_UNFINISHED   12
-#define T_RANGE                13
-#define T_BACKREF      14
-#define T_EDIT         15
-    etype = T_NONE;
-
-#define FAIL(code)     { etype = code; goto fail; }
-
-       /* Value for the line value, anything else is the line number */
-#define L_FIRST                -1
-#define L_CURRENT      -2
-#define L_LAST         -3
-    lfrom = L_FIRST;
-    lto = L_LAST;
-
-       /* Parsing states */
-#define E_FINC         0
-#define E_FROM         1
-#define E_COMMA                2
-#define E_TINC         3
-#define E_TO           4
-#define E_COMMAND      5
-#define E_REGEX                6
-#define E_SUBST                7
-#define E_OPTIONS      8
-    state = E_FROM;        /* Beginning interpretation */
-
-       /* Known commands */
-#define        A_SEARCH        0
-#define        A_REPLACE       1
-    action = A_SEARCH;
-
-       /* Flag to replace all occurrences */
-#define        O_ALL           -1
-
-    number = 1;
-    lfinc = ltinc = 0;
-    icase = offset = 0;
-    pstart = pend = rstart = rend = NULL;
-
-    if (einfo.state != SubstituteDisabled) {
-       if (einfo.widget != w || strcmp(einfo.command, command)) {
-           einfo.widget = w;
-           einfo.state = SubstituteAsk;
-       }
-       else {
-           XawTextPosition s_start, s_end;
-
-           XawTextGetSelectionPos(w, &s_start, &s_end);
-           if (s_start != einfo.start || s_end != einfo.end)
-               einfo.state = SubstituteAsk;
-           confirm = replace = 1;
-           from = einfo.from;
-           to = einfo.to;
-           first = einfo.first;
-           last = einfo.last;
-           goto confirm_label;
-       }
-    }
-
-    /* Remember last command */
-    strcpy(einfo.command, command); 
-
-    /* Loop parsing command */
-    for (ptr = einfo.command; *ptr;) {
-       switch (*ptr++) {
-           case 'c':
-               if (state != E_OPTIONS &&
-                   state != E_COMMAND &&
-                   state != E_REGEX)
-                   FAIL(T_OPTION)
-               confirm = 1;
-               break;
-           case 'g':
-               if (state != E_OPTIONS &&
-                   state != E_COMMAND &&
-                   state != E_REGEX)
-                   FAIL(T_OPTION)
-               offset = O_ALL;
-               break;
-           case 'i':
-               if (state != E_OPTIONS &&
-                   state != E_COMMAND &&
-                   state != E_REGEX &&
-                   state != E_FROM)
-                   FAIL(T_ICASE)
-               icase = 1;
-               break;
-           case 's':
-               if (state == E_FROM)
-                   lfrom = lto = L_CURRENT;
-               else if (state == E_COMMA) {
-                   lto = L_CURRENT;
-                   ltinc = lfinc;
-               }
-               else if (state == E_TO)
-                   lto = L_LAST;
-               else if (state == E_FINC) {
-                   ltinc = lfinc;
-                   lto = L_CURRENT;
-               }
-               else if (state != E_COMMAND && state != E_TINC)
-                   FAIL(T_COMMAND)
-               action = A_REPLACE;
-               state = E_REGEX;
-               break;
-           case '?':
-               if (action == A_REPLACE)
-                   FAIL(T_REPLACE)
-           case '/':
-               if (state == E_TINC)
-                   state = action == A_REPLACE ? E_REGEX : E_FROM;
-               else if (state == E_COMMA || state == E_FINC) {
-                   lto = L_LAST;
-                   state = E_FROM;
-               }
-               else if (state == E_TO) {
-                   if (ltinc == 0)
-                       lto = L_LAST;
-                   state = E_FROM;
-               }
-               else if (state == E_COMMAND)
-                   state = E_FROM;
-               else if (state != E_REGEX &&
-                        state != E_SUBST &&
-                        state != E_FROM)
-                   FAIL(T_SEARCH)
-               if (state != E_SUBST)
-                   direction = ptr[-1] == '/' ? XawsdRight : XawsdLeft;
-               for (tmp = ptr; *tmp; tmp++) {
-                   if (*tmp == '\\') {
-                       if (*++tmp == '\0')
-                           FAIL(T_BACKSLASH)
-                   }
-                   else if (*tmp == ptr[-1])
-                       break;
-               }
-               if (state == E_REGEX) {
-                   if (*tmp != ptr[-1])
-                       FAIL(T_DIRECTION)
-                   pstart = ptr;
-                   pend = ptr = tmp;
-                   state = E_SUBST;
-               }
-               else if (state == E_FROM) {
-                   pstart = ptr;
-                   pend = ptr = tmp;
-                   state = E_OPTIONS;
-                   if (*ptr)
-                       ++ptr;
-               }
-               else { /* E_SUBST */
-                   rstart = ptr;
-                   rend = tmp;
-                   state = E_OPTIONS;
-                   ptr = tmp;
-                   if (*ptr)
-                       ++ptr;
-               }
-               break;
-           case ',':
-               if (state == E_FROM)
-                   lfrom = L_FIRST;
-               else if (state == E_FINC)
-                   lfrom = L_CURRENT;
-               else if (state != E_COMMA)
-                   FAIL(T_COMMA)
-               state = E_TO;
-               break;
-           case '%':
-               if (state == E_FROM) {
-                   lfrom = L_FIRST;
-                   lto = L_LAST;
-                   state = E_COMMAND;
-               }
-               else
-                   FAIL(T_OFFSET)
-               break;
-           case '$':
-               if (state != E_TO)
-                   FAIL(T_OFFSET)
-               lto = L_LAST;
-               state = E_COMMAND;
-               break;
-           case '.':
-               if (state == E_FROM) {
-                   lfrom = L_CURRENT;
-                   state = E_COMMA;
-               }
-               else if (state == E_TO) {
-                   lto = L_CURRENT;
-                   state = E_COMMAND;
-               }
-               else
-                   FAIL(T_OFFSET)
-               break;
-           case '+':
-               if (state == E_FROM) {
-                   lfinc = 1;
-                   lfrom = L_CURRENT;
-                   state = E_FINC;
-               }
-               else if (state == E_TO) {
-                   ltinc = 1;
-                   lto = L_CURRENT;
-                   state = E_TINC;
-               }
-               else
-                   FAIL(T_INCREMENT)
-               break;
-           case '-':       case '^':
-               if (state == E_FROM) {
-                   lfinc = -1;
-                   lfrom = L_CURRENT;
-                   state = E_FINC;
-               }
-               else if (state == E_TO) {
-                   ltinc = -1;
-                   lto = L_CURRENT;
-                   state = E_TINC;
-               }
-               else
-                   FAIL(T_INCREMENT)
-               number = -1;
-               break;
-           case ';':
-               if (state != E_FROM)
-                   FAIL(T_OFFSET)
-               lfrom = L_CURRENT;
-               lto = L_LAST;
-               state = E_COMMAND;
-               break;
-           case '1':       case '2':       case '3':
-           case '4':       case '5':       case '6':
-           case '7':       case '8':       case '9':
-               number = number * (ptr[-1] - '0');
-               while (isdigit(*ptr))
-                   number = number * 10 + (*ptr++ - '0');
-               if (state == E_FROM) {
-                   lfrom = number;
-                   state = E_COMMA;
-               }
-               else if (state == E_FINC) {
-                   lfinc = number;
-                   state = E_COMMA;
-               }
-               else if (state == E_TO) {
-                   lto = number;
-                   state = E_COMMAND;
-               }
-               else if (state == E_TINC) {
-                   ltinc = number;
-                   state = E_COMMAND;
-               }
-               else if (state == E_OPTIONS && action == A_REPLACE)
-                   offset = number - 1;
-               else
-                   FAIL(T_NUMBER)
-               number = 1;
-               break;
-           case '\0':
-               if (state == E_OPTIONS)
-                   break;
-           default:
-               FAIL(T_UNFINISHED)
-       }
-    }
-
-    replace = action == A_REPLACE;
-
-    switch (lfrom) {
-       case L_FIRST:
-           from = first;
-           break;
-       case L_LAST:
-           from = LSCAN(last, 1, False);
-           break;
-       case L_CURRENT:
-           if (lfinc <= 0)
-               from = LSCAN(position, -lfinc + 1, False);
-           else {
-               from = RSCAN(position, lfinc + 1, False);
-               from = LSCAN(from, 1, False);
-           }
-           break;
-       default:
-           from = RSCAN(first, lfrom, False);
-           from = LSCAN(from, 1, False);
-           break;
-    }
-    /* Just requesting to go to the numbered line */
-    if (state == E_COMMA || state == E_FINC) {
-       XawTextSetInsertionPoint(w, from);
-       return;
-    }
-
-    length = pend - pstart;
-    if (pstart == NULL || (replace && rstart == NULL) ||
-       length >= sizeof(einfo.pattern) - 1)
-       FAIL(T_UNFINISHED)
-
-    /* Need to (re)compile regular expression pattern? */
-    if ((!!(einfo.flags & RE_ICASE) ^ icase) ||
-       einfo.pat_length != length ||
-       memcmp(pstart, einfo.pattern,
-              length > einfo.pat_length ? einfo.pat_length : length)) {
-       compile = 1;
-       memcpy(einfo.pattern, pstart, length);
-       einfo.pattern[length] = '\0';
-       einfo.flags = icase ? RE_ICASE : 0;
-    }
-
-    /* Check range of lines to operate on */
-    switch (lto) {
-       case L_FIRST:
-           to = RSCAN(first, 1, True);
-           break;
-       case L_LAST:
-           to = last;
-           break;
-       case L_CURRENT:
-           if (ltinc < 0) {
-               to = LSCAN(position, -ltinc + 1, True);
-               to = RSCAN(to, 2, True);
-           }
-           else
-               to = RSCAN(position, ltinc + 1, True);
-           break;
-       default:
-           to = RSCAN(first, lto, True);
-           break;
-    }
-    if (from >= to)
-       FAIL(T_RANGE)
-
-    /* Set first and last position allowed to search/replace */
-    first = from;
-    last = to;
-
-    /* Check bounds to work on */
-    if (replace) {
-       int i, j, ch;
-
-       /* Check number of required match results and remove/parse backslashes */
-       einfo.slen = rend - rstart;
-       einfo.sref = 0;
-       einfo.soff = offset;
-       for (i = j = 0; i < einfo.slen; i++) {
-           ch = rstart[i];
-           if (ch == '\\') {
-               ++i;
-               switch (rstart[i]) {
-                   case '0':   ch = '\0';      break;
-                   case 'a':   ch = '\a';      break;
-                   case 'b':   ch = '\b';      break;
-                   case 'f':   ch = '\f';      break;
-                   case 'n':   ch = '\n';      break;
-                   case 'r':   ch = '\r';      break;
-                   case 't':   ch = '\t';      break;
-                   case 'v':   ch = '\v';      break;
-                   case '1':   case '2':       case '3':
-                   case '4':   case '5':       case '6':
-                   case '7':   case '8':       case '9':
-                       einfo.subst[j++] = '\\';
-                       if (rstart[i] - '0' > einfo.sref)
-                           einfo.sref = rstart[i] - '0';
-                       /* FALLTHROUGH */
-                   default:
-                       ch = rstart[i];
-                       break;
-               }
-           }
-           einfo.subst[j++] = ch;
-       }
-       einfo.slen = j;
-    }
-    else if (einfo.widget != w) {
-       /* Just a flag for backward search */
-       einfo.from = last;
-       einfo.widget = w;
-    }
-
-    /* Compile pattern if required */
-    if (compile) {
-       int ch;
-       char *eptr, *pptr;
-
-       /* Parse backslashes */
-       pptr = einfo.subst_pattern;
-       for (eptr = einfo.pattern, ch = *eptr++; ch; ch = *eptr++) {
-           if (ch == '\\') {
-               switch (*eptr) {
-                   case '0':   ch = '\0';  einfo.flags |= RE_PEND; break;
-                   case 'a':   ch = '\a';      break;
-                   case 'b':   ch = '\b';      break;
-                   case 'f':   ch = '\f';      break;
-                   case 'n':   ch = '\n';      break;
-                   case 'r':   ch = '\r';      break;
-                   case 't':   ch = '\t';      break;
-                   case 'v':   ch = '\v';      break;
-                   default:                    break;
-               }
-               if (ch != '\\')
-                   ++eptr;
-           }
-           *pptr++ = ch;
-       }
-       *pptr = '\0';
-
-       refree(&einfo.regex);
-       /* Allow nuls in search regex */
-       einfo.regex.re_endp = pptr;
-       ecode = recomp(&einfo.regex, einfo.subst_pattern, einfo.flags);
-       if (ecode)
-           goto print;
-    }
-
-    if (!replace && position >= first && position <= last) {
-       from = position;
-       /* The backwards repetition currently is only backwards when
-        * changing lines, so remember from where started, to also
-        * search in the first line. */
-       if (LSCAN(from, 1, False) == from) {
-           if (direction == XawsdLeft)
-               einfo.from = from;
-       }
-       else
-           flags |= RE_NOTBOL;
-    }
-    to = RSCAN(from, 1, True);
-
-    if (confirm) {
-       if (!replace)
-           FAIL(T_UNFINISHED)
-       einfo.widget = w;
-       einfo.state = SubstituteAsk;
-       einfo.from = from;
-       einfo.to = to;
-       einfo.first = first;
-       einfo.last = last;
-    }
-    else
-       einfo.state = SubstituteDisabled;
-
-confirm_label:
-    if (replace) {
-       redisplay = 1;
-       XawTextDisableRedisplay(w);
-    }
-
-    for (;;) {
-       if (confirm && einfo.state != SubstituteAsk) {
-           /* Restore state from previous call */
-           ecode = 0;
-           nth = einfo.soff;
-           /* einfo.mats should not have changed */
-           if (einfo.state == SubstituteYes) {
-               einfo.state = SubstituteAsk;
-               line = einfo.text_line;
-               goto substitute_label;
-           }
-           else {
-               ++nth;
-               einfo.state = SubstituteAsk;
-               from = einfo.from = einfo.end;
-               goto no_substitute_label;
-           }
-       }
-
-       /* Read or use a line of text inplace */
-       position = from;
-       length = to - from;
-       XawTextSourceRead(source, position, &block, to - position);
-       if (block.length >= length)
-           line = block.ptr;
-       else {
-           if (length > einfo.lsize) {
-               einfo.line = XtRealloc(einfo.line, to - from);
-               einfo.lsize = to - from;
-           }
-           memcpy(einfo.line, block.ptr, block.length);
-           length = block.length;
-           for (position += length;
-                position < to && block.length;
-                position += block.length) {
-               XawTextSourceRead(source, position, &block, to - position);
-               memcpy(einfo.line + length, block.ptr, block.length);
-               length += block.length;
-           }
-           line = einfo.line;
-       }
-
-       /* Execute expression */
-       einfo.mats[0].rm_so = 0;
-       einfo.mats[0].rm_eo = to - from;
-
-       /* If not last line or if it ends in a newline */
-       if (to != from) {
-           if (to < last || (to > from && line[einfo.mats[0].rm_eo - 1] == '\n'))
-               --einfo.mats[0].rm_eo;
-
-           ecode = reexec(&einfo.regex, line,
-                          einfo.sref + 1, &einfo.mats[0], flags);
-
-           if (replace && einfo.mats[0].rm_so == einfo.mats[0].rm_eo)
-               /* Ignore empty matches */
-               ecode = RE_NOMATCH;
-
-           if (ecode == 0 && confirm &&
-               (einfo.soff == O_ALL || nth == einfo.soff)) {
-               einfo.end = from + einfo.mats[0].rm_eo;
-               einfo.start = from + einfo.mats[0].rm_so;
-               XawTextSetInsertionPoint(w, einfo.end);
-               XawTextSetSelection(w, einfo.start, einfo.end);
-
-               einfo.state = SubstituteAsk;
-               einfo.from = from;
-               einfo.to = to;
-               einfo.first = first;
-               einfo.last = last;
-               einfo.text_line = line;
-               break;
-           }
-       }
-       else
-           /* Check bellow will update offsets */
-           ecode = RE_NOMATCH;
-
-substitute_label:
-       if (ecode == 0) {
-           from += einfo.mats[0].rm_so;
-           len = einfo.mats[0].rm_eo - einfo.mats[0].rm_so;
-
-           /* Found match */
-           if (replace) {
-               /* If not replacing all ocurrences, or if not
-                * at the correct offset */
-               if (einfo.soff != O_ALL && nth < einfo.soff) {
-                   from += len;
-                   ++nth;
-                   continue;
-               }
-
-               /* Do the substitution */
-               block.firstPos = 0;
-               block.format = FMT8BIT;
-               if (einfo.sref) {
-                   /* Hard way */
-                   int i, ref, xlen;
-
-                   for (i = length = 0; i < einfo.slen; i++) {
-                       if (length + 2 >= einfo.bsize) {
-                           einfo.bsize = einfo.bsize + 1024;
-                           einfo.buffer = XtRealloc(einfo.buffer, einfo.bsize);
-                       }
-                       if (einfo.subst[i] == '\\') {
-                           ++i;
-                           if (einfo.subst[i] >= '1' && einfo.subst[i] <= '9') {
-                               ref = einfo.subst[i] - '0';
-                               xlen = einfo.mats[ref].rm_eo -
-                                      einfo.mats[ref].rm_so;
-                               if (xlen < 0)
-                                   /* Oops, something went wrong... */
-                                   FAIL(T_BACKREF)
-                               if (length + xlen >= einfo.bsize) {
-                                   einfo.bsize += xlen + 1024 - (xlen % 1024);
-                                   einfo.buffer = XtRealloc(einfo.buffer,
-                                                            einfo.bsize);
-                               }
-                               memcpy(einfo.buffer + length,
-                                     line + einfo.mats[ref].rm_so, xlen);
-                               length += xlen;
-                           }
-                           else {
-                               einfo.buffer[length++] = einfo.subst[i - 1];
-                               einfo.buffer[length++] = einfo.subst[i];
-                           }
-                       }
-                       else
-                           einfo.buffer[length++] = einfo.subst[i];
-                   }
-                   block.ptr = einfo.buffer;
-                   block.length = length;
-               }
-               else {
-                   block.ptr = einfo.subst;
-                   block.length = length = einfo.slen;
-               }
-               adjust = length - len;
-               if (XawTextReplace(w, from, from + len, &block) != XawEditDone)
-                   FAIL(T_EDIT)
-               last += adjust;
-               to += adjust;
-               from += length;
-
-no_substitute_label:
-               if (einfo.soff != O_ALL) {
-                   nth = 0;
-                   to = RSCAN(from, 1, True);
-                   from = LSCAN(to, 1, False);
-                   if (to == last) {
-                       XawTextSetInsertionPoint(w, from);
-                       break;
-                   }
-               }
-               else
-                   flags |= RE_NOTBOL;
-           }
-           else {
-               XawTextSetInsertionPoint(w, from + len);
-               XawTextSetSelection(w, from, from + len);
-               break;
-           }
-       }
-       else if (ecode == RE_NOMATCH) {
-           nth = 0;
-
-           /* Try again in the next/previous line */
-           if (direction == XawsdLeft) {
-               from = LSCAN(to - 1, 1 + (from != to), False);
-               if (einfo.from <= first) {
-                   Feep();
-                   if (++count > 1) {
-                       XawTextSetInsertionPoint(w, position);
-                       XawTextUnsetSelection(w);
-                       break;
-                   }
-                   from = LSCAN(last, 1, False);
-               }
-               to = RSCAN(from, 1, True);
-               /* Can use einfo.from because replace is only done forward */
-               einfo.from = from;
-           }
-           else {
-               if (to >= last) {
-                   Feep();
-                   if (replace || ++count > 1) {
-                       XawTextSetInsertionPoint(w, position);
-                       XawTextUnsetSelection(w);
-                       einfo.state = SubstituteDisabled;
-                       confirm = 0;
-                       break;
-                   }
-                   to = first;
-               }
-               from = LSCAN(to + 1, 1, False);
-               to = RSCAN(from, 1, True);
-           }
-
-           /* Reset flags now */
-           flags = RE_STARTEND;
-       }
-       else
-           goto print;
-    }
-
-    if (redisplay)
-       XawTextEnableRedisplay(w);
-    /* If replacing not interatively return to the edit window after finished */
-    if (replace && !confirm) {
-       Arg args[1];
-
-       XtSetKeyboardFocus(topwindow, textwindow);
-       if (item->source != scratch)
-           XtSetArg(args[0], XtNstring, item->name);
-       else
-           XtSetArg(args[0], XtNstring, NULL);
-       XtSetValues(filenamewindow, args, 1);
-       line_edit = False;
-    }
-    return;
-
-print:
-    if (redisplay)
-       XawTextEnableRedisplay(w);
-
-    strcpy(buffer, "Regex error: ");
-    length = 13;
-    reerror(ecode, &einfo.regex,
-            buffer + length, sizeof(buffer) - length - 2);
-    strcat(buffer, "\n");
-    XeditPrintf("%s", buffer);
-    refree(&einfo.regex);
-    einfo.state = SubstituteDisabled;
-    Feep();
-    return;
-
-
-fail:
-    if (etype != T_NONE) {
-       switch (etype) {
-           case T_OPTION:
-               ptr = "Option needs a command";
-               break;
-           case T_ICASE:
-               ptr = "Icase needs an command defined or none for search";
-               break;
-           case T_COMMAND:
-               ptr = "Command incorrectly specified";
-               break;
-           case T_REPLACE:
-               ptr = "Can only search backwards";
-               break;
-           case T_SEARCH:
-               ptr = "Badly placed search/replace specifier";
-               break;
-           case T_BACKSLASH:
-               ptr = "A single backslash cannot be the last command character";
-               break;
-           case T_DIRECTION:
-               ptr = "Regular expression must be separeted by / or ? not both";
-               break;
-           case T_COMMA:
-               ptr = "Badly placed comma";
-               break;
-           case T_OFFSET:
-               ptr = "Badly placed line offset specifier";
-               break;
-           case T_INCREMENT:
-               ptr = "Badly placed line offset increment specifier";
-               break;
-           case T_NUMBER:
-               ptr = "Numeric argument not expected";
-               break;
-           case T_UNFINISHED:
-               ptr = "Unfinished command";
-               break;
-           case T_RANGE:
-               ptr = "Bad line range";
-               break;
-           case T_BACKREF:
-               /* This may be an internal re error, but most likely the
-                * user asked for something like "s/re0(re1)re2/\2/" */
-               ptr = "Bad backreference";
-               break;
-           case T_EDIT:
-               ptr = "Failed to replace text";
-               break;
-           default:
-               ptr = "Unknown error";
-               break;
-       }
-       XeditPrintf("Error: %s.\n", ptr);
-    }
-    if (redisplay)
-       XawTextEnableRedisplay(w);
-    einfo.state = SubstituteDisabled;
-    Feep();
-}
-
-static void
-SubstituteHook(Widget w, String action, XEvent *event)
-{
-    if (w != filenamewindow)
-       return;
-
-    if (line_edit && einfo.state == SubstituteAsk) {
-       if (strcmp(action, "newline") == 0 ||
-           strcmp(action, "load-file") == 0)
-           einfo.state = SubstituteAsk;
-       else if (strcmp(action, "insert-char") == 0) {
-           static XComposeStatus compose = {NULL, 0};
-           KeySym keysym;
-           char mb[sizeof(wchar_t)];
-
-           if (XLookupString((XKeyEvent*)event, mb, sizeof(mb),
-                             &keysym, &compose) == 1) {
-               if (*mb == 'y' || *mb == 'Y')
-                   einfo.state = SubstituteYes;
-               else if (*mb == 'n' || *mb == 'N')
-                   einfo.state = SubstituteNo;
-               else
-                   einfo.state = SubstituteDisabled;
-
-               if (einfo.state != SubstituteDisabled) {
-                   einfo.callback = 1;
-                   XtAddCallback(filenamewindow, XtNpositionCallback,
-                                 SubstituteCallback, NULL);
-               }
-           }
-       }
-       else if (strcmp(action, "cancel-find-file") == 0)
-           einfo.state = SubstituteDisabled;
-    }
-    if (einfo.state == SubstituteDisabled && einfo.callback) {
-       einfo.callback = 0;
-       XtRemoveCallback(filenamewindow, XtNpositionCallback,
-                        SubstituteCallback, NULL);
-    }
-}
-
-/*ARGSUSED*/
-static void
-SubstituteCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    XawTextBlock block;
-
-    einfo.callback = 0;
-    XtRemoveCallback(filenamewindow, XtNpositionCallback,
-                    SubstituteCallback, NULL);
-
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.ptr = einfo.command;
-    block.length = strlen(einfo.command);
-
-    XawTextReplace(filenamewindow, 0,
-                  XawTextLastPosition(filenamewindow), &block);
-
-    LineEdit(einfo.widget);
-}
diff --git a/xedit/ispell.c b/xedit/ispell.c
deleted file mode 100644 (file)
index 842927c..0000000
+++ /dev/null
@@ -1,2229 +0,0 @@
-/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XdotOrg: xc/programs/xedit/ispell.c,v 1.6 2004/12/04 00:43:13 kuhn Exp $ */
-/* $XFree86: xc/programs/xedit/ispell.c,v 1.19 2002/10/19 20:04:20 herrb Exp $ */
-
-#include "xedit.h"
-#include "util.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <ctype.h>
-#include <locale.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/MenuButton.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xos.h>
-
-#define RECEIVE                1
-#define SEND           2
-
-#define CHECK          0
-#define        ADD             1
-#define REMOVE         2
-
-#define        ASIS            1
-#define UNCAP          2
-
-/*
- * Types
- */
-#define UNDO_DEPTH     16
-typedef struct _ispell_undo {
-    char *undo_str;
-    int undo_count;
-    XawTextPosition undo_pos;
-    Boolean repeat;    /* two (misspelled?) words together */
-    Boolean terse;
-    int format;                /* remember text formatting style */
-    struct _ispell_undo *next, *prev;
-} ispell_undo;
-
-typedef struct _ispell_dict {
-    Widget sme;
-    char *wchars;
-    struct _ispell_dict *next;
-} ispell_dict;
-
-#define        TEXT    0
-#define HTML   1
-struct _ispell_format {
-    char *name;
-    int value;
-    Widget sme;
-};
-
-static struct _ispell_format ispell_format[] = {
-    {"text",   TEXT},
-    {"html",   HTML},
-};
-
-struct _ispell {
-    Widget shell, form, mispelled, repeated, word, replacement, text,
-          suggestions, viewport, list, commands, replace, status,
-          replaceAll, undo, ignore, ignoreAll, add, addUncap, suspend,
-          cancel, check, look, terse, options, dict, dictMenu,
-          format, formatMenu;
-
-    Widget ascii, source;
-    XtInputId id;
-    int pid, ifd[2], ofd[2];
-    XawTextPosition left, right;
-    char *item;
-    Bool lock;
-    Bool repeat;
-    Bool checkit;
-    int stat;
-    char *buf;
-    int bufsiz;
-    int buflen;
-    char sendbuf[1024];
-    char sentbuf[1024];
-
-    int undo_depth;
-    ispell_undo *undo_head, *undo_base;
-    char *undo_for;
-
-    char *wchars;
-    char *cmd;
-    char *skip;
-    char *command;
-    Boolean terse_mode, undo_terse_mode;
-    char *guess_label, *miss_label, *root_label, *none_label, *eof_label,
-        *compound_label, *ok_label, *repeat_label, *working_label, *look_label;
-    char *look_cmd;
-    char *words_file;
-
-    char *dictionary;
-    char *dict_list;
-    ispell_dict *dict_info;
-
-    int format_mode;   /* to undo correctly */
-    char *formatting;
-    struct _ispell_format *format_info;
-};
-
-typedef struct _ReplaceEntry ReplaceEntry;
-struct _ReplaceEntry {
-    hash_key   *word;
-    ReplaceEntry*next;
-    char       *replace;
-};
-
-typedef struct _IgnoreEntry IgnoreEntry;
-struct _IgnoreEntry {
-    hash_key   *word;
-    IgnoreEntry        *next;
-    int                add;
-};
-
-/*
- * Prototypes
- */
-static void AddIspell(Widget, XtPointer, XtPointer);
-static void ChangeDictionaryIspell(Widget, XtPointer, XtPointer);
-static void ChangeFormatIspell(Widget, XtPointer, XtPointer);
-static void CheckIspell(Widget, XtPointer, XtPointer);
-static void IgnoreIspell(Widget, XtPointer, XtPointer);
-static Bool InitIspell(void);
-static void IspellCheckUndo(void);
-static int IspellConvertHtmlAmp(char*);
-static Bool IspellDoIgnoredWord(char*, int, int);
-static Bool IspellIgnoredWord(char*, int, int);
-static void IspellInputCallback(XtPointer, int*, XtInputId*);
-static void IspellKillUndoBuffer(void);
-static Bool IspellReceive(void);
-static char *IspellReplacedWord(char*, char*);
-static int IspellSend(void);
-static void IspellSetSelection(XawTextPosition, XawTextPosition);
-static void IspellSetRepeated(Bool);
-static void IspellSetSensitive(Bool);
-static void IspellSetStatus(char*);
-static void IspellSetTerseMode(Bool);
-static Bool IspellStartProcess(void);
-static Bool IspellCheckProcess(void);
-static Bool IspellEndProcess(Bool, Bool);
-static void LookIspell(Widget, XtPointer, XtPointer);
-static void PopdownIspell(Widget, XtPointer, XtPointer);
-static void ReplaceIspell(Widget, XtPointer, XtPointer);
-static void RevertIspell(Widget, XtPointer, XtPointer);
-static void SelectIspell(Widget, XtPointer, XtPointer);
-static void ToggleTerseIspell(Widget, XtPointer, XtPointer);
-#ifndef SIGNALRETURNSINT
-static void timeout_signal(int);
-static void (*old_timeout)(int);
-#else
-static int timeout_signal(int);
-static int (*old_timeout)(int);
-#endif
-static void UndoIspell(Widget, XtPointer, XtPointer);
-
-Bool _XawTextSrcUndo(TextSrcObject, XawTextPosition*);
-
-/*
- * Initialization
- */
-static struct _ispell ispell;
-
-#define RSTRTBLSZ      23
-#define ISTRTBLSZ      71
-static hash_table *replace_hash;
-static hash_table *ignore_hash;
-
-#ifndef XtCStatus
-#define XtCStatus      "Status"
-#endif
-
-#define Offset(field) XtOffsetOf(struct _ispell, field)
-static XtResource resources[] = {
-    {"wordChars", "Chars", XtRString, sizeof(char*),
-       Offset(wchars), XtRString, ""},
-    {"ispellCommand", "CommandLine", XtRString, sizeof(char*),
-       Offset(cmd), XtRString, "/usr/local/bin/ispell"},
-    {"terseMode", "Terse", XtRBoolean, sizeof(Boolean),
-       Offset(terse_mode), XtRImmediate, (XtPointer)False},
-    {"guessLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(guess_label), XtRString, "Guess"},
-    {"missLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(miss_label), XtRString, "Miss"},
-    {"rootLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(root_label), XtRString, "Root:"},
-    {"noneLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(none_label), XtRString, "None"},
-    {"compoundLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(compound_label), XtRString, "Compound"},
-    {"okLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(ok_label), XtRString, "Ok"},
-    {"eofLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(eof_label), XtRString, "End Of File"},
-    {"repeatLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(repeat_label), XtRString, "Repeat"},
-    {"workingLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(working_label), XtRString, "..."},
-    {"lookLabel", XtCStatus, XtRString, sizeof(String),
-       Offset(look_label), XtRString, "Look"},
-    {"lookCommand", "CommandLine", XtRString, sizeof(char*),
-       Offset(look_cmd), XtRString, "/usr/bin/egrep -i"},
-    {"wordsFile", "Words", XtRString, sizeof(char*),
-       Offset(words_file), XtRString, "/usr/share/dict/words"},
-    {"dictionary", "Dictionary", XtRString, sizeof(char*),
-       Offset(dictionary), XtRString, "american"},
-    {"dictionaries", "Dictionary", XtRString, sizeof(char*),
-       Offset(dict_list), XtRString, "american americanmed+ english"},
-    {"formatting", "TextFormat", XtRString, sizeof(char*),
-       Offset(formatting), XtRString, "text"},
-};
-#undef Offset
-
-#ifdef NO_LIBC_I18N
-static int
-ToLower(int ch)
-{
-    char buf[2];
-
-    *buf = ch;
-    XmuNCopyISOLatin1Lowered(buf, buf, sizeof(buf));
-
-    return (*buf);
-}
-
-static int
-ToUpper(int ch)
-{
-    char buf[2];
-
-    *buf = ch;
-    XmuNCopyISOLatin1Uppered(buf, buf, sizeof(buf));
-
-    return (*buf);
-}
-
-static int
-IsLower(int ch)
-{
-    char upbuf[2];
-    char lobuf[2];
-
-    *upbuf = *lobuf = ch;
-    XmuNCopyISOLatin1Lowered(lobuf, lobuf, sizeof(lobuf));
-    XmuNCopyISOLatin1Uppered(upbuf, upbuf, sizeof(upbuf));
-
-    return (*lobuf != *upbuf && ch == *lobuf);
-}
-
-static int
-IsUpper(int ch)
-{
-    char upbuf[2];
-    char lobuf[2];
-
-    *upbuf = *lobuf = ch;
-    XmuNCopyISOLatin1Lowered(lobuf, lobuf, sizeof(lobuf));
-    XmuNCopyISOLatin1Uppered(upbuf, upbuf, sizeof(upbuf));
-
-    return (*lobuf != *upbuf && ch == *upbuf);
-}
-#else
-#define        ToLower tolower
-#define ToUpper        toupper
-#define IsLower islower
-#define IsUpper isupper
-#endif
-
-/*
- * Implementation
- */
-#ifdef STDERR_FILENO
-# define WRITES(s) write(STDERR_FILENO, s, strlen(s))
-#else
-# define WRITES(s) write(fileno(stderr), s, strlen(s))
-#endif
-
-/*ARGSUSED*/
-#ifndef SIGNALRETURNSINT
-static void
-timeout_signal(int unused)
-{
-    int olderrno = errno;
-
-    WRITES("Warning: Timeout waiting ispell process to die.\n");
-    kill(ispell.pid, SIGTERM);
-    errno = olderrno;
-}
-#else
-static int
-timeout_signal(int unused)
-{
-    int olderrno = errno;
-
-    WRITES("Warning: Timeout waiting ispell process to die.\n");
-    kill(ispell.pid, SIGTERM);
-    
-    errno = olderrno;
-    return (0);
-}
-#endif
-
-static void
-IspellSetSelection(XawTextPosition left, XawTextPosition right)
-{
-    /* Try to make sure the selected word is completely visible */
-    XawTextSetInsertionPoint(ispell.ascii, right);
-    XawTextSetInsertionPoint(ispell.ascii, left);
-    XawTextSetSelection(ispell.ascii, left, right);
-}
-
-static void
-IspellSetStatus(char *label)
-{
-    Arg args[1];
-
-    XtSetArg(args[0], XtNlabel, label);
-    XtSetValues(ispell.status, args, 1);
-}
-
-static void
-IspellSetRepeated(Bool state)
-{
-    static char *mispelled, *repeated;
-    Arg args[1];
-
-    if (mispelled == NULL) {
-       XtSetArg(args[0], XtNlabel, &mispelled);
-       XtGetValues(ispell.mispelled, args, 1);
-       mispelled = XtNewString(mispelled);
-    }
-    if (repeated == NULL) {
-       XtSetArg(args[0], XtNlabel, &repeated);
-       XtGetValues(ispell.repeated, args, 1);
-       repeated = XtNewString(repeated);
-    }
-    XtSetSensitive(ispell.replaceAll, !state);
-    XtSetSensitive(ispell.ignoreAll, !state);
-    XtSetSensitive(ispell.add, !state);
-    XtSetSensitive(ispell.addUncap, !state);
-    if (!state) {
-       XtSetArg(args[0], XtNlabel, mispelled);
-       XtSetValues(ispell.mispelled, args, 1);
-    }
-    else {
-       XtSetArg(args[0], XtNlabel, repeated);
-       XtSetValues(ispell.mispelled, args, 1);
-    }
-}
-
-static void
-IspellSetSensitive(Bool state)
-{
-    XtSetSensitive(ispell.replace, state);
-    XtSetSensitive(ispell.replaceAll, state);
-    XtSetSensitive(ispell.ignore, state);
-    XtSetSensitive(ispell.ignoreAll, state);
-    XtSetSensitive(ispell.add, state);
-    XtSetSensitive(ispell.addUncap, state);
-}
-
-static void
-IspellSetTerseMode(Bool mode)
-{
-    Arg args[1];
-
-    XtSetArg(args[0], XtNstate, ispell.terse_mode = mode);
-    XtSetValues(ispell.terse, args, 1);
-    write(ispell.ofd[1], mode ? "!\n" : "%\n", 2);
-}
-
-static void
-IspellCheckUndo(void)
-{
-    ispell_undo *undo = XtNew(ispell_undo);
-
-    if (ispell.undo_for && strcmp(ispell.undo_for, ispell.dictionary)) {
-       XeditPrintf("Undo: Dictionary changed. Previous undo information lost.\n");
-       IspellKillUndoBuffer();
-       Feep();
-    }
-
-    undo->next = NULL;
-    undo->repeat = False;
-    undo->terse = ispell.undo_terse_mode;
-    undo->format = ispell.format_mode;
-    if ((undo->prev = ispell.undo_head) != NULL)
-       undo->prev->next = undo;
-    else
-       undo->prev = NULL;
-    ++ispell.undo_depth;
-    if (!ispell.undo_base) {
-       ispell.undo_base = undo;
-       XtSetSensitive(ispell.undo, True);
-    }
-    else if (ispell.undo_depth > UNDO_DEPTH) {
-       ispell_undo *tmp;
-
-       if (ispell.undo_base->undo_str)
-           XtFree(ispell.undo_base->undo_str);
-       tmp = ispell.undo_base->next;
-       XtFree((char*)ispell.undo_base);
-       tmp->prev = NULL;
-       ispell.undo_base = tmp;
-       ispell.undo_depth = UNDO_DEPTH;
-    }
-    ispell.undo_head = undo;
-}
-
-static char *
-IspellReplacedWord(char *word, char *replace)
-{
-    int                        word_len;
-    hash_key           *word_key;
-    ReplaceEntry       *entry;
-
-    word_len = strlen(word);
-    entry = (ReplaceEntry *)hash_check(replace_hash, word, word_len);
-    if (entry == NULL) {
-       word_key = XtNew(hash_key);
-       word_key->value = XtNewString(word);
-       word_key->length = word_len;
-       entry = XtNew(ReplaceEntry);
-       entry->word = word_key;
-       entry->replace = NULL;
-       entry->next = NULL;
-       hash_put(replace_hash, (hash_entry *)entry);
-    }
-
-    if (replace) {
-       XtFree(entry->replace);
-       entry->replace = XtNewString(replace);
-    }
-
-    return (entry->replace);
-}
-
-static Bool
-IspellDoIgnoredWord(char *word, int cmd, int add)
-{
-    int                word_len;
-    hash_key   *word_key;
-    IgnoreEntry        *entry;
-
-    word_len = strlen(word);
-    entry = (IgnoreEntry *)hash_check(ignore_hash, word, word_len);
-    if (entry == NULL) {
-       if (cmd != ADD)
-           return (False);
-
-       word_key = XtNew(hash_key);
-       word_key->value = XtNewString(word);
-       word_key->length = word_len;
-       entry = XtNew(IgnoreEntry);
-       entry->word = word_key;
-       entry->add = add;
-       entry->next = NULL;
-       hash_put(ignore_hash, (hash_entry *)entry);
-
-       return (True);
-    }
-    else if (cmd == REMOVE)
-       hash_rem(ignore_hash, (hash_entry *)entry);
-
-    return (cmd == CHECK);
-}
-
-static Bool
-IspellIgnoredWord(char *word, int cmd, int add)
-{
-    if (add != UNCAP && IspellDoIgnoredWord(word, cmd, add))
-       return (True);
-
-    /* add/remove uncapped word to/of list,
-     * or cheks for correct capitalization */
-    if (add == UNCAP || cmd == CHECK) {
-       unsigned char *str = (unsigned char*)word;
-       unsigned char string[1024];
-       Bool upper, status;
-       int i;
-
-       status = True;
-       upper = IsUpper(*str);
-       *string = upper ? ToLower(*str) : *str;
-       if (*str)
-           str++;
-       if (IsLower(*str))
-           upper = False;
-       for (i = 1; *str && i < sizeof(string) - 1; i++, str++) {
-           if (upper && IsLower(*str))
-               status = False;
-           else if (!upper && IsUpper(*str))
-               status = False;
-           string[i] = ToLower(*str);
-       }
-       string[i] = '\0';
-
-       if ((cmd != CHECK || status) &&
-           IspellDoIgnoredWord((char*)string, cmd, add))
-           return (True);
-    }
-
-    return (False);
-}
-
-/*ARGSUSED*/
-static Bool
-IspellReceive(void)
-{
-    int i, len, old_len;
-    Arg args[2];
-    char *str, *end, **list, **old_list;
-    char *tmp, word[1024];
-    int j;
-
-    if (ispell.lock || ispell.stat != RECEIVE)
-       return (False);
-
-    while (1) {                /* read the entire line */
-       if (ispell.buflen >= ispell.bufsiz - 1)
-           ispell.buf = XtRealloc(ispell.buf, ispell.bufsiz += BUFSIZ);
-       if ((len = read(ispell.ifd[0], &ispell.buf[ispell.buflen],
-                       ispell.bufsiz - ispell.buflen - 1)) <= 0)
-           break;
-       ispell.buflen += len;
-    }
-    if (ispell.buflen <= 0)
-       return (False);
-    len = 0;
-    i = ispell.buflen - 1;
-    while (i >= 0 && ispell.buf[i] == '\n') {
-       ++len;
-       --i;
-    }
-    if (len < 2 - ((ispell.terse_mode && i == -1) || ispell.buf[0] == '@'))
-       return (False);
-    ispell.buf[ispell.buflen - len] = '\0';
-    ispell.buflen = 0;
-
-    if ((tmp = strchr(ispell.sendbuf, '\n')) != NULL)
-       *tmp = '\0';
-
-    switch (ispell.buf[0]) {
-       case '&':       /* MISS */
-       case '?':       /* GUESS */
-           str = strchr(&ispell.buf[2], ' ');
-           if (!ispell.checkit) {
-               *str = '\0';
-               XtSetArg(args[0], XtNlabel, &ispell.buf[2]);
-               XtSetValues(ispell.word, args, 1);
-           }
-           ++str;
-           list = NULL;
-           str = strchr(str, ':') + 1;
-           for (i = 0; ; i++) {
-               end = strchr(str, ',');
-               if (end)        *end = '\0';
-               if ((i % 16) == 0)
-                   list = (char**)XtRealloc((char*)list, (i + 16) * sizeof(char*));
-               tmp = word;
-               for (j = 1; j < sizeof(word) && str[j]; j++) {
-                   if (str[j] == '+')
-                       continue;
-                   else if (str[j] == '-' && str[j+1] != '-' && str[j-1] != '-') {
-                       char *p, string[256];
-                       int k, l;
-
-                       for (l = 0, k = j + 1; str[k] != '+' && str[k] != '-'
-                            && str[k] && l < sizeof(string) - 1; k++, l++)
-                           string[l] = str[k];
-                       string[l] = '\0';
-                       *tmp = '\0';
-                       if (l && (p = strstr(word, string)) != NULL) {
-                           char *sav = p;
-
-                           while ((p = strstr(p + l, string)) != NULL)
-                               sav = p;
-                           p = sav;
-                           if (strcmp(p, string) == 0) {
-                               tmp = p;
-                               j = k - 1;
-                           }
-                           else
-                               *tmp++ = '-';
-                       }
-                       else
-                           *tmp++ = '-';
-                   }
-                   else
-                       *tmp++ = str[j];
-               }
-               *tmp = '\0';
-               list[i] = XtNewString(word);
-
-               if (end)        str = end + 1;
-               else            break;
-           }
-           len = i + 1;
-
-           XtSetArg(args[0], XtNlist, &old_list);
-           XtSetArg(args[1], XtNnumberStrings, &old_len);
-           XtGetValues(ispell.list, args, 2);
-
-           ispell.item = NULL;
-           if ((str = IspellReplacedWord(&ispell.buf[2], NULL)) != NULL)
-               for (i = 0; i < len; i++) {
-                   if (strcmp(list[i], str) == 0) {
-                       ispell.item = list[i];
-                       break;
-                   }
-               }
-           else
-               ispell.item = list[i = 0];
-           if (!ispell.item) {
-               list = (char**)XtRealloc((char*)list, (len + 1) * sizeof(char*));
-               ispell.item = list[i] = XtNewString(str);
-               ++len;
-           }
-
-           XtSetArg(args[0], XtNlist, list);
-           XtSetArg(args[1], XtNnumberStrings, len);
-           XtSetValues(ispell.list, args, 2);
-
-           XtSetSensitive(ispell.list, True);
-           if (!ispell.checkit)
-               XawListHighlight(ispell.list, i);
-
-           if (old_len > 1 || (XtName(ispell.list) != old_list[0])) {
-               while (--old_len > -1)
-                   XtFree(old_list[old_len]);
-               XtFree((char*)old_list);
-           }
-
-           if (!ispell.checkit) {
-               XtSetArg(args[0], XtNstring, ispell.item);
-               XtSetValues(ispell.text, args, 1);
-               IspellSetSelection(ispell.left, ispell.right);
-               if (ispell.repeat)
-                   IspellSetRepeated(ispell.repeat = False);
-           }
-
-           IspellSetStatus(ispell.buf[0] == '?' ?
-                           ispell.guess_label : ispell.miss_label);
-           ispell.undo_terse_mode = ispell.terse_mode;
-           ispell.format_mode = ispell.format_info->value;
-           ispell.lock = True;
-           break;
-       case '#':       /* NONE */
-       case '-':       /* COMPOUND */
-       case '+':       /* ROOT */
-       check_label:
-           str = &ispell.sendbuf[1];
-           if (!ispell.checkit) {
-               XtSetArg(args[0], XtNlabel, str);
-               XtSetValues(ispell.word, args, 1);
-           }
-
-           XtSetArg(args[0], XtNlist, &old_list);
-           XtSetArg(args[1], XtNnumberStrings, &old_len);
-           XtGetValues(ispell.list, args, 2);
-           ispell.item = NULL;
-
-           list = (char**)XtMalloc(sizeof(char**));
-           if ((tmp = IspellReplacedWord(str, NULL)) != NULL)
-               str = tmp;
-           if (tmp == NULL && ispell.buf[0] == '#')
-               list[0] = XtNewString("");
-           else
-               list[0] = XtNewString(str);
-
-           XtSetArg(args[0], XtNlist, list);
-           XtSetArg(args[1], XtNnumberStrings, 1);
-           XtSetValues(ispell.list, args, 2);
-
-           if (tmp == NULL && ispell.buf[0] == '#') {
-               XawListUnhighlight(ispell.list);
-               XtSetSensitive(ispell.list, False);
-           }
-           else {
-               XtSetSensitive(ispell.list, True);
-               if (!ispell.checkit)
-                   XawListHighlight(ispell.list, 0);
-           }
-           if (old_len > 1 || (XtName(ispell.list) != old_list[0])) {
-               while (--old_len > -1)
-                   XtFree(old_list[old_len]);
-               XtFree((char*)old_list);
-           }
-
-           if (!ispell.checkit) {
-               XtSetArg(args[0], XtNstring, str);
-               XtSetValues(ispell.text, args, 1);
-               IspellSetSelection(ispell.left, ispell.right);
-               if (ispell.repeat)
-                   IspellSetRepeated(ispell.repeat = False);
-           }
-
-           ispell.undo_terse_mode = ispell.terse_mode;
-           ispell.format_mode = ispell.format_info->value;
-           ispell.lock = True;
-           if (ispell.buf[0] == '+') {
-               if ((tmp = strchr(&ispell.buf[2], '\n')) != NULL)
-                   *tmp = '\0';
-               XmuSnprintf(word, sizeof(word), "%s %s",
-                           ispell.root_label, &ispell.buf[2]);
-               IspellSetStatus(word);
-           }
-           else
-               IspellSetStatus(ispell.buf[0] == '#' ? ispell.none_label :
-                               ispell.buf[0] == '-' ? ispell.compound_label :
-                               ispell.ok_label);
-           break;
-       case '*':       /* OK */
-       case '\0':      /* when running in terse mode */
-           if (!ispell.checkit)
-               (void)IspellIgnoredWord(&ispell.sendbuf[1], ADD, 0);
-           else
-               goto check_label;
-           ispell.lock = False;
-           break;
-       case '@':       /* Ispell banner */
-           /* it only happens when the dictionary is changed */
-           if (!ispell.repeat) {
-               XawTextPosition left, right;
-
-               ispell.stat = SEND;
-               while (IspellSend() == 0)
-                   ;
-               /* word chars may have changed */
-               XawTextGetSelectionPos(ispell.ascii, &left, &right);
-               if (left != ispell.left || right != ispell.right) {
-                   XtSetArg(args[0], XtNstring, &ispell.sendbuf[1]);
-                   XtSetValues(ispell.text, args, 1);
-                   IspellSetSelection(ispell.left, ispell.right);
-               }
-               ispell.checkit = True;
-           }
-           else {
-               IspellSetStatus(ispell.repeat_label);
-               ispell.undo_terse_mode = ispell.terse_mode;
-               ispell.format_mode = ispell.format_info->value;
-               ispell.lock = True;
-               return (True);
-           }
-           break;
-       default:
-           fprintf(stderr, "Unknown ispell command '%c'\n", ispell.buf[0]);
-           return (False);
-    }
-
-    if (!ispell.lock && !ispell.checkit) {
-       ispell.stat = SEND;
-       while (IspellSend() == 0)
-           ;
-    }
-
-    return (True);
-}
-
-static int
-IspellConvertHtmlAmp(char *buf)
-{
-    int len, ch = '?';
-
-    /* this function is static, so I can do it */
-    *strchr(++buf, ';') = '\0';
-
-    len = strlen(buf);
-    if (len == 0)
-       return ('&');
-    if (len > 1) {
-       if (strcasecmp(&buf[1], "lt") == 0)
-           ch = '<';
-       else if (strcasecmp(&buf[1], "gt") == 0)
-           ch = '>';
-       else if (strcasecmp(&buf[1], "nbsp") == 0)
-           ch = ' ';
-       else if (strcasecmp(&buf[1], "amp") == 0)
-           ch = '&';
-       else if (strcasecmp(&buf[1], "quot") == 0)
-           ch = '"';
-       else if (*buf == '#') {
-           char *tmp;
-
-           if (len == 1)
-               return ('?');
-           ch = strtol(&buf[1], &tmp, 10);
-           if (*tmp)
-               fprintf(stderr, "Warning: bad html interpreting '&#' mark.\n");
-       }
-       else if (strcmp(&buf[1], "acute") == 0) {
-           switch (*buf) {
-               case 'a': ch = 0xe1; break;
-               case 'e': ch = 0xe9; break;
-               case 'i': ch = 0xed; break;
-               case 'o': ch = 0xf3; break;
-               case 'u': ch = 0xfa; break;
-               case 'A': ch = 0xc1; break;
-               case 'E': ch = 0xc9; break;
-               case 'I': ch = 0xcd; break;
-               case 'O': ch = 0xd3; break;
-               case 'U': ch = 0xda; break;
-           }
-       }
-       else if (strcmp(&buf[1], "grave") == 0) {
-           switch (*buf) {
-               case 'a': ch = 0xe0; break;
-               case 'e': ch = 0xe8; break;
-               case 'i': ch = 0xec; break;
-               case 'o': ch = 0xf2; break;
-               case 'u': ch = 0xf9; break;
-               case 'A': ch = 0xc0; break;
-               case 'E': ch = 0xc8; break;
-               case 'I': ch = 0xcc; break;
-               case 'O': ch = 0xd2; break;
-               case 'U': ch = 0xd9; break;
-           }
-       }
-       else if (strcmp(&buf[1], "tilde") == 0) {
-           switch (*buf) {
-               case 'a': ch = 0xe3; break;
-               case 'o': ch = 0xf5; break;
-               case 'n': ch = 0xf1; break;
-               case 'A': ch = 0xe3; break;
-               case 'O': ch = 0xd5; break;
-               case 'N': ch = 0xd1; break;
-           }
-       }
-       else if (strcmp(&buf[1], "circ") == 0) {
-           switch (*buf) {
-               case 'a': ch = 0xe2; break;
-               case 'e': ch = 0xea; break;
-               case 'i': ch = 0xee; break;
-               case 'o': ch = 0xf4; break;
-               case 'u': ch = 0xfb; break;
-               case 'A': ch = 0xc2; break;
-               case 'E': ch = 0xca; break;
-               case 'I': ch = 0xce; break;
-               case 'O': ch = 0xd4; break;
-               case 'U': ch = 0xdb; break;
-           }
-       }
-       else if (strcmp(&buf[1], "cedil") == 0) {
-           switch (*buf) {
-               case 'c': ch = 0xe7; break;
-               case 'C': ch = 0xc7; break;
-           }
-       }
-       /* add more cases here */
-    }
-
-    return (ch);
-}
-
-/*ARGSUSED*/
-static int
-IspellSend(void)
-{
-    XawTextPosition position, old_left, pos;
-    XawTextBlock block;
-    int i, len, spaces, nls;
-    Bool nl, html, inside_html;
-    char ampbuf[32];
-    int amplen;
-
-    if (ispell.lock || ispell.stat != SEND)
-       return (-1);
-
-    len = 1;
-    ispell.sendbuf[0] = '^';   /* don't evaluate following characters as commands */
-
-    spaces = nls = 0;
-
-    html = ispell.format_info->value == HTML;
-    inside_html = False;
-    amplen = 0;
-
-    /* skip non word characters */
-    pos = position = ispell.right;
-    nl = False;
-    while (1) {
-       Bool done = False;
-       char mb[sizeof(wchar_t)];
-
-       retry_html_space:
-       position = XawTextSourceRead(ispell.source, position,
-                                    &block, BUFSIZ);
-       if (block.length == 0) {        /* end of file */
-           ispell.stat = 0;
-           ispell.lock = True;
-           XawTextSetInsertionPoint(ispell.ascii, ispell.right);
-           XawTextUnsetSelection(ispell.ascii);
-           IspellSetSensitive(False);
-           IspellSetStatus(ispell.eof_label);
-           return (-1);
-       }
-       for (i = 0; i < block.length; i++) {
-           if (international)
-               wctomb(mb, ((wchar_t*)block.ptr)[i]);
-           else
-               mb[0] = block.ptr[i];
-           if (amplen) {
-               if (amplen + 2 >= sizeof(ampbuf)) {
-                   if (!ispell.terse_mode)
-                       fprintf(stderr, "Warning: error interpreting '&' mark.\n");
-                   amplen = 0;
-                   position = pos + 1;
-                   goto retry_html_space;
-               }
-               else if ((ampbuf[amplen++] = *mb) == ';') {
-                   int ch;
-
-                   ampbuf[amplen] = '\0';
-                   ch = IspellConvertHtmlAmp(ampbuf);
-                   amplen = 0;
-                   if (isalpha(ch) ||
-                       (ch && strchr(ispell.wchars, ch))) {
-                       /* interpret it again */
-                       ispell.right = pos;
-                       i = 0;
-                       done = True;
-                       break;
-                   }
-                   else if ((ch == '\n' || isspace(ch)) && spaces >= 0)
-                       ++spaces;
-                   else
-                       spaces = -1;
-               }
-           }
-           else if (html && *mb == '&') {
-               ampbuf[amplen++] = *mb;
-               pos = block.firstPos + i;
-               continue;
-           }
-           else if ((!html || !inside_html) && (isalpha(*mb) ||
-               (*mb && strchr(ispell.wchars, *mb)))) {
-               done = True;
-               break;
-           }
-           else if (!html && *mb == '\n') {
-               nl = True;
-               if (++nls > 1 && (!html || !inside_html))
-                   spaces = -1;
-               else if (spaces >= 0)
-                   ++spaces;
-           }
-           else if (nl) {
-               nl = False;
-               if (*mb && strchr(ispell.skip, *mb)) {
-                   position = ispell.right =
-                       XawTextSourceScan(ispell.source, ispell.right + i,
-                                         XawstEOL, XawsdRight, 1, False);
-                   i = 0;
-                   break;
-               }
-               else if (spaces >= 0 && isspace(*mb))
-                   ++spaces;
-               else
-                   spaces = -1;
-           }
-           else if (html && inside_html) {
-               if (*mb == '>')
-                   inside_html = False;
-           }
-           else if (html && *mb == '<')
-               inside_html = True;
-           else if (spaces >= 0 && (isspace(*mb) || (html && *mb == '\n')))
-               ++spaces;
-           else
-               spaces = -1;
-       }
-
-       ispell.right += i;
-       if (done)
-           break;
-    }
-
-    old_left = ispell.left;
-
-    /* read a word */
-    position = ispell.left = ispell.right;
-    while (1) {
-       Bool done = False;
-       char mb[sizeof(wchar_t)];
-
-       retry_html_word:
-       position = XawTextSourceRead(ispell.source, position,
-                                    &block, BUFSIZ);
-       if (block.length == 0 && len == 1) {    /* end of file */
-           ispell.stat = 0;
-           ispell.lock = True;
-           XawTextSetInsertionPoint(ispell.ascii, ispell.right);
-           XawTextUnsetSelection(ispell.ascii);
-           IspellSetSensitive(False);
-           IspellSetStatus(ispell.eof_label);
-           return (-1);
-       }
-       for (i = 0; i < block.length; i++) {
-           if (international)
-               wctomb(mb, ((wchar_t*)block.ptr)[i]);
-           else
-               mb[0] = block.ptr[i];
-           if (amplen) {
-               if (amplen + 2 >= sizeof(ampbuf)) {
-                   if (!ispell.terse_mode)
-                       fprintf(stderr, "Warning: error interpreting '&' mark.\n");
-                   amplen = 0;
-                   position = pos + 1;
-                   if (strchr(ispell.wchars, '&')) {
-                       if (len + 1 >= sizeof(ispell.sendbuf) - 1) {
-                           done = True;
-                           fprintf(stderr, "Warning: word is too large!\n");
-                           break;
-                       }
-                       ispell.sendbuf[len++] = '&';
-                       goto retry_html_word;
-                   }
-                   else {
-                       ispell.right = position;
-                       i = 0;
-                       done = True;
-                       break;
-                   }
-               }
-               else if ((ampbuf[amplen++] = *mb) == ';') {
-                   int ch;
-
-                   ampbuf[amplen] = '\0';
-                   ch = IspellConvertHtmlAmp(ampbuf);
-                   amplen = 0;
-                   if (!isalpha(ch) &&
-                       (!ch || !strchr(ispell.wchars, ch))) {
-                       ispell.right = pos;
-                       i = 0;
-                       done = True;
-                       break;
-                   }
-                   *mb = ch;
-               }
-               else
-                   continue;
-           }
-           else if (html && *mb == '&') {
-               ampbuf[amplen++] = *mb;
-               pos = block.firstPos + i;
-               continue;
-           }
-           else if (!isalpha(*mb) && (!*mb || !strchr(ispell.wchars, *mb))) {
-               done = True;
-               break;
-           }
-           ispell.sendbuf[len] = *mb;
-           if (++len >= sizeof(ispell.sendbuf) - 1) {
-               done = True;
-               fprintf(stderr, "Warning: word is too large!\n");
-               break;
-           }
-       }
-       ispell.right += i;
-       if (done || block.length == 0)
-           break;
-    }
-
-    ispell.sendbuf[len] = '\0';
-
-    if (spaces > 0 && spaces <= 32 && strcmp(ispell.sendbuf, ispell.sentbuf) == 0) {
-       Arg args[2];
-       int old_len;    
-       char **list, **old_list;
-       char label[sizeof(ispell.sendbuf) + sizeof(ispell.sentbuf) + 32];
-
-       strcpy(label, &ispell.sendbuf[1]);
-       for (i = 0; i < spaces; i++)
-           label[len + i - 1] = ' ';
-       strcpy(&label[len + i - 1], &ispell.sendbuf[1]);
-       XtSetArg(args[0], XtNlabel, label);
-       XtSetValues(ispell.word, args, 1);
-
-       XtSetArg(args[0], XtNstring, &ispell.sendbuf[1]);
-       XtSetValues(ispell.text, args, 1);
-
-       XtSetArg(args[0], XtNlist, &old_list);
-       XtSetArg(args[1], XtNnumberStrings, &old_len);
-       XtGetValues(ispell.list, args, 2);
-       list = (char**)XtMalloc(sizeof(char**));
-       list[0] = XtNewString(&ispell.sendbuf[1]);
-       XtSetArg(args[0], XtNlist, list);
-       XtSetArg(args[1], XtNnumberStrings, 1);
-       XtSetValues(ispell.list, args, 2);
-       XtSetSensitive(ispell.list, True);
-       XawListHighlight(ispell.list, 0);
-       if (old_len > 1 || (XtName(ispell.list) != old_list[0])) {
-           while (--old_len > -1)
-               XtFree(old_list[old_len]);
-           XtFree((char*)old_list);
-       }
-
-       IspellSetRepeated(True);
-       IspellSetSelection(old_left, ispell.right);
-       IspellSetStatus(ispell.repeat_label);
-       ispell.repeat = ispell.lock = True;
-
-       return (1);
-    }
-    strcpy(ispell.sentbuf, ispell.sendbuf);
-
-    if (len <= 2 || IspellIgnoredWord(&ispell.sendbuf[1], CHECK, 0))
-       return (0);
-
-    ispell.sendbuf[len++] = '\n';
-
-    write(ispell.ofd[1], ispell.sendbuf, len);
-
-    ispell.stat = RECEIVE;
-
-    return (1);
-}
-
-/*ARGSUSED*/
-static void
-IspellInputCallback(XtPointer closure, int *source, XtInputId *id)
-{
-    if (ispell.right < 0) {
-       int len;
-       char buf[1024];
-
-       ispell.right = XawTextGetInsertionPoint(ispell.ascii);
-       ispell.right = XawTextSourceScan(ispell.source, ispell.right,
-                                             XawstEOL, XawsdLeft, 1, True);
-       len = read(ispell.ifd[0], buf, sizeof(buf));
-       if (strncmp(buf, "@(#)", 4) == 0) {
-           Arg args[1];
-
-           buf[len - 1] = '\0';
-           XtSetArg(args[0], XtNtitle, &buf[5]);
-           XtSetValues(ispell.shell, args, 1);
-       }
-       else
-           fprintf(stderr, "Error: is ispell talking with me?\n");
-       IspellSetTerseMode(ispell.terse_mode);
-       while (IspellSend() == 0)
-           ;
-    }
-    else if (ispell.source)
-       IspellReceive();
-}
-
-/*ARGSUSED*/
-void
-IspellCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Cardinal zero = 0;
-
-    IspellAction(textwindow, NULL, NULL, &zero);
-}
-
-/*ARGSUSED*/
-void
-IspellAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Arg args[3];
-    Cardinal num_args;
-    char **strs, **list;
-    int n_strs;
-    Bool first_time = InitIspell();
-
-    if (*num_params == 1 && (params[0][0] == 'e' || params[0][0] == 'E')) {
-       PopdownIspell(w, (XtPointer)True, NULL);
-       return;
-    }
-
-    if (!XtIsSubclass(w, textWidgetClass) || ispell.source) {
-       Feep();
-       return;
-    }
-
-    ispell.source = XawTextGetSource(ispell.ascii = w);
-
-    if (first_time) {
-       /* let the user choose the better position for the ispell window */
-       Dimension width, height, b_width;
-       Position x, y, max_x, max_y;
-
-       x = y = -1;
-       if (event) {
-           switch (event->type) {
-               case ButtonPress:
-               case ButtonRelease:
-                   x = event->xbutton.x_root;
-                   y = event->xbutton.y_root;
-                   break;
-               case KeyPress:
-               case KeyRelease:
-                   x = event->xkey.x_root;
-                   y = event->xkey.y_root;
-                   break;
-           }
-       }
-       if (x < 0 || y < 0) {
-           Window r, c;
-           int rx, ry, wx, wy;
-           unsigned mask;
-
-           XQueryPointer(XtDisplay(ispell.shell), XtWindow(ispell.shell),
-                         &r, &c, &rx, &ry, &wx, &wy, &mask);
-           x = rx;
-           y = ry;
-       }
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNwidth, &width);             num_args++;
-       XtSetArg(args[num_args], XtNheight, &height);           num_args++;
-       XtSetArg(args[num_args], XtNborderWidth, &b_width);     num_args++;
-       XtGetValues(ispell.shell, args, num_args);
-
-       width += b_width << 1;
-       height += b_width << 1;
-
-       x -= (Position)(width >> 1);
-       if (x < 0)
-           x = 0;
-       if (x > (max_x = (Position)(XtScreen(w)->width - width)))
-           x = max_x;
-
-       y -= (Position)(height >> 1);
-       if (y < 0)
-           y = 0;
-       if (y > (max_y = (Position)(XtScreen(w)->height - height)))
-           y = max_y;
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNx, x);      num_args++;
-       XtSetArg(args[num_args], XtNy, y);      num_args++;
-       XtSetValues(ispell.shell, args, num_args);
-    }
-
-    if (ispell.repeat)
-       IspellSetRepeated(False);
-    ispell.lock = ispell.repeat = ispell.checkit = False;
-    ispell.stat = SEND;
-
-    IspellSetSensitive(True);
-    XtSetSensitive(ispell.undo, False);
-
-    XtSetArg(args[0], XtNlabel, "");
-    XtSetValues(ispell.word, args, 1);
-
-    XtSetArg(args[0], XtNstring, "");
-    XtSetValues(ispell.text, args, 1);
-
-    XtSetArg(args[0], XtNlist, &strs);
-    XtSetArg(args[1], XtNnumberStrings, &n_strs);
-    XtGetValues(ispell.list, args, 2);
-
-    list = (char**)XtMalloc(sizeof(char**));
-    list[0] = XtNewString("");
-    XtSetArg(args[0], XtNlist, list);
-    XtSetArg(args[1], XtNnumberStrings, 1);
-    XtSetValues(ispell.list, args, 2);
-
-    if (n_strs > 1 || (XtName(ispell.list) != strs[0])) {
-       while (--n_strs > -1)
-           XtFree(strs[n_strs]);
-       XtFree((char*)strs);
-    }
-
-    IspellSetStatus(ispell.working_label);
-
-    if (!ispell.pid)
-       (void)IspellStartProcess();
-    else {
-       ispell.right = XawTextGetInsertionPoint(ispell.ascii);
-       ispell.right = XawTextSourceScan(ispell.source, ispell.right,
-                                             XawstEOL, XawsdLeft, 1, True);
-       while (IspellSend() == 0)
-           ;
-    }
-
-    XtPopup(ispell.shell, XtGrabExclusive);
-    XtSetKeyboardFocus(ispell.shell, ispell.text);
-}
-
-static Bool
-IspellStartProcess(void)
-{
-    if (!ispell.pid) {
-       int len;
-       char format[32];
-       static char *command;
-
-       ispell.source = XawTextGetSource(ispell.ascii);
-
-       if (command)
-           XtFree(command);
-
-       strcpy(format, "%s -a");
-       len = strlen(ispell.cmd) + 4;
-       if (ispell.dictionary && *ispell.dictionary) {
-           len += strlen(ispell.dictionary) + 6;
-           strcat(format, " -d '%s'");
-           if (ispell.wchars && *ispell.wchars) {
-               len += strlen(ispell.wchars + 6);
-               strcat(format, " -w '%s'");
-           }
-       }
-       command = XtMalloc(len);
-       XmuSnprintf(command, len, format,
-                   ispell.cmd, ispell.dictionary, ispell.wchars);
-
-       pipe(ispell.ifd);
-       pipe(ispell.ofd);
-       if ((ispell.pid = fork()) == 0) {
-           close(0);
-           close(1);
-           dup2(ispell.ofd[0], 0);
-           dup2(ispell.ifd[1], 1);
-           close(ispell.ofd[0]);
-           close(ispell.ofd[1]);
-           close(ispell.ifd[0]);
-           close(ispell.ifd[1]);
-           if (!international)
-               setlocale(LC_ALL, "ISO-8859-1");
-           execl("/bin/sh", "sh", "-c", command, NULL);
-           exit(-127);
-       }
-       else if (ispell.pid < 0) {
-           fprintf(stderr, "Cannot fork\n");
-           exit(1);
-       }
-       ispell.buf = XtMalloc(ispell.bufsiz = BUFSIZ);
-       ispell.right = -1;
-       ispell.id = XtAppAddInput(XtWidgetToApplicationContext(ispell.shell),
-                                 ispell.ifd[0], (XtPointer)XtInputReadMask,
-                                 IspellInputCallback, NULL);
-       fcntl(ispell.ifd[0], F_SETFL, O_NONBLOCK);
-    }
-    else
-       return (False);
-
-    return (True);
-}
-
-/*ARGSUSED*/
-static void
-PopdownIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    (void)IspellEndProcess((Bool)(long)client_data, True);
-    XtPopdown(ispell.shell);
-    *ispell.sentbuf = '\0';
-}
-
-static Bool
-IspellCheckProcess(void)
-{
-    int status;
-
-    if (ispell.pid) {
-       waitpid(ispell.pid, &status, WNOHANG);
-       if (WIFEXITED(status)) {
-           ispell.pid = 0;
-       }
-       else
-           return (True);
-    }
-
-    return (False);
-}
-
-static Bool
-IspellEndProcess(Bool killit, Bool killundo)
-{
-    ispell.source = NULL;
-
-    if (ispell.pid) {
-       IgnoreEntry     *ientry;
-       ReplaceEntry    *rentry;
-
-       /* insert added words in private dictionary */
-       for (ientry = (IgnoreEntry *)hash_iter_first(ignore_hash);
-            ientry;
-            ientry = (IgnoreEntry *)hash_iter_next(ignore_hash)) {
-           if (ientry->add) {
-               if (ientry->add == UNCAP)
-                   write(ispell.ofd[1], "&", 1);
-               else
-                   write(ispell.ofd[1], "*", 1);
-               write(ispell.ofd[1], ientry->word->value, ientry->word->length);
-               write(ispell.ofd[1], "\n", 1);
-           }
-       }
-       write(ispell.ofd[1], "#\n", 2);         /* save dictionary */
-       hash_clr(ignore_hash);
-
-       if (killit) {
-           XtRemoveInput(ispell.id);
-
-           close(ispell.ofd[0]);
-           close(ispell.ofd[1]);
-           close(ispell.ifd[0]);
-           close(ispell.ifd[1]);
-
-           /* if something goes wrong, we don't want to block here forever */
-           old_timeout = signal(SIGALRM, timeout_signal);
-           alarm(10);
-           waitpid(ispell.pid, NULL, 0);
-           alarm(0);
-           signal(SIGALRM, old_timeout);
-
-           ispell.pid = 0;
-           if (ispell.buf)
-               XtFree(ispell.buf);
-           ispell.buf = NULL;
-
-           /* forget about replace matches */
-           for (rentry = (ReplaceEntry *)hash_iter_first(replace_hash);
-                rentry;
-                rentry = (ReplaceEntry *)hash_iter_next(replace_hash)) {
-               XtFree(rentry->replace);
-           }
-           hash_clr(replace_hash);
-       }
-
-       if (killundo)
-           IspellKillUndoBuffer();
-    }
-    else
-       return (False);
-
-    return (True);
-}
-
-static void
-IspellKillUndoBuffer(void)
-{
-    ispell_undo *undo, *pundo;
-
-    undo = pundo = ispell.undo_base;
-    while (undo) {
-       undo = undo->next;
-       if (pundo->undo_str)
-           XtFree(pundo->undo_str);
-       XtFree((char*)pundo);
-       pundo = undo;
-    }
-    ispell.undo_base = ispell.undo_head = NULL;
-    ispell.undo_for = NULL;
-    ispell.undo_depth = 0;
-    XtSetSensitive(ispell.undo, False);
-}
-
-/*ARGSUSED*/
-static void
-RevertIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Arg args[1];
-    char *string, *repstr = NULL;
-
-    XtSetArg(args[0], XtNlabel, &string);
-    XtGetValues(ispell.word, args, 1);
-    if ((repstr = strchr(string, ' ')) != NULL) {
-       string = repstr = XtNewString(string);
-       *strchr(repstr, ' ') = '\0';
-    }
-    XtSetArg(args[0], XtNstring, string);
-    XtSetValues(ispell.text, args, 1);
-    if (repstr)
-       XtFree(repstr);
-}
-
-/*ARGSUSED*/
-static void
-SelectIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    XawListReturnStruct *info = (XawListReturnStruct *)call_data;
-    Arg args[1];
-
-    XtSetArg(args[0], XtNstring, ispell.item = info->string);
-    XtSetValues(ispell.text, args, 1);
-}
-
-/*ARGSUSED*/
-void
-ReplaceIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    XawTextPosition pos = XawTextGetInsertionPoint(ispell.ascii);
-    XawTextBlock check, search, replace;
-    Arg args[1];
-    char *text;
-
-    if (!ispell.lock)
-       return;
-
-    XtSetArg(args[0], XtNlabel, &text);
-    XtGetValues(ispell.word, args, 1);
-    search.ptr = text;
-    search.format = XawFmt8Bit;
-    search.firstPos = 0;
-    search.length = ispell.right - pos;
-
-    XtSetArg(args[0], XtNstring, &text);
-    XtGetValues(ispell.text, args, 1);
-    replace.ptr = text;
-    replace.format = XawFmt8Bit;
-    replace.firstPos = 0;
-    replace.length = strlen(text);
-
-    if (strcmp(search.ptr, replace.ptr) != 0 &&
-       XawTextReplace(ispell.ascii, pos, pos + search.length,
-                      &replace) == XawEditDone) {
-       ispell.right += replace.length - search.length;
-       IspellCheckUndo();
-       ispell.undo_head->undo_str = NULL;
-       ispell.undo_head->undo_pos = pos;
-       ispell.undo_head->undo_count = 1;
-
-       if (ispell.repeat) {
-           ispell.undo_head->repeat = 2; /* To recognize later it was replaced */
-           ispell.undo_head->undo_count = ispell.right;
-           ispell.undo_head->undo_str = XtNewString(search.ptr);
-       }
-       if (client_data && !ispell.repeat) {
-           XawTextDisableRedisplay(ispell.ascii);
-           pos = ispell.right;
-           while ((pos = XawTextSourceSearch(ispell.source, pos, XawsdRight, &search))
-               != XawTextSearchError) {
-               Bool do_replace = True;
-               char mb[sizeof(wchar_t)];
-
-               if (XawTextSourceRead(ispell.source, pos - 1, &check, 1) > 0) {
-                   if (international)
-                       wctomb(mb, *(wchar_t*)check.ptr);
-                   else
-                       mb[0] = check.ptr[0];
-                   do_replace = !isalpha(*mb) && *mb && !strchr(ispell.wchars, *mb);
-               }
-               if (do_replace &&
-                   XawTextSourceRead(ispell.source, pos + search.length, &check, 1) > 0) {
-                   if (international)
-                       wctomb(mb, *(wchar_t*)check.ptr);
-                   else
-                       mb[0] = check.ptr[0];
-                   do_replace = !isalpha(*mb) && *mb && !strchr(ispell.wchars, *mb);
-               }
-               if (do_replace) {
-                   XawTextReplace(ispell.ascii, pos, pos + search.length, &replace);
-                   ++ispell.undo_head->undo_count;
-               }
-               pos += search.length;
-           }
-           XawTextEnableRedisplay(ispell.ascii);
-       }
-       (void)IspellReplacedWord(search.ptr, replace.ptr);
-
-       strncpy(&ispell.sentbuf[1], replace.ptr, sizeof(ispell.sentbuf) - 2);
-       ispell.sentbuf[sizeof(ispell.sentbuf) - 1] = '\0';
-    }
-    else
-       Feep();
-
-    if (ispell.repeat)
-       ispell.right = ispell.left = XawTextGetInsertionPoint(ispell.ascii);
-    else if (!ispell.terse_mode || !ispell.item ||
-            strcmp(ispell.item, replace.ptr))
-       ispell.right = ispell.left;     /* check it again! */
-
-    ispell.lock = ispell.checkit = False;
-
-    ispell.stat = SEND;
-    IspellSetStatus(ispell.working_label);
-    while (IspellSend() == 0)
-       ;
-}
-
-/*ARGSUSED*/
-void
-IgnoreIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Arg args[1];
-    char *text;
-
-    if (!ispell.lock)
-       return;
-
-    XtSetArg(args[0], XtNlabel, &text);
-    XtGetValues(ispell.word, args, 1);
-
-    IspellCheckUndo();
-
-    if ((ispell.undo_head->repeat = ispell.repeat) != False) {
-       ispell.undo_head->undo_count = ispell.right;
-       ispell.undo_head->undo_str = XtNewString(text);
-    }
-    else
-       ispell.undo_head->undo_count = 0;
-
-    ispell.undo_head->undo_pos = XawTextGetInsertionPoint(ispell.ascii);
-
-    if (!ispell.repeat) {
-       if (client_data) {
-           IspellIgnoredWord(text, ADD, 0);
-           ispell.undo_head->undo_str = XtNewString(text);
-       }
-       else 
-           ispell.undo_head->undo_str = NULL;
-    }
-
-    ispell.lock = ispell.checkit = False;
-
-    ispell.stat = SEND;
-    IspellSetStatus(ispell.working_label);
-    while (IspellSend() == 0)
-       ;
-}
-
-/*ARGSUSED*/
-void
-AddIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Arg args[1];
-    char *text;
-    int cmd = (long)client_data;
-
-    if (!ispell.lock || ispell.repeat)
-       return;
-
-    XtSetArg(args[0], XtNlabel, &text);
-    XtGetValues(ispell.word, args, 1);
-
-    IspellCheckUndo();
-    ispell.undo_head->undo_str = XtNewString(text);
-    ispell.undo_head->undo_pos = XawTextGetInsertionPoint(ispell.ascii);
-    ispell.undo_head->undo_count = -cmd;
-
-    (void)IspellIgnoredWord(text, ADD, cmd);
-
-    ispell.lock = ispell.checkit = False;
-    ispell.stat = SEND;
-    IspellSetStatus(ispell.working_label);
-    while (IspellSend() == 0)
-       ;
-}
-
-/*ARGSUSED*/
-static void
-UndoIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Bool enable_redisplay = False;
-    ispell_undo *undo = ispell.undo_head;
-
-    if ((!ispell.lock && ispell.stat) || !undo)
-       return;
-
-    if (ispell.undo_for && strcmp(ispell.undo_for, ispell.dictionary)) {
-       XeditPrintf("Undo: Dictionary changed. Undo information was lost.\n");
-       IspellKillUndoBuffer();
-       Feep();
-       return;
-    }
-
-    if (undo->terse != ispell.terse_mode)
-       IspellSetTerseMode(undo->terse);
-
-    if (undo->format != ispell.format_info->value) {
-       struct _ispell_format *fmt = &ispell_format[undo->format];
-       ChangeFormatIspell(fmt->sme, (XtPointer)fmt, NULL);
-    }
-
-    if (undo->undo_count > 0 && !undo->repeat) {
-       XawTextPosition tmp;
-
-       enable_redisplay = undo->undo_count > 1;
-       if (enable_redisplay)
-           XawTextDisableRedisplay(ispell.ascii);
-       while (undo->undo_count--)
-           if (!_XawTextSrcUndo((TextSrcObject)ispell.source, &tmp)) {
-               Feep();
-               break;
-           }
-    }
-    else if (undo->undo_count < 0) {
-       if (undo->undo_str)
-           (void)IspellIgnoredWord(undo->undo_str, REMOVE, -undo->undo_count);
-    }
-    else if (undo->undo_str) {
-       if (!undo->repeat)
-           IspellIgnoredWord(undo->undo_str, REMOVE, 0);
-    }
-
-    XawTextSetInsertionPoint(ispell.ascii,
-                            ispell.right = ispell.left = undo->undo_pos);
-    if (enable_redisplay)
-       XawTextEnableRedisplay(ispell.ascii);
-
-    /* need to do it because may be two misspelled words together */
-    if (undo->repeat) {
-       char **list, **old_list;
-       int old_len;
-       Arg args[2];
-
-       if (undo->repeat > 1) {
-           XawTextDisableRedisplay(ispell.ascii);
-           if (!_XawTextSrcUndo((TextSrcObject)ispell.source, &ispell.right))
-               Feep();
-           XawTextEnableRedisplay(ispell.ascii);
-       }
-       else
-           ispell.right = (XawTextPosition)undo->undo_count;
-       IspellSetRepeated(ispell.repeat = True);
-       XtSetArg(args[0], XtNlabel, undo->undo_str);
-       XtSetValues(ispell.word, args, 1);
-       XmuSnprintf(ispell.sentbuf, sizeof(ispell.sentbuf), "^%s",
-                   strrchr(undo->undo_str, ' ') + 1);
-       strcpy(ispell.sendbuf, ispell.sentbuf);
-       XtSetArg(args[0], XtNstring, &ispell.sentbuf[1]);
-       XtSetValues(ispell.text, args, 1);
-
-       XtSetArg(args[0], XtNlist, &old_list);
-       XtSetArg(args[1], XtNnumberStrings, &old_len);
-       XtGetValues(ispell.list, args, 2);
-
-       list = (char **)XtMalloc(sizeof(char*));
-       list[0] = XtNewString(&ispell.sentbuf[1]);
-       XtSetArg(args[0], XtNlist, list);
-       XtSetArg(args[1], XtNnumberStrings, 1);
-       XtSetValues(ispell.list, args, 2);
-       XtSetSensitive(ispell.list, True);
-       XawListHighlight(ispell.list, 0);
-
-       if (old_len > 1 || (XtName(ispell.list) != old_list[0])) {
-           while (--old_len > -1)
-               XtFree(old_list[old_len]);
-           XtFree((char*)old_list);
-       }
-
-       IspellSetSelection(ispell.left, ispell.right);
-       IspellSetStatus(ispell.repeat_label);
-       ispell.lock = True;
-       ispell.checkit = False;
-    }
-    else if (ispell.repeat) {
-       *ispell.sentbuf = '\0';
-       IspellSetRepeated(ispell.repeat = False);
-    }
-
-    if (undo->prev)
-       undo->prev->next = NULL;
-    ispell.undo_head = undo->prev;
-    if (undo == ispell.undo_base) {
-       ispell.undo_base = NULL;
-       ispell.undo_for = NULL;
-       XtSetSensitive(ispell.undo, False);
-    }
-    if (undo->undo_str)
-       XtFree(undo->undo_str);
-    XtFree((char*)undo);
-    --ispell.undo_depth;
-
-    if (!ispell.stat || ispell.checkit)
-       IspellSetSensitive(True);
-
-    if (!ispell.repeat) {
-       ispell.lock = ispell.checkit = False;
-       ispell.stat = SEND;
-       IspellSetStatus(ispell.working_label);
-       while (IspellSend() == 0)
-           ;
-    }
-}
-
-/*ARGSUSED*/
-static void
-CheckIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Arg args[1];
-    char *text, *str, string[1024];
-    int i, len;
-
-    if (!ispell.lock)
-       return;
-
-    XtSetArg(args[0], XtNstring, &text);
-    XtGetValues(ispell.text, args, 1);
-
-    /* Check only a word at a time */
-    len = 0;
-    str = text;
-    while (*str) {
-       if (isalpha(*str) || strchr(ispell.wchars, *str))
-           break;
-       ++str;
-       ++len;
-    }
-    i = 0;
-    while (*str) {
-       if (isalpha(*str) || strchr(ispell.wchars, *str))
-           string[i++] = *str++;
-       else
-           break;
-    }
-    string[i] = '\0';
-
-    if (strcmp(text, string)) {
-       XawTextPosition pos = XawTextGetInsertionPoint(ispell.text) - len;
-
-       XtSetArg(args[0], XtNstring, string);
-       XtSetValues(ispell.text, args, 1);
-       XawTextSetInsertionPoint(ispell.text, pos);
-       Feep();
-    }
-
-    if (i == 0) {
-       Feep();
-       return;
-    }
-
-    len = XmuSnprintf(ispell.sendbuf, sizeof(ispell.sendbuf), "^%s\n", string);
-
-    ispell.sendbuf[sizeof(ispell.sendbuf) - 1] = '\n';
-
-    write(ispell.ofd[1], ispell.sendbuf, len);
-
-    ispell.lock = False;
-    ispell.checkit = True;
-    ispell.stat = RECEIVE;
-}
-
-/*ARGSUSED*/
-static void
-LookIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    int len, old_len;
-    FILE *fd;
-    Arg args[2];
-    char *text, *str, **list, **old_list, command[1024], buffer[1024];
-    Bool sensitive = True;
-
-    if (!ispell.lock)
-       return;
-
-    XtSetArg(args[0], XtNstring, &text);
-    XtGetValues(ispell.text, args, 1);
-
-    if (!*text) {
-       Feep();
-       return;
-    }
-
-    if (strlen(ispell.look_cmd) + strlen(text) + strlen(ispell.words_file) + 8
-       > sizeof(command) - 1) {
-       fprintf(stderr, "Command line too large\n");
-       return;
-    }
-
-    XmuSnprintf(command, sizeof(command), "%s '^%s.*$' %s",
-               ispell.look_cmd, text, ispell.words_file);
-
-    if ((fd = popen(command, "r")) == NULL) {
-       fprintf(stderr, "Cannot popen '%s'\n", ispell.look_cmd);
-       return;
-    }
-
-    list = NULL;
-    len = 0;
-
-#define        MAX_LOOK_RESULTS        256
-    while (fgets(buffer, sizeof(buffer), fd) != NULL) {
-       if ((str = strchr(buffer, '\n')) == NULL) {
-           fprintf(stderr, "String is too large\n");
-           break;
-       }
-       *str = '\0';
-       if ((len % 16) == 0)
-           list = (char**)XtRealloc((char*)list, sizeof(char*) * (len + 16));
-       list[len] = XtNewString(buffer);
-       if (++len >= MAX_LOOK_RESULTS) {
-           Feep();
-           break;
-       }
-    }
-#undef MAX_LOOK_RESULTS
-
-    XtSetArg(args[0], XtNlist, &old_list);
-    XtSetArg(args[1], XtNnumberStrings, &old_len);
-    XtGetValues(ispell.list, args, 2);
-
-    if (len == 0) {
-       list = (char**)XtMalloc(sizeof(char*));
-       list[0] = XtNewString("");
-       len = 1;
-       sensitive = False;
-    }
-
-    XtSetArg(args[0], XtNlist, list);
-    XtSetArg(args[1], XtNnumberStrings, len);
-    XtSetValues(ispell.list, args, 2);
-
-    XtSetSensitive(ispell.list, sensitive);
-    IspellSetStatus(sensitive ? ispell.look_label : ispell.none_label);
-
-    if (old_len > 1 || (XtName(ispell.list) != old_list[0])) {
-       while (--old_len > -1)
-           XtFree(old_list[old_len]);
-       XtFree((char*)old_list);
-    }
-
-    pclose(fd);
-}
-
-/*ARGSUSED*/
-static void
-ToggleTerseIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    if (!ispell.lock)
-       return;
-
-    ispell.terse_mode = !ispell.terse_mode;
-    write(ispell.ofd[1], ispell.terse_mode ? "!\n" : "%\n", 2);
-}
-
-/*ARGSUSED*/
-static void
-ChangeDictionaryIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    ispell_dict *tmp, *dic = (ispell_dict*)client_data;
-    XawTextPosition pos = XawTextGetInsertionPoint(ispell.ascii);
-    XawTextPosition right = ispell.right;
-    Arg args[1];
-
-    if (strcmp(XtName(dic->sme), ispell.dictionary) == 0)
-       return;
-
-    if (!ispell.lock) {
-       if (IspellCheckProcess()) {
-           Feep();
-           return;
-       }
-    }
-
-    for (tmp = ispell.dict_info; tmp; tmp = tmp->next)
-       if (strcmp(XtName(tmp->sme), ispell.dictionary) == 0) {
-           XtSetArg(args[0], XtNleftBitmap, None);
-           XtSetValues(tmp->sme, args, 1);
-       }
-
-    if (ispell.undo_base && !ispell.undo_for)
-       ispell.undo_for = ispell.dictionary;
-
-    XtSetArg(args[0], XtNleftBitmap, flist.pixmap);
-    XtSetValues(dic->sme, args, 1);
-    ispell.dictionary = XtName(dic->sme);
-    ispell.wchars = dic->wchars;
-    XtSetArg(args[0], XtNlabel, XtName(dic->sme));
-    XtSetValues(ispell.dict, args, 1);
-
-    IspellSetStatus(ispell.working_label);
-
-    (void)IspellEndProcess(True, False);
-    ispell.lock = ispell.checkit = False;
-    (void)IspellStartProcess();
-
-    ispell.stat = RECEIVE;
-
-    /* restart at the same selected word */
-    if (ispell.repeat == False)
-       ispell.left = ispell.right = pos;
-    else
-       ispell.right = right;
-}
-
-/*ARGSUSED*/
-static void
-ChangeFormatIspell(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    struct _ispell_format *fmt = (struct _ispell_format*)client_data;
-    Arg args[1];
-
-    if (strcmp(fmt->name, ispell.formatting) == 0)
-       return;
-
-    if (!ispell.lock) {
-       Feep();
-       return;
-    }
-
-    XtSetArg(args[0], XtNleftBitmap, None);
-    XtSetValues(ispell.format_info->sme, args, 1);
-
-    XtSetArg(args[0], XtNleftBitmap, flist.pixmap);
-    XtSetValues(fmt->sme, args, 1);
-    ispell.formatting = fmt->name;
-    ispell.format_info = fmt;
-    XtSetArg(args[0], XtNlabel, fmt->name);
-    XtSetValues(ispell.format, args, 1);
-}
-
-static Bool
-InitIspell(void)
-{
-    Atom delete_window;
-    char *str, *list;
-    XtResource dict_res;
-    ispell_dict *dict, *prev_dict;
-    int i;
-    static XtResource text_res[] = {
-       {"skipLines", "Skip", XtRString, sizeof(char*),
-        XtOffsetOf(struct _ispell, skip), XtRString, "#"},
-    };
-
-    if (ispell.shell)
-       return (False);
-
-    replace_hash = hash_new(RSTRTBLSZ, NULL);
-    ignore_hash = hash_new(ISTRTBLSZ, NULL);
-
-    ispell.shell       = XtCreatePopupShell("ispell", transientShellWidgetClass,
-                                            topwindow, NULL, 0);
-
-    XtGetApplicationResources(ispell.shell, (XtPointer)&ispell, resources,
-                             XtNumber(resources), NULL, 0);
-
-    ispell.form                = XtCreateManagedWidget("form", formWidgetClass,
-                                               ispell.shell, NULL, 0);
-    ispell.mispelled   = XtCreateManagedWidget("mispelled", labelWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.repeated    = XtCreateWidget("repeated", labelWidgetClass,
-                                        ispell.form, NULL, 0);
-    ispell.word                = XtCreateManagedWidget("word", commandWidgetClass,
-                                               ispell.form, NULL, 0);
-    XtAddCallback(ispell.word, XtNcallback, RevertIspell, NULL);
-    ispell.replacement = XtCreateManagedWidget("replacement", labelWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.text                = XtVaCreateManagedWidget("text", asciiTextWidgetClass,
-                                               ispell.form,
-                                               XtNeditType, XawtextEdit,
-                                               NULL);
-    ispell.suggestions = XtCreateManagedWidget("suggestions", labelWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.viewport    = XtCreateManagedWidget("viewport", viewportWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.list                = XtCreateManagedWidget("list", listWidgetClass,
-                                               ispell.viewport, NULL, 0);
-    XtAddCallback(ispell.list, XtNcallback, SelectIspell, NULL);
-    ispell.commands    = XtCreateManagedWidget("commands", formWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.check       = XtCreateManagedWidget("check", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.check, XtNcallback, CheckIspell, NULL);
-    ispell.look                = XtCreateManagedWidget("look", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.look, XtNcallback, LookIspell, NULL);
-    ispell.undo                = XtCreateManagedWidget("undo", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.undo, XtNcallback, UndoIspell, NULL);
-    ispell.replace     = XtCreateManagedWidget("replace", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.replace, XtNcallback, ReplaceIspell, (XtPointer)False);
-    ispell.replaceAll  = XtCreateManagedWidget("replaceAll", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.replaceAll, XtNcallback, ReplaceIspell, (XtPointer)True);
-    ispell.ignore      = XtCreateManagedWidget("ignore", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.ignore, XtNcallback, IgnoreIspell, (XtPointer)False);
-    ispell.ignoreAll   = XtCreateManagedWidget("ignoreAll", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.ignoreAll, XtNcallback, IgnoreIspell, (XtPointer)True);
-    ispell.add         = XtCreateManagedWidget("add", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.add, XtNcallback, AddIspell, (XtPointer)ASIS);
-    ispell.addUncap    = XtCreateManagedWidget("addUncap", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.addUncap, XtNcallback, AddIspell, (XtPointer)UNCAP);
-    ispell.suspend     = XtCreateManagedWidget("suspend", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.suspend, XtNcallback, PopdownIspell, (XtPointer)False);
-    ispell.cancel      = XtCreateManagedWidget("cancel", commandWidgetClass,
-                                               ispell.commands, NULL, 0);
-    XtAddCallback(ispell.cancel, XtNcallback, PopdownIspell, (XtPointer)True);
-    ispell.terse       = XtVaCreateManagedWidget("terse", toggleWidgetClass,
-                                                 ispell.commands,
-                                                 XtNstate, ispell.terse_mode,
-                                                 NULL);
-    XtAddCallback(ispell.terse, XtNcallback, ToggleTerseIspell, NULL);
-    ispell.status      = XtCreateManagedWidget("status", labelWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.options     = XtCreateManagedWidget("options", formWidgetClass,
-                                               ispell.form, NULL, 0);
-    ispell.dict                = XtVaCreateManagedWidget("dict", menuButtonWidgetClass,
-                                                 ispell.options,
-                                                 XtNmenuName, "dictionaries",
-                                                 NULL);
-    ispell.dictMenu    = XtCreatePopupShell("dictionaries", simpleMenuWidgetClass,
-                                            ispell.options, NULL, 0);
-    XtRealizeWidget(ispell.dictMenu);
-
-    ispell.format      = XtVaCreateManagedWidget("format", menuButtonWidgetClass,
-                                                 ispell.options,
-                                                 XtNmenuName, "formats",
-                                                 NULL);
-    ispell.formatMenu  = XtCreatePopupShell("formats", simpleMenuWidgetClass,
-                                            ispell.options, NULL, 0);
-    XtRealizeWidget(ispell.formatMenu);
-
-    XtRealizeWidget(ispell.shell);
-
-    for (i = 0; i < sizeof(ispell_format) / sizeof(ispell_format[0]); i++) {
-       struct _ispell_format *fmt = &ispell_format[i];
-
-       fmt->sme = XtCreateManagedWidget(fmt->name, smeBSBObjectClass,
-                                        ispell.formatMenu, NULL, 0);
-       XtAddCallback(fmt->sme, XtNcallback, ChangeFormatIspell, (XtPointer)fmt);
-
-       if (strcmp(fmt->name, ispell.formatting) == 0) {
-           Arg args[1];
-
-           XtSetArg(args[0], XtNlabel, ispell.formatting);
-           XtSetValues(ispell.format, args, 1);
-           XtSetArg(args[0], XtNleftBitmap, flist.pixmap);
-           XtSetValues(fmt->sme, args, 1);
-           ispell.format_info = fmt;
-       }
-    }
-    if (ispell.format_info == NULL) {
-       Arg args[1];
-       char msg[256];
-
-       ispell.format_info = &ispell_format[TEXT];
-
-       XmuSnprintf(msg, sizeof(msg),
-                   "Unrecognized formatting type \"%s\", will use \"%s\"",
-                   ispell.formatting, ispell.format_info->name);
-       XtAppWarning(XtWidgetToApplicationContext(ispell.shell), msg);
-       ispell.formatting = ispell.format_info->name;
-
-       XtSetArg(args[0], XtNlabel, ispell.format_info->name);
-       XtSetValues(ispell.format, args, 1);
-       XtSetArg(args[0], XtNleftBitmap, flist.pixmap);
-       XtSetValues(ispell.format_info->sme, args, 1);
-    }
-    XtGetApplicationResources(ispell_format[TEXT].sme, (XtPointer)&ispell,
-                             text_res, XtNumber(text_res), NULL, 0);
-
-    dict_res.resource_name = "wordChars";
-    dict_res.resource_class = "Chars";
-    dict_res.resource_type = XtRString;
-    dict_res.resource_size = sizeof(char*);
-    dict_res.resource_offset = XtOffsetOf(ispell_dict, wchars);
-    dict_res.default_type = XtRString;
-    dict_res.default_addr = "";
-
-    list = XtNewString(ispell.dict_list);
-
-    /* Create first empty entry */
-    dict = XtNew(ispell_dict);
-    dict->sme = XtCreateManagedWidget("", smeBSBObjectClass,
-                                     ispell.dictMenu, NULL, 0);
-    dict->wchars = "";
-    XtAddCallback(dict->sme, XtNcallback, ChangeDictionaryIspell,
-                 (XtPointer)dict);
-    ispell.dict_info = prev_dict = dict;
-
-    for (str = strtok(list, " \t,"); str; str = strtok(NULL, " \t,")) {
-       dict = XtNew(ispell_dict);
-       dict->sme = XtCreateManagedWidget(str, smeBSBObjectClass,
-                                         ispell.dictMenu, NULL, 0);
-       XtGetApplicationResources(dict->sme, (XtPointer)dict, &dict_res,
-                                 1, NULL, 0);
-       XtAddCallback(dict->sme, XtNcallback, ChangeDictionaryIspell,
-                     (XtPointer)dict);
-       prev_dict->next = dict;
-       prev_dict = dict;
-       dict->next = NULL;
-    }
-    XtFree(list);
-
-    for (dict = ispell.dict_info; dict; dict = dict->next) {
-       if (strcmp(XtName(dict->sme), ispell.dictionary) == 0) {
-           Arg args[1];
-
-           XtSetArg(args[0], XtNleftBitmap, flist.pixmap);
-           XtSetValues(dict->sme, args, 1);
-           XtSetArg(args[0], XtNlabel, XtName(dict->sme));
-           XtSetValues(ispell.dict, args, 1);
-           ispell.wchars = dict->wchars;
-           break;
-       }
-    }
-
-
-    delete_window = XInternAtom(XtDisplay(ispell.shell), "WM_DELETE_WINDOW", False);
-    XSetWMProtocols(XtDisplay(ispell.shell), XtWindow(ispell.shell), &delete_window, 1);
-
-    return (True);
-}
diff --git a/xedit/lisp.c b/xedit/lisp.c
deleted file mode 100644 (file)
index 7191979..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp.c,v 1.20tsi Exp $ */
-
-#include "xedit.h"
-#include "lisp/lisp.h"
-#include "lisp/xedit.h"
-#include <unistd.h>
-#include <locale.h>
-#include <ctype.h>
-
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/SimpleMenu.h>
-
-/*
- * Prototypes
- */
-static void XeditDoLispEval(Widget);
-static void EditModeCallback(Widget, XtPointer, XtPointer);
-
-/*
- * Initialization
- */
-static int lisp_initialized;
-extern Widget scratch;
-static Widget edit_mode_menu, edit_mode_entry, edit_mode_none;
-
-/*
- * Implementation
- */
-void
-XeditLispInitialize(void)
-{
-    setlocale(LC_NUMERIC, "C");
-    lisp_initialized = 1;
-    LispBegin();
-    LispXeditInitialize();
-}
-
-void
-XeditLispCleanUp(void)
-{
-    LispEnd();
-}
-
-void
-XeditLispEval(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    XeditDoLispEval(messwidget);
-}
-
-void
-XeditPrintLispEval(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    if (XawTextGetSource(w) == scratch) {
-       XtCallActionProc(w, "newline", event, params, *num_params);
-       XeditDoLispEval(w);
-    }
-    else
-       XtCallActionProc(w, "newline-and-indent", event, params, *num_params);
-}
-
-void
-XeditKeyboardReset(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    XtCallActionProc(w, "keyboard-reset", event, params, *num_params);
-}
-
-void
-SetTextProperties(xedit_flist_item *item)
-{
-    if (lisp_initialized) {
-       Widget source = XawTextGetSource(textwindow);
-       XawTextPosition top = XawTextTopPosition(textwindow);
-
-       if (source != item->source)
-           XawTextSetSource(textwindow, item->source, 0);
-       XeditLispSetEditMode(item, NULL);
-       if (source != item->source)
-           XawTextSetSource(textwindow, source, top);
-    }
-}
-
-void
-UnsetTextProperties(xedit_flist_item *item)
-{
-    XeditLispUnsetEditMode(item);
-}
-
-static void
-XeditDoLispEval(Widget output)
-{
-    Widget src;
-    XawTextBlock block;
-    XawTextPosition position, end;
-
-    /* get lisp expression */
-    src = XawTextGetSource(textwindow);
-    position = XawTextGetInsertionPoint(textwindow);
-    --position;
-    while (position >= 0) {
-       (void)XawTextSourceRead(src, position, &block, 1);
-       if (!isspace(block.ptr[0]))
-           break;
-       --position;
-    }
-    end = position + 1;
-
-    if (block.ptr[0] != ')') {
-       while (position >= 0) {
-           (void)XawTextSourceRead(src, position, &block, 1);
-           if (isspace(block.ptr[0]) ||
-               block.ptr[0] == '(' ||
-               block.ptr[0] == ')' ||
-               block.ptr[0] == '"' ||
-               block.ptr[0] == '|')
-               break;
-           --position;
-       }
-       if (!isspace(block.ptr[0]))
-           ++position;
-    }
-    else {
-       /* XXX note that embedded '(' and ')' will confuse this code */
-       XawTextPosition last, tmp;
-       int level = 0;
-       char ptr[2];
-
-       last = position;
-       ptr[1] = '\0';
-       block.ptr = ptr;
-       do {
-           block.ptr[0] = '(';
-           position = XawTextSourceSearch(src, last, XawsdLeft, &block);
-           if (position == XawTextSearchError) {
-               Feep();
-               return;
-           }
-           block.ptr[0] = ')';
-           tmp = position;
-           do {
-               tmp = XawTextSourceSearch(src, tmp, XawsdRight, &block);
-               if (tmp == XawTextSearchError) {
-                   Feep();
-                   return;
-               }
-               if (tmp <= last)
-                   ++level;
-           } while (++tmp <= last);
-           --level;
-           last = position;
-       } while (level);
-       /* check for extra characters */
-       while (position > 0) {
-           (void)XawTextSourceRead(src, position - 1, &block, 1);
-           if (block.length != 1 ||
-               isspace(block.ptr[0]) ||
-               block.ptr[0] == ')' ||
-               block.ptr[0] == '"' ||
-               block.ptr[0] == '|')
-               break;
-           --position;
-       }
-    }
-
-    if (position < 0 || position >= end)
-       Feep();
-    else
-       XeditLispExecute(output, position, end);
-}
-
-void
-CreateEditModePopup(Widget parent)
-{
-    int i;
-    Widget sme;
-    static char *editModes = "editModes";
-
-    XtVaCreateManagedWidget("modeMenuItem", smeBSBObjectClass, parent,
-                           XtNmenuName, editModes, NULL);
-    edit_mode_menu = XtCreatePopupShell(editModes, simpleMenuWidgetClass,
-                                       parent, NULL, 0);
-    XtRealizeWidget(edit_mode_menu);
-
-    edit_mode_none = XtCreateManagedWidget("none", smeBSBObjectClass,
-                                          edit_mode_menu, NULL, 0);
-    XtAddCallback(edit_mode_none, XtNcallback, EditModeCallback, NULL);
-
-    for (i = 0; i < num_mode_infos; i++) {
-       sme = XtVaCreateManagedWidget("mode", smeBSBObjectClass, edit_mode_menu,
-                                     XtNlabel, mode_infos[i].desc, NULL);
-       XtAddCallback(sme, XtNcallback, EditModeCallback,
-                     (XtPointer)(mode_infos + i));
-       mode_infos[i].sme = sme;
-    }
-}
-
-void
-SetEditModeMenu(void)
-{
-    int i;
-    Widget old_entry = edit_mode_entry, new_entry = edit_mode_none;
-    xedit_flist_item *item = FindTextSource(XawTextGetSource(textwindow), NULL);
-
-    for (i = 0; i < num_mode_infos; i++) {
-       if (item->xldata && item->xldata->syntax &&
-           mode_infos[i].syntax == item->xldata->syntax) {
-           new_entry = mode_infos[i].sme;
-           break;
-       }
-    }
-
-    if (old_entry != new_entry) {
-       if (old_entry)
-           XtVaSetValues(old_entry, XtNleftBitmap, None, NULL);
-       XtVaSetValues(new_entry, XtNleftBitmap, flist.pixmap, NULL);
-       edit_mode_entry = new_entry;
-    }
-}
-
-static void
-EditModeCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Widget source = XawTextGetSource(textwindow);
-    EditModeInfo *info = (EditModeInfo*)client_data;
-    xedit_flist_item *item = FindTextSource(source, NULL);
-
-    /* If no edit mode selected and selecting the plain/none mode */
-    if ((info == NULL &&
-        (item->xldata == NULL || item->xldata->syntax == NULL)) ||
-       /* if selecting the current mode */
-       (info && item && item->xldata && info->syntax &&
-        info->syntax == item->xldata->syntax))
-       return;
-
-    XawTextSourceClearEntities(source,
-                              XawTextSourceScan(source, 0, XawstAll,
-                                                XawsdLeft, 1, True),
-                              XawTextSourceScan(source, 0, XawstAll,
-                                                XawsdRight, 1, True));
-    XeditLispUnsetEditMode(item);
-    if (info)
-       XeditLispSetEditMode(item, info->symbol);
-    else
-       item->properties = NULL;
-    UpdateTextProperties(1);
-}
diff --git a/xedit/lisp/README b/xedit/lisp/README
deleted file mode 100644 (file)
index f6e5fdb..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-$XFree86: xc/programs/xedit/lisp/README,v 1.12 2002/11/23 08:26:47 paulo Exp $
-
-LAST UPDATED:  $Date$
-
-
-    SUMMARY
-
-  This is a small lisp interpreter for xedit. It implements a subset of
-Common Lisp and the xedit package implements several of the basic Emacs
-lisp functions.
-
-(shared modules not broken, but needs a redesign for better performance,
- but won't be made available in the default build probably for a long time,
- it would be really better to generate the interface dinamically, and/or just
- link agains't the required libraries and use a ffi interface)
-+------------------------------------------------------------------------
-|   It has a very simple method for loading shared modules, slightly based on
-| the XFree86 loader code, that is currently disabled by default. To enable it,
-| edit lisp.cf and change BuildSharedLispModules to YES.
-|
-|   Assuming you have built it with BuildSharedLispModules enabled, you can build
-| a small test application can be built in this directory running "make lsp".
-| Two lisp programs are available in the test directory. To test the programs
-| run "./lsp test/hello.lsp" or "./lsp test/widgets.lsp".
-+------------------------------------------------------------------------
-
-  Currently, it should be used as an helper and/or a small calculator embedded
-in xedit. For the future it should be possible to write entire interfaces
-in the xedit text buffers.
-
-
-    USAGE SUMMARY
-
-  To evaluate lisp expressions, put the text cursor just after the
-lisp expression and press:
-C-x,C-e        - will evaluate it, and print the result to the message window
-C-j    - will evaluate it, and print the result to the edit window, any
-         errors are printed to the message window.
-C-g    - will send an SIGINT to the lisp process, and that process will
-         stop whatever it was processing and jump to the toplevel,
-         to wait for more input.
-
-Note that C-j will only work in the *scratch* buffer.
-
-
-     NOTES
-
-  The improvements to xedit including the several possibilites to extend
-the editor using Lisp are expected to allow making of xedit a versatile
-text editor for programming, but there is code being (slowly) developed
-that should also make it useable as a small word processor, for things
-like WYSIWYG html, etc.
-  The xedit development is being done very slowly, maybe it will get
-somewhere someday, but it is a pet/hobby project, there is no intention
-of making of it an end user editor (the idea is to make it an useful
-development tool).
-  In some aspects the development is trying to mimic several Emacs
-features, but there is no intention of competition (if xedit ever get
-something better than Emacs, I hope that it serves as a motivation to
-make of Emacs an even better editor), actually it is expected to explore
-different areas and use alternate solutions for the implementation.
-  Most work in a computer is done in a text editor and the more the editor
-can help the user the better.
-
-
-(debugger is broken and very slow, no prevision for fixing it, but is
- expected to work correctly for interpreted only code)
-+------------------------------------------------------------------------
-|     DEBUGGER
-|
-|   There is a, currently, very simple debugger implement in the interpreter.
-| The debugger is now optional, and off by default. To make it available,
-| you need to recompile with -DDEBUGGER.
-| To use the debugger, run the lsp sample program as "./lsp -d", and optionally
-| pass a second parameter, for the file to be interpreted. Once the debugger
-| prompt is visible, type "help" for a summary of options. To leave the debugger
-| type "continue".
-|   Note that the debugger is still very simple, it won't work from xedit, and
-| won't drop to the debugger on "fatal errors". It allows adding breakpoints to
-| functions and watchpoints to variables. Support for changing data and going to
-| the debugger on fatal errors should be added at some time.
-+------------------------------------------------------------------------
-
-
-    COMPILER
-
-  Now there is a very simple bytecode compiler. It is far from finished, but
-for simple code can show significant better performance.
-  There is not yet an interface to compile entire files and no interface to
-store the generated bytecode in disk. There is an interface to bytecode
-compile toplevel forms as a LAMBDA NIL, but it is not yet exported.
-  If your code needs to call GO/RETURN/RETURN-FROM as the result of an EVAL,
-it must jump to code in the interpreter, after compiling all calls to
-GO/RETURN/RETURN-FROM are just stack adjusting and jumps in the bytecode.
-CATCH/THROW and UNWIND-PROTECT are running as interpreted code for now, so it
-is safe to use these, but code in such blocks is not compiled/optimized
-(not even macro expansion is done, as it understands that while not compiled,
-everything is candidate to redefinition at any time).
-  To compile the code, just write a function, and compile it, example:
-
-       (defun fact (n)
-           (if (< n 2)
-               1
-               (* n (fact (1- n)))
-           )
-       )
-       FACT
-
-       (compile 'fact)
-       FACT
-       NIL
-       NIL
-
-       (disassemble 'fact)
-       Function FACT:
-       1 required argument: N
-       0 optional arguments
-       0 keyword parameters
-       No rest argument
-
-       Bytecode header:
-       1 element used in the stack
-       2 elements used in the builtin stack
-       0 elements used in the protected stack
-       Constant 0 = 1
-       Constant 1 = (2)
-       Symbol 0 = N
-       Builtin 0 = *
-       Builtin 1 = 1-
-       Builtin 2 = <
-
-       Initial stack:
-       0 = N
-
-       Bytecode stream:
-          0  LOAD&PUSH (0)
-          2  LOADCON&PUSH [1]      ;  (2)
-          4  CALL 2 [2]            ;  <
-          7  JUMPNIL 8
-         10  LOADCON [0]           ;  1
-         12  NOOP
-         13  JUMP 19
-         16  LOAD&PUSH (0)
-         18  LOAD&PUSH (0)
-         20  CALL 1 [1]            ;  1-
-         23  LET* [0]              ;  N
-         25  LETREC 1
-         27  UNLET 1
-         29  BCONS1
-         30  CALL 1 [0]            ;  *
-         33  RETURN
-       FACT
-
-
-  There are several optimizations that should be done at some time, I don't
-think adding NOOP opcodes will help everywhere to make aligned memory reads
-of shorts and ints.
-  It should have explicitly visible registers, not the abstraction of "the
-current value", so the code generator can choose register allocation for
-loop control variables, commonly used variables, etc, for example. Jumps
-should have 3 types: byte relative, 2 bytes relative and 4 bytes relative.
-For now there is only 2 byte relative jumps, byte relative jumps
-can show a significant performance increase, but they are disable until
-it is decided how inlined functions will work, if it just updates the bytecode
-header and cut&past the bytecode, jumps must be updated, and some jumps
-may not fit anymore in a byte.
-
-
-    OPTIMIZATION
-
-  There are plenty of possibilities to make the interpreter run faster. Some
-optimizations that can make it run quite faster in certain cases are:
-  o Better object memory layout and gc. The current memory allocation code
-    is very bad, it try to keep 3 times more free objects than the currently
-    used number, this can consume a lot of memory. The reason is to reduce
-    the gc time cost so that it will in average miss only one in every 4
-    collect tries.
-  o Implement real vectors, currently they are just a list, so it cannot
-    just deference a given index, and gc time is very long also.
-  o Most lists are never changed once created, it could somehow add an index
-    field in the cons cell, so that NTH/NTHCDR/LENGTH like code could just
-    deference the correct object, instead of traversing the CDR of every
-    cons. This would probably require implementing lists as vectors, while
-    making it easy to deference would make life harder when deleting/inserting
-    sublists in a list. It should also better be done in a way that does
-    not require a lot of objects allocated linearly.
-
-
-    HELPING
-
-  Send comments and code to me (paulo@XFree86.Org) or to the XFree86
-mailing/patch lists.
-
---
-Paulo
diff --git a/xedit/lisp/TODO b/xedit/lisp/TODO
deleted file mode 100644 (file)
index 0f06306..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-$XFree86: xc/programs/xedit/lisp/TODO,v 1.8 2002/11/23 08:26:47 paulo Exp $
-
-LAST UPDATED:  $Date$
-
-  Small todo list
-
-o Change function/macro body to know if a &key or &optional argument was not
-  provided, and initialize to the default value in the function, for
-  interpreted and builtin functions it is better done before the function is
-  called, but for bytecode it is better in the function.
-o Following the previous idea, change function definitions in the format:
-  (defun afun (a &aux b (c (some-code))) ...)
-  to
-  (defun afun (a) (let* ((b (c (some-code)))) ...))
-  This can significatively reduce bytecode size, and also simplify function
-  calls.
-o Optimize text redisplay in Xaw, instead of allocating a copy of the buffer
-  for the paint-list, should use the text in place, and only allocate small
-  buffers when required, i.e. displaying control characters, etc.
-o Add an interface to create new object types dinamically.
-o Add a special string object to simplify and avoid too many copies of
-  portions of the text buffers. This special string should be read-only
-  and not gc-collected.
-o Make the bytecode compiler smarter to detect some constructs like:
-  (builtin-or-bytecode-function-call arg1 arg2 (return))
-  this will not properly restore the internal stacks.
-
-o When an Init function is present in every file, call LispAddBuiltin from
-  that initialization function.
-o Cleanup the code, make it optional to build some uncommon features (as well
-  as the entire interpreter?). Implement more functions directly in lisp.
-o Finish an "specification" for loadable modules. Write a FFI interface.
-  Without the possibility of using already existing libraries, the interpreter
-  won't be too much useful due to a poor library. It is very desirable to
-  "auto-generate" directly from C header files the interface to the lisp
-  code, and from that, dlload a shared library. In some cases, it is required
-  to link statically with a new interpreter binary, make it easy.
-o Implement a better string type. That should support characters larger than
-  8 bits, and that should allow embeded nuls.
-o Implement a richer set of math functions. This, if properly done can be
-  made a loadable module.
-o Optmize mathimp.c, comparing a double with a bignum should never cause an
-  error. Implement mp?_initsetXXX functions?
-o Finish missing features in read.c, and simplify it.
-o (close) probably should not send a signal when closing a pipe.
-o Implement "real" vectors, they exist to make access to field elements
-  at constant time, implementing vectors as lists may be very slow.
-o Use float and double as floating points formats.
-o Implement support for vectors of "atomic" types. Vectors of floats would
-  be useful for example if a OpenGL binding is done.
-o Implement a multiple precision floating point format. Either a 128 bits
-  (or configurable length?) IEEE 754 like number, or some format using
-  ratios, a epsilon for rouding, rounding modes, exact/inexact flag, a good
-  amount of guard digits, etc.
-o Write more functions and optimization for bignums. Try to make the code
-  as reusable as possible, either by other software or at least by the
-  different number types.
-o Instead of using mathimp.c for a large amount of functions, implement a
-  "generic number" type and implement the calculations directly in the
-  mp library.
-o Add more missing Common Lisp features, like &allow-other-keys for function
-  definitions, the missing structure features, CLOS etc.
-o Fix the Postgresql module, make it compile everywhere.
-o Add support for multi-threaded applications?
-o Make it possible to know if a object has only one reference, this is
-  required to make "inplace" changes of variables. Very useful for things
-  like (incf) and (decf), and also when dealing with bignums.
-o Maybe have a freelist for objects depending on the type. Bignums can be
-  reused, and having some large ones expecting to be freed by the gc can
-  consume a lot of memory.
-o Internationalization. Support ',' in floats? Correctly treat characters
-  for {up,down}-casing.
-o Synch the Xaw text code for supporting tables, text alignment/paragraphs,
-  etc, and add bindings to the interpreter. Add support for incremental
-  changes of those properties, currently it is "read-only".
-o Write some type of "hyperlinks", this is the only feature missing to even
-  allow writting a web browser inside xedit.
-o Write some "demos" (maybe a file manager or a simple mail reader) using the
-  Xt/Xaw bindings (needs modules working in all systems).
-o Remove all calls to the macros GCDisable and GCEnable. This is unsafe
-  and should be removed.
diff --git a/xedit/lisp/bytecode.c b/xedit/lisp/bytecode.c
deleted file mode 100644 (file)
index cc7d1c5..0000000
+++ /dev/null
@@ -1,3696 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/bytecode.c,v 1.17 2003/05/27 22:27:01 tsi Exp $ */
-
-
-/*
-somethings TODO:
-
- o Write code for allowing storing the bytecode on disk. Basically
-   write a section of the bytecode with the package name of the symbol
-   pointers, and after that, the symbols used. At load time just put
-   the pointers in the bytecode. Constants can be stored as the string
-   representation. Probably just storing the gc protected code as a
-   string is enough to rebuild it.
-
- o Write code to store tags of BLOCK/CATCH and setjump buffer stacks,
-   and, only keep track of this if non byte-compiled code is called,
-   as after byte-compilation RETURN and THROW are just jumps.
-
- o Remove not reliable "optmization code" code from Com_XXX functions
-   and do it later, removing dead code, tests with a constant argument,
-   etc, in the "link time". Frequently joining sequential opcodes to a
-   compound version.
-
- o Write an optimizer to do code transformation.
-
- o Write code to know when variables can be changed in place, this
-   can save a huge time in loop counters.
-
- o Write code for fast garbage collection of objects that can be
-   safely collected.
-
- o Cleanup of interpreted code. Having bytecode mean that the interpreter
-   now is better having a clean and small code. If speed is important,
-   it should be byte compiled.
-
- o Limit the stacks length. So that instead of using an index, use the
-   pointer where an object value should be read/stored as the stack address
-   would not change during the program execution.
-
- o Optimize jump to jump. Common in code like:
-       (IF test
-           (GO somewhere)
-           (GO elsewhere)
-       )
-       (GO there)
-   that generates a bytecode like:
-       <code to evaluate test>
-       JUMPNIL :NIL-RESULT
-       :T-RESULT
-           JUMP :SOMEWHERE
-       JUMP :END-OF-IF                 ;; <- this is not required, or even
-       :NIL-RESULT                     ;;    better, notice the jump after
-           JUMP :ELSEWHERE             ;;    the if and transform it into
-       :END-OF-IF                      ;;    a JUMP :THERE (assuming there
-       JUMP :THERE                     ;;    (was no jump in the T code).
-
- o Optimize variables that are known to not change it's value, i.e. pseudo
-   constants. Loading the value of a constant should be faster than loading
-   the current value of a variable; the constant table could fit in the
-   processor cache line and needs less calculation to find the object address.
-
- o Fix some known problems, like when calling return or return-from while
-   building the argument list to a builtin function, or inline of recursive
-   functions.
- */
-
-
-#include "lisp/bytecode.h"
-#include "lisp/write.h"
-
-#define        SYMBOL_KEYWORD  -1      /* A keyword, load as constant */
-#define        SYMBOL_CONSTANT -2      /* Defined as constant at compile time */
-#define        SYMBOL_UNBOUND  -3      /* Not a local variable */
-
-#define NEW_TREE(type)         CompileNewTree(com, type)
-
-/* If in tagbody, ignore anything that is not code */
-#define        IN_TAGBODY()            (com->block->type == LispBlockBody && \
-                                com->level == com->tagbody)
-#define        FORM_ENTER()            ++com->level
-#define        FORM_LEAVE()            --com->level
-
-#define COMPILE_FAILURE(message)                       \
-    LispMessage("COMPILE: %s", message);               \
-    longjmp(com->jmp, 1)
-
-/*
- * Types
- */
-typedef struct _CodeTree CodeTree;
-typedef struct _CodeBlock CodeBlock;
-
-typedef enum {
-    CodeTreeBytecode,
-    CodeTreeLabel,
-    CodeTreeGo,
-    CodeTreeJump,
-    CodeTreeJumpIf,
-    CodeTreeCond,
-    CodeTreeBlock,
-    CodeTreeReturn
-} CodeTreeType;
-
-struct _CodeTree {
-    CodeTreeType type;
-
-    /* Resolved when linking, may be adjusted while optimizing */
-    long offset;
-
-    LispByteOpcode code;
-
-    union {
-       signed char signed_char;
-       signed short signed_short;
-       signed int signed_int;
-       LispAtom *atom;
-       LispObj *object;
-       CodeTree *tree;
-       CodeBlock *block;
-       struct {
-           unsigned char num_arguments;
-           LispBuiltin *builtin;
-           signed short offset;        /* Used if opcode is XBC_CALL_SET */
-       } builtin;
-       struct {
-           unsigned char num_arguments;
-           LispObj *name;
-           LispObj *lambda;
-       } call;
-       struct {
-           unsigned char num_arguments;
-           LispObj *code;
-       } bytecall;
-       struct {
-           short offset;
-           LispAtom *name;
-       } let;
-       struct {
-           LispAtom *symbol;
-           LispAtom *name;
-       } let_sym;
-       struct {
-           LispObj *object;
-           LispAtom *name;
-       } let_con;
-       struct {
-           signed short load;
-           signed short set;
-       } load_set;
-       struct {
-           LispObj *object;
-           signed short offset;
-       } load_con_set;
-       struct {
-           LispObj *car;
-           LispObj *cdr;
-       } cons;
-       struct {
-           short offset;
-           LispObj *definition;
-       } struc;
-    } data;
-
-    CodeTree *next;
-    CodeTree *group;
-    CodeBlock *block;
-};
-
-struct _CodeBlock {
-    LispBlockType type;
-    LispObj *tag;
-
-    struct {
-       LispObj **labels;
-       CodeTree **codes;       /* Filled at link time */
-       int length;
-       int space;
-    } tagbody;
-
-    struct {
-       LispAtom **symbols;     /* Identifiers of variables in a block */
-       int *flags;             /* Information about usage of the variable */
-       int length;
-    } variables;
-
-    int bind;                  /* Used in case of RETURN from LET */
-    int level;                 /* Nesting level block was created */
-
-    CodeTree *tree, *tail;
-    CodeBlock *prev;           /* Linked list as a stack */
-    CodeTree *parent;          /* Back reference */
-};
-
-struct _LispCom {
-    unsigned char *bytecode;   /* Bytecode generated so far */
-    long length;
-
-    CodeBlock *block, *toplevel;
-
-    int tagbody;               /* Inside a tagbody block? */
-    int level;                 /* Nesting level */
-    int macro;                 /* Expanding a macro? */
-
-    int lex;
-
-    int warnings;
-
-    LispObj *form, *plist;
-
-    jmp_buf jmp;               /* Used if compilation cannot be finished */
-
-    struct {
-       int cstack;     /* Current number of objects in forms evaluation */
-       int cbstack;
-       int cpstack;
-       int stack;      /* max number of objects will be loaded in stack */
-       int bstack;
-       int pstack;
-    } stack;
-
-    struct {
-       /* Constant table */
-       LispObj **constants;
-       int num_constants;
-       /* Symbol table */
-       LispAtom **symbols;
-       int num_symbols;
-       /* Builtin table */
-       LispBuiltin **builtins;
-       int num_builtins;
-       /* Bytecode table */
-       LispObj **bytecodes;
-       int num_bytecodes;
-    } table;
-};
-
-/*
- * Prototypes
- */
-static LispObj *MakeBytecodeObject(LispCom*, LispObj*, LispObj*);
-
-static CodeTree *CompileNewTree(LispCom*, CodeTreeType);
-static void CompileFreeState(LispCom*);
-static void CompileFreeBlock(CodeBlock*);
-static void CompileFreeTree(CodeTree*);
-
-static void CompileIniBlock(LispCom*, LispBlockType, LispObj*);
-static void CompileFiniBlock(LispCom*);
-
-static void com_BytecodeChar(LispCom*, LispByteOpcode, char);
-static void com_BytecodeShort(LispCom*, LispByteOpcode, short);
-static void com_BytecodeObject(LispCom*, LispByteOpcode, LispObj*);
-static void com_BytecodeCons(LispCom*, LispByteOpcode, LispObj*, LispObj*);
-
-static void com_BytecodeAtom(LispCom*, LispByteOpcode, LispAtom*);
-
-static void com_Bytecode(LispCom*, LispByteOpcode);
-
-static void com_Load(LispCom*, short);
-static void com_LoadLet(LispCom*, short, LispAtom*);
-static void com_LoadPush(LispCom*, short);
-
-static void com_Let(LispCom*, LispAtom*);
-
-static void com_Bind(LispCom*, short);
-static void com_Unbind(LispCom*, short);
-
-static void com_LoadSym(LispCom*, LispAtom*);
-static void com_LoadSymLet(LispCom*, LispAtom*, LispAtom*);
-static void com_LoadSymPush(LispCom*, LispAtom*);
-
-static void com_LoadCon(LispCom*, LispObj*);
-static void com_LoadConLet(LispCom*, LispObj*, LispAtom*);
-static void com_LoadConPush(LispCom*, LispObj*);
-
-static void com_Set(LispCom*, short);
-static void com_SetSym(LispCom*, LispAtom*);
-
-static void com_Struct(LispCom*, short, LispObj*);
-static void com_Structp(LispCom*, LispObj*);
-
-static void com_Call(LispCom*, unsigned char, LispBuiltin*);
-static void com_Bytecall(LispCom*, unsigned char, LispObj*);
-static void com_Funcall(LispCom*, LispObj*, LispObj*);
-
-static void CompileStackEnter(LispCom*, int, int);
-static void CompileStackLeave(LispCom*, int, int);
-
-static void LinkBytecode(LispCom*);
-
-static LispObj *ExecuteBytecode(unsigned char*);
-
-
-/* Defined in lisp.c */
-void LispMoreStack(void);
-void LispMoreEnvironment(void);
-void LispMoreGlobals(LispPackage*);
-LispObj *LispEvalBackquote(LispObj*, int);
-void LispSetAtomObjectProperty(LispAtom*, LispObj*);
-
-/*
- * Initialization
- */
-extern int pagesize;
-
-LispObj x_cons[8];
-static LispObj *cons, *cons1, *cons2, *cons3, *cons4, *cons5, *cons6, *cons7;
-
-/*
- * Implementation
- */
-#include "lisp/compile.c"
-
-void
-LispBytecodeInit(void)
-{
-    cons = &x_cons[7];
-    cons->type = LispCons_t;
-    CDR(cons) = NIL;
-    cons1 = &x_cons[6];
-    cons1->type = LispCons_t;
-    CDR(cons1) = cons;
-    cons2 = &x_cons[5];
-    cons2->type = LispCons_t;
-    CDR(cons2) = cons1;
-    cons3 = &x_cons[4];
-    cons3->type = LispCons_t;
-    CDR(cons3) = cons2;
-    cons4 = &x_cons[3];
-    cons4->type = LispCons_t;
-    CDR(cons4) = cons3;
-    cons5 = &x_cons[2];
-    cons5->type = LispCons_t;
-    CDR(cons5) = cons4;
-    cons6 = &x_cons[1];
-    cons6->type = LispCons_t;
-    CDR(cons6) = cons5;
-    cons7 = &x_cons[0];
-    cons7->type = LispCons_t;
-    CDR(cons7) = cons6;
-}
-
-LispObj *
-Lisp_Compile(LispBuiltin *builtin)
-/*
- compile name &optional definition
- */
-{
-    GC_ENTER();
-    LispObj *result, *warnings_p, *failure_p;
-
-    LispObj *name, *definition;
-
-    definition = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    result = name;
-    warnings_p = NIL;
-    failure_p = T;
-
-    if (name != NIL) {
-       LispAtom *atom;
-
-       CHECK_SYMBOL(name);
-       atom = name->data.atom;
-       if (atom->a_builtin || atom->a_compiled)
-           goto finished_compilation;
-       else if (atom->a_function) {
-           LispCom com;
-           int failed;
-           int lex = 0, base;
-           LispArgList *alist;
-           LispObj *lambda, *form, *arguments;
-
-           lambda = atom->property->fun.function;
-           if (definition != UNSPEC || lambda->funtype != LispFunction)
-               /* XXX TODO replace definition etc. */
-               goto finished_compilation;
-           alist = atom->property->alist;
-
-           memset(&com, 0, sizeof(LispCom));
-           com.toplevel = com.block = LispCalloc(1, sizeof(CodeBlock));
-           com.block->type = LispBlockClosure;
-           com.block->tag = name;
-
-           /*  Create a fake argument list to avoid yet another flag
-            * for ComCall. The value does not matter, just the fact
-            * that the symbol will be bound or not in the implicit
-            * PROGN of the function body. */
-           base = alist->num_arguments - alist->auxs.num_symbols;
-           if (base) {
-               LispObj *argument;
-               int i, sforms;
-
-               for (i = sforms = 0; i < alist->optionals.num_symbols; i++)
-                   if (alist->optionals.sforms[i])
-                       ++sforms;
-
-               arguments = form = NIL;
-               i = sforms +
-                   alist->normals.num_symbols + alist->optionals.num_symbols;
-
-               if (i) {
-                   arguments = form = CONS(NIL, NIL);
-                   GC_PROTECT(arguments);
-                   for (--i; i > 0; i--) {
-                       RPLACD(form, CONS(NIL, NIL));
-                       form = CDR(form);
-                   }
-               }
-
-               for (i = 0; i < alist->keys.num_symbols; i++) {
-                   /* key symbol */
-                   if (alist->keys.keys[i])
-                       argument = QUOTE(alist->keys.keys[i]);
-                   else
-                       argument = alist->keys.symbols[i];
-
-                   /* add key */
-                   if (arguments == NIL) {
-                       arguments = form = CONS(argument, NIL);
-                       GC_PROTECT(arguments);
-                   }
-                   else {
-                       RPLACD(form, CONS(argument, NIL));
-                       form = CDR(form);
-                   }
-
-                   /* add value */
-                   RPLACD(form, CONS(NIL, NIL));
-                   form = CDR(form);
-
-                   if (alist->keys.sforms[i]) {
-                       RPLACD(form, CONS(NIL, NIL));
-                       form = CDR(form);
-                   }
-               }
-
-               if (alist->rest) {
-                   if (arguments == NIL) {
-                       arguments = form = CONS(NIL, NIL);
-                       GC_PROTECT(arguments);
-                   }
-                   else {
-                       RPLACD(form, CONS(NIL, NIL));
-                       form = CDR(form);
-                   }
-               }
-           }
-           else
-               arguments = NIL;
-
-           form = CONS(lambda->data.lambda.code, NIL);
-           GC_PROTECT(form);
-           com.form = form;
-           com.plist = CONS(NIL, NIL);
-           GC_PROTECT(com.plist);
-
-           failed = 1;
-           if (setjmp(com.jmp) == 0) {
-               /* Save interpreter state */
-               lex = com.lex = lisp__data.env.lex;
-               base = ComCall(&com, alist, name, arguments, 1, 0, 1);
-
-               /* Generate code tree */
-               lisp__data.env.lex = base;
-               ComProgn(&com, CAR(form));
-               failed = 0;
-           }
-
-           /* Restore interpreter state */
-           lisp__data.env.lex = lex;
-           lisp__data.env.head = lisp__data.env.length = base;
-
-           if (!failed) {
-               failure_p = NIL;
-               result = MakeBytecodeObject(&com, name,
-                                           lambda->data.lambda.data);
-               LispSetAtomCompiledProperty(atom, result);
-               result = name;
-           }
-           if (com.warnings)
-               warnings_p = FIXNUM(com.warnings);
-           goto finished_compilation;
-       }
-       else
-           goto undefined_function;
-    }
-
-undefined_function:
-    LispDestroy("%s: the function %s is undefined",
-               STRFUN(builtin), STROBJ(name));
-
-finished_compilation:
-    RETURN(0) = warnings_p;
-    RETURN(1) = failure_p;
-    RETURN_COUNT = 2;
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Disassemble(LispBuiltin *builtin)
-/*
- disassemble function
- */
-{
-    int macro;
-    char buffer[128];
-    LispAtom *atom;
-    LispArgList *alist;
-    LispBuiltin *xbuiltin;
-    LispObj *name, *lambda, *bytecode;
-
-    LispObj *function;
-
-    function = ARGUMENT(0);
-
-    macro = 0;
-    alist = NULL;
-    xbuiltin = NULL;
-    name = bytecode = NULL;
-
-    switch (OBJECT_TYPE(function)) {
-       case LispFunction_t:
-           function = function->data.atom->object;
-       case LispAtom_t:
-           name = function;
-           atom = function->data.atom;
-           alist = atom->property->alist;
-           if (atom->a_builtin) {
-               xbuiltin = atom->property->fun.builtin;
-               macro = xbuiltin->type == LispMacro;
-           }
-           else if (atom->a_compiled)
-               bytecode = atom->property->fun.function;
-           else if (atom->a_function) {
-               lambda = atom->property->fun.function;
-               macro = lambda->funtype == LispMacro;
-           }
-           else if (atom->a_defstruct &&
-                    atom->property->structure.function != STRUCT_NAME) {
-               if (atom->property->structure.function == STRUCT_CONSTRUCTOR)
-                   atom = Omake_struct->data.atom;
-               else if (atom->property->structure.function == STRUCT_CHECK)
-                   atom = Ostruct_type->data.atom;
-               else
-                   atom = Ostruct_access->data.atom;
-               xbuiltin = atom->property->fun.builtin;
-           }
-           else
-               LispDestroy("%s: the function %s is not defined",
-                           STRFUN(builtin), STROBJ(function));
-           break;
-       case LispBytecode_t:
-           name = Olambda;
-           bytecode = function;
-           break;
-       case LispLambda_t:
-           name = Olambda;
-           alist = (LispArgList*)function->data.lambda.name->data.opaque.data;
-           break;
-       case LispCons_t:
-           if (CAR(function) == Olambda) {
-               function = EVAL(function);
-               if (OBJECT_TYPE(function) == LispLambda_t) {
-                   name = Olambda;
-                   alist = (LispArgList*)
-                       function->data.lambda.name->data.opaque.data;
-                   break;
-               }
-           }
-       default:
-           LispDestroy("%s: %s is not a function",
-                       STRFUN(builtin), STROBJ(function));
-           break;
-    }
-
-    if (xbuiltin) {
-       LispWriteStr(NIL, "Builtin ", 8);
-       if (macro)
-           LispWriteStr(NIL, "macro ", 6);
-       else
-           LispWriteStr(NIL, "function ", 9);
-    }
-    else if (macro)
-       LispWriteStr(NIL, "Macro ", 6);
-    else
-       LispWriteStr(NIL, "Function ", 9);
-    LispWriteObject(NIL, name);
-    LispWriteStr(NIL, ":\n", 2);
-
-    if (alist) {
-       int i;
-
-       sprintf(buffer, "%d required argument%s",
-               alist->normals.num_symbols,
-               alist->normals.num_symbols != 1 ? "s" : "");
-       LispWriteStr(NIL, buffer, strlen(buffer));
-       for (i = 0; i < alist->normals.num_symbols; i++) {
-           LispWriteChar(NIL, i ? ',' : ':');
-           LispWriteChar(NIL, ' ');
-           LispWriteStr(NIL, ATOMID(alist->normals.symbols[i])->value,
-                        ATOMID(alist->normals.symbols[i])->length);
-       }
-       LispWriteChar(NIL, '\n');
-
-       sprintf(buffer, "%d optional argument%s",
-               alist->optionals.num_symbols,
-               alist->optionals.num_symbols != 1 ? "s" : "");
-       LispWriteStr(NIL, buffer, strlen(buffer));
-       for (i = 0; i < alist->optionals.num_symbols; i++) {
-           LispWriteChar(NIL, i ? ',' : ':');
-           LispWriteChar(NIL, ' ');
-           LispWriteStr(NIL, ATOMID(alist->optionals.symbols[i])->value,
-                        ATOMID(alist->optionals.symbols[i])->length);
-       }
-       LispWriteChar(NIL, '\n');
-
-       sprintf(buffer, "%d keyword parameter%s",
-               alist->keys.num_symbols,
-               alist->keys.num_symbols != 1 ? "s" : "");
-       LispWriteStr(NIL, buffer, strlen(buffer));
-       for (i = 0; i < alist->keys.num_symbols; i++) {
-           LispWriteChar(NIL, i ? ',' : ':');
-           LispWriteChar(NIL, ' ');
-           LispWriteObject(NIL, alist->keys.symbols[i]);
-       }
-       LispWriteChar(NIL, '\n');
-
-       if (alist->rest) {
-           LispWriteStr(NIL, "Rest argument: ", 15);
-           LispWriteStr(NIL, ATOMID(alist->rest)->value,
-                        ATOMID(alist->rest)->length);
-           LispWriteChar(NIL, '\n');
-       }
-       else
-           LispWriteStr(NIL, "No rest argument\n", 17);
-    }
-
-    if (bytecode) {
-       Atom_id id;
-       char *ptr;
-       int *offsets[4];
-       int i, done, j, sym0, sym1, con0, con1, bui0, byt0, strd, strf;
-       LispObj **constants;
-       LispAtom **symbols;
-       LispBuiltin **builtins;
-       LispObj **names;
-       short stack, num_constants, num_symbols, num_builtins, num_bytecodes;
-       unsigned char *base, *stream = bytecode->data.bytecode.bytecode->code;
-
-       LispWriteStr(NIL, "\nBytecode header:\n", 18);
-
-       /* Header information */
-       stack = *(short*)stream;
-       stream += sizeof(short);
-       sprintf(buffer, "%d element%s used in the stack\n",
-               stack, stack != 1 ? "s" : "");
-       LispWriteStr(NIL, buffer, strlen(buffer));
-       stack = *(short*)stream;
-       stream += sizeof(short);
-       sprintf(buffer, "%d element%s used in the builtin stack\n",
-               stack, stack != 1 ? "s" : "");
-       LispWriteStr(NIL, buffer, strlen(buffer));
-       stack = *(short*)stream;
-       stream += sizeof(short);
-       sprintf(buffer, "%d element%s used in the protected stack\n",
-               stack, stack != 1 ? "s" : "");
-       LispWriteStr(NIL, buffer, strlen(buffer));
-
-       num_constants = *(short*)stream;
-       stream += sizeof(short);
-       num_symbols = *(short*)stream;
-       stream += sizeof(short);
-       num_builtins = *(short*)stream;
-       stream += sizeof(short);
-       num_bytecodes = *(short*)stream;
-       stream += sizeof(short);
-
-       constants = (LispObj**)stream;
-       stream += num_constants * sizeof(LispObj*);
-       symbols = (LispAtom**)stream;
-       stream += num_symbols * sizeof(LispAtom*);
-       builtins = (LispBuiltin**)stream;
-       stream += num_builtins * sizeof(LispBuiltin*);
-       stream += num_bytecodes * sizeof(unsigned char*);
-       names = (LispObj**)stream;
-       stream += num_bytecodes * sizeof(LispObj*);
-
-       for (i = 0; i < num_constants; i++) {
-           sprintf(buffer, "Constant %d = %s\n", i, STROBJ(constants[i]));
-           LispWriteStr(NIL, buffer, strlen(buffer));
-       }
-
-/* Macro XSTRING avoids some noisy in the output, if it were defined as
- * #define XSTRING(object) object ? STROBJ(object) : #<UNBOUND>
- *     and called as XSTRING(atom->object)
- * it would also print the package name were the symbol was first defined,
- * but for local variables, only the symbol string is important. */
-#define XSTRING(key)           key ? key->value : "#<UNBOUND>"
-
-       for (i = 0; i < num_symbols; i++) {
-           sprintf(buffer, "Symbol %d = %s\n",
-                   i, XSTRING(symbols[i]->key));
-           LispWriteStr(NIL, buffer, strlen(buffer));
-       }
-       for (i = 0; i < num_builtins; i++) {
-           sprintf(buffer, "Builtin %d = %s\n",
-                   i, STROBJ(builtins[i]->symbol));
-           LispWriteStr(NIL, buffer, strlen(buffer));
-       }
-       for (i = 0; i < num_bytecodes; i++) {
-           sprintf(buffer, "Bytecode %d = %s\n",
-                   i, STROBJ(names[i]));
-           LispWriteStr(NIL, buffer, strlen(buffer));
-       }
-
-       /*  Make readability slightly easier printing the names of local
-        * variables where it's offset is known, i.e. function arguments. */
-       if (alist) {
-           if (alist->num_arguments == 0)
-               LispWriteStr(NIL, "\nNo initial stack\n", 18);
-           else {
-               int len1, len2;
-
-               j = 0;
-               LispWriteStr(NIL, "\nInitial stack:\n", 16);
-
-               for (i = 0; i < alist->normals.num_symbols; i++, j++) {
-                   sprintf(buffer, "%d = ", j);
-                   LispWriteStr(NIL, buffer, strlen(buffer));
-                   id = alist->normals.symbols[i]->data.atom->key;
-                   LispWriteStr(NIL, id->value, id->length);
-                   LispWriteChar(NIL, '\n');
-               }
-
-               for (i = 0; i < alist->optionals.num_symbols; i++, j++) {
-                   sprintf(buffer, "%d = ", j);
-                   LispWriteStr(NIL, buffer, strlen(buffer));
-                   id = alist->optionals.symbols[i]->data.atom->key;
-                   LispWriteStr(NIL, id->value, id->length);
-                   LispWriteChar(NIL, '\n');
-                   if (alist->optionals.sforms[i]) {
-                       sprintf(buffer, "%d = ", j);
-                       len1 = strlen(buffer);
-                       LispWriteStr(NIL, buffer, len1);
-                       id = alist->optionals.sforms[i]->data.atom->key;
-                       len2 = id->length;
-                       LispWriteStr(NIL, id->value, len2);
-                       LispWriteChars(NIL, ' ', 28 - (len1 + len2));
-                       LispWriteStr(NIL, ";  sform\n", 9);
-                       j++;
-                   }
-               }
-
-               for (i = 0; i < alist->keys.num_symbols; i++, j++) {
-                   sprintf(buffer, "%d = ", j);
-                   len1 = strlen(buffer);
-                   LispWriteStr(NIL, buffer, len1);
-                   if (alist->keys.keys[i]) {
-                       id = alist->keys.keys[i]->data.atom->key;
-                       len2 = id->length;
-                       LispWriteStr(NIL, id->value, id->length);
-                       LispWriteChars(NIL, ' ', 28 - (len1 + len2));
-                       LispWriteStr(NIL, ";  special key", 14);
-                   }
-                   else {
-                       id = alist->keys.symbols[i]->data.atom->key;
-                       LispWriteStr(NIL, id->value, id->length);
-                   }
-                   LispWriteChar(NIL, '\n');
-                   if (alist->keys.sforms[i]) {
-                       sprintf(buffer, "%d = ", j);
-                       len1 = strlen(buffer);
-                       LispWriteStr(NIL, buffer, len1);
-                       id = alist->keys.sforms[i]->data.atom->key;
-                       len2 = id->length;
-                       LispWriteStr(NIL, id->value, len2);
-                       LispWriteChars(NIL, ' ', 28 - (len1 + len2));
-                       LispWriteStr(NIL, ";  sform\n", 9);
-                       j++;
-                   }
-               }
-
-               if (alist->rest) {
-                   sprintf(buffer, "%d = ", j);
-                   len1 = strlen(buffer);
-                   LispWriteStr(NIL, buffer, len1);
-                   id = alist->rest->data.atom->key;
-                   len2 = id->length;
-                   LispWriteStr(NIL, id->value, len2);
-                   LispWriteChar(NIL, '\n');
-                   j++;
-               }
-
-               for (i = 0; i < alist->auxs.num_symbols; i++, j++) {
-                   sprintf(buffer, "%d = ", j);
-                   len1 = strlen(buffer);
-                   LispWriteStr(NIL, buffer, len1);
-                   id = alist->auxs.symbols[i]->data.atom->key;
-                   len2 = id->length;
-                   LispWriteStr(NIL, id->value, len2);
-                   LispWriteChars(NIL, ' ', 28 - (len1 + len2));
-                   LispWriteStr(NIL, ";  aux\n", 7);
-               }
-           }
-       }
-
-       LispWriteStr(NIL, "\nBytecode stream:\n", 18);
-
-       base = stream;
-       for (done = j = 0; !done; j = 0) {
-           sym0 = sym1 = con0 = con1 = bui0 = byt0 = strd = strf = -1;
-           sprintf(buffer, "%4ld  ", (long)(stream - base));
-           ptr = buffer + strlen(buffer);
-           switch (*stream++) {
-               case XBC_NOOP:  strcpy(ptr, "NOOP");    break;
-               case XBC_PRED:
-                   strcpy(ptr, "PRED:");
-                   ptr += strlen(ptr);
-                   goto predicate;
-               case XBC_INV:   strcpy(ptr, "INV");     break;
-               case XBC_NIL:   strcpy(ptr, "NIL");     break;
-               case XBC_T:     strcpy(ptr, "T");       break;
-               case XBC_CAR:   strcpy(ptr, "CAR");     break;
-               case XBC_CDR:   strcpy(ptr, "CDR");     break;
-               case XBC_RPLACA:strcpy(ptr, "RPLACA");  break;
-               case XBC_RPLACD:strcpy(ptr, "RPLACD");  break;
-               case XBC_EQ:    strcpy(ptr, "EQ");      break;
-               case XBC_EQL:   strcpy(ptr, "EQL");     break;
-               case XBC_EQUAL: strcpy(ptr, "EQUAL");   break;
-               case XBC_EQUALP:strcpy(ptr, "EQUALP");  break;
-               case XBC_LENGTH:strcpy(ptr, "LENGTH");  break;
-               case XBC_LAST:  strcpy(ptr, "LAST");    break;
-               case XBC_NTHCDR:strcpy(ptr, "NTHCDR");  break;
-               case XBC_PUSH:  strcpy(ptr, "PUSH");    break;
-               case XBC_CAR_PUSH:
-                   strcpy(ptr, "CAR&PUSH");
-                   break;
-               case XBC_CDR_PUSH:
-                   strcpy(ptr, "CDR&PUSH");
-                   break;
-               case XBC_PUSH_NIL:
-                   strcpy(ptr, "PUSH NIL");
-                   break;
-               case XBC_PUSH_UNSPEC:
-                   strcpy(ptr, "PUSH #<UNSPEC>");
-                   break;
-               case XBC_PUSH_T:
-                   strcpy(ptr, "PUSH T");
-                   break;
-               case XBC_PUSH_NIL_N:
-                   strcpy(ptr, "PUSH NIL ");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, "%d", (int)(*stream++));
-                   break;
-               case XBC_PUSH_UNSPEC_N:
-                   strcpy(ptr, "PUSH #<UNSPEC> ");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, "%d", (int)(*stream++));
-                   break;
-               case XBC_LET:
-                   strcpy(ptr, "LET");
-/* update sym0 */
-symbol:
-                   offsets[j++] = &sym0;
-/* update <offsets> - print [byte] */
-offset:
-                   ptr += strlen(ptr);
-                   i = *stream++;
-                   *(offsets[j - 1]) = i;
-                   sprintf(ptr, " [%d]", i);
-                   break;
-               case XBC_LETX:
-                   strcpy(ptr, "LET*");
-                   goto symbol;
-               case XBC_LET_NIL:
-                   strcpy(ptr, "LET NIL");
-                   goto symbol;
-               case XBC_LETX_NIL:
-                   strcpy(ptr, "LET* NIL");
-                   goto symbol;
-               case XBC_LETBIND:
-                   strcpy(ptr, "LETBIND");
-/* print byte */
-value:
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " %d", (int)(*stream++));
-                   break;
-               case XBC_UNLET:strcpy(ptr, "UNLET");    goto value;
-               case XBC_LOAD:
-                   strcpy(ptr, "LOAD");
-/* print (byte) */
-reference:
-                   ptr += strlen(ptr);
-                   i = *stream++;
-                   sprintf(ptr, " (%d)", i);
-                   break;
-               case XBC_LOAD_CAR:
-                   strcpy(ptr, "LOAD&CAR");
-                   goto reference;
-               case XBC_LOAD_CDR:
-                   strcpy(ptr, "LOAD&CDR");
-                   goto reference;
-               case XBC_LOAD_CAR_STORE:
-                   strcpy(ptr, "LOAD&CAR&STORE");
-                   goto reference;
-               case XBC_LOAD_CDR_STORE:
-                   strcpy(ptr, "LOAD&CDR&STORE");
-                   goto reference;
-               case XBC_LOAD_LET:
-                   strcpy(ptr, "LOAD&LET");
-load_let:
-                   offsets[j++] = &sym0;
-                   i = *stream++;
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " (%d)", i);
-                   goto offset;
-               case XBC_LOAD_LETX:
-                   strcpy(ptr, "LOAD&LET*");
-                   goto load_let;
-               case XBC_STRUCT:
-                   strcpy(ptr, "STRUCT");
-                   offsets[j++] = &strf;
-                   offsets[j++] = &strd;
-/* update <offsets> - print [byte] - update <offsets> - print [byte] */
-offset_offset:
-                   ptr += strlen(ptr);
-                   i = *stream++;
-                   *(offsets[j - 2]) = i;
-                   sprintf(ptr, " [%d]", i);
-                   goto offset;
-               case XBC_LOAD_PUSH:
-                   strcpy(ptr, "LOAD&PUSH");
-                   goto reference;
-               case XBC_LOADCON:
-                   strcpy(ptr, "LOADCON");
-constant:
-                   offsets[j++] = &con0;
-                   goto offset;
-               case XBC_LOADCON_SET:
-                   strcpy(ptr, "LOADCON&SET");
-                   offsets[j++] = &con0;
-/* update <offsets> - print [byte] - print (byte) */
-offset_reference:
-                   i = *stream++;
-                   *(offsets[j - 1]) = i;
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " [%d]", i);
-                   goto reference;
-               case XBC_STRUCTP:
-                   strcpy(ptr, "STRUCTP");
-                   offsets[j++] = &strd;
-                   goto offset;
-               case XBC_LOADCON_LET:
-                   strcpy(ptr, "LOADCON&LET");
-loadcon_let:
-                   offsets[j++] = &con0;
-                   offsets[j++] = &sym0;
-                   goto offset_offset;
-               case XBC_LOADCON_LETX:
-                   strcpy(ptr, "LOADCON&LET*");
-                   goto loadcon_let;
-               case XBC_LOADCON_PUSH:
-                   strcpy(ptr, "LOADCON&PUSH");
-                   goto constant;
-               case XBC_LOADSYM:
-                   strcpy(ptr, "LOADSYM");
-                   goto symbol;
-               case XBC_LOADSYM_LET:
-                   strcpy(ptr, "LOADSYM&LET");
-loadsym_let:
-                   offsets[j++] = &sym0;
-                   offsets[j++] = &sym1;
-                   goto offset_offset;
-               case XBC_LOADSYM_LETX:
-                   strcpy(ptr, "LOADSYM&LET*");
-                   goto loadsym_let;
-               case XBC_LOADSYM_PUSH:
-                   strcpy(ptr, "LOADSYM&PUSH");
-                   goto symbol;
-               case XBC_LOAD_SET:
-                   strcpy(ptr, "LOAD&SET");
-/* print (byte) - print (byte) */
-reference_reference:
-                   ptr += strlen(ptr);
-                   i = *stream++;
-                   sprintf(ptr, " (%d)", i);
-                   goto reference;
-               case XBC_LOAD_CAR_SET:
-                   strcpy(ptr, "LOAD&CAR&SET");
-                   goto reference_reference;
-               case XBC_LOAD_CDR_SET:
-                   strcpy(ptr, "LOAD&CDR&SET");
-                   goto reference_reference;
-               case XBC_CAR_SET:
-                   strcpy(ptr, "CAR&SET");
-                   goto reference;
-               case XBC_CDR_SET:
-                   strcpy(ptr, "CDR&SET");
-                   goto reference;
-               case XBC_SET:
-                   strcpy(ptr, "SET");
-                   goto reference;
-               case XBC_SETSYM:
-                   strcpy(ptr, "SETSYM");
-                   goto symbol;
-               case XBC_SET_NIL:
-                   strcpy(ptr, "SET NIL");
-                   goto reference;
-               case XBC_CALL:
-                   strcpy(ptr, "CALL");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " %d", (int)(*stream++));
-                   offsets[j++] = &bui0;
-                   goto offset;
-               case XBC_CALL_SET:
-                   strcpy(ptr, "CALL&SET");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " %d", (int)(*stream++));
-                   offsets[j++] = &bui0;
-                   goto offset_reference;
-               case XBC_BYTECALL:
-                   strcpy(ptr, "BYTECALL");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " %d", (int)(*stream++));
-                   offsets[j++] = &byt0;
-                   goto offset;
-               case XBC_FUNCALL:
-                   strcpy(ptr, "FUNCALL");
-constant_constant:
-                   offsets[j++] = &con0;
-                   offsets[j++] = &con1;
-                   goto offset_offset;
-               case XBC_CCONS:
-                   strcpy(ptr, "CCONS");
-                   goto constant_constant;
-               case XBC_CSTAR: strcpy(ptr, "CSTAR");   break;
-               case XBC_CFINI: strcpy(ptr, "CFINI");   break;
-               case XBC_LSTAR: strcpy(ptr, "LSTAR");   break;
-               case XBC_LCONS: strcpy(ptr, "LCONS");   break;
-               case XBC_LFINI: strcpy(ptr, "LFINI");   break;
-               case XBC_BCONS: strcpy(ptr, "BCONS");   break;
-               case XBC_BCONS1:        case XBC_BCONS2:        case XBC_BCONS3:
-               case XBC_BCONS4:        case XBC_BCONS5:        case XBC_BCONS6:
-               case XBC_BCONS7:
-                   strcpy(ptr, "BCONS");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, "%d", (int)(stream[-1] - XBC_BCONS));
-                   break;
-               case XBC_JUMP:
-                   strcpy(ptr, "JUMP");
-integer:
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " %d", *(signed short*)stream);
-                   stream += sizeof(short);
-                   break;
-               case XBC_JUMPT:
-                   strcpy(ptr, "JUMPT");
-                   goto integer;
-               case XBC_JUMPNIL:
-                   strcpy(ptr, "JUMPNIL");
-                   goto integer;
-               case XBC_LETREC:
-                   strcpy(ptr, "LETREC");
-                   ptr += strlen(ptr);
-                   sprintf(ptr, " %d", (int)*stream++);
-                   break;
-               case XBC_RETURN:
-                   strcpy(ptr, "RETURN");
-                   done = 1;
-                   break;
-           }
-           i = ptr - buffer + strlen(ptr);
-           LispWriteStr(NIL, buffer, i);
-           if (j) {
-
-               /* Pad */
-               LispWriteChars(NIL, ' ', 28 - i);
-               LispWriteChar(NIL, ';');
-
-               ptr = buffer;
-
-               /* Structure */
-               if (strf >= 0) {
-                   /* strd is valid if strf set */
-                   LispObj *fields = constants[strd];
-
-                   for (; strf >= 0; strf--)
-                       fields = CDR(fields);               
-                   strcpy(ptr, "  ");      ptr += 2;
-                   strcpy(ptr, CAR(fields)->data.atom->key->value);
-                   ptr += strlen(ptr);
-               }
-               if (strd >= 0) {
-                   strcpy(ptr, "  ");          ptr += 2;
-                   strcpy(ptr, STROBJ(CAR(constants[strd])));
-                   ptr += strlen(ptr);
-               }
-
-               /* Constants */
-               if (con0 >= 0) {
-                   strcpy(ptr, "  ");  ptr += 2;
-                   strcpy(ptr, STROBJ(constants[con0]));
-                   ptr += strlen(ptr);
-                   if (con1 >= 0) {
-                       strcpy(ptr, "  ");      ptr += 2;
-                       strcpy(ptr, STROBJ(constants[con1]));
-                       ptr += strlen(ptr);
-                   }
-               }
-
-               /* Builtin */
-               if (bui0 >= 0) {
-                   strcpy(ptr, "  ");  ptr += 2;
-                   strcpy(ptr, STROBJ(builtins[bui0]->symbol));
-                   ptr += strlen(ptr);
-               }
-
-               /* Bytecode */
-               if (byt0 >= 0) {
-                   strcpy(ptr, "  ");  ptr += 2;
-                   strcpy(ptr, STROBJ(names[byt0]));
-                   ptr += strlen(ptr);
-               }
-
-               /* Symbols */
-               if (sym0 >= 0) {
-                   strcpy(ptr, "  ");  ptr += 2;
-                   strcpy(ptr, XSTRING(symbols[sym0]->key));
-                   ptr += strlen(ptr);
-                   if (sym1 >= 0) {
-                       strcpy(ptr, "  ");      ptr += 2;
-                       strcpy(ptr, XSTRING(symbols[sym1]->key));
-                       ptr += strlen(ptr);
-                   }
-               }
-
-               i = ptr - buffer;
-               LispWriteStr(NIL, buffer, i);
-           }
-           LispWriteChar(NIL, '\n');
-           continue;
-predicate:
-           switch (*stream++) {
-               case XBP_CONSP:     strcpy(ptr, "CONSP");   break;
-               case XBP_LISTP:     strcpy(ptr, "LISTP");   break;
-               case XBP_NUMBERP:   strcpy(ptr, "NUMBERP"); break;
-           }
-           LispWriteStr(NIL, buffer, ptr - buffer + strlen(ptr));
-           LispWriteChar(NIL, '\n');
-       }
-#undef XSTRING
-    }
-
-    return (function);
-}
-
-
-
-LispObj *
-LispCompileForm(LispObj *form)
-{
-    GC_ENTER();
-    int failed;
-    LispCom com;
-
-    if (!CONSP(form))
-       /* Incorrect call or NIL */
-       return (form);
-
-    memset(&com, 0, sizeof(LispCom));
-
-    com.toplevel = com.block = LispCalloc(1, sizeof(CodeBlock));
-    com.block->type = LispBlockNone;
-    com.lex = lisp__data.env.lex;
-
-    com.plist = CONS(NIL, NIL);
-    GC_PROTECT(com.plist);
-
-    failed = 1;
-    if (setjmp(com.jmp) == 0) {
-       for (; CONSP(form); form = CDR(form)) {
-           com.form = form;
-           ComEval(&com, CAR(form));
-       }
-       failed = 0;
-    }
-    GC_LEAVE();
-
-    return (failed ? NIL : MakeBytecodeObject(&com, NIL, NIL));
-}
-
-LispObj *
-LispExecuteBytecode(LispObj *object)
-{
-    if (!BYTECODEP(object))
-       return (EVAL(object));
-
-    return (ExecuteBytecode(object->data.bytecode.bytecode->code));
-}
-
-static LispObj *
-MakeBytecodeObject(LispCom *com, LispObj *name, LispObj *plist)
-{
-    LispObj *object;
-    LispBytecode *bytecode;
-
-    GC_ENTER();
-    unsigned char *stream;
-    short i, num_constants;
-    LispObj **constants, *code, *cons, *prev;
-
-    /* Resolve dependencies, optimize and create byte stream */
-    LinkBytecode(com);
-
-    object = LispNew(NIL, NIL);
-    GC_PROTECT(object);
-    bytecode = LispMalloc(sizeof(LispBytecode));
-    bytecode->code = com->bytecode;
-    bytecode->length = com->length;
-
-
-    stream = bytecode->code;
-
-    /* Skip stack information */
-    stream += sizeof(short) * 3;
-
-    /* Get information */
-    num_constants = *(short*)stream;
-    stream += sizeof(short) * 4;
-    constants = (LispObj**)stream;
-
-    GC_PROTECT(plist);
-    code = cons = prev = NIL;
-    for (i = 0; i < num_constants; i++) {
-       if (POINTERP(constants[i]) && !XSYMBOLP(constants[i])) {
-           if (code == NIL) {
-               code = cons = prev = CONS(constants[i], NIL);
-               GC_PROTECT(code);
-           }
-           else {
-               RPLACD(cons, CONS(constants[i], NIL));
-               prev = cons;
-               cons = CDR(cons);
-           }
-       }
-    }
-
-    /* Protect this in case the function is redefined */
-    for (i = 0; i < com->table.num_bytecodes; i++) {   
-       if (code == NIL) {
-           code = cons = prev = CONS(com->table.bytecodes[i], NIL);
-           GC_PROTECT(code);
-       }
-       else {
-           RPLACD(cons, CONS(com->table.bytecodes[i], NIL));
-           prev = cons;
-           cons = CDR(cons);
-       }
-    }
-
-    /* Free everything, but the LispCom structure and the generated bytecode */
-    CompileFreeState(com);
-    
-    /* Allocate the minimum required number of cons cells to protect objects */
-    if (!CONSP(code))
-       code = plist;
-    else if (CONSP(plist)) {
-       if (code == cons)
-           RPLACD(code, plist);
-       else
-           RPLACD(cons, plist);
-    }
-    else {
-       if (code == cons)
-           code = CAR(code);
-       else
-           CDR(prev) = CAR(cons);
-    }
-
-    object->data.bytecode.bytecode = bytecode;
-    /* Byte code references this object, so it cannot be garbage collected */
-    object->data.bytecode.code = code;
-    object->data.bytecode.name = name;
-    object->type = LispBytecode_t;
-
-    LispMused(bytecode);
-    LispMused(bytecode->code);
-    GC_LEAVE();
-
-    return (object);
-}
-
-static void
-CompileFreeTree(CodeTree *tree)
-{
-    if (tree->type == CodeTreeBlock)
-       CompileFreeBlock(tree->data.block);
-    LispFree(tree);
-}
-
-static void
-CompileFreeBlock(CodeBlock *block)
-{
-    CodeTree *tree = block->tree, *next;
-
-    while (tree) {
-       next = tree->next;
-       CompileFreeTree(tree);
-       tree = next;
-    }
-    if (block->type == LispBlockBody) {
-       LispFree(block->tagbody.labels);
-       LispFree(block->tagbody.codes);
-    }
-    LispFree(block->variables.symbols);
-    LispFree(block->variables.flags);
-    LispFree(block);
-}
-
-static void
-CompileFreeState(LispCom *com)
-{
-    CompileFreeBlock(com->block);
-    LispFree(com->table.constants);
-    LispFree(com->table.symbols);
-    LispFree(com->table.builtins);
-    LispFree(com->table.bytecodes);
-}
-
-/* XXX Put a breakpoint here when changing the macro expansion code.
- *     No opcodes should be generated during macro expansion. */
-static CodeTree *
-CompileNewTree(LispCom *com, CodeTreeType type)
-{
-    CodeTree *tree = LispMalloc(sizeof(CodeTree));
-
-    tree->type = type;
-    tree->next = NULL;
-    tree->block = com->block;
-    if (com->block->tree == NULL)
-       com->block->tree = tree;
-    else
-       com->block->tail->next = tree;
-    com->block->tail = tree;
-
-    return (tree);
-}
-
-static void
-CompileIniBlock(LispCom *com, LispBlockType type, LispObj *tag)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBlock);
-    CodeBlock *block = LispCalloc(1, sizeof(CodeBlock));
-
-    tree->data.block = block;
-
-    block->type = type;
-    block->tag = tag;
-    block->prev = com->block;
-    block->parent = tree;
-    block->level = com->level;
-    com->block = block;
-
-    if (type == LispBlockBody)
-       com->tagbody = com->level;
-}
-
-static void
-CompileFiniBlock(LispCom *com)
-{
-    com->block = com->block->prev;
-    if (com->block && com->block->type == LispBlockBody)
-       com->tagbody = com->block->level;
-}
-
-static void
-com_BytecodeChar(LispCom *com, LispByteOpcode code, char value)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = code;
-    tree->data.signed_char = value;
-}
-
-static void
-com_BytecodeShort(LispCom *com, LispByteOpcode code, short value)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = code;
-    tree->data.signed_short = value;
-}
-
-static void
-com_BytecodeAtom(LispCom *com, LispByteOpcode code, LispAtom *atom)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = code;
-    tree->data.atom = atom;
-}
-
-static void
-com_BytecodeObject(LispCom *com, LispByteOpcode code, LispObj *object)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = code;
-    tree->data.object = object;
-}
-
-static void
-com_BytecodeCons(LispCom *com, LispByteOpcode code, LispObj *car, LispObj *cdr)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = code;
-    tree->data.cons.car = car;
-    tree->data.cons.cdr = cdr;
-}
-
-static void
-com_Bytecode(LispCom *com, LispByteOpcode code)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = code;
-}
-
-static void
-com_Load(LispCom *com, short offset)
-{
-    com_BytecodeShort(com, XBC_LOAD, offset);
-}
-
-static void
-com_LoadLet(LispCom *com, short offset, LispAtom *name)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = XBC_LOAD_LET;
-    tree->data.let.offset = offset;
-    tree->data.let.name = name;
-}
-
-static void
-com_LoadPush(LispCom *com, short offset)
-{
-    com_BytecodeShort(com, XBC_LOAD_PUSH, offset);
-}
-
-static void
-com_Let(LispCom *com, LispAtom *name)
-{
-    com_BytecodeAtom(com, XBC_LET, name);
-}
-
-static void
-com_Bind(LispCom *com, short count)
-{
-    if (count)
-       com_BytecodeShort(com, XBC_LETBIND, count);
-}
-
-static void
-com_Unbind(LispCom *com, short count)
-{
-    if (count)
-       com_BytecodeShort(com, XBC_UNLET, count);
-}
-
-static void
-com_LoadSym(LispCom *com, LispAtom *atom)
-{
-    com_BytecodeAtom(com, XBC_LOADSYM, atom);
-}
-
-static void
-com_LoadSymLet(LispCom *com, LispAtom *symbol, LispAtom *name)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = XBC_LOADSYM_LET;
-    tree->data.let_sym.symbol = symbol;
-    tree->data.let_sym.name = name;
-}
-
-static void
-com_LoadSymPush(LispCom *com, LispAtom *name)
-{
-    com_BytecodeAtom(com, XBC_LOADSYM_PUSH, name);
-}
-
-static void
-com_LoadCon(LispCom *com, LispObj *constant)
-{
-    if (constant == NIL)
-       com_Bytecode(com, XBC_NIL);
-    else if (constant == T)
-       com_Bytecode(com, XBC_T);
-    else if (constant == UNSPEC) {
-       COMPILE_FAILURE("internal error: loading #<UNSPEC>");
-    }
-    else
-       com_BytecodeObject(com, XBC_LOADCON, constant);
-}
-
-static void
-com_LoadConLet(LispCom *com, LispObj *constant, LispAtom *name)
-{
-    if (constant == NIL)
-       com_BytecodeAtom(com, XBC_LET_NIL, name);
-    else {
-       CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-       tree->code = XBC_LOADCON_LET;
-       tree->data.let_con.object = constant;
-       tree->data.let_con.name = name;
-    }
-}
-
-static void
-com_LoadConPush(LispCom *com, LispObj *constant)
-{
-    if (constant == NIL)
-       com_Bytecode(com, XBC_PUSH_NIL);
-    else if (constant == T)
-       com_Bytecode(com, XBC_PUSH_T);
-    else if (constant == UNSPEC)
-       com_Bytecode(com, XBC_PUSH_UNSPEC);
-    else
-       com_BytecodeObject(com, XBC_LOADCON_PUSH, constant);
-}
-
-static void
-com_Set(LispCom *com, short offset)
-{
-    com_BytecodeShort(com, XBC_SET, offset);
-}
-
-static void
-com_SetSym(LispCom *com, LispAtom *symbol)
-{
-    com_BytecodeAtom(com, XBC_SETSYM, symbol);
-}
-
-static void
-com_Struct(LispCom *com, short offset, LispObj *definition)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = XBC_STRUCT;
-    tree->data.struc.offset = offset;
-    tree->data.struc.definition = definition;
-}
-
-static void
-com_Structp(LispCom *com, LispObj *definition)
-{
-    com_BytecodeObject(com, XBC_STRUCTP, definition);
-}
-
-static void
-com_Call(LispCom *com, unsigned char num_arguments, LispBuiltin *builtin)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = XBC_CALL;
-    tree->data.builtin.num_arguments = num_arguments;
-    tree->data.builtin.builtin = builtin;
-}
-
-static void
-com_Bytecall(LispCom *com, unsigned char num_arguments, LispObj *code)
-{
-    CodeTree *tree = NEW_TREE(CodeTreeBytecode);
-
-    tree->code = XBC_BYTECALL;
-    tree->data.bytecall.num_arguments = num_arguments;
-    tree->data.bytecall.code = code;
-}
-
-static void
-com_Funcall(LispCom *com, LispObj *function, LispObj *arguments)
-{
-    com_BytecodeCons(com, XBC_FUNCALL, function, arguments);
-}
-
-static void
-CompileStackEnter(LispCom *com, int count, int builtin)
-{
-    if (!com->macro) {
-       if (builtin) {
-           com->stack.cbstack += count;
-           if (com->stack.bstack < com->stack.cbstack)
-               com->stack.bstack = com->stack.cbstack;
-       }
-       else {
-           com->stack.cstack += count;
-           if (com->stack.stack < com->stack.cstack)
-               com->stack.stack = com->stack.cstack;
-       }
-    }
-}
-
-static void
-CompileStackLeave(LispCom *com, int count, int builtin)
-{
-    if (!com->macro) {
-       if (builtin)
-           com->stack.cbstack -= count;
-       else
-           com->stack.cstack -= count;
-    }
-}
-
-static void
-LinkWarnUnused(LispCom *com, CodeBlock *block)
-{
-    int i;
-    CodeTree *tree;
-
-    for (tree = block->tree; tree; tree = tree->next) {
-       if (tree->type == CodeTreeBlock)
-           LinkWarnUnused(com, tree->data.block);
-    }
-
-    for (i = 0; i < block->variables.length; i++)
-       if (!(block->variables.flags[i] & (VARIABLE_USED | VARIABLE_ARGUMENT))) {
-           ++com->warnings;
-           LispWarning("the variable %s is unused",
-                       block->variables.symbols[i]->key->value);
-       }
-}
-
-#define        INTERNAL_ERROR_STRING "COMPILE: internal error #%d"
-#define        INTERNAL_ERROR(value) LispDestroy(INTERNAL_ERROR_STRING, value)
-static long
-LinkBuildOffsets(LispCom *com, CodeTree *tree, long offset)
-{
-    for (; tree; tree = tree->next) {
-       tree->offset = offset;
-       switch (tree->type) {
-           case CodeTreeBytecode:
-               switch (tree->code) {
-                   case XBC_NOOP:
-                       INTERNAL_ERROR(__LINE__);
-                       break;
-
-                   /* byte */
-                   case XBC_BCONS:
-                   case XBC_BCONS1:
-                   case XBC_BCONS2:
-                   case XBC_BCONS3:
-                   case XBC_BCONS4:
-                   case XBC_BCONS5:
-                   case XBC_BCONS6:
-                   case XBC_BCONS7:
-                   case XBC_INV:
-                   case XBC_NIL:
-                   case XBC_T:
-                   case XBC_PUSH:
-                   case XBC_CAR_PUSH:
-                   case XBC_CDR_PUSH:
-                   case XBC_PUSH_NIL:
-                   case XBC_PUSH_UNSPEC:
-                   case XBC_PUSH_T:
-                   case XBC_LSTAR:
-                   case XBC_LCONS:
-                   case XBC_LFINI:
-                   case XBC_RETURN:
-                   case XBC_CSTAR:
-                   case XBC_CFINI:
-                   case XBC_CAR:
-                   case XBC_CDR:
-                   case XBC_RPLACA:
-                   case XBC_RPLACD:
-                   case XBC_EQ:
-                   case XBC_EQL:
-                   case XBC_EQUAL:
-                   case XBC_EQUALP:
-                   case XBC_LENGTH:
-                   case XBC_LAST:
-                   case XBC_NTHCDR:
-                       ++offset;
-                       break;
-
-                   /* byte + byte */
-                   case XBC_PUSH_NIL_N:
-                   case XBC_PUSH_UNSPEC_N:
-                   case XBC_PRED:
-                   case XBC_LETREC:
-                   case XBC_LOAD_PUSH:
-                   case XBC_CAR_SET:
-                   case XBC_CDR_SET:
-                   case XBC_SET:
-                   case XBC_SET_NIL:
-                   case XBC_LETBIND:
-                   case XBC_UNLET:
-                   case XBC_LOAD:
-                   case XBC_LOAD_CAR:
-                   case XBC_LOAD_CDR:
-                   case XBC_LOAD_CAR_STORE:
-                   case XBC_LOAD_CDR_STORE:
-                   case XBC_LET:
-                   case XBC_LETX:
-                   case XBC_LET_NIL:
-                   case XBC_LETX_NIL:
-                   case XBC_STRUCTP:
-                   case XBC_SETSYM:
-                   case XBC_LOADCON_PUSH:
-                   case XBC_LOADSYM_PUSH:
-                   case XBC_LOADCON:
-                   case XBC_LOADSYM:
-                       offset += 2;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_CALL:
-                   case XBC_BYTECALL:
-                   case XBC_LOAD_SET:
-                   case XBC_LOAD_CAR_SET:
-                   case XBC_LOAD_CDR_SET:
-                   case XBC_LOADCON_SET:
-                   case XBC_LOAD_LET:
-                   case XBC_LOAD_LETX:
-                   case XBC_STRUCT:
-                   case XBC_LOADCON_LET:
-                   case XBC_LOADCON_LETX:
-                   case XBC_LOADSYM_LET:
-                   case XBC_LOADSYM_LETX:
-                   case XBC_CCONS:
-                   case XBC_FUNCALL:
-                       offset += 3;
-                       break;
-
-                   /* byte + short */
-                   case XBC_JUMP:
-                   case XBC_JUMPT:
-                   case XBC_JUMPNIL:
-                       /* XXX this is likely a jump to random address here */
-                       INTERNAL_ERROR(__LINE__);
-                       offset += sizeof(short) + 1;
-                       break;
-
-                   /* byte + byte + byte + byte */
-                   case XBC_CALL_SET:
-                       offset += 4;
-                       break;
-               }
-               break;
-           case CodeTreeLabel:
-               /* Labels are not loaded */
-               break;
-           case CodeTreeJump:
-           case CodeTreeJumpIf:
-           case CodeTreeCond:
-               /* If not the point where the conditional block finishes */
-               if (tree->code != XBC_NOOP)
-                   /* Reserve space for the jump opcode */
-                   offset += sizeof(short) + 1;
-               break;
-           case CodeTreeGo:
-           case CodeTreeReturn:
-               /* Reserve space for the jump opcode */
-               offset += sizeof(short) + 1;
-               break;
-           case CodeTreeBlock:
-               offset = LinkBuildOffsets(com, tree->data.block->tree, offset);
-               break;
-       }
-    }
-
-    return (offset);
-}
-
-static void
-LinkDoOptimize_0(LispCom *com, CodeBlock *block)
-{
-    CodeTree *tree, *prev, *next;
-
-    /*  Remove redundant or join opcodes that can be joined. Do it here
-     * because some of these are hard to detect earlier, and/or would
-     * require a lot of duplicated code or more time. */
-    tree = prev = block->tree;
-    while (tree) {
-       next = tree->next;
-
-       /* LET -> LET* */
-       if (next &&
-           next->type == CodeTreeBytecode &&
-           next->code == XBC_LETBIND &&
-           next->data.signed_short == 1) {
-           switch (tree->code) {
-               case XBC_LET:
-                   tree->code = XBC_LETX;
-                   goto remove_next_label;
-               case XBC_LET_NIL:
-                   tree->code = XBC_LETX_NIL;
-                   goto remove_next_label;
-               case XBC_LOAD_LET:
-                   tree->code = XBC_LOAD_LETX;
-                   goto remove_next_label;
-               case XBC_LOADCON_LET:
-                   tree->code = XBC_LOADCON_LETX;
-                   goto remove_next_label;
-               case XBC_LOADSYM_LET:
-                   tree->code = XBC_LOADSYM_LETX;
-                   goto remove_next_label;
-               default:
-                   break;
-           }
-       }
-
-       switch (tree->type) {
-           case CodeTreeBytecode:
-               switch (tree->code) {
-                   case XBC_LOADCON:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_LET:
-                                   next->code = XBC_LOADCON_LET;
-                                   next->data.let_con.name =
-                                       next->data.atom;
-                                   next->data.let_con.object =
-                                       tree->data.object;
-                                   goto remove_label;
-                               case XBC_PUSH:
-                                   next->code = XBC_LOADCON_PUSH;
-                                   next->data.object = tree->data.object;
-                                   goto remove_label;
-                               case XBC_CAR:
-                                   if (tree->data.object != NIL) {
-                                       if (!CONSP(tree->data.object))
-                                           LispDestroy("CAR: %s is not a list",
-                                                       STROBJ(
-                                                       tree->data.object));
-                                       next->code = XBC_LOADCON;
-                                       next->data.object =
-                                           CAR(tree->data.object);
-                                   }
-                                   goto remove_label;
-                               case XBC_CDR:
-                                   if (tree->data.object != NIL) {
-                                       if (!CONSP(tree->data.object))
-                                           LispDestroy("CAR: %s is not a list",
-                                                       STROBJ(
-                                                       tree->data.object));
-                                       next->code = XBC_LOADCON;
-                                       next->data.object =
-                                           CDR(tree->data.object);
-                                   }
-                                   goto remove_label;
-                               case XBC_SET:
-                                   next->code = XBC_LOADCON_SET;
-                                   next->data.load_con_set.offset =
-                                       next->data.signed_short;
-                                   next->data.load_con_set.object =
-                                       tree->data.object;
-                                   goto remove_label;
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_LOADSYM:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_LET:
-                                   next->code = XBC_LOADSYM_LET;
-                                   next->data.let_sym.name =
-                                       next->data.atom;
-                                   next->data.let_sym.symbol =
-                                       tree->data.atom;
-                                   goto remove_label;
-                               case XBC_PUSH:
-                                   next->code = XBC_LOADSYM_PUSH;
-                                   next->data.atom = tree->data.atom;
-                                   goto remove_label;
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_LOAD:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_SET:
-                                   next->code = XBC_LOAD_SET;
-                                   next->data.load_set.set =
-                                       next->data.signed_short;
-                                   next->data.load_set.load =
-                                       tree->data.signed_short;
-                                   goto remove_label;
-                               /* TODO add XBC_LOAD_SETSYM */
-                               case XBC_CAR:
-                                   next->code = XBC_LOAD_CAR;
-                                   next->data.signed_short =
-                                       tree->data.signed_short;
-                                   goto remove_label;
-                               case XBC_CDR:
-                                   next->code = XBC_LOAD_CDR;
-                                   next->data.signed_short =
-                                       tree->data.signed_short;
-                                   goto remove_label;
-                               case XBC_PUSH:
-                                   tree->code = XBC_LOAD_PUSH;
-                                   goto remove_next_label;
-                               case XBC_LET:
-                                   next->code = XBC_LOAD_LET;
-                                   next->data.let.name = next->data.atom;
-                                   next->data.let.offset =
-                                       tree->data.signed_short;
-                                   goto remove_label;
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_LOAD_CAR:
-                       if (next && next->type == CodeTreeBytecode &&
-                           next->code == XBC_SET) {
-                           if (next->data.signed_short ==
-                               tree->data.signed_short)
-                               next->code = XBC_LOAD_CAR_STORE;
-                           else {
-                               next->code = XBC_LOAD_CAR_SET;
-                               next->data.load_set.set =
-                                   next->data.signed_short;
-                               next->data.load_set.load =
-                                   tree->data.signed_short;
-                           }
-                           goto remove_label;
-                       }
-                       break;
-                   case XBC_LOAD_CDR:
-                       if (next && next->type == CodeTreeBytecode &&
-                           next->code == XBC_SET) {
-                           if (next->data.signed_short ==
-                               tree->data.signed_short)
-                               next->code = XBC_LOAD_CDR_STORE;
-                           else {
-                               next->code = XBC_LOAD_CDR_SET;
-                               next->data.load_set.set =
-                                   next->data.signed_short;
-                               next->data.load_set.load =
-                                   tree->data.signed_short;
-                           }
-                           goto remove_label;
-                       }
-                       break;
-                   case XBC_CALL:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_SET:
-                                   next->code = XBC_CALL_SET;
-                                   next->data.builtin.offset =
-                                       next->data.signed_short;
-                                   next->data.builtin.num_arguments =
-                                       tree->data.builtin.num_arguments;
-                                   next->data.builtin.builtin =
-                                       tree->data.builtin.builtin;
-                                   goto remove_label;
-                               /* TODO add XBC_CALL_SETSYM */
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_CAR:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_SET:
-                                   next->code = XBC_CAR_SET;
-                                   goto remove_label;
-                               /* TODO add XBC_CAR_SETSYM */
-                               case XBC_PUSH:
-                                   next->code = XBC_CAR_PUSH;
-                                   goto remove_label;
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_CDR:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_SET:
-                                   next->code = XBC_CDR_SET;
-                                   goto remove_label;
-                               /* TODO add XBC_CDR_SETSYM */
-                               case XBC_PUSH:
-                                   next->code = XBC_CDR_PUSH;
-                                   goto remove_label;
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_NIL:
-                       if (next && next->type == CodeTreeBytecode) {
-                           switch (next->code) {
-                               case XBC_SET:
-                                   next->code = XBC_SET_NIL;
-                                   goto remove_label;
-                               /* TODO add XBC_SETSYM_NIL */
-                               default:
-                                   break;
-                           }
-                       }
-                       break;
-                   case XBC_PUSH_NIL:
-                       if (next && next->type == CodeTreeBytecode &&
-                           next->code == XBC_PUSH_NIL) {
-                           next->code = XBC_PUSH_NIL_N;
-                           next->data.signed_char = 2;
-                           goto remove_label;
-                       }
-                       break;
-                   case XBC_PUSH_NIL_N:
-                       if (next && next->type == CodeTreeBytecode &&
-                           next->code == XBC_PUSH_NIL) {
-                           next->code = XBC_PUSH_NIL_N;
-                           next->data.signed_char = tree->data.signed_char + 1;
-                           goto remove_label;
-                       }
-                       break;
-                   case XBC_PUSH_UNSPEC:
-                       if (next && next->type == CodeTreeBytecode &&
-                           next->code == XBC_PUSH_UNSPEC) {
-                           next->code = XBC_PUSH_UNSPEC_N;
-                           next->data.signed_char = 2;
-                           goto remove_label;
-                       }
-                       break;
-                   case XBC_PUSH_UNSPEC_N:
-                       if (next && next->type == CodeTreeBytecode &&
-                           next->code == XBC_PUSH_UNSPEC) {
-                           next->code = XBC_PUSH_UNSPEC_N;
-                           next->data.signed_char = tree->data.signed_char + 1;
-                           goto remove_label;
-                       }
-                       break;
-                   default:
-                       break;
-               }
-               break;
-           case CodeTreeBlock:
-               LinkDoOptimize_0(com, tree->data.block);
-               break;
-           default:
-               break;
-       }
-       goto update_label;
-remove_label:
-       if (tree == block->tree) {
-           block->tree = prev = next;
-           if (tree == block->tail)
-               block->tail = tree;
-       }
-       else
-           prev->next = next;
-       CompileFreeTree(tree);
-       tree = next;
-       continue;
-remove_next_label:
-       tree->next = next->next;
-       CompileFreeTree(next);
-       continue;
-update_label:
-       prev = tree;
-       tree = tree->next;
-    }
-}
-
-static void
-LinkOptimize_0(LispCom *com)
-{
-    /* Recursive */
-    LinkDoOptimize_0(com, com->block);
-}
-
-static void
-LinkResolveLabels(LispCom *com, CodeBlock *block)
-{
-    int i;
-    CodeTree *tree = block->tree;
-
-    for (; tree; tree = tree->next) {
-       if (tree->type == CodeTreeBlock)
-           LinkResolveLabels(com, tree->data.block);
-       else if (tree->type == CodeTreeLabel) {
-           for (i = 0; i < block->tagbody.length; i++)
-               if (tree->data.object == block->tagbody.labels[i]) {
-                   block->tagbody.codes[i] = tree;
-                   break;
-               }
-       }
-    }
-}
-
-static void
-LinkResolveJumps(LispCom *com, CodeBlock *block)
-{
-    int i;
-    CodeBlock *body = block;
-    CodeTree *ptr, *tree = block->tree;
-
-    /* Check if there is a tagbody. Error checking already done */
-    while (body && body->type != LispBlockBody)
-       body = body->prev;
-
-    for (; tree; tree = tree->next) {
-       switch (tree->type) {
-           case CodeTreeBytecode:
-           case CodeTreeLabel:
-               break;
-
-           case CodeTreeBlock:
-               LinkResolveJumps(com, tree->data.block);
-               break;
-
-           case CodeTreeGo:
-               for (i = 0; i < body->tagbody.length; i++)
-                   if (tree->data.object == body->tagbody.labels[i])
-                       break;
-               if (i == body->tagbody.length)
-                   LispDestroy("COMPILE: no visible tag %s to GO",
-                               STROBJ(tree->data.object));
-               /* Now the jump code is known */
-               tree->data.tree = body->tagbody.codes[i];
-               break;
-
-           case CodeTreeCond:
-               if (tree->code == XBC_JUMPNIL)
-                   /* If test is NIL, go to next test */
-                   tree->data.tree = tree->group->next;
-               else if (tree->code == XBC_JUMPT) {
-                   /* After executing code, test was T */
-                   for (ptr = tree->group;
-                        ptr->code != XBC_NOOP;
-                        ptr = ptr->group)
-                       ;
-                   tree->data.tree = ptr;
-               }
-               break;
-
-           case CodeTreeJumpIf:
-               if (tree->code != XBC_NOOP) {
-                   for (ptr = tree->group;
-                        ptr->code != XBC_NOOP;
-                        ptr = ptr->group) {
-                       if (ptr->type == CodeTreeJump) {
-                           /* ELSE code of IF */
-                           ptr = ptr->next;
-                           /* Skip inconditional jump node */
-                           break;
-                       }
-                   }
-                   tree->data.tree = ptr;
-               }
-               break;
-
-           case CodeTreeJump:
-               if (tree->code != XBC_NOOP)
-                   tree->data.tree = tree->group;
-               break;
-
-           case CodeTreeReturn:
-               /* One bytecode is guaranteed to exist in the code tree */
-               if (tree->data.block->parent == NULL)
-                   /* Returning from the function or toplevel form */
-                   tree->data.tree = tree->data.block->tail;
-               else {
-                   for (;;) {
-                       ptr = tree->data.block->parent->next;
-                       if (ptr) {
-                           tree->data.tree = ptr;
-                           break;
-                       }
-                       else
-                           /* Move one BLOCK up */
-                           tree->data.block = tree->data.block->prev;
-                   }
-               }
-               break;
-       }
-    }
-}
-
-static long
-LinkPad(long offset, long adjust, int preffix, int datalen)
-{
-    /* If byte or aligned data */
-    if (datalen <= preffix || ((offset + adjust + preffix) % datalen) == 0)
-       return (adjust);
-
-    return (adjust + (datalen - ((offset + adjust + preffix) % datalen)));
-}
-
-static long
-LinkFixupOffsets(LispCom *com, CodeTree *tree, long adjust)
-{
-    for (; tree; tree = tree->next) {
-       switch (tree->type) {
-           case CodeTreeBytecode:
-               switch (tree->code) {
-                   /* byte + short */
-                   case XBC_JUMP:
-                   case XBC_JUMPT:
-                   case XBC_JUMPNIL:
-                       adjust = LinkPad(tree->offset, adjust, 1,
-                                        sizeof(short));
-                       /*FALLTROUGH*/
-                   default:
-                       tree->offset += adjust;
-                       break;
-               }
-               break;
-           case CodeTreeLabel:
-               /* Labels are not loaded, just adjust offset */
-               tree->offset += adjust;
-               break;
-           case CodeTreeJump:
-           case CodeTreeCond:
-           case CodeTreeJumpIf:
-               /* If an opcode will be generated. */
-               if (tree->code != XBC_NOOP)
-                   adjust = LinkPad(tree->offset, adjust, 1, sizeof(short));
-               tree->offset += adjust;
-               break;
-           case CodeTreeGo:
-           case CodeTreeReturn:
-               adjust = LinkPad(tree->offset, adjust, 1, sizeof(short));
-               tree->offset += adjust;
-               break;
-           case CodeTreeBlock:
-               adjust = LinkFixupOffsets(com, tree->data.block->tree, adjust);
-               break;
-       }
-    }
-
-    return (adjust);
-}
-
-static void
-LinkSkipPadding(LispCom *com, CodeTree *tree)
-{
-    int found;
-    CodeTree *ptr;
-
-    /* Recurse to adjust forward jumps or jumps to the start of the block */
-    for (ptr = tree; ptr; ptr = ptr->next) {
-       if (ptr->type == CodeTreeBlock) {
-           LinkSkipPadding(com, ptr->data.block->tree);
-           ptr->offset = ptr->data.block->tree->offset;
-       }
-    }
-
-    /* Adjust the nodes offsets */
-    for (; tree; tree = tree->next) {
-       switch (tree->type) {
-           case CodeTreeBytecode:
-           case CodeTreeBlock:
-           case CodeTreeGo:
-           case CodeTreeReturn:
-               break;
-           case CodeTreeJump:
-           case CodeTreeCond:
-           case CodeTreeJumpIf:
-               if (tree->code != XBC_NOOP)
-                   /* If code will be generated */
-                   break;
-           case CodeTreeLabel:
-               /* This should be done in reversed order, but to avoid
-                * the requirement of a prev pointer, do the job in a
-                * harder way here. */
-               for (found = 0, ptr = tree->next; ptr; ptr = ptr->next) {
-                   switch (ptr->type) {
-                       case CodeTreeBytecode:
-                       case CodeTreeBlock:
-                       case CodeTreeGo:
-                       case CodeTreeReturn:
-                           found = 1;
-                           break;
-                       case CodeTreeJump:
-                       case CodeTreeCond:
-                       case CodeTreeJumpIf:
-                           if (ptr->code != XBC_NOOP)
-                               found = 1;
-                           break;
-                       case CodeTreeLabel:
-                           break;
-                   }
-                   if (found)
-                       break;
-               }
-               if (found)
-                   tree->offset = ptr->offset;
-               break;
-       }
-    }
-}
-
-static void
-LinkCalculateJump(LispCom *com, CodeTree *tree, LispByteOpcode code)
-{
-    long jumpto, offset, distance;
-
-    tree->type = CodeTreeBytecode;
-    /* After the opcode */
-    offset = tree->offset + 1;
-    jumpto = tree->data.tree->offset;
-    /* Effective distance */
-    distance = jumpto - offset;
-    tree->code = code;
-    if (distance < -32768 || distance > 32767) {
-       COMPILE_FAILURE("jump too long");
-    }
-    tree->data.signed_int = distance;
-}
-
-static void
-LinkFixupJumps(LispCom *com, CodeTree *tree)
-{
-    for (; tree; tree = tree->next) {
-       switch (tree->type) {
-           case CodeTreeBytecode:
-           case CodeTreeLabel:
-               break;
-           case CodeTreeCond:
-               if (tree->code == XBC_JUMPNIL)
-                   /* Go to next test if NIL */
-                   LinkCalculateJump(com, tree, XBC_JUMPNIL);
-               else if (tree->code == XBC_JUMPT)
-                   /* After executing T code */
-                   LinkCalculateJump(com, tree, XBC_JUMP);
-               break;
-           case CodeTreeJumpIf:
-               if (tree->code != XBC_NOOP)
-                   LinkCalculateJump(com, tree, tree->code);
-               break;
-           case CodeTreeGo:
-               /* Inconditional jump */
-               LinkCalculateJump(com, tree, XBC_JUMP);
-               break;
-           case CodeTreeReturn:
-               /* Inconditional jump */
-               if (tree->data.tree != tree)
-                   /* If need to skip something */
-                   LinkCalculateJump(com, tree, XBC_JUMP);
-               break;
-           case CodeTreeBlock:
-               LinkFixupJumps(com, tree->data.block->tree);
-               break;
-           case CodeTreeJump:
-               if (tree->code != XBC_NOOP)
-                   LinkCalculateJump(com, tree, tree->code);
-       }
-    }
-}
-
-static void
-LinkBuildTableSymbol(LispCom *com, LispAtom *symbol)
-{
-    if (BuildTablePointer(symbol, (void***)&com->table.symbols,
-                         &com->table.num_symbols) > 0xff) {
-       COMPILE_FAILURE("more than 256 symbols");
-    }
-}
-
-static void
-LinkBuildTableConstant(LispCom *com, LispObj *constant)
-{
-    if (BuildTablePointer(constant, (void***)&com->table.constants,
-                         &com->table.num_constants) > 0xff) {
-       COMPILE_FAILURE("more than 256 constants");
-    }
-}
-
-static void
-LinkBuildTableBuiltin(LispCom *com, LispBuiltin *builtin)
-{
-    if (BuildTablePointer(builtin, (void***)&com->table.builtins,
-                         &com->table.num_builtins) > 0xff) {
-       COMPILE_FAILURE("more than 256 functions");
-    }
-}
-
-static void
-LinkBuildTableBytecode(LispCom *com, LispObj *bytecode)
-{
-    if (BuildTablePointer(bytecode, (void***)&com->table.bytecodes,
-                         &com->table.num_bytecodes) > 0xff) {
-       COMPILE_FAILURE("more than 256 bytecode functions");
-    }
-}
-
-static void
-LinkBuildTables(LispCom *com, CodeBlock *block)
-{
-    CodeTree *tree;
-
-    for (tree = block->tree; tree; tree = tree->next) {
-       switch (tree->type) {
-           case CodeTreeBytecode:
-               switch (tree->code) {
-                   case XBC_LET:
-                   case XBC_LETX:
-                   case XBC_LET_NIL:
-                   case XBC_LETX_NIL:
-                   case XBC_SETSYM:
-                   case XBC_LOADSYM:
-                   case XBC_LOADSYM_PUSH:
-                       LinkBuildTableSymbol(com, tree->data.atom);
-                       break;
-                   case XBC_STRUCTP:
-                   case XBC_LOADCON:
-                   case XBC_LOADCON_PUSH:
-                       LinkBuildTableConstant(com, tree->data.object);
-                       break;
-                   case XBC_LOADCON_SET:
-                       LinkBuildTableConstant(com, tree->data.load_con_set.object);
-                       break;
-                   case XBC_CALL:
-                   case XBC_CALL_SET:
-                       LinkBuildTableBuiltin(com, tree->data.builtin.builtin);
-                       break;
-                   case XBC_BYTECALL:
-                       LinkBuildTableBytecode(com, tree->data.bytecall.code);
-                       break;
-                   case XBC_LOAD_LET:
-                   case XBC_LOAD_LETX:
-                       LinkBuildTableSymbol(com, tree->data.let.name);
-                       break;
-                   case XBC_STRUCT:
-                       LinkBuildTableConstant(com, tree->data.struc.definition);
-                       break;
-                   case XBC_LOADSYM_LET:
-                   case XBC_LOADSYM_LETX:
-                       LinkBuildTableSymbol(com, tree->data.let_sym.symbol);
-                       LinkBuildTableSymbol(com, tree->data.let_sym.name);
-                       break;
-                   case XBC_LOADCON_LET:
-                   case XBC_LOADCON_LETX:
-                       LinkBuildTableConstant(com, tree->data.let_con.object);
-                       LinkBuildTableSymbol(com, tree->data.let_con.name);
-                       break;
-                   case XBC_CCONS:
-                   case XBC_FUNCALL:
-                       LinkBuildTableConstant(com, tree->data.cons.car);
-                       LinkBuildTableConstant(com, tree->data.cons.cdr);
-                       break;
-                   default:
-                       break;
-               }
-               break;
-           case CodeTreeBlock:
-               LinkBuildTables(com, tree->data.block);
-               break;
-           default:
-               break;
-       }
-    }
-}
-
-static long
-LinkEmmitBytecode(LispCom *com, CodeTree *tree,
-                 unsigned char *bytecode, long offset)
-{
-    short i;
-
-    for (; tree; tree = tree->next) {
-       /* Fill padding */
-       while (offset < tree->offset)
-           bytecode[offset++] = XBC_NOOP;
-
-       switch (tree->type) {
-           case CodeTreeBytecode:
-               bytecode[offset++] = tree->code;
-               switch (tree->code) {
-                   /* Noop should not enter the CodeTree */
-                   case XBC_NOOP:
-                       INTERNAL_ERROR(__LINE__);
-                       break;
-
-                   /* byte */
-                   case XBC_BCONS:
-                   case XBC_BCONS1:
-                   case XBC_BCONS2:
-                   case XBC_BCONS3:
-                   case XBC_BCONS4:
-                   case XBC_BCONS5:
-                   case XBC_BCONS6:
-                   case XBC_BCONS7:
-                   case XBC_INV:
-                   case XBC_NIL:
-                   case XBC_T:
-                   case XBC_PUSH_NIL:
-                   case XBC_PUSH_UNSPEC:
-                   case XBC_PUSH_T:
-                   case XBC_CAR_PUSH:
-                   case XBC_CDR_PUSH:
-                   case XBC_PUSH:
-                   case XBC_LSTAR:
-                   case XBC_LCONS:
-                   case XBC_LFINI:
-                   case XBC_RETURN:
-                   case XBC_CSTAR:
-                   case XBC_CFINI:
-                   case XBC_CAR:
-                   case XBC_CDR:
-                   case XBC_RPLACA:
-                   case XBC_RPLACD:
-                   case XBC_EQ:
-                   case XBC_EQL:
-                   case XBC_EQUAL:
-                   case XBC_EQUALP:
-                   case XBC_LENGTH:
-                   case XBC_LAST:
-                   case XBC_NTHCDR:
-                       break;
-
-                   /* byte + byte */
-                   case XBC_LETREC:
-                   case XBC_PRED:
-                   case XBC_PUSH_NIL_N:
-                   case XBC_PUSH_UNSPEC_N:
-                       bytecode[offset++] = tree->data.signed_char;
-                       break;
-
-                   /* byte + byte */
-                   case XBC_CAR_SET:
-                   case XBC_CDR_SET:
-                   case XBC_SET:
-                   case XBC_SET_NIL:
-                   case XBC_LETBIND:
-                   case XBC_UNLET:
-                   case XBC_LOAD_PUSH:
-                   case XBC_LOAD:
-                   case XBC_LOAD_CAR:
-                   case XBC_LOAD_CDR:
-                   case XBC_LOAD_CAR_STORE:
-                   case XBC_LOAD_CDR_STORE:
-                       bytecode[offset++] = tree->data.signed_short;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_LOAD_SET:
-                   case XBC_LOAD_CAR_SET:
-                   case XBC_LOAD_CDR_SET:
-                       bytecode[offset++] = tree->data.load_set.load;
-                       bytecode[offset++] = tree->data.load_set.set;
-                       break;
-
-                   /* byte + short */
-                   case XBC_JUMP:
-                   case XBC_JUMPT:
-                   case XBC_JUMPNIL:
-                       *(short*)(bytecode + offset) = tree->data.signed_int;
-                       offset += sizeof(short);
-                       break;
-
-                   /* byte + byte */
-                   case XBC_LET:
-                   case XBC_LETX:
-                   case XBC_LET_NIL:
-                   case XBC_LETX_NIL:
-                   case XBC_SETSYM:
-                   case XBC_LOADSYM:
-                   case XBC_LOADSYM_PUSH:
-                       i = FindIndex(tree->data.atom,
-                                     (void**)com->table.symbols,
-                                     com->table.num_symbols);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte */
-                   case XBC_STRUCTP:
-                   case XBC_LOADCON:
-                   case XBC_LOADCON_PUSH:
-                       i = FindIndex(tree->data.object,
-                                     (void**)com->table.constants,
-                                     com->table.num_constants);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_LOADCON_SET:
-                       i = FindIndex(tree->data.load_con_set.object,
-                                     (void**)com->table.constants,
-                                     com->table.num_constants);
-                       bytecode[offset++] = i;
-                       bytecode[offset++] = tree->data.load_con_set.offset;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_CALL:
-                       bytecode[offset++] = tree->data.builtin.num_arguments;
-                       i = FindIndex(tree->data.builtin.builtin,
-                                     (void**)com->table.builtins,
-                                     com->table.num_builtins);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_BYTECALL:
-                       bytecode[offset++] = tree->data.bytecall.num_arguments;
-                       i = FindIndex(tree->data.bytecall.code,
-                                     (void**)com->table.bytecodes,
-                                     com->table.num_bytecodes);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte + byte */
-                   case XBC_CALL_SET:
-                       bytecode[offset++] = tree->data.builtin.num_arguments;
-                       i = FindIndex(tree->data.builtin.builtin,
-                                     (void**)com->table.builtins,
-                                     com->table.num_builtins);
-                       bytecode[offset++] = i;
-                       bytecode[offset++] = tree->data.builtin.offset;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_LOAD_LET:
-                   case XBC_LOAD_LETX:
-                       bytecode[offset++] = tree->data.let.offset;
-                       i = FindIndex(tree->data.let.name,
-                                     (void**)com->table.symbols,
-                                     com->table.num_symbols);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_STRUCT:
-                       bytecode[offset++] = tree->data.struc.offset;
-                       i = FindIndex(tree->data.struc.definition,
-                                     (void**)com->table.constants,
-                                     com->table.num_constants);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_LOADSYM_LET:
-                   case XBC_LOADSYM_LETX:
-                       i = FindIndex(tree->data.let_sym.symbol,
-                                     (void**)com->table.symbols,
-                                     com->table.num_symbols);
-                       bytecode[offset++] = i;
-                       i = FindIndex(tree->data.let_sym.name,
-                                     (void**)com->table.symbols,
-                                     com->table.num_symbols);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_LOADCON_LET:
-                   case XBC_LOADCON_LETX:
-                       i = FindIndex(tree->data.let_con.object,
-                                     (void**)com->table.constants,
-                                     com->table.num_constants);
-                       bytecode[offset++] = i;
-                       i = FindIndex(tree->data.let_con.name,
-                                     (void**)com->table.symbols,
-                                     com->table.num_symbols);
-                       bytecode[offset++] = i;
-                       break;
-
-                   /* byte + byte + byte */
-                   case XBC_CCONS:
-                   case XBC_FUNCALL:
-                       i = FindIndex(tree->data.cons.car,
-                                     (void**)com->table.constants,
-                                     com->table.num_constants);
-                       bytecode[offset++] = i;
-                       i = FindIndex(tree->data.cons.cdr,
-                                     (void**)com->table.constants,
-                                     com->table.num_constants);
-                       bytecode[offset++] = i;
-                       break;
-               }
-               break;
-           case CodeTreeLabel:
-               /* Labels are not loaded */
-               break;
-           case CodeTreeCond:
-           case CodeTreeJump:
-           case CodeTreeJumpIf:
-               if (tree->code != XBC_NOOP)
-                   INTERNAL_ERROR(__LINE__);
-               break;
-           case CodeTreeGo:
-               INTERNAL_ERROR(__LINE__);
-               break;
-           case CodeTreeReturn:
-               if (tree->data.tree != tree)
-                   INTERNAL_ERROR(__LINE__);
-               break;
-           case CodeTreeBlock:
-               offset = LinkEmmitBytecode(com, tree->data.block->tree,
-                                          bytecode, offset);
-               break;
-       }
-    }
-
-    return (offset);
-}
-
-static void
-LinkBytecode(LispCom *com)
-{
-    long offset, count;
-    unsigned char **codes;
-    LispObj **names;
-
-    /* Close bytecode */
-    com_Bytecode(com, XBC_RETURN);
-
-    /* The only usage of this information for now, and still may generate
-     * false positives because arguments to unamed functions are not being
-     * parsed as well as arguments to yet undefined function/maros.
-     * XXX should also add declaim/declare to let the code specify that
-     * the argument is unused */
-    LinkWarnUnused(com, com->block);
-
-    /* First level optimization */
-    LinkOptimize_0(com);
-
-    /* Resolve tagbody labels */
-    LinkResolveLabels(com, com->block);
-
-    /* Resolve any pending jumps */
-    LinkResolveJumps(com, com->block);
-
-    /* Calculate unpadded offsets */
-    LinkBuildOffsets(com, com->block->tree, 0);
-
-    /* Do padding for aligned memory reads */
-    LinkFixupOffsets(com, com->block->tree, 0);
-
-    /* Jumps normally are to a node that does not generate code,
-     * and due to padding, the jump may go to a address with a
-     * XBC_NOOP, so adjust the jump to the next useful opcode. */
-    LinkSkipPadding(com, com->block->tree);
-
-    /* Now addresses are known */
-    LinkFixupJumps(com, com->block->tree);
-
-    /* Build symbol, constant and builtin tables */
-    LinkBuildTables(com, com->block);
-
-    /* Stack info */
-    com->length = sizeof(short) * 3;
-    /* Tables info */
-    com->length += sizeof(short) * 4;
-    com->length += com->table.num_constants * sizeof(LispObj*);
-    com->length += com->table.num_symbols * sizeof(LispAtom*);
-    com->length += com->table.num_builtins * sizeof(LispBuiltin*);
-    com->length += com->table.num_bytecodes * sizeof(unsigned char*);
-    com->length += com->table.num_bytecodes * sizeof(LispObj*);
-
-    /* Allocate space for the bytecode stream */
-    com->length += com->block->tail->offset + 1;
-    com->bytecode = LispMalloc(com->length);
-
-    /* Add header */
-    offset = 0;
-    *(short*)(com->bytecode + offset) = com->stack.stack;
-    offset += sizeof(short);
-    *(short*)(com->bytecode + offset) = com->stack.bstack;
-    offset += sizeof(short);
-    *(short*)(com->bytecode + offset) = com->stack.pstack;
-    offset += sizeof(short);
-
-    *(short*)(com->bytecode + offset) = com->table.num_constants;
-    offset += sizeof(short);
-    *(short*)(com->bytecode + offset) = com->table.num_symbols;
-    offset += sizeof(short);
-    *(short*)(com->bytecode + offset) = com->table.num_builtins;
-    offset += sizeof(short);
-    *(short*)(com->bytecode + offset) = com->table.num_bytecodes;
-    offset += sizeof(short);
-
-    count = sizeof(LispObj*) * com->table.num_constants;
-    memcpy(com->bytecode + offset, com->table.constants, count);
-    offset += count;
-    count = sizeof(LispAtom*) * com->table.num_symbols;
-    memcpy(com->bytecode + offset, com->table.symbols, count);
-    offset += count;
-    count = sizeof(LispBuiltin*) * com->table.num_builtins;
-    memcpy(com->bytecode + offset, com->table.builtins, count);
-    offset += count;
-
-    /* Store bytecode information */
-    for (count = 0, codes = (unsigned char**)(com->bytecode + offset);
-        count < com->table.num_bytecodes; count++, codes++)
-       *codes = com->table.bytecodes[count]->data.bytecode.bytecode->code;
-    offset += com->table.num_bytecodes * sizeof(unsigned char*);
-    /* Store names, only useful for disassemble but may also be used
-     * to check if a function was redefined, and the bytecode is referencing
-     * the older version, the current version can be checked looking at
-     * <name>->data.atom */
-    for (count = 0, names = (LispObj**)(com->bytecode + offset);
-        count < com->table.num_bytecodes; count++, names++)
-       *names = com->table.bytecodes[count]->data.bytecode.name;
-    offset += com->table.num_bytecodes * sizeof(LispObj*);
-
-    /* Generate it */
-    LinkEmmitBytecode(com, com->block->tree, com->bytecode + offset, 0);
-}
-
-static LispObj *
-ExecuteBytecode(register unsigned char *stream)
-{
-    register LispObj *reg0;
-    register LispAtom *atom;
-    register short offset;
-    LispObj *reg1;
-    LispBuiltin *builtin;
-    LispObj *lambda;
-    LispObj *arguments;
-    unsigned char *bytecode;
-
-    LispObj **constants;
-    LispAtom **symbols;
-    LispBuiltin **builtins;
-    unsigned char **codes;
-    short num_constants, num_symbols, num_builtins, num_codes;
-
-    int lex, len;
-
-    /* To control gc protected slots */
-    int phead, pbase;
-
-    long fixnum = 0;
-
-#if defined(__GNUC__) && !defined(ANSI_SOURCE)
-#define ALLOW_GOTO_ADDRESS
-#endif
-
-#ifdef ALLOW_GOTO_ADDRESS
-#define JUMP_ADDRESS(label)    &&label
-    static const void *opcode_labels[] = {
-       JUMP_ADDRESS(XBC_NOOP),
-       JUMP_ADDRESS(XBC_INV),
-       JUMP_ADDRESS(XBC_NIL),
-       JUMP_ADDRESS(XBC_T),
-       JUMP_ADDRESS(XBC_PRED),
-       JUMP_ADDRESS(XBC_CAR),
-       JUMP_ADDRESS(XBC_CDR),
-       JUMP_ADDRESS(XBC_CAR_SET),
-       JUMP_ADDRESS(XBC_CDR_SET),
-       JUMP_ADDRESS(XBC_RPLACA),
-       JUMP_ADDRESS(XBC_RPLACD),
-       JUMP_ADDRESS(XBC_EQ),
-       JUMP_ADDRESS(XBC_EQL),
-       JUMP_ADDRESS(XBC_EQUAL),
-       JUMP_ADDRESS(XBC_EQUALP),
-       JUMP_ADDRESS(XBC_LENGTH),
-       JUMP_ADDRESS(XBC_LAST),
-       JUMP_ADDRESS(XBC_NTHCDR),
-       JUMP_ADDRESS(XBC_CAR_PUSH),
-       JUMP_ADDRESS(XBC_CDR_PUSH),
-       JUMP_ADDRESS(XBC_PUSH),
-       JUMP_ADDRESS(XBC_PUSH_NIL),
-       JUMP_ADDRESS(XBC_PUSH_UNSPEC),
-       JUMP_ADDRESS(XBC_PUSH_T),
-       JUMP_ADDRESS(XBC_PUSH_NIL_N),
-       JUMP_ADDRESS(XBC_PUSH_UNSPEC_N),
-       JUMP_ADDRESS(XBC_LET),
-       JUMP_ADDRESS(XBC_LETX),
-       JUMP_ADDRESS(XBC_LET_NIL),
-       JUMP_ADDRESS(XBC_LETX_NIL),
-       JUMP_ADDRESS(XBC_LETBIND),
-       JUMP_ADDRESS(XBC_UNLET),
-       JUMP_ADDRESS(XBC_LOAD),
-       JUMP_ADDRESS(XBC_LOAD_LET),
-       JUMP_ADDRESS(XBC_LOAD_LETX),
-       JUMP_ADDRESS(XBC_LOAD_PUSH),
-       JUMP_ADDRESS(XBC_LOADCON),
-       JUMP_ADDRESS(XBC_LOADCON_LET),
-       JUMP_ADDRESS(XBC_LOADCON_LETX),
-       JUMP_ADDRESS(XBC_LOADCON_PUSH),
-       JUMP_ADDRESS(XBC_LOAD_CAR),
-       JUMP_ADDRESS(XBC_LOAD_CDR),
-       JUMP_ADDRESS(XBC_LOAD_CAR_STORE),
-       JUMP_ADDRESS(XBC_LOAD_CDR_STORE),
-       JUMP_ADDRESS(XBC_LOADCON_SET),
-       JUMP_ADDRESS(XBC_LOADSYM),
-       JUMP_ADDRESS(XBC_LOADSYM_LET),
-       JUMP_ADDRESS(XBC_LOADSYM_LETX),
-       JUMP_ADDRESS(XBC_LOADSYM_PUSH),
-       JUMP_ADDRESS(XBC_LOAD_SET),
-       JUMP_ADDRESS(XBC_LOAD_CAR_SET),
-       JUMP_ADDRESS(XBC_LOAD_CDR_SET),
-       JUMP_ADDRESS(XBC_SET),
-       JUMP_ADDRESS(XBC_SETSYM),
-       JUMP_ADDRESS(XBC_SET_NIL),
-       JUMP_ADDRESS(XBC_CALL),
-       JUMP_ADDRESS(XBC_CALL_SET),
-       JUMP_ADDRESS(XBC_BYTECALL),
-       JUMP_ADDRESS(XBC_FUNCALL),
-       JUMP_ADDRESS(XBC_LETREC),
-       JUMP_ADDRESS(XBC_BCONS),
-       JUMP_ADDRESS(XBC_BCONS1),
-       JUMP_ADDRESS(XBC_BCONS2),
-       JUMP_ADDRESS(XBC_BCONS3),
-       JUMP_ADDRESS(XBC_BCONS4),
-       JUMP_ADDRESS(XBC_BCONS5),
-       JUMP_ADDRESS(XBC_BCONS6),
-       JUMP_ADDRESS(XBC_BCONS7),
-       JUMP_ADDRESS(XBC_CCONS),
-       JUMP_ADDRESS(XBC_CSTAR),
-       JUMP_ADDRESS(XBC_CFINI),
-       JUMP_ADDRESS(XBC_LSTAR),
-       JUMP_ADDRESS(XBC_LCONS),
-       JUMP_ADDRESS(XBC_LFINI),
-       JUMP_ADDRESS(XBC_JUMP),
-       JUMP_ADDRESS(XBC_JUMPT),
-       JUMP_ADDRESS(XBC_JUMPNIL),
-       JUMP_ADDRESS(XBC_STRUCT),
-       JUMP_ADDRESS(XBC_STRUCTP),
-       JUMP_ADDRESS(XBC_RETURN)
-    };
-    static const void *predicate_opcode_labels[] = {
-       JUMP_ADDRESS(XBP_CONSP),
-       JUMP_ADDRESS(XBP_LISTP),
-       JUMP_ADDRESS(XBP_NUMBERP)
-    };
-#endif
-
-    reg0 = NIL;
-
-    bytecode = stream;
-    pbase = lisp__data.protect.length;
-
-    /* stack */
-    offset = *(short*)stream;
-    stream += sizeof(short);
-    if (lisp__data.env.length + offset > lisp__data.env.space) {
-       do
-           LispMoreEnvironment();
-       while (lisp__data.env.length + offset >= lisp__data.env.space);
-    }
-    /* builtin stack */
-    offset = *(short*)stream;
-    stream += sizeof(short);
-    if (lisp__data.stack.length + offset >= lisp__data.stack.space) {
-       do
-           LispMoreStack();
-       while (lisp__data.stack.length + offset >= lisp__data.stack.space);
-    }
-    /* protect stack */
-    phead = *(short*)stream;
-    stream += sizeof(short);
-    if (lisp__data.protect.length + phead > lisp__data.protect.space) {
-       do
-           LispMoreProtects();
-       while (lisp__data.protect.length + phead >= lisp__data.protect.space);
-    }
-
-    num_constants = *(short*)stream;
-    stream += sizeof(short);
-    num_symbols = *(short*)stream;
-    stream += sizeof(short);
-    num_builtins = *(short*)stream;
-    stream += sizeof(short);
-    num_codes = *(short*)stream;
-    stream += sizeof(short);
-
-    constants = (LispObj**)stream;
-    stream += num_constants * sizeof(LispObj*);
-    symbols = (LispAtom**)stream;
-    stream += num_symbols * sizeof(LispAtom*);
-    builtins = (LispBuiltin**)stream;
-    stream += num_builtins * sizeof(LispBuiltin*);
-    codes = (unsigned char**)stream;
-    stream += num_codes * (sizeof(unsigned char*) + sizeof(LispObj*));
-
-    for (; phead > 0; phead--)
-       lisp__data.protect.objects[lisp__data.protect.length++] = NIL;
-    phead = pbase;
-
-#ifdef ALLOW_GOTO_ADDRESS
-#define OPCODE_LABEL(label)    label
-#define NEXT_OPCODE()          goto *opcode_labels[*stream++]
-#define GOTO_PREDICATE()       goto *predicate_opcode_labels[*stream++]
-#else
-#define OPCODE_LABEL(label)    case label
-#define NEXT_OPCODE()          goto next_opcode
-#define GOTO_PREDICATE()       goto predicate_label
-    for (;;) {
-next_opcode:
-       switch (*stream++) {
-#endif /* ALLOW_GOTO_ADDRESS */
-
-OPCODE_LABEL(XBC_NOOP):
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_PRED):
-       GOTO_PREDICATE();
-
-OPCODE_LABEL(XBC_INV):
-       reg0 = reg0 == NIL ? T : NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_NIL):
-       reg0 = NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_T):
-       reg0 = T;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_CAR):
-car:
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CAR: %s is not a list", STROBJ(reg0));
-           reg0 = CAR(reg0);
-       }
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_CDR):
-cdr:
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CDR: %s is not a list", STROBJ(reg0));
-           reg0 = CDR(reg0);
-       }
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_RPLACA):
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       if (!CONSP(reg1))
-           LispDestroy("RPLACA: %s is not a cons", STROBJ(reg1));
-       RPLACA(reg1, reg0);
-       reg0 = reg1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_RPLACD):
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       if (!CONSP(reg1))
-           LispDestroy("RPLACD: %s is not a cons", STROBJ(reg1));
-       RPLACD(reg1, reg0);
-       reg0 = reg1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS):
-       CAR(cons) = reg0;
-       lisp__data.stack.values[lisp__data.stack.length++] = cons;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS1):
-       offset = lisp__data.stack.length - 1;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[offset];
-       lisp__data.stack.values[offset] = cons1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS2):
-       offset = lisp__data.stack.length;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[--offset];
-       CAR(cons2) = lisp__data.stack.values[--offset];
-       lisp__data.stack.values[offset] = cons2;
-       lisp__data.stack.length = offset + 1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS3):
-       offset = lisp__data.stack.length;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[--offset];
-       CAR(cons2) = lisp__data.stack.values[--offset];
-       CAR(cons3) = lisp__data.stack.values[--offset];
-       lisp__data.stack.values[offset] = cons3;
-       lisp__data.stack.length = offset + 1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS4):
-       offset = lisp__data.stack.length;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[--offset];
-       CAR(cons2) = lisp__data.stack.values[--offset];
-       CAR(cons3) = lisp__data.stack.values[--offset];
-       CAR(cons4) = lisp__data.stack.values[--offset];
-       lisp__data.stack.values[offset] = cons4;
-       lisp__data.stack.length = offset + 1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS5):
-       offset = lisp__data.stack.length;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[--offset];
-       CAR(cons2) = lisp__data.stack.values[--offset];
-       CAR(cons3) = lisp__data.stack.values[--offset];
-       CAR(cons4) = lisp__data.stack.values[--offset];
-       CAR(cons5) = lisp__data.stack.values[--offset];
-       lisp__data.stack.values[offset] = cons5;
-       lisp__data.stack.length = offset + 1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS6):
-       offset = lisp__data.stack.length;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[--offset];
-       CAR(cons2) = lisp__data.stack.values[--offset];
-       CAR(cons3) = lisp__data.stack.values[--offset];
-       CAR(cons4) = lisp__data.stack.values[--offset];
-       CAR(cons5) = lisp__data.stack.values[--offset];
-       CAR(cons6) = lisp__data.stack.values[--offset];
-       lisp__data.stack.values[offset] = cons6;
-       lisp__data.stack.length = offset + 1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_BCONS7):
-       offset = lisp__data.stack.length;
-       CAR(cons) = reg0;
-       CAR(cons1) = lisp__data.stack.values[--offset];
-       CAR(cons2) = lisp__data.stack.values[--offset];
-       CAR(cons3) = lisp__data.stack.values[--offset];
-       CAR(cons4) = lisp__data.stack.values[--offset];
-       CAR(cons5) = lisp__data.stack.values[--offset];
-       CAR(cons6) = lisp__data.stack.values[--offset];
-       CAR(cons7) = lisp__data.stack.values[--offset];
-       lisp__data.stack.values[offset] = cons7;
-       lisp__data.stack.length = offset + 1;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_EQ):
-       reg0 = reg0 == lisp__data.stack.values[--lisp__data.stack.length] ? T : NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_EQL):
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       reg0 = XEQL(reg1, reg0);
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_EQUAL):
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       reg0 = XEQUAL(reg1, reg0);
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_EQUALP):
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       reg0 = XEQUALP(reg1, reg0);
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LENGTH):
-       reg0 = FIXNUM(LispLength(reg0));
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LAST):
-    {
-       long length;
-
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       if (CONSP(reg1)) {
-           if (reg0 != NIL) {
-               if (!FIXNUMP(reg0) || (fixnum = FIXNUM_VALUE(reg0)) < 0)
-                   LispDestroy("LAST: %s is not a positive fixnum",
-                               STROBJ(reg0));
-           }
-           else
-               fixnum = 1;
-           reg0 = reg1;
-           for (reg0 = reg1, length = 0;
-                CONSP(reg0);
-                reg0 = CDR(reg0), length++)
-               ;
-           for (length -= fixnum, reg0 = reg1; length > 0; length--)
-               reg0 = CDR(reg0);
-       }
-       else
-           reg0 = reg1;
-    }  NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_NTHCDR):
-       reg1 = lisp__data.stack.values[--lisp__data.stack.length];
-       if (!FIXNUMP(reg1) || (fixnum = FIXNUM_VALUE(reg1)) < 0)
-           LispDestroy("NTHCDR: %s is not a positive fixnum",
-                       STROBJ(reg1));
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("NTHCDR: %s is not a list", STROBJ(reg0));
-           for (; fixnum > 0; fixnum--) {
-               if (!CONSP(reg0))
-                   break;
-               reg0 = CDR(reg0);
-           }
-       }
-       NEXT_OPCODE();
-
-       /* Push to builtin stack */
-OPCODE_LABEL(XBC_CAR_PUSH):
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CAR: %s is not a list", STROBJ(reg0));
-           reg0 = CAR(reg0);
-       }
-       goto push_builtin;
-
-OPCODE_LABEL(XBC_CDR_PUSH):
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CDR: %s is not a list", STROBJ(reg0));
-           reg0 = CDR(reg0);
-       }
-       /*FALLTROUGH*/
-
-OPCODE_LABEL(XBC_PUSH):
-push_builtin:
-       lisp__data.stack.values[lisp__data.stack.length++] = reg0;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_PUSH_NIL):
-       lisp__data.stack.values[lisp__data.stack.length++] = NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_PUSH_UNSPEC):
-       lisp__data.stack.values[lisp__data.stack.length++] = UNSPEC;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_PUSH_T):
-       lisp__data.stack.values[lisp__data.stack.length++] = T;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_PUSH_NIL_N):
-       for (offset = *stream++; offset > 0; offset--)
-           lisp__data.stack.values[lisp__data.stack.length++] = NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_PUSH_UNSPEC_N):
-       for (offset = *stream++; offset > 0; offset--)
-           lisp__data.stack.values[lisp__data.stack.length++] = UNSPEC;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LET):
-let_argument:
-       /*  The global object value is not changed, so it does not
-        * matter if it is a constant symbol. An error would be
-        * generated if it was declared as constant at the time of
-        * bytecode generation. Check can be done looking at the
-        * atom->constant field. */
-       atom = symbols[*stream++];
-       atom->offset = lisp__data.env.length;
-       lisp__data.env.names[lisp__data.env.length] = atom->key;
-       lisp__data.env.values[lisp__data.env.length++] = reg0;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LETX):
-letx_argument:
-       atom = symbols[*stream++];
-       atom->offset = lisp__data.env.length;
-       lisp__data.env.names[lisp__data.env.length] = atom->key;
-       lisp__data.env.values[lisp__data.env.length++] = reg0;
-       lisp__data.env.head++;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LET_NIL):
-       atom = symbols[*stream++];
-       atom->offset = lisp__data.env.length;
-       lisp__data.env.names[lisp__data.env.length] = atom->key;
-       lisp__data.env.values[lisp__data.env.length++] = NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LETX_NIL):
-       atom = symbols[*stream++];
-       atom->offset = lisp__data.env.length;
-       lisp__data.env.names[lisp__data.env.length] = atom->key;
-       lisp__data.env.values[lisp__data.env.length++] = NIL;
-       lisp__data.env.head++;
-       NEXT_OPCODE();
-
-       /* Bind locally added variables to a block */
-OPCODE_LABEL(XBC_LETBIND):
-       offset = *stream++;
-       lisp__data.env.head += offset;
-       NEXT_OPCODE();
-
-       /* Unbind locally added variables to a block */
-OPCODE_LABEL(XBC_UNLET):
-       offset = *stream++;
-       lisp__data.env.head -= offset;
-       lisp__data.env.length -= offset;
-       NEXT_OPCODE();
-
-       /* Load value from stack */
-OPCODE_LABEL(XBC_LOAD):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LOAD_CAR):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       goto car;
-
-OPCODE_LABEL(XBC_LOAD_CDR):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       goto cdr;
-
-OPCODE_LABEL(XBC_LOAD_CAR_STORE):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CAR: %s is not a list", STROBJ(reg0));
-           reg0 = CAR(reg0);
-           lisp__data.env.values[lisp__data.env.lex + offset] = reg0;
-       }
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LOAD_CDR_STORE):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CDR: %s is not a list", STROBJ(reg0));
-           reg0 = CDR(reg0);
-           lisp__data.env.values[lisp__data.env.lex + offset] = reg0;
-       }
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LOAD_LET):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       goto let_argument;
-
-OPCODE_LABEL(XBC_LOAD_LETX):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       goto letx_argument;
-
-OPCODE_LABEL(XBC_LOAD_PUSH):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       lisp__data.stack.values[lisp__data.stack.length++] = reg0;
-       NEXT_OPCODE();
-
-       /* Load pointer to constant */
-OPCODE_LABEL(XBC_LOADCON):
-       reg0 = constants[*stream++];
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LOADCON_LET):
-       reg0 = constants[*stream++];
-       goto let_argument;
-
-OPCODE_LABEL(XBC_LOADCON_LETX):
-       reg0 = constants[*stream++];
-       goto letx_argument;
-
-OPCODE_LABEL(XBC_LOADCON_PUSH):
-       reg0 = constants[*stream++];
-       lisp__data.stack.values[lisp__data.stack.length++] = reg0;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LOADCON_SET):
-       reg0 = constants[*stream++];
-       offset = *stream++;
-       lisp__data.env.values[lisp__data.env.lex + offset] = reg0;
-       NEXT_OPCODE();
-
-       /* Change value of local variable */
-OPCODE_LABEL(XBC_CAR_SET):
-car_set:
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CAR: %s is not a list", STROBJ(reg0));
-           reg0 = CAR(reg0);
-       }
-       goto set_local_variable;
-
-OPCODE_LABEL(XBC_CDR_SET):
-cdr_set:
-       if (reg0 != NIL) {
-           if (!CONSP(reg0))
-               LispDestroy("CDR: %s is not a list", STROBJ(reg0));
-           reg0 = CDR(reg0);
-       }
-       goto set_local_variable;
-
-OPCODE_LABEL(XBC_LOAD_CAR_SET):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       goto car_set;
-
-OPCODE_LABEL(XBC_LOAD_CDR_SET):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       goto cdr_set;
-
-OPCODE_LABEL(XBC_LOAD_SET):
-       offset = *stream++;
-       reg0 = lisp__data.env.values[lisp__data.env.lex + offset];
-       /*FALLTROUGH*/
-
-OPCODE_LABEL(XBC_SET):
-set_local_variable:
-       offset = *stream++;
-       lisp__data.env.values[lisp__data.env.lex + offset] = reg0;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_SET_NIL):
-       offset = *stream++;
-       lisp__data.env.values[lisp__data.env.lex + offset] = NIL;
-       NEXT_OPCODE();
-
-       /* Change value of a global/special variable */
-OPCODE_LABEL(XBC_SETSYM):
-           atom = symbols[*stream++];
-           if (atom->dyn) {
-               /*  atom->dyn and atom->constant are exclusive, no
-                * need to check if variable declared as constant. */
-               if (atom->offset < lisp__data.env.head &&
-                   lisp__data.env.names[atom->offset] == atom->key)
-                   lisp__data.env.values[atom->offset] = reg0;
-               else {
-                   if (atom->watch)
-                       LispSetAtomObjectProperty(atom, reg0);
-                   else
-                       SETVALUE(atom, reg0);
-               }
-           }
-           else if (atom->a_object) {
-               if (atom->constant)
-                   LispDestroy("EVAL: %s is a constant",
-                               STROBJ(atom->object));
-               else if (atom->watch)
-                   LispSetAtomObjectProperty(atom, reg0);
-               else
-                   SETVALUE(atom, reg0);
-           }
-           else {
-               /* Create new global variable */
-               LispPackage *pack;
-
-               LispWarning("the variable %s was not declared",
-                           atom->key->value);
-               LispSetAtomObjectProperty(atom, reg0);
-               pack = atom->package->data.package.package;
-               if (pack->glb.length >= pack->glb.space)
-                   LispMoreGlobals(pack);
-               pack->glb.pairs[pack->glb.length++] = atom->object;
-           }
-           NEXT_OPCODE();
-
-/* Resolve symbol value at runtime */
-#define LOAD_SYMBOL_VALUE()                                        \
-    atom = symbols[*stream++];                                     \
-    if (atom->dyn) {                                               \
-       if (atom->offset < lisp__data.env.head &&                   \
-           lisp__data.env.names[atom->offset] == atom->key)        \
-           reg0 = lisp__data.env.values[atom->offset];             \
-       else {                                                      \
-           reg0 = atom->property->value;                           \
-           if (reg0 == UNBOUND)                                    \
-               LispDestroy("EVAL: the symbol %s is unbound",  \
-                           STROBJ(atom->object));                  \
-       }                                                           \
-    }                                                              \
-    else {                                                         \
-       if (atom->a_object)                                         \
-           reg0 = atom->property->value;                           \
-       else                                                        \
-           LispDestroy("EVAL: the symbol %s is unbound",           \
-                       STROBJ(atom->object));                      \
-    }
-
-OPCODE_LABEL(XBC_LOADSYM):
-       LOAD_SYMBOL_VALUE();
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LOADSYM_LET):
-       LOAD_SYMBOL_VALUE();
-       goto let_argument;
-
-OPCODE_LABEL(XBC_LOADSYM_LETX):
-       LOAD_SYMBOL_VALUE();
-       goto letx_argument;
-
-OPCODE_LABEL(XBC_LOADSYM_PUSH):
-       LOAD_SYMBOL_VALUE();
-       lisp__data.stack.values[lisp__data.stack.length++] = reg0;
-       NEXT_OPCODE();
-
-           /* Builtin function */
-OPCODE_LABEL(XBC_CALL):
-       offset = *stream++;
-       lisp__data.stack.base = lisp__data.stack.length - offset;
-       builtin = builtins[*stream++];
-       if (builtin->multiple_values) {
-           RETURN_COUNT = 0;
-           reg0 = builtin->function(builtin);
-       }
-       else {
-           reg0 = builtin->function(builtin);
-           RETURN_COUNT = 0;
-       }
-       lisp__data.stack.length -= offset;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_CALL_SET):
-       offset = *stream++;
-       lisp__data.stack.base = lisp__data.stack.length - offset;
-       builtin = builtins[*stream++];
-       if (builtin->multiple_values) {
-           RETURN_COUNT = 0;
-           reg0 = builtin->function(builtin);
-       }
-       else {
-           reg0 = builtin->function(builtin);
-           RETURN_COUNT = 0;
-       }
-       lisp__data.stack.length -= offset;
-       offset = *stream++;
-       lisp__data.env.values[lisp__data.env.lex + offset] = reg0;
-       NEXT_OPCODE();
-
-       /* Bytecode call */
-OPCODE_LABEL(XBC_BYTECALL):
-       lex = lisp__data.env.lex;
-       offset = *stream++;
-       lisp__data.env.head = lisp__data.env.length;
-       len = lisp__data.env.lex = lisp__data.env.length - offset;
-       reg0 = ExecuteBytecode(codes[*stream++]);
-       lisp__data.env.length = lisp__data.env.head = len;
-       lisp__data.env.lex = lex;
-       NEXT_OPCODE();
-
-       /* Unimplemented function/macro call */
-OPCODE_LABEL(XBC_FUNCALL):
-       lambda = constants[*stream++];
-       arguments = constants[*stream++];
-       reg0 = LispFuncall(lambda, arguments, 1);
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_JUMP):
-       stream += *(signed short*)stream;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_JUMPT):
-       if (reg0 != NIL)
-           stream += *(signed short*)stream;
-       else
-           /* skip jump relative offset */
-           stream += sizeof(signed short);
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_JUMPNIL):
-       if (reg0 == NIL)
-           stream += *(signed short*)stream;
-       else
-           /* skip jump relative offset */
-           stream += sizeof(signed short);
-       NEXT_OPCODE();
-
-       /* Build CONS of two constant arguments */
-OPCODE_LABEL(XBC_CCONS):
-       reg0 = constants[*stream++];
-       reg1 = constants[*stream++];
-       reg0 = CONS(reg0, reg1);
-       NEXT_OPCODE();
-
-       /* Start CONS */
-OPCODE_LABEL(XBC_CSTAR):
-       /* This the CAR of the CONS */
-       lisp__data.protect.objects[phead++] = reg0;
-       NEXT_OPCODE();
-
-       /* Finish CONS */
-OPCODE_LABEL(XBC_CFINI):
-       reg0 = CONS(lisp__data.protect.objects[--phead], reg0);
-       NEXT_OPCODE();
-
-       /* Start building list */
-OPCODE_LABEL(XBC_LSTAR):
-       reg1 = CONS(reg0, NIL);
-       /* Start of list stored here */
-       lisp__data.protect.objects[phead++] = reg1;
-       /* Tail of list stored here */
-       lisp__data.protect.objects[phead++] = reg1;
-       NEXT_OPCODE();
-
-       /* Add to list */
-OPCODE_LABEL(XBC_LCONS):
-       reg1 = lisp__data.protect.objects[phead - 2];
-       RPLACD(reg1, CONS(reg0, NIL));
-        lisp__data.protect.objects[phead - 2] = CDR(reg1);
-       NEXT_OPCODE();
-
-       /* Finish list */
-OPCODE_LABEL(XBC_LFINI):
-       phead -= 2;
-       reg0 = lisp__data.protect.objects[phead + 1];
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_STRUCT):
-       offset = *stream++;
-       reg1 = constants[*stream++];
-       if (!STRUCTP(reg0) || reg0->data.struc.def != reg1) {
-           char *name = ATOMID(CAR(reg1))->value;
-
-           for (reg1 = CDR(reg1); offset; offset--)
-               reg1 = CDR(reg1);
-           LispDestroy("%s-%s: %s is not a %s",
-                       name, ATOMID(CAR(reg1))->value, STROBJ(reg0), name);
-       }
-       for (reg0 = reg0->data.struc.fields; offset; offset--)
-           reg0 = CDR(reg0);
-       reg0 = CAR(reg0);
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_STRUCTP):
-       reg1 = constants[*stream++];
-       reg0 = STRUCTP(reg0) && reg0->data.struc.def == reg1 ? T : NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_LETREC):
-       /* XXX could/should optimize, shouldn't need to parse
-        * the bytecode header again */
-       lex = lisp__data.env.lex;
-       offset = *stream++;
-       lisp__data.env.head = lisp__data.env.length;
-       len = lisp__data.env.lex = lisp__data.env.length - offset;
-       reg0 = ExecuteBytecode(bytecode);
-       lisp__data.env.length = lisp__data.env.head = len;
-       lisp__data.env.lex = lex;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBC_RETURN):
-       lisp__data.protect.length = pbase;
-       return (reg0);
-
-#ifndef ALLOW_GOTO_ADDRESS
-       }       /* end of switch */
-
-predicate_label:
-       switch (*stream++) {
-#endif
-
-OPCODE_LABEL(XBP_CONSP):
-       reg0 = CONSP(reg0) ? T : NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBP_LISTP):
-       reg0 = LISTP(reg0) ? T : NIL;
-       NEXT_OPCODE();
-
-OPCODE_LABEL(XBP_NUMBERP):
-       reg0 = NUMBERP(reg0) ? T : NIL;
-       NEXT_OPCODE();
-
-#ifndef ALLOW_GOTO_ADDRESS
-       }       /* end of switch */
-    }
-#endif
-
-    /*NOTREACHED*/
-    return (reg0);
-}
diff --git a/xedit/lisp/bytecode.h b/xedit/lisp/bytecode.h
deleted file mode 100644 (file)
index 8aac701..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/bytecode.h,v 1.5tsi Exp $ */
-
-#include "lisp/private.h"
-
-#ifndef Lisp_Bytecode_h
-#define Lisp_Bytecode_h
-
-/* Number of arguments for &REST functions with no side effects,
- * i.e. does not need to allocate new cells to build argument list.
- * If this value is changed, it is also required to add more
- * XBC_BCONS? opcodes and change ExecuteBytecode() */
-#define MAX_BCONS      8
-
-typedef enum {
-    XBP_CONSP,
-    XBP_LISTP,
-    XBP_NUMBERP
-} LispBytePredicate;
-
-typedef enum {
-    XBC_NOOP,
-
-    XBC_INV,           /* If NIL loaded, change to T else to NIL */
-    XBC_NIL,           /* Load NIL */
-    XBC_T,             /* Load T */
-
-    XBC_PRED,          /* Preffix for predicate test */
-       /* Followed by byte indicating test */
-
-    XBC_CAR,           /* Set loaded value to it's car */
-    XBC_CDR,           /* Set loaded value to it's cdr */
-
-    XBC_CAR_SET,       /* Set local variable to CAR or CDR of loaded value */
-    XBC_CDR_SET,
-       /* Offset of local variable follows */
-
-    /* Sets C[AD]R of top of builtin stack with
-     * loaded value and pop builtin stack */
-    XBC_RPLACA,
-    XBC_RPLACD,
-
-    /* Push only one argument in builtin stack, and call directly
-     * LispObjectCompare without the need of pushing the second arguument */
-    XBC_EQ,
-    XBC_EQL,
-    XBC_EQUAL,
-    XBC_EQUALP,
-
-    XBC_LENGTH,
-    XBC_LAST,
-    XBC_NTHCDR,
-
-    XBC_CAR_PUSH,      /* Pushes CAR or CDR of loaded value to builtin stack */
-    XBC_CDR_PUSH,
-
-    XBC_PUSH,          /* Push argument in builtin stack */
-    XBC_PUSH_NIL,      /* Pushes NIL in builtin stack */
-    XBC_PUSH_UNSPEC,   /* Pushes #<UNSPEC> in builtin stack */
-    XBC_PUSH_T,                /* Pushes T in builtin stack */
-    XBC_PUSH_NIL_N,    /* Pushes NIL in the builtin stack N times */
-    XBC_PUSH_UNSPEC_N, /* Pushes #<UNSPEC> in the builtin stack N times */
-
-
-       /* The builtin stack base is saved when entering the bytecode
-        * interpreter, and the bytecode does not reenter from builtin
-        * functions, yet, so there is no need, for XBC_BSAVE and
-        * XBC_BREST instructions */
-
-    XBC_LET,           /* Push loaded value to stack */
-    XBC_LETX,          /* Push loaded value to stack and bind */
-       /*  Next byte(s) are the symbol offset */
-    XBC_LET_NIL,       /* Push loaded value to stack */
-    XBC_LETX_NIL,      /* Push loaded value to stack and bind */
-       /*  Next byte(s) are the symbol offset */
-
-    XBC_LETBIND,       /* Bind locally added variables */
-       /* Followed by number of symbols to bind */
-
-    XBC_UNLET,         /* Unbind locally binded variables */
-       /* Followed by number of symbols to unbind */
-
-    XBC_LOAD,          /* Load argument already from the stack */
-       /* Followed by  offset follows the opcode */
-    XBC_LOAD_LET,      /* Load argument and push */
-    XBC_LOAD_LETX,     /* Load argument,  push and bind */
-       /* Followed by a short and the atom to be bound */
-    XBC_LOAD_PUSH,
-
-    XBC_LOADCON,       /* Load a literal constant */
-       /* Next bytes are the constant object */
-    XBC_LOADCON_LET,   /* Load a literal constant and push */
-    XBC_LOADCON_LETX,  /* Load a literal constant, push and bind */
-       /* Followed by object constant and symbol to be bound */
-    XBC_LOADCON_PUSH,
-
-    /* Load CAR or CDR of local variable */
-    XBC_LOAD_CAR,
-    XBC_LOAD_CDR,
-
-    /* Change local variable value to it's CAR or CDR */
-    XBC_LOAD_CAR_STORE,
-    XBC_LOAD_CDR_STORE,
-
-    XBC_LOADCON_SET,
-       /* Followed by constant offset and local variable offset */
-
-    XBC_LOADSYM,       /* Load object symbol value */
-       /* The object atom pointer follows de opcode */
-    XBC_LOADSYM_LET,   /* Load object symbol value and push */
-    XBC_LOADSYM_LETX,  /* Load object symbol value, push and bind */
-       /* The symbol atom name and bounded atom name to be bound follows */
-    XBC_LOADSYM_PUSH,
-
-    XBC_LOAD_SET,      /* Set value of local variable to the value of another */
-       /* Followed by two shorts */
-    XBC_LOAD_CAR_SET,  /* Like LOAD_SET, but apply CAR or CDR in the value */
-    XBC_LOAD_CDR_SET,
-
-    XBC_SET,           /* Change value of local variable */
-       /* A short integer with relative offset follows opcode */
-    XBC_SETSYM,                /* Change value of symbol */
-       /* The atom symbol pointer follows opcode */
-
-    XBC_SET_NIL,       /* Like XBC_SET but sets the local variable to NIL */
-
-    XBC_CALL,          /* Call builtin function */
-       /* 1 byte follows telling how many arguments to use */
-       /* LispBuiltin pointer follows opcode */
-
-    XBC_CALL_SET,
-       /* Like BCALL, but also followed by an short index of local variable */
-
-    XBC_BYTECALL,      /* Call bytecode */
-       /* 1 byte for number of arguments */
-       /* 1 byte for index in bytecode table */
-
-    XBC_FUNCALL,
-       /* Opcode followed by function and arguments objects, to
-        * be evaluated at run time, as it was not resolved at
-        * bytecode generation time (or is not implemented in
-        * the bytecode compiler) */
-
-
-    XBC_LETREC,                /* Recursive function call */
-       /* 1 byte follows telling how many arguments the funtion receives */
-
-    /* Helper for math functions. Uses a preallocated CONS,
-     * setting it's CAR to the loaded value, and in the same step
-     * pushes the CONS to the builtin stack */
-    XBC_BCONS,
-    /* Like BCONS but it is a list of 2 arguments, first argument
-     * is saved on the stack, replace with list of 2 arguments */
-    XBC_BCONS1,
-    /* Like BCONS1 but it is a list of 3 arguments, first arguments
-     * are saved on the stack, replace with list of first stack
-     * argument with list or 3 arguments, and pop stack  */
-    XBC_BCONS2,
-    XBC_BCONS3,
-    XBC_BCONS4,
-    XBC_BCONS5,
-    XBC_BCONS6,
-    XBC_BCONS7,
-
-    /* Build a CONS */
-    XBC_CCONS,         /* Make CONS of two constants */
-       /* Constants follow opcode */
-    XBC_CSTAR,         /* Save the CAR of the CONS */
-    XBC_CFINI,         /* Loaded value is the CDR */
-
-    /* These are to help in interactively building lists */
-    XBC_LSTAR,         /* Start building a list in the gc protected stack */
-    XBC_LCONS,         /* Add loaded object to list */
-    XBC_LFINI,         /* List is finished */
-
-    /* Inconditional jumps */
-    XBC_JUMP,          /* Jump relative to following signed int */
-
-    /* Conditional jumps, if true */
-    XBC_JUMPT,         /* Jump relative to following signed int */
-
-    /* Conditional jumps, if false */
-    XBC_JUMPNIL,       /* Jump relative to following signed int */
-
-    /* Structure field access and type check */
-    XBC_STRUCT,
-    XBC_STRUCTP,
-
-    XBC_RETURN         /* Resume bytecode execution */
-} LispByteOpcode;
-
-
-struct _LispBytecode {
-    unsigned char *code;       /* Bytecode data */
-    long length;               /* length of bytecode stream */
-};
-
-/*
- * Prototypes
- */
-void LispBytecodeInit(void);
-
-LispObj *Lisp_Compile(LispBuiltin*);
-LispObj *Lisp_Disassemble(LispBuiltin*);
-
-LispObj *LispCompileForm(LispObj*);
-LispObj *LispExecuteBytecode(LispObj*);
-
-void Com_And(LispCom*, LispBuiltin*);
-void Com_Block(LispCom*, LispBuiltin*);
-void Com_C_r(LispCom*, LispBuiltin*);
-void Com_Cond(LispCom*, LispBuiltin*);
-void Com_Cons(LispCom*, LispBuiltin*);
-void Com_Consp(LispCom*, LispBuiltin*);
-void Com_Dolist(LispCom*, LispBuiltin*);
-void Com_Eq(LispCom*, LispBuiltin*);
-void Com_Go(LispCom*, LispBuiltin*);
-void Com_If(LispCom*, LispBuiltin*);
-void Com_Last(LispCom*, LispBuiltin*);
-void Com_Length(LispCom*, LispBuiltin*);
-void Com_Let(LispCom*, LispBuiltin*);
-void Com_Letx(LispCom*, LispBuiltin*);
-void Com_Listp(LispCom*, LispBuiltin*);
-void Com_Loop(LispCom*, LispBuiltin*);
-void Com_Nthcdr(LispCom*, LispBuiltin*);
-void Com_Null(LispCom*, LispBuiltin*);
-void Com_Numberp(LispCom*, LispBuiltin*);
-void Com_Or(LispCom*, LispBuiltin*);
-void Com_Progn(LispCom*, LispBuiltin*);
-void Com_Return(LispCom*, LispBuiltin*);
-void Com_ReturnFrom(LispCom*, LispBuiltin*);
-void Com_Rplac_(LispCom*, LispBuiltin*);
-void Com_Setq(LispCom*, LispBuiltin*);
-void Com_Tagbody(LispCom*, LispBuiltin*);
-void Com_Unless(LispCom*, LispBuiltin*);
-void Com_Until(LispCom*, LispBuiltin*);
-void Com_When(LispCom*, LispBuiltin*);
-void Com_While(LispCom*, LispBuiltin*);
-
-#endif /* Lisp_Bytecode_h */
diff --git a/xedit/lisp/compile.c b/xedit/lisp/compile.c
deleted file mode 100644 (file)
index 829baea..0000000
+++ /dev/null
@@ -1,2224 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/compile.c,v 1.15tsi Exp $ */
-
-#define VARIABLE_USED          0x0001
-#define VARIABLE_ARGUMENT      0x0002
-
-/*
- * Prototypes
- */
-static void ComPredicate(LispCom*, LispBuiltin*, LispBytePredicate);
-static void ComReturnFrom(LispCom*, LispBuiltin*, int);
-
-static int ComConstantp(LispCom*, LispObj*);
-static void ComAddVariable(LispCom*, LispObj*, LispObj*);
-static int ComGetVariable(LispCom*, LispObj*);
-static void ComVariableSetFlag(LispCom*, LispAtom*, int);
-#define COM_VARIABLE_USED(atom)                                \
-    ComVariableSetFlag(com, atom, VARIABLE_USED)
-#define COM_VARIABLE_ARGUMENT(atom)                    \
-       ComVariableSetFlag(com, atom, VARIABLE_ARGUMENT)
-
-static int FindIndex(void*, void**, int);
-static int compare(const void*, const void*);
-static int BuildTablePointer(void*, void***, int*);
-
-static void ComLabel(LispCom*, LispObj*);
-static void ComPush(LispCom*, LispObj*, LispObj*, int, int, int);
-static int ComCall(LispCom*, LispArgList*, LispObj*, LispObj*, int, int, int);
-static void ComFuncall(LispCom*, LispObj*, LispObj*, int);
-static void ComProgn(LispCom*, LispObj*);
-static void ComEval(LispCom*, LispObj*);
-
-static void ComRecursiveCall(LispCom*, LispArgList*, LispObj*, LispObj*);
-static void ComInlineCall(LispCom*, LispArgList*, LispObj*, LispObj*, LispObj*);
-
-static void ComMacroBackquote(LispCom*, LispObj*);
-static void ComMacroCall(LispCom*, LispArgList*, LispObj*, LispObj*, LispObj*);
-static LispObj *ComMacroExpandBackquote(LispCom*, LispObj*);
-static LispObj *ComMacroExpand(LispCom*, LispObj*);
-static LispObj *ComMacroExpandFuncall(LispCom*, LispObj*, LispObj*);
-static LispObj *ComMacroExpandEval(LispCom*, LispObj*);
-
-/*
- * Implementation
- */
-void
-Com_And(LispCom *com, LispBuiltin *builtin)
-/*
- and &rest args
- */
-{
-    LispObj *args;
-
-    args = ARGUMENT(0);
-
-    if (CONSP(args)) {
-       /* Evaluate first argument */
-       ComEval(com, CAR(args));
-       args = CDR(args);
-
-       /* If more than one argument, create jump list */
-       if (CONSP(args)) {
-           CodeTree *tree = NULL, *group;
-
-           group = NEW_TREE(CodeTreeJumpIf);
-           group->code = XBC_JUMPNIL;
-
-           for (; CONSP(args); args = CDR(args)) {
-               ComEval(com, CAR(args));
-               tree = NEW_TREE(CodeTreeJumpIf);
-               tree->code = XBC_JUMPNIL;
-               group->group = tree;
-               group = tree;
-           }
-           /*  Finish form the last CodeTree code is changed to sign the
-            * end of the AND list */
-           group->code = XBC_NOOP;
-           if (group)
-               group->group = tree;
-       }
-    }
-    else
-       /* Identity of AND is T */
-       com_Bytecode(com, XBC_T);
-}
-
-void
-Com_Block(LispCom *com, LispBuiltin *builtin)
-/*
- block name &rest body
- */
-{
-
-    LispObj *name, *body;
-
-    body = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    if (name != NIL && name != T && !SYMBOLP(name))
-       LispDestroy("%s: %s cannot name a block",
-                   STRFUN(builtin), STROBJ(name));
-    if (CONSP(body)) {
-       CompileIniBlock(com, LispBlockTag, name);
-       ComProgn(com, body);
-       CompileFiniBlock(com);
-    }
-    else
-       /* Just load NIL without starting an empty block */
-       com_Bytecode(com, XBC_NIL);
-}
-
-void
-Com_C_r(LispCom *com, LispBuiltin *builtin)
-/*
- c[ad]{1,4}r list
- */
-{
-    LispObj *list;
-    char *desc;
-
-    list = ARGUMENT(0);
-
-    desc = STRFUN(builtin);
-    if (*desc == 'F')          /* FIRST */
-       desc = "CAR";
-    else if (*desc == 'R')     /* REST */
-       desc = "CDR";
-
-    /* Check if it is a list of constants */
-    while (desc[1] != 'R')
-       desc++;
-    ComEval(com, list);
-    while (*desc != 'C') {
-       com_Bytecode(com, *desc == 'A' ? XBC_CAR : XBC_CDR);
-       --desc;
-    }
-}
-
-void
-Com_Cond(LispCom *com, LispBuiltin *builtin)
-/*
- cond &rest body
- */
-{
-    int count;
-    LispObj *code, *body;
-    CodeTree *group, *tree;
-
-    body = ARGUMENT(0);
-
-    count = 0;
-    group = NULL;
-    if (CONSP(body)) {
-       for (; CONSP(body); body = CDR(body)) {
-           code = CAR(body);
-           CHECK_CONS(code);
-           ++count;
-           ComEval(com, CAR(code));
-           tree = NEW_TREE(CodeTreeCond);
-           if (group)
-               group->group = tree;
-           tree->code = XBC_JUMPNIL;
-           group = tree;
-           /* The code to execute if the test is true */
-           ComProgn(com, CDR(code));
-           /* Add a node signaling the end of the PROGN code */
-           tree = NEW_TREE(CodeTreeCond);
-           tree->code = XBC_JUMPT;
-           if (group)
-               group->group = tree;
-           group = tree;
-       }
-    }
-    if (!count)
-       com_Bytecode(com, XBC_NIL);
-    else
-       /* Where to jump after T progn */
-       group->code = XBC_NOOP;
-}
-
-void
-Com_Cons(LispCom *com, LispBuiltin *builtin)
-/*
- cons car cdr
- */
-{
-    LispObj *car, *cdr;
-
-    cdr = ARGUMENT(1);
-    car = ARGUMENT(0);
-
-    if (ComConstantp(com, car) && ComConstantp(com, cdr))
-       com_BytecodeCons(com, XBC_CCONS, car, cdr);
-    else {
-       ++com->stack.cpstack;
-       if (com->stack.pstack < com->stack.cpstack)
-           com->stack.pstack = com->stack.cpstack;
-       ComEval(com, car);
-       com_Bytecode(com, XBC_CSTAR);
-       ComEval(com, cdr);
-       com_Bytecode(com, XBC_CFINI);
-       --com->stack.cpstack;
-    }
-}
-
-void
-Com_Consp(LispCom *com, LispBuiltin *builtin)
-/*
- consp object
- */
-{
-    ComPredicate(com, builtin, XBP_CONSP);
-}
-
-void
-Com_Dolist(LispCom *com, LispBuiltin *builtin)
-/*
- dolist init &rest body
- */
-{
-    int unbound, item;
-    LispObj *symbol, *list, *result;
-    LispObj *init, *body;
-    CodeTree *group, *tree;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    CHECK_CONS(init);
-    symbol = CAR(init);
-    CHECK_SYMBOL(symbol);
-    CHECK_CONSTANT(symbol);
-    init = CDR(init);
-    if (CONSP(init)) {
-       list = CAR(init);
-       init = CDR(init);
-    }
-    else
-       list = NIL;
-    if (CONSP(init)) {
-       result = CAR(init);
-       if (CONSP(CDR(init)))
-           LispDestroy("%s: too many arguments %s",
-                       STRFUN(builtin), STROBJ(CDR(init)));
-    }
-    else
-       result = NIL;
-
-    /* Generate code for the body of the form.
-     * The generated code uses two objects unavailable to user code,
-     * in the format:
-     * (block NIL
-     *     (let ((? list) (item NIL))
-     *         (tagbody
-     *             .                       ; the DOT object as a label
-     *             (when (consp list)
-     *                 (setq item (car ?))
-     *                 @body               ; code to be executed
-     *                 (setq ? (cdr ?))
-     *                 (go .)
-     *             )
-     *         )
-     *         (setq item nil)
-     *         result
-     *     )
-     * )
-     */
-
-    /* XXX All of the logic below should be simplified at some time
-     * by adding more opcodes for compound operations ... */
-
-    /* Relative offsets the locally added variables will have at run time */
-    unbound = lisp__data.env.length - lisp__data.env.lex;
-    item = unbound + 1;
-
-    /* Start BLOCK NIL */
-    FORM_ENTER();
-    CompileIniBlock(com, LispBlockTag, NIL);
-
-    /* Add the <?> variable */
-    ComPush(com, UNBOUND, list, 1, 0, 0);
-    /* Add the <item> variable */
-    ComPush(com, symbol, NIL, 0, 0, 0);
-    /* Stack length is increased */
-    CompileStackEnter(com, 2, 0);
-    /* Bind variables */
-    com_Bind(com, 2);
-    com->block->bind += 2;
-    lisp__data.env.head += 2;
-
-    /* Remember that iteration variable is used even if it not referenced */
-    COM_VARIABLE_USED(symbol->data.atom);
-
-    /* Initialize the TAGBODY */
-    FORM_ENTER();
-    CompileIniBlock(com, LispBlockBody, NIL);
-
-    /* Create the <.> label */
-    ComLabel(com, DOT);
-
-    /* Load <?> variable */
-    com_BytecodeShort(com, XBC_LOAD, unbound);
-    /* Check if <?> is a list */
-    com_BytecodeChar(com, XBC_PRED, XBP_CONSP);
-
-    /* Start WHEN block */
-    group = NEW_TREE(CodeTreeJumpIf);
-    group->code = XBC_JUMPNIL;
-    /* Load <?> again */
-    com_BytecodeShort(com, XBC_LOAD, unbound);
-    /* Get CAR of <?> */
-    com_Bytecode(com, XBC_CAR);
-    /* Store it in <item> */
-    com_BytecodeShort(com, XBC_SET, item);
-    /* Execute @BODY */
-    ComProgn(com, body);
-
-    /* Load <?> again */
-    com_BytecodeShort(com, XBC_LOAD, unbound);
-    /* Get CDR of <?> */
-    com_Bytecode(com, XBC_CDR);
-    /* Change value of <?> */
-    com_BytecodeShort(com, XBC_SET, unbound);
-
-    /* GO back to <.> */
-    tree = NEW_TREE(CodeTreeGo);
-    tree->data.object = DOT;
-
-    /* Finish WHEN block */
-    tree = NEW_TREE(CodeTreeJumpIf);
-    tree->code = XBC_NOOP;
-    group->group = tree;
-
-    /* Finish the TAGBODY */
-    CompileFiniBlock(com);
-    FORM_LEAVE();
-
-    /* Set <item> to NIL, in case result references it...
-     * Loaded value is NIL as the CONSP predicate */
-    com_BytecodeShort(com, XBC_SET, item);
-
-    /* Evaluate <result> */
-    ComEval(com, result);
-
-    /* Unbind variables */
-    lisp__data.env.head -= 2;
-    lisp__data.env.length -= 2;
-    com->block->bind -= 2;
-    com_Unbind(com, 2);
-    /* Stack length is reduced. */
-    CompileStackLeave(com, 2, 0);
-
-    /* Finish BLOCK NIL */
-    CompileFiniBlock(com);
-    FORM_LEAVE();
-}
-
-void
-Com_Eq(LispCom *com, LispBuiltin *builtin)
-/*
- eq left right
- eql left right
- equal left right
- equalp left right
- */
-{
-    LispObj *left, *right;
-    LispByteOpcode code;
-    char *name;
-
-    right = ARGUMENT(1);
-    left = ARGUMENT(0);
-
-    CompileStackEnter(com, 1, 1);
-    /* Just like preparing to call a builtin function */
-    ComEval(com, left);
-    com_Bytecode(com, XBC_PUSH);
-    /* The second argument is now loaded */
-    ComEval(com, right);
-
-    /* Compare arguments and restore builtin stack */
-    name = STRFUN(builtin);
-    switch (name[3]) {
-       case 'L':
-           code = XBC_EQL;
-           break;
-       case 'U':
-           code = name[5] == 'P' ? XBC_EQUALP : XBC_EQUAL;
-           break;
-       default:
-           code = XBC_EQ;
-           break;
-    }
-    com_Bytecode(com, code);
-
-    CompileStackLeave(com, 1, 1);
-}
-
-void
-Com_Go(LispCom *com, LispBuiltin *builtin)
-/*
- go tag
- */
-{
-    int bind;
-    LispObj *tag;
-    CodeTree *tree;
-    CodeBlock *block;
-
-    tag = ARGUMENT(0);
-
-    block = com->block;
-    bind = block->bind;
-
-    while (block) {
-       if (block->type == LispBlockClosure || block->type == LispBlockBody)
-           break;
-       block = block->prev;
-       if (block)
-           bind += block->bind;
-    }
-
-    if (!block || block->type != LispBlockBody)
-       LispDestroy("%s called not within a block", STRFUN(builtin));
-
-    /* Unbind any local variables */
-    com_Unbind(com, bind);
-    tree = NEW_TREE(CodeTreeGo);
-    tree->data.object = tag;
-}
-
-void
-Com_If(LispCom *com, LispBuiltin *builtin)
-/*
- if test then &optional else
- */
-{
-    CodeTree *group, *tree;
-    LispObj *test, *then, *oelse;
-
-    oelse = ARGUMENT(2);
-    then = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    /* Build code to execute test */
-    ComEval(com, test);
-
-    /* Add jump node to use if test is NIL */
-    group = NEW_TREE(CodeTreeJumpIf);
-    group->code = XBC_JUMPNIL;
-
-    /* Build T code */
-    ComEval(com, then);
-
-    if (oelse != UNSPEC) {
-       /* Remember start of NIL code */
-       tree = NEW_TREE(CodeTreeJump);
-       tree->code = XBC_JUMP;
-       group->group = tree;
-       group = tree;
-       /* Build NIL code */
-       ComEval(com, oelse);
-    }
-
-    /* Remember jump of T code */
-    tree = NEW_TREE(CodeTreeJumpIf);
-    tree->code = XBC_NOOP;
-    group->group = tree;
-}
-
-void
-Com_Last(LispCom *com, LispBuiltin *builtin)
-/*
- last list &optional count
- */
-{
-    LispObj *list, *count;
-
-    count = ARGUMENT(1);
-    list = ARGUMENT(0);
-
-    ComEval(com, list);
-    CompileStackEnter(com, 1, 1);
-    com_Bytecode(com, XBC_PUSH);
-    if (count == UNSPEC)
-       count = FIXNUM(1);
-    ComEval(com, count);
-    CompileStackLeave(com, 1, 1);
-    com_Bytecode(com, XBC_LAST);
-}
-
-void
-Com_Length(LispCom *com, LispBuiltin *builtin)
-/*
- length sequence
- */
-{
-    LispObj *sequence;
-
-    sequence = ARGUMENT(0);
-
-    ComEval(com, sequence);
-    com_Bytecode(com, XBC_LENGTH);
-}
-
-void
-Com_Let(LispCom *com, LispBuiltin *builtin)
-/*
- let init &rest body
- */
-{
-    int count;
-    LispObj *symbol, *value, *pair;
-
-    LispObj *init, *body;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    if (init == NIL) {
-       /* If no local variables */
-       ComProgn(com, body);
-       return;
-    }
-    CHECK_CONS(init);
-
-    /* Could optimize if the body is empty and the
-     * init form is known to have no side effects */
-
-    for (count = 0; CONSP(init); init = CDR(init), count++) {
-       pair = CAR(init);
-       if (CONSP(pair)) {
-           symbol = CAR(pair);
-           pair = CDR(pair);
-           if (CONSP(pair)) {
-               value = CAR(pair);
-               if (CDR(pair) != NIL)
-                   LispDestroy("%s: too much arguments to initialize %s",
-                               STRFUN(builtin), STROBJ(symbol));
-           }
-           else
-               value = NIL;
-       }
-       else {
-           symbol = pair;
-           value = NIL;
-       }
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-
-       /* Add the variable */
-       ComPush(com, symbol, value, 1, 0, 0);
-    }
-
-    /* Stack length is increased */
-    CompileStackEnter(com, count, 0);
-    /* Bind the added variables */
-    com_Bind(com, count);
-    com->block->bind += count;
-    lisp__data.env.head += count;
-    /* Generate code for the body of the form */
-    ComProgn(com, body);
-    /* Unbind the added variables */
-    lisp__data.env.head -= count;
-    lisp__data.env.length -= count;
-    com->block->bind -= count;
-    com_Unbind(com, count);
-    /* Stack length is reduced. */
-    CompileStackLeave(com, count, 0);
-}
-
-void
-Com_Letx(LispCom *com, LispBuiltin *builtin)
-/*
- let* init &rest body
- */
-{
-    int count;
-    LispObj *symbol, *value, *pair;
-
-    LispObj *init, *body;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    if (init == NIL) {
-       /* If no local variables */
-       ComProgn(com, body);
-       return;
-    }
-    CHECK_CONS(body);
-
-    /* Could optimize if the body is empty and the
-     * init form is known to have no side effects */
-
-    for (count = 0; CONSP(init); init = CDR(init), count++) {
-       pair = CAR(init);
-       if (CONSP(pair)) {
-           symbol = CAR(pair);
-           pair = CDR(pair);
-           if (CONSP(pair)) {
-               value = CAR(pair);
-               if (CDR(pair) != NIL)
-                   LispDestroy("%s: too much arguments to initialize %s",
-                               STRFUN(builtin), STROBJ(symbol));
-           }
-           else
-               value = NIL;
-       }
-       else {
-           symbol = pair;
-           value = NIL;
-       }
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-
-       /* LET* is identical to &AUX arguments, just bind the symbol */
-       ComPush(com, symbol, value, 1, 0, 0);
-       /* Every added variable is binded */
-       com_Bind(com, 1);
-       /* Must be binded at compile time also */
-       ++lisp__data.env.head;
-       ++com->block->bind;
-    }
-
-    /* Generate code for the body of the form */
-    CompileStackEnter(com, count, 0);
-    ComProgn(com, body);
-    com_Unbind(com, count);
-    com->block->bind -= count;
-    lisp__data.env.head -= count;
-    lisp__data.env.length -= count;
-    CompileStackLeave(com, count, 0);
-}
-
-void
-Com_Listp(LispCom *com, LispBuiltin *builtin)
-/*
- listp object
- */
-{
-    ComPredicate(com, builtin, XBP_LISTP);
-}
-
-void
-Com_Loop(LispCom *com, LispBuiltin *builtin)
-/*
- loop &rest body
- */
-{
-    CodeTree *tree, *group;
-    LispObj *body;
-
-    body = ARGUMENT(0);
-
-    /* Start NIL block */
-    CompileIniBlock(com, LispBlockTag, NIL);
-
-    /* Insert node to mark LOOP start */
-    tree = NEW_TREE(CodeTreeJump);
-    tree->code = XBC_NOOP;
-
-    /* Execute @BODY */
-    if (CONSP(body))
-       ComProgn(com, body);
-    else
-       /* XXX bytecode.c code require that blocks have at least one opcode */
-       com_Bytecode(com, XBC_NIL);
-
-    /* Insert node to jump of start of LOOP */
-    group = NEW_TREE(CodeTreeJump);
-    group->code = XBC_JUMP;
-    group->group = tree;
-
-    /* Finish NIL block */
-    CompileFiniBlock(com);
-}
-
-void
-Com_Nthcdr(LispCom *com, LispBuiltin *builtin)
-/*
- nthcdr index list
- */
-{
-    LispObj *oindex, *list;
-
-    list = ARGUMENT(1);
-    oindex = ARGUMENT(0);
-
-    ComEval(com, oindex);
-    CompileStackEnter(com, 1, 1);
-    com_Bytecode(com, XBC_PUSH);
-    ComEval(com, list);
-    CompileStackLeave(com, 1, 1);
-    com_Bytecode(com, XBC_NTHCDR);
-}
-
-void
-Com_Null(LispCom *com, LispBuiltin *builtin)
-/*
- null list
- */
-{
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    if (list == NIL)
-       com_Bytecode(com, XBC_T);
-    else if (ComConstantp(com, list))
-       com_Bytecode(com, XBC_NIL);
-    else {
-       ComEval(com, list);
-       com_Bytecode(com, XBC_INV);
-    }
-}
-
-void
-Com_Numberp(LispCom *com, LispBuiltin *builtin)
-/*
- numberp object
- */
-{
-    ComPredicate(com, builtin, XBP_NUMBERP);
-}
-
-void
-Com_Or(LispCom *com, LispBuiltin *builtin)
-/*
- or &rest args
- */
-{
-    LispObj *args;
-
-    args = ARGUMENT(0);
-
-    if (CONSP(args)) {
-       /* Evaluate first argument */
-       ComEval(com, CAR(args));
-       args = CDR(args);
-
-       /* If more than one argument, create jump list */
-       if (CONSP(args)) {
-           CodeTree *tree = NULL, *group;
-
-           group = NEW_TREE(CodeTreeJumpIf);
-           group->code = XBC_JUMPT;
-
-           for (; CONSP(args); args = CDR(args)) {
-               ComEval(com, CAR(args));
-               tree = NEW_TREE(CodeTreeJumpIf);
-               tree->code = XBC_JUMPT;
-               group->group = tree;
-               group = tree;
-           }
-           /*  Finish form the last CodeTree code is changed to sign the
-            * end of the AND list */
-           group->code = XBC_NOOP;
-           group->group = tree;
-       }
-    }
-    else
-       /* Identity of OR is NIL */
-       com_Bytecode(com, XBC_NIL);
-}
-
-void
-Com_Progn(LispCom *com, LispBuiltin *builtin)
-/*
- progn &rest body
- */
-{
-    LispObj *body;
-
-    body = ARGUMENT(0);
-
-    ComProgn(com, body);
-}
-
-void
-Com_Return(LispCom *com, LispBuiltin *builtin)
-/*
- return &optional result
- */
-{
-    ComReturnFrom(com, builtin, 0);
-}
-
-void
-Com_ReturnFrom(LispCom *com, LispBuiltin *builtin)
-/*
- return-from name &optional result
- */
-{
-    ComReturnFrom(com, builtin, 1);
-}
-
-void
-Com_Rplac_(LispCom *com, LispBuiltin *builtin)
-/*
- rplac[ad] place value
- */
-{
-    LispObj *place, *value;
-
-    value = ARGUMENT(1);
-    place = ARGUMENT(0);
-
-    CompileStackEnter(com, 1, 1);
-    ComEval(com, place);
-    com_Bytecode(com, XBC_PUSH);
-    ComEval(com, value);
-    com_Bytecode(com, STRFUN(builtin)[5] == 'A' ? XBC_RPLACA : XBC_RPLACD);
-    CompileStackLeave(com, 1, 1);
-}
-
-void
-Com_Setq(LispCom *com, LispBuiltin *builtin)
-/*
- setq &rest form
- */
-{
-    int offset;
-    LispObj *form, *symbol, *value;
-
-    form = ARGUMENT(0);
-
-    for (; CONSP(form); form = CDR(form)) {
-       symbol = CAR(form);
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-       form = CDR(form);
-       if (!CONSP(form))
-           LispDestroy("%s: odd number of arguments", STRFUN(builtin));
-       value = CAR(form);
-       /* Generate code to load value */
-       ComEval(com, value);
-       offset = ComGetVariable(com, symbol);
-       if (offset >= 0)
-           com_Set(com, offset);
-       else
-           com_SetSym(com, symbol->data.atom);
-    }
-}
-
-void
-Com_Tagbody(LispCom *com, LispBuiltin *builtin)
-/*
- tagbody &rest body
- */
-{
-    LispObj *body;
-
-    body = ARGUMENT(0);
-
-    if (CONSP(body)) {
-       CompileIniBlock(com, LispBlockBody, NIL);
-       ComProgn(com, body);
-       /* Tagbody returns NIL */
-       com_Bytecode(com, XBC_NIL);
-       CompileFiniBlock(com);
-    }
-    else
-       /* Tagbody always returns NIL */
-       com_Bytecode(com, XBC_NIL);
-}
-
-void
-Com_Unless(LispCom *com, LispBuiltin *builtin)
-/*
- unless test &rest body
- */
-{
-    CodeTree *group, *tree;
-    LispObj *test, *body;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    /* Generate code to evaluate test */
-    ComEval(com, test);
-    /* Add node after test */
-    group = NEW_TREE(CodeTreeJumpIf);
-    group->code = XBC_JUMPT;
-    /* Generate NIL code */
-    ComProgn(com, body);
-    /* Insert node to know where to jump if test is T */
-    tree = NEW_TREE(CodeTreeJumpIf);
-    tree->code = XBC_NOOP;
-    group->group = tree;
-}
-
-void
-Com_Until(LispCom *com, LispBuiltin *builtin)
-/*
- until test &rest body
- */
-{
-    CodeTree *tree, *group, *ltree, *lgroup;
-    LispObj *test, *body;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    /* Insert node to mark LOOP start */
-    ltree = NEW_TREE(CodeTreeJump);
-    ltree->code = XBC_NOOP;
-
-    /* Build code for test */
-    ComEval(com, test);
-    group = NEW_TREE(CodeTreeJumpIf);
-    group->code = XBC_JUMPT;
-
-    /* Execute @BODY */
-    ComProgn(com, body);
-
-    /* Insert node to jump to test again */
-    lgroup = NEW_TREE(CodeTreeJump);
-    lgroup->code = XBC_JUMP;
-    lgroup->group = ltree;
-
-    /* Insert node to know where to jump if test is T */
-    tree = NEW_TREE(CodeTreeJumpIf);
-    tree->code = XBC_NOOP;
-    group->group = tree;
-}
-
-void
-Com_When(LispCom *com, LispBuiltin *builtin)
-/*
- when test &rest body
- */
-{
-    CodeTree *group, *tree;
-    LispObj *test, *body;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    /* Generate code to evaluate test */
-    ComEval(com, test);
-    /* Add node after test */
-    group = NEW_TREE(CodeTreeJumpIf);
-    group->code = XBC_JUMPNIL;
-    /* Generate T code */
-    ComProgn(com, body);
-    /* Insert node to know where to jump if test is NIL */
-    tree = NEW_TREE(CodeTreeJumpIf);
-    tree->code = XBC_NOOP;
-    group->group = tree;
-}
-
-void
-Com_While(LispCom *com, LispBuiltin *builtin)
-/*
- while test &rest body
- */
-{
-    CodeTree *tree, *group, *ltree, *lgroup;
-    LispObj *test, *body;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    /* Insert node to mark LOOP start */
-    ltree = NEW_TREE(CodeTreeJump);
-    ltree->code = XBC_NOOP;
-
-    /* Build code for test */
-    ComEval(com, test);
-    group = NEW_TREE(CodeTreeJumpIf);
-    group->code = XBC_JUMPNIL;
-
-    /* Execute @BODY */
-    ComProgn(com, body);
-
-    /* Insert node to jump to test again */
-    lgroup = NEW_TREE(CodeTreeJump);
-    lgroup->code = XBC_JUMP;
-    lgroup->group = ltree;
-
-    /* Insert node to know where to jump if test is NIL */
-    tree = NEW_TREE(CodeTreeJumpIf);
-    tree->code = XBC_NOOP;
-    group->group = tree;
-}
-
-
-/***********************************************************************
- * Com_XXX helper functions
- ***********************************************************************/
-static void
-ComPredicate(LispCom *com, LispBuiltin *builtin, LispBytePredicate predicate)
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    if (ComConstantp(com, object)) {
-       switch (predicate) {
-           case XBP_CONSP:
-               com_Bytecode(com, CONSP(object) ? XBC_T : XBC_NIL);
-               break;
-           case XBP_LISTP:
-               com_Bytecode(com, CONSP(object) || object == NIL ?
-                            XBC_T : XBC_NIL);
-               break;
-           case XBP_NUMBERP:
-               com_Bytecode(com, NUMBERP(object) ? XBC_T : XBC_NIL);
-               break;
-       }
-    }
-    else {
-       ComEval(com, object);
-       com_BytecodeChar(com, XBC_PRED, predicate);
-    }
-}
-
-/* XXX Could receive an argument telling if is the last statement in the
- * block(s), i.e. if a jump opcode should be generated or just the
- * evaluation of the returned value. Probably this is better done in
- * an optimization step. */
-static void
-ComReturnFrom(LispCom *com, LispBuiltin *builtin, int from)
-{
-    int bind;
-    CodeTree *tree;
-    LispObj *name, *result;
-    CodeBlock *block = com->block;
-
-    if (from) {
-       result = ARGUMENT(1);
-       name = ARGUMENT(0);
-    }
-    else {
-       result = ARGUMENT(0);
-       name = NIL;
-    }
-    if (result == UNSPEC)
-       result = NIL;
-
-    bind = block->bind;
-    while (block) {
-       if (block->type == LispBlockClosure)
-           /* A function call */
-           break;
-       else if (block->type == LispBlockTag && block->tag == name)
-           break;
-       block = block->prev;
-       if (block)
-           bind += block->bind;
-    }
-
-    if (!block || block->tag != name)
-       LispDestroy("%s: no visible %s block", STRFUN(builtin), STROBJ(name));
-
-    /* Generate code to load result */
-    ComEval(com, result);
-
-    /* Check for added variables that the jump is skiping the unbind opcode */
-    com_Unbind(com, bind);
-
-    tree = NEW_TREE(CodeTreeReturn);
-    tree->data.block = block;
-}
-
-/***********************************************************************
- * Helper functions
- ***********************************************************************/
-static int
-ComConstantp(LispCom *com, LispObj *object)
-{
-    switch (OBJECT_TYPE(object)) {
-       case LispAtom_t:
-           /* Keywords are guaranteed to evaluate to itself */
-           if (object->data.atom->package == lisp__data.keyword)
-               break;
-           return (0);
-
-           /* Function call */
-       case LispCons_t:
-
-           /* Need macro expansion, these are special abstract objects */
-       case LispQuote_t:
-       case LispBackquote_t:
-       case LispComma_t:
-       case LispFunctionQuote_t:
-           return (0);
-
-           /* Anything else is a literal constant */
-       default:
-           break;
-    }
-
-    return (1);
-}
-
-static int
-FindIndex(void *item, void **table, int length)
-{
-    long cmp;
-    int left, right, i;
-
-    left = 0;
-    right = length - 1;
-    while (left <= right) {
-       i = (left + right) >> 1;
-       cmp = (char*)item - (char*)table[i];
-       if (cmp == 0)
-           return (i);
-       else if (cmp < 0)
-           right = i - 1;
-       else
-           left = i + 1;
-    }
-
-    return (-1);
-}
-
-static int
-compare(const void *left, const void *right)
-{
-    long cmp = *(char**)left - *(char**)right;
-
-    return (cmp < 0 ? -1 : 1);
-}
-
-static int
-BuildTablePointer(void *pointer, void ***pointers, int *num_pointers)
-{
-    int i;
-
-    if ((i = FindIndex(pointer, *pointers, *num_pointers)) < 0) {
-       *pointers = LispRealloc(*pointers,
-                               sizeof(void*) * (*num_pointers + 1));
-       (*pointers)[*num_pointers] = pointer;
-       if (++*num_pointers > 1)
-           qsort(*pointers, *num_pointers, sizeof(void*), compare);
-       i = FindIndex(pointer, *pointers, *num_pointers);
-    }
-
-    return (i);
-}
-
-static void
-ComAddVariable(LispCom *com, LispObj *symbol, LispObj *value)
-{
-    LispAtom *atom = symbol->data.atom;
-
-    if (atom && atom->key && !com->macro) {
-       int i, length = com->block->variables.length;
-
-       i = BuildTablePointer(atom, (void***)&com->block->variables.symbols,
-                             &com->block->variables.length);
-
-       if (com->block->variables.length != length) {
-           com->block->variables.flags =
-               LispRealloc(com->block->variables.flags,
-                           com->block->variables.length * sizeof(int));
-
-           /* Variable was inserted in the middle of the list */
-           if (i < length)
-               memmove(com->block->variables.flags + i + 1,
-                       com->block->variables.flags + i,
-                       (length - i) * sizeof(int));
-
-           com->block->variables.flags[i] = 0;
-       }
-    }
-
-    LispAddVar(symbol, value);
-}
-
-static int
-ComGetVariable(LispCom *com, LispObj *symbol)
-{
-    LispAtom *name;
-    int i, base, offset;
-    Atom_id id;
-
-    name = symbol->data.atom;
-    if (name->constant) {
-       if (name->package == lisp__data.keyword)
-           /*  Just load <symbol> from the byte stream, keywords are
-            * guaranteed to evaluate to itself. */
-           return (SYMBOL_KEYWORD);
-       return (SYMBOL_CONSTANT);
-    }
-
-    offset = name->offset;
-    id = name->key;
-    base = lisp__data.env.lex;
-    i = lisp__data.env.head - 1;
-
-    /* If variable is local */
-    if (offset <= i && offset >= com->lex && lisp__data.env.names[offset] == id) {
-       COM_VARIABLE_USED(name);
-       /* Relative offset */
-       return (offset - base);
-    }
-
-    /* name->offset may have been changed in a macro expansion */
-    for (; i >= com->lex; i--)
-       if (lisp__data.env.names[i] == id) {
-           name->offset = i;
-           COM_VARIABLE_USED(name);
-           return (i - base);
-       }
-
-    if (!name->a_object) {
-       ++com->warnings;
-       LispWarning("variable %s is neither declared nor bound",
-                   name->key->value);
-    }
-
-    /* Not found, resolve <symbol> at run time */
-    return (SYMBOL_UNBOUND);
-}
-
-static void
-ComVariableSetFlag(LispCom *com, LispAtom *atom, int flag)
-{
-    int i;
-    CodeBlock *block = com->block;
-
-    while (block) {
-       i = FindIndex(atom, (void**)block->variables.symbols,
-                     block->variables.length);
-       if (i >= 0) {
-           block->variables.flags[i] |= flag;
-           /*  Descend block list if an argument to function being called
-            * has the same name as a bound variable in the current function.
-            */
-           if ((flag & VARIABLE_ARGUMENT) ||
-               !(block->variables.flags[i] & VARIABLE_ARGUMENT))
-               break;
-       }
-       block = block->prev;
-    }
-}
-
-/***********************************************************************
- * Bytecode compiler functions
- ***********************************************************************/
-static void
-ComLabel(LispCom *com, LispObj *label)
-{
-    int i;
-    CodeTree *tree;
-
-    for (i = 0; i < com->block->tagbody.length; i++)
-       if (label == com->block->tagbody.labels[i])
-           LispDestroy("TAGBODY: tag %s specified more than once",
-                       STROBJ(label));
-
-    if (com->block->tagbody.length >= com->block->tagbody.space) {
-       com->block->tagbody.labels =
-           LispRealloc(com->block->tagbody.labels,
-                       sizeof(LispObj*) * (com->block->tagbody.space + 8));
-       /*  Reserve space, will be used at link time when
-        * resolving GO jumps. */
-       com->block->tagbody.codes =
-           LispRealloc(com->block->tagbody.codes,
-                       sizeof(CodeTree*) * (com->block->tagbody.space + 8));
-       com->block->tagbody.space += 8;
-    }
-
-    com->block->tagbody.labels[com->block->tagbody.length++] = label;
-    tree = NEW_TREE(CodeTreeLabel);
-    tree->data.object = label;
-}
-
-static void
-ComPush(LispCom *com, LispObj *symbol, LispObj *value,
-       int eval, int builtin, int compile)
-{
-    /*  If <compile> is set, it is pushing an argument to one of
-     * Com_XXX functions. */
-    if (compile) {
-       if (builtin)
-           lisp__data.stack.values[lisp__data.stack.length++] = value;
-       else
-           ComAddVariable(com, symbol, value);
-       return;
-    }
-
-    /*  If <com->macro> is set, it is expanding a macro, just add the local
-     * variable <symbol> bounded to <value>, so that it will be available
-     * when calling the interpreter to expand the macro. */
-    else if (com->macro) {
-       ComAddVariable(com, symbol, value);
-       return;
-    }
-
-    /*  If <eval> is set, it must generate the opcodes to evaluate <value>.
-     * If <value> is a constant, just generate the opcodes to load it. */
-    else if (eval && !ComConstantp(com, value)) {
-       switch (OBJECT_TYPE(value)) {
-           case LispAtom_t: {
-               int offset = ComGetVariable(com, value);
-
-               if (offset >= 0) {
-                   /* Load <value> from user stack at the relative offset */
-                   if (builtin)
-                       com_LoadPush(com, offset);
-                   else
-                       com_LoadLet(com, offset, symbol->data.atom);
-               }
-               /* ComConstantp() does not return true for this, as the
-                * current value must be computed. */
-               else if (offset == SYMBOL_CONSTANT) {
-                   value = value->data.atom->property->value;
-                   if (builtin)
-                       com_LoadConPush(com, value);
-                   else
-                       com_LoadConLet(com, value, symbol->data.atom);
-               }
-               else {
-                   /* Load value bound to <value> at run time */
-                   if (builtin)
-                       com_LoadSymPush(com, value->data.atom);
-                   else
-                       com_LoadSymLet(com, value->data.atom,
-                                      symbol->data.atom);
-               }
-           }   break;
-
-           default:
-               /* Generate code to evaluate <value> */
-               ComEval(com, value);
-               if (builtin)
-                   com_Bytecode(com, XBC_PUSH);
-               else
-                   com_Let(com, symbol->data.atom);
-               break;
-       }
-
-       /*  Remember <symbol> will be bound, <value> only matters for
-        * the Com_XXX  functions */
-       if (builtin)
-           lisp__data.stack.values[lisp__data.stack.length++] = value;
-       else
-           ComAddVariable(com, symbol, value);
-       return;
-    }
-
-    if (builtin) {
-       /* Load <value> as a constant in builtin stack */
-       com_LoadConPush(com, value);
-       lisp__data.stack.values[lisp__data.stack.length++] = value;
-    }
-    else {
-       /* Load <value> as a constant in stack */
-       com_LoadConLet(com, value, symbol->data.atom);
-       /* Remember <symbol> will be bound */
-       ComAddVariable(com, symbol, value);
-    }
-}
-
-/*  This function does almost the same job as LispMakeEnvironment, but
- * it is not optimized for speed, as it is not building argument lists
- * to user code, but to Com_XXX functions, or helping in generating the
- * opcodes to load arguments at bytecode run time. */
-static int
-ComCall(LispCom *com, LispArgList *alist,
-       LispObj *name, LispObj *values,
-       int eval, int builtin, int compile)
-{
-    char *desc;
-    int i, count, base;
-    LispObj **symbols, **defaults, **sforms;
-
-    if (builtin) {
-       base = lisp__data.stack.length;
-       /* This should never be executed, but make the check for safety */
-       if (base + alist->num_arguments > lisp__data.stack.space) {
-           do
-               LispMoreStack();
-           while (base + alist->num_arguments > lisp__data.stack.space);
-       }
-    }
-    else
-       base = lisp__data.env.length;
-
-    desc = alist->description;
-    switch (*desc++) {
-       case '.':
-           goto normal_label;
-       case 'o':
-           goto optional_label;
-       case 'k':
-           goto key_label;
-       case 'r':
-           goto rest_label;
-       case 'a':
-           goto aux_label;
-       default:
-           goto done_label;
-    }
-
-
-    /* Normal arguments */
-normal_label:
-    i = 0;
-    symbols = alist->normals.symbols;
-    count = alist->normals.num_symbols;
-    for (; i < count && CONSP(values); i++, values = CDR(values)) {
-       ComPush(com, symbols[i], CAR(values), eval, builtin, compile);
-       if (!builtin && !com->macro)
-           COM_VARIABLE_ARGUMENT(symbols[i]->data.atom);
-    }
-    if (i < count)
-       LispDestroy("%s: too few arguments", STROBJ(name));
-
-    switch (*desc++) {
-       case 'o':
-           goto optional_label;
-       case 'k':
-           goto key_label;
-       case 'r':
-           goto rest_label;
-       case 'a':
-           goto aux_label;
-       default:
-           goto done_label;
-    }
-
-
-    /* &OPTIONAL */
-optional_label:
-    i = 0;
-    count = alist->optionals.num_symbols;
-    symbols = alist->optionals.symbols;
-    defaults = alist->optionals.defaults;
-    sforms = alist->optionals.sforms;
-    for (; i < count && CONSP(values); i++, values = CDR(values)) {
-       ComPush(com, symbols[i], CAR(values), eval, builtin, compile);
-       if (!builtin && !com->macro)
-           COM_VARIABLE_ARGUMENT(symbols[i]->data.atom);
-       if (sforms[i]) {
-           ComPush(com, sforms[i], T, 0, builtin, compile);
-           if (!builtin && !com->macro)
-               COM_VARIABLE_ARGUMENT(sforms[i]->data.atom);
-       }
-    }
-    for (; i < count; i++) {
-       if (!builtin) {
-           int lex = com->lex;
-           int head = lisp__data.env.head;
-
-           com->lex = base;
-           lisp__data.env.head = lisp__data.env.length;
-           /* default arguments are evaluated for macros */
-           ComPush(com, symbols[i], defaults[i], 1, 0, compile);
-           if (!com->macro)
-               COM_VARIABLE_ARGUMENT(symbols[i]->data.atom);
-           lisp__data.env.head = head;
-           com->lex = lex;
-       }
-       else
-           ComPush(com, symbols[i], defaults[i], eval, 1, compile);
-       if (sforms[i]) {
-           ComPush(com, sforms[i], NIL, 0, builtin, compile);
-           if (!builtin && !com->macro)
-               COM_VARIABLE_ARGUMENT(sforms[i]->data.atom);
-       }
-    }
-
-    switch (*desc++) {
-       case 'k':
-           goto key_label;
-       case 'r':
-           goto rest_label;
-       case 'a':
-           goto aux_label;
-       default:
-           goto done_label;
-    }
-
-
-    /* &KEY */
-key_label:
-    {
-       int varset;
-       LispObj *val, *karg, **keys;
-
-       count = alist->keys.num_symbols;
-       symbols = alist->keys.symbols;
-       defaults = alist->keys.defaults;
-       sforms = alist->keys.sforms;
-       keys = alist->keys.keys;
-
-       /* Check if arguments are correctly specified */
-       for (karg = values; CONSP(karg); karg = CDR(karg)) {
-           val = CAR(karg);
-           if (KEYWORDP(val)) {
-               for (i = 0; i < alist->keys.num_symbols; i++)
-                   if (!keys[i] && symbols[i] == val)
-                       break;
-           }
-
-           else if (!builtin &&
-                    QUOTEP(val) && SYMBOLP(val->data.quote)) {
-               for (i = 0; i < alist->keys.num_symbols; i++)
-                   if (keys[i] && ATOMID(keys[i]) == ATOMID(val->data.quote))
-                       break;
-           }
-
-           else
-               /* Just make the error test true */
-               i = alist->keys.num_symbols;
-
-           if (i == alist->keys.num_symbols) {
-               /* If not in argument specification list... */
-               char function_name[36];
-
-               strcpy(function_name, STROBJ(name));
-               LispDestroy("%s: invalid keyword %s",
-                           function_name, STROBJ(val));
-           }
-
-           karg = CDR(karg);
-           if (!CONSP(karg))
-               LispDestroy("%s: &KEY needs arguments as pairs",
-                           STROBJ(name));
-       }
-
-       /* Add variables */
-       for (i = 0; i < alist->keys.num_symbols; i++) {
-           val = defaults[i];
-           varset = 0;
-           if (!builtin && keys[i]) {
-               Atom_id atom = ATOMID(keys[i]);
-
-               /* Special keyword specification, need to compare ATOMID
-                * and keyword specification must be a quoted object */
-               for (karg = values; CONSP(karg); karg = CDR(karg)) {
-                   val = CAR(karg);
-                   if (QUOTEP(val) && atom == ATOMID(val->data.quote)) {
-                       val = CADR(karg);
-                       varset = 1;
-                       break;
-                   }
-                   karg = CDR(karg);
-               }
-           }
-
-           else {
-               /* Normal keyword specification, can compare object pointers,
-                * as they point to the same object in the keyword package */
-               for (karg = values; CONSP(karg); karg = CDR(karg)) {
-                   /* Don't check if argument is a valid keyword or
-                    * special quoted keyword */
-                   if (symbols[i] == CAR(karg)) {
-                       val = CADR(karg);
-                       varset = 1;
-                       break;
-                   }
-                   karg = CDR(karg);
-               }
-           }
-
-           /* Add the variable to environment */
-           if (varset) {
-               ComPush(com, symbols[i], val, eval, builtin, compile);
-               if (sforms[i])
-                   ComPush(com, sforms[i], T, 0, builtin, compile);
-           }
-           else {
-               /* default arguments are evaluated for macros */
-               if (!builtin) {
-                   int lex = com->lex;
-                   int head = lisp__data.env.head;
-
-                   com->lex = base;
-                   lisp__data.env.head = lisp__data.env.length;
-                   ComPush(com, symbols[i], val, eval, 0, compile);
-                   lisp__data.env.head = head;
-                   com->lex = lex;
-               }
-               else
-                   ComPush(com, symbols[i], val, eval, builtin, compile);
-               if (sforms[i])
-                   ComPush(com, sforms[i], NIL, 0, builtin, compile);
-           }
-           if (!builtin && !com->macro) {
-               COM_VARIABLE_ARGUMENT(symbols[i]->data.atom);
-               if (sforms[i])
-                   COM_VARIABLE_ARGUMENT(sforms[i]->data.atom);
-           }
-       }
-    }
-
-    if (*desc == 'a') {
-       /* &KEY uses all remaining arguments */
-       values = NIL;
-       goto aux_label;
-    }
-    goto finished_label;
-
-
-    /* &REST */
-rest_label:
-    if (!eval || !CONSP(values) || (compile && !builtin))
-       ComPush(com, alist->rest, values, eval, builtin, compile);
-    else {
-       char *string;
-       LispObj *list, *car = NIL;
-       int count, constantp;
-
-       /* Count number of arguments and check if it is a list of constants */
-       for (count = 0, constantp = 1, list = values;
-            CONSP(list);
-            list = CDR(list), count++) {
-           car = CAR(list);
-           if (!ComConstantp(com, car))
-               constantp = 0;
-       }
-
-       string = builtin ? ATOMID(name)->value : NULL;
-       /* XXX FIXME should have a flag indicating if function call
-        * change the &REST arguments even if it is a constant list
-        * (or if the returned value may be changed). */
-       if (string && (count < MAX_BCONS || constantp) &&
-           strcmp(string, "LIST") &&
-           strcmp(string, "APPLY") &&  /* XXX depends on function argument */
-           strcmp(string, "VECTOR") &&
-           /* Append does not copy the last/single list */
-           (strcmp(string, "APPEND") || !CONSP(car))) {
-           if (constantp) {
-               /* If the builtin function changes the &REST parameters, must
-                * define a Com_XXX function for it. */
-               ComPush(com, alist->rest, values, 0, builtin, compile);
-           }
-           else {
-               CompileStackEnter(com, count - 1, 1);
-               for (; CONSP(CDR(values)); values = CDR(values)) {
-                   /* Evaluate this argument */
-                   ComEval(com, CAR(values));
-                   /* Save result in builtin stack */
-                   com_Bytecode(com, XBC_PUSH);
-               }
-               CompileStackLeave(com, count - 1, 1);
-               /* The last argument is not saved in the stack */
-               ComEval(com, CAR(values));
-               values = NIL;
-               com_Bytecode(com, (LispByteOpcode)(XBC_BCONS + (count - 1)));
-           }
-       }
-       else {
-           /* Allocate a fresh list of cons */
-
-           /* Generate code to load object */
-           ComEval(com, CAR(values));
-
-           com->stack.cpstack += 2;
-           if (com->stack.pstack < com->stack.cpstack)
-               com->stack.pstack = com->stack.cpstack;
-           /* Start building a gc protected list, with the loaded value */
-           com_Bytecode(com, XBC_LSTAR);
-
-           for (values = CDR(values); CONSP(values); values = CDR(values)) {
-               /* Generate code to load object */
-               ComEval(com, CAR(values));
-
-               /* Add loaded value to gc protected list */
-               com_Bytecode(com, XBC_LCONS);
-           }
-
-           /* Finish gc protected list */
-           com_Bytecode(com, XBC_LFINI);
-
-           /* Push loaded value */
-           if (builtin)
-               com_Bytecode(com, XBC_PUSH);
-           else {
-               com_Let(com, alist->rest->data.atom);
-
-               /* Remember this symbol will be bound */
-               ComAddVariable(com, alist->rest, values);
-           }
-           com->stack.cpstack -= 2;
-       }
-    }
-    if (!builtin && !com->macro)
-       COM_VARIABLE_ARGUMENT(alist->rest->data.atom);
-    if (*desc != 'a')
-       goto finished_label;
-
-
-    /* &AUX */
-aux_label:
-    i = 0;
-    count = alist->auxs.num_symbols;
-    symbols = alist->auxs.symbols;
-    defaults = alist->auxs.initials;
-    if (!builtin && !compile) {
-       int lex = com->lex;
-
-       com->lex = base;
-       lisp__data.env.head = lisp__data.env.length;
-       for (; i < count; i++) {
-           ComPush(com, symbols[i], defaults[i], 1, 0, 0);
-           if (!com->macro)
-               COM_VARIABLE_ARGUMENT(symbols[i]->data.atom);
-           ++lisp__data.env.head;
-       }
-       com->lex = lex;
-    }
-    else {
-       for (; i < count; i++) {
-           ComPush(com, symbols[i], defaults[i], eval, builtin, compile);
-           if (!builtin && !com->macro)
-               COM_VARIABLE_ARGUMENT(symbols[i]->data.atom);
-       }
-    }
-
-done_label:
-    if (CONSP(values))
-       LispDestroy("%s: too many arguments", STROBJ(name));
-
-finished_label:
-    if (builtin)
-       lisp__data.stack.base = base;
-    else
-       lisp__data.env.head = lisp__data.env.length;
-
-    return (base);
-}
-
-static void
-ComFuncall(LispCom *com, LispObj *function, LispObj *arguments, int eval)
-{
-    int base, compile;
-    LispAtom *atom;
-    LispArgList *alist;
-    LispBuiltin *builtin;
-    LispObj *lambda;
-
-    switch (OBJECT_TYPE(function)) {
-       case LispFunction_t:
-           function = function->data.atom->object;
-       case LispAtom_t:
-           atom = function->data.atom;
-           alist = atom->property->alist;
-
-           if (atom->a_builtin) {
-               builtin = atom->property->fun.builtin;
-               compile = builtin->compile != NULL;
-
-               /*  If one of:
-                *      o expanding a macro
-                *      o calling a builtin special form
-                *      o builtin function is a macro
-                * don't evaluate arguments. */
-               if (com->macro || compile || builtin->type == LispMacro)
-                   eval = 0;
-
-               if (!com->macro && builtin->type == LispMacro) {
-                   /* Set flag of variable used, in case variable is only
-                    * used as a builtin macro argument. */
-                   LispObj *obj;
-
-                   for (obj = arguments; CONSP(obj); obj = CDR(obj)) {
-                       if (SYMBOLP(CAR(obj)))
-                           COM_VARIABLE_USED(CAR(obj)->data.atom);
-                   }
-               }
-
-               FORM_ENTER();
-               if (!compile && !com->macro)
-                   CompileStackEnter(com, alist->num_arguments, 1);
-
-               /* Build argument list in the interpreter stacks */
-               base = ComCall(com, alist, function, arguments,
-                              eval, 1, compile);
-
-               /* If <compile> is set, it is a special form */
-               if (compile)
-                   builtin->compile(com, builtin);
-
-               /* Else, generate opcodes to call builtin function */
-               else {
-                   com_Call(com, alist->num_arguments, builtin);
-                   CompileStackLeave(com, alist->num_arguments, 1);
-               }
-               lisp__data.stack.base = lisp__data.stack.length = base;
-               FORM_LEAVE();
-           }
-           else if (atom->a_function) {
-               int macro;
-
-               lambda = atom->property->fun.function;
-               macro = lambda->funtype == LispMacro;
-
-               /* If <macro> is set, expand macro */
-               if (macro)
-                   ComMacroCall(com, alist, function, lambda, arguments);
-
-               else {
-                   if (com->toplevel->type == LispBlockClosure &&
-                       com->toplevel->tag == function)
-                       ComRecursiveCall(com, alist, function, arguments);
-                   else {
-#if 0
-                       ComInlineCall(com, alist, function, arguments,
-                                     lambda->data.lambda.code);
-#else
-                       com_Funcall(com, function, arguments);
-#endif
-                   }
-               }
-           }
-           else if (atom->a_defstruct &&
-                    atom->property->structure.function != STRUCT_NAME &&
-                    atom->property->structure.function != STRUCT_CONSTRUCTOR) {
-               LispObj *definition = atom->property->structure.definition;
-
-               if (!CONSP(arguments) || CONSP(CDR(arguments)))
-                   LispDestroy("%s: too %s arguments", atom->key->value,
-                               CONSP(arguments) ? "many" : "few");
-
-               ComEval(com, CAR(arguments));
-               if (atom->property->structure.function == STRUCT_CHECK)
-                   com_Structp(com, definition);
-               else
-                   com_Struct(com,
-                              atom->property->structure.function, definition);
-           }
-           else if (atom->a_compiled) {
-               FORM_ENTER();
-               CompileStackEnter(com, alist->num_arguments, 0);
-
-               /* Build argument list in the interpreter stacks */
-               base = ComCall(com, alist, function, arguments, 1, 0, 0);
-               com_Bytecall(com, alist->num_arguments,
-                            atom->property->fun.function);
-               CompileStackLeave(com, alist->num_arguments, 0);
-               lisp__data.env.head = lisp__data.env.length = base;
-               FORM_LEAVE();
-           }
-           else {
-               /* Not yet defined function/macro. */
-               ++com->warnings;
-               LispWarning("call to undefined function %s", atom->key->value);
-               com_Funcall(com, function, arguments);
-           }
-           break;
-
-       case LispLambda_t:
-           lambda = function->data.lambda.code;
-           alist = (LispArgList*)function->data.lambda.name->data.opaque.data;
-           ComInlineCall(com, alist, NIL, arguments, lambda->data.lambda.code);
-           break;
-
-       case LispCons_t:
-           if (CAR(function) == Olambda) {
-               function = EVAL(function);
-               if (LAMBDAP(function)) {
-                   GC_ENTER();
-
-                   GC_PROTECT(function);
-                   lambda = function->data.lambda.code;
-                   alist = (LispArgList*)function->data.lambda.name->data.opaque.data;
-                   ComInlineCall(com, alist, NIL, arguments, lambda->data.lambda.code);
-                   GC_LEAVE();
-                   break;
-               }
-           }
-
-       default:
-           /*  XXX If bytecode objects are made available, should
-            * handle it here. */
-           LispDestroy("EVAL: %s is invalid as a function",
-                       STROBJ(function));
-           /*NOTREACHED*/
-           break;
-    }
-}
-
-/* Generate opcodes for an implicit PROGN */
-static void
-ComProgn(LispCom *com, LispObj *code)
-{
-    if (CONSP(code)) {
-       for (; CONSP(code); code = CDR(code))
-           ComEval(com, CAR(code));
-    }
-    else
-       /* If no code to execute, empty PROGN returns NIL */
-       com_Bytecode(com, XBC_NIL);
-}
-
-/* Generate opcodes to evaluate <object>. */
-static void
-ComEval(LispCom *com, LispObj *object)
-{
-    int offset;
-    LispObj *form;
-
-    switch (OBJECT_TYPE(object)) {
-       case LispAtom_t:
-           if (IN_TAGBODY())
-               ComLabel(com, object);
-           else {
-               offset = ComGetVariable(com, object);
-               if (offset >= 0)
-                   /* Load from user stack at relative offset */
-                   com_Load(com, offset);
-               else if (offset == SYMBOL_KEYWORD)
-                   com_LoadCon(com, object);
-               else if (offset == SYMBOL_CONSTANT)
-                   /* Symbol defined as constant, just load it's value */
-                   com_LoadCon(com, LispGetVar(object));
-               else
-                   /* Load value bound to symbol at run time */
-                   com_LoadSym(com, object->data.atom);
-           }
-           break;
-
-       case LispCons_t: {
-           /* Macro expansion may be done in the object form */
-           form = com->form;
-           com->form = object;
-           ComFuncall(com, CAR(object), CDR(object), 1);
-           com->form = form;
-       }   break;
-
-       case LispQuote_t:
-           com_LoadCon(com, object->data.quote);
-           break;
-
-       case LispBackquote_t:
-           /* Macro expansion is stored in the current value of com->form */
-           ComMacroBackquote(com, object);
-           break;
-
-       case LispComma_t:
-           LispDestroy("EVAL: comma outside of backquote");
-           break;
-
-       case LispFunctionQuote_t:
-           object = object->data.quote;
-           if (SYMBOLP(object))
-               object = LispSymbolFunction(object);
-           else if (CONSP(object) && CAR(object) == Olambda) {
-               /* object will only be associated with bytecode later,
-                * so, make sure it is protected until compilation finishes */
-               object = EVAL(object);
-               RPLACD(com->plist, CONS(CAR(com->plist), CDR(com->plist)));
-               RPLACA(com->plist, object);
-           }
-           else
-               LispDestroy("FUNCTION: %s is not a function", STROBJ(object));
-           com_LoadCon(com, object);
-           break;
-
-       case LispFixnum_t:
-           if (IN_TAGBODY()) {
-               ComLabel(com, object);
-               break;
-           }
-           /*FALLTROUGH*/
-
-       default:
-           /* Constant object */
-           com_LoadCon(com, object);
-           break;
-    }
-}
-
-/***********************************************************************
- * Lambda expansion helper functions
- ***********************************************************************/
-static void
-ComRecursiveCall(LispCom *com, LispArgList *alist,
-                LispObj *name, LispObj *arguments)
-{
-    int base, lex;
-
-    /* Save state */
-    lex = lisp__data.env.lex;
-
-    FORM_ENTER();
-
-    /* Generate code to push function arguments in the stack */
-    base = ComCall(com, alist, name, arguments, 1, 0, 0);
-
-    /* Stack will grow this amount */
-    CompileStackEnter(com, alist->num_arguments, 0);
-
-#if 0
-    /* Make the variables available at run time */
-    com_Bind(com, alist->num_arguments);
-    com->block->bind += alist->num_arguments;
-#endif
-
-    com_BytecodeChar(com, XBC_LETREC, alist->num_arguments);
-
-#if 0
-    /* The variables are now unbound */
-    com_Unbind(com, alist->num_arguments);
-    com->block->bind -= alist->num_arguments;
-#endif
-
-    /* Stack length is reduced */
-    CompileStackLeave(com, alist->num_arguments, 0);
-    FORM_LEAVE();
-
-    /* Restore state */
-    lisp__data.env.lex = lex;
-    lisp__data.env.head = lisp__data.env.length = base;
-}
-
-static void
-ComInlineCall(LispCom *com, LispArgList *alist,
-             LispObj *name, LispObj *arguments, LispObj *lambda)
-{
-    int base, lex;
-
-    /* Save state */
-    lex = lisp__data.env.lex;
-
-    FORM_ENTER();
-    /* Start the inline function block */
-    CompileIniBlock(com, LispBlockClosure, name);
-
-    /* Generate code to push function arguments in the stack */
-    base = ComCall(com, alist, name, arguments, 1, 0, 0);
-
-    /* Stack will grow this amount */
-    CompileStackEnter(com, alist->num_arguments, 0);
-
-    /* Make the variables available at run time */
-    com_Bind(com, alist->num_arguments);
-    com->block->bind += alist->num_arguments;
-
-    /* Expand the lambda list */
-    ComProgn(com, lambda);
-
-    /* The variables are now unbound */
-    com_Unbind(com, alist->num_arguments);
-    com->block->bind -= alist->num_arguments;
-
-    /* Stack length is reduced */
-    CompileStackLeave(com, alist->num_arguments, 0);
-
-    /* Finish the inline function block */
-    CompileFiniBlock(com);
-    FORM_LEAVE();
-
-    /* Restore state */
-    lisp__data.env.lex = lex;
-    lisp__data.env.head = lisp__data.env.length = base;
-}
-
-/***********************************************************************
- * Macro expansion helper functions.
- ***********************************************************************/
-static LispObj *
-ComMacroExpandBackquote(LispCom *com, LispObj *object)
-{
-    return (LispEvalBackquote(object->data.quote, 1));
-}
-
-static LispObj *
-ComMacroExpandFuncall(LispCom *com, LispObj *function, LispObj *arguments)
-{
-    return (LispFuncall(function, arguments, 1));
-}
-
-static LispObj *
-ComMacroExpandEval(LispCom *com, LispObj *object)
-{
-    LispObj *result;
-
-    switch (OBJECT_TYPE(object)) {
-       case LispAtom_t:
-           result = LispGetVar(object);
-
-           /* Macro expansion requires bounded symbols */
-           if (result == NULL)
-               LispDestroy("EVAL: the variable %s is unbound",
-                           STROBJ(object));
-           break;
-
-       case LispCons_t:
-           result = ComMacroExpandFuncall(com, CAR(object), CDR(object));
-           break;
-
-       case LispQuote_t:
-           result = object->data.quote;
-           break;
-
-       case LispBackquote_t:
-           result = ComMacroExpandBackquote(com, object);
-           break;
-
-       case LispComma_t:
-           LispDestroy("EVAL: comma outside of backquote");
-
-       case LispFunctionQuote_t:
-           result = EVAL(object);
-           break;
-
-       default:
-           result = object;
-           break;
-    }
-
-    return (result);
-}
-
-static LispObj *
-ComMacroExpand(LispCom *com, LispObj *lambda)
-{
-    LispObj *result, **presult = &result;
-    int jumped, *pjumped = &jumped, backquote, *pbackquote = &backquote;
-    LispBlock *block;
-
-    int interpreter_lex, interpreter_head, interpreter_base;
-
-    /* Save interpreter state */
-    interpreter_base = lisp__data.stack.length;
-    interpreter_head = lisp__data.env.length;
-    interpreter_lex = lisp__data.env.lex;
-
-    /* Use the variables */
-    *presult = NIL;
-    *pjumped = 1;
-    *pbackquote = !CONSP(lambda);
-
-    block = LispBeginBlock(NIL, LispBlockProtect);
-    if (setjmp(block->jmp) == 0) {
-       if (!backquote) {
-           for (; CONSP(lambda); lambda = CDR(lambda))
-               result = ComMacroExpandEval(com, CAR(lambda));
-       }
-       else
-           result = ComMacroExpandBackquote(com, lambda);
-
-       *pjumped = 0;
-    }
-    LispEndBlock(block);
-
-    /* If tried to jump out of the macro expansion block */
-    if (!lisp__data.destroyed && jumped)
-       LispDestroy("*** EVAL: bad jump in macro expansion");
-
-    /* Macro expansion did something wrong */
-    if (lisp__data.destroyed) {
-       LispMessage("*** EVAL: aborting macro expansion");
-       LispDestroy(".");
-    }
-
-    /* Restore interpreter state */
-    lisp__data.env.lex = interpreter_lex;
-    lisp__data.stack.length = interpreter_base;
-    lisp__data.env.head = lisp__data.env.length = interpreter_head;
-
-    return (result);
-}
-
-static void
-ComMacroCall(LispCom *com, LispArgList *alist,
-            LispObj *name, LispObj *lambda, LispObj *arguments)
-{
-    int base;
-    LispObj *body;
-
-    ++com->macro;
-    base = ComCall(com, alist, name, arguments, 0, 0, 0);
-    body = lambda->data.lambda.code;
-    body = ComMacroExpand(com, body);
-    --com->macro;
-    lisp__data.env.head = lisp__data.env.length = base;
-
-    /* Macro is expanded, store the result */
-    CAR(com->form) = body;
-    ComEval(com, body);
-}
-
-static void
-ComMacroBackquote(LispCom *com, LispObj *lambda)
-{
-    LispObj *body;
-
-    ++com->macro;
-    body = ComMacroExpand(com, lambda);
-    --com->macro;
-
-    /* Macro is expanded, store the result */
-    CAR(com->form) = body;
-
-    com_LoadCon(com, body);
-}
diff --git a/xedit/lisp/core.c b/xedit/lisp/core.c
deleted file mode 100644 (file)
index 89f5d5c..0000000
+++ /dev/null
@@ -1,7024 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/core.c,v 1.71tsi Exp $ */
-
-#include "lisp/io.h"
-#include "lisp/core.h"
-#include "lisp/format.h"
-#include "lisp/helper.h"
-#include "lisp/package.h"
-#include "lisp/private.h"
-#include "lisp/write.h"
-
-/*
- * Types
- */
-typedef struct _SeqInfo {
-    LispType type;
-    union {
-       LispObj *list;
-       LispObj **vector;
-       unsigned char *string;
-    } data;
-} SeqInfo;
-
-#define SETSEQ(seq, object)                                            \
-    switch (seq.type = XOBJECT_TYPE(object)) {                         \
-       case LispString_t:                                              \
-           seq.data.string = (unsigned char*)THESTR(object);           \
-           break;                                                      \
-       case LispCons_t:                                                \
-           seq.data.list = object;                                     \
-           break;                                                      \
-       default:                                                        \
-           seq.data.list = object->data.array.list;                    \
-           break;                                                      \
-    }
-
-#ifdef __UNIXOS2__
-# define finite(x) isfinite(x)
-#endif
-
-#ifdef NEED_SETENV
-extern int setenv(const char *name, const char *value, int overwrite);
-extern void unsetenv(const char *name);
-#endif
-
-/*
- * Prototypes
- */
-#define NONE           0
-
-#define        REMOVE          1
-#define        SUBSTITUTE      2
-#define DELETE         3
-#define        NSUBSTITUTE     4
-
-#define ASSOC          1
-#define MEMBER         2
-
-#define FIND           1
-#define POSITION       2
-
-#define        IF              1
-#define        IFNOT           2
-
-#define UNION          1
-#define INTERSECTION   2
-#define SETDIFFERENCE  3
-#define SETEXCLUSIVEOR 4
-#define SUBSETP                5
-#define NSETDIFFERENCE 6
-#define NINTERSECTION  7
-#define NUNION         8
-#define NSETEXCLUSIVEOR        9
-
-#define COPY_LIST      1
-#define COPY_ALIST     2
-#define COPY_TREE      3
-
-#define EVERY          1
-#define SOME           2
-#define NOTEVERY       3
-#define NOTANY         4
-
-/* Call directly LispObjectCompare() if possible */
-#define FCODE(predicate)                                       \
-    predicate == Oeql ? FEQL :                                 \
-       predicate == Oequal ? FEQUAL :                          \
-           predicate == Oeq ? FEQ :                            \
-               predicate == Oequalp ? FEQUALP : 0
-#define FCOMPARE(predicate, left, right, code)                 \
-    code == FEQ ? left == right :                              \
-       code ? LispObjectCompare(left, right, code) != NIL :    \
-              APPLY2(predicate, left, right) != NIL
-
-#define FUNCTION_CHECK(predicate)                              \
-    if (FUNCTIONP(predicate))                                  \
-       predicate = (predicate)->data.atom->object
-
-#define CHECK_TEST_0()                                         \
-    if (test != UNSPEC && test_not != UNSPEC)                  \
-       LispDestroy("%s: specify either :TEST or :TEST-NOT",    \
-                   STRFUN(builtin))
-
-#define CHECK_TEST()                                           \
-    CHECK_TEST_0();                                            \
-    if (test_not == UNSPEC) {                                  \
-       if (test == UNSPEC)                                     \
-           lambda = Oeql;                                      \
-       else                                                    \
-           lambda = test;                                      \
-       expect = 1;                                             \
-    }                                                          \
-    else {                                                     \
-       lambda = test_not;                                      \
-       expect = 0;                                             \
-    }                                                          \
-    FUNCTION_CHECK(lambda);                                    \
-    code = FCODE(lambda)
-
-
-static LispObj *LispAdjoin(LispBuiltin*,
-                          LispObj*, LispObj*, LispObj*, LispObj*, LispObj*);
-static LispObj *LispAssocOrMember(LispBuiltin*, int, int);
-static LispObj *LispEverySomeAnyNot(LispBuiltin*, int);
-static LispObj *LispFindOrPosition(LispBuiltin*, int, int);
-static LispObj *LispDeleteOrRemoveDuplicates(LispBuiltin*, int);
-static LispObj *LispDeleteRemoveXSubstitute(LispBuiltin*, int, int);
-static LispObj *LispListSet(LispBuiltin*, int);
-static LispObj *LispMapc(LispBuiltin*, int);
-static LispObj *LispMapl(LispBuiltin*, int);
-static LispObj *LispMapnconc(LispObj*);
-extern LispObj *LispRunSetf(LispArgList*, LispObj*, LispObj*, LispObj*);
-extern LispObj *LispRunSetfMacro(LispAtom*, LispObj*, LispObj*);
-static LispObj *LispMergeSort(LispObj*, LispObj*, LispObj*, int);
-static LispObj *LispXReverse(LispBuiltin*, int);
-static LispObj *LispCopyList(LispBuiltin*, LispObj*, int);
-static LispObj *LispValuesList(LispBuiltin*, int);
-static LispObj *LispTreeEqual(LispObj*, LispObj*, LispObj*, int);
-static LispDocType_t LispDocumentationType(LispBuiltin*, LispObj*);
-
-extern void LispSetAtomObjectProperty(LispAtom*, LispObj*);
-
-/*
- * Initialization
- */
-LispObj *Oeq, *Oeql, *Oequal, *Oequalp, *Omake_array,
-       *Kinitial_contents, *Osetf, *Ootherwise, *Oquote;
-LispObj *Ogensym_counter;
-
-Atom_id Svariable, Sstructure, Stype, Ssetf;
-
-/*
- * Implementation
- */
-void
-LispCoreInit(void)
-{
-    Oeq                        = STATIC_ATOM("EQ");
-    Oeql               = STATIC_ATOM("EQL");
-    Oequal             = STATIC_ATOM("EQUAL");
-    Oequalp            = STATIC_ATOM("EQUALP");
-    Omake_array                = STATIC_ATOM("MAKE-ARRAY");
-    Kinitial_contents  = KEYWORD("INITIAL-CONTENTS");
-    Osetf              = STATIC_ATOM("SETF");
-    Ootherwise         = STATIC_ATOM("OTHERWISE");
-    LispExportSymbol(Ootherwise);
-    Oquote             = STATIC_ATOM("QUOTE");
-    LispExportSymbol(Oquote);
-
-    Svariable          = GETATOMID("VARIABLE");
-    Sstructure         = GETATOMID("STRUCTURE");
-    Stype              = GETATOMID("TYPE");
-
-    /* Create as a constant so that only the C code should change the value */
-    Ogensym_counter    = STATIC_ATOM("*GENSYM-COUNTER*");
-    LispDefconstant(Ogensym_counter, FIXNUM(0), NIL);
-    LispExportSymbol(Ogensym_counter);
-
-    Ssetf      = ATOMID(Osetf);
-}
-
-LispObj *
-Lisp_Acons(LispBuiltin *builtin)
-/*
- acons key datum alist
- */
-{
-    LispObj *key, *datum, *alist;
-
-    alist = ARGUMENT(2);
-    datum = ARGUMENT(1);
-    key = ARGUMENT(0);
-
-    return (CONS(CONS(key, datum), alist));
-}
-
-static LispObj *
-LispAdjoin(LispBuiltin*builtin, LispObj *item, LispObj *list,
-          LispObj *key, LispObj *test, LispObj *test_not)
-{
-    GC_ENTER();
-    int code, expect, value;
-    LispObj *lambda, *compare, *object;
-
-    CHECK_LIST(list);
-    CHECK_TEST();
-
-    if (key != UNSPEC) {
-       item = APPLY1(key, item);
-       /* Result is not guaranteed to be gc protected */
-       GC_PROTECT(item);
-    }
-
-    /* Check if item is not already in place */
-    for (object = list; CONSP(object); object = CDR(object)) {
-       compare = CAR(object);
-       if (key != UNSPEC) {
-           compare = APPLY1(key, compare);
-           GC_PROTECT(compare);
-           value = FCOMPARE(lambda, item, compare, code);
-           /* Unprotect compare... */
-           --lisp__data.protect.length;
-       }
-       else
-           value = FCOMPARE(lambda, item, compare, code);
-
-       if (value == expect) {
-           /* Item is already in list */
-           GC_LEAVE();
-
-           return (list);
-       }
-    }
-    GC_LEAVE();
-
-    return (CONS(item, list));
-}
-
-LispObj *
-Lisp_Adjoin(LispBuiltin *builtin)
-/*
- adjoin item list &key key test test-not
- */
-{
-    LispObj *item, *list, *key, *test, *test_not;
-
-    test_not = ARGUMENT(4);
-    test = ARGUMENT(3);
-    key = ARGUMENT(2);
-    list = ARGUMENT(1);
-    item = ARGUMENT(0);
-
-    return (LispAdjoin(builtin, item, list, key, test, test_not));
-}
-
-LispObj *
-Lisp_Append(LispBuiltin *builtin)
-/*
- append &rest lists
- */
-{
-    GC_ENTER();
-    LispObj *result, *cons, *list;
-
-    LispObj *lists;
-
-    lists = ARGUMENT(0);
-
-    /* no arguments */
-    if (!CONSP(lists))
-       return (NIL);
-
-    /* skip initial nil lists */
-    for (; CONSP(CDR(lists)) && CAR(lists) == NIL; lists = CDR(lists))
-       ;
-
-    /* last argument is not copied (even if it is the single argument) */
-    if (!CONSP(CDR(lists)))
-       return (CAR(lists));
-
-    /* make sure result is a list */
-    list = CAR(lists);
-    CHECK_CONS(list);
-    result = cons = CONS(CAR(list), NIL);
-    GC_PROTECT(result);
-    for (list = CDR(list); CONSP(list); list = CDR(list)) {
-       RPLACD(cons, CONS(CAR(list), NIL));
-       cons = CDR(cons);
-    }
-    lists = CDR(lists);
-
-    /* copy intermediate lists */
-    for (; CONSP(CDR(lists)); lists = CDR(lists)) {
-       list = CAR(lists);
-       if (list == NIL)
-           continue;
-       /* intermediate elements must be lists */
-       CHECK_CONS(list);
-       for (; CONSP(list); list = CDR(list)) {
-           RPLACD(cons, CONS(CAR(list), NIL));
-           cons = CDR(cons);
-       }
-    }
-
-    /* add last element */
-    RPLACD(cons, CAR(lists));
-
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Aref(LispBuiltin *builtin)
-/*
- aref array &rest subscripts
- */
-{
-    long c, count, idx, seq;
-    LispObj *obj, *dim;
-
-    LispObj *array, *subscripts;
-
-    subscripts = ARGUMENT(1);
-    array = ARGUMENT(0);
-
-    /* accept strings also */
-    if (STRINGP(array) && CONSP(subscripts) && CDR(subscripts) == NIL) {
-       long offset, length = STRLEN(array);
-
-       CHECK_INDEX(CAR(subscripts));
-       offset = FIXNUM_VALUE(CAR(subscripts));
-
-       if (offset >= length)
-           LispDestroy("%s: index %ld too large for sequence length %ld",
-                       STRFUN(builtin), offset, length);
-
-       return (SCHAR(THESTR(array)[offset]));
-    }
-
-    CHECK_ARRAY(array);
-
-    for (count = 0, dim = subscripts, obj = array->data.array.dim; CONSP(dim);
-        count++, dim = CDR(dim), obj = CDR(obj)) {
-       if (count >= array->data.array.rank)
-           LispDestroy("%s: too many subscripts %s",
-                       STRFUN(builtin), STROBJ(subscripts));
-       if (!INDEXP(CAR(dim)) ||
-           FIXNUM_VALUE(CAR(dim)) >= FIXNUM_VALUE(CAR(obj)))
-           LispDestroy("%s: %s is out of range or a bad index",
-                       STRFUN(builtin), STROBJ(CAR(dim)));
-    }
-    if (count < array->data.array.rank)
-       LispDestroy("%s: too few subscripts %s",
-                   STRFUN(builtin), STROBJ(subscripts));
-
-    for (count = seq = 0, dim = subscripts; CONSP(dim); dim = CDR(dim), seq++) {
-       for (idx = 0, obj = array->data.array.dim; idx < seq;
-            obj = CDR(obj), ++idx)
-           ;
-       for (c = 1, obj = CDR(obj); obj != NIL; obj = CDR(obj))
-           c *= FIXNUM_VALUE(CAR(obj));
-       count += c * FIXNUM_VALUE(CAR(dim));
-    }
-
-    for (array = array->data.array.list; count > 0; array = CDR(array), count--)
-       ;
-
-    return (CAR(array));
-}
-
-static LispObj *
-LispAssocOrMember(LispBuiltin *builtin, int function, int comparison)
-/*
- assoc item list &key test test-not key
- assoc-if predicate list &key key
- assoc-if-not predicate list &key key
- member item list &key test test-not key
- member-if predicate list &key key
- member-if-not predicate list &key key
- */
-{
-    int code = 0, expect, value;
-    LispObj *lambda, *result, *compare;
-
-    LispObj *item, *list, *test, *test_not, *key;
-
-    if (comparison == NONE) {
-       key = ARGUMENT(4);
-       test_not = ARGUMENT(3);
-       test = ARGUMENT(2);
-       list = ARGUMENT(1);
-       item = ARGUMENT(0);
-       lambda = NIL;
-    }
-    else {
-       key = ARGUMENT(2);
-       list = ARGUMENT(1);
-       lambda = ARGUMENT(0);
-       test = test_not = UNSPEC;
-       item = NIL;
-    }
-
-    if (list == NIL)
-       return (NIL);
-    CHECK_CONS(list);
-
-    /* Resolve compare function, and expected result of comparison */
-    if (comparison == NONE) {
-       CHECK_TEST();
-    }
-    else
-       expect = comparison == IFNOT ? 0 : 1;
-
-    result = NIL;
-    for (; CONSP(list); list = CDR(list)) {
-       compare = CAR(list);
-       if (function == ASSOC) {
-           if (!CONSP(compare))
-               continue;
-           compare = CAR(compare);
-       }
-       if (key != UNSPEC)
-           compare = APPLY1(key, compare);
-
-       if (comparison == NONE)
-           value = FCOMPARE(lambda, item, compare, code);
-       else
-           value = APPLY1(lambda, compare) != NIL;
-       if (value == expect) {
-           result = list;
-           if (function == ASSOC)
-               result = CAR(result);
-           break;
-       }
-    }
-    if (function == MEMBER) {
-       CHECK_LIST(list);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Assoc(LispBuiltin *builtin)
-/*
- assoc item list &key test test-not key
- */
-{
-    return (LispAssocOrMember(builtin, ASSOC, NONE));
-}
-
-LispObj *
-Lisp_AssocIf(LispBuiltin *builtin)
-/*
- assoc-if predicate list &key key
- */
-{
-    return (LispAssocOrMember(builtin, ASSOC, IF));
-}
-
-LispObj *
-Lisp_AssocIfNot(LispBuiltin *builtin)
-/*
- assoc-if-not predicate list &key key
- */
-{
-    return (LispAssocOrMember(builtin, ASSOC, IFNOT));
-}
-
-LispObj *
-Lisp_And(LispBuiltin *builtin)
-/*
- and &rest args
- */
-{
-    LispObj *result = T, *args;
-
-    args = ARGUMENT(0);
-
-    for (; CONSP(args); args = CDR(args)) {
-       result = EVAL(CAR(args));
-       if (result == NIL)
-           break;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Apply(LispBuiltin *builtin)
-/*
- apply function arg &rest more-args
- */
-{
-    GC_ENTER();
-    LispObj *result, *arguments;
-
-    LispObj *function, *arg, *more_args;
-
-    more_args = ARGUMENT(2);
-    arg = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    if (more_args == NIL) {
-       CHECK_LIST(arg);
-       arguments = arg;
-       for (; CONSP(arg); arg = CDR(arg))
-           ;
-       CHECK_LIST(arg);
-    }
-    else {
-       LispObj *cons;
-
-       CHECK_CONS(more_args);
-       arguments = cons = CONS(arg, NIL);
-       GC_PROTECT(arguments);
-       for (arg = CDR(more_args);
-            CONSP(arg);
-            more_args = arg, arg = CDR(arg)) {
-           RPLACD(cons, CONS(CAR(more_args), NIL));
-           cons = CDR(cons);
-       }
-       more_args = CAR(more_args);
-       if (more_args != NIL) {
-           for (arg = more_args; CONSP(arg); arg = CDR(arg))
-               ;
-           CHECK_LIST(arg);
-           RPLACD(cons, more_args);
-       }
-    }
-
-    result = APPLY(function, arguments);
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Atom(LispBuiltin *builtin)
-/*
- atom object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (CONSP(object) ? NIL : T);
-}
-
-LispObj *
-Lisp_Block(LispBuiltin *builtin)
-/*
- block name &rest body
- */
-{
-    int did_jump, *pdid_jump = &did_jump;
-    LispObj *res, **pres = &res;
-    LispBlock *block;
-
-    LispObj *name, *body;
-
-    body = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    if (!SYMBOLP(name) && name != NIL && name != T)
-       LispDestroy("%s: %s cannot name a block",
-                   STRFUN(builtin), STROBJ(name));
-
-    *pres = NIL;
-    *pdid_jump = 1;
-    block = LispBeginBlock(name, LispBlockTag);
-    if (setjmp(block->jmp) == 0) {
-       for (; CONSP(body); body = CDR(body))
-           res = EVAL(CAR(body));
-       *pdid_jump = 0;
-    }
-    LispEndBlock(block);
-    if (*pdid_jump)
-       *pres = lisp__data.block.block_ret;
-
-    return (res);
-}
-
-LispObj *
-Lisp_Boundp(LispBuiltin *builtin)
-/*
- boundp symbol
- */
-{
-    LispAtom *atom;
-
-    LispObj *symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    atom = symbol->data.atom;
-    if (atom->package == lisp__data.keyword ||
-       (atom->a_object && atom->property->value != UNBOUND))
-       return (T);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Butlast(LispBuiltin *builtin)
-/*
- butlast list &optional count
- */
-{
-    GC_ENTER();
-    long length, count;
-    LispObj *result, *cons, *list, *ocount;
-
-    ocount = ARGUMENT(1);
-    list = ARGUMENT(0);
-
-    CHECK_LIST(list);
-    if (ocount == UNSPEC)
-       count = 1;
-    else {
-       CHECK_INDEX(ocount);
-       count = FIXNUM_VALUE(ocount);
-    }
-    length = LispLength(list);
-
-    if (count == 0)
-       return (list);
-    else if (count >= length)
-       return (NIL);
-
-    length -= count + 1;
-    result = cons = CONS(CAR(list), NIL);
-    GC_PROTECT(result);
-    for (list = CDR(list); length > 0; list = CDR(list), length--) {
-       RPLACD(cons, CONS(CAR(list), NIL));
-       cons = CDR(cons);
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Nbutlast(LispBuiltin *builtin)
-/*
- nbutlast list &optional count
- */
-{
-    long length, count;
-    LispObj *result, *list, *ocount;
-
-    ocount = ARGUMENT(1);
-    list = ARGUMENT(0);
-
-    CHECK_LIST(list);
-    if (ocount == UNSPEC)
-       count = 1;
-    else {
-       CHECK_INDEX(ocount);
-       count = FIXNUM_VALUE(ocount);
-    }
-    length = LispLength(list);
-
-    if (count == 0)
-       return (list);
-    else if (count >= length)
-       return (NIL);
-
-    length -= count + 1;
-    result = list;
-    for (; length > 0; list = CDR(list), length--)
-       ;
-    RPLACD(list, NIL);
-
-    return (result);
-}
-
-LispObj *
-Lisp_Car(LispBuiltin *builtin)
-/*
- car list
- */
-{
-    LispObj *list, *result = NULL;
-
-    list = ARGUMENT(0);
-
-    if (list == NIL)
-       result = NIL;
-    else {
-       CHECK_CONS(list);
-       result = CAR(list);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Case(LispBuiltin *builtin)
-/*
- case keyform &rest body
- */
-{
-    LispObj *result, *code, *keyform, *body, *form;
-
-    body = ARGUMENT(1);
-    keyform = ARGUMENT(0);
-
-    result = NIL;
-    keyform = EVAL(keyform);
-
-    for (; CONSP(body); body = CDR(body)) {
-       code = CAR(body);
-       CHECK_CONS(code);
-
-       form = CAR(code);
-       if (form == T || form == Ootherwise) {
-           if (CONSP(CDR(body)))
-               LispDestroy("%s: %s must be the last clause",
-                           STRFUN(builtin), STROBJ(CAR(code)));
-           result = CDR(code);
-           break;
-       }
-       else if (CONSP(form)) {
-           for (; CONSP(form); form = CDR(form))
-               if (XEQL(keyform, CAR(form)) == T) {
-                   result = CDR(code);
-                   break;
-               }
-           if (CONSP(form))    /* if found match */
-               break;
-       }
-       else if (XEQL(keyform, form) == T) {
-           result = CDR(code);
-           break;
-       }
-    }
-
-    for (body = result; CONSP(body); body = CDR(body))
-       result = EVAL(CAR(body));
-
-    return (result);
-}
-
-LispObj *
-Lisp_Catch(LispBuiltin *builtin)
-/*
- catch tag &rest body
- */
-{
-    int did_jump, *pdid_jump = &did_jump;
-    LispObj *res, **pres = &res;
-    LispBlock *block;
-
-    LispObj *tag, *body;
-
-    body = ARGUMENT(1);
-    tag = ARGUMENT(0);
-
-    *pres = NIL;
-    *pdid_jump = 1;
-    block = LispBeginBlock(tag, LispBlockCatch);
-    if (setjmp(block->jmp) == 0) {
-       for (; CONSP(body); body = CDR(body))
-           res = EVAL(CAR(body));
-       *pdid_jump = 0;
-    }
-    LispEndBlock(block);
-    if (*pdid_jump)
-       *pres = lisp__data.block.block_ret;
-
-    return (res);
-}
-
-LispObj *
-Lisp_Coerce(LispBuiltin *builtin)
-/*
- coerce object result-type
- */
-{
-    LispObj *object, *result_type;
-
-    result_type = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    return (LispCoerce(builtin, object, result_type));
-}
-
-LispObj *
-Lisp_Cdr(LispBuiltin *builtin)
-/*
- cdr list
- */
-{
-    LispObj *list, *result = NULL;
-
-    list = ARGUMENT(0);
-
-    if (list == NIL)
-       result = NIL;
-    else {
-       CHECK_CONS(list);
-       result = CDR(list);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_C_r(LispBuiltin *builtin)
-/*
- c[ad]{2,4}r list
- */
-{
-    char *desc;
-
-    LispObj *list, *result = NULL;
-
-    list = ARGUMENT(0);
-
-    result = list;
-    desc = STRFUN(builtin);
-    while (desc[1] != 'R')
-       ++desc;
-    while (*desc != 'C') {
-       if (result == NIL)
-           break;
-       CHECK_CONS(result);
-       result = *desc == 'A' ? CAR(result) : CDR(result);
-       --desc;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Cond(LispBuiltin *builtin)
-/*
- cond &rest body
- */
-{
-    LispObj *result, *code, *body;
-
-    body = ARGUMENT(0);
-
-    result = NIL;
-    for (; CONSP(body); body = CDR(body)) {
-       code = CAR(body);
-
-       CHECK_CONS(code);
-       result = EVAL(CAR(code));
-       if (result == NIL)
-           continue;
-       for (code = CDR(code); CONSP(code); code = CDR(code))
-           result = EVAL(CAR(code));
-       break;
-    }
-
-    return (result);
-}
-
-static LispObj *
-LispCopyList(LispBuiltin *builtin, LispObj *list, int function)
-{
-    GC_ENTER();
-    LispObj *result, *cons;
-
-    if (list == NIL)
-       return (list);
-    CHECK_CONS(list);
-
-    result = cons = CONS(NIL, NIL);
-    GC_PROTECT(result);
-    if (CONSP(CAR(list))) {
-       switch (function) {
-           case COPY_LIST:
-               RPLACA(result, CAR(list));
-               break;
-           case COPY_ALIST:
-               RPLACA(result, CONS(CAR(CAR(list)), CDR(CAR(list))));
-               break;
-           case COPY_TREE:
-               RPLACA(result, LispCopyList(builtin, CAR(list), COPY_TREE));
-               break;
-       }
-    }
-    else
-       RPLACA(result, CAR(list));
-
-    for (list = CDR(list); CONSP(list); list = CDR(list)) {
-       CDR(cons) = CONS(NIL, NIL);
-       cons = CDR(cons);
-       if (CONSP(CAR(list))) {
-           switch (function) {
-               case COPY_LIST:
-                   RPLACA(cons, CAR(list));
-                   break;
-               case COPY_ALIST:
-                   RPLACA(cons, CONS(CAR(CAR(list)), CDR(CAR(list))));
-                   break;
-               case COPY_TREE:
-                   RPLACA(cons, LispCopyList(builtin, CAR(list), COPY_TREE));
-                   break;
-           }
-       }
-       else
-           RPLACA(cons, CAR(list));
-    }
-    /* in case list is dotted */
-    RPLACD(cons, list);
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_CopyAlist(LispBuiltin *builtin)
-/*
- copy-alist list
- */
-{
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    return (LispCopyList(builtin, list, COPY_ALIST));
-}
-
-LispObj *
-Lisp_CopyList(LispBuiltin *builtin)
-/*
- copy-list list
- */
-{
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    return (LispCopyList(builtin, list, COPY_LIST));
-}
-
-LispObj *
-Lisp_CopyTree(LispBuiltin *builtin)
-/*
- copy-tree list
- */
-{
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    return (LispCopyList(builtin, list, COPY_TREE));
-}
-
-LispObj *
-Lisp_Cons(LispBuiltin *builtin)
-/*
- cons car cdr
- */
-{
-    LispObj *car, *cdr;
-
-    cdr = ARGUMENT(1);
-    car = ARGUMENT(0);
-
-    return (CONS(car, cdr));
-}
-
-LispObj *
-Lisp_Consp(LispBuiltin *builtin)
-/*
- consp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (CONSP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Constantp(LispBuiltin *builtin)
-/*
- constantp form &optional environment
- */
-{
-    LispObj *form;
-
-    form = ARGUMENT(0);
-
-    /* not all self-evaluating objects are considered constants */
-    if (!POINTERP(form) ||
-       NUMBERP(form) ||
-       XQUOTEP(form) ||
-       (XCONSP(form) && CAR(form) == Oquote) ||
-       (XSYMBOLP(form) && form->data.atom->constant) ||
-       XSTRINGP(form) ||
-       XARRAYP(form))
-       return (T);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Defconstant(LispBuiltin *builtin)
-/*
- defconstant name initial-value &optional documentation
- */
-{
-    LispObj *name, *initial_value, *documentation;
-
-    documentation = ARGUMENT(2);
-    initial_value = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    CHECK_SYMBOL(name);
-    if (documentation != UNSPEC) {
-       CHECK_STRING(documentation);
-    }
-    else
-       documentation = NIL;
-    LispDefconstant(name, EVAL(initial_value), documentation);
-
-    return (name);
-}
-
-LispObj *
-Lisp_Defmacro(LispBuiltin *builtin)
-/*
- defmacro name lambda-list &rest body
- */
-{
-    LispArgList *alist;
-
-    LispObj *lambda, *name, *lambda_list, *body;
-
-    body = ARGUMENT(2);
-    lambda_list = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    CHECK_SYMBOL(name);
-    alist = LispCheckArguments(LispMacro, lambda_list, ATOMID(name)->value, 0);
-
-    if (CONSP(body) && STRINGP(CAR(body))) {
-       LispAddDocumentation(name, CAR(body), LispDocFunction);
-       body = CDR(body);
-    }
-
-    lambda_list = LispListProtectedArguments(alist);
-    lambda = LispNewLambda(name, body, lambda_list, LispMacro);
-
-    if (name->data.atom->a_builtin || name->data.atom->a_compiled) {
-       if (name->data.atom->a_builtin) {
-           ERROR_CHECK_SPECIAL_FORM(name->data.atom);
-       }
-       /* redefining these may cause surprises if bytecode
-        * compiled functions references them */
-       LispWarning("%s: %s is being redefined", STRFUN(builtin),
-                   ATOMID(name)->value);
-
-       LispRemAtomBuiltinProperty(name->data.atom);
-    }
-
-    LispSetAtomFunctionProperty(name->data.atom, lambda, alist);
-    LispUseArgList(alist);
-
-    return (name);
-}
-
-LispObj *
-Lisp_Defun(LispBuiltin *builtin)
-/*
- defun name lambda-list &rest body
- */
-{
-    LispArgList *alist;
-
-    LispObj *lambda, *name, *lambda_list, *body;
-
-    body = ARGUMENT(2);
-    lambda_list = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    CHECK_SYMBOL(name);
-    alist = LispCheckArguments(LispFunction, lambda_list, ATOMID(name)->value, 0);
-
-    if (CONSP(body) && STRINGP(CAR(body))) {
-       LispAddDocumentation(name, CAR(body), LispDocFunction);
-       body = CDR(body);
-    }
-
-    lambda_list = LispListProtectedArguments(alist);
-    lambda = LispNewLambda(name, body, lambda_list, LispFunction);
-
-    if (name->data.atom->a_builtin || name->data.atom->a_compiled) {
-       if (name->data.atom->a_builtin) {
-           ERROR_CHECK_SPECIAL_FORM(name->data.atom);
-       }
-       /* redefining these may cause surprises if bytecode
-        * compiled functions references them */
-       LispWarning("%s: %s is being redefined", STRFUN(builtin),
-                   ATOMID(name)->value);
-
-       LispRemAtomBuiltinProperty(name->data.atom);
-    }
-    LispSetAtomFunctionProperty(name->data.atom, lambda, alist);
-    LispUseArgList(alist);
-
-    return (name);
-}
-
-LispObj *
-Lisp_Defsetf(LispBuiltin *builtin)
-/*
- defsetf function lambda-list &rest body
- */
-{
-    LispArgList *alist;
-    LispObj *obj;
-    LispObj *lambda, *function, *lambda_list, *store, *body;
-
-    body = ARGUMENT(2);
-    lambda_list = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    CHECK_SYMBOL(function);
-
-    if (body == NIL || (CONSP(body) && STRINGP(CAR(body)))) {
-       if (!SYMBOLP(lambda_list))
-           LispDestroy("%s: syntax error %s %s",
-                       STRFUN(builtin), STROBJ(function), STROBJ(lambda_list));
-       if (body != NIL)
-           LispAddDocumentation(function, CAR(body), LispDocSetf);
-
-       LispSetAtomSetfProperty(function->data.atom, lambda_list, NULL);
-
-       return (function);
-    }
-
-    alist = LispCheckArguments(LispSetf, lambda_list, ATOMID(function)->value, 0);
-
-    store = CAR(body);
-    if (!CONSP(store))
-       LispDestroy("%s: %s is a bad store value",
-                   STRFUN(builtin), STROBJ(store));
-    for (obj = store; CONSP(obj); obj = CDR(obj)) {
-       CHECK_SYMBOL(CAR(obj));
-    }
-
-    body = CDR(body);
-    if (CONSP(body) && STRINGP(CAR(body))) {
-       LispAddDocumentation(function, CAR(body), LispDocSetf);
-       body = CDR(body);
-    }
-
-    lambda = LispNewLambda(function, body, store, LispSetf);
-    LispSetAtomSetfProperty(function->data.atom, lambda, alist);
-    LispUseArgList(alist);
-
-    return (function);
-}
-
-LispObj *
-Lisp_Defparameter(LispBuiltin *builtin)
-/*
- defparameter name initial-value &optional documentation
- */
-{
-    LispObj *name, *initial_value, *documentation;
-
-    documentation = ARGUMENT(2);
-    initial_value = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    CHECK_SYMBOL(name);
-    if (documentation != UNSPEC) {
-       CHECK_STRING(documentation);
-    }
-    else
-       documentation = NIL;
-
-    LispProclaimSpecial(name, EVAL(initial_value), documentation);
-
-    return (name);
-}
-
-LispObj *
-Lisp_Defvar(LispBuiltin *builtin)
-/*
- defvar name &optional initial-value documentation
- */
-{
-    LispObj *name, *initial_value, *documentation;
-
-    documentation = ARGUMENT(2);
-    initial_value = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    CHECK_SYMBOL(name);
-    if (documentation != UNSPEC) {
-       CHECK_STRING(documentation);
-    }
-    else
-       documentation = NIL;
-
-    LispProclaimSpecial(name,
-                       initial_value != UNSPEC ? EVAL(initial_value) : NULL,
-                       documentation);
-
-    return (name);
-}
-
-LispObj *
-Lisp_Delete(LispBuiltin *builtin)
-/*
- delete item sequence &key from-end test test-not start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, DELETE, NONE));
-}
-
-LispObj *
-Lisp_DeleteIf(LispBuiltin *builtin)
-/*
- delete-if predicate sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, DELETE, IF));
-}
-
-LispObj *
-Lisp_DeleteIfNot(LispBuiltin *builtin)
-/*
- delete-if-not predicate sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, DELETE, IFNOT));
-}
-
-LispObj *
-Lisp_DeleteDuplicates(LispBuiltin *builtin)
-/*
- delete-duplicates sequence &key from-end test test-not start end key
- */
-{
-    return (LispDeleteOrRemoveDuplicates(builtin, DELETE));
-}
-
-LispObj *
-Lisp_Do(LispBuiltin *builtin)
-/*
- do init test &rest body
- */
-{
-    return (LispDo(builtin, 0));
-}
-
-LispObj *
-Lisp_DoP(LispBuiltin *builtin)
-/*
- do* init test &rest body
- */
-{
-    return (LispDo(builtin, 1));
-}
-
-static LispDocType_t
-LispDocumentationType(LispBuiltin *builtin, LispObj *type)
-{
-    Atom_id atom;
-    LispDocType_t doc_type = LispDocVariable;
-
-    CHECK_SYMBOL(type);
-    atom = ATOMID(type);
-
-    if (atom == Svariable)
-       doc_type = LispDocVariable;
-    else if (atom == Sfunction)
-       doc_type = LispDocFunction;
-    else if (atom == Sstructure)
-       doc_type = LispDocStructure;
-    else if (atom == Stype)
-       doc_type = LispDocType;
-    else if (atom == Ssetf)
-       doc_type = LispDocSetf;
-    else {
-       LispDestroy("%s: unknown documentation type %s",
-                   STRFUN(builtin), STROBJ(type));
-       /*NOTREACHED*/
-    }
-
-    return (doc_type);
-}
-
-LispObj *
-Lisp_Documentation(LispBuiltin *builtin)
-/*
- documentation symbol type
- */
-{
-    LispObj *symbol, *type;
-
-    type = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-    /* type is checked in LispDocumentationType() */
-
-    return (LispGetDocumentation(symbol, LispDocumentationType(builtin, type)));
-}
-
-LispObj *
-Lisp_DoList(LispBuiltin *builtin)
-{
-    return (LispDoListTimes(builtin, 0));
-}
-
-LispObj *
-Lisp_DoTimes(LispBuiltin *builtin)
-{
-    return (LispDoListTimes(builtin, 1));
-}
-
-LispObj *
-Lisp_Elt(LispBuiltin *builtin)
-/*
- elt sequence index
- svref sequence index
- */
-{
-    long offset, length;
-    LispObj *result, *sequence, *oindex;
-
-    oindex = ARGUMENT(1);
-    sequence = ARGUMENT(0);
-
-    length = LispLength(sequence);
-
-    CHECK_INDEX(oindex);
-    offset = FIXNUM_VALUE(oindex);
-
-    if (offset >= length)
-       LispDestroy("%s: index %ld too large for sequence length %ld",
-                   STRFUN(builtin), offset, length);
-
-    if (STRINGP(sequence))
-       result = SCHAR(THESTR(sequence)[offset]);
-    else {
-       if (ARRAYP(sequence))
-           sequence = sequence->data.array.list;
-
-       for (; offset > 0; offset--, sequence = CDR(sequence))
-           ;
-       result = CAR(sequence);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Endp(LispBuiltin *builtin)
-/*
- endp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    if (object == NIL)
-       return (T);
-    CHECK_CONS(object);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Eq(LispBuiltin *builtin)
-/*
- eq left right
- */
-{
-    LispObj *left, *right;
-
-    right = ARGUMENT(1);
-    left = ARGUMENT(0);
-
-    return (XEQ(left, right));
-}
-
-LispObj *
-Lisp_Eql(LispBuiltin *builtin)
-/*
- eql left right
- */
-{
-    LispObj *left, *right;
-
-    right = ARGUMENT(1);
-    left = ARGUMENT(0);
-
-    return (XEQL(left, right));
-}
-
-LispObj *
-Lisp_Equal(LispBuiltin *builtin)
-/*
- equal left right
- */
-{
-    LispObj *left, *right;
-
-    right = ARGUMENT(1);
-    left = ARGUMENT(0);
-
-    return (XEQUAL(left, right));
-}
-
-LispObj *
-Lisp_Equalp(LispBuiltin *builtin)
-/*
- equalp left right
- */
-{
-    LispObj *left, *right;
-
-    right = ARGUMENT(1);
-    left = ARGUMENT(0);
-
-    return (XEQUALP(left, right));
-}
-
-LispObj *
-Lisp_Error(LispBuiltin *builtin)
-/*
- error control-string &rest arguments
- */
-{
-    LispObj *string, *arglist;
-
-    LispObj *control_string, *arguments;
-
-    arguments = ARGUMENT(1);
-    control_string = ARGUMENT(0);
-
-    arglist = CONS(NIL, CONS(control_string, arguments));
-    GC_PROTECT(arglist);
-    string = APPLY(Oformat, arglist);
-    LispDestroy("%s", THESTR(string));
-    /*NOTREACHED*/
-
-    /* No need to call GC_ENTER() and GC_LEAVE() macros */
-    return (NIL);
-}
-
-LispObj *
-Lisp_Eval(LispBuiltin *builtin)
-/*
- eval form
- */
-{
-    int lex;
-    LispObj *form, *result;
-
-    form = ARGUMENT(0);
-
-    /* make sure eval form will not access local variables */
-    lex = lisp__data.env.lex;
-    lisp__data.env.lex = lisp__data.env.length;
-    result = EVAL(form);
-    lisp__data.env.lex = lex;
-
-    return (result);
-}
-
-static LispObj *
-LispEverySomeAnyNot(LispBuiltin *builtin, int function)
-/*
- every predicate sequence &rest more-sequences
- some predicate sequence &rest more-sequences
- notevery predicate sequence &rest more-sequences
- notany predicate sequence &rest more-sequences
- */
-{
-    GC_ENTER();
-    long i, j, length, count;
-    LispObj *result, *list, *item, *arguments, *acons, *value;
-    SeqInfo stk[8], *seqs;
-
-    LispObj *predicate, *sequence, *more_sequences;
-
-    more_sequences = ARGUMENT(2);
-    sequence = ARGUMENT(1);
-    predicate = ARGUMENT(0);
-
-    count = 1;
-    length = LispLength(sequence);
-    for (list = more_sequences; CONSP(list); list = CDR(list), count++) {
-       i = LispLength(CAR(list));
-       if (i < length)
-           length = i;
-    }
-
-    result = function == EVERY || function == NOTANY ? T : NIL;
-
-    /* if at least one sequence has length zero */
-    if (length == 0)
-       return (result);
-
-    if (count > sizeof(stk) / sizeof(stk[0]))
-       seqs = LispMalloc(count * sizeof(SeqInfo));
-    else
-       seqs = &stk[0];
-
-    /* build information about sequences */
-    SETSEQ(seqs[0], sequence);
-    for (i = 1, list = more_sequences; CONSP(list); list = CDR(list), i++) {
-       item = CAR(list);
-       SETSEQ(seqs[i], item);
-    }
-
-    /* prepare argument list */
-    arguments = acons = CONS(NIL, NIL);
-    GC_PROTECT(arguments);
-    for (i = 1; i < count; i++) {
-       RPLACD(acons, CONS(NIL, NIL));
-       acons = CDR(acons);
-    }
-
-    /* loop applying predicate in sequence elements */
-    for (i = 0; i < length; i++) {
-
-       /* build argument list */
-       for (acons = arguments, j = 0; j < count; acons = CDR(acons), j++) {
-           if (seqs[j].type == LispString_t)
-               item = SCHAR(*seqs[j].data.string++);
-           else {
-               item = CAR(seqs[j].data.list);
-               seqs[j].data.list = CDR(seqs[j].data.list);
-           }
-           RPLACA(acons, item);
-       }
-
-       /* apply predicate */
-       value = APPLY(predicate, arguments);
-
-       /* check if needs to terminate loop */
-       if (value == NIL) {
-           if (function == EVERY) {
-               result = NIL;
-               break;
-           }
-           if (function == NOTEVERY) {
-               result = T;
-               break;
-           }
-       }
-       else {
-           if (function == SOME) {
-               result = value;
-               break;
-           }
-           if (function == NOTANY) {
-               result = NIL;
-               break;
-           }
-       }
-    }
-
-    GC_LEAVE();
-    if (seqs != &stk[0])
-       LispFree(seqs);
-
-    return (result);
-}
-
-LispObj *
-Lisp_Every(LispBuiltin *builtin)
-/*
- every predicate sequence &rest more-sequences
- */
-{
-    return (LispEverySomeAnyNot(builtin, EVERY));
-}
-
-LispObj *
-Lisp_Some(LispBuiltin *builtin)
-/*
- some predicate sequence &rest more-sequences
- */
-{
-    return (LispEverySomeAnyNot(builtin, SOME));
-}
-
-LispObj *
-Lisp_Notevery(LispBuiltin *builtin)
-/*
- notevery predicate sequence &rest more-sequences
- */
-{
-    return (LispEverySomeAnyNot(builtin, NOTEVERY));
-}
-
-LispObj *
-Lisp_Notany(LispBuiltin *builtin)
-/*
- notany predicate sequence &rest more-sequences
- */
-{
-    return (LispEverySomeAnyNot(builtin, NOTANY));
-}
-
-LispObj *
-Lisp_Fboundp(LispBuiltin *builtin)
-/*
- fboundp symbol
- */
-{
-    LispAtom *atom;
-
-    LispObj *symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    atom = symbol->data.atom;
-    if (atom->a_function || atom->a_builtin || atom->a_compiled)
-       return (T);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Find(LispBuiltin *builtin)
-/*
- find item sequence &key from-end test test-not start end key
- */
-{
-    return (LispFindOrPosition(builtin, FIND, NONE));
-}
-
-LispObj *
-Lisp_FindIf(LispBuiltin *builtin)
-/*
- find-if predicate sequence &key from-end start end key
- */
-{
-    return (LispFindOrPosition(builtin, FIND, IF));
-}
-
-LispObj *
-Lisp_FindIfNot(LispBuiltin *builtin)
-/*
- find-if-not predicate sequence &key from-end start end key
- */
-{
-    return (LispFindOrPosition(builtin, FIND, IFNOT));
-}
-
-LispObj *
-Lisp_Fill(LispBuiltin *builtin)
-/*
- fill sequence item &key start end
- */
-{
-    long i, start, end, length;
-
-    LispObj *sequence, *item, *ostart, *oend;
-
-    oend = ARGUMENT(3);
-    ostart = ARGUMENT(2);
-    item = ARGUMENT(1);
-    sequence = ARGUMENT(0);
-
-    LispCheckSequenceStartEnd(builtin, sequence, ostart, oend,
-                             &start, &end, &length);
-
-    if (STRINGP(sequence)) {
-       int ch;
-       char *string = THESTR(sequence);
-
-       CHECK_STRING_WRITABLE(sequence);
-       CHECK_SCHAR(item);
-       ch = SCHAR_VALUE(item);
-       for (i = start; i < end; i++)
-           string[i] = ch;
-    }
-    else {
-       LispObj *list;
-
-       if (CONSP(sequence))
-           list = sequence;
-       else
-           list = sequence->data.array.list;
-
-       for (i = 0; i < start; i++, list = CDR(list))
-           ;
-       for (; i < end; i++, list = CDR(list))
-           RPLACA(list, item);
-    }
-
-    return (sequence);
-}
-
-LispObj *
-Lisp_Fmakunbound(LispBuiltin *builtin)
-/*
- fmkaunbound symbol
- */
-{
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-    if (symbol->data.atom->a_function)
-       LispRemAtomFunctionProperty(symbol->data.atom);
-    else if (symbol->data.atom->a_builtin)
-       LispRemAtomBuiltinProperty(symbol->data.atom);
-    else if (symbol->data.atom->a_compiled)
-       LispRemAtomCompiledProperty(symbol->data.atom);
-
-    return (symbol);
-}
-
-LispObj *
-Lisp_Funcall(LispBuiltin *builtin)
-/*
- funcall function &rest arguments
- */
-{
-    LispObj *result;
-
-    LispObj *function, *arguments;
-
-    arguments = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    result = APPLY(function, arguments);
-
-    return (result);
-}
-
-LispObj *
-Lisp_Functionp(LispBuiltin *builtin)
-/*
- functionp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (FUNCTIONP(object) || LAMBDAP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Get(LispBuiltin *builtin)
-/*
- get symbol indicator &optional default
- */
-{
-    LispObj *result;
-
-    LispObj *symbol, *indicator, *defalt;
-
-    defalt = ARGUMENT(2);
-    indicator = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    result = LispGetAtomProperty(symbol->data.atom, indicator);
-
-    if (result != NIL)
-       result = CAR(result);
-    else
-       result = defalt == UNSPEC ? NIL : defalt;
-
-    return (result);
-}
-
-/*
- * ext::getenv
- */
-LispObj *
-Lisp_Getenv(LispBuiltin *builtin)
-/*
- getenv name
- */
-{
-    char *value;
-
-    LispObj *name;
-
-    name = ARGUMENT(0);
-
-    CHECK_STRING(name);
-    value = getenv(THESTR(name));
-
-    return (value ? STRING(value) : NIL);
-}
-
-LispObj *
-Lisp_Gc(LispBuiltin *builtin)
-/*
- gc &optional car cdr
- */
-{
-    LispObj *car, *cdr;
-
-    cdr = ARGUMENT(1);
-    car = ARGUMENT(0);
-
-    LispGC(car, cdr);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Gensym(LispBuiltin *builtin)
-/*
- gensym &optional arg
- */
-{
-    char *preffix = "G", name[132];
-    long counter = LONGINT_VALUE(Ogensym_counter->data.atom->property->value);
-    LispObj *symbol;
-
-    LispObj *arg;
-
-    arg = ARGUMENT(0);
-    if (arg != UNSPEC) {
-       if (STRINGP(arg))
-           preffix = THESTR(arg);
-       else {
-           CHECK_INDEX(arg);
-           counter = FIXNUM_VALUE(arg);
-       }
-    }
-    snprintf(name, sizeof(name), "%s%ld", preffix, counter);
-    if (strlen(name) >= 128)
-       LispDestroy("%s: name %s too long", STRFUN(builtin), name);
-    Ogensym_counter->data.atom->property->value = INTEGER(counter + 1);
-
-    symbol = UNINTERNED_ATOM(name);
-    symbol->data.atom->unreadable = !LispCheckAtomString(name);
-
-    return (symbol);
-}
-
-LispObj *
-Lisp_Go(LispBuiltin *builtin)
-/*
- go tag
- */
-{
-    unsigned blevel = lisp__data.block.block_level;
-
-    LispObj *tag;
-
-    tag = ARGUMENT(0);
-
-    while (blevel) {
-       LispBlock *block = lisp__data.block.block[--blevel];
-
-       if (block->type == LispBlockClosure)
-           /* if reached a function call */
-           break;
-       if (block->type == LispBlockBody) {
-           lisp__data.block.block_ret = tag;
-           LispBlockUnwind(block);
-           BLOCKJUMP(block);
-       }
-     }
-
-    LispDestroy("%s: no visible tagbody for %s",
-               STRFUN(builtin), STROBJ(tag));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-Lisp_If(LispBuiltin *builtin)
-/*
- if test then &optional else
- */
-{
-    LispObj *result, *test, *then, *oelse;
-
-    oelse = ARGUMENT(2);
-    then = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    test = EVAL(test);
-    if (test != NIL)
-       result = EVAL(then);
-    else if (oelse != UNSPEC)
-       result = EVAL(oelse);
-    else
-       result = NIL;
-
-    return (result);
-}
-
-LispObj *
-Lisp_IgnoreErrors(LispBuiltin *builtin)
-/*
- ignore-erros &rest body
- */
-{
-    LispObj *result;
-    int i, jumped;
-    LispBlock *block;
-
-    /* interpreter state */
-    GC_ENTER();
-    int stack, lex, length;
-
-    /* memory allocation */
-    int mem_level;
-    void **mem;
-
-    LispObj *body;
-
-    body = ARGUMENT(0);
-
-    /* Save environment information */
-    stack = lisp__data.stack.length;
-    lex = lisp__data.env.lex;
-    length = lisp__data.env.length;
-
-    /* Save memory allocation information */
-    mem_level = lisp__data.mem.level;
-    mem = LispMalloc(mem_level * sizeof(void*));
-    memcpy(mem, lisp__data.mem.mem, mem_level * sizeof(void*));
-
-    ++lisp__data.ignore_errors;
-    result = NIL;
-    jumped = 1;
-    block = LispBeginBlock(NIL, LispBlockProtect);
-    if (setjmp(block->jmp) == 0) {
-       for (; CONSP(body); body = CDR(body))
-           result = EVAL(CAR(body));
-       jumped = 0;
-    }
-    LispEndBlock(block);
-    if (!lisp__data.destroyed && jumped)
-       result = lisp__data.block.block_ret;
-
-    if (lisp__data.destroyed) {
-       /* Restore environment */
-       lisp__data.stack.length = stack;
-       lisp__data.env.lex = lex;
-       lisp__data.env.head = lisp__data.env.length = length;
-       GC_LEAVE();
-
-       /* Check for possible leaks due to ignoring errors */
-       for (i = 0; i < mem_level; i++) {
-           if (lisp__data.mem.mem[i] && mem[i] != lisp__data.mem.mem[i])
-               LispFree(lisp__data.mem.mem[i]);
-       }
-       for (; i < lisp__data.mem.level; i++) {
-           if (lisp__data.mem.mem[i])
-               LispFree(lisp__data.mem.mem[i]);
-       }
-
-       lisp__data.destroyed = 0;
-       result = NIL;
-       RETURN_COUNT = 1;
-       RETURN(0) = lisp__data.error_condition;
-    }
-    LispFree(mem);
-    --lisp__data.ignore_errors;
-
-    return (result);
-}
-
-LispObj *
-Lisp_Intersection(LispBuiltin *builtin)
-/*
- intersection list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, INTERSECTION));
-}
-
-LispObj *
-Lisp_Nintersection(LispBuiltin *builtin)
-/*
- nintersection list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, NINTERSECTION));
-}
-
-LispObj *
-Lisp_Keywordp(LispBuiltin *builtin)
-/*
- keywordp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (KEYWORDP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Lambda(LispBuiltin *builtin)
-/*
- lambda lambda-list &rest body
- */
-{
-    GC_ENTER();
-    LispObj *name;
-    LispArgList *alist;
-
-    LispObj *lambda, *lambda_list, *body;
-
-    body = ARGUMENT(1);
-    lambda_list = ARGUMENT(0);
-
-    alist = LispCheckArguments(LispLambda, lambda_list, Snil->value, 0);
-
-    name = OPAQUE(alist, LispArgList_t);
-    lambda_list = LispListProtectedArguments(alist);
-    GC_PROTECT(name);
-    GC_PROTECT(lambda_list);
-    lambda = LispNewLambda(name, body, lambda_list, LispLambda);
-    LispUseArgList(alist);
-    GC_LEAVE();
-
-    return (lambda);
-}
-
-LispObj *
-Lisp_Last(LispBuiltin *builtin)
-/*
- last list &optional count
- */
-{
-    long count, length;
-    LispObj *list, *ocount;
-
-    ocount = ARGUMENT(1);
-    list = ARGUMENT(0);
-
-    if (!CONSP(list))
-       return (list);
-
-    length = LispLength(list);
-
-    if (ocount == UNSPEC)
-       count = 1;
-    else {
-       CHECK_INDEX(ocount);
-       count = FIXNUM_VALUE(ocount);
-    }
-
-    if (count >= length)
-       return (list);
-
-    length -= count;
-    for (; length > 0; length--)
-       list = CDR(list);
-
-    return (list);
-}
-
-LispObj *
-Lisp_Length(LispBuiltin *builtin)
-/*
- length sequence
- */
-{
-    LispObj *sequence;
-
-    sequence = ARGUMENT(0);
-
-    return (FIXNUM(LispLength(sequence)));
-}
-
-LispObj *
-Lisp_Let(LispBuiltin *builtin)
-/*
- let init &rest body
- */
-{
-    GC_ENTER();
-    int head = lisp__data.env.length;
-    LispObj *init, *body, *pair, *result, *list, *cons = NIL;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    CHECK_LIST(init);
-    for (list = NIL; CONSP(init); init = CDR(init)) {
-       LispObj *symbol, *value;
-
-       pair = CAR(init);
-       if (SYMBOLP(pair)) {
-           symbol = pair;
-           value = NIL;
-       }
-       else {
-           CHECK_CONS(pair);
-           symbol = CAR(pair);
-           CHECK_SYMBOL(symbol);
-           pair = CDR(pair);
-           if (CONSP(pair)) {
-               value = CAR(pair);
-               if (CDR(pair) != NIL)
-                   LispDestroy("%s: too much arguments to initialize %s",
-                               STRFUN(builtin), STROBJ(symbol));
-               value = EVAL(value);
-           }
-           else
-               value = NIL;
-       }
-       pair = CONS(symbol, value);
-       if (list == NIL) {
-           list = cons = CONS(pair, NIL);
-           GC_PROTECT(list);
-       }
-       else {
-           RPLACD(cons, CONS(pair, NIL));
-           cons = CDR(cons);
-       }
-    }
-    /* Add variables */
-    for (; CONSP(list); list = CDR(list)) {
-       pair = CAR(list);
-       CHECK_CONSTANT(CAR(pair));
-       LispAddVar(CAR(pair), CDR(pair));
-       ++lisp__data.env.head;
-    }
-    /* Values of symbols are now protected */
-    GC_LEAVE();
-
-    /* execute body */
-    for (result = NIL; CONSP(body); body = CDR(body))
-       result = EVAL(CAR(body));
-
-    lisp__data.env.head = lisp__data.env.length = head;
-
-    return (result);
-}
-
-LispObj *
-Lisp_LetP(LispBuiltin *builtin)
-/*
- let* init &rest body
- */
-{
-    int head = lisp__data.env.length;
-    LispObj *init, *body, *pair, *result;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    CHECK_LIST(init);
-    for (; CONSP(init); init = CDR(init)) {
-       LispObj *symbol, *value;
-
-       pair = CAR(init);
-       if (SYMBOLP(pair)) {
-           symbol = pair;
-           value = NIL;
-       }
-       else {
-           CHECK_CONS(pair);
-           symbol = CAR(pair);
-           CHECK_SYMBOL(symbol);
-           pair = CDR(pair);
-           if (CONSP(pair)) {
-               value = CAR(pair);
-               if (CDR(pair) != NIL)
-                   LispDestroy("%s: too much arguments to initialize %s",
-                               STRFUN(builtin), STROBJ(symbol));
-               value = EVAL(value);
-           }
-           else
-               value = NIL;
-       }
-
-       CHECK_CONSTANT(symbol);
-       LispAddVar(symbol, value);
-       ++lisp__data.env.head;
-    }
-
-    /* execute body */
-    for (result = NIL; CONSP(body); body = CDR(body))
-       result = EVAL(CAR(body));
-
-    lisp__data.env.head = lisp__data.env.length = head;
-
-    return (result);
-}
-
-LispObj *
-Lisp_List(LispBuiltin *builtin)
-/*
- list &rest args
- */
-{
-    LispObj *args;
-
-    args = ARGUMENT(0);
-
-    return (args);
-}
-
-LispObj *
-Lisp_ListP(LispBuiltin *builtin)
-/*
- list* object &rest more-objects
- */
-{
-    GC_ENTER();
-    LispObj *result, *cons;
-
-    LispObj *object, *more_objects;
-
-    more_objects = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (!CONSP(more_objects))
-       return (object);
-
-    result = cons = CONS(object, CAR(more_objects));
-    GC_PROTECT(result);
-    for (more_objects = CDR(more_objects); CONSP(more_objects);
-        more_objects = CDR(more_objects)) {
-       object = CAR(more_objects);
-       RPLACD(cons, CONS(CDR(cons), object));
-       cons = CDR(cons);
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-/* "classic" list-length */
-LispObj *
-Lisp_ListLength(LispBuiltin *builtin)
-/*
- list-length list
- */
-{
-    long length;
-    LispObj *fast, *slow;
-
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    CHECK_LIST(list);
-    for (fast = slow = list, length = 0;
-        CONSP(slow);
-        slow = CDR(slow), length += 2) {
-       if (fast == NIL)
-           break;
-       CHECK_CONS(fast);
-       fast = CDR(fast);
-       if (fast == NIL) {
-           ++length;
-           break;
-       }
-       CHECK_CONS(fast);
-       fast = CDR(fast);
-       if (slow == fast)
-           /* circular list */
-           return (NIL);
-    }
-
-    return (FIXNUM(length));
-}
-
-LispObj *
-Lisp_Listp(LispBuiltin *builtin)
-/*
- listp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (object == NIL || CONSP(object) ? T : NIL);
-}
-
-static LispObj *
-LispListSet(LispBuiltin *builtin, int function)
-/*
- intersection list1 list2 &key test test-not key
- nintersection list1 list2 &key test test-not key
- set-difference list1 list2 &key test test-not key
- nset-difference list1 list2 &key test test-not key
- set-exclusive-or list1 list2 &key test test-not key
- nset-exclusive-or list1 list2 &key test test-not key
- subsetp list1 list2 &key test test-not key
- union list1 list2 &key test test-not key
- nunion list1 list2 &key test test-not key
- */
-{
-    GC_ENTER();
-    int code, expect, value, inplace, check_list2,
-       intersection, setdifference, xunion, setexclusiveor;
-    LispObj *lambda, *result, *cmp, *cmp1, *cmp2,
-           *item, *clist1, *clist2, *cons, *cdr;
-
-    LispObj *list1, *list2, *test, *test_not, *key;
-
-    key = ARGUMENT(4);
-    test_not = ARGUMENT(3);
-    test = ARGUMENT(2);
-    list2 = ARGUMENT(1);
-    list1 = ARGUMENT(0);
-
-    /* Check if arguments are valid lists */
-    CHECK_LIST(list1);
-    CHECK_LIST(list2);
-
-    setdifference = intersection = xunion = setexclusiveor = inplace = 0;
-    switch (function) {
-       case NSETDIFFERENCE:
-           inplace = 1;
-       case SETDIFFERENCE:
-           setdifference = 1;
-           break;
-       case NINTERSECTION:
-           inplace = 1;
-       case INTERSECTION:
-           intersection = 1;
-           break;
-       case NUNION:
-           inplace = 1;
-       case UNION:
-           xunion = 1;
-           break;
-       case NSETEXCLUSIVEOR:
-           inplace = 1;
-       case SETEXCLUSIVEOR:
-           setexclusiveor = 1;
-           break;
-    }
-
-    /* Check for fast return */
-    if (list1 == NIL)
-       return (setdifference || intersection ?
-               NIL : function == SUBSETP ? T : list2);
-    if (list2 == NIL)
-       return (intersection || xunion || function == SUBSETP ? NIL : list1);
-
-    CHECK_TEST();
-    clist1 = cdr = NIL;
-
-    /* Make a copy of list2 with the key predicate applied */
-    if (key != UNSPEC) {
-       result = cons = CONS(APPLY1(key, CAR(list2)), NIL);
-       GC_PROTECT(result);
-       for (cmp2 = CDR(list2); CONSP(cmp2); cmp2 = CDR(cmp2)) {
-           item = APPLY1(key, CAR(cmp2));
-           RPLACD(cons, CONS(APPLY1(key, CAR(cmp2)), NIL));
-           cons = CDR(cons);
-       }
-       /* check if list2 is a proper list */
-       CHECK_LIST(cmp2);
-       clist2 = result;
-       check_list2 = 0;
-    }
-    else {
-       clist2 = list2;
-       check_list2 = 1;
-    }
-    result = cons = NIL;
-
-    /* Compare elements of lists
-     * Logic:
-     *    UNION
-     *         1) Walk list1 and if CAR(list1) not in list2, add it to result
-     *         2) Add list2 to result
-     *    INTERSECTION
-     *         1) Walk list1 and if CAR(list1) in list2, add it to result
-     *    SET-DIFFERENCE
-     *         1) Walk list1 and if CAR(list1) not in list2, add it to result
-     *    SET-EXCLUSIVE-OR
-     *         1) Walk list1 and if CAR(list1) not in list2, add it to result
-     *         2) Walk list2 and if CAR(list2) not in list1, add it to result
-     *    SUBSETP
-     *         1) Walk list1 and if CAR(list1) not in list2, return NIL
-     *         2) Return T
-     */
-    value = 0;
-    for (cmp1 = list1; CONSP(cmp1); cmp1 = CDR(cmp1)) {
-       item = CAR(cmp1);
-
-       /* Apply key predicate if required */
-       if (key != UNSPEC) {
-           cmp = APPLY1(key, item);
-           if (setexclusiveor) {
-               if (clist1 == NIL) {
-                   clist1 = cdr = CONS(cmp, NIL);
-                   GC_PROTECT(clist1);
-               }
-               else {
-                   RPLACD(cdr, CONS(cmp, NIL));
-                   cdr = CDR(cdr);
-               }
-           }
-       }
-       else
-           cmp = item;
-
-       /* Compare against list2 */
-       for (cmp2 = clist2; CONSP(cmp2); cmp2 = CDR(cmp2)) {
-           value = FCOMPARE(lambda, cmp, CAR(cmp2), code);
-           if (value == expect)
-               break;
-       }
-       if (check_list2 && value != expect) {
-           /* check if list2 is a proper list */
-           CHECK_LIST(cmp2);
-           check_list2 = 0;
-       }
-
-       if (function == SUBSETP) {
-           /* Element of list1 not in list2? */
-           if (value != expect) {
-               GC_LEAVE();
-
-               return (NIL);
-           }
-       }
-       /* If need to add item to result */
-       else if (((setdifference || xunion || setexclusiveor) &&
-                 value != expect) ||
-                (intersection && value == expect)) {
-           if (inplace) {
-               if (result == NIL)
-                   result = cons = cmp1;
-               else {
-                   if (setexclusiveor) {
-                       /* don't remove elements yet, will need
-                        * to check agains't list2 later */
-                       for (cmp2 = cons; CDR(cmp2) != cmp1; cmp2 = CDR(cmp2))
-                           ;
-                       if (cmp2 != cons) {
-                           RPLACD(cmp2, list1);
-                           list1 = cmp2;
-                       }
-                   }
-                   RPLACD(cons, cmp1);
-                   cons = cmp1;
-               }
-           }
-           else {
-               if (result == NIL) {
-                   result = cons = CONS(item, NIL);
-                   GC_PROTECT(result);
-               }
-               else {
-                   RPLACD(cons, CONS(item, NIL));
-                   cons = CDR(cons);
-               }
-           }
-       }
-    }
-    /* check if list1 is a proper list */
-    CHECK_LIST(cmp1);
-
-    if (function == SUBSETP) {
-       GC_LEAVE();
-
-       return (T);
-    }
-    else if (xunion) {
-       /* Add list2 to tail of result */
-       if (result == NIL)
-           result = list2;
-       else
-           RPLACD(cons, list2);
-    }
-    else if (setexclusiveor) {
-       LispObj *result2, *cons2;
-
-       result2 = cons2 = NIL;
-       for (cmp2 = list2; CONSP(cmp2); cmp2 = CDR(cmp2)) {
-           item = CAR(cmp2);
-
-           if (key != UNSPEC) {
-               cmp = CAR(clist2);
-               /* XXX changing clist2 */
-               clist2 = CDR(clist2);
-               cmp1 = clist1;
-           }
-           else {
-               cmp = item;
-               cmp1 = list1;
-           }
-
-           /* Compare against list1 */
-           for (; CONSP(cmp1); cmp1 = CDR(cmp1)) {
-               value = FCOMPARE(lambda, cmp, CAR(cmp1), code);
-               if (value == expect)
-                   break;
-           }
-
-           if (value != expect) {
-               if (inplace) {
-                   if (result2 == NIL)
-                       result2 = cons2 = cmp2;
-                   else {
-                       RPLACD(cons2, cmp2);
-                       cons2 = cmp2;
-                   }
-               }
-               else {
-                   if (result == NIL) {
-                       result = cons = CONS(item, NIL);
-                       GC_PROTECT(result);
-                   }
-                   else {
-                       RPLACD(cons, CONS(item, NIL));
-                       cons = CDR(cons);
-                   }
-               }
-           }
-       }
-       if (inplace) {
-           if (CONSP(cons2))
-               RPLACD(cons2, NIL);
-           if (result == NIL)
-               result = result2;
-           else
-               RPLACD(cons, result2);
-       }
-    }
-    else if ((function == NSETDIFFERENCE || function == NINTERSECTION) &&
-            CONSP(cons))
-       RPLACD(cons, NIL);
-
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Loop(LispBuiltin *builtin)
-/*
- loop &rest body
- */
-{
-    LispObj *code, *result;
-    LispBlock *block;
-
-    LispObj *body;
-
-    body = ARGUMENT(0);
-
-    result = NIL;
-    block = LispBeginBlock(NIL, LispBlockTag);
-    if (setjmp(block->jmp) == 0) {
-       for (;;)
-           for (code = body; CONSP(code); code = CDR(code))
-               (void)EVAL(CAR(code));
-    }
-    LispEndBlock(block);
-    result = lisp__data.block.block_ret;
-
-    return (result);
-}
-
-/* XXX This function is broken, needs a review
- (being delayed until true array/vectors be implemented) */
-LispObj *
-Lisp_MakeArray(LispBuiltin *builtin)
-/*
- make-array dimensions &key element-type initial-element initial-contents
-                           adjustable fill-pointer displaced-to
-                           displaced-index-offset
- */
-{
-    long rank = 0, count = 1, offset, zero, c;
-    LispObj *obj, *dim, *array;
-    LispType type;
-
-    LispObj *dimensions, *element_type, *initial_element, *initial_contents,
-           *displaced_to, *displaced_index_offset;
-
-    dim = array = NIL;
-    type = LispNil_t;
-
-    displaced_index_offset = ARGUMENT(7);
-    displaced_to = ARGUMENT(6);
-    initial_contents = ARGUMENT(3);
-    initial_element = ARGUMENT(2);
-    element_type = ARGUMENT(1);
-    dimensions = ARGUMENT(0);
-
-    if (INDEXP(dimensions)) {
-       dim = CONS(dimensions, NIL);
-       rank = 1;
-       count = FIXNUM_VALUE(dimensions);
-    }
-    else if (CONSP(dimensions)) {
-       dim = dimensions;
-
-       for (rank = 0; CONSP(dim); rank++, dim = CDR(dim)) {
-           obj = CAR(dim);
-           CHECK_INDEX(obj);
-           count *= FIXNUM_VALUE(obj);
-       }
-       dim = dimensions;
-    }
-    else if (dimensions == NIL) {
-       dim = NIL;
-       rank = count = 0;
-    }
-    else
-       LispDestroy("%s: %s is a bad array dimension",
-                   STRFUN(builtin), STROBJ(dimensions));
-
-    /* check element-type */
-    if (element_type != UNSPEC) {
-       if (element_type == T)
-           type = LispNil_t;
-       else if (!SYMBOLP(element_type))
-           LispDestroy("%s: unsupported element type %s",
-                       STRFUN(builtin), STROBJ(element_type));
-       else {
-           Atom_id atom = ATOMID(element_type);
-
-           if (atom == Satom)
-               type = LispAtom_t;
-           else if (atom == Sinteger)
-               type = LispInteger_t;
-           else if (atom == Scharacter)
-               type = LispSChar_t;
-           else if (atom == Sstring)
-               type = LispString_t;
-           else if (atom == Slist)
-               type = LispCons_t;
-           else if (atom == Sopaque)
-               type = LispOpaque_t;
-           else
-               LispDestroy("%s: unsupported element type %s",
-                           STRFUN(builtin), ATOMID(element_type)->value);
-       }
-    }
-
-    /* check initial-contents */
-    if (rank) {
-       CHECK_LIST(initial_contents);
-    }
-
-    /* check displaced-to */
-    if (displaced_to != UNSPEC) {
-       CHECK_ARRAY(displaced_to);
-    }
-
-    /* check displaced-index-offset */
-    offset = -1;
-    if (displaced_index_offset != UNSPEC) {
-       CHECK_INDEX(displaced_index_offset);
-       offset = FIXNUM_VALUE(displaced_index_offset);
-    }
-
-    c = 0;
-    if (initial_element != UNSPEC)
-       ++c;
-    if (initial_contents != UNSPEC)
-       ++c;
-    if (displaced_to != UNSPEC || offset >= 0)
-       ++c;
-    if (c > 1)
-       LispDestroy("%s: more than one initialization specified",
-                   STRFUN(builtin));
-    if (initial_element == UNSPEC)
-       initial_element = NIL;
-
-    zero = count == 0;
-    if (displaced_to != UNSPEC) {
-       CHECK_ARRAY(displaced_to);
-       if (offset < 0)
-           offset = 0;
-       for (c = 1, obj = displaced_to->data.array.dim; obj != NIL;
-            obj = CDR(obj))
-           c *= FIXNUM_VALUE(CAR(obj));
-       if (c < count + offset)
-           LispDestroy("%s: array-total-size + displaced-index-offset "
-                       "exceeds total size", STRFUN(builtin));
-       for (c = 0, array = displaced_to->data.array.list; c < offset; c++)
-           array = CDR(array);
-    }
-    else if (initial_contents != UNSPEC) {
-       CHECK_CONS(initial_contents);
-       if (rank == 0)
-           array = initial_contents;
-       else if (rank == 1) {
-           for (array = initial_contents, c = 0; c < count;
-                array = CDR(array), c++)
-               if (!CONSP(array))
-                   LispDestroy("%s: bad argument or size %s",
-                               STRFUN(builtin), STROBJ(array));
-           if (array != NIL)
-               LispDestroy("%s: bad argument or size %s",
-                           STRFUN(builtin), STROBJ(array));
-           array = initial_contents;
-       }
-       else {
-           LispObj *err = NIL;
-           /* check if list matches */
-           int i, j, k, *dims, *loop;
-
-           /* create iteration variables */
-           dims = LispMalloc(sizeof(int) * rank);
-           loop = LispCalloc(1, sizeof(int) * (rank - 1));
-           for (i = 0, obj = dim; CONSP(obj); i++, obj = CDR(obj))
-               dims[i] = FIXNUM_VALUE(CAR(obj));
-
-           /* check if list matches specified dimensions */
-           while (loop[0] < dims[0]) {
-               for (obj = initial_contents, i = 0; i < rank - 1; i++) {
-                   for (j = 0; j < loop[i]; j++)
-                       obj = CDR(obj);
-                   err = obj;
-                   if (!CONSP(obj = CAR(obj)))
-                       goto make_array_error;
-                   err = obj;
-               }
-               --i;
-               for (;;) {
-                   ++loop[i];
-                   if (i && loop[i] >= dims[i])
-                       loop[i] = 0;
-                   else
-                       break;
-                   --i;
-               }
-               for (k = 0; k < dims[rank - 1]; obj = CDR(obj), k++) {
-                   if (!CONSP(obj))
-                       goto make_array_error;
-               }
-               if (obj == NIL)
-                   continue;
-make_array_error:
-               LispFree(dims);
-               LispFree(loop);
-               LispDestroy("%s: bad argument or size %s",
-                           STRFUN(builtin), STROBJ(err));
-           }
-
-           /* list is correct, use it to fill initial values */
-
-           /* reset loop */
-           memset(loop, 0, sizeof(int) * (rank - 1));
-
-           GCDisable();
-           /* fill array with supplied values */
-           array = NIL;
-           while (loop[0] < dims[0]) {
-               for (obj = initial_contents, i = 0; i < rank - 1; i++) {
-                   for (j = 0; j < loop[i]; j++)
-                       obj = CDR(obj);
-                   obj = CAR(obj);
-               }
-               --i;
-               for (;;) {
-                   ++loop[i];
-                   if (i && loop[i] >= dims[i])
-                       loop[i] = 0;
-                   else
-                       break;
-                   --i;
-               }
-               for (k = 0; k < dims[rank - 1]; obj = CDR(obj), k++) {
-                   if (array == NIL)
-                       array = CONS(CAR(obj), NIL);
-                   else {
-                       RPLACD(array, CONS(CAR(array), CDR(array)));
-                       RPLACA(array, CAR(obj));
-                   }
-               }
-           }
-           LispFree(dims);
-           LispFree(loop);
-           array = LispReverse(array);
-           GCEnable();
-       }
-    }
-    else {
-       GCDisable();
-       /* allocate array */
-       if (count) {
-           --count;
-           array = CONS(initial_element, NIL);
-           while (count) {
-               RPLACD(array, CONS(CAR(array), CDR(array)));
-               RPLACA(array, initial_element);
-               count--;
-           }
-       }
-       GCEnable();
-    }
-
-    obj = LispNew(array, dim);
-    obj->type = LispArray_t;
-    obj->data.array.list = array;
-    obj->data.array.dim = dim;
-    obj->data.array.rank = rank;
-    obj->data.array.type = type;
-    obj->data.array.zero = zero;
-
-    return (obj);
-}
-
-LispObj *
-Lisp_MakeList(LispBuiltin *builtin)
-/*
- make-list size &key initial-element
- */
-{
-    GC_ENTER();
-    long count;
-    LispObj *result, *cons;
-
-    LispObj *size, *initial_element;
-
-    initial_element = ARGUMENT(1);
-    size = ARGUMENT(0);
-
-    CHECK_INDEX(size);
-    count = FIXNUM_VALUE(size);
-
-    if (count == 0)
-       return (NIL);
-    if (initial_element == UNSPEC)
-       initial_element = NIL;
-
-    result = cons = CONS(initial_element, NIL);
-    GC_PROTECT(result);
-    for (; count > 1; count--) {
-       RPLACD(cons, CONS(initial_element, NIL));
-       cons = CDR(cons);
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_MakeSymbol(LispBuiltin *builtin)
-/*
- make-symbol name
- */
-{
-    LispObj *name, *symbol;
-
-    name = ARGUMENT(0);
-    CHECK_STRING(name);
-
-    symbol = UNINTERNED_ATOM(THESTR(name));
-    symbol->data.atom->unreadable = !LispCheckAtomString(THESTR(name));
-
-    return (symbol);
-}
-
-LispObj *
-Lisp_Makunbound(LispBuiltin *builtin)
-/*
- makunbound symbol
- */
-{
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-    LispUnsetVar(symbol);
-
-    return (symbol);
-}
-
-LispObj *
-Lisp_Mapc(LispBuiltin *builtin)
-/*
- mapc function list &rest more-lists
- */
-{
-    return (LispMapc(builtin, 0));
-}
-
-LispObj *
-Lisp_Mapcar(LispBuiltin *builtin)
-/*
- mapcar function list &rest more-lists
- */
-{
-    return (LispMapc(builtin, 1));
-}
-
-/* Like nconc but ignore non list arguments */
-LispObj *
-LispMapnconc(LispObj *list)
-{
-    LispObj *result = NIL;
-
-    if (CONSP(list)) {
-       LispObj *cons, *head, *tail;
-
-       cons = NIL;
-       for (; CONSP(CDR(list)); list = CDR(list)) {
-           head = CAR(list);
-           if (CONSP(head)) {
-               for (tail = head; CONSP(CDR(tail)); tail = CDR(tail))
-                   ;
-               if (cons != NIL)
-                   RPLACD(cons, head);
-               else
-                   result = head;
-               cons = tail;
-           }
-       }
-       head = CAR(list);
-       if (CONSP(head)) {
-           if (cons != NIL)
-               RPLACD(cons, head);
-           else
-               result = head;
-       }
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Mapcan(LispBuiltin *builtin)
-/*
- mapcan function list &rest more-lists
- */
-{
-    return (LispMapnconc(LispMapc(builtin, 1)));
-}
-
-static LispObj *
-LispMapc(LispBuiltin *builtin, int mapcar)
-{
-    GC_ENTER();
-    long i, offset, count, length;
-    LispObj *result = NIL, *cons, *arguments, *acons, *rest, *alist, *value;
-    LispObj *stk[8], **cdrs;
-
-    LispObj *function, *list, *more_lists;
-
-    more_lists = ARGUMENT(2);
-    list = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    /* Result will be no longer than this */
-    for (length = 0, alist = list; CONSP(alist); length++, alist = CDR(alist))
-       ;
-
-    /* If first argument is not a list... */
-    if (length == 0)
-       return (NIL);
-
-    /* At least one argument will be passed to function, count how many
-     * extra arguments will be used, and calculate result length. */
-    count = 0;
-    for (rest = more_lists; CONSP(rest); rest = CDR(rest), count++) {
-
-       /* Check if extra list is really a list, and if it is smaller
-        * than the first list */
-       for (i = 0, alist = CAR(rest);
-            i < length && CONSP(alist);
-            i++, alist = CDR(alist))
-           ;
-
-       /* If it is not a true list */
-       if (i == 0)
-           return (NIL);
-
-       /* If it is smaller than the currently calculated result length */
-       if (i < length)
-           length = i;
-    }
-
-    if (mapcar) {
-       /* Initialize gc protected object cells for resulting list */
-       result = cons = CONS(NIL, NIL);
-       GC_PROTECT(result);
-    }
-    else
-       result = cons = list;
-
-    if (count >= sizeof(stk) / sizeof(stk[0]))
-       cdrs = LispMalloc(count * sizeof(LispObj*));
-    else
-       cdrs = &stk[0];
-    for (i = 0, rest = more_lists; i < count; i++, rest = CDR(rest))
-       cdrs[i] = CAR(rest);
-
-    /* Initialize gc protected object cells for argument list */
-    arguments = acons = CONS(NIL, NIL);
-    GC_PROTECT(arguments);
-
-    /* Allocate space for extra arguments */
-    for (i = 0; i < count; i++) {
-       RPLACD(acons, CONS(NIL, NIL));
-       acons = CDR(acons);
-    }
-
-    /* For every element of the list that will be used */
-    for (offset = 0;; list = CDR(list)) {
-       acons = arguments;
-
-       /* Add first argument */
-       RPLACA(acons, CAR(list));
-       acons = CDR(acons);
-
-       /* For every extra list argument */
-       for (i = 0; i < count; i++) {
-           alist = cdrs[i];
-           cdrs[i] = CDR(cdrs[i]);
-
-           /* Add element to argument list */
-           RPLACA(acons, CAR(alist));
-           acons = CDR(acons);
-       }
-
-       value = APPLY(function, arguments);
-
-       if (mapcar) {
-           /* Store result */
-           RPLACA(cons, value);
-
-           /* Allocate new result cell */
-           if (++offset < length) {
-               RPLACD(cons, CONS(NIL, NIL));
-               cons = CDR(cons);
-           }
-           else
-               break;
-       }
-       else if (++offset >= length)
-           break;
-    }
-
-    /* Unprotect argument and result list */
-    GC_LEAVE();
-    if (cdrs != &stk[0])
-       LispFree(cdrs);
-
-    return (result);
-}
-
-static LispObj *
-LispMapl(LispBuiltin *builtin, int maplist)
-{
-    GC_ENTER();
-    long i, offset, count, length;
-    LispObj *result = NIL, *cons, *arguments, *acons, *rest, *alist, *value;
-    LispObj *stk[8], **cdrs;
-
-    LispObj *function, *list, *more_lists;
-
-    more_lists = ARGUMENT(2);
-    list = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    /* count is the number of lists, length is the length of the result */
-    for (length = 0, alist = list; CONSP(alist); length++, alist = CDR(alist))
-       ;
-
-    /* first argument is not a list */
-    if (length == 0)
-       return (NIL);
-
-    /* check remaining arguments */
-    for (count = 0, rest = more_lists; CONSP(rest); rest = CDR(rest), count++) {
-       for (i = 0, alist = CAR(rest);
-            i < length && CONSP(alist);
-            i++, alist = CDR(alist))
-           ;
-       /* argument is not a list */
-       if (i == 0)
-           return (NIL);
-       /* result will have the length of the smallest list */
-       if (i < length)
-           length = i;
-    }
-
-    /* result will be a list */
-    if (maplist) {
-       result = cons = CONS(NIL, NIL);
-       GC_PROTECT(result);
-    }
-    else
-       result = cons = list;
-
-    if (count >= sizeof(stk) / sizeof(stk[0]))
-       cdrs = LispMalloc(count * sizeof(LispObj*));
-    else
-       cdrs = &stk[0];
-    for (i = 0, rest = more_lists; i < count; i++, rest = CDR(rest))
-       cdrs[i] = CAR(rest);
-
-    /* initialize argument list */
-    arguments = acons = CONS(NIL, NIL);
-    GC_PROTECT(arguments);
-    for (i = 0; i < count; i++) {
-       RPLACD(acons, CONS(NIL, NIL));
-       acons = CDR(acons);
-    }
-
-    /* for every used list element */
-    for (offset = 0;; list = CDR(list)) {
-       acons = arguments;
-
-       /* first argument */
-       RPLACA(acons, list);
-       acons = CDR(acons);
-
-       /* for every extra list */
-       for (i = 0; i < count; i++) {
-           RPLACA(acons, cdrs[i]);
-           cdrs[i] = CDR(cdrs[i]);
-           acons = CDR(acons);
-       }
-
-       value = APPLY(function, arguments);
-
-       if (maplist) {
-           /* store result */
-           RPLACA(cons, value);
-
-           /* allocate new cell */
-           if (++offset < length) {
-               RPLACD(cons, CONS(NIL, NIL));
-               cons = CDR(cons);
-           }
-           else
-               break;
-       }
-       else if (++offset >= length)
-           break;
-    }
-
-    GC_LEAVE();
-    if (cdrs != &stk[0])
-       LispFree(cdrs);
-
-    return (result);
-}
-
-LispObj *
-Lisp_Mapl(LispBuiltin *builtin)
-/*
- mapl function list &rest more-lists
- */
-{
-    return (LispMapl(builtin, 0));
-}
-
-LispObj *
-Lisp_Maplist(LispBuiltin *builtin)
-/*
- maplist function list &rest more-lists
- */
-{
-    return (LispMapl(builtin, 1));
-}
-
-LispObj *
-Lisp_Mapcon(LispBuiltin *builtin)
-/*
- mapcon function list &rest more-lists
- */
-{
-    return (LispMapnconc(LispMapl(builtin, 1)));
-}
-
-LispObj *
-Lisp_Member(LispBuiltin *builtin)
-/*
- member item list &key test test-not key
- */
-{
-    int code, expect;
-    LispObj *compare, *lambda;
-    LispObj *item, *list, *test, *test_not, *key;
-
-    key = ARGUMENT(4);
-    test_not = ARGUMENT(3);
-    test = ARGUMENT(2);
-    list = ARGUMENT(1);
-    item = ARGUMENT(0);
-
-    if (list == NIL)
-       return (NIL);
-    CHECK_CONS(list);
-
-    CHECK_TEST();
-    if (key == UNSPEC) {
-       if (code == FEQ) {
-           for (; CONSP(list); list = CDR(list))
-               if (item == CAR(list))
-                   return (list);
-       }
-       else {
-           for (; CONSP(list); list = CDR(list))
-               if ((FCOMPARE(lambda, item, CAR(list), code)) == expect)
-                   return (list);
-       }
-    }
-    else {
-       if (code == FEQ) {
-           for (; CONSP(list); list = CDR(list))
-               if (item == APPLY1(key, CAR(list)))
-                   return (list);
-       }
-       else {
-           for (; CONSP(list); list = CDR(list)) {
-               compare = APPLY1(key, CAR(list));
-               if ((FCOMPARE(lambda, item, compare, code)) == expect)
-                   return (list);
-           }
-       }
-    }
-    /* check if is a proper list */
-    CHECK_LIST(list);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_MemberIf(LispBuiltin *builtin)
-/*
- member-if predicate list &key key
- */
-{
-    return (LispAssocOrMember(builtin, MEMBER, IF));
-}
-
-LispObj *
-Lisp_MemberIfNot(LispBuiltin *builtin)
-/*
- member-if-not predicate list &key key
- */
-{
-    return (LispAssocOrMember(builtin, MEMBER, IFNOT));
-}
-
-LispObj *
-Lisp_MultipleValueBind(LispBuiltin *builtin)
-/*
- multiple-value-bind symbols values &rest body
- */
-{
-    int i, head = lisp__data.env.length;
-    LispObj *result, *symbol, *value;
-
-    LispObj *symbols, *values, *body;
-
-    body = ARGUMENT(2);
-    values = ARGUMENT(1);
-    symbols = ARGUMENT(0);
-
-    result = EVAL(values);
-    for (i = -1; CONSP(symbols); symbols = CDR(symbols), i++) {
-       symbol = CAR(symbols);
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-       if (i >= 0 && i < RETURN_COUNT)
-           value = RETURN(i);
-       else if (i < 0)
-           value = result;
-       else
-           value = NIL;
-       LispAddVar(symbol, value);
-       ++lisp__data.env.head;
-    }
-
-    /* Execute code with binded variables (if any) */
-    for (result = NIL; CONSP(body); body = CDR(body))
-       result = EVAL(CAR(body));
-
-    lisp__data.env.head = lisp__data.env.length = head;
-
-    return (result);
-}
-
-LispObj *
-Lisp_MultipleValueCall(LispBuiltin *builtin)
-/*
- multiple-value-call function &rest form
- */
-{
-    GC_ENTER();
-    int i;
-    LispObj *arguments, *cons, *result;
-
-    LispObj *function, *form;
-
-    form = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    /* build argument list */
-    arguments = cons = NIL;
-    for (; CONSP(form); form = CDR(form)) {
-       RETURN_COUNT = 0;
-       result = EVAL(CAR(form));
-       if (RETURN_COUNT >= 0) {
-           if (arguments == NIL) {
-               arguments = cons = CONS(result, NIL);
-               GC_PROTECT(arguments);
-           }
-           else {
-               RPLACD(cons, CONS(result, NIL));
-               cons = CDR(cons);
-           }
-           for (i = 0; i < RETURN_COUNT; i++) {
-               RPLACD(cons, CONS(RETURN(i), NIL));
-               cons = CDR(cons);
-           }
-       }
-    }
-
-    /* apply function */
-    if (POINTERP(function) && !XSYMBOLP(function) && !XFUNCTIONP(function)) {
-       function = EVAL(function);
-       GC_PROTECT(function);
-    }
-    result = APPLY(function, arguments);
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_MultipleValueProg1(LispBuiltin *builtin)
-/*
- multiple-value-prog1 first-form &rest form
- */
-{
-    GC_ENTER();
-    int i, count;
-    LispObj *values, *cons;
-
-    LispObj *first_form, *form;
-
-    form = ARGUMENT(1);
-    first_form = ARGUMENT(0);
-
-    values = EVAL(first_form);
-    if (!CONSP(form))
-       return (values);
-
-    cons = NIL;
-    count = RETURN_COUNT;
-    if (count < 0)
-       values = NIL;
-    else if (count == 0) {
-       GC_PROTECT(values);
-    }
-    else {
-       values = cons = CONS(values, NIL);
-       GC_PROTECT(values);
-       for (i = 0; i < count; i++) {
-           RPLACD(cons, CONS(RETURN(i), NIL));
-           cons = CDR(cons);
-       }
-    }
-
-    for (; CONSP(form); form = CDR(form))
-       EVAL(CAR(form));
-
-    RETURN_COUNT = count;
-    if (count > 0) {
-       for (i = 0, cons = CDR(values); CONSP(cons); cons = CDR(cons), i++)
-           RETURN(i) = CAR(cons);
-       values = CAR(values);
-    }
-    GC_LEAVE();
-
-    return (values);
-}
-
-LispObj *
-Lisp_MultipleValueList(LispBuiltin *builtin)
-/*
- multiple-value-list form
- */
-{
-    int i;
-    GC_ENTER();
-    LispObj *form, *result, *cons;
-
-    form = ARGUMENT(0);
-
-    result = EVAL(form);
-
-    if (RETURN_COUNT < 0)
-       return (NIL);
-
-    result = cons = CONS(result, NIL);
-    GC_PROTECT(result);
-    for (i = 0; i < RETURN_COUNT; i++) {
-       RPLACD(cons, CONS(RETURN(i), NIL));
-       cons = CDR(cons);
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_MultipleValueSetq(LispBuiltin *builtin)
-/*
- multiple-value-setq symbols form
- */
-{
-    int i;
-    LispObj *result, *symbol, *value;
-
-    LispObj *symbols, *form;
-
-    form = ARGUMENT(1);
-    symbols = ARGUMENT(0);
-
-    CHECK_LIST(symbols);
-    result = EVAL(form);
-    if (CONSP(symbols)) {
-       symbol = CAR(symbols);
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-       LispSetVar(symbol, result);
-       symbols = CDR(symbols);
-    }
-    for (i = 0; CONSP(symbols); symbols = CDR(symbols), i++) {
-       symbol = CAR(symbols);
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-       if (i < RETURN_COUNT && RETURN_COUNT > 0)
-           value = RETURN(i);
-       else
-           value = NIL;
-       LispSetVar(symbol, value);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Nconc(LispBuiltin *builtin)
-/*
- nconc &rest lists
- */
-{
-    LispObj *list, *lists, *cons, *head, *tail;
-
-    lists = ARGUMENT(0);
-
-    /* skip any initial empty lists */
-    for (; CONSP(lists); lists = CDR(lists))
-       if (CAR(lists) != NIL)
-           break;
-
-    /* don't check if a proper list */
-    if (!CONSP(lists))
-       return (lists);
-
-    /* setup to concatenate lists */
-    list = CAR(lists);
-    CHECK_CONS(list);
-    for (cons = list; CONSP(CDR(cons)); cons = CDR(cons))
-       ;
-
-    /* if only two lists */
-    lists = CDR(lists);
-    if (!CONSP(lists)) {
-       RPLACD(cons, lists);
-
-       return (list);
-    }
-
-    /* concatenate */
-    for (; CONSP(CDR(lists)); lists = CDR(lists)) {
-       head = CAR(lists);
-       if (head == NIL)
-           continue;
-       CHECK_CONS(head);
-       for (tail = head; CONSP(CDR(tail)); tail = CDR(tail))
-           ;
-       RPLACD(cons, head);
-       cons = tail;
-    }
-    /* add last list */
-    RPLACD(cons, CAR(lists));
-
-    return (list);
-}
-
-LispObj *
-Lisp_Nreverse(LispBuiltin *builtin)
-/*
- nreverse sequence
- */
-{
-    return (LispXReverse(builtin, 1));
-}
-
-LispObj *
-Lisp_NsetDifference(LispBuiltin *builtin)
-/*
- nset-difference list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, NSETDIFFERENCE));
-}
-
-LispObj *
-Lisp_Nsubstitute(LispBuiltin *builtin)
-/*
- nsubstitute newitem olditem sequence &key from-end test test-not start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, NSUBSTITUTE, NONE));
-}
-
-LispObj *
-Lisp_NsubstituteIf(LispBuiltin *builtin)
-/*
- nsubstitute-if newitem test sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, NSUBSTITUTE, IF));
-}
-
-LispObj *
-Lisp_NsubstituteIfNot(LispBuiltin *builtin)
-/*
- nsubstitute-if-not newitem test sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, NSUBSTITUTE, IFNOT));
-}
-
-LispObj *
-Lisp_Nth(LispBuiltin *builtin)
-/*
- nth index list
- */
-{
-    long position;
-    LispObj *oindex, *list;
-
-    list = ARGUMENT(1);
-    oindex = ARGUMENT(0);
-
-    CHECK_INDEX(oindex);
-    position = FIXNUM_VALUE(oindex);
-
-    if (list == NIL)
-       return (NIL);
-
-    CHECK_CONS(list);
-    for (; position > 0; position--) {
-       if (!CONSP(list))
-           return (NIL);
-       list = CDR(list);
-    }
-
-    return (CONSP(list) ? CAR(list) : NIL);
-}
-
-LispObj *
-Lisp_Nthcdr(LispBuiltin *builtin)
-/*
- nthcdr index list
- */
-{
-    long position;
-    LispObj *oindex, *list;
-
-    list = ARGUMENT(1);
-    oindex = ARGUMENT(0);
-
-    CHECK_INDEX(oindex);
-    position = FIXNUM_VALUE(oindex);
-
-    if (list == NIL)
-       return (NIL);
-    CHECK_CONS(list);
-
-    for (; position > 0; position--) {
-       if (!CONSP(list))
-           return (NIL);
-       list = CDR(list);
-    }
-
-    return (list);
-}
-
-LispObj *
-Lisp_NthValue(LispBuiltin *builtin)
-/*
- nth-value index form
- */
-{
-    long i;
-    LispObj *oindex, *form, *result;
-
-    form = ARGUMENT(1);
-    oindex = ARGUMENT(0);
-
-    oindex = EVAL(oindex);
-    CHECK_INDEX(oindex);
-    i = FIXNUM_VALUE(oindex) - 1;
-
-    result = EVAL(form);
-    if (RETURN_COUNT < 0 || i >= RETURN_COUNT)
-       result = NIL;
-    else if (i >= 0)
-       result = RETURN(i);
-
-    return (result);
-}
-
-LispObj *
-Lisp_Null(LispBuiltin *builtin)
-/*
- null list
- */
-{
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    return (list == NIL ? T : NIL);
-}
-
-LispObj *
-Lisp_Or(LispBuiltin *builtin)
-/*
- or &rest args
- */
-{
-    LispObj *result = NIL, *args;
-
-    args = ARGUMENT(0);
-
-    for (; CONSP(args); args = CDR(args)) {
-       result = EVAL(CAR(args));
-       if (result != NIL)
-           break;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Pairlis(LispBuiltin *builtin)
-/*
- pairlis key data &optional alist
- */
-{
-    LispObj *result, *cons;
-
-    LispObj *key, *data, *alist;
-
-    alist = ARGUMENT(2);
-    data = ARGUMENT(1);
-    key = ARGUMENT(0);
-
-    if (CONSP(key) && CONSP(data)) {
-       GC_ENTER();
-
-       result = cons = CONS(CONS(CAR(key), CAR(data)), NIL);
-       GC_PROTECT(result);
-       key = CDR(key);
-       data = CDR(data);
-       for (; CONSP(key) && CONSP(data); key = CDR(key), data = CDR(data)) {
-           RPLACD(cons, CONS(CONS(CAR(key), CAR(data)), NIL));
-           cons = CDR(cons);
-       }
-       if (CONSP(key) || CONSP(data))
-           LispDestroy("%s: different length lists", STRFUN(builtin));
-       GC_LEAVE();
-       if (alist != UNSPEC)
-           RPLACD(cons, alist);
-    }
-    else
-       result = alist == UNSPEC ? NIL : alist;
-
-    return (result);
-}
-
-static LispObj *
-LispFindOrPosition(LispBuiltin *builtin,
-                  int function, int comparison)
-/*
- find item sequence &key from-end test test-not start end key
- find-if predicate sequence &key from-end start end key
- find-if-not predicate sequence &key from-end start end key
- position item sequence &key from-end test test-not start end key
- position-if predicate sequence &key from-end start end key
- position-if-not predicate sequence &key from-end start end key
- */
-{
-    int code = 0, istring, expect, value;
-    char *string = NULL;
-    long offset = -1, start, end, length, i = comparison == NONE ? 7 : 5;
-    LispObj *cmp, *element, **objects = NULL;
-
-    LispObj *item, *predicate, *sequence, *from_end,
-           *test, *test_not, *ostart, *oend, *key;
-
-    key = ARGUMENT(i);         --i;
-    oend = ARGUMENT(i);                --i;
-    ostart = ARGUMENT(i);      --i;
-    if (comparison == NONE) {
-       test_not = ARGUMENT(i); --i;
-       test = ARGUMENT(i);     --i;
-    }
-    else
-       test_not = test = UNSPEC;
-    from_end = ARGUMENT(i);    --i;
-    if (from_end == UNSPEC)
-       from_end = NIL;
-    sequence = ARGUMENT(i);    --i;
-    if (comparison == NONE) {
-       item = ARGUMENT(i);
-       predicate = Oeql;
-    }
-    else {
-       predicate = ARGUMENT(i);
-       item = NIL;
-    }
-
-    LispCheckSequenceStartEnd(builtin, sequence, ostart, oend,
-                             &start, &end, &length);
-
-    if (sequence == NIL)
-       return (NIL);
-
-    /* Cannot specify both :test and :test-not */
-    if (test != UNSPEC && test_not != UNSPEC)
-       LispDestroy("%s: specify either :TEST or :TEST-NOT", STRFUN(builtin));
-
-    expect = 1;
-    if (comparison == NONE) {
-       if (test != UNSPEC)
-           predicate = test;
-       else if (test_not != UNSPEC) {
-           predicate = test_not;
-           expect = 0;
-       }
-       FUNCTION_CHECK(predicate);
-       code = FCODE(predicate);
-    }
-
-    cmp = element = NIL;
-    istring = STRINGP(sequence);
-    if (istring)
-       string = THESTR(sequence);
-    else {
-       if (!CONSP(sequence))
-           sequence = sequence->data.array.list;
-       for (i = 0; i < start; i++)
-           sequence = CDR(sequence);
-    }
-
-    if ((length = end - start) == 0)
-       return (NIL);
-
-    if (from_end != NIL && !istring) {
-       objects = LispMalloc(sizeof(LispObj*) * length);
-       for (i = length - 1; i >= 0; i--, sequence = CDR(sequence))
-           objects[i] = CAR(sequence);
-    }
-
-    for (i = 0; i < length; i++) {
-       if (istring)
-           element = SCHAR(string[from_end == NIL ? i + start : end - i - 1]);
-       else
-           element = from_end == NIL ? CAR(sequence) : objects[i];
-
-       if (key != UNSPEC)
-           cmp = APPLY1(key, element);
-       else
-           cmp = element;
-
-       /* Update list */
-       if (!istring && from_end == NIL)
-           sequence = CDR(sequence);
-
-       if (comparison == NONE)
-           value = FCOMPARE(predicate, item, cmp, code);
-       else
-           value = APPLY1(predicate, cmp) != NIL;
-
-       if ((!value &&
-            (comparison == IFNOT ||
-             (comparison == NONE && !expect))) ||
-           (value &&
-            (comparison == IF ||
-             (comparison == NONE && expect)))) {
-           offset = from_end == NIL ? i + start : end - i - 1;
-           break;
-       }
-    }
-
-    if (from_end != NIL && !istring)
-       LispFree(objects);
-
-    return (offset == -1 ? NIL : function == FIND ? element : FIXNUM(offset));
-}
-
-LispObj *
-Lisp_Pop(LispBuiltin *builtin)
-/*
- pop place
- */
-{
-    LispObj *result, *value;
-
-    LispObj *place;
-
-    place = ARGUMENT(0);
-
-    if (SYMBOLP(place)) {
-       result = LispGetVar(place);
-       if (result == NULL)
-           LispDestroy("EVAL: the variable %s is unbound", STROBJ(place));
-       CHECK_CONSTANT(place);
-       if (result != NIL) {
-           CHECK_CONS(result);
-           value = CDR(result);
-           result = CAR(result);
-       }
-       else
-           value = NIL;
-       LispSetVar(place, value);
-    }
-    else {
-       GC_ENTER();
-       LispObj quote;
-
-       result = EVAL(place);
-       if (result != NIL) {
-           CHECK_CONS(result);
-           value = CDR(result);
-           GC_PROTECT(value);
-           result = CAR(result);
-       }
-       else
-           value = NIL;
-       quote.type = LispQuote_t;
-       quote.data.quote = value;
-       APPLY2(Osetf, place, &quote);
-       GC_LEAVE();
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Position(LispBuiltin *builtin)
-/*
- position item sequence &key from-end test test-not start end key
- */
-{
-    return (LispFindOrPosition(builtin, POSITION, NONE));
-}
-
-LispObj *
-Lisp_PositionIf(LispBuiltin *builtin)
-/*
- position-if predicate sequence &key from-end start end key
- */
-{
-    return (LispFindOrPosition(builtin, POSITION, IF));
-}
-
-LispObj *
-Lisp_PositionIfNot(LispBuiltin *builtin)
-/*
- position-if-not predicate sequence &key from-end start end key
- */
-{
-    return (LispFindOrPosition(builtin, POSITION, IFNOT));
-}
-
-LispObj *
-Lisp_Proclaim(LispBuiltin *builtin)
-/*
- proclaim declaration
- */
-{
-    LispObj *arguments, *object;
-    char *operation;
-
-    LispObj *declaration;
-
-    declaration = ARGUMENT(0);
-
-    CHECK_CONS(declaration);
-
-    arguments = declaration;
-    object = CAR(arguments);
-    CHECK_SYMBOL(object);
-
-    operation = ATOMID(object)->value;
-    if (strcmp(operation, "SPECIAL") == 0) {
-       for (arguments = CDR(arguments); CONSP(arguments);
-            arguments = CDR(arguments)) {
-           object = CAR(arguments);
-           CHECK_SYMBOL(object);
-           LispProclaimSpecial(object, NULL, NIL);
-       }
-    }
-    else if (strcmp(operation, "TYPE") == 0) {
-       /* XXX no type checking yet, but should be added */
-    }
-    /* else do nothing */
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Prog1(LispBuiltin *builtin)
-/*
- prog1 first &rest body
- */
-{
-    GC_ENTER();
-    LispObj *result;
-
-    LispObj *first, *body;
-
-    body = ARGUMENT(1);
-    first = ARGUMENT(0);
-
-    result = EVAL(first);
-
-    GC_PROTECT(result);
-    for (; CONSP(body); body = CDR(body))
-       (void)EVAL(CAR(body));
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Prog2(LispBuiltin *builtin)
-/*
- prog2 first second &rest body
- */
-{
-    GC_ENTER();
-    LispObj *result;
-
-    LispObj *first, *second, *body;
-
-    body = ARGUMENT(2);
-    second = ARGUMENT(1);
-    first = ARGUMENT(0);
-
-    (void)EVAL(first);
-    result = EVAL(second);
-    GC_PROTECT(result);
-    for (; CONSP(body); body = CDR(body))
-       (void)EVAL(CAR(body));
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Progn(LispBuiltin *builtin)
-/*
- progn &rest body
- */
-{
-    LispObj *result = NIL;
-
-    LispObj *body;
-
-    body = ARGUMENT(0);
-
-    for (; CONSP(body); body = CDR(body))
-       result = EVAL(CAR(body));
-
-    return (result);
-}
-
-/*
- *  This does what I believe is the expected behaviour (or at least
- * acceptable for the the interpreter), if the code being executed
- * ever tries to change/bind a progv symbol, the symbol state will
- * be restored when exiting the progv block, so, code like:
- *     (progv '(*x*) '(1) (defvar *x* 10))
- * when exiting the block, will have *x* unbound, and not a dynamic
- * symbol; if it was already bound, will have the old value.
- *  Symbols already dynamic can be freely changed, even unbounded in
- * the progv block.
- */
-LispObj *
-Lisp_Progv(LispBuiltin *builtin)
-/*
- progv symbols values &rest body
- */
-{
-    GC_ENTER();
-    int head = lisp__data.env.length, i, count, ostk[32], *offsets;
-    LispObj *result, *list, *symbol, *value;
-    int jumped;
-    char fstk[32], *flags;
-    LispBlock *block;
-    LispAtom *atom;
-
-    LispObj *symbols, *values, *body;
-
-    /* Possible states */
-#define DYNAMIC_SYMBOL         1
-#define GLOBAL_SYMBOL          2
-#define UNBOUND_SYMBOL         3
-
-    body = ARGUMENT(2);
-    values = ARGUMENT(1);
-    symbols = ARGUMENT(0);
-
-    /* get symbol names */
-    symbols = EVAL(symbols);
-    GC_PROTECT(symbols);
-
-    /* get symbol values */
-    values = EVAL(values);
-    GC_PROTECT(values);
-
-    /* count/check symbols and allocate space to remember symbol state */
-    for (count = 0, list = symbols; CONSP(list); count++, list = CDR(list)) {
-       symbol = CAR(list);
-       CHECK_SYMBOL(symbol);
-       CHECK_CONSTANT(symbol);
-    }
-    if (count > sizeof(fstk)) {
-       flags = LispMalloc(count);
-       offsets = LispMalloc(count * sizeof(int));
-    }
-    else {
-       flags = &fstk[0];
-       offsets = &ostk[0];
-    }
-
-    /* store flags and save old value if required */
-    for (i = 0, list = symbols; i < count; i++, list = CDR(list)) {
-       atom = CAR(list)->data.atom;
-       if (atom->dyn)
-           flags[i] = DYNAMIC_SYMBOL;
-       else if (atom->a_object) {
-           flags[i] = GLOBAL_SYMBOL;
-           offsets[i] = lisp__data.protect.length;
-           GC_PROTECT(atom->property->value);
-       }
-       else
-           flags[i] = UNBOUND_SYMBOL;
-    }
-
-    /* bind the symbols */
-    for (i = 0, list = symbols; i < count; i++, list = CDR(list)) {
-       symbol = CAR(list);
-       atom = symbol->data.atom;
-       if (CONSP(values)) {
-           value = CAR(values);
-           values = CDR(values);
-       }
-       else
-           value = NIL;
-       if (flags[i] != DYNAMIC_SYMBOL) {
-           if (!atom->a_object)
-               LispSetAtomObjectProperty(atom, value);
-           else
-               SETVALUE(atom, value);
-       }
-       else
-           LispAddVar(symbol, value);
-    }
-    /* bind dynamic symbols */
-    lisp__data.env.head = lisp__data.env.length;
-
-    jumped = 0;
-    result = NIL;
-    block = LispBeginBlock(NIL, LispBlockProtect);
-    if (setjmp(block->jmp) == 0) {
-       for (; CONSP(body); body = CDR(body))
-           result = EVAL(CAR(body));
-    }
-
-    /* restore symbols */
-    for (i = 0, list = symbols; i < count; i++, list = CDR(list)) {
-       symbol = CAR(list);
-       atom = symbol->data.atom;
-       if (flags[i] != DYNAMIC_SYMBOL) {
-           if (flags[i] == UNBOUND_SYMBOL)
-               LispUnsetVar(symbol);
-           else {
-               /* restore global symbol value */
-               LispSetAtomObjectProperty(atom, lisp__data.protect.objects
-                                         [offsets[i]]);
-               atom->dyn = 0;
-           }
-       }
-    }
-    /* unbind dynamic symbols */
-    lisp__data.env.head = lisp__data.env.length = head;
-    GC_LEAVE();
-
-    if (count > sizeof(fstk)) {
-       LispFree(flags);
-       LispFree(offsets);
-    }
-
-    LispEndBlock(block);
-    if (!lisp__data.destroyed) {
-       if (jumped)
-           result = lisp__data.block.block_ret;
-    }
-    else {
-       /* check if there is an unwind-protect block */
-       LispBlockUnwind(NULL);
-
-       /* no unwind-protect block, return to the toplevel */
-       LispDestroy(".");
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Provide(LispBuiltin *builtin)
-/*
- provide module
- */
-{
-    LispObj *module, *obj;
-
-    module = ARGUMENT(0);
-
-    CHECK_STRING(module);
-    for (obj = MOD; obj != NIL; obj = CDR(obj)) {
-       if (STRLEN(CAR(obj)) == STRLEN(module) &&
-           memcmp(THESTR(CAR(obj)), THESTR(module), STRLEN(module)) == 0)
-           return (module);
-    }
-
-    if (MOD == NIL)
-       MOD = CONS(module, NIL);
-    else {
-       RPLACD(MOD, CONS(CAR(MOD), CDR(MOD)));
-       RPLACA(MOD, module);
-    }
-
-    LispSetVar(lisp__data.modules, MOD);
-
-    return (MOD);
-}
-
-LispObj *
-Lisp_Push(LispBuiltin *builtin)
-/*
- push item place
- */
-{
-    LispObj *result, *list;
-
-    LispObj *item, *place;
-
-    place = ARGUMENT(1);
-    item = ARGUMENT(0);
-
-    item = EVAL(item);
-
-    if (SYMBOLP(place)) {
-       list = LispGetVar(place);
-       if (list == NULL)
-           LispDestroy("EVAL: the variable %s is unbound", STROBJ(place));
-       CHECK_CONSTANT(place);
-       LispSetVar(place, result = CONS(item, list));
-    }
-    else {
-       GC_ENTER();
-       LispObj quote;
-
-       list = EVAL(place);
-       result = CONS(item, list);
-       GC_PROTECT(result);
-       quote.type = LispQuote_t;
-       quote.data.quote = result;
-       APPLY2(Osetf, place, &quote);
-       GC_LEAVE();
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Pushnew(LispBuiltin *builtin)
-/*
- pushnew item place &key key test test-not
- */
-{
-    GC_ENTER();
-    LispObj *result, *list;
-
-    LispObj *item, *place, *key, *test, *test_not;
-
-    test_not = ARGUMENT(4);
-    test = ARGUMENT(3);
-    key = ARGUMENT(2);
-    place = ARGUMENT(1);
-    item = ARGUMENT(0);
-
-    /* Evaluate place */
-    if (SYMBOLP(place)) {
-       list = LispGetVar(place);
-       if (list == NULL)
-           LispDestroy("EVAL: the variable %s is unbound", STROBJ(place));
-       /* Do error checking now. */
-       CHECK_CONSTANT(place);
-    }
-    else
-       /* It is possible that list is not gc protected? */
-       list = EVAL(place);
-
-    item = EVAL(item);
-    GC_PROTECT(item);
-    if (key != UNSPEC) {
-       key = EVAL(key);
-       GC_PROTECT(key);
-    }
-    if (test != UNSPEC) {
-       test = EVAL(test);
-       GC_PROTECT(test);
-    }
-    else if (test_not != UNSPEC) {
-       test_not = EVAL(test_not);
-       GC_PROTECT(test_not);
-    }
-
-    result = LispAdjoin(builtin, item, list, key, test, test_not);
-
-    /* Item already in list */
-    if (result == list) {
-       GC_LEAVE();
-
-       return (result);
-    }
-
-    if (SYMBOLP(place)) {
-       CHECK_CONSTANT(place);
-       LispSetVar(place, result);
-    }
-    else {
-       LispObj quote;
-
-       GC_PROTECT(result);
-       quote.type = LispQuote_t;
-       quote.data.quote = result;
-       APPLY2(Osetf, place, &quote);
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Quit(LispBuiltin *builtin)
-/*
- quit &optional status
- */
-{
-    int status = 0;
-    LispObj *ostatus;
-
-    ostatus = ARGUMENT(0);
-
-    if (FIXNUMP(ostatus))
-       status = (int)FIXNUM_VALUE(ostatus);
-    else if (ostatus != UNSPEC)
-       LispDestroy("%s: bad exit status argument %s",
-                   STRFUN(builtin), STROBJ(ostatus));
-
-    exit(status);
-}
-
-LispObj *
-Lisp_Quote(LispBuiltin *builtin)
-/*
- quote object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (object);
-}
-
-LispObj *
-Lisp_Replace(LispBuiltin *builtin)
-/*
- replace sequence1 sequence2 &key start1 end1 start2 end2
- */
-{
-    long length, length1, length2, start1, end1, start2, end2;
-    LispObj *sequence1, *sequence2, *ostart1, *oend1, *ostart2, *oend2;
-
-    oend2 = ARGUMENT(5);
-    ostart2 = ARGUMENT(4);
-    oend1 = ARGUMENT(3);
-    ostart1 = ARGUMENT(2);
-    sequence2 = ARGUMENT(1);
-    sequence1 = ARGUMENT(0);
-
-    LispCheckSequenceStartEnd(builtin, sequence1, ostart1, oend1,
-                             &start1, &end1, &length1);
-    LispCheckSequenceStartEnd(builtin, sequence2, ostart2, oend2,
-                             &start2, &end2, &length2);
-
-    if (start1 == end1 || start2 == end2)
-       return (sequence1);
-
-    length = end1 - start1;
-    if (length > end2 - start2)
-       length = end2 - start2;
-
-    if (STRINGP(sequence1)) {
-       CHECK_STRING_WRITABLE(sequence1);
-       if (!STRINGP(sequence2))
-           LispDestroy("%s: cannot store %s in %s",
-                       STRFUN(builtin), STROBJ(sequence2), THESTR(sequence1));
-
-       memmove(THESTR(sequence1) + start1, THESTR(sequence2) + start2, length);
-    }
-    else {
-       int i;
-       LispObj *from, *to;
-
-       if (ARRAYP(sequence1))
-           sequence1 = sequence1->data.array.list;
-       if (ARRAYP(sequence2))
-           sequence2 = sequence2->data.array.list;
-
-       /* adjust pointers */
-       for (i = 0, from = sequence2; i < start2; i++, from = CDR(from))
-           ;
-       for (i = 0, to = sequence1; i < start1; i++, to = CDR(to))
-           ;
-
-       /* copy data */
-       for (i = 0; i < length; i++, from = CDR(from), to = CDR(to))
-           RPLACA(to, CAR(from));
-    }
-
-    return (sequence1);
-}
-
-static LispObj *
-LispDeleteOrRemoveDuplicates(LispBuiltin *builtin, int function)
-/*
- delete-duplicates sequence &key from-end test test-not start end key
- remove-duplicates sequence &key from-end test test-not start end key
- */
-{
-    GC_ENTER();
-    int code, expect, value = 0;
-    long i, j, start, end, length, count;
-    LispObj *lambda, *result, *cons, *compare;
-
-    LispObj *sequence, *from_end, *test, *test_not, *ostart, *oend, *key;
-
-    key = ARGUMENT(6);
-    oend = ARGUMENT(5);
-    ostart = ARGUMENT(4);
-    test_not = ARGUMENT(3);
-    test = ARGUMENT(2);
-    from_end = ARGUMENT(1);
-    if (from_end == UNSPEC)
-       from_end = NIL;
-    sequence = ARGUMENT(0);
-
-    LispCheckSequenceStartEnd(builtin, sequence, ostart, oend,
-                             &start, &end, &length);
-
-    /* Check if need to do something */
-    if (start == end)
-       return (sequence);
-
-    CHECK_TEST();
-
-    /* Initialize */
-    count = 0;
-
-    result = cons = NIL;
-    if (STRINGP(sequence)) {
-       char *ptr, *string, *buffer = LispMalloc(length + 1);
-
-       /* Use same code, update start/end offsets */
-       if (from_end != NIL) {
-           i = length - start;
-           start = length - end;
-           end = i;
-       }
-
-       if (from_end == NIL)
-           string = THESTR(sequence);
-       else {
-           /* Make a reversed copy of the sequence */
-           string = LispMalloc(length + 1);
-           for (ptr = THESTR(sequence) + length - 1, i = 0; i < length; i++)
-               string[i] = *ptr--;
-           string[i] = '\0';
-       }
-
-       ptr = buffer;
-       /* Copy leading bytes */
-       for (i = 0; i < start; i++)
-           *ptr++ = string[i];
-
-       compare = SCHAR(string[i]);
-       if (key != UNSPEC)
-           compare = APPLY1(key, compare);
-       result = cons = CONS(compare, NIL);
-       GC_PROTECT(result);
-       for (++i; i < end; i++) {
-           compare = SCHAR(string[i]);
-           if (key != UNSPEC)
-               compare = APPLY1(key, compare);
-           RPLACD(cons, CONS(compare, NIL));
-           cons = CDR(cons);
-       }
-
-       for (i = start; i < end; i++, result = CDR(result)) {
-           compare = CAR(result);
-           for (j = i + 1, cons = CDR(result); j < end; j++, cons = CDR(cons)) {
-               value = FCOMPARE(lambda, compare, CAR(cons), code);
-               if (value == expect)
-                   break;
-           }
-           if (value != expect)
-               *ptr++ = string[i];
-           else
-               ++count;
-       }
-
-       if (count) {
-           /* Copy ending bytes */
-           for (; i <= length; i++)   /* Also copy the ending nul */
-               *ptr++ = string[i];
-
-           if (from_end == NIL)
-               ptr = buffer;
-           else {
-               for (i = 0, ptr = buffer + strlen(buffer);
-                    ptr > buffer;
-                    i++)
-                   string[i] = *--ptr;
-               string[i] = '\0';
-               ptr = string;
-               LispFree(buffer);
-           }
-           if (function == REMOVE)
-               result = STRING2(ptr);
-           else {
-               CHECK_STRING_WRITABLE(sequence);
-               result = sequence;
-               free(THESTR(result));
-               THESTR(result) = ptr;
-               LispMused(ptr);
-           }
-       }
-       else {
-           result = sequence;
-           if (from_end != NIL)
-               LispFree(string);
-       }
-    }
-    else {
-       long xlength = end - start;
-       LispObj *list, *object, **kobjects = NULL, **xobjects;
-       LispObj **objects = LispMalloc(sizeof(LispObj*) * xlength);
-
-       if (!CONSP(sequence))
-           object = sequence->data.array.list;
-       else
-           object = sequence;
-       list = object;
-
-       for (i = 0; i < start; i++)
-           object = CDR(object);
-
-       /* Put data in a vector */
-       if (from_end == NIL) {
-           for (i = 0; i < xlength; i++, object = CDR(object))
-               objects[i] = CAR(object);
-       }
-       else {
-           for (i = xlength - 1; i >= 0; i--, object = CDR(object))
-               objects[i] = CAR(object);
-       }
-
-       /* Apply key predicate if required */
-       if (key != UNSPEC) {
-           kobjects = LispMalloc(sizeof(LispObj*) * xlength);
-           for (i = 0; i < xlength; i++) {
-               kobjects[i] = APPLY1(key, objects[i]);
-               GC_PROTECT(kobjects[i]);
-           }
-           xobjects = kobjects;
-       }
-       else
-           xobjects = objects;
-
-       /* Check if needs to remove something */
-       for (i = 0; i < xlength; i++) {
-           compare = xobjects[i];
-           for (j = i + 1; j < xlength; j++) {
-               value = FCOMPARE(lambda, compare, xobjects[j], code);
-               if (value == expect) {
-                   objects[i] = NULL;
-                   ++count;
-                   break;
-               }
-           }
-       }
-
-       if (count) {
-           /* Create/set result list */
-           object = list;
-
-           if (start) {
-               /* Skip first elements of resulting list */
-               if (function == REMOVE) {
-                   result = cons = CONS(CAR(object), NIL);
-                   GC_PROTECT(result);
-                   for (i = 1, object = CDR(object);
-                        i < start;
-                        i++, object = CDR(object)) {
-                       RPLACD(cons, CONS(CAR(object), NIL));
-                       cons = CDR(cons);
-                   }
-               }
-               else {
-                   result = cons = object;
-                   for (i = 1; i < start; i++, cons = CDR(cons))
-                       ;
-               }
-           }
-           else if (function == DELETE)
-               result = list;
-
-           /* Skip initial removed elements */
-           if (function == REMOVE) {
-               for (i = 0; objects[i] == NULL && i < xlength; i++)
-                   ;
-           }
-           else
-               i = 0;
-
-           if (i < xlength) {
-               int xstart, xlimit, xinc;
-
-               if (from_end == NIL) {
-                   xstart = i;
-                   xlimit = xlength;
-                   xinc = 1;
-               }
-               else {
-                   xstart = xlength - 1;
-                   xlimit = i - 1;
-                   xinc = -1;
-               }
-
-               if (function == REMOVE) {
-                   for (i = xstart; i != xlimit; i += xinc) {
-                       if (objects[i] != NULL) {
-                           if (result == NIL) {
-                               result = cons = CONS(objects[i], NIL);
-                               GC_PROTECT(result);
-                           }
-                           else {
-                               RPLACD(cons, CONS(objects[i], NIL));
-                               cons = CDR(cons);
-                           }
-                       }
-                   }
-               }
-               else {
-                   /* Delete duplicates */
-                   for (i = xstart; i != xlimit; i += xinc) {
-                       if (objects[i] == NULL) {
-                           if (cons == NIL) {
-                               if (CONSP(CDR(result))) {
-                                   RPLACA(result, CADR(result));
-                                   RPLACD(result, CDDR(result));
-                               }
-                               else {
-                                   RPLACA(result, CDR(result));
-                                   RPLACD(result, NIL);
-                               }
-                           }
-                           else {
-                               if (CONSP(CDR(cons)))
-                                   RPLACD(cons, CDDR(cons));
-                               else
-                                   RPLACD(cons, NIL);
-                           }
-                       }
-                       else {
-                           if (cons == NIL)
-                               cons = result;
-                           else
-                               cons = CDR(cons);
-                       }
-                   }
-               }
-           }
-           if (end < length && function == REMOVE) {
-               for (i = start; i < end; i++, object = CDR(object))
-                   ;
-               if (result == NIL) {
-                   result = cons = CONS(CAR(object), NIL);
-                   GC_PROTECT(result);
-                   ++i;
-                   object = CDR(object);
-               }
-               for (; i < length; i++, object = CDR(object)) {
-                   RPLACD(cons, CONS(CAR(object), NIL));
-                   cons = CDR(cons);
-               }
-           }
-       }
-       else
-           result = sequence;
-       LispFree(objects);
-       if (key != UNSPEC)
-           LispFree(kobjects);
-
-       if (count && !CONSP(sequence)) {
-           if (function == REMOVE)
-               result = VECTOR(result);
-           else {
-               length = FIXNUM_VALUE(CAR(sequence->data.array.dim)) - count;
-               CAR(sequence->data.array.dim) = FIXNUM(length);
-               result = sequence;
-           }
-       }
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_RemoveDuplicates(LispBuiltin *builtin)
-/*
- remove-duplicates sequence &key from-end test test-not start end key
- */
-{
-    return (LispDeleteOrRemoveDuplicates(builtin, REMOVE));
-}
-
-static LispObj *
-LispDeleteRemoveXSubstitute(LispBuiltin *builtin,
-                           int function, int comparison)
-/*
- delete item sequence &key from-end test test-not start end count key
- delete-if predicate sequence &key from-end start end count key
- delete-if-not predicate sequence &key from-end start end count key
- remove item sequence &key from-end test test-not start end count key
- remove-if predicate sequence &key from-end start end count key
- remove-if-not predicate sequence &key from-end start end count key
- substitute newitem olditem sequence &key from-end test test-not start end count key
- substitute-if newitem test sequence &key from-end start end count key
- substitute-if-not newitem test sequence &key from-end start end count key
- nsubstitute newitem olditem sequence &key from-end test test-not start end count key
- nsubstitute-if newitem test sequence &key from-end start end count key
- nsubstitute-if-not newitem test sequence &key from-end start end count key
- */
-{
-    GC_ENTER();
-    int code, expect, value, inplace, substitute;
-    long i, j, start, end, length, copy, count, xstart, xend, xinc, xlength;
-
-    LispObj *result, *compare;
-
-    LispObj *item, *newitem, *lambda, *sequence, *from_end,
-           *test, *test_not, *ostart, *oend, *ocount, *key;
-
-    substitute = function == SUBSTITUTE || function == NSUBSTITUTE;
-    if (!substitute)
-       i = comparison == NONE ? 8 : 6;
-    else /* substitute */
-       i = comparison == NONE ? 9 : 7;
-
-    /* Get function arguments */
-    key = ARGUMENT(i);                 --i;
-    ocount = ARGUMENT(i);              --i;
-    oend = ARGUMENT(i);                        --i;
-    ostart = ARGUMENT(i);              --i;
-    if (comparison == NONE) {
-       test_not = ARGUMENT(i);         --i;
-       test = ARGUMENT(i);             --i;
-    }
-    else
-       test_not = test = UNSPEC;
-    from_end = ARGUMENT(i);            --i;
-    if (from_end == UNSPEC)
-       from_end = NIL;
-    sequence = ARGUMENT(i);            --i;
-    if (comparison != NONE) {
-       lambda = ARGUMENT(i);   --i;
-       if (substitute)
-           newitem = ARGUMENT(0);
-       else
-           newitem = NIL;
-       item = NIL;
-    }
-    else {
-       lambda = NIL;
-       if (substitute) {
-           item = ARGUMENT(1);
-           newitem = ARGUMENT(0);
-       }
-       else {
-           item = ARGUMENT(0);
-           newitem = NIL;
-       }
-    }
-
-    /* Check if argument is a valid sequence, and if start/end
-     * are correctly specified. */
-    LispCheckSequenceStartEnd(builtin, sequence, ostart, oend,
-                             &start, &end, &length);
-
-    /* Check count argument */
-    if (ocount == UNSPEC) {
-       count = length;
-       /* Doesn't matter, but left to right should be slightly faster */
-       from_end = NIL;
-    }
-    else {
-       CHECK_INDEX(ocount);
-       count = FIXNUM_VALUE(ocount);
-    }
-
-    /* Check if need to do something */
-    if (start == end || count == 0)
-       return (sequence);
-
-    CHECK_TEST_0();
-
-    /* Resolve comparison function, and expected result of comparison */
-    if (comparison == NONE) {
-       if (test_not == UNSPEC) {
-           if (test == UNSPEC)
-               lambda = Oeql;
-           else
-               lambda = test;
-           expect = 1;
-       }
-       else {
-           lambda = test_not;
-           expect = 0;
-       }
-       FUNCTION_CHECK(lambda);
-    }
-    else
-       expect = comparison == IFNOT ? 0 : 1;
-
-    /* Check for fast path to comparison function */
-    code = FCODE(lambda);
-
-    /* Initialize for loop */
-    copy = count;
-    result = sequence;
-    inplace = function == DELETE || function == NSUBSTITUTE;
-    xlength = end - start;
-
-    /* String is easier */
-    if (STRINGP(sequence)) {
-       char *buffer, *string;
-
-       if (comparison == NONE) {
-           CHECK_SCHAR(item);
-       }
-       if (substitute) {
-           CHECK_SCHAR(newitem);
-       }
-
-       if (from_end == NIL) {
-           xstart = start;
-           xend = end;
-           xinc = 1;
-       }
-       else {
-           xstart = end - 1;
-           xend = start - 1;
-           xinc = -1;
-       }
-
-       string = THESTR(sequence);
-       buffer = LispMalloc(length + 1);
-
-       /* Copy leading bytes, if any */
-       for (i = 0; i < start; i++)
-           buffer[i] = string[i];
-
-       for (j = xstart; i != xend && count > 0; i += xinc) {
-           compare = SCHAR(string[i]);
-           if (key != UNSPEC) {
-               compare = APPLY1(key, compare);
-               /* Value returned by the key predicate may not be protected */
-               GC_PROTECT(compare);
-               if (comparison == NONE)
-                   value = FCOMPARE(lambda, item, compare, code);
-               else
-                   value = APPLY1(lambda, compare) != NIL;
-               /* Unprotect value returned by the key predicate */
-               GC_LEAVE();
-           }
-           else {
-               if (comparison == NONE)
-                   value = FCOMPARE(lambda, item, compare, code);
-               else
-                   value = APPLY1(lambda, compare) != NIL;
-           }
-
-           if (value != expect) {
-               buffer[j] = string[i];
-               j += xinc;
-           }
-           else {
-               if (substitute) {
-                   buffer[j] = SCHAR_VALUE(newitem);
-                   j += xinc;
-               }
-               else
-                   --count;
-           }
-       }
-
-       if (count != copy && from_end != NIL)
-           memmove(buffer + start, buffer + copy - count, count);
-
-       /* Copy remaining bytes, if any */
-       for (; i < length; i++, j++)
-           buffer[j] = string[i];
-       buffer[j] = '\0';
-
-       xlength = length - (copy - count);
-       if (inplace) {
-           CHECK_STRING_WRITABLE(sequence);
-           /* result is a pointer to sequence */
-           LispFree(THESTR(sequence));
-           LispMused(buffer);
-           THESTR(sequence) = buffer;
-           STRLEN(sequence) = xlength;
-       }
-       else
-           result = LSTRING2(buffer, xlength);
-    }
-
-    /* If inplace, need to update CAR and CDR of sequence */
-    else {
-       LispObj *list, *object;
-       LispObj **objects = LispMalloc(sizeof(LispObj*) * xlength);
-
-       if (!CONSP(sequence))
-           list = sequence->data.array.list;
-       else
-           list = sequence;
-
-       /* Put data in a vector */
-       for (i = 0, object = list; i < start; i++)
-           object = CDR(object);
-
-       for (i = 0; i < xlength; i++, object = CDR(object))
-           objects[i] = CAR(object);
-
-       if (from_end == NIL) {
-           xstart = 0;
-           xend = xlength;
-           xinc = 1;
-       }
-       else {
-           xstart = xlength - 1;
-           xend = -1;
-           xinc = -1;
-       }
-
-       /* Check if needs to remove something */
-       for (i = xstart; i != xend && count > 0; i += xinc) {
-           compare = objects[i];
-           if (key != UNSPEC) {
-               compare = APPLY1(key, compare);
-               GC_PROTECT(compare);
-               if (comparison == NONE)
-                   value = FCOMPARE(lambda, item, compare, code);
-               else
-                   value = APPLY1(lambda, compare) != NIL;
-               GC_LEAVE();
-           }
-           else {
-               if (comparison == NONE)
-                   value = FCOMPARE(lambda, item, compare, code);
-               else
-                   value = APPLY1(lambda, compare) != NIL;
-           }
-           if (value == expect) {
-               if (substitute)
-                   objects[i] = newitem;
-               else
-                   objects[i] = NULL;
-               --count;
-           }
-       }
-
-       if (copy != count) {
-           LispObj *cons = NIL;
-
-           i = 0;
-           object = list;
-           if (inplace) {
-               /* While result is NIL, skip initial elements of sequence */
-               result = start ? list : NIL;
-
-               /* Skip initial elements, if any */
-               for (; i < start; i++, cons = object, object = CDR(object))
-                   ;
-           }
-           /* Copy initial elements, if any */
-           else {
-               result = NIL;
-               if (start) {
-                   result = cons = CONS(CAR(list), NIL);
-                   GC_PROTECT(result);
-                   for (++i, object = CDR(list);
-                        i < start;
-                        i++, object = CDR(object)) {
-                       RPLACD(cons, CONS(CAR(object), NIL));
-                       cons = CDR(cons);
-                   }
-               }
-           }
-
-           /* Skip initial removed elements, if any */
-           for (i = 0; i < xlength && objects[i] == NULL; i++)
-               ;
-
-           for (i = 0; i < xlength; i++, object = CDR(object)) {
-               if (objects[i]) {
-                   if (inplace) {
-                       if (result == NIL)
-                           result = cons = object;
-                       else {
-                           RPLACD(cons, object);
-                           cons = CDR(cons);
-                       }
-                       if (function == NSUBSTITUTE)
-                           RPLACA(cons, objects[i]);
-                   }
-                   else {
-                       if (result == NIL) {
-                           result = cons = CONS(objects[i], NIL);
-                           GC_PROTECT(result);
-                       }
-                       else {
-                           RPLACD(cons, CONS(objects[i], NIL));
-                           cons = CDR(cons);
-                       }
-                   }
-               }
-           }
-
-           if (inplace) {
-               if (result == NIL)
-                   result = object;
-               else
-                   RPLACD(cons, object);
-
-               if (!CONSP(sequence)) {
-                   result = sequence;
-                   CAR(result)->data.array.dim =
-                       FIXNUM(length - (copy - count));
-               }
-           }
-           else if (end < length) {
-               i = end;
-               /* Copy ending elements, if any */
-               if (result == NIL) {
-                   result = cons = CONS(CAR(object), NIL);
-                   GC_PROTECT(result);
-                   object = CDR(object);
-                   i++;
-               }
-               for (; i < length; i++, object = CDR(object)) {
-                   RPLACD(cons, CONS(CAR(object), NIL));
-                   cons = CDR(cons);
-               }
-           }
-       }
-
-       /* Release comparison vector */
-       LispFree(objects);
-    }
-
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Remove(LispBuiltin *builtin)
-/*
- remove item sequence &key from-end test test-not start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, REMOVE, NONE));
-}
-
-LispObj *
-Lisp_RemoveIf(LispBuiltin *builtin)
-/*
- remove-if predicate sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, REMOVE, IF));
-}
-
-LispObj *
-Lisp_RemoveIfNot(LispBuiltin *builtin)
-/*
- remove-if-not predicate sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, REMOVE, IFNOT));
-}
-
-LispObj *
-Lisp_Remprop(LispBuiltin *builtin)
-/*
- remprop symbol indicator
- */
-{
-    LispObj *symbol, *indicator;
-
-    indicator = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    return (LispRemAtomProperty(symbol->data.atom, indicator));
-}
-
-LispObj *
-Lisp_Return(LispBuiltin *builtin)
-/*
- return &optional result
- */
-{
-    unsigned blevel = lisp__data.block.block_level;
-
-    LispObj *result;
-
-    result = ARGUMENT(0);
-
-    while (blevel) {
-       LispBlock *block = lisp__data.block.block[--blevel];
-
-       if (block->type == LispBlockClosure)
-           /* if reached a function call */
-           break;
-       if (block->type == LispBlockTag && block->tag == NIL) {
-           lisp__data.block.block_ret = result == UNSPEC ? NIL : EVAL(result);
-           LispBlockUnwind(block);
-           BLOCKJUMP(block);
-       }
-    }
-    LispDestroy("%s: no visible NIL block", STRFUN(builtin));
-
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-Lisp_ReturnFrom(LispBuiltin *builtin)
-/*
- return-from name &optional result
- */
-{
-    unsigned blevel = lisp__data.block.block_level;
-
-    LispObj *name, *result;
-
-    result = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    if (name != NIL && name != T && !SYMBOLP(name))
-       LispDestroy("%s: %s is not a valid block name",
-                   STRFUN(builtin), STROBJ(name));
-
-    while (blevel) {
-       LispBlock *block = lisp__data.block.block[--blevel];
-
-       if (name == block->tag &&
-           (block->type == LispBlockTag || block->type == LispBlockClosure)) {
-           lisp__data.block.block_ret = result == UNSPEC ? NIL : EVAL(result);
-           LispBlockUnwind(block);
-           BLOCKJUMP(block);
-       }
-       if (block->type == LispBlockClosure)
-           /* can use return-from only in the current function */
-           break;
-    }
-    LispDestroy("%s: no visible block named %s",
-               STRFUN(builtin), STROBJ(name));
-
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-static LispObj *
-LispXReverse(LispBuiltin *builtin, int inplace)
-/*
- nreverse sequence
- reverse sequence
- */
-{
-    long length;
-    LispObj *list, *result = NIL;
-
-    LispObj *sequence;
-
-    sequence = ARGUMENT(0);
-
-    /* Do error checking for arrays and object type. */
-    length = LispLength(sequence);
-    if (length <= 1)
-       return (sequence);
-
-    switch (XOBJECT_TYPE(sequence)) {
-       case LispString_t: {
-           long i;
-           char *from, *to;
-
-           from = THESTR(sequence) + length - 1;
-           if (inplace) {
-               char temp;
-
-               CHECK_STRING_WRITABLE(sequence);
-               to = THESTR(sequence);
-               for (i = 0; i < length / 2; i++) {
-                   temp = to[i];
-                   to[i] = from[-i];
-                   from[-i] = temp;
-               }
-               result = sequence;
-           }
-           else {
-               to = LispMalloc(length + 1);
-               to[length] = '\0';
-               for (i = 0; i < length; i++)
-                   to[i] = from[-i];
-               result = STRING2(to);
-           }
-       }   return (result);
-       case LispCons_t:
-           if (inplace) {
-               long i, j;
-               LispObj *temp;
-
-               /* For large lists this can be very slow, but for small
-                * amounts of data, this avoid allocating a buffer to
-                * to store the CAR of the sequence. This is only done
-                * to not destroy the contents of a variable.
-                */
-               for (i = 0, list = sequence;
-                    i < (length + 1) / 2;
-                    i++, list = CDR(list))
-                   ;
-               length /= 2;
-               for (i = 0; i < length; i++, list = CDR(list)) {
-                   for (j = length - i - 1, result = sequence;
-                        j > 0;
-                        j--, result = CDR(result))
-                       ;
-                   temp = CAR(list);
-                   RPLACA(list, CAR(result));
-                   RPLACA(result, temp);
-               }
-               return (sequence);
-           }
-           list = sequence;
-           break;
-       case LispArray_t:
-           if (inplace) {
-               sequence->data.array.list =
-                   LispReverse(sequence->data.array.list);
-               return (sequence);
-           }
-           list = sequence->data.array.list;
-           break;
-       default:        /* LispNil_t */
-           return (result);
-    }
-
-    {
-       GC_ENTER();
-       LispObj *cons;
-
-       result = cons = CONS(CAR(list), NIL);
-       GC_PROTECT(result);
-       for (list = CDR(list); CONSP(list); list = CDR(list)) {
-           RPLACD(cons, CONS(CAR(list), NIL));
-           cons = CDR(cons);
-       }
-       result = LispReverse(result);
-
-       GC_LEAVE();
-    }
-
-    if (ARRAYP(sequence)) {
-       list = result;
-
-       result = LispNew(list, NIL);
-       result->type = LispArray_t;
-       result->data.array.list = list;
-       result->data.array.dim = sequence->data.array.dim;
-       result->data.array.rank = sequence->data.array.rank;
-       result->data.array.type = sequence->data.array.type;
-       result->data.array.zero = sequence->data.array.zero;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Reverse(LispBuiltin *builtin)
-/*
- reverse sequence
- */
-{
-    return (LispXReverse(builtin, 0));
-}
-
-LispObj *
-Lisp_Rplaca(LispBuiltin *builtin)
-/*
- rplaca place value
- */
-{
-    LispObj *place, *value;
-
-    value = ARGUMENT(1);
-    place = ARGUMENT(0);
-
-    CHECK_CONS(place);
-    RPLACA(place, value);
-
-    return (place);
-}
-
-LispObj *
-Lisp_Rplacd(LispBuiltin *builtin)
-/*
- rplacd place value
- */
-{
-    LispObj *place, *value;
-
-    value = ARGUMENT(1);
-    place = ARGUMENT(0);
-
-    CHECK_CONS(place);
-    RPLACD(place, value);
-
-    return (place);
-}
-
-LispObj *
-Lisp_Search(LispBuiltin *builtin)
-/*
- search sequence1 sequence2 &key from-end test test-not key start1 start2 end1 end2
- */
-{
-    int code = 0, expect, value;
-    long start1, start2, end1, end2, length1, length2, off1, off2, offset = -1;
-    LispObj *cmp1, *cmp2, *list1 = NIL, *lambda;
-    SeqInfo seq1, seq2;
-
-    LispObj *sequence1, *sequence2, *from_end, *test, *test_not,
-           *key, *ostart1, *ostart2, *oend1, *oend2;
-
-    oend2 = ARGUMENT(9);
-    oend1 = ARGUMENT(8);
-    ostart2 = ARGUMENT(7);
-    ostart1 = ARGUMENT(6);
-    key = ARGUMENT(5);
-    test_not = ARGUMENT(4);
-    test = ARGUMENT(3);
-    from_end = ARGUMENT(2);
-    sequence2 = ARGUMENT(1);
-    sequence1 = ARGUMENT(0);
-
-    LispCheckSequenceStartEnd(builtin, sequence1, ostart1, oend1,
-                             &start1, &end1, &length1);
-    LispCheckSequenceStartEnd(builtin, sequence2, ostart2, oend2,
-                             &start2, &end2, &length2);
-
-    /* Check for special conditions */
-    if (start1 == end1)
-       return (FIXNUM(end2));
-    else if (start2 == end2)
-       return (start1 == end1 ? FIXNUM(start2) : NIL);
-
-    CHECK_TEST();
-
-    if (from_end == UNSPEC)
-       from_end = NIL;
-
-    SETSEQ(seq1, sequence1);
-    SETSEQ(seq2, sequence2);
-
-    length1 = end1 - start1;
-    length2 = end2 - start2;
-
-    /* update start of sequences */
-    if (start1) {
-       if (seq1.type == LispString_t)
-           seq1.data.string += start1;
-       else {
-           for (cmp1 = seq1.data.list; start1; cmp1 = CDR(cmp1), --start1)
-               ;
-           seq1.data.list = cmp1;
-       }
-       end1 = length1;
-    }
-    if (start2) {
-       if (seq2.type == LispString_t)
-           seq2.data.string += start2;
-       else {
-           for (cmp2 = seq2.data.list; start2; cmp2 = CDR(cmp2), --start2)
-               ;
-           seq2.data.list = cmp2;
-       }
-       end2 = length2;
-    }
-
-    /* easier case */
-    if (from_end == NIL) {
-       LispObj *list2 = NIL;
-
-       /* while a match is possible */
-       while (end2 - start2 >= length1) {
-
-           /* prepare to search */
-           off1 = 0;
-           off2 = start2;
-           if (seq1.type != LispString_t)
-               list1 = seq1.data.list;
-           if (seq2.type != LispString_t)
-               list2 = seq2.data.list;
-
-           /* for every element that must match in sequence1 */
-           while (off1 < length1) {
-               if (seq1.type == LispString_t)
-                   cmp1 = SCHAR(seq1.data.string[off1]);
-               else
-                   cmp1 = CAR(list1);
-               if (seq2.type == LispString_t)
-                   cmp2 = SCHAR(seq2.data.string[off2]);
-               else
-                   cmp2 = CAR(list2);
-               if (key != UNSPEC) {
-                   cmp1 = APPLY1(key, cmp1);
-                   cmp2 = APPLY1(key, cmp2);
-               }
-
-               /* compare elements */
-               value = FCOMPARE(lambda, cmp1, cmp2, code);
-               if (value != expect)
-                   break;
-
-               /* update offsets/sequence pointers */
-               ++off1;
-               ++off2;
-               if (seq1.type != LispString_t)
-                   list1 = CDR(list1);
-               if (seq2.type != LispString_t)
-                   list2 = CDR(list2);
-           }
-
-           /* if everything matched */
-           if (off1 == end1) {
-               offset = off2 - length1;
-               break;
-           }
-
-           /* update offset/sequence2 pointer */
-           ++start2;
-           if (seq2.type != LispString_t)
-               seq2.data.list = CDR(seq2.data.list);
-       }
-    }
-    else {
-       /* allocate vector if required, only list2 requires it.
-        * list1 can be traversed forward */
-       if (seq2.type != LispString_t) {
-           cmp2 = seq2.data.list;
-           seq2.data.vector = LispMalloc(sizeof(LispObj*) * length2);
-           for (off2 = 0; off2 < end2; off2++, cmp2 = CDR(cmp2))
-               seq2.data.vector[off2] = CAR(cmp2);
-       }
-
-       /* while a match is possible */
-       while (end2 >= length1) {
-
-           /* prepare to search */
-           off1 = 0;
-           off2 = end2 - length1;
-           if (seq1.type != LispString_t)
-               list1 = seq1.data.list;
-
-           /* for every element that must match in sequence1 */
-           while (off1 < end1) {
-               if (seq1.type == LispString_t)
-                   cmp1 = SCHAR(seq1.data.string[off1]);
-               else
-                   cmp1 = CAR(list1);
-               if (seq2.type == LispString_t)
-                   cmp2 = SCHAR(seq2.data.string[off2]);
-               else
-                   cmp2 = seq2.data.vector[off2];
-               if (key != UNSPEC) {
-                   cmp1 = APPLY1(key, cmp1);
-                   cmp2 = APPLY1(key, cmp2);
-               }
-
-               /* Compare elements */
-               value = FCOMPARE(lambda, cmp1, cmp2, code);
-               if (value != expect)
-                   break;
-
-               /* Update offsets */
-               ++off1;
-               ++off2;
-               if (seq1.type != LispString_t)
-                   list1 = CDR(list1);
-           }
-
-           /* If all elements matched */
-           if (off1 == end1) {
-               offset = off2 - length1;
-               break;
-           }
-
-           /* Update offset */
-           --end2;
-       }
-
-       if (seq2.type != LispString_t)
-           LispFree(seq2.data.vector);
-    }
-
-    return (offset == -1 ? NIL : FIXNUM(offset));
-}
-
-/*
- * ext::getenv
- */
-LispObj *
-Lisp_Setenv(LispBuiltin *builtin)
-/*
- setenv name value &optional overwrite
- */
-{
-    char *name, *value;
-
-    LispObj *oname, *ovalue, *overwrite;
-
-    overwrite = ARGUMENT(2);
-    ovalue = ARGUMENT(1);
-    oname = ARGUMENT(0);
-
-    CHECK_STRING(oname);
-    name = THESTR(oname);
-
-    CHECK_STRING(ovalue);
-    value = THESTR(ovalue);
-
-    setenv(name, value, overwrite != UNSPEC && overwrite != NIL);
-    value = getenv(name);
-
-    return (value ? STRING(value) : NIL);
-}
-
-LispObj *
-Lisp_Set(LispBuiltin *builtin)
-/*
- set symbol value
- */
-{
-    LispAtom *atom;
-    LispObj *symbol, *value;
-
-    value = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-    atom = symbol->data.atom;
-    if (atom->dyn)
-       LispSetVar(symbol, value);
-    else if (atom->watch || !atom->a_object)
-       LispSetAtomObjectProperty(atom, value);
-    else {
-       CHECK_CONSTANT(symbol);
-       SETVALUE(atom, value);
-    }
-
-    return (value);
-}
-
-LispObj *
-Lisp_SetDifference(LispBuiltin *builtin)
-/*
- set-difference list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, SETDIFFERENCE));
-}
-
-LispObj *
-Lisp_SetExclusiveOr(LispBuiltin *builtin)
-/*
- set-exclusive-or list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, SETEXCLUSIVEOR));
-}
-
-LispObj *
-Lisp_NsetExclusiveOr(LispBuiltin *builtin)
-/*
- nset-exclusive-or list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, NSETEXCLUSIVEOR));
-}
-
-LispObj *
-Lisp_SetQ(LispBuiltin *builtin)
-/*
- setq &rest form
- */
-{
-    LispObj *result, *variable, *form;
-
-    form = ARGUMENT(0);
-
-    result = NIL;
-    for (; CONSP(form); form = CDR(form)) {
-       variable = CAR(form);
-       CHECK_SYMBOL(variable);
-       CHECK_CONSTANT(variable);
-       form = CDR(form);
-       if (!CONSP(form))
-           LispDestroy("%s: odd number of arguments", STRFUN(builtin));
-       result = EVAL(CAR(form));
-       LispSetVar(variable, result);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Psetq(LispBuiltin *builtin)
-/*
- psetq &rest form
- */
-{
-    GC_ENTER();
-    int base = gc__protect;
-    LispObj *value, *symbol, *list, *form;
-
-    form = ARGUMENT(0);
-
-    /* parallel setq, first pass evaluate values and basic error checking */
-    for (list = form; CONSP(list); list = CDR(list)) {
-       symbol = CAR(list);
-       CHECK_SYMBOL(symbol);
-       list = CDR(list);
-       if (!CONSP(list))
-           LispDestroy("%s: odd number of arguments", STRFUN(builtin));
-       value = EVAL(CAR(list));
-       GC_PROTECT(value);
-    }
-
-    /* second pass, assign values */
-    for (; CONSP(form); form = CDDR(form)) {
-       symbol = CAR(form);
-       CHECK_CONSTANT(symbol);
-       LispSetVar(symbol, lisp__data.protect.objects[base++]);
-    }
-    GC_LEAVE();
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Setf(LispBuiltin *builtin)
-/*
- setf &rest form
- */
-{
-    LispAtom *atom;
-    LispObj *setf, *place, *value, *result = NIL, *data;
-
-    LispObj *form;
-
-    form = ARGUMENT(0);
-
-    for (; CONSP(form); form = CDR(form)) {
-       place = CAR(form);
-       form = CDR(form);
-       if (!CONSP(form))
-           LispDestroy("%s: odd number of arguments", STRFUN(builtin));
-       value = CAR(form);
-
-       if (!POINTERP(place))
-           goto invalid_place;
-       if (XSYMBOLP(place)) {
-           CHECK_CONSTANT(place);
-           result = EVAL(value);
-           (void)LispSetVar(place, result);
-       }
-       else if (XCONSP(place)) {
-           /* it really should not be required to protect any object
-            * evaluated here, but is done for safety in case one of
-            * the evaluated forms returns data not gc protected, what
-            * could cause surprises if the object is garbage collected
-            * before finishing setf. */
-           GC_ENTER();
-
-           setf = CAR(place);
-           if (!SYMBOLP(setf))
-               goto invalid_place;
-           if (!CONSP(CDR(place)))
-               goto invalid_place;
-
-           value = EVAL(value);
-           GC_PROTECT(value);
-
-           atom = setf->data.atom;
-           if (atom->a_defsetf == 0) {
-               if (atom->a_defstruct &&
-                   atom->property->structure.function >= 0) {
-                   /* Use a default setf method for the structure field, as
-                    * if this definition have been done
-                    *  (defsetf THE-STRUCT-FIELD (struct) (value)
-                    *   `(lisp::struct-store 'THE-STRUCT-FIELD ,struct ,value))
-                    */
-                   place = CDR(place);
-                   data = CAR(place);
-                   if (CONSP(CDR(place)))
-                       goto invalid_place;
-                   data = EVAL(data);
-                   GC_PROTECT(data);
-                   result = APPLY3(Ostruct_store, setf, data, value);
-                   GC_LEAVE();
-                   continue;
-               }
-               /* Must also expand macros */
-               else if (atom->a_function &&
-                        atom->property->fun.function->funtype == LispMacro) {
-                   result = LispRunSetfMacro(atom, CDR(place), value);
-                   continue;
-               }
-               goto invalid_place;
-           }
-
-           place = CDR(place);
-           setf = setf->data.atom->property->setf;
-           if (SYMBOLP(setf)) {
-               LispObj *arguments, *cons;
-
-               if (!CONSP(CDR(place))) {
-                   arguments = EVAL(CAR(place));
-                   GC_PROTECT(arguments);
-                   result = APPLY2(setf, arguments, value);
-               }
-               else if (!CONSP(CDDR(place))) {
-                   arguments = EVAL(CAR(place));
-                   GC_PROTECT(arguments);
-                   cons = EVAL(CADR(place));
-                   GC_PROTECT(cons);
-                   result = APPLY3(setf, arguments, cons, value);
-               }
-               else {
-                   arguments = cons = CONS(EVAL(CAR(place)), NIL);
-                   GC_PROTECT(arguments);
-                   for (place = CDR(place); CONSP(place); place = CDR(place)) {
-                       RPLACD(cons, CONS(EVAL(CAR(place)), NIL));
-                       cons = CDR(cons);
-                   }
-                   RPLACD(cons, CONS(value, NIL));
-                   result = APPLY(setf, arguments);
-               }
-           }
-           else
-               result = LispRunSetf(atom->property->salist, setf, place, value);
-           GC_LEAVE();
-       }
-       else
-           goto invalid_place;
-    }
-
-    return (result);
-invalid_place:
-    LispDestroy("%s: %s is an invalid place", STRFUN(builtin), STROBJ(place));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-Lisp_Psetf(LispBuiltin *builtin)
-/*
- psetf &rest form
- */
-{
-    int base;
-    GC_ENTER();
-    LispAtom *atom;
-    LispObj *setf, *place = NIL, *value, *data;
-
-    LispObj *form;
-
-    form = ARGUMENT(0);
-
-    /* parallel setf, first pass evaluate values and basic error checking */
-    base = gc__protect;
-    for (setf = form; CONSP(setf); setf = CDR(setf)) {
-       if (!POINTERP(CAR(setf)))
-           goto invalid_place;
-       setf = CDR(setf);
-       if (!CONSP(setf))
-           LispDestroy("%s: odd number of arguments", STRFUN(builtin));
-       value = EVAL(CAR(setf));
-       GC_PROTECT(value);
-    }
-
-    /* second pass, assign values */
-    for (; CONSP(form); form = CDDR(form)) {
-       place = CAR(form);
-       value = lisp__data.protect.objects[base++];
-
-       if (XSYMBOLP(place)) {
-           CHECK_CONSTANT(place);
-           (void)LispSetVar(place, value);
-       }
-       else if (XCONSP(place)) {
-           LispObj *arguments, *cons;
-           int xbase = lisp__data.protect.length;
-
-           setf = CAR(place);
-           if (!SYMBOLP(setf))
-               goto invalid_place;
-           if (!CONSP(CDR(place)))
-               goto invalid_place;
-
-           atom = setf->data.atom;
-           if (atom->a_defsetf == 0) {
-               if (atom->a_defstruct &&
-                   atom->property->structure.function >= 0) {
-                   place = CDR(place);
-                   data = CAR(place);
-                   if (CONSP(CDR(place)))
-                       goto invalid_place;
-                   data = EVAL(data);
-                   GC_PROTECT(data);
-                   (void)APPLY3(Ostruct_store, setf, data, value);
-                   lisp__data.protect.length = xbase;
-                   continue;
-               }
-               else if (atom->a_function &&
-                        atom->property->fun.function->funtype == LispMacro) {
-                   (void)LispRunSetfMacro(atom, CDR(place), value);
-                   lisp__data.protect.length = xbase;
-                   continue;
-               }
-               goto invalid_place;
-           }
-
-           place = CDR(place);
-           setf = setf->data.atom->property->setf;
-           if (SYMBOLP(setf)) {
-               if (!CONSP(CDR(place))) {
-                   arguments = EVAL(CAR(place));
-                   GC_PROTECT(arguments);
-                   (void)APPLY2(setf, arguments, value);
-               }
-               else if (!CONSP(CDDR(place))) {
-                   arguments = EVAL(CAR(place));
-                   GC_PROTECT(arguments);
-                   cons = EVAL(CADR(place));
-                   GC_PROTECT(cons);
-                   (void)APPLY3(setf, arguments, cons, value);
-               }
-               else {
-                   arguments = cons = CONS(EVAL(CAR(place)), NIL);
-                   GC_PROTECT(arguments);
-                   for (place = CDR(place); CONSP(place); place = CDR(place)) {
-                       RPLACD(cons, CONS(EVAL(CAR(place)), NIL));
-                       cons = CDR(cons);
-                   }
-                   RPLACD(cons, CONS(value, NIL));
-                   (void)APPLY(setf, arguments);
-               }
-               lisp__data.protect.length = xbase;
-           }
-           else
-               (void)LispRunSetf(atom->property->salist, setf, place, value);
-       }
-       else
-           goto invalid_place;
-    }
-    GC_LEAVE();
-
-    return (NIL);
-invalid_place:
-    LispDestroy("%s: %s is an invalid place", STRFUN(builtin), STROBJ(place));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-Lisp_Sleep(LispBuiltin *builtin)
-/*
- sleep seconds
- */
-{
-    long sec, msec;
-    double value, dsec;
-
-    LispObj *seconds;
-
-    seconds = ARGUMENT(0);
-
-    value = -1.0;
-    switch (OBJECT_TYPE(seconds)) {
-       case LispFixnum_t:
-           value = FIXNUM_VALUE(seconds);
-           break;
-       case LispDFloat_t:
-           value = DFLOAT_VALUE(seconds);
-           break;
-       default:
-           break;
-    }
-
-    if (value < 0.0 || value > MOST_POSITIVE_FIXNUM)
-       LispDestroy("%s: %s is not a positive fixnum",
-                   STRFUN(builtin), STROBJ(seconds));
-
-    msec = modf(value, &dsec) * 1e6;
-    sec = dsec;
-
-    if (sec)
-       sleep(sec);
-    if (msec)
-       usleep(msec);
-
-    return (NIL);
-}
-
-/*
- *   This function is called recursively, but the contents of "list2" are
- * kept gc protected until it returns to LispSort. This is required partly
- * because the "gc protection logic" protects an object, not the contents
- * of the c pointer.
- */
-static LispObj *
-LispMergeSort(LispObj *list, LispObj *predicate, LispObj *key, int code)
-{
-    int protect;
-    LispObj *list1, *list2, *left, *right, *result, *cons;
-
-    /* Check if list length is larger than 1 */
-    if (!CONSP(list) || !CONSP(CDR(list)))
-       return (list);
-
-    list1 = list2 = list;
-    for (;;) {
-       list = CDR(list);
-       if (!CONSP(list))
-           break;
-       list = CDR(list);
-       if (!CONSP(list))
-           break;
-       list2 = CDR(list2);
-    }
-    cons = list2;
-    list2 = CDR(list2);
-    RPLACD(cons, NIL);
-
-    protect = 0;
-    if (lisp__data.protect.length + 2 >= lisp__data.protect.space)
-       LispMoreProtects();
-    lisp__data.protect.objects[lisp__data.protect.length++] = list2;
-    list1 = LispMergeSort(list1, predicate, key, code);
-    list2 = LispMergeSort(list2, predicate, key, code);
-
-    left = CAR(list1);
-    right = CAR(list2);
-    if (key != UNSPEC) {
-       protect = lisp__data.protect.length;
-       left = APPLY1(key, left);
-       lisp__data.protect.objects[protect] = left;
-       right = APPLY1(key, right);
-       lisp__data.protect.objects[protect + 1] = right;
-    }
-
-    result = NIL;
-    for (;;) {
-       if ((FCOMPARE(predicate, left, right, code)) == 0 &&
-           (FCOMPARE(predicate, right, left, code)) == 1) {
-           /* right is "smaller" */
-           if (result == NIL)
-               result = list2;
-           else
-               RPLACD(cons, list2);
-           cons = list2;
-           list2 = CDR(list2);
-           if (!CONSP(list2)) {
-               RPLACD(cons, list1);
-               break;
-           }
-           right = CAR(list2);
-           if (key != UNSPEC) {
-               right = APPLY1(key, right);
-               lisp__data.protect.objects[protect + 1] = right;
-           }
-       }
-       else {
-           /* left is "smaller" */
-           if (result == NIL)
-               result = list1;
-           else
-               RPLACD(cons, list1);
-           cons = list1;
-           list1 = CDR(list1);
-           if (!CONSP(list1)) {
-               RPLACD(cons, list2);
-               break;
-           }
-           left = CAR(list1);
-           if (key != UNSPEC) {
-               left = APPLY1(key, left);
-               lisp__data.protect.objects[protect] = left;
-           }
-       }
-    }
-    if (key != UNSPEC)
-       lisp__data.protect.length = protect;
-
-    return (result);
-}
-
-/* XXX The first version made a copy of the list and then adjusted
- *     the CARs of the list. To minimize GC time now it is now doing
- *     the sort inplace. So, instead of writing just (sort variable)
- *     now it is required to write (setq variable (sort variable))
- *     if the variable should always keep all elements.
- */
-LispObj *
-Lisp_Sort(LispBuiltin *builtin)
-/*
- sort sequence predicate &key key
- */
-{
-    GC_ENTER();
-    int istring, code;
-    long length;
-    char *string;
-
-    LispObj *list, *work, *cons = NULL;
-
-    LispObj *sequence, *predicate, *key;
-
-    key = ARGUMENT(2);
-    predicate = ARGUMENT(1);
-    sequence = ARGUMENT(0);
-
-    length = LispLength(sequence);
-    if (length < 2)
-       return (sequence);
-
-    list = sequence;
-    istring = XSTRINGP(sequence);
-    if (istring) {
-       CHECK_STRING_WRITABLE(sequence);
-       /* Convert string to list */
-       string = THESTR(sequence);
-       work = cons = CONS(SCHAR(string[0]), NIL);
-       GC_PROTECT(work);
-       for (++string; *string; ++string) {
-           RPLACD(cons, CONS(SCHAR(*string), NIL));
-           cons = CDR(cons);
-       }
-    }
-    else if (ARRAYP(list))
-       work = list->data.array.list;
-    else
-       work = list;
-
-    FUNCTION_CHECK(predicate);
-    code = FCODE(predicate);
-    work = LispMergeSort(work, predicate, key, code);
-
-    if (istring) {
-       /* Convert list to string */
-       string = THESTR(sequence);
-       for (; CONSP(work); ++string, work = CDR(work))
-           *string = SCHAR_VALUE(CAR(work));
-    }
-    else if (ARRAYP(list))
-       list->data.array.list = work;
-    else
-       sequence = work;
-    GC_LEAVE();
-
-    return (sequence);
-}
-
-LispObj *
-Lisp_Subseq(LispBuiltin *builtin)
-/*
- subseq sequence start &optional end
- */
-{
-    long start, end, length, seqlength;
-
-    LispObj *sequence, *ostart, *oend, *result;
-
-    oend = ARGUMENT(2);
-    ostart = ARGUMENT(1);
-    sequence = ARGUMENT(0);
-
-    LispCheckSequenceStartEnd(builtin, sequence, ostart, oend,
-                             &start, &end, &length);
-
-    seqlength = end - start;
-
-    if (sequence == NIL)
-       result = NIL;
-    else if (XSTRINGP(sequence)) {
-       char *string = LispMalloc(seqlength + 1);
-
-       memcpy(string, THESTR(sequence) + start, seqlength);
-       string[seqlength] = '\0';
-       result = STRING2(string);
-    }
-    else {
-       GC_ENTER();
-       LispObj *object;
-
-       if (end > start) {
-           /* list or array */
-           int count;
-           LispObj *cons;
-
-           if (ARRAYP(sequence))
-               object = sequence->data.array.list;
-           else
-               object = sequence;
-           /* goto first element to copy */
-           for (count = 0; count < start; count++, object = CDR(object))
-               ;
-           result = cons = CONS(CAR(object), NIL);
-           GC_PROTECT(result);
-           for (++count, object = CDR(object); count < end; count++,
-                object = CDR(object)) {
-               RPLACD(cons, CONS(CAR(object), NIL));
-               cons = CDR(cons);
-           }
-       }
-       else
-           result = NIL;
-
-       if (ARRAYP(sequence)) {
-           object = LispNew(NIL, NIL);
-           GC_PROTECT(object);
-           object->type = LispArray_t;
-           object->data.array.list = result;
-           object->data.array.dim = CONS(FIXNUM(seqlength), NIL);
-           object->data.array.rank = 1;
-           object->data.array.type = sequence->data.array.type;
-           object->data.array.zero = length == 0;
-           result = object;
-       }
-       GC_LEAVE();
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Subsetp(LispBuiltin *builtin)
-/*
- subsetp list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, SUBSETP));
-}
-
-
-LispObj *
-Lisp_Substitute(LispBuiltin *builtin)
-/*
- substitute newitem olditem sequence &key from-end test test-not start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, SUBSTITUTE, NONE));
-}
-
-LispObj *
-Lisp_SubstituteIf(LispBuiltin *builtin)
-/*
- substitute-if newitem test sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, SUBSTITUTE, IF));
-}
-
-LispObj *
-Lisp_SubstituteIfNot(LispBuiltin *builtin)
-/*
- substitute-if-not newitem test sequence &key from-end start end count key
- */
-{
-    return (LispDeleteRemoveXSubstitute(builtin, SUBSTITUTE, IFNOT));
-}
-
-LispObj *
-Lisp_Symbolp(LispBuiltin *builtin)
-/*
- symbolp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (SYMBOLP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_SymbolFunction(LispBuiltin *builtin)
-/*
- symbol-function symbol
- */
-{
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-    CHECK_SYMBOL(symbol);
-
-    return (LispSymbolFunction(symbol));
-}
-
-LispObj *
-Lisp_SymbolName(LispBuiltin *builtin)
-/*
- symbol-name symbol
- */
-{
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-    CHECK_SYMBOL(symbol);
-
-    return (LispSymbolName(symbol));
-}
-
-LispObj *
-Lisp_SymbolPackage(LispBuiltin *builtin)
-/*
- symbol-package symbol
- */
-{
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-    CHECK_SYMBOL(symbol);
-
-    symbol = symbol->data.atom->package;
-
-    return (symbol ? symbol : NIL);
-}
-
-LispObj *
-Lisp_SymbolPlist(LispBuiltin *builtin)
-/*
- symbol-plist symbol
- */
-{
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    return (symbol->data.atom->a_property ?
-           symbol->data.atom->property->properties : NIL);
-}
-
-LispObj *
-Lisp_SymbolValue(LispBuiltin *builtin)
-/*
- symbol-value symbol
- */
-{
-    LispAtom *atom;
-    LispObj *symbol;
-
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-    atom = symbol->data.atom;
-    if (!atom->a_object || atom->property->value == UNBOUND) {
-       if (atom->package == lisp__data.keyword)
-           return (symbol);
-       LispDestroy("%s: the symbol %s has no value",
-                   STRFUN(builtin), STROBJ(symbol));
-    }
-
-    return (atom->dyn ? LispGetVar(symbol) : atom->property->value);
-}
-
-LispObj *
-Lisp_Tagbody(LispBuiltin *builtin)
-/*
- tagbody &rest body
- */
-{
-    GC_ENTER();
-    int stack, lex, length;
-    LispObj *list, *body, *ptr, *tag, *labels, *map, **p_body;
-    LispBlock *block;
-
-    body = ARGUMENT(0);
-
-    /* Save environment information */
-    stack = lisp__data.stack.length;
-    lex = lisp__data.env.lex;
-    length = lisp__data.env.length;
-
-    /* Since the body may be large, and the code may iterate several
-     * thousand times, it is not a bad idea to avoid checking all
-     * elements of the body to verify if it is a tag. */
-    for (labels = map = NIL, ptr = body; CONSP(ptr); ptr = CDR(ptr)) {
-       tag = CAR(ptr);
-       switch (OBJECT_TYPE(tag)) {
-           case LispNil_t:
-           case LispAtom_t:
-           case LispFixnum_t:
-               /* Don't allow duplicated labels */
-               for (list = labels; CONSP(list); list = CDDR(list)) {
-                   if (CAR(list) == tag)
-                       LispDestroy("%s: tag %s specified more than once",
-                                   STRFUN(builtin), STROBJ(tag));
-               }
-               if (labels == NIL) {
-                   labels = CONS(tag, CONS(NIL, NIL));
-                   map = CDR(labels);
-                   GC_PROTECT(labels);
-               }
-               else {
-                   RPLACD(map, CONS(tag, CONS(NIL, NIL)));
-                   map = CDDR(map);
-               }
-               break;
-           case LispCons_t:
-               /* Restart point for tag */
-               if (map != NIL && CAR(map) == NIL)
-                   RPLACA(map, ptr);
-               break;
-           default:
-               break;
-       }
-    }
-    /* Check for consecutive labels without code between them */
-    for (ptr = labels; CONSP(ptr); ptr = CDDR(ptr)) {
-       if (CADR(ptr) == NIL) {
-           for (map = CDDR(ptr); CONSP(map); map = CDDR(map)) {
-               if (CADR(map) != NIL) {
-                   RPLACA(CDR(ptr), CADR(map));
-                   break;
-               }
-           }
-       }
-    }
-
-    /* Initialize */
-    list = body;
-    p_body = &body;
-    block = LispBeginBlock(NIL, LispBlockBody);
-
-    /* Loop */
-    if (setjmp(block->jmp) != 0) {
-       /* Restore environment */
-       lisp__data.stack.length = stack;
-       lisp__data.env.lex = lex;
-       lisp__data.env.head = lisp__data.env.length = length;
-
-       tag = lisp__data.block.block_ret;
-       for (ptr = labels; CONSP(ptr); ptr = CDDR(ptr)) {
-           map = CAR(ptr);
-           if (map == tag)
-               break;
-       }
-
-       if (!CONSP(ptr))
-           LispDestroy("%s: no such tag %s", STRFUN(builtin), STROBJ(tag));
-
-       *p_body = CADR(ptr);
-    }
-
-    /* Execute code */
-    for (; CONSP(body); body = CDR(body)) {
-       LispObj *form = CAR(body);
-
-       if (CONSP(form))
-           EVAL(form);
-    }
-    /* If got here, (go) not called, else, labels will be candidate to gc
-     * when GC_LEAVE() be called by the code in the bottom of the stack. */
-    GC_LEAVE();
-
-    /* Finished */
-    LispEndBlock(block);
-
-    /* Always return NIL */
-    return (NIL);
-}
-
-LispObj *
-Lisp_The(LispBuiltin *builtin)
-/*
- the value-type form
- */
-{
-    LispObj *value_type, *form;
-
-    form = ARGUMENT(1);
-    value_type = ARGUMENT(0);
-
-    form = EVAL(form);
-
-    return (LispCoerce(builtin, form, value_type));
-}
-
-LispObj *
-Lisp_Throw(LispBuiltin *builtin)
-/*
- throw tag result
- */
-{
-    unsigned blevel = lisp__data.block.block_level;
-
-    LispObj *tag, *result;
-
-    result = ARGUMENT(1);
-    tag = ARGUMENT(0);
-
-    tag = EVAL(tag);
-
-    if (blevel == 0)
-       LispDestroy("%s: not within a block", STRFUN(builtin));
-
-    while (blevel) {
-       LispBlock *block = lisp__data.block.block[--blevel];
-
-       if (block->type == LispBlockCatch && tag == block->tag) {
-           lisp__data.block.block_ret = EVAL(result);
-           LispBlockUnwind(block);
-           BLOCKJUMP(block);
-       }
-    }
-    LispDestroy("%s: %s is not a valid tag", STRFUN(builtin), STROBJ(tag));
-
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-static LispObj *
-LispTreeEqual(LispObj *left, LispObj *right, LispObj *test, int expect)
-{
-    LispObj *cmp_left, *cmp_right;
-
-    if ((OBJECT_TYPE(left)) ^ (OBJECT_TYPE(right)))
-       return (NIL);
-    if (CONSP(left)) {
-       for (; CONSP(left) && CONSP(right);
-            left = CDR(left), right = CDR(right)) {
-           cmp_left = CAR(left);
-           cmp_right = CAR(right);
-           if ((OBJECT_TYPE(cmp_left)) ^ (OBJECT_TYPE(cmp_right)))
-               return (NIL);
-           if (CONSP(cmp_left)) {
-               if (LispTreeEqual(cmp_left, cmp_right, test, expect) == NIL)
-                   return (NIL);
-           }
-           else {
-               if (POINTERP(cmp_left) &&
-                   (XQUOTEP(cmp_left) || XBACKQUOTEP(cmp_left))) {
-                   cmp_left = cmp_left->data.quote;
-                   cmp_right = cmp_right->data.quote;
-               }
-               else if (COMMAP(cmp_left)) {
-                   cmp_left = cmp_left->data.comma.eval;
-                   cmp_right = cmp_right->data.comma.eval;
-               }
-               if ((APPLY2(test, cmp_left, cmp_right) != NIL) != expect)
-                   return (NIL);
-           }
-       }
-       if ((OBJECT_TYPE(left)) ^ (OBJECT_TYPE(right)))
-           return (NIL);
-    }
-
-    if (POINTERP(left) && (XQUOTEP(left) || XBACKQUOTEP(left))) {
-       left = left->data.quote;
-       right = right->data.quote;
-    }
-    else if (COMMAP(left)) {
-       left = left->data.comma.eval;
-       right = right->data.comma.eval;
-    }
-
-    return ((APPLY2(test, left, right) != NIL) == expect ? T : NIL);
-}
-
-LispObj *
-Lisp_TreeEqual(LispBuiltin *builtin)
-/*
- tree-equal tree-1 tree-2 &key test test-not
- */
-{
-    int expect;
-    LispObj *compare;
-
-    LispObj *tree_1, *tree_2, *test, *test_not;
-
-    test_not = ARGUMENT(3);
-    test = ARGUMENT(2);
-    tree_2 = ARGUMENT(1);
-    tree_1 = ARGUMENT(0);
-
-    CHECK_TEST_0();
-    if (test_not != UNSPEC) {
-       expect = 0;
-       compare = test_not;
-    }
-    else {
-       if (test == UNSPEC)
-           test = Oeql;
-       expect = 1;
-       compare = test;
-    }
-
-    return (LispTreeEqual(tree_1, tree_2, compare, expect));
-}
-
-LispObj *
-Lisp_Typep(LispBuiltin *builtin)
-/*
- typep object type
- */
-{
-    LispObj *result = NULL;
-
-    LispObj *object, *type;
-
-    type = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (SYMBOLP(type)) {
-       Atom_id atom = ATOMID(type);
-
-       if (OBJECT_TYPE(object) == LispStruct_t)
-           result = ATOMID(CAR(object->data.struc.def)) == atom ? T : NIL;
-       else if (type->data.atom->a_defstruct &&
-                type->data.atom->property->structure.function == STRUCT_NAME)
-           result = NIL;
-       else if (atom == Snil)
-           result = object == NIL ? T : NIL;
-       else if (atom == St)
-           result = object == T ? T : NIL;
-       else if (atom == Satom)
-           result = !CONSP(object) ? T : NIL;
-       else if (atom == Ssymbol)
-           result = SYMBOLP(object) || object == NIL || object == T ? T : NIL;
-       else if (atom == Sinteger)
-           result = INTEGERP(object) ? T : NIL;
-       else if (atom == Srational)
-           result = RATIONALP(object) ? T : NIL;
-       else if (atom == Scons || atom == Slist)
-           result = CONSP(object) ? T : NIL;
-       else if (atom == Sstring)
-           result = STRINGP(object) ? T : NIL;
-       else if (atom == Scharacter)
-           result = SCHARP(object) ? T : NIL;
-       else if (atom == Scomplex)
-           result = COMPLEXP(object) ? T : NIL;
-       else if (atom == Svector || atom == Sarray)
-           result = ARRAYP(object) ? T : NIL;
-       else if (atom == Skeyword)
-           result = KEYWORDP(object) ? T : NIL;
-       else if (atom == Sfunction)
-           result = LAMBDAP(object) ? T : NIL;
-       else if (atom == Spathname)
-           result = PATHNAMEP(object) ? T : NIL;
-       else if (atom == Sopaque)
-           result = OPAQUEP(object) ? T : NIL;
-    }
-    else if (CONSP(type)) {
-       if (OBJECT_TYPE(object) == LispStruct_t &&
-           SYMBOLP(CAR(type)) && ATOMID(CAR(type)) == Sstruct &&
-           SYMBOLP(CAR(CDR(type))) && CDR(CDR(type)) == NIL) {
-           result = ATOMID(CAR(object->data.struc.def)) ==
-                    ATOMID(CAR(CDR(type))) ? T : NIL;
-       }
-    }
-    else if (type == NIL)
-       result = object == NIL ? T : NIL;
-    else if (type == T)
-       result = object == T ? T : NIL;
-    if (result == NULL)
-       LispDestroy("%s: bad type specification %s",
-                   STRFUN(builtin), STROBJ(type));
-
-    return (result);
-}
-
-LispObj *
-Lisp_Union(LispBuiltin *builtin)
-/*
- union list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, UNION));
-}
-
-LispObj *
-Lisp_Nunion(LispBuiltin *builtin)
-/*
- nunion list1 list2 &key test test-not key
- */
-{
-    return (LispListSet(builtin, NUNION));
-}
-
-LispObj *
-Lisp_Unless(LispBuiltin *builtin)
-/*
- unless test &rest body
- */
-{
-    LispObj *result, *test, *body;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    result = NIL;
-    test = EVAL(test);
-    RETURN_COUNT = 0;
-    if (test == NIL) {
-       for (; CONSP(body); body = CDR(body))
-           result = EVAL(CAR(body));
-    }
-
-    return (result);
-}
-
-/*
- * ext::until
- */
-LispObj *
-Lisp_Until(LispBuiltin *builtin)
-/*
- until test &rest body
- */
-{
-    LispObj *result, *test, *body, *prog;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    result = NIL;
-    for (;;) {
-       if ((result = EVAL(test)) == NIL) {
-           for (prog = body; CONSP(prog); prog = CDR(prog))
-               (void)EVAL(CAR(prog));
-       }
-       else
-           break;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_UnwindProtect(LispBuiltin *builtin)
-/*
- unwind-protect protect &rest cleanup
- */
-{
-    LispObj *result, **presult = &result;
-    int did_jump, *pdid_jump = &did_jump, destroyed;
-    LispBlock *block;
-
-    LispObj *protect, *cleanup, **pcleanup = &cleanup;
-
-    cleanup = ARGUMENT(1);
-    protect = ARGUMENT(0);
-
-    /* run protected code */
-    *presult = NIL;
-    *pdid_jump = 1;
-    block = LispBeginBlock(NIL, LispBlockProtect);
-    if (setjmp(block->jmp) == 0) {
-       *presult = EVAL(protect);
-       *pdid_jump = 0;
-    }
-    LispEndBlock(block);
-    if (!lisp__data.destroyed && *pdid_jump)
-       *presult = lisp__data.block.block_ret;
-
-    destroyed = lisp__data.destroyed;
-    lisp__data.destroyed = 0;
-
-    /* run cleanup, unprotected code */
-    if (CONSP(*pcleanup))
-       for (; CONSP(cleanup); cleanup = CDR(cleanup))
-           (void)EVAL(CAR(cleanup));
-
-    if (destroyed) {
-       /* in case there is another unwind-protect */
-       LispBlockUnwind(NULL);
-       /* if not, just return to the toplevel */
-       lisp__data.destroyed = 1;
-       LispDestroy(".");
-    }
-
-    return (result);
-}
-
-static LispObj *
-LispValuesList(LispBuiltin *builtin, int check_list)
-{
-    long i, count;
-    LispObj *result;
-
-    LispObj *list;
-
-    list = ARGUMENT(0);
-
-    count = LispLength(list) - 1;
-
-    if (count >= 0) {
-       result = CAR(list);
-       if ((RETURN_CHECK(count)) != count)
-           LispDestroy("%s: too many values", STRFUN(builtin));
-       RETURN_COUNT = count;
-       for (i = 0, list = CDR(list); count && CONSP(list);
-            count--, i++, list = CDR(list))
-           RETURN(i) = CAR(list);
-       if (check_list) {
-           CHECK_LIST(list);
-       }
-    }
-    else {
-       RETURN_COUNT = -1;
-       result = NIL;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Values(LispBuiltin *builtin)
-/*
- values &rest objects
- */
-{
-    return (LispValuesList(builtin, 0));
-}
-
-LispObj *
-Lisp_ValuesList(LispBuiltin *builtin)
-/*
- values-list list
- */
-{
-    return (LispValuesList(builtin, 1));
-}
-
-LispObj *
-Lisp_Vector(LispBuiltin *builtin)
-/*
- vector &rest objects
- */
-{
-    LispObj *objects;
-
-    objects = ARGUMENT(0);
-
-    return (VECTOR(objects));
-}
-
-LispObj *
-Lisp_When(LispBuiltin *builtin)
-/*
- when test &rest body
- */
-{
-    LispObj *result, *test, *body;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    result = NIL;
-    test = EVAL(test);
-    RETURN_COUNT = 0;
-    if (test != NIL) {
-       for (; CONSP(body); body = CDR(body))
-           result = EVAL(CAR(body));
-    }
-
-    return (result);
-}
-
-/*
- * ext::while
- */
-LispObj *
-Lisp_While(LispBuiltin *builtin)
-/*
- while test &rest body
- */
-{
-    LispObj *test, *body, *prog;
-
-    body = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    for (;;) {
-       if (EVAL(test) != NIL) {
-           for (prog = body; CONSP(prog); prog = CDR(prog))
-               (void)EVAL(CAR(prog));
-       }
-       else
-           break;
-    }
-
-    return (NIL);
-}
-
-/*
- * ext::unsetenv
- */
-LispObj *
-Lisp_Unsetenv(LispBuiltin *builtin)
-/*
- unsetenv name
- */
-{
-    char *name;
-
-    LispObj *oname;
-
-    oname = ARGUMENT(0);
-
-    CHECK_STRING(oname);
-    name = THESTR(oname);
-
-    unsetenv(name);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XeditEltStore(LispBuiltin *builtin)
-/*
- lisp::elt-store sequence index value
- */
-{
-    int length, offset;
-
-    LispObj *sequence, *oindex, *value;
-
-    value = ARGUMENT(2);
-    oindex = ARGUMENT(1);
-    sequence = ARGUMENT(0);
-
-    CHECK_INDEX(oindex);
-    offset = FIXNUM_VALUE(oindex);
-    length = LispLength(sequence);
-
-    if (offset >= length)
-       LispDestroy("%s: index %d too large for sequence length %d",
-                   STRFUN(builtin), offset, length);
-
-    if (STRINGP(sequence)) {
-       int ch;
-
-       CHECK_STRING_WRITABLE(sequence);
-       CHECK_SCHAR(value);
-       ch = SCHAR_VALUE(value);
-       if (ch < 0 || ch > 255)
-           LispDestroy("%s: cannot represent character %d",
-                       STRFUN(builtin), ch);
-       THESTR(sequence)[offset] = ch;
-    }
-    else {
-       if (ARRAYP(sequence))
-           sequence = sequence->data.array.list;
-
-       for (; offset > 0; offset--, sequence = CDR(sequence))
-           ;
-       RPLACA(sequence, value);
-    }
-
-    return (value);
-}
-
-LispObj *
-Lisp_XeditPut(LispBuiltin *builtin)
-/*
- lisp::put symbol indicator value
- */
-{
-    LispObj *symbol, *indicator, *value;
-
-    value = ARGUMENT(2);
-    indicator = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    return (CAR(LispPutAtomProperty(symbol->data.atom, indicator, value)));
-}
-
-LispObj *
-Lisp_XeditSetSymbolPlist(LispBuiltin *builtin)
-/*
- lisp::set-symbol-plist symbol list
- */
-{
-    LispObj *symbol, *list;
-
-    list = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    return (LispReplaceAtomPropertyList(symbol->data.atom, list));
-}
-
-LispObj *
-Lisp_XeditVectorStore(LispBuiltin *builtin)
-/*
- lisp::vector-store array &rest values
- */
-{
-    LispObj *value, *list, *object;
-    long rank, count, sequence, offset, accum;
-
-    LispObj *array, *values;
-
-    values = ARGUMENT(1);
-    array = ARGUMENT(0);
-
-    /* check for errors */
-    for (rank = 0, list = values;
-        CONSP(list) && CONSP(CDR(list));
-        list = CDR(list), rank++) {
-       CHECK_INDEX(CAR(values));
-    }
-
-    if (rank == 0)
-       LispDestroy("%s: too few subscripts", STRFUN(builtin));
-    value = CAR(list);
-
-    if (STRINGP(array) && rank == 1) {
-       long ch;
-       long length = STRLEN(array);
-       long offset = FIXNUM_VALUE(CAR(values));
-
-       CHECK_SCHAR(value);
-       CHECK_STRING_WRITABLE(array);
-       ch = SCHAR_VALUE(value);
-       if (offset >= length)
-           LispDestroy("%s: index %ld too large for sequence length %ld",
-                       STRFUN(builtin), offset, length);
-
-       if (ch < 0 || ch > 255)
-           LispDestroy("%s: cannot represent character %ld",
-                       STRFUN(builtin), ch);
-       THESTR(array)[offset] = ch;
-
-       return (value);
-    }
-
-    CHECK_ARRAY(array);
-    if (rank != array->data.array.rank)
-       LispDestroy("%s: too %s subscripts", STRFUN(builtin),
-                   rank < array->data.array.rank ? "few" : "many");
-
-    for (list = values, object = array->data.array.dim;
-        CONSP(CDR(list));
-        list = CDR(list), object = CDR(object)) {
-       if (FIXNUM_VALUE(CAR(list)) >= FIXNUM_VALUE(CAR(object)))
-           LispDestroy("%s: %ld is out of range, index %ld",
-                       STRFUN(builtin),
-                       FIXNUM_VALUE(CAR(list)),
-                       FIXNUM_VALUE(CAR(object)));
-    }
-
-    for (count = sequence = 0, list = values;
-        CONSP(CDR(list));
-        list = CDR(list), sequence++) {
-       for (offset = 0, object = array->data.array.dim;
-            offset < sequence; object = CDR(object), offset++)
-           ;
-       for (accum = 1, object = CDR(object); CONSP(object);
-            object = CDR(object))
-           accum *= FIXNUM_VALUE(CAR(object));
-       count += accum * FIXNUM_VALUE(CAR(list));
-    }
-
-    for (array = array->data.array.list; count > 0; array = CDR(array), count--)
-       ;
-
-    RPLACA(array, value);
-
-    return (value);
-}
-
-LispObj *
-Lisp_XeditDocumentationStore(LispBuiltin *builtin)
-/*
- lisp::documentation-store symbol type string
- */
-{
-    LispDocType_t doc_type;
-
-    LispObj *symbol, *type, *string;
-
-    string = ARGUMENT(2);
-    type = ARGUMENT(1);
-    symbol = ARGUMENT(0);
-
-    CHECK_SYMBOL(symbol);
-
-    /* type is checked in LispDocumentationType() */
-    doc_type = LispDocumentationType(builtin, type);
-
-    if (string == NIL)
-       /* allow explicitly releasing memory used for documentation */
-       LispRemDocumentation(symbol, doc_type);
-    else {
-       CHECK_STRING(string);
-       LispAddDocumentation(symbol, string, doc_type);
-    }
-
-    return (string);
-}
diff --git a/xedit/lisp/core.h b/xedit/lisp/core.h
deleted file mode 100644 (file)
index bd911d4..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/core.h,v 1.35tsi Exp $ */
-
-#ifndef Lisp_core_h
-#define Lisp_core_h
-
-#include "lisp/internal.h"
-
-void LispCoreInit(void);
-
-LispObj *Lisp_Acons(LispBuiltin*);
-LispObj *Lisp_Adjoin(LispBuiltin*);
-LispObj *Lisp_Append(LispBuiltin*);
-LispObj *Lisp_And(LispBuiltin*);
-LispObj *Lisp_Aref(LispBuiltin*);
-LispObj *Lisp_Assoc(LispBuiltin*);
-LispObj *Lisp_AssocIf(LispBuiltin*);
-LispObj *Lisp_AssocIfNot(LispBuiltin*);
-LispObj *Lisp_Apply(LispBuiltin*);
-LispObj *Lisp_Atom(LispBuiltin*);
-LispObj *Lisp_Block(LispBuiltin*);
-LispObj *Lisp_Boundp(LispBuiltin*);
-LispObj *Lisp_Butlast(LispBuiltin*);
-LispObj *Lisp_Nbutlast(LispBuiltin*);
-LispObj *Lisp_Car(LispBuiltin*);
-LispObj *Lisp_Case(LispBuiltin*);
-LispObj *Lisp_Catch(LispBuiltin*);
-LispObj *Lisp_Cdr(LispBuiltin*);
-LispObj *Lisp_C_r(LispBuiltin*);
-LispObj *Lisp_Coerce(LispBuiltin*);
-LispObj *Lisp_Cond(LispBuiltin*);
-LispObj *Lisp_Cons(LispBuiltin*);
-LispObj *Lisp_Consp(LispBuiltin*);
-LispObj *Lisp_Constantp(LispBuiltin*);
-LispObj *Lisp_CopyAlist(LispBuiltin*);
-LispObj *Lisp_CopyList(LispBuiltin*);
-LispObj *Lisp_CopyTree(LispBuiltin*);
-LispObj *Lisp_Defconstant(LispBuiltin*);
-LispObj *Lisp_Defmacro(LispBuiltin*);
-LispObj *Lisp_Defun(LispBuiltin*);
-LispObj *Lisp_Defsetf(LispBuiltin*);
-LispObj *Lisp_Defparameter(LispBuiltin*);
-LispObj *Lisp_Defvar(LispBuiltin*);
-LispObj *Lisp_Delete(LispBuiltin*);
-LispObj *Lisp_DeleteDuplicates(LispBuiltin*);
-LispObj *Lisp_DeleteIf(LispBuiltin*);
-LispObj *Lisp_DeleteIfNot(LispBuiltin*);
-LispObj *Lisp_Do(LispBuiltin*);
-LispObj *Lisp_DoP(LispBuiltin*);
-LispObj *Lisp_Documentation(LispBuiltin*);
-LispObj *Lisp_DoList(LispBuiltin*);
-LispObj *Lisp_DoTimes(LispBuiltin*);
-LispObj *Lisp_Elt(LispBuiltin*);
-LispObj *Lisp_Endp(LispBuiltin*);
-LispObj *Lisp_Eq(LispBuiltin*);
-LispObj *Lisp_Eql(LispBuiltin*);
-LispObj *Lisp_Equal(LispBuiltin*);
-LispObj *Lisp_Equalp(LispBuiltin*);
-LispObj *Lisp_Error(LispBuiltin*);
-LispObj *Lisp_Eval(LispBuiltin*);
-LispObj *Lisp_Every(LispBuiltin*);
-LispObj *Lisp_Some(LispBuiltin*);
-LispObj *Lisp_Notevery(LispBuiltin*);
-LispObj *Lisp_Notany(LispBuiltin*);
-LispObj *Lisp_Fboundp(LispBuiltin*);
-LispObj *Lisp_Find(LispBuiltin*);
-LispObj *Lisp_FindIf(LispBuiltin*);
-LispObj *Lisp_FindIfNot(LispBuiltin*);
-LispObj *Lisp_Fill(LispBuiltin*);
-LispObj *Lisp_Fmakunbound(LispBuiltin*);
-LispObj *Lisp_Functionp(LispBuiltin*);
-LispObj *Lisp_Funcall(LispBuiltin*);
-LispObj *Lisp_Gc(LispBuiltin*);
-LispObj *Lisp_Gensym(LispBuiltin*);
-LispObj *Lisp_Get(LispBuiltin*);
-LispObj *Lisp_Getenv(LispBuiltin*);
-LispObj *Lisp_Go(LispBuiltin*);
-LispObj *Lisp_If(LispBuiltin*);
-LispObj *Lisp_IgnoreErrors(LispBuiltin*);
-LispObj *Lisp_Intersection(LispBuiltin*);
-LispObj *Lisp_Nintersection(LispBuiltin*);
-LispObj *Lisp_Keywordp(LispBuiltin*);
-LispObj *Lisp_Lambda(LispBuiltin*);
-LispObj *Lisp_Last(LispBuiltin*);
-LispObj *Lisp_Let(LispBuiltin*);
-LispObj *Lisp_Length(LispBuiltin*);
-LispObj *Lisp_LetP(LispBuiltin*);
-LispObj *Lisp_List(LispBuiltin*);
-LispObj *Lisp_ListLength(LispBuiltin*);
-LispObj *Lisp_ListP(LispBuiltin*);
-LispObj *Lisp_Listp(LispBuiltin*);
-LispObj *Lisp_Loop(LispBuiltin*);
-LispObj *Lisp_MakeArray(LispBuiltin*);
-LispObj *Lisp_MakeList(LispBuiltin*);
-LispObj *Lisp_MakeSymbol(LispBuiltin*);
-LispObj *Lisp_Makunbound(LispBuiltin*);
-LispObj *Lisp_Mapc(LispBuiltin*);
-LispObj *Lisp_Mapcar(LispBuiltin*);
-LispObj *Lisp_Mapcan(LispBuiltin*);
-LispObj *Lisp_Mapl(LispBuiltin*);
-LispObj *Lisp_Maplist(LispBuiltin*);
-LispObj *Lisp_Mapcon(LispBuiltin*);
-LispObj *Lisp_Member(LispBuiltin*);
-LispObj *Lisp_MemberIf(LispBuiltin*);
-LispObj *Lisp_MemberIfNot(LispBuiltin*);
-LispObj *Lisp_MultipleValueBind(LispBuiltin*);
-LispObj *Lisp_MultipleValueCall(LispBuiltin*);
-LispObj *Lisp_MultipleValueProg1(LispBuiltin*);
-LispObj *Lisp_MultipleValueList(LispBuiltin*);
-LispObj *Lisp_MultipleValueSetq(LispBuiltin*);
-LispObj *Lisp_Nconc(LispBuiltin*);
-LispObj *Lisp_Nreverse(LispBuiltin*);
-LispObj *Lisp_NsetDifference(LispBuiltin*);
-LispObj *Lisp_Nsubstitute(LispBuiltin*);
-LispObj *Lisp_NsubstituteIf(LispBuiltin*);
-LispObj *Lisp_NsubstituteIfNot(LispBuiltin*);
-LispObj *Lisp_Nth(LispBuiltin*);
-LispObj *Lisp_Nthcdr(LispBuiltin*);
-LispObj *Lisp_NthValue(LispBuiltin*);
-LispObj *Lisp_Null(LispBuiltin*);
-LispObj *Lisp_Or(LispBuiltin*);
-LispObj *Lisp_Pairlis(LispBuiltin*);
-LispObj *Lisp_Pop(LispBuiltin*);
-LispObj *Lisp_Position(LispBuiltin*);
-LispObj *Lisp_PositionIf(LispBuiltin*);
-LispObj *Lisp_PositionIfNot(LispBuiltin*);
-LispObj *Lisp_Proclaim(LispBuiltin*);
-LispObj *Lisp_Prog1(LispBuiltin*);
-LispObj *Lisp_Prog2(LispBuiltin*);
-LispObj *Lisp_Progn(LispBuiltin*);
-LispObj *Lisp_Progv(LispBuiltin*);
-LispObj *Lisp_Provide(LispBuiltin*);
-LispObj *Lisp_Push(LispBuiltin*);
-LispObj *Lisp_Pushnew(LispBuiltin*);
-LispObj *Lisp_Quit(LispBuiltin*);
-LispObj *Lisp_Quote(LispBuiltin*);
-LispObj *Lisp_Remove(LispBuiltin*);
-LispObj *Lisp_RemoveDuplicates(LispBuiltin*);
-LispObj *Lisp_RemoveIf(LispBuiltin*);
-LispObj *Lisp_RemoveIfNot(LispBuiltin*);
-LispObj *Lisp_Remprop(LispBuiltin*);
-LispObj *Lisp_Replace(LispBuiltin*);
-LispObj *Lisp_Return(LispBuiltin*);
-LispObj *Lisp_ReturnFrom(LispBuiltin*);
-LispObj *Lisp_Reverse(LispBuiltin*);
-LispObj *Lisp_Rplaca(LispBuiltin*);
-LispObj *Lisp_Rplacd(LispBuiltin*);
-LispObj *Lisp_Search(LispBuiltin*);
-LispObj *Lisp_Setenv(LispBuiltin*);
-LispObj *Lisp_Set(LispBuiltin*);
-LispObj *Lisp_SetDifference(LispBuiltin*);
-LispObj *Lisp_SetExclusiveOr(LispBuiltin*);
-LispObj *Lisp_NsetExclusiveOr(LispBuiltin*);
-LispObj *Lisp_Setf(LispBuiltin*);
-LispObj *Lisp_Psetf(LispBuiltin*);
-LispObj *Lisp_SetQ(LispBuiltin*);
-LispObj *Lisp_Psetq(LispBuiltin*);
-LispObj *Lisp_Sleep(LispBuiltin*);
-LispObj *Lisp_Sort(LispBuiltin*);
-LispObj *Lisp_Subseq(LispBuiltin*);
-LispObj *Lisp_Subsetp(LispBuiltin*);
-LispObj *Lisp_Substitute(LispBuiltin*);
-LispObj *Lisp_SubstituteIf(LispBuiltin*);
-LispObj *Lisp_SubstituteIfNot(LispBuiltin*);
-LispObj *Lisp_Symbolp(LispBuiltin*);
-LispObj *Lisp_SymbolFunction(LispBuiltin*);
-LispObj *Lisp_SymbolName(LispBuiltin*);
-LispObj *Lisp_SymbolPackage(LispBuiltin*);
-LispObj *Lisp_SymbolPlist(LispBuiltin*);
-LispObj *Lisp_SymbolValue(LispBuiltin*);
-LispObj *Lisp_Tagbody(LispBuiltin*);
-LispObj *Lisp_Throw(LispBuiltin*);
-LispObj *Lisp_The(LispBuiltin*);
-LispObj *Lisp_TreeEqual(LispBuiltin*);
-LispObj *Lisp_Typep(LispBuiltin*);
-LispObj *Lisp_Union(LispBuiltin*);
-LispObj *Lisp_Nunion(LispBuiltin*);
-LispObj *Lisp_Unless(LispBuiltin*);
-LispObj *Lisp_Until(LispBuiltin*);
-LispObj *Lisp_Unsetenv(LispBuiltin*);
-LispObj *Lisp_UnwindProtect(LispBuiltin*);
-LispObj *Lisp_Values(LispBuiltin*);
-LispObj *Lisp_ValuesList(LispBuiltin*);
-LispObj *Lisp_Vector(LispBuiltin*);
-LispObj *Lisp_When(LispBuiltin*);
-LispObj *Lisp_While(LispBuiltin*);
-LispObj *Lisp_XeditEltStore(LispBuiltin*);
-LispObj *Lisp_XeditPut(LispBuiltin*);
-LispObj *Lisp_XeditSetSymbolPlist(LispBuiltin*);
-LispObj *Lisp_XeditVectorStore(LispBuiltin*);
-LispObj *Lisp_XeditDocumentationStore(LispBuiltin*);
-
-#endif
diff --git a/xedit/lisp/debugger.c b/xedit/lisp/debugger.c
deleted file mode 100644 (file)
index c9de39d..0000000
+++ /dev/null
@@ -1,828 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/debugger.c,v 1.24tsi Exp $ */
-
-#include <ctype.h>
-#include "lisp/io.h"
-#include "lisp/debugger.h"
-#include "lisp/write.h"
-
-#ifdef DEBUGGER
-#define DebuggerHelp           0
-#define DebuggerAbort          1
-#define DebuggerBacktrace      2
-#define DebuggerContinue       3
-#define DebuggerFinish         4
-#define DebuggerFrame          5
-#define DebuggerNext           6
-#define DebuggerPrint          7
-#define DebuggerStep           8
-#define DebuggerBreak          9
-#define DebuggerDelete         10
-#define DebuggerDown           11
-#define DebuggerUp             12
-#define DebuggerInfo           13
-#define DebuggerWatch          14
-
-#define DebuggerInfoBreakpoints        0
-#define DebuggerInfoBacktrace  1
-
-/*
- * Prototypes
- */
-static char *format_integer(int);
-static void LispDebuggerCommand(LispObj *obj);
-
-/*
- * Initialization
- */
-static struct {
-    char *name;
-    int action;
-} commands[] = {
-    {"help",           DebuggerHelp},
-    {"abort",          DebuggerAbort},
-    {"backtrace",      DebuggerBacktrace},
-    {"b",              DebuggerBreak},
-    {"break",          DebuggerBreak},
-    {"bt",             DebuggerBacktrace},
-    {"continue",       DebuggerContinue},
-    {"d",              DebuggerDelete},
-    {"delete",         DebuggerDelete},
-    {"down",           DebuggerDown},
-    {"finish",         DebuggerFinish},
-    {"frame",          DebuggerFrame},
-    {"info",           DebuggerInfo},
-    {"n",              DebuggerNext},
-    {"next",           DebuggerNext},
-    {"print",          DebuggerPrint},
-    {"run",            DebuggerContinue},
-    {"s",              DebuggerStep},
-    {"step",           DebuggerStep},
-    {"up",             DebuggerUp},
-    {"watch",          DebuggerWatch},
-};
-
-static struct {
-    char *name;
-    int subaction;
-} info_commands[] = {
-    {"breakpoints",    DebuggerInfoBreakpoints},
-    {"stack",          DebuggerInfoBacktrace},
-    {"watchpoints",    DebuggerInfoBreakpoints},
-};
-
-static char debugger_help[] =
-"Available commands are:\n\
-\n\
-help           - This message.\n\
-abort          - Abort the current execution, and return to toplevel.\n\
-backtrace, bt  - Print backtrace.\n\
-b, break       - Set breakpoint at function name argument.\n\
-continue       - Continue execution.\n\
-d, delete      - Delete breakpoint(s), all breakpoint if no arguments given.\n\
-down           - Set environment to frame called by the current one.\n\
-finish         - Executes until current form is finished.\n\
-frame          - Set environment to selected frame.\n\
-info           - Prints information about the debugger state.\n\
-n, next                - Evaluate next form.\n\
-print          - Print value of variable name argument.\n\
-run            - Continue execution.\n\
-s, step                - Evaluate next form, stopping on any subforms.\n\
-up             - Set environment to frame that called the current one.\n\
-\n\
-Commands may be abbreviated.\n";
-
-static char debugger_info_help[] =
-"Available subcommands are:\n\
-\n\
-breakpoints    - List and prints status of breakpoints, and watchpoints.\n\
-stack          - Backtrace of stack.\n\
-watchpoints    - List and prints status of watchpoints, and breakpoints.\n\
-\n\
-Subcommands may be abbreviated.\n";
-
-/* Debugger variables layout (if you change it, update description):
- *
- * DBG
- *     is a macro for lisp__data.dbglist
- *     is a NIL terminated list
- *     every element is a list in the format (NOT NIL terminated):
- *     (list* NAM ARG ENV HED LEX)
- *     where
- *             NAM is an ATOM for the function/macro name
- *                 or NIL for lambda expressions
- *             ARG is NAM arguments (a LIST)
- *             ENV is the value of lisp__data.stack.base (a FIXNUM)
- *             LEN is the value of lisp__data.env.length (a FIXNUM)
- *             LEX is the value of lisp__data.env.lex (a FIXNUM)
- *     new elements are added to the beggining of the DBG list
- *
- * BRK
- *     is macro for lisp__data.brklist
- *     is a NIL terminated list
- *     every element is a list in the format (NIL terminated):
- *     (list NAM IDX TYP HIT VAR VAL FRM)
- *     where
- *             NAM is an ATOM for the name of the object at
- *                 wich the breakpoint was added
- *             IDX is a FIXNUM, the breakpoint number
- *                 must be stored, as breakpoints may be deleted
- *             TYP is a FIXNUM that must be an integer of enum LispBreakType
- *             HIT is a FIXNUM, with the number of times this breakpoint was
- *                 hitted.
- *             VAR variable to watch a SYMBOL  (not needed for breakpoints)
- *             VAL value of watched variable   (not needed for breakpoints)
- *             FRM frame where variable started being watched
- *                                             (not needed for breakpoints)
- *     new elements are added to the end of the list
- */
-
-/*
- * Implementation
- */
-void
-LispDebugger(LispDebugCall call, LispObj *name, LispObj *arg)
-{
-    int force = 0;
-    LispObj *obj, *prev;
-
-    switch (call) {
-       case LispDebugCallBegin:
-           ++lisp__data.debug_level;
-           GCDisable();
-           DBG = CONS(CONS(name, CONS(arg, CONS(FIXNUM(lisp__data.stack.base),
-                      CONS(FIXNUM(lisp__data.env.length),
-                           FIXNUM(lisp__data.env.lex))))), DBG);
-           GCEnable();
-           for (obj = BRK; obj != NIL; obj = CDR(obj))
-               if (ATOMID(CAR(CAR(obj))) == ATOMID(name) &&
-                   FIXNUM_VALUE(CAR(CDR(CDR(CAR(obj))))) ==
-                   LispDebugBreakFunction)
-                   break;
-           if (obj != NIL) {
-               long counter;
-
-               /* if not at a fresh line */
-               if (LispGetColumn(NIL))
-                   LispFputc(Stdout, '\n');
-               LispFputs(Stdout, "BREAK #");
-               LispWriteObject(NIL, CAR(CDR(CAR(obj))));
-               LispFputs(Stdout, "> (");
-               LispWriteObject(NIL, CAR(CAR(DBG)));
-               LispFputc(Stdout, ' ');
-               LispWriteObject(NIL, CAR(CDR(CAR(DBG))));
-               LispFputs(Stdout, ")\n");
-               force = 1;
-               /* update hits counter */
-               counter = FIXNUM_VALUE(CAR(CDR(CDR(CDR(CAR(obj))))));
-               CAR(CDR(CDR(CDR(CAR(obj))))) FIXNUM(counter + 1);
-           }
-           break;
-       case LispDebugCallEnd:
-           DBG = CDR(DBG);
-           if (lisp__data.debug_level < lisp__data.debug_step)
-               lisp__data.debug_step = lisp__data.debug_level;
-           --lisp__data.debug_level;
-           break;
-       case LispDebugCallFatal:
-           LispDebuggerCommand(NIL);
-           return;
-       case LispDebugCallWatch:
-           break;
-    }
-
-    /* didn't return, check watchpoints */
-    if (call == LispDebugCallEnd || call == LispDebugCallWatch) {
-watch_again:
-       for (prev = obj = BRK; obj != NIL; prev = obj, obj = CDR(obj)) {
-           if (FIXNUM_VALUE(CAR(CDR(CDR(CAR(obj))))) ==
-               LispDebugBreakVariable) {
-               /* the variable */
-               LispObj *wat = CAR(CDR(CDR(CDR(CDR(CAR(obj))))));
-               void *sym = LispGetVarAddr(CAAR(obj));
-               LispObj *frm = CAR(CDR(CDR(CDR(CDR(CDR(CDR(CAR(obj))))))));
-
-               if ((sym == NULL && lisp__data.debug_level <= 0) ||
-                   (sym != wat->data.opaque.data &&
-                    FIXNUM_VALUE(frm) > lisp__data.debug_level)) {
-                   LispFputs(Stdout, "WATCH #");
-                   LispFputs(Stdout, format_integer(FIXNUM_VALUE(CAR(CDR(CAR(obj))))));
-                   LispFputs(Stdout, "> ");
-                   LispFputs(Stdout, STRPTR(CAR(CAR(obj))));
-                   LispFputs(Stdout, " deleted. Variable does not exist anymore.\n");
-                   /* force debugger to stop */
-                   force = 1;
-                   if (obj == prev) {
-                       BRK = CDR(BRK);
-                       goto watch_again;
-                   }
-                   else
-                       RPLACD(prev, CDR(obj));
-                   obj = prev;
-               }
-               else {
-                   /* current value */
-                   LispObj *cur = *(LispObj**)wat->data.opaque.data;
-                   /* last value */
-                   LispObj *val = CAR(CDR(CDR(CDR(CDR(CDR(CAR(obj)))))));
-                   if (XEQUAL(val, cur) == NIL) {
-                       long counter;
-
-                       LispFputs(Stdout, "WATCH #");
-                       LispFputs(Stdout, format_integer(FIXNUM_VALUE(CAR(CDR(CAR(obj))))));
-                       LispFputs(Stdout, "> ");
-                       LispFputs(Stdout, STRPTR(CAR(CAR(obj))));
-                       LispFputc(Stdout, '\n');
-
-                       LispFputs(Stdout, "OLD: ");
-                       LispWriteObject(NIL, val);
-
-                       LispFputs(Stdout, "\nNEW: ");
-                       LispWriteObject(NIL, cur);
-                       LispFputc(Stdout, '\n');
-
-                       /* update current value */
-                       CAR(CDR(CDR(CDR(CDR(CDR(CAR(obj))))))) = cur;
-                       /* update hits counter */
-                       counter = FIXNUM_VALUE(CAR(CDR(CDR(CDR(CAR(obj))))));
-                       CAR(CDR(CDR(CDR(CAR(obj))))) = FIXNUM(counter + 1);
-                       /* force debugger to stop */
-                       force = 1;
-                   }
-               }
-           }
-       }
-
-       if (call == LispDebugCallWatch)
-           /* special call, just don't keep gc protected variables that may be
-            * using a lot of memory... */
-           return;
-    }
-
-    switch (lisp__data.debug) {
-       case LispDebugUnspec:
-           LispDebuggerCommand(NIL);
-           goto debugger_done;
-       case LispDebugRun:
-           if (force)
-               LispDebuggerCommand(NIL);
-           goto debugger_done;
-       case LispDebugFinish:
-           if (!force &&
-               (call != LispDebugCallEnd ||
-                lisp__data.debug_level != lisp__data.debug_step))
-               goto debugger_done;
-           break;
-       case LispDebugNext:
-           if (call == LispDebugCallBegin) {
-               if (!force && lisp__data.debug_level != lisp__data.debug_step)
-                   goto debugger_done;
-           }
-           else if (call == LispDebugCallEnd) {
-               if (!force && lisp__data.debug_level >= lisp__data.debug_step)
-                   goto debugger_done;
-           }
-           break;
-       case LispDebugStep:
-           break;
-    }
-
-    if (call == LispDebugCallBegin) {
-       LispFputc(Stdout, '#');
-       LispFputs(Stdout, format_integer(lisp__data.debug_level));
-       LispFputs(Stdout, "> (");
-       LispWriteObject(NIL, CAR(CAR(DBG)));
-       LispFputc(Stdout, ' ');
-       LispWriteObject(NIL, CAR(CDR(CAR(DBG))));
-       LispFputs(Stdout, ")\n");
-       LispDebuggerCommand(NIL);
-    }
-    else if (call == LispDebugCallEnd) {
-       LispFputc(Stdout, '#');
-       LispFputs(Stdout, format_integer(lisp__data.debug_level + 1));
-       LispFputs(Stdout, "= ");
-       LispWriteObject(NIL, arg);
-       LispFputc(Stdout, '\n');
-       LispDebuggerCommand(NIL);
-    }
-    else if (force)
-       LispDebuggerCommand(arg);
-
-debugger_done:
-    return;
-}
-
-static void
-LispDebuggerCommand(LispObj *args)
-{
-    LispObj *obj, *frm, *curframe;
-    int i = 0, frame, matches, action = -1, subaction = 0;
-    char *cmd, *arg, *ptr, line[256];
-
-    int envbase = lisp__data.stack.base,
-       envlen = lisp__data.env.length,
-       envlex = lisp__data.env.lex;
-
-    frame = lisp__data.debug_level;
-    curframe = CAR(DBG);
-
-    line[0] = '\0';
-    arg = line;
-    for (;;) {
-       LispFputs(Stdout, DBGPROMPT);
-       LispFflush(Stdout);
-       if (LispFgets(Stdin, line, sizeof(line)) == NULL) {
-           LispFputc(Stdout, '\n');
-           return;
-       }
-       /* get command */
-       ptr = line;
-       while (*ptr && isspace(*ptr))
-           ++ptr;
-       cmd = ptr;
-       while (*ptr && !isspace(*ptr))
-           ++ptr;
-       if (*ptr)
-           *ptr++ = '\0';
-
-       if (*cmd) {     /* if *cmd is nul, then arg may be still set */
-           /* get argument(s) */
-           while (*ptr && isspace(*ptr))
-               ++ptr;
-           arg = ptr;
-           /* goto end of line */
-           if (*ptr) {
-               while (*ptr)
-                   ++ptr;
-               --ptr;
-               while (*ptr && isspace(*ptr))
-                   --ptr;
-               if (*ptr)
-                   *++ptr = '\0';
-           }
-       }
-
-       if (*cmd == '\0') {
-           if (action < 0) {
-               if (lisp__data.debug == LispDebugFinish)
-                   action = DebuggerFinish;
-               else if (lisp__data.debug == LispDebugNext)
-                   action = DebuggerNext;
-               else if (lisp__data.debug == LispDebugStep)
-                   action = DebuggerStep;
-               else if (lisp__data.debug == LispDebugRun)
-                   action = DebuggerContinue;
-               else
-                   continue;
-           }
-       }
-       else {
-           for (i = matches = 0; i < sizeof(commands) / sizeof(commands[0]);
-                i++) {
-               char *str = commands[i].name;
-
-               ptr = cmd;
-               while (*ptr && *ptr == *str) {
-                   ++ptr;
-                   ++str;
-               }
-               if (*ptr == '\0') {
-                   action = commands[i].action;
-                   if (*str == '\0') {
-                       matches = 1;
-                       break;
-                   }
-                   ++matches;
-               }
-           }
-           if (matches == 0) {
-               LispFputs(Stdout, "* Command unknown: ");
-               LispFputs(Stdout, cmd);
-               LispFputs(Stdout, ". Type help for help.\n");
-               continue;
-           }
-           else if (matches > 1) {
-               LispFputs(Stdout, "* Command is ambiguous: ");
-               LispFputs(Stdout, cmd);
-               LispFputs(Stdout, ". Type help for help.\n");
-               continue;
-           }
-       }
-
-       switch (action) {
-           case DebuggerHelp:
-               LispFputs(Stdout, debugger_help);
-               break;
-           case DebuggerInfo:
-               if (*arg == '\0') {
-                   LispFputs(Stdout, debugger_info_help);
-                   break;
-               }
-
-               for (i = matches = 0;
-                    i < sizeof(info_commands) / sizeof(info_commands[0]);
-                    i++) {
-                   char *str = info_commands[i].name;
-
-                   ptr = arg;
-                   while (*ptr && *ptr == *str) {
-                       ++ptr;
-                       ++str;
-                   }
-                   if (*ptr == '\0') {
-                       subaction = info_commands[i].subaction;
-                       if (*str == '\0') {
-                           matches = 1;
-                           break;
-                       }
-                       ++matches;
-                   }
-               }
-               if (matches == 0) {
-                   LispFputs(Stdout, "* Command unknown: ");
-                   LispFputs(Stdout, arg);
-                   LispFputs(Stdout, ". Type info for help.\n");
-                   continue;
-               }
-               else if (matches > 1) {
-                   LispFputs(Stdout, "* Command is ambiguous: ");
-                   LispFputs(Stdout, arg);
-                   LispFputs(Stdout, ". Type info for help.\n");
-                   continue;
-               }
-
-               switch (subaction) {
-                   case DebuggerInfoBreakpoints:
-                       LispFputs(Stdout, "Num\tHits\tType\t\tWhat\n");
-                       for (obj = BRK; obj != NIL; obj = CDR(obj)) {
-                           /* breakpoint number */
-                           LispFputc(Stdout, '#');
-                           LispWriteObject(NIL, CAR(CDR(CAR(obj))));
-
-                           /* number of hits */
-                           LispFputc(Stdout, '\t');
-                           LispWriteObject(NIL, CAR(CDR(CDR(CDR(CAR(obj))))));
-
-                           /* breakpoint type */
-                           LispFputc(Stdout, '\t');
-                           switch ((int)FIXNUM_VALUE(CAR(CDR(CDR(CAR(obj)))))) {
-                               case LispDebugBreakFunction:
-                                   LispFputs(Stdout, "Function");
-                                   break;
-                               case LispDebugBreakVariable:
-                                   LispFputs(Stdout, "Variable");
-                                   break;
-                           }
-
-                           /* breakpoint object */
-                           LispFputc(Stdout, '\t');
-                           LispWriteObject(NIL, CAR(CAR(obj)));
-                           LispFputc(Stdout, '\n');
-                       }
-                       break;
-                   case DebuggerInfoBacktrace:
-                       goto debugger_print_backtrace;
-               }
-               break;
-           case DebuggerAbort:
-               while (lisp__data.mem.level) {
-                   --lisp__data.mem.level;
-                   if (lisp__data.mem.mem[lisp__data.mem.level])
-                       free(lisp__data.mem.mem[lisp__data.mem.level]);
-               }
-               lisp__data.mem.index = 0;
-               LispTopLevel();
-               if (!lisp__data.running) {
-                   LispMessage("*** Fatal: nowhere to longjmp.");
-                   abort();
-               }
-               /* don't need to restore environment */
-               siglongjmp(lisp__data.jmp, 1);
-               /*NOTREACHED*/
-               break;
-           case DebuggerBreak:
-               for (ptr = arg; *ptr; ptr++) {
-                   if (isspace(*ptr))
-                       break;
-                   else
-                       *ptr = toupper(*ptr);
-               }
-
-               if (!*arg || *ptr || strchr(arg, '(') || strchr(arg, '(') ||
-                   strchr(arg, ';')) {
-                   LispFputs(Stdout, "* Bad function name '");
-                   LispFputs(Stdout, arg);
-                   LispFputs(Stdout, "' specified.\n");
-               }
-               else {
-                   for (obj = frm = BRK; obj != NIL; frm = obj, obj = CDR(obj))
-                       ;
-                   i = lisp__data.debug_break;
-                   ++lisp__data.debug_break;
-                   GCDisable();
-                   obj = CONS(ATOM(arg),
-                              CONS(FIXNUM(i),
-                                   CONS(FIXNUM(LispDebugBreakFunction),
-                                        CONS(FIXNUM(0), NIL))));
-                   if (BRK == NIL)
-                       BRK = CONS(obj, NIL);
-                   else
-                       RPLACD(frm, CONS(obj, NIL));
-                   GCEnable();
-               }
-               break;
-           case DebuggerWatch: {
-               void *sym;
-               int vframe;
-               LispObj *val, *atom;
-
-               /* make variable name uppercase, an ATOM */
-               ptr = arg;
-               while (*ptr) {
-                   *ptr = toupper(*ptr);
-                   ++ptr;
-               }
-               atom = ATOM(arg);
-               val = LispGetVar(atom);
-               if (val == NULL) {
-                   LispFputs(Stdout, "* No variable named '");
-                   LispFputs(Stdout, arg);
-                   LispFputs(Stdout, "' in the selected frame.\n");
-                   break;
-               }
-
-               /* variable is available at the current frame */
-               sym = LispGetVarAddr(atom);
-
-               /* find the lowest frame where the variable is visible */
-               vframe = 0;
-               if (frame > 0) {
-                   for (; vframe < frame; vframe++) {
-                       for (frm = DBG, i = lisp__data.debug_level; i > vframe;
-                            frm = CDR(frm), i--)
-                           ;
-                       obj = CAR(frm);
-                       lisp__data.stack.base = FIXNUM_VALUE(CAR(CDR(CDR(obj))));
-                       lisp__data.env.length = FIXNUM_VALUE(CAR(CDR(CDR(CDR(obj)))));
-                       lisp__data.env.lex = FIXNUM_VALUE(CDR(CDR(CDR(CDR(obj)))));
-
-                       if (LispGetVarAddr(atom) == sym)
-                           /* got variable initial frame */
-                           break;
-                   }
-                   vframe = i;
-                   if (vframe != frame) {
-                       /* restore environment */
-                       for (frm = DBG, i = lisp__data.debug_level; i > frame;
-                            frm = CDR(frm), i--)
-                           ;
-                       obj = CAR(frm);
-                       lisp__data.stack.base = FIXNUM_VALUE(CAR(CDR(CDR(obj))));
-                       lisp__data.env.length = FIXNUM_VALUE(CAR(CDR(CDR(CDR(obj)))));
-                       lisp__data.env.lex = FIXNUM_VALUE(CDR(CDR(CDR(CDR(obj)))));
-                   }
-               }
-
-               i = lisp__data.debug_break;
-               ++lisp__data.debug_break;
-               for (obj = frm = BRK; obj != NIL; frm = obj, obj = CDR(obj))
-                   ;
-
-               GCDisable();
-               obj = CONS(atom,                                        /* NAM */
-                          CONS(FIXNUM(i),                              /* IDX */
-                               CONS(FIXNUM(LispDebugBreakVariable),    /* TYP */
-                                    CONS(FIXNUM(0),                    /* HIT */
-                                         CONS(OPAQUE(sym, 0),          /* VAR */
-                                              CONS(val,                /* VAL */
-                                                   CONS(FIXNUM(vframe),/* FRM */
-                                                             NIL)))))));
-
-               /* add watchpoint */
-               if (BRK == NIL)
-                   BRK = CONS(obj, NIL);
-               else
-                   RPLACD(frm, CONS(obj, NIL));
-               GCEnable();
-           }   break;
-           case DebuggerDelete:
-               if (*arg == 0) {
-                   int confirm = 0;
-
-                   for (;;) {
-                       int ch;
-
-                       LispFputs(Stdout, "* Delete all breakpoints? (y or n) ");
-                       LispFflush(Stdout);
-                       if ((ch = LispFgetc(Stdin)) == '\n')
-                           continue;
-                       while ((i = LispFgetc(Stdin)) != '\n' && i != EOF)
-                           ;
-                       if (tolower(ch) == 'n')
-                           break;
-                       else if (tolower(ch) == 'y') {
-                           confirm = 1;
-                           break;
-                       }
-                   }
-                   if (confirm)
-                       BRK = NIL;
-               }
-               else {
-                   for (ptr = arg; *ptr;) {
-                       while (*ptr && isdigit(*ptr))
-                           ++ptr;
-                       if (*ptr && !isspace(*ptr)) {
-                           *ptr = '\0';
-                           LispFputs(Stdout, "* Bad breakpoint number '");
-                           LispFputs(Stdout, arg);
-                           LispFputs(Stdout, "' specified.\n");
-                           break;
-                       }
-                       i = atoi(arg);
-                       for (obj = frm = BRK; frm != NIL;
-                            obj = frm, frm = CDR(frm))
-                           if (FIXNUM_VALUE(CAR(CDR(CAR(frm)))) == i)
-                               break;
-                       if (frm == NIL) {
-                           LispFputs(Stdout, "* No breakpoint number ");
-                           LispFputs(Stdout, arg);
-                           LispFputs(Stdout, " available.\n");
-                           break;
-                       }
-                       if (obj == frm)
-                           BRK = CDR(BRK);
-                       else
-                           RPLACD(obj, CDR(frm));
-                       while (*ptr && isspace(*ptr))
-                           ++ptr;
-                       arg = ptr;
-                   }
-               }
-               break;
-           case DebuggerFrame:
-               i = -1;
-               ptr = arg;
-               if (*ptr) {
-                   i = 0;
-                   while (*ptr && isdigit(*ptr)) {
-                       i *= 10;
-                       i += *ptr - '0';
-                       ++ptr;
-                   }
-                   if (*ptr) {
-                       LispFputs(Stdout, "* Frame identifier must "
-                               "be a positive number.\n");
-                       break;
-                   }
-               }
-               else
-                   goto debugger_print_frame;
-               if (i >= 0 && i <= lisp__data.debug_level)
-                   goto debugger_new_frame;
-               LispFputs(Stdout, "* No such frame ");
-               LispFputs(Stdout, format_integer(i));
-               LispFputs(Stdout, ".\n");
-               break;
-           case DebuggerDown:
-               if (frame + 1 > lisp__data.debug_level) {
-                   LispFputs(Stdout, "* Cannot go down.\n");
-                   break;
-               }
-               i = frame + 1;
-               goto debugger_new_frame;
-               break;
-           case DebuggerUp:
-               if (frame == 0) {
-                   LispFputs(Stdout, "* Cannot go up.\n");
-                   break;
-               }
-               i = frame - 1;
-               goto debugger_new_frame;
-               break;
-           case DebuggerPrint:
-               ptr = arg;
-               while (*ptr) {
-                   *ptr = toupper(*ptr);
-                   ++ptr;
-               }
-               obj = LispGetVar(ATOM(arg));
-               if (obj != NULL) {
-                   LispWriteObject(NIL, obj);
-                   LispFputc(Stdout, '\n');
-               }
-               else {
-                   LispFputs(Stdout, "* No variable named '");
-                   LispFputs(Stdout, arg);
-                   LispFputs(Stdout, "' in the selected frame.\n");
-               }
-               break;
-           case DebuggerBacktrace:
-debugger_print_backtrace:
-               if (DBG == NIL) {
-                   LispFputs(Stdout, "* No stack.\n");
-                   break;
-               }
-               DBG = LispReverse(DBG);
-               for (obj = DBG, i = 0; obj != NIL; obj = CDR(obj), i++) {
-                   frm = CAR(obj);
-                   LispFputc(Stdout, '#');
-                   LispFputs(Stdout, format_integer(i));
-                   LispFputs(Stdout, "> (");
-                   LispWriteObject(NIL, CAR(frm));
-                   LispFputc(Stdout, ' ');
-                   LispWriteObject(NIL, CAR(CDR(frm)));
-                   LispFputs(Stdout, ")\n");
-               }
-               DBG = LispReverse(DBG);
-               break;
-           case DebuggerContinue:
-               lisp__data.debug = LispDebugRun;
-               goto debugger_command_done;
-           case DebuggerFinish:
-               if (lisp__data.debug != LispDebugFinish) {
-                   lisp__data.debug_step = lisp__data.debug_level - 2;
-                   lisp__data.debug = LispDebugFinish;
-               }
-               else
-                   lisp__data.debug_step = lisp__data.debug_level - 1;
-               goto debugger_command_done;
-           case DebuggerNext:
-               if (lisp__data.debug != LispDebugNext) {
-                   lisp__data.debug = LispDebugNext;
-                   lisp__data.debug_step = lisp__data.debug_level + 1;
-               }
-               goto debugger_command_done;
-           case DebuggerStep:
-               lisp__data.debug = LispDebugStep;
-               goto debugger_command_done;
-       }
-       continue;
-
-debugger_new_frame:
-       /* goto here with i as the new frame value, after error checking */
-       if (i != frame) {
-           frame = i;
-           for (frm = DBG, i = lisp__data.debug_level;
-                i > frame; frm = CDR(frm), i--)
-               ;
-           curframe = CAR(frm);
-           lisp__data.stack.base = FIXNUM_VALUE(CAR(CDR(CDR(curframe))));
-           lisp__data.env.length = FIXNUM_VALUE(CAR(CDR(CDR(CDR(curframe)))));
-           lisp__data.env.lex = FIXNUM_VALUE(CDR(CDR(CDR(CDR(curframe)))));
-       }
-debugger_print_frame:
-       LispFputc(Stdout, '#');
-       LispFputs(Stdout, format_integer(frame));
-       LispFputs(Stdout, "> (");
-       LispWriteObject(NIL, CAR(curframe));
-       LispFputc(Stdout, ' ');
-       LispWriteObject(NIL, CAR(CDR(curframe)));
-       LispFputs(Stdout, ")\n");
-    }
-
-debugger_command_done:
-    lisp__data.stack.base = envbase;
-    lisp__data.env.length = envlen;
-    lisp__data.env.lex = envlex;
-}
-
-static char *
-format_integer(int integer)
-{
-    static char buffer[16];
-
-    sprintf(buffer, "%d", integer);
-
-    return (buffer);
-}
-
-#endif /* DEBUGGER */
diff --git a/xedit/lisp/debugger.h b/xedit/lisp/debugger.h
deleted file mode 100644 (file)
index 0af5134..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/debugger.h,v 1.7tsi Exp $ */
-
-#ifndef Lisp_debugger_h
-#define Lisp_debugger_h
-
-/*
- * Definitions
- */
-#define        DBGPROMPT       "DEBUG> "
-#ifdef DEBUGGER
-
-/*
- * Types
- */
-typedef enum _LispDebugState {
-    LispDebugUnspec,   /* initial state */
-    LispDebugRun,      /* just run, until breakpoint or error */
-    LispDebugFinish,   /* evaluates until selected form is finished */
-    LispDebugNext,     /* evaluate form */
-    LispDebugStep      /* evaluate form, and step on subforms */
-} LispDebugState;
-
-typedef enum _LispDebugCall {
-    LispDebugCallBegin,
-    LispDebugCallEnd,
-    LispDebugCallFatal,
-    LispDebugCallWatch /* just remove watched variables that lost context */
-} LispDebugCall;
-
-typedef enum _LispDebugBreak {
-    LispDebugBreakFunction,
-    LispDebugBreakVariable
-} LispDebugBreak;
-
-#include "lisp/private.h"
-
-/*
- * Prototypes
- */
-void LispDebugger(LispDebugCall, LispObj*, LispObj*);
-
-#endif /* DEBUGGER */
-#endif /* Lisp_debugger_h */
diff --git a/xedit/lisp/env.c b/xedit/lisp/env.c
deleted file mode 100644 (file)
index e87793a..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Provide setenv() and unsetenv() on platforms that don't have them.
- * From FreeBSD's libc.
- */
-
-/*
- * Copyright (c) 1987, 1993
- *      The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by the University of
- *      California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* $XFree86$ */
-
-
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-
-extern char **environ;
-
-extern int setenv(const char *name, const char *value, int overwrite);
-extern void unsetenv(const char *name);
-
-static char *
-findenv(const char *name, int *offset)
-{
-    int len, i;
-    const char *np;
-    char **p, *cp;
-
-    if (name == NULL || environ == NULL)
-       return NULL;
-
-    for (np = name; *np && *np != '='; ++np)
-       continue;
-    len = np - name;
-    for (p = environ; (cp = *p) != NULL; ++p) {
-       for (np = name, i = len; i && *cp; i--)
-           if (*cp++ != *np++)
-               break;
-       if (i == 0 && *cp++ == '=') {
-           *offset = p - environ;
-           return cp;
-       }
-    }
-    return NULL;
-}
-
-/*
- * setenv --
- *      Set the value of the environmental variable "name" to be
- *      "value".  If overwrite is set, replace any current value.
- */
-
-int
-setenv(const char *name, const char *value, int overwrite)
-{
-    static char **alloced;                     /* if allocated space before */
-    char *c;
-    int l_value, offset;
-
-    if (*value == '=')                         /* no '=' in value */
-       ++value;
-    l_value = strlen(value);
-    if ((c = findenv(name, &offset))) {                /* find if already exists */
-       if (!overwrite)
-           return 0;
-       if (strlen(c) >= l_value) {             /* old larger; copy over */
-           while ((*c++ = *value++))
-               ;
-           return 0;
-       }
-    } else {                                   /* create new slot */
-       int cnt;
-       char **p;
-
-       for (p = environ, cnt = 0; *p; ++p, ++cnt)
-           ;
-       if (alloced == environ) {               /* just increase size */
-           p = (char **)realloc((char *)environ,
-                                sizeof(char *) * (cnt + 2));
-           if (!p)
-               return -1;
-           alloced = environ = p;
-       } else {                                /* get new space */
-                                               /* copy old entries into it */
-           p = malloc(sizeof(char *) * (cnt + 2));
-           if (!p)
-               return -1;
-           memcpy(p, environ, cnt * sizeof(char *));
-           alloced = environ = p;
-       }
-       environ[cnt + 1] = NULL;
-       offset = cnt;
-    }
-    for (c = (char *)name; *c && *c != '='; ++c)       /* no '=' in name */
-       ;
-    if (!(environ[offset] =                            /* name + '=' + value */
-                       malloc((int)(c - name) + l_value + 2)))
-       return -1;
-    for (c = environ[offset]; (*c = *name++) && *c != '='; ++c)
-       ;
-    for (*c++ = '='; (*c++ = *value++); )
-       ;
-    return 0;
-}
-
-/*
- * unsetenv(name) --
- *      Delete environmental variable "name".
- */
-
-void
-unsetenv(const char *name)
-{
-    char **p;
-    int offset;
-
-    while (findenv(name, &offset))             /* if set multiple times */
-       for (p = &environ[offset];; ++p)
-           if (!(*p = *(p + 1)))
-               break;
-}
-
diff --git a/xedit/lisp/format.c b/xedit/lisp/format.c
deleted file mode 100644 (file)
index ab85565..0000000
+++ /dev/null
@@ -1,2121 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/format.c,v 1.29tsi Exp $ */
-
-#include "lisp/io.h"
-#include "lisp/write.h"
-#include "lisp/format.h"
-#include <ctype.h>
-
-#define MAXFMT                 8
-#define NOERROR                        0
-
-/* parse error codes */
-#define PARSE_2MANYPARM                1       /* too many directive parameters */
-#define PARSE_2MANYATS         2       /* more than one @ in directive */
-#define PARSE_2MANYCOLS                3       /* more than one : in directive */
-#define PARSE_NOARGSLEFT       4       /* no arguments left to format */
-#define PARSE_BADFMTARG                5       /* argument is not an integer or char */
-#define PARSE_BADDIRECTIVE     6       /* unknown format directive */
-#define PARSE_BADINTEGER       7       /* bad integer representation */
-
-/* merge error codes */
-#define MERGE_2MANY            1       /* too many parameters to directive */
-#define MERGE_NOCHAR           2       /* parameter must be a character */
-#define MERGE_NOINT            3       /* parameter must be an integer */
-
-/* generic error codes */
-#define GENERIC_RADIX          1       /* radix not in range 2-36 */
-#define GENERIC_NEGATIVE       2       /* parameter is negative */
-#define GENERIC_BADSTRING      3       /* argument is not a string */
-#define GENERIC_BADLIST                4       /* argument is not a list */
-
-#define IF_SPECIFIED(arg)      (arg).specified ? &((arg).value) : NULL
-
-#define UPANDOUT_NORMAL                1
-#define UPANDOUT_COLLON                2
-#define UPANDOUT_HASH          4       /* only useful inside a ~{ iteration
-                                        * forces loop finalization. */
-
-#define ITERATION_NORMAL       1
-#define ITERATION_LAST         2
-
-/*
- * Types
- */
-/* parameter to format */
-typedef struct {
-    unsigned int achar : 1;    /* value was specified as a character */
-    unsigned int specified : 1;        /* set if value was specified */
-    unsigned int offset : 30;  /* offset in format string, for error printing */
-    int value;
-} FmtArg;
-
-/* information about format parameters */
-typedef struct {
-    unsigned int atsign : 1;   /* @ specified */
-    unsigned int collon : 1;   /* : specified */
-    unsigned int command : 8;  /* the format command */
-    unsigned int count : 4;    /* number of arguments processed */
-    unsigned int offset : 10;  /* offset in format string, for error printing */
-    char *base, *format;
-    FmtArg arguments[MAXFMT];
-} FmtArgs;
-
-/* used for combining default format parameter values */
-typedef struct {
-    int achar;
-    int value;
-} FmtDef;
-
-/* number of default format parameter values and defaults */
-typedef struct {
-    int count;
-    FmtDef defaults[MAXFMT];
-} FmtDefs;
-
-/* used on recursive calls to LispFormat */
-typedef struct {
-    FmtArgs args;
-    LispObj *base_arguments;   /* pointer to first format argument */
-    int total_arguments;       /* number of objects in base_arguments */
-    char **format;             /* if need to update format string pointer */
-    LispObj **object;          /* CAR(arguments), for plural check */
-    LispObj **arguments;       /* current element of base_arguments */
-    int *num_arguments;                /* number of arguments after arguments */
-    int upandout;              /* information for recursive calls */
-    int iteration;             /* only set if in ~:{... or ~:@{ and in the
-                                * last argument list, hint for upandout */
-} FmtInfo;
-
-/*
- * Prototypes
- */
-static void merge_arguments(FmtArgs*, FmtDefs*, int*);
-static char *parse_arguments(char*, FmtArgs*, int*, LispObj**, int*);
-static void merge_error(FmtArgs*, int);
-static void parse_error(FmtArgs*, int);
-static void generic_error(FmtArgs*, int);
-static void format_error(FmtArgs*, char*);
-
-static int format_object(LispObj*, LispObj*);
-
-static void format_ascii(LispObj*, LispObj*, FmtArgs*);
-static void format_in_radix(LispObj*, LispObj*, int, FmtArgs*);
-static void format_radix_special(LispObj*, LispObj*, FmtArgs*);
-static void format_roman(LispObj*, LispObj*, FmtArgs*);
-static void format_english(LispObj*, LispObj*, FmtArgs*);
-static void format_character(LispObj*, LispObj*, FmtArgs*);
-static void format_fixed_float(LispObj*, LispObj*, FmtArgs*);
-static void format_exponential_float(LispObj*, LispObj*, FmtArgs*);
-static void format_general_float(LispObj*, LispObj*, FmtArgs*);
-static void format_dollar_float(LispObj*, LispObj*, FmtArgs*);
-static void format_tabulate(LispObj*, FmtArgs*);
-
-static void format_goto(FmtInfo*);
-static void format_indirection(LispObj*, LispObj*, FmtInfo*);
-
-static void list_formats(FmtInfo*, int, char**, char***, int*, int*, int*, int*);
-static void free_formats(char**, int);
-
-static void format_case_conversion(LispObj*, FmtInfo*);
-static void format_conditional(LispObj*, FmtInfo*);
-static void format_iterate(LispObj*, FmtInfo*);
-static void format_justify(LispObj*, FmtInfo*);
-
-static void LispFormat(LispObj*, FmtInfo*);
-
-/*
- * Initialization
- */
-static FmtDefs AsciiDefs = {
-    4,
-    {
-       {0, 0},                 /* mincol */
-       {0, 1},                 /* colinc */
-       {0, 0},                 /* minpad */
-       {1, ' '},               /* padchar */
-    },
-};
-
-static FmtDefs IntegerDefs = {
-    4,
-    {
-       {0, 0},                 /* mincol */
-       {1, ' '},               /* padchar */
-       {1, ','},               /* commachar */
-       {0, 3},                 /* commainterval */
-    },
-};
-
-static FmtDefs RadixDefs = {
-    5,
-    {
-       {0, 10},                /* radix */
-       {0, 0},                 /* mincol */
-       {1, ' '},               /* padchar */
-       {1, ','},               /* commachar */
-       {0, 3},                 /* commainterval */
-    },
-};
-
-static FmtDefs NoneDefs = {
-    0,
-};
-
-static FmtDefs FixedFloatDefs = {
-    5,
-    {
-       {0, 0},                 /* w */
-       {0, 16},                /* d */
-       {0, 0},                 /* k */
-       {1, '\0'},              /* overflowchar */
-       {1, ' '},               /* padchar */
-    },
-};
-
-static FmtDefs ExponentialFloatDefs = {
-    7,
-    {
-       {0, 0},                 /* w */
-       {0, 16},                /* d */
-       {0, 0},                 /* e */
-       {0, 1},                 /* k */
-       {1, '\0'},              /* overflowchar */
-       {1, ' '},               /* padchar */
-       {1, 'E'},               /* exponentchar */
-       /* XXX if/when more than one float format,
-        * should default to object type */
-    },
-};
-
-static FmtDefs DollarFloatDefs = {
-    4,
-    {
-       {0, 2},                 /* d */
-       {0, 1},                 /* n */
-       {0, 0},                 /* w */
-       {1, ' '},               /* padchar */
-    },
-};
-
-static FmtDefs OneDefs = {
-    1,
-    {
-       {0, 1},
-    },
-};
-
-static FmtDefs TabulateDefs = {
-    2,
-    {
-       {0, 0},                 /* colnum */
-       {0, 1},                 /* colinc */
-    },
-};
-
-extern LispObj *Oprint_escape;
-
-/*
- * Implementation
- */
-static void
-merge_arguments(FmtArgs *arguments, FmtDefs *defaults, int *code)
-{
-    int count;
-    FmtDef *defaul;
-    FmtArg *argument;
-
-    defaul = &(defaults->defaults[0]);
-    argument = &(arguments->arguments[0]);
-    for (count = 0; count < defaults->count; count++, argument++, defaul++) {
-       if (count >= arguments->count)
-           argument->specified = 0;
-       if (argument->specified) {
-           if (argument->achar != defaul->achar) {
-               *code = defaul->achar ? MERGE_NOCHAR : MERGE_NOINT;
-               arguments->offset = argument->offset;
-               return;
-           }
-       }
-       else {
-           argument->specified = 0;
-           argument->achar = defaul->achar;
-           argument->value = defaul->value;
-       }
-    }
-
-    /* check if extra arguments were provided */
-    if (arguments->count > defaults->count)
-       *code = MERGE_2MANY;
-}
-
-/* the pointer arguments may be null, useful when just testing/parsing
- * the directive parameters */
-static char *
-parse_arguments(char *format, FmtArgs *arguments,
-               int *num_objects, LispObj **objects, int *code)
-{
-    int test;
-    char *ptr;
-    FmtArg *argument;
-    unsigned int tmpcmd = 0;
-
-    /* initialize */
-    test = objects == NULL || code == NULL || num_objects == NULL;
-    ptr = format;
-    argument = &(arguments->arguments[0]);
-    arguments->atsign = arguments->collon = arguments->command = 0;
-
-    /* parse format parameters */
-    for (arguments->count = 0;; arguments->count++) {
-       arguments->offset = ptr - format + 1;
-       if (arguments->count >= MAXFMT) {
-           if (!test)
-               *code = PARSE_2MANYPARM;
-           return (ptr);
-       }
-       if (*ptr == '\'') {             /* character parameter value */
-           ++ptr;                      /* skip ' */
-           argument->achar = argument->specified = 1;
-           argument->value = *ptr++;
-       }
-       else if (*ptr == ',') {         /* use default parameter value */
-           argument->achar = 0;
-           argument->specified = 0;
-           /* don't increment ptr, will be incremented below */
-       }
-       else if (*ptr == '#') {         /* number of arguments is value */
-           ++ptr;                      /* skip # */
-           argument->achar = 0;
-           argument->specified = 1;
-           if (!test)
-               argument->value = *num_objects;
-       }
-       else if (*ptr == 'v' ||
-                *ptr == 'V') {         /* format object argument is value */
-           LispObj *object;
-
-           ++ptr;                      /* skip V */
-           if (!test) {
-               if (!CONSP(*objects)) {
-                   *code = PARSE_NOARGSLEFT;
-                   return (ptr);
-               }
-               object = CAR((*objects));
-               if (FIXNUMP(object)) {
-                   argument->achar = 0;
-                   argument->specified = 1;
-                   argument->value = FIXNUM_VALUE(object);
-               }
-               else if (SCHARP(object)) {
-                   argument->achar = argument->specified = 1;
-                   argument->value = SCHAR_VALUE(object);
-               }
-               else {
-                   *code = PARSE_BADFMTARG;
-                   return (ptr);
-               }
-               *objects = CDR(*objects);
-               --*num_objects;
-           }
-       }
-       else if (isdigit(*ptr) ||
-               *ptr == '-' || *ptr == '+') {   /* integer parameter value */
-           int sign;
-
-           argument->achar = 0;
-           argument->specified = 1;
-           if (!isdigit(*ptr)) {
-               sign = *ptr++ == '-';
-           }
-           else
-               sign = 0;
-           if (!test && !isdigit(*ptr)) {
-               *code = PARSE_BADINTEGER;
-               return (ptr);
-           }
-           argument->value = *ptr++ - '0';
-           while (isdigit(*ptr)) {
-               argument->value = (argument->value * 10) + (*ptr++ - '0');
-               if (argument->value > 65536) {
-                   if (!test) {
-                       *code = PARSE_BADINTEGER;
-                       return (ptr);
-                   }
-               }
-           }
-           if (sign)
-               argument->value = -argument->value;
-       }
-       else                            /* no more arguments to format */
-           break;
-
-       if (*ptr == ',')
-           ++ptr;
-
-       /* remember offset of format parameter, for better error printing */
-       argument->offset = arguments->offset;
-       argument++;
-    }
-
-    /* check for extra flags */
-    for (;;) {
-       if (*ptr == '@') {              /* check for special parameter atsign */
-           if (arguments->atsign) {
-               if (!test) {
-                   *code = PARSE_2MANYATS;
-                   return (ptr);
-               }
-           }
-           ++ptr;
-           ++arguments->offset;
-           arguments->atsign = 1;
-       }
-       else if (*ptr == ':') {         /* check for special parameter collon */
-           if (arguments->collon) {
-               if (!test) {
-                   *code = PARSE_2MANYCOLS;
-                   return (ptr);
-               }
-           }
-           ++ptr;
-           ++arguments->offset;
-           arguments->collon = 1;
-       }
-       else                            /* next value is format command */
-           break;
-    }
-
-    if (!test)
-       *code = NOERROR;
-    arguments->command = *ptr++;
-    tmpcmd = arguments->command;
-    if (islower(tmpcmd))
-       arguments->command = toupper(tmpcmd);
-    ++arguments->offset;
-
-    return (ptr);
-}
-
-static void
-parse_error(FmtArgs *args, int code)
-{
-    static char *errors[] = {
-       NULL,
-       "too many parameters to directive",
-       "too many @ parameters",
-       "too many : parameters",
-       "no arguments left to format",
-       "argument is not a fixnum integer or a character",
-       "unknown format directive",
-       "parameter is not a fixnum integer",
-    };
-
-    format_error(args, errors[code]);
-}
-
-static void
-merge_error(FmtArgs *args, int code)
-{
-    static char *errors[] = {
-       NULL,
-       "too many parameters to directive",
-       "argument must be a character",
-       "argument must be a fixnum integer",
-    };
-
-    format_error(args, errors[code]);
-}
-
-static void
-generic_error(FmtArgs *args, int code)
-{
-    static char *errors[] = {
-       NULL,
-       "radix must be in the range 2 to 36, inclusive",
-       "parameter must be positive",
-       "argument must be a string",
-       "argument must be a list",
-    };
-
-    format_error(args, errors[code]);
-}
-
-static void
-format_error(FmtArgs *args, char *str)
-{
-    char *message;
-    int errorlen, formatlen;
-
-    /* number of bytes of format to be printed */
-    formatlen = (args->format - args->base) + args->offset;
-
-    /* length of specific error message */
-    errorlen = strlen(str) + 1;                        /* plus '\n' */
-
-    /* XXX allocate string with LispMalloc,
-     * so that it will be freed in LispTopLevel */
-    message = LispMalloc(formatlen + errorlen + 1);
-
-    sprintf(message, "%s\n", str);
-    memcpy(message + errorlen, args->base, formatlen);
-    message[errorlen + formatlen] = '\0';
-
-    LispDestroy("FORMAT: %s", message);
-}
-
-static int
-format_object(LispObj *stream, LispObj *object)
-{
-    int length;
-
-    length = LispWriteObject(stream, object);
-
-    return (length);
-}
-
-static void
-format_ascii(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    GC_ENTER();
-    LispObj *string = NIL;
-    int length = 0,
-       atsign = args->atsign,
-       collon = args->collon,
-       mincol = args->arguments[0].value,
-       colinc = args->arguments[1].value,
-       minpad = args->arguments[2].value,
-       padchar = args->arguments[3].value;
-
-    /* check/correct arguments */
-    if (mincol < 0)
-       mincol = 0;
-    if (colinc < 0)
-       colinc = 1;
-    if (minpad < 0)
-       minpad = 0;
-    /* XXX pachar can be the null character? */
-
-    if (object == NIL)
-       length = collon ? 2 : 3;            /* () or NIL */
-
-    /* left padding */
-    if (atsign) {
-       /* if length not yet known */
-       if (object == NIL) {
-           string = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-           GC_PROTECT(string);
-           length = LispWriteObject(string, object);
-       }
-
-       /* output minpad characters at left */
-       if (minpad) {
-           length += minpad;
-           LispWriteChars(stream, padchar, minpad);
-       }
-
-       if (colinc) {
-           /* puts colinc spaces at a time,
-            * until at least mincol chars out */
-           while (length < mincol) {
-               LispWriteChars(stream, padchar, colinc);
-               length += colinc;
-           }
-       }
-    }
-
-    if (object == NIL) {
-       if (collon)
-           LispWriteStr(stream, "()", 2);
-       else
-           LispWriteStr(stream,  Snil->value, 3);
-    }
-    else {
-       /* if string is not NIL, atsign was specified
-        * and object printed to string */
-       if (string == NIL)
-           length = format_object(stream, object);
-       else {
-           int size;
-           char *str = LispGetSstring(SSTREAMP(string), &size);
-
-           LispWriteStr(stream, str, size);
-       }
-    }
-
-    /* right padding */
-    if (!atsign) {
-       /* output minpad characters at left */
-       if (minpad) {
-           length += minpad;
-           LispWriteChars(stream, padchar, minpad);
-       }
-       if (colinc) {
-           /* puts colinc spaces at a time,
-            * until at least mincol chars out */
-           while (length < mincol) {
-               LispWriteChars(stream, padchar, colinc);
-               length += colinc;
-           }
-       }
-    }
-
-    GC_LEAVE();
-}
-
-/* assumes radix is 0 or in range 2 - 36 */
-static void
-format_in_radix(LispObj *stream, LispObj *object, int radix, FmtArgs *args)
-{
-    if (INTEGERP(object)) {
-       int i, atsign, collon, mincol, padchar, commachar, commainterval;
-
-       i = (radix == 0);
-       atsign = args->atsign;
-       collon = args->collon;
-       if (radix == 0) {
-           radix = args->arguments[0].value;
-           if (radix < 2 || radix > 36) {
-               args->offset = args->arguments[0].offset;
-               generic_error(args, GENERIC_RADIX);
-           }
-       }
-       mincol = args->arguments[i++].value;
-       padchar = args->arguments[i++].value;
-       commachar = args->arguments[i++].value;
-       commainterval = args->arguments[i++].value;
-
-       LispFormatInteger(stream, object, radix, atsign, collon,
-                         mincol, padchar, commachar, commainterval);
-    }
-    else
-       format_object(stream, object);
-}
-
-static void
-format_radix_special(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    if (FIXNUMP(object)) {
-       if (args->atsign)
-           format_roman(stream, object, args);
-       else
-           format_english(stream, object, args);
-    }
-    else
-       format_object(stream, object);
-}
-
-static void
-format_roman(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    long value = 0;
-    int cando, new_roman = args->collon == 0;
-
-    if (FIXNUMP(object)) {
-       value = FIXNUM_VALUE(object);
-       if (new_roman)
-           cando = value >= 1 && value <= 3999;
-       else
-           cando = value >= 1 && value <= 4999;
-    }
-    else
-       cando = 0;
-
-    if (cando)
-       LispFormatRomanInteger(stream, value, new_roman);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_english(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    int cando;
-    long number = 0;
-
-    if (FIXNUMP(object)) {
-       number = FIXNUM_VALUE(object);
-       cando = number >= -999999999 && number <= 999999999;
-    }
-    else
-       cando = 0;
-
-    if (cando)
-       LispFormatEnglishInteger(stream, number, args->collon);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_character(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    if (SCHARP(object))
-       LispFormatCharacter(stream, object, args->atsign, args->collon);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_fixed_float(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    if (FLOATP(object))
-       LispFormatFixedFloat(stream, object, args->atsign,
-                            args->arguments[0].value,
-                            IF_SPECIFIED(args->arguments[1]),
-                            args->arguments[2].value,
-                            args->arguments[3].value,
-                            args->arguments[4].value);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_exponential_float(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    if (FLOATP(object))
-       LispFormatExponentialFloat(stream, object, args->atsign,
-                                  args->arguments[0].value,
-                                  IF_SPECIFIED(args->arguments[1]),
-                                  args->arguments[2].value,
-                                  args->arguments[3].value,
-                                  args->arguments[4].value,
-                                  args->arguments[5].value,
-                                  args->arguments[6].value);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_general_float(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    if (FLOATP(object))
-       LispFormatGeneralFloat(stream, object, args->atsign,
-                               args->arguments[0].value,
-                               IF_SPECIFIED(args->arguments[1]),
-                               args->arguments[2].value,
-                               args->arguments[3].value,
-                               args->arguments[4].value,
-                               args->arguments[5].value,
-                               args->arguments[6].value);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_dollar_float(LispObj *stream, LispObj *object, FmtArgs *args)
-{
-    if (FLOATP(object))
-       LispFormatDollarFloat(stream, object,
-                             args->atsign, args->collon,
-                             args->arguments[0].value,
-                             args->arguments[1].value,
-                             args->arguments[2].value,
-                             args->arguments[3].value);
-    else
-       format_object(stream, object);
-}
-
-static void
-format_tabulate(LispObj *stream, FmtArgs *args)
-{
-    int atsign = args->atsign,
-       colnum = args->arguments[0].value,
-       colinc = args->arguments[1].value,
-       column;
-
-    column = LispGetColumn(stream);
-
-    if (atsign) {
-       /* relative tabulation */
-       if (colnum > 0) {
-           LispWriteChars(stream, ' ', colnum);
-           column += colnum;
-       }
-       /* tabulate until at a multiple of colinc */
-       if (colinc > 0)
-           LispWriteChars(stream, ' ', colinc - (column % colinc));
-    }
-    else {
-       /* if colinc not specified, just move to given column */
-       if (colinc <= 0)
-           LispWriteChars(stream, ' ', column - colnum);
-       else {
-           /* always output at least colinc spaces */
-           do {
-               LispWriteChars(stream, ' ', colinc);
-               colnum -= colinc;
-           } while (colnum > column);
-       }
-    }
-}
-
-static void
-format_goto(FmtInfo *info)
-{
-    int count, num_arguments;
-    LispObj *object, *arguments;
-
-    /* number of arguments to ignore or goto offset */
-    count = info->args.arguments[0].value;
-    if (count < 0)
-       generic_error(&(info->args), GENERIC_NEGATIVE);
-
-    if (info->args.atsign) {
-       /* absolute goto */
-
-       /* if not specified, defaults to zero */
-       if (!(info->args.arguments[0].specified))
-           count = 0;
-
-       /* if offset too large */
-       if (count > info->total_arguments)
-           parse_error(&(info->args), PARSE_NOARGSLEFT);
-       else if (count != info->total_arguments - *(info->num_arguments)) {
-           /* calculate new parameters */
-           object = NIL;
-           arguments = info->base_arguments;
-           num_arguments = info->total_arguments - count;
-
-           for (; count > 0; count--, arguments = CDR(arguments))
-               object = CAR(arguments);
-
-           /* update format information */
-           *(info->object) = object;
-           *(info->arguments) = arguments;
-           *(info->num_arguments) = num_arguments;
-       }
-    }
-    else if (count) {
-       /* relative goto, ignore or go back count arguments */
-
-       /* prepare to update parameters */
-       arguments = *(info->arguments);
-       num_arguments = *(info->num_arguments);
-
-       /* go back count arguments? */
-       if (info->args.collon)
-           count = -count;
-
-       num_arguments -= count;
-
-       if (count > 0) {
-           if (count > *(info->num_arguments))
-               parse_error(&(info->args), PARSE_NOARGSLEFT);
-
-           object = *(info->object);
-           for (; count > 0; count--, arguments = CDR(arguments))
-               object = CAR(arguments);
-       }
-       else {          /* count < 0 */
-           if (info->total_arguments + count - *(info->num_arguments) < 0)
-               parse_error(&(info->args), PARSE_NOARGSLEFT);
-
-           object = NIL;
-           arguments = info->base_arguments;
-           for (count = 0; count < info->total_arguments - num_arguments;
-               count++, arguments = CDR(arguments))
-               object = CAR(arguments);
-       }
-
-       /* update format parameters */
-       *(info->object) = object;
-       *(info->arguments) = arguments;
-       *(info->num_arguments) = num_arguments;
-    }
-}
-
-static void
-format_indirection(LispObj *stream, LispObj *format, FmtInfo *info)
-{
-    char *string;
-    LispObj *object;
-    FmtInfo indirect_info;
-
-    if (!STRINGP(format))
-       generic_error(&(info->args), GENERIC_BADSTRING);
-    string = THESTR(format);
-
-    /* most information is the same */
-    memcpy(&indirect_info, info, sizeof(FmtInfo));
-
-    /* set new format string */
-    indirect_info.args.base = indirect_info.args.format = string;
-    indirect_info.format = &string;
-
-    if (info->args.atsign) {
-       /* use current arguments */
-
-       /* do the indirect format */
-       LispFormat(stream, &indirect_info);
-    }
-    else {
-       /* next argument is the recursive call arguments */
-
-       int num_arguments;
-
-       /* it is valid to not have a list following string, as string may
-        * not have format directives */
-       if (CONSP(*(indirect_info.arguments)))
-           object = CAR(*(indirect_info.arguments));
-       else
-           object = NIL;
-
-       if (!LISTP(object) || !CONSP(*(info->arguments)))
-           generic_error(&(info->args), GENERIC_BADLIST);
-
-       /* update information now */
-       *(info->object) = object;
-       *(info->arguments) = CDR(*(info->arguments));
-       *(info->num_arguments) -= 1;
-
-       /* set arguments for recursive call */
-       indirect_info.base_arguments = object;
-       indirect_info.arguments = &object;
-       for (num_arguments = 0; CONSP(object); object = CDR(object))
-           ++num_arguments;
-
-       /* note that indirect_info.arguments is a pointer to "object",
-        * keep it pointing to the correct object */
-       object = indirect_info.base_arguments;
-       indirect_info.total_arguments = num_arguments;
-       indirect_info.num_arguments = &num_arguments;
-
-       /* do the indirect format */
-       LispFormat(stream, &indirect_info);
-    }
-}
-
-/* update pointers to a list of format strings:
- *     for '(' and '{' only one list is required
- *     for '[' and '<' more than one may be returned
- *     has_default is only meaningful for '[' and '<'
- *     comma_width and line_width are only meaningful to '<', and
- *         only valid if has_default set
- * if the string is finished prematurely, LispDestroy is called
- * format_ptr is updated to the correct pointer in the "main" format string
- */
-static void
-list_formats(FmtInfo *info, int command, char **format_ptr,
-            char ***format_list, int *format_count, int *has_default,
-            int *comma_width, int *line_width)
-{
-    /* instead of processing the directives recursively, just separate the
-     * input formats in separate strings, then see if one of then need to
-     * be used */
-    FmtArgs args;
-    int counters[] = {  0,   0,   0,   0};
-                   /* '[', '(', '{', '<' */
-    char *format, *next_format, *start, **formats;
-    int num_formats, format_index, separator, add_format;
-
-    /* initialize */
-    formats = NULL;
-    num_formats = format_index = 0;
-    if (has_default != NULL)
-       *has_default = 0;
-    if (comma_width != NULL)
-       *comma_width = 0;
-    if (line_width != NULL)
-       *line_width = 0;
-    format = start = next_format = *format_ptr;
-    switch (command) {
-       case '[': counters[0] = 1; format_index = 0; break;
-       case '(': counters[1] = 1; format_index = 1; break;
-       case '{': counters[2] = 1; format_index = 2; break;
-       case '<': counters[3] = 1; format_index = 3; break;
-    }
-
-#define        LIST_FORMATS_ADD        1
-#define        LIST_FORMATS_DONE       2
-
-    /* fill list of format options to conditional */
-    while (*format) {
-       if (*format == '~') {
-           separator = add_format = 0;
-           args.format = format + 1;
-           next_format = parse_arguments(format + 1, &args, NULL, NULL, NULL);
-           switch (args.command) {
-               case '[': ++counters[0];    break;
-               case ']': --counters[0];    break;
-               case '(': ++counters[1];    break;
-               case ')': --counters[1];    break;
-               case '{': ++counters[2];    break;
-               case '}': --counters[2];    break;
-               case '<': ++counters[3];    break;
-               case '>': --counters[3];    break;
-               case ';': separator = 1;    break;
-           }
-
-           /* check if a new format string must be added */
-           if (separator && counters[format_index] == 1 &&
-               (command == '[' || command == '<'))
-               add_format = LIST_FORMATS_ADD;
-           else if (counters[format_index] == 0)
-               add_format = LIST_FORMATS_DONE;
-
-           if (add_format) {
-               int length = format - start;
-
-               formats = LispRealloc(formats,
-                                     (num_formats + 1) * sizeof(char*));
-
-               formats[num_formats] = LispMalloc(length + 1);
-               strncpy(formats[num_formats], start, length);
-               formats[num_formats][length] = '\0';
-               ++num_formats;
-               /* loop finished? */
-               if (add_format == LIST_FORMATS_DONE)
-                   break;
-               else if (command == '[' && has_default != NULL)
-                   /* will be set only for the last parameter, what is
-                    * expected, just don't warn about it in the incorrect
-                    * place */
-                   *has_default = args.collon != 0;
-               else if (command == '<' && num_formats == 1) {
-                   /* if the first parameter to '<', there may be overrides
-                    * to comma-width and line-width */
-                   if (args.collon && has_default != NULL) {
-                       *has_default = 1;
-                       if (comma_width != NULL &&
-                           args.arguments[0].specified &&
-                           !args.arguments[0].achar)
-                           *comma_width = args.arguments[0].value;
-                       if (line_width != NULL &&
-                           args.arguments[1].specified &&
-                           !args.arguments[1].achar)
-                           *line_width = args.arguments[1].value;
-                   }
-               }
-               start = next_format;
-           }
-           format = next_format;
-       }
-       else
-           ++format;
-    }
-
-    /* check if format string did not finish prematurely */
-    if (counters[format_index] != 0) {
-       char error_message[64];
-
-       sprintf(error_message, "expecting ~%c", command);
-       format_error(&(info->args), error_message);
-    }
-
-    /* update pointers */
-    *format_list = formats;
-    *format_count = num_formats;
-    *format_ptr = next_format;
-}
-
-static void
-free_formats(char **formats, int num_formats)
-{
-    if (num_formats) {
-       while (--num_formats >= 0)
-           LispFree(formats[num_formats]);
-       LispFree(formats);
-    }
-}
-
-static void
-format_case_conversion(LispObj *stream, FmtInfo *info)
-{
-    GC_ENTER();
-    LispObj *string;
-    FmtInfo case_info;
-    char *str, *ptr;
-    char *format, *next_format, **formats;
-    int atsign, collon, num_formats, length;
-
-    atsign = info->args.atsign;
-    collon = info->args.collon;
-
-    /* output to a string, before case conversion */
-    string = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-    GC_PROTECT(string);
-
-    /* most information is the same */
-    memcpy(&case_info, info, sizeof(FmtInfo));
-
-    /* list formats */
-    next_format = *(info->format);
-    list_formats(info, '(', &next_format, &formats, &num_formats,
-                NULL, NULL, NULL);
-
-    /* set new format string */
-    format = formats[0];
-    case_info.args.base = case_info.args.format = format;
-    case_info.format = &format;
-
-    /* format text to string */
-    LispFormat(string, &case_info);
-
-    str = ptr = LispGetSstring(SSTREAMP(string), &length);
-
-    /* do case conversion */
-    if (!atsign && !collon) {
-       /* convert all upercase to lowercase */
-       for (; *ptr; ptr++) {
-           if (isupper(*ptr))
-               *ptr = tolower(*ptr);
-       }
-    }
-    else if (atsign && collon) {
-       /* convert all lowercase to upercase */
-       for (; *ptr; ptr++) {
-           if (islower(*ptr))
-               *ptr = toupper(*ptr);
-       }
-    }
-    else {
-       int upper = 1;
-
-       /* skip non-alphanumeric characters */
-       for (; *ptr; ptr++)
-           if (isalnum(*ptr))
-               break;
-
-       /* capitalize words */
-       for (; *ptr; ptr++) {
-           if (isalnum(*ptr)) {
-               if (upper) {
-                   if (islower(*ptr))
-                       *ptr = toupper(*ptr);
-                   upper = 0;
-               }
-               else if (isupper(*ptr))
-                   *ptr = tolower(*ptr);
-           }
-           else
-               upper = collon;
-               /* if collon, capitalize all words, else just first word */
-       }
-    }
-
-    /* output case converted string */
-    LispWriteStr(stream, str, length);
-
-    /* temporary string stream is not necessary anymore */
-    GC_LEAVE();
-
-    /* free temporary memory */
-    free_formats(formats, num_formats);
-
-    /* this information always updated */
-    *(info->format) = next_format;
-}
-
-static void
-format_conditional(LispObj *stream, FmtInfo *info)
-{
-    LispObj *object, *arguments;
-    char *format, *next_format, **formats;
-    int choice, num_formats, has_default, num_arguments;
-
-    /* save information that may change */
-    object = *(info->object);
-    arguments = *(info->arguments);
-    num_arguments = *(info->num_arguments);
-
-    /* initialize */
-    choice = -1;
-    next_format = *(info->format);
-
-    /* list formats */
-    list_formats(info, '[',
-                &next_format, &formats, &num_formats, &has_default, NULL, NULL);
-
-    /* ~:[false;true] */
-    if (info->args.collon) {
-       /* one argument always consumed */
-       if (!CONSP(arguments))
-           parse_error(&(info->args), PARSE_NOARGSLEFT);
-       object = CAR(arguments);
-       arguments = CDR(arguments);
-       --num_arguments;
-       choice = object == NIL ? 0 : 1;
-    }
-    /* ~@[true] */
-    else if (info->args.atsign) {
-       /* argument consumed only if nil, but one must be available */
-       if (!CONSP(arguments))
-           parse_error(&(info->args), PARSE_NOARGSLEFT);
-       if (CAR(arguments) != NIL)
-           choice = 0;
-       else {
-           object = CAR(arguments);
-           arguments = CDR(arguments);
-           --num_arguments;
-       }
-    }
-    /* ~n[...~] */
-    else if (info->args.arguments[0].specified)
-       /* no arguments consumed */
-       choice = info->args.arguments[0].value;
-    /* ~[...~] */
-    else {
-       /* one argument consumed, it is the index in the available formats */
-       if (!CONSP(arguments))
-           parse_error(&(info->args), PARSE_NOARGSLEFT);
-       object = CAR(arguments);
-       arguments = CDR(arguments);
-       --num_arguments;
-       /* no error if it isn't a number? */
-       if (FIXNUMP(object))
-           choice = FIXNUM_VALUE(object);
-    }
-
-    /* update anything that may have changed */
-    *(info->object) = object;
-    *(info->arguments) = arguments;
-    *(info->num_arguments) = num_arguments;
-
-    /* if choice is out of range check if there is a default choice */
-    if (has_default && (choice < 0 || choice >= num_formats))
-       choice = num_formats - 1;
-
-    /* if one of the formats must be parsed */
-    if (choice >= 0 && choice < num_formats) {
-       FmtInfo conditional_info;
-
-       /* most information is the same */
-       memcpy(&conditional_info, info, sizeof(FmtInfo));
-
-       /* set new format string */
-       format = formats[choice];
-       conditional_info.args.base = conditional_info.args.format = format;
-       conditional_info.format = &format;
-
-       /* do the conditional format */
-       LispFormat(stream, &conditional_info);
-    }
-
-    /* free temporary memory */
-    free_formats(formats, num_formats);
-
-    /* this information always updated */
-    *(info->format) = next_format;
-}
-
-static void
-format_iterate(LispObj *stream, FmtInfo *info)
-{
-    FmtInfo iterate_info;
-    LispObj *object, *arguments, *iarguments, *iobject;
-    char *format, *next_format, *loop_format, **formats;
-    int num_arguments, iterate, iterate_max, has_max, has_min, inum_arguments,
-       num_formats;
-
-    /* save information that may change */
-    object = *(info->object);
-    arguments = *(info->arguments);
-    num_arguments = *(info->num_arguments);
-
-    /* initialize */
-    iterate = has_min = 0;
-    next_format = *(info->format);
-
-    /* if has_max set, iterate at most iterate_max times */
-    has_max = info->args.arguments[0].specified;
-    iterate_max = info->args.arguments[0].value;
-
-    /* list formats */
-    list_formats(info, '{', &next_format, &formats, &num_formats,
-                NULL, NULL, NULL);
-    loop_format = formats[0];
-
-    /* most information is the same */
-    memcpy(&iterate_info, info, sizeof(FmtInfo));
-
-    /* ~{...~} */
-    if (!info->args.atsign && !info->args.collon) {
-       /* next argument is the argument list for the iteration */
-
-       /* fetch argument list, must exist */
-       if (!CONSP(arguments))
-           parse_error(&(info->args), PARSE_NOARGSLEFT);
-       iarguments = object = CAR(arguments);
-       object = CAR(arguments);
-       arguments = CDR(arguments);
-       --num_arguments;
-
-       inum_arguments = 0;
-       if (CONSP(object)) {
-           /* count arguments to format */
-           for (iobject = object; CONSP(iobject); iobject = CDR(iobject))
-               ++inum_arguments;
-       }
-       else if (object != NIL)
-           generic_error(&(info->args), GENERIC_BADLIST);
-
-       iobject = NIL;
-
-       /* set new arguments to recursive calls */
-       iarguments = object;
-       iterate_info.base_arguments = iarguments;
-       iterate_info.total_arguments = inum_arguments;
-       iterate_info.object = &iobject;
-       iterate_info.arguments = &iarguments;
-       iterate_info.num_arguments = &inum_arguments;
-
-       /* iterate */
-       for (;; iterate++) {
-           /* if maximum iterations done or all arguments consumed */
-           if (has_max && iterate > iterate_max)
-               break;
-           else if (inum_arguments == 0 && (!has_min || iterate > 0))
-               break;
-
-           format = loop_format;
-
-           /* set new format string */
-           iterate_info.args.base = iterate_info.args.format = format;
-           iterate_info.format = &format;
-
-           /* information for possible ~^, in this case ~:^ is a noop */
-           iterate_info.iteration = ITERATION_NORMAL;
-
-           /* do the format */
-           LispFormat(stream, &iterate_info);
-
-           /* check for forced loop break */
-           if (iterate_info.upandout & UPANDOUT_HASH)
-               break;
-       }
-    }
-    /* ~:@{...~} */
-    else if (info->args.atsign && info->args.collon) {
-       /* every following argument is the argument list for the iteration */
-
-       /* iterate */
-       for (;; iterate++) {
-           /* if maximum iterations done or all arguments consumed */
-           if (has_max && iterate > iterate_max)
-               break;
-           else if (num_arguments == 0 && (!has_min || iterate > 0))
-               break;
-
-           /* fetch argument list, must exist */
-           if (!CONSP(arguments))
-               parse_error(&(info->args), PARSE_NOARGSLEFT);
-           iarguments = object = CAR(arguments);
-           object = CAR(arguments);
-           arguments = CDR(arguments);
-           --num_arguments;
-
-           inum_arguments = 0;
-           if (CONSP(object)) {
-               /* count arguments to format */
-               for (iobject = object; CONSP(iobject); iobject = CDR(iobject))
-                   ++inum_arguments;
-           }
-           else if (object != NIL)
-               generic_error(&(info->args), GENERIC_BADLIST);
-
-           iobject = NIL;
-
-           /* set new arguments to recursive calls */
-           iarguments = object;
-           iterate_info.base_arguments = iarguments;
-           iterate_info.total_arguments = inum_arguments;
-           iterate_info.object = &iobject;
-           iterate_info.arguments = &iarguments;
-           iterate_info.num_arguments = &inum_arguments;
-
-           format = loop_format;
-
-           /* set new format string */
-           iterate_info.args.base = iterate_info.args.format = format;
-           iterate_info.format = &format;
-
-           /* information for possible ~^ */
-           iterate_info.iteration =
-               num_arguments > 0 ? ITERATION_NORMAL : ITERATION_LAST;
-
-           /* do the format */
-           LispFormat(stream, &iterate_info);
-
-           /* check for forced loop break */
-           if (iterate_info.upandout & UPANDOUT_HASH)
-               break;
-       }
-    }
-    /* ~:{...~} */
-    else if (info->args.collon) {
-       /* next argument is a list of lists */
-
-       LispObj *sarguments, *sobject;
-       int snum_arguments;
-
-       /* fetch argument list, must exist */
-       if (!CONSP(arguments))
-           parse_error(&(info->args), PARSE_NOARGSLEFT);
-       sarguments = object = CAR(arguments);
-       object = CAR(arguments);
-       arguments = CDR(arguments);
-       --num_arguments;
-
-       snum_arguments = 0;
-       if (CONSP(object)) {
-           /* count arguments to format */
-           for (sobject = object; CONSP(sobject); sobject = CDR(sobject))
-               ++snum_arguments;
-       }
-       else
-           generic_error(&(info->args), GENERIC_BADLIST);
-
-       /* iterate */
-       for (;; iterate++) {
-           /* if maximum iterations done or all arguments consumed */
-           if (has_max && iterate > iterate_max)
-               break;
-           else if (snum_arguments == 0 && (!has_min || iterate > 0))
-               break;
-
-           /* fetch argument list, must exist */
-           if (!CONSP(sarguments))
-               parse_error(&(info->args), PARSE_NOARGSLEFT);
-           iarguments = sobject = CAR(sarguments);
-           sobject = CAR(sarguments);
-           sarguments = CDR(sarguments);
-           --snum_arguments;
-
-           inum_arguments = 0;
-           if (CONSP(object)) {
-               /* count arguments to format */
-               for (iobject = sobject; CONSP(iobject); iobject = CDR(iobject))
-                   ++inum_arguments;
-           }
-           else if (sobject != NIL)
-               generic_error(&(info->args), GENERIC_BADLIST);
-
-           iobject = NIL;
-
-           /* set new arguments to recursive calls */
-           iarguments = sobject;
-           iterate_info.base_arguments = iarguments;
-           iterate_info.total_arguments = inum_arguments;
-           iterate_info.object = &iobject;
-           iterate_info.arguments = &iarguments;
-           iterate_info.num_arguments = &inum_arguments;
-
-           format = loop_format;
-
-           /* set new format string */
-           iterate_info.args.base = iterate_info.args.format = format;
-           iterate_info.format = &format;
-
-           /* information for possible ~^ */
-           iterate_info.iteration =
-               snum_arguments > 0 ? ITERATION_NORMAL : ITERATION_LAST;
-
-           /* do the format */
-           LispFormat(stream, &iterate_info);
-
-           /* check for forced loop break */
-           if (iterate_info.upandout & UPANDOUT_HASH)
-               break;
-       }
-    }
-    /* ~@{...~} */
-    else if (info->args.atsign) {
-       /* current argument list is used */
-
-       /* set new arguments to recursive calls */
-       iterate_info.base_arguments = info->base_arguments;
-       iterate_info.total_arguments = info->total_arguments;
-       iterate_info.object = &object;
-       iterate_info.arguments = &arguments;
-       iterate_info.num_arguments = &num_arguments;
-
-       for (;; iterate++) {
-           /* if maximum iterations done or all arguments consumed */
-           if (has_max && iterate > iterate_max)
-               break;
-           else if (num_arguments == 0 && (!has_min || iterate > 0))
-               break;
-
-           format = loop_format;
-
-           /* set new format string */
-           iterate_info.args.base = iterate_info.args.format = format;
-           iterate_info.format = &format;
-
-           /* information for possible ~^, in this case ~:^ is a noop */
-           iterate_info.iteration = ITERATION_NORMAL;
-
-           /* do the format */
-           LispFormat(stream, &iterate_info);
-
-           /* check for forced loop break */
-           if (iterate_info.upandout & UPANDOUT_HASH)
-               break;
-       }
-    }
-
-    /* free temporary memory */
-    free_formats(formats, num_formats);
-
-    /* update anything that may have changed */
-    *(info->object) = object;
-    *(info->arguments) = arguments;
-    *(info->num_arguments) = num_arguments;
-
-    /* this information always updated */
-    *(info->format) = next_format;
-}
-
-static void
-format_justify(LispObj *stream, FmtInfo *info)
-{
-    GC_ENTER();
-    FmtInfo justify_info;
-    char **formats, *format, *next_format, *str;
-    LispObj *string, *strings = NIL, *cons;
-    int atsign = info->args.atsign,
-       collon = info->args.collon,
-       mincol = info->args.arguments[0].value,
-       colinc = info->args.arguments[1].value,
-       minpad = info->args.arguments[2].value,
-       padchar = info->args.arguments[3].value;
-    int i, k, total_length, length, padding, num_formats, has_default,
-       comma_width, line_width, size, extra;
-
-    next_format = *(info->format);
-
-    /* list formats */
-    list_formats(info, '<', &next_format, &formats, &num_formats,
-                &has_default, &comma_width, &line_width);
-
-    /* initialize list of strings streams */
-    if (num_formats) {
-       string = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-       strings = cons = CONS(string, NIL);
-       GC_PROTECT(strings);
-       for (i = 1; i < num_formats; i++) {
-           string = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-           RPLACD(cons, CONS(string, NIL));
-           cons = CDR(cons);
-       }
-    }
-
-    /* most information is the same */
-    memcpy(&justify_info, info, sizeof(FmtInfo));
-
-    /* loop formating strings */
-    for (i = 0, cons = strings; i < num_formats; i++, cons = CDR(cons)) {
-       /* set new format string */
-       format = formats[i];
-       justify_info.args.base = justify_info.args.format = format;
-       justify_info.format = &format;
-
-       /* format string, maybe consuming arguments */
-       LispFormat(CAR(cons), &justify_info);
-
-       /* if format was aborted, it is discarded */
-       if (justify_info.upandout)
-           RPLACA(cons, NIL);
-       /* check if the entire "main" iteration must be aborted */
-       if (justify_info.upandout & UPANDOUT_COLLON) {
-           for (cons = CDR(cons); i < num_formats; i++, cons = CDR(cons))
-               RPLACA(cons, NIL);
-           break;
-       }
-    }
-
-    /* free temporary format strings */
-    free_formats(formats, num_formats);
-
-    /* remove aborted formats */
-       /* first remove leading discarded formats */
-    if (CAR(strings) == NIL) {
-       while (CAR(strings) == NIL) {
-           strings = CDR(strings);
-           --num_formats;
-       }
-       /* keep strings gc protected, discarding first entries */
-       lisp__data.protect.objects[gc__protect] = strings;
-    }
-       /* now remove intermediary discarded formats */
-    cons = strings;
-    while (CONSP(cons)) {
-       if (CONSP(CDR(cons)) && CAR(CDR(cons)) == NIL) {
-           RPLACD(cons, CDR(CDR(cons)));
-           --num_formats;
-       }
-       else
-           cons = CDR(cons);
-    }
-
-    /* calculate total length required for output */
-    if (has_default)
-       cons = CDR(strings);    /* if has_defaults, strings is surely a list */
-    else
-       cons = strings;
-    for (total_length = 0; CONSP(cons); cons = CDR(cons))
-       total_length += SSTREAMP(CAR(cons))->length;
-
-    /* initialize pointer to string streams */
-    if (has_default)
-       cons = CDR(strings);
-    else
-       cons = strings;
-
-    /* check if padding will need to be printed */
-    extra = 0;
-    padding = mincol - total_length;
-    if (padding < 0)
-       k = padding = 0;
-    else {
-       int num_fields = num_formats - (has_default != 0);
-
-       if (num_fields > 1) {
-           /* check if padding is distributed in num_fields or
-            * num_fields - 1 steps */
-           if (!collon)
-               --num_fields;
-       }
-
-       if (num_fields)
-           k = padding / num_fields;
-       else
-           k = padding;
-
-       if (k <= 0)
-           k = colinc;
-       else if (colinc)
-           k = k + (k % colinc);
-       extra = mincol - (num_fields * k + total_length);
-       if (extra < 0)
-           extra = 0;
-    }
-    if (padding && k < minpad) {
-       k = minpad;
-       if (colinc)
-           k = k + (k % colinc);
-    }
-
-    /* first check for the special case of only one string being justified */
-    if (num_formats - has_default == 1) {
-       if (has_default && line_width > 0 && comma_width >= 0 &&
-           total_length + comma_width > line_width) {
-           str = LispGetSstring(SSTREAMP(CAR(strings)), &size);
-           LispWriteStr(stream, str, size);
-       }
-       string = has_default ? CAR(CDR(strings)) : CAR(strings);
-       /* check if need left padding */
-       if (k && !atsign) {
-           LispWriteChars(stream, padchar, k);
-           k = 0;
-       }
-       /* check for centralizing text */
-       else if (k && atsign && collon) {
-           LispWriteChars(stream, padchar, k / 2 + ((k / 2) & 1));
-           k -= k / 2;
-       }
-       str = LispGetSstring(SSTREAMP(string), &size);
-       LispWriteStr(stream, str, size);
-       /* if any padding remaining */
-       if (k)
-           LispWriteChars(stream, padchar, k);
-    }
-    else {
-       LispObj *result;
-       int last, spaces_before, padout;
-
-       /* if has default, need to check output length */
-       if (has_default && line_width > 0 && comma_width >= 0) {
-           result = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-           GC_PROTECT(result);
-       }
-       /* else write directly to stream */
-       else
-           result = stream;
-
-       /* loop printing justified text */
-           /* padout controls padding for cases where padding is
-            * is separated in n-1 chunks, where n is the number of
-            * formatted strings.
-            */
-       for (i = padout = 0; CONSP(cons); i++, cons = CDR(cons), --extra) {
-           string = CAR(cons);
-           last = !CONSP(CDR(cons));
-
-           spaces_before = (i != 0 || collon) && (!last || !atsign);
-
-           if (!spaces_before) {
-               /* check for special case */
-               if (last && atsign && collon && padding > 0) {
-                   int spaces;
-
-                   spaces = minpad > colinc ? minpad : colinc;
-                   LispWriteChars(result, padchar, spaces + (extra > 0));
-                   k -= spaces;
-               }
-               str = LispGetSstring(SSTREAMP(string), &size);
-               LispWriteStr(result, str, size);
-               padout = 0;
-           }
-           if (!padout)
-               LispWriteChars(result, padchar, k + (extra > 0));
-           padout = k;
-           /* if not first string, or if left padding specified */
-           if (spaces_before) {
-               str = LispGetSstring(SSTREAMP(string), &size);
-               LispWriteStr(result, str, size);
-               padout = 0;
-           }
-           padding -= k;
-       }
-
-       if (has_default && line_width > 0 && comma_width >= 0) {
-           length = SSTREAMP(result)->length + LispGetColumn(stream);
-
-           /* if current line is too large */
-           if (has_default && length + comma_width > line_width) {
-               str = LispGetSstring(SSTREAMP(CAR(strings)), &size);
-               LispWriteStr(stream, str, size);
-           }
-
-           /* write result to stream */
-           str = LispGetSstring(SSTREAMP(result), &size);
-           LispWriteStr(stream, str, size);
-       }
-    }
-
-    /* unprotect string streams from GC */
-    GC_LEAVE();
-
-    /* this information always updated */
-    *(info->format) = next_format;
-}
-
-static void
-LispFormat(LispObj *stream, FmtInfo *info)
-{
-    FmtArgs *args;
-    FmtDefs *defs = NULL;
-    LispObj *object, *arguments;
-    char stk[256], *format, *next_format;
-    int length, num_arguments, code, need_update, need_argument, hash, head;
-
-    /* arguments that will be updated on function exit */
-    format = *(info->format);
-    object = *(info->object);
-    arguments = *(info->arguments);
-    num_arguments = *(info->num_arguments);
-
-    /* initialize */
-    length = 0;
-    args = &(info->args);
-    info->upandout = 0;
-
-    while (*format) {
-       if (*format == '~') {
-           /* flush non formatted characters */
-           if (length) {
-               LispWriteStr(stream, stk, length);
-               length = 0;
-           }
-
-           need_argument = need_update = hash = 0;
-
-           /* parse parameters */
-           args->format = format + 1;
-           next_format = parse_arguments(format + 1, args, &num_arguments,
-                                         &arguments, &code);
-           if (code != NOERROR)
-               parse_error(args, code);
-
-           /* check parameters */
-           switch (args->command) {
-               case 'A': case 'S':
-                   defs = &AsciiDefs;
-                   break;
-               case 'B': case 'O': case 'D': case 'X':
-                   defs = &IntegerDefs;
-                   break;
-               case 'R':
-                   defs = &RadixDefs;
-                   break;
-               case 'P': case 'C':
-                   defs = &NoneDefs;
-                   break;
-               case 'F':
-                   defs = &FixedFloatDefs;
-                   break;
-               case 'E': case 'G':
-                   defs = &ExponentialFloatDefs;
-                   break;
-               case '$':
-                   defs = &DollarFloatDefs;
-                   break;
-               case '%': case '&': case '|': case '~': case '\n':
-                   defs = &OneDefs;
-                   break;
-               case 'T':
-                   defs = &TabulateDefs;
-                   break;
-               case '*':
-                   defs = &OneDefs;
-                   break;
-               case '?': case '(':
-                   defs = &NoneDefs;
-                   break;
-               case ')':
-                   /* this is never seen, processed in format_case_conversion */
-                   format_error(args, "no match for directive ~)");
-               case '[':
-                   defs = &OneDefs;
-                   break;
-               case ']':
-                   /* this is never seen, processed in format_conditional */
-                   format_error(args, "no match for directive ~]");
-               case '{':
-                   defs = &OneDefs;
-                   break;
-               case '}':
-                   /* this is never seen, processed in format_iterate */
-                   format_error(args, "no match for directive ~}");
-               case '<':
-                   defs = &AsciiDefs;
-                   break;
-               case '>':
-                   /* this is never seen, processed in format_justify */
-                   format_error(args, "no match for directive ~>");
-               case ';':
-                   /* this is never seen here */
-                   format_error(args, "misplaced directive ~;");
-               case '#':
-                   /* special handling for ~#^ */
-                   if (*next_format == '^') {
-                       ++next_format;
-                       hash = 1;
-                       defs = &NoneDefs;
-                       args->command = '^';
-                       break;
-                   }
-                   parse_error(args, PARSE_BADDIRECTIVE);
-               case '^':
-                   defs = &NoneDefs;
-                   break;
-               default:
-                   parse_error(args, PARSE_BADDIRECTIVE);
-                   break;
-           }
-           merge_arguments(args, defs, &code);
-           if (code != NOERROR)
-               merge_error(args, code);
-
-           /* check if an argument is required by directive */
-           switch (args->command) {
-               case 'A': case 'S':
-               case 'B': case 'O': case 'D': case 'X': case 'R':
-                   need_argument = 1;
-                   break;
-               case 'P':
-                   /* if collon specified, plural is the last print argument */
-                   need_argument = !args->collon;
-                   break;
-               case 'C':
-                   need_argument = 1;
-                   break;
-               case 'F': case 'E': case 'G': case '$':
-                   need_argument = 1;
-                   break;
-               case '%': case '&': case '|': case '~': case '\n':
-                   break;
-               case 'T':
-                   break;
-               case '*':                       /* check arguments below */
-                   need_update = 1;
-                   break;
-               case '?':
-                   need_argument = need_update = 1;
-                   break;
-               case '(': case '[': case '{': case '<':
-                   need_update = 1;
-                   break;
-               case '^':
-                   break;
-           }
-           if (need_argument) {
-               if (!CONSP(arguments))
-                   parse_error(args, PARSE_NOARGSLEFT);
-               object = CAR(arguments);
-               arguments = CDR(arguments);
-               --num_arguments;
-           }
-
-           /* will do recursive calls that change info */
-           if (need_update) {
-               *(info->format) = next_format;
-               *(info->object) = object;
-               *(info->arguments) = arguments;
-               *(info->num_arguments) = num_arguments;
-           }
-
-           /* everything seens fine, print the format directive */
-           switch (args->command) {
-               case 'A':
-                   head = lisp__data.env.length;
-                   LispAddVar(Oprint_escape, NIL);
-                   ++lisp__data.env.head;
-                   format_ascii(stream, object, args);
-                   lisp__data.env.head = lisp__data.env.length = head;
-                   break;
-               case 'S':
-                   head = lisp__data.env.length;
-                   LispAddVar(Oprint_escape, T);
-                   ++lisp__data.env.head;
-                   format_ascii(stream, object, args);
-                   lisp__data.env.head = lisp__data.env.length = head;
-                   break;
-               case 'B':
-                   format_in_radix(stream, object, 2, args);
-                   break;
-               case 'O':
-                   format_in_radix(stream, object, 8, args);
-                   break;
-               case 'D':
-                   format_in_radix(stream, object, 10, args);
-                   break;
-               case 'X':
-                   format_in_radix(stream, object, 16, args);
-                   break;
-               case 'R':
-                   /* if a single argument specified */
-                   if (args->count)
-                       format_in_radix(stream, object, 0, args);
-                   else
-                       format_radix_special(stream, object, args);
-                   break;
-               case 'P':
-                   if (args->atsign) {
-                       if (FIXNUMP(object) && FIXNUM_VALUE(object) == 1)
-                           LispWriteChar(stream, 'y');
-                       else
-                           LispWriteStr(stream, "ies", 3);
-                   }
-                   else if (!FIXNUMP(object) || FIXNUM_VALUE(object) != 1)
-                       LispWriteChar(stream, 's');
-                   break;
-               case 'C':
-                   format_character(stream, object, args);
-                   break;
-               case 'F':
-                   format_fixed_float(stream, object, args);
-                   break;
-               case 'E':
-                   format_exponential_float(stream, object, args);
-                   break;
-               case 'G':
-                   format_general_float(stream, object, args);
-                   break;
-               case '$':
-                   format_dollar_float(stream, object, args);
-                   break;
-               case '&':
-                   if (LispGetColumn(stream) == 0)
-                       --args->arguments[0].value;
-               case '%':
-                   LispWriteChars(stream, '\n', args->arguments[0].value);
-                   break;
-               case '|':
-                   LispWriteChars(stream, '\f', args->arguments[0].value);
-                   break;
-               case '~':
-                   LispWriteChars(stream, '~', args->arguments[0].value);
-                   break;
-               case '\n':
-                   if (!args->collon) {
-                       if (args->atsign)
-                           LispWriteChar(stream, '\n');
-                       /* ignore newline and following spaces */
-                       while (*next_format && isspace(*next_format))
-                           ++next_format;
-                   }
-                   break;
-               case 'T':
-                   format_tabulate(stream, args);
-                   break;
-               case '*':
-                   format_goto(info);
-                   break;
-               case '?':
-                   format_indirection(stream, object, info);
-                   need_update = 1;
-                   break;
-               case '(':
-                   format_case_conversion(stream, info);
-                   /* next_format if far from what is set now */
-                   next_format = *(info->format);
-                   break;
-               case '[':
-                   format_conditional(stream, info);
-                   /* next_format if far from what is set now */
-                   next_format = *(info->format);
-                   break;
-               case '{':
-                   format_iterate(stream, info);
-                   /* next_format if far from what is set now */
-                   next_format = *(info->format);
-                   break;
-               case '<':
-                   format_justify(stream, info);
-                   /* next_format if far from what is set now */
-                   next_format = *(info->format);
-                   break;
-               case '^':
-                   if (args->collon) {
-                       if (hash && num_arguments == 0) {
-                           info->upandout = UPANDOUT_HASH;
-                           goto format_up_and_out;
-                       }
-                       if (info->iteration &&
-                           info->iteration == ITERATION_NORMAL)
-                       /* not exactly an error, but in this case,
-                        * command is ignored */
-                           break;
-                       info->upandout = UPANDOUT_COLLON;
-                       goto format_up_and_out;
-                   }
-                   else if (num_arguments == 0) {
-                       info->upandout = UPANDOUT_NORMAL;
-                       goto format_up_and_out;
-                   }
-                   break;
-           }
-
-           if (need_update) {
-               object = *(info->object);
-               arguments = *(info->arguments);
-               num_arguments = *(info->num_arguments);
-           }
-
-           format = next_format;
-       }
-       else {
-           if (length >= sizeof(stk)) {
-               LispWriteStr(stream, stk, length);
-               length = 0;
-           }
-           stk[length++] = *format++;
-       }
-    }
-
-    /* flush any peding output */
-    if (length)
-       LispWriteStr(stream, stk, length);
-
-format_up_and_out:
-    /* update for recursive call */
-    *(info->format) = format;
-    *(info->object) = object;
-    *(info->arguments) = arguments;
-    *(info->num_arguments) = num_arguments;
-}
-
-LispObj *
-Lisp_Format(LispBuiltin *builtin)
-/*
- format destination control-string &rest arguments
- */
-{
-    GC_ENTER();
-    FmtInfo info;
-    LispObj *object;
-    char *control_string;
-    int num_arguments;
-
-    LispObj *stream, *format, *arguments;
-
-    arguments = ARGUMENT(2);
-    format = ARGUMENT(1);
-    stream = ARGUMENT(0);
-
-    /* check format and stream */
-    CHECK_STRING(format);
-    if (stream == NIL) {       /* return a string */
-       stream = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-       GC_PROTECT(stream);
-    }
-    else if (stream == T ||    /* print directly to *standard-output* */
-            stream == STANDARD_OUTPUT)
-       stream = NIL;
-    else {
-       CHECK_STREAM(stream);
-       if (!stream->data.stream.writable)
-           LispDestroy("%s: stream %s is not writable",
-                       STRFUN(builtin), STROBJ(stream));
-    }
-
-    /* count number of arguments */
-    for (object = arguments, num_arguments = 0; CONSP(object);
-        object = CDR(object), num_arguments++)
-       ;
-
-    /* initialize plural/argument info */
-    object = NIL;
-
-    /* the format string */
-    control_string = THESTR(format);
-
-    /* arguments to recursive calls */
-    info.args.base = control_string;
-    info.base_arguments = arguments;
-    info.total_arguments = num_arguments;
-    info.format = &control_string;
-    info.object = &object;
-    info.arguments = &arguments;
-    info.num_arguments = &num_arguments;
-    info.iteration = 0;
-
-    /* format arguments */
-    LispFormat(stream, &info);
-
-    /* if printing to stdout */
-    if (stream == NIL)
-       LispFflush(Stdout);
-    /* else if printing to string-stream, return a string */
-    else if (stream->data.stream.type == LispStreamString) {
-       int length;
-       char *string;
-
-       string = LispGetSstring(SSTREAMP(stream), &length);
-       stream = LSTRING(string, length);
-    }
-
-    GC_LEAVE();
-
-    return (stream);
-}
diff --git a/xedit/lisp/format.h b/xedit/lisp/format.h
deleted file mode 100644 (file)
index 3db8136..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/format.h,v 1.3tsi Exp $ */
-
-#ifndef Lisp_format_h
-#define Lisp_format_h
-
-#include "lisp/private.h"
-
-/*
- * Prototypes
- */
-LispObj *Lisp_Format(LispBuiltin*);
-
-#endif /* Lisp_format_h */
diff --git a/xedit/lisp/hash.c b/xedit/lisp/hash.c
deleted file mode 100644 (file)
index a6b91ec..0000000
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/hash.c,v 1.5 2003/04/27 18:17:32 tsi Exp $ */
-
-#include "lisp/hash.h"
-
-/* A simple hash-table implementation
- * TODO: implement SXHASH and WITH-HASH-TABLE-ITERATOR
- * May need a rewrite for better performance, and will
- * need a rewrite if images/bytecode saved on disk.
- */
-
-#define        GET_HASH        1
-#define PUT_HASH       2
-#define REM_HASH       3
-
-/*
- * Prototypes
- */
-static unsigned long LispHashKey(LispObj*, int);
-static LispObj *LispHash(LispBuiltin*, int);
-static void LispRehash(LispHashTable*);
-static void LispFreeHashEntries(LispHashEntry*, long);
-
-/*
- * Initialization
- */
-extern LispObj *Oeq, *Oeql, *Oequal, *Oequalp;
-
-/*  Hash tables will have one of these sizes, unless the user
- * specified a very large size */
-static long some_primes[] = {
-       5,   11,   17,   23,
-      31,   47,   71,   97,
-     139,  199,  307,  401,
-     607,  809, 1213, 1619,
-    2437, 3251, 4889, 6521
-};
-
-/*
- * Implementation
- */
-static unsigned long
-LispHashKey(LispObj *object, int function)
-{
-    mpi *bigi;
-    char *string;
-    long i, length;
-    unsigned long key = ((unsigned long)object) >> 4;
-
-    /* Must be the same object for EQ */
-    if (function == FEQ)
-       goto hash_key_done;
-
-    if (function == FEQUALP) {
-       switch (OBJECT_TYPE(object)) {
-           case LispSChar_t:
-               key = (unsigned long)toupper(SCHAR_VALUE(object));
-               goto hash_key_done;
-           case LispString_t:
-               string = THESTR(object);
-               length = STRLEN(object);
-               if (length > 32)
-                   length = 32;
-               for (i = 0, key = 0; i < length; i++)
-                   key = (key << 1) ^ toupper(string[i]);
-               goto hash_key_done;
-           default:
-               break;
-       }
-    }
-
-    /* Function is EQL, EQUAL or EQUALP */
-    switch (OBJECT_TYPE(object)) {
-       case LispFixnum_t:
-       case LispSChar_t:
-           key = (unsigned long)FIXNUM_VALUE(object);
-           goto hash_key_done;
-       case LispInteger_t:
-           key = (unsigned long)INT_VALUE(object);
-           goto hash_key_done;
-       case LispRatio_t:
-           key = (object->data.ratio.numerator << 16) ^
-                  object->data.ratio.denominator;
-           goto hash_key_done;
-       case LispDFloat_t:
-           key = (unsigned long)DFLOAT_VALUE(object);
-           break;
-       case LispComplex_t:
-           key = (LispHashKey(object->data.complex.imag, function) << 16) ^
-                  LispHashKey(object->data.complex.real, function);
-           goto hash_key_done;
-       case LispBignum_t:
-           bigi = object->data.mp.integer;
-           length = bigi->size;
-           if (length > 8)
-               length = 8;
-           key = bigi->sign;
-           for (i = 0; i < length; i++)
-               key = (key << 8) ^ bigi->digs[i];
-           goto hash_key_done;
-       case LispBigratio_t:
-           bigi = mpr_num(object->data.mp.ratio);
-           length = bigi->size;
-           if (length > 4)
-               length = 4;
-           key = bigi->sign;
-           for (i = 0; i < length; i++)
-               key = (key << 4) ^ bigi->digs[i];
-           bigi = mpr_den(object->data.mp.ratio);
-           length = bigi->size;
-           if (length > 4)
-               length = 4;
-           for (i = 0; i < length; i++)
-               key = (key << 4) ^ bigi->digs[i];
-           goto hash_key_done;
-       default:
-           break;
-    }
-
-    /* Anything else must be the same object for EQL */
-    if (function == FEQL)
-       goto hash_key_done;
-
-    switch (OBJECT_TYPE(object)) {
-       case LispString_t:
-           string = THESTR(object);
-           length = STRLEN(object);
-           for (i = 0, key = 0; i < length; i++)
-               key = (key << 1) ^ string[i];
-           break;
-       case LispCons_t:
-           key = (LispHashKey(CAR(object), function) << 16) ^
-                  LispHashKey(CDR(object), function);
-           break;
-       case LispQuote_t:
-       case LispBackquote_t:
-       case LispPathname_t:
-           key = LispHashKey(object->data.pathname, function);
-           break;
-       case LispRegex_t:
-           key = LispHashKey(object->data.regex.pattern, function);
-           break;
-       default:
-           break;
-    }
-
-hash_key_done:
-    return (key);
-}
-
-static LispObj *
-LispHash(LispBuiltin *builtin, int code)
-{
-    LispHashEntry *entry;
-    LispHashTable *hash;
-    unsigned long key;
-    LispObj *result;
-    int found;
-    long i;
-
-    LispObj *okey, *hash_table, *value;
-
-    if (code == REM_HASH)
-       value = NIL;
-    else {
-       value = ARGUMENT(2);
-       if (value == UNSPEC)
-           value = NIL;
-    }
-    hash_table = ARGUMENT(1);
-    okey = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    /* get hash entry */
-    hash = hash_table->data.hash.table;
-    key = LispHashKey(okey, hash->function) % hash->num_entries;
-    entry = hash->entries + key;
-
-    /* search entry in the hash table */
-    if (entry->count == 0)
-       i = 0;
-    else {
-       if (hash->function == FEQ) {
-           for (i = entry->cache; i >= 0; i--) {
-               if (entry->keys[i] == okey)
-                   goto found_key;
-           }
-           for (i = entry->cache + 1; i < entry->count; i++) {
-               if (entry->keys[i] == okey)
-                   break;
-           }
-       }
-       else {
-           for (i = entry->cache; i >= 0; i--) {
-               if (LispObjectCompare(entry->keys[i], okey,
-                                     hash->function) == T)
-                   goto found_key;
-           }
-           for (i = entry->cache + 1; i < entry->count; i++) {
-               if (LispObjectCompare(entry->keys[i], okey,
-                                     hash->function) == T)
-                   break;
-           }
-       }
-    }
-
-found_key:
-    result = value;
-    if ((found = i < entry->count) == 0)
-       i = entry->count;
-
-    switch (code) {
-       case GET_HASH:
-           RETURN_COUNT = 1;
-           if (found) {
-               RETURN(0) = T;
-               entry->cache = i;
-               result = entry->values[i];
-           }
-           else
-               RETURN(0) = NIL;
-           break;
-       case PUT_HASH:
-           entry->cache = i;
-           if (found)
-               /* Just replace current entry */
-               entry->values[i] = value;
-           else {
-               if ((i % 4) == 0) {
-                   LispObj **keys, **values;
-
-                   keys = realloc(entry->keys, sizeof(LispObj*) * (i + 4));
-                   if (keys == NULL)
-                       LispDestroy("out of memory");
-                   values = realloc(entry->values, sizeof(LispObj*) * (i + 4));
-                   if (values == NULL) {
-                       free(keys);
-                       LispDestroy("out of memory");
-                   }
-                   entry->keys = keys;
-                   entry->values = values;
-               }
-               entry->keys[i] = okey;
-               entry->values[i] = value;
-               ++entry->count;
-               ++hash->count;
-               if (hash->count > hash->rehash_threshold * hash->num_entries)
-                   LispRehash(hash);
-           }
-           break;
-       case REM_HASH:
-           if (found) {
-               result = T;
-               --entry->count;
-               --hash->count;
-               if (i < entry->count) {
-                   memmove(entry->keys + i, entry->keys + i + 1,
-                           (entry->count - i) * sizeof(LispObj*));
-                   memmove(entry->values + i, entry->values + i + 1,
-                           (entry->count - i) * sizeof(LispObj*));
-               }
-               if (entry->cache && entry->cache == entry->count)
-                   --entry->cache;
-           }
-           break;
-    }
-
-    return (result);
-}
-
-static void
-LispRehash(LispHashTable *hash)
-{
-    unsigned long key;
-    LispHashEntry *entries, *nentry, *entry, *last;
-    long i, size = hash->num_entries * hash->rehash_size;
-
-    for (i = 0; i < sizeof(some_primes) / sizeof(some_primes[0]); i++)
-       if (some_primes[i] >= size) {
-           size = some_primes[i];
-           break;
-       }
-
-    entries = calloc(1, sizeof(LispHashEntry) * size);
-    if (entries == NULL)
-       goto out_of_memory;
-
-    for (entry = hash->entries, last = entry + hash->num_entries;
-        entry < last; entry++) {
-       for (i = 0; i < entry->count; i++) {
-           key = LispHashKey(entry->keys[i], hash->function) % size;
-           nentry = entries + key;
-           if ((nentry->count % 4) == 0) {
-               LispObj **keys, **values;
-
-               keys = realloc(nentry->keys, sizeof(LispObj*) *
-                              (nentry->count + 4));
-               if (keys == NULL)
-                   goto out_of_memory;
-               values = realloc(nentry->values, sizeof(LispObj*) *
-                                (nentry->count + 4));
-               if (values == NULL) {
-                   free(keys);
-                   goto out_of_memory;
-               }
-               nentry->keys = keys;
-               nentry->values = values;
-           }
-           nentry->keys[nentry->count] = entry->keys[i];
-           nentry->values[nentry->count] = entry->values[i];
-           ++nentry->count;
-
-       }
-    }
-    LispFreeHashEntries(hash->entries, hash->num_entries);
-    hash->entries = entries;
-    hash->num_entries = size;
-    return;
-
-out_of_memory:
-    if (entries)
-       LispFreeHashEntries(entries, size);
-    LispDestroy("out of memory");
-}
-
-static void
-LispFreeHashEntries(LispHashEntry *entries, long num_entries)
-{
-    LispHashEntry *entry, *last;
-
-    for (entry = entries, last = entry + num_entries; entry < last; entry++) {
-       free(entry->keys);
-       free(entry->values);
-    }
-    free(entries);
-}
-
-void
-LispFreeHashTable(LispHashTable *hash)
-{
-    LispFreeHashEntries(hash->entries, hash->num_entries);
-    free(hash);
-}
-
-LispObj *
-Lisp_Clrhash(LispBuiltin *builtin)
-/*
- clrhash hash-table
- */
-{
-    LispHashTable *hash;
-    LispHashEntry *entry, *last;
-
-    LispObj *hash_table = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    hash = hash_table->data.hash.table;
-    for (entry = hash->entries, last = entry + hash->num_entries;
-       entry < last; entry++) {
-       free(entry->keys);
-       free(entry->values);
-       entry->keys = entry->values = NULL;
-       entry->count = entry->cache = 0;
-    }
-    hash->count = 0;
-
-    return (hash_table);
-}
-
-LispObj *
-Lisp_Gethash(LispBuiltin *builtin)
-/*
- gethash key hash-table &optional default
- */
-{
-    return (LispHash(builtin, GET_HASH));
-}
-
-LispObj *
-Lisp_HashTableP(LispBuiltin *builtin)
-/*
- hash-table-p object
- */
-{
-    LispObj *object = ARGUMENT(0);
-
-    return (HASHTABLEP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_HashTableCount(LispBuiltin *builtin)
-/*
- hash-table-count hash-table
- */
-{
-    LispObj *hash_table = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    return (FIXNUM(hash_table->data.hash.table->count));
-}
-
-LispObj *
-Lisp_HashTableRehashSize(LispBuiltin *builtin)
-/*
- hash-table-rehash-size hash-table
- */
-{
-    LispObj *hash_table = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    return (DFLOAT(hash_table->data.hash.table->rehash_size));
-}
-
-LispObj *
-Lisp_HashTableRehashThreshold(LispBuiltin *builtin)
-/*
- hash-table-rehash-threshold hash-table
- */
-{
-    LispObj *hash_table = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    return (DFLOAT(hash_table->data.hash.table->rehash_threshold));
-}
-
-LispObj *
-Lisp_HashTableSize(LispBuiltin *builtin)
-/*
- hash-table-size hash-table
- */
-{
-    LispObj *hash_table = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    return (FIXNUM(hash_table->data.hash.table->num_entries));
-}
-
-LispObj *
-Lisp_HashTableTest(LispBuiltin *builtin)
-/*
- hash-table-test hash-table
- */
-{
-    LispObj *hash_table = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    return (hash_table->data.hash.test);
-}
-
-LispObj *
-Lisp_Maphash(LispBuiltin *builtin)
-/*
- maphash function hash-table
- */
-{
-    long i;
-    LispHashEntry *entry, *last;
-
-    LispObj *function, *hash_table;
-
-    hash_table = ARGUMENT(1);
-    function = ARGUMENT(0);
-
-    CHECK_HASHTABLE(hash_table);
-
-    for (entry = hash_table->data.hash.table->entries,
-        last = entry + hash_table->data.hash.table->num_entries;
-        entry < last; entry++) {
-       for (i = 0; i < entry->count; i++)
-           APPLY2(function, entry->keys[i], entry->values[i]);
-    }
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_MakeHashTable(LispBuiltin *builtin)
-/*
- make-hash-table &key test size rehash-size rehash-threshold initial-contents
- */
-{
-    int function = FEQL;
-    unsigned long i, isize, xsize;
-    double drsize, drthreshold;
-    LispHashTable *hash_table;
-    LispObj *cons, *result;
-
-    LispObj *test, *size, *rehash_size, *rehash_threshold, *initial_contents;
-
-    initial_contents = ARGUMENT(4);
-    rehash_threshold = ARGUMENT(3);
-    rehash_size = ARGUMENT(2);
-    size = ARGUMENT(1);
-    test = ARGUMENT(0);
-
-    if (test != UNSPEC) {
-       if (FUNCTIONP(test))
-           test = test->data.atom->object;
-       if (test == Oeq)
-           function = FEQ;
-       else if (test == Oeql)
-           function = FEQL;
-       else if (test == Oequal)
-           function = FEQUAL;
-       else if (test == Oequalp)
-           function = FEQUALP;
-       else
-           LispDestroy("%s: :TEST must be EQ, EQL, EQUAL, "
-                       "or EQUALP, not %s", STRFUN(builtin), STROBJ(test));
-    }
-    else
-       test = Oeql;
-
-    if (size != UNSPEC) {
-       CHECK_INDEX(size);
-       isize = FIXNUM_VALUE(size);
-    }
-    else
-       isize = 1;
-
-    if (rehash_size != UNSPEC) {
-       CHECK_DFLOAT(rehash_size);
-       if (DFLOAT_VALUE(rehash_size) <= 1.0)
-           LispDestroy("%s: :REHASH-SIZE must a float > 1, not %s",
-                       STRFUN(builtin), STROBJ(rehash_size));
-       drsize = DFLOAT_VALUE(rehash_size);
-    }
-    else
-       drsize = 1.5;
-
-    if (rehash_threshold != UNSPEC) {
-       CHECK_DFLOAT(rehash_threshold);
-       if (DFLOAT_VALUE(rehash_threshold) < 0.0 ||
-           DFLOAT_VALUE(rehash_threshold) > 1.0)
-           LispDestroy("%s: :REHASH-THRESHOLD must a float "
-                       "in the range 0.0 - 1.0, not %s",
-                       STRFUN(builtin), STROBJ(rehash_threshold));
-       drthreshold = DFLOAT_VALUE(rehash_threshold);
-    }
-    else
-       drthreshold = 0.75;
-
-    if (initial_contents == UNSPEC)
-       initial_contents = NIL;
-    CHECK_LIST(initial_contents);
-    for (xsize = 0, cons = initial_contents;
-        CONSP(cons);
-        xsize++, cons = CDR(cons))
-       CHECK_CONS(CAR(cons));
-
-    if (xsize > isize)
-       isize = xsize;
-
-    for (i = 0; i < sizeof(some_primes) / sizeof(some_primes[0]); i++)
-       if (some_primes[i] >= isize) {
-           isize = some_primes[i];
-           break;
-       }
-
-    hash_table = LispMalloc(sizeof(LispHashTable));
-    hash_table->entries = LispCalloc(1, sizeof(LispHashEntry) * isize);
-    hash_table->num_entries = isize;
-    hash_table->count = 0;
-    hash_table->function = function;
-    hash_table->rehash_size = drsize;
-    hash_table->rehash_threshold = drthreshold;
-
-    result = LispNew(NIL, NIL);
-    result->type = LispHashTable_t;
-    result->data.hash.table = hash_table;
-    result->data.hash.test = test;
-
-    LispMused(hash_table);
-    LispMused(hash_table->entries);
-
-    if (initial_contents != UNSPEC) {
-       unsigned long key;
-       LispHashEntry *entry;
-
-       for (cons = initial_contents; CONSP(cons); cons = CDR(cons)) {
-           key = LispHashKey(CAAR(cons), function) % isize;
-           entry = hash_table->entries + key;
-
-           if ((entry->count % 4) == 0) {
-               LispObj **keys, **values;
-
-               keys = realloc(entry->keys, sizeof(LispObj*) * (i + 4));
-               if (keys == NULL)
-                   LispDestroy("out of memory");
-               values = realloc(entry->values, sizeof(LispObj*) * (i + 4));
-               if (values == NULL) {
-                   free(keys);
-                   LispDestroy("out of memory");
-               }
-               entry->keys = keys;
-               entry->values = values;
-           }
-           entry->keys[entry->count] = CAAR(cons);
-           entry->values[entry->count] = CDAR(cons);
-           ++entry->count;
-       }
-       hash_table->count = xsize;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Remhash(LispBuiltin *builtin)
-/*
- remhash key hash-table
- */
-{
-    return (LispHash(builtin, REM_HASH));
-}
-
-LispObj *
-Lisp_XeditPuthash(LispBuiltin *builtin)
-/*
- lisp::puthash key hash-table value
- */
-{
-    return (LispHash(builtin, PUT_HASH));
-}
diff --git a/xedit/lisp/hash.h b/xedit/lisp/hash.h
deleted file mode 100644 (file)
index be74f11..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/hash.h,v 1.2tsi Exp $ */
-
-#ifndef Lisp_hash_h
-#define Lisp_hash_h
-
-#include "lisp/private.h"
-
-typedef struct _LispHashEntry {
-    LispObj **keys;
-    LispObj **values;
-    long cache;
-    long count;
-} LispHashEntry;
-
-struct _LispHashTable {
-    LispHashEntry *entries;
-    long num_entries;
-    long count;
-    int function;              /* Function is EQ, EQL, EQUAL, or EQUALP */
-    double rehash_size;
-    double rehash_threshold;
-};
-
-/*
- * Prototypes
- */
-void LispFreeHashTable(LispHashTable*);
-
-LispObj *Lisp_Clrhash(LispBuiltin*);
-LispObj *Lisp_Gethash(LispBuiltin*);
-LispObj *Lisp_HashTableCount(LispBuiltin*);
-LispObj *Lisp_HashTableP(LispBuiltin*);
-LispObj *Lisp_HashTableRehashSize(LispBuiltin*);
-LispObj *Lisp_HashTableRehashThreshold(LispBuiltin*);
-LispObj *Lisp_HashTableSize(LispBuiltin*);
-LispObj *Lisp_HashTableTest(LispBuiltin*);
-LispObj *Lisp_Maphash(LispBuiltin*);
-LispObj *Lisp_MakeHashTable(LispBuiltin*);
-LispObj *Lisp_Remhash(LispBuiltin*);
-LispObj *Lisp_XeditPuthash(LispBuiltin*);
-
-#endif /* Lisp_hash_h */
diff --git a/xedit/lisp/helper.c b/xedit/lisp/helper.c
deleted file mode 100644 (file)
index be3ee7b..0000000
+++ /dev/null
@@ -1,1126 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/helper.c,v 1.50 2003/05/27 22:27:03 tsi Exp $ */
-
-#include "lisp/helper.h"
-#include "lisp/pathname.h"
-#include "lisp/package.h"
-#include "lisp/read.h"
-#include "lisp/stream.h"
-#include "lisp/write.h"
-#include "lisp/hash.h"
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <math.h>
-#include <sys/stat.h>
-
-/*
- * Prototypes
- */
-static LispObj *LispReallyDo(LispBuiltin*, int);
-static LispObj *LispReallyDoListTimes(LispBuiltin*, int);
-
-/* in math.c */
-extern LispObj *LispFloatCoerce(LispBuiltin*, LispObj*);
-
-/*
- * Implementation
- */
-LispObj *
-LispObjectCompare(LispObj *left, LispObj *right, int function)
-{
-    LispType ltype, rtype;
-    LispObj *result = left == right ? T : NIL;
-
-    /* If left and right are the same object, or if function is EQ */
-    if (result == T || function == FEQ)
-       return (result);
-
-    ltype = OBJECT_TYPE(left);
-    rtype = OBJECT_TYPE(right);
-
-    /* Equalp requires that numeric objects be compared by value, and
-     * strings or characters comparison be case insenstive */
-    if (function == FEQUALP) {
-       switch (ltype) {
-           case LispFixnum_t:
-           case LispInteger_t:
-           case LispBignum_t:
-           case LispDFloat_t:
-           case LispRatio_t:
-           case LispBigratio_t:
-           case LispComplex_t:
-               switch (rtype) {
-                   case LispFixnum_t:
-                   case LispInteger_t:
-                   case LispBignum_t:
-                   case LispDFloat_t:
-                   case LispRatio_t:
-                   case LispBigratio_t:
-                   case LispComplex_t:
-                       result = APPLY2(Oequal_, left, right);
-                       break;
-                   default:
-                       break;
-               }
-               goto compare_done;
-           case LispSChar_t:
-               if (rtype == LispSChar_t &&
-                   toupper(SCHAR_VALUE(left)) == toupper(SCHAR_VALUE(right)))
-                   result = T;
-               goto compare_done;
-           case LispString_t:
-               if (rtype == LispString_t && STRLEN(left) == STRLEN(right)) {
-                   long i = STRLEN(left);
-                   char *sl = THESTR(left), *sr = THESTR(right);
-
-                   for (--i; i >= 0; i--)
-                       if (toupper(sl[i]) != toupper(sr[i]))
-                           break;
-                   if (i < 0)
-                       result = T;
-               }
-               goto compare_done;
-           case LispArray_t:
-               if (rtype == LispArray_t &&
-                   left->data.array.type == right->data.array.type &&
-                   left->data.array.rank == right->data.array.rank &&
-                   LispObjectCompare(left->data.array.dim,
-                                     right->data.array.dim,
-                                     FEQUAL) != NIL) {
-                   LispObj *llist = left->data.array.list,
-                           *rlist = right->data.array.list;
-
-                   for (; CONSP(llist); llist = CDR(llist), rlist = CDR(rlist))
-                       if (LispObjectCompare(CAR(llist), CAR(rlist),
-                                             FEQUALP) == NIL)
-                           break;
-                   if (!CONSP(llist))
-                       result = T;
-               }
-               goto compare_done;
-           case LispStruct_t:
-               if (rtype == LispStruct_t &&
-                   left->data.struc.def == right->data.struc.def) {
-                   LispObj *lfield = left->data.struc.fields,
-                           *rfield = right->data.struc.fields;
-
-                   for (; CONSP(lfield);
-                        lfield = CDR(lfield), rfield = CDR(rfield)) {
-                       if (LispObjectCompare(CAR(lfield), CAR(rfield),
-                                             FEQUALP) != T)
-                           break;
-                   }
-                   if (!CONSP(lfield))
-                       result = T;
-               }
-               goto compare_done;
-           case LispHashTable_t:
-               if (rtype == LispHashTable_t &&
-                   left->data.hash.table->count ==
-                   right->data.hash.table->count &&
-                   left->data.hash.test == right->data.hash.test) {
-                   unsigned long i;
-                   LispObj *test = left->data.hash.test;
-                   LispHashEntry *lentry = left->data.hash.table->entries,
-                                 *llast = lentry +
-                                          left->data.hash.table->num_entries,
-                                 *rentry = right->data.hash.table->entries;
-
-                   for (; lentry < llast; lentry++, rentry++) {
-                       if (lentry->count != rentry->count)
-                           break;
-                       for (i = 0; i < lentry->count; i++) {
-                           if (APPLY2(test,
-                                      lentry->keys[i],
-                                      rentry->keys[i]) == NIL ||
-                               LispObjectCompare(lentry->values[i],
-                                                 rentry->values[i],
-                                                 FEQUALP) == NIL)
-                               break;
-                       }
-                       if (i < lentry->count)
-                           break;
-                   }
-                   if (lentry == llast)
-                       result = T;
-               }
-               goto compare_done;
-           default:
-               break;
-       }
-    }
-
-    /* Function is EQL or EQUAL, or EQUALP on arguments with the same rules */
-    if (ltype == rtype) {
-       switch (ltype) {
-           case LispFixnum_t:
-           case LispSChar_t:
-               if (FIXNUM_VALUE(left) == FIXNUM_VALUE(right))
-                   result = T;
-               break;
-           case LispInteger_t:
-               if (INT_VALUE(left) == INT_VALUE(right))
-                   result = T;
-               break;
-           case LispDFloat_t:
-               if (DFLOAT_VALUE(left) == DFLOAT_VALUE(right))
-                   result = T;
-               break;
-           case LispRatio_t:
-               if (left->data.ratio.numerator ==
-                   right->data.ratio.numerator &&
-                   left->data.ratio.denominator ==
-                   right->data.ratio.denominator)
-                   result = T;
-               break;
-           case LispComplex_t:
-               if (LispObjectCompare(left->data.complex.real,
-                                     right->data.complex.real,
-                                     function) == T &&
-                   LispObjectCompare(left->data.complex.imag,
-                                     right->data.complex.imag,
-                                     function) == T)
-                   result = T;
-               break;
-           case LispBignum_t:
-               if (mpi_cmp(left->data.mp.integer, right->data.mp.integer) == 0)
-                   result = T;
-               break;
-           case LispBigratio_t:
-               if (mpr_cmp(left->data.mp.ratio, right->data.mp.ratio) == 0)
-                   result = T;
-               break;
-           default:
-               break;
-       }
-
-       /* Next types must be the same object for EQL */
-       if (function == FEQL)
-           goto compare_done;
-
-       switch (ltype) {
-           case LispString_t:
-               if (STRLEN(left) == STRLEN(right) &&
-                   memcmp(THESTR(left), THESTR(right), STRLEN(left)) == 0)
-                   result = T;
-               break;
-           case LispCons_t:
-               if (LispObjectCompare(CAR(left), CAR(right), function) == T &&
-                   LispObjectCompare(CDR(left), CDR(right), function) == T)
-                   result = T;
-               break;
-           case LispQuote_t:
-           case LispBackquote_t:
-           case LispPathname_t:
-               result = LispObjectCompare(left->data.pathname,
-                                          right->data.pathname, function);
-               break;
-           case LispLambda_t:
-               result = LispObjectCompare(left->data.lambda.name,
-                                          right->data.lambda.name,
-                                          function);
-               break;
-           case LispOpaque_t:
-               if (left->data.opaque.data == right->data.opaque.data)
-                   result = T;
-               break;
-           case LispRegex_t:
-               /* If the regexs are guaranteed to generate the same matches */
-               if (left->data.regex.options == right->data.regex.options)
-                   result = LispObjectCompare(left->data.regex.pattern,
-                                              right->data.regex.pattern,
-                                              function);
-               break;
-           default:
-               break;
-       }
-    }
-
-compare_done:
-    return (result);
-}
-
-void
-LispCheckSequenceStartEnd(LispBuiltin *builtin,
-                         LispObj *sequence, LispObj *start, LispObj *end,
-                         long *pstart, long *pend, long *plength)
-{
-    /* Calculate length of sequence and check it's type */
-    *plength = LispLength(sequence);
-
-    /* Check start argument */
-    if (start == UNSPEC || start == NIL)
-       *pstart = 0;
-    else {
-       CHECK_INDEX(start);
-       *pstart = FIXNUM_VALUE(start);
-    }
-
-    /* Check end argument */
-    if (end == UNSPEC || end == NIL)
-       *pend = *plength;
-    else {
-       CHECK_INDEX(end);
-       *pend = FIXNUM_VALUE(end);
-    }
-
-    /* Check start argument */
-    if (*pstart > *pend)
-       LispDestroy("%s: :START %ld is larger than :END %ld",
-                   STRFUN(builtin), *pstart, *pend);
-
-    /* Check end argument */
-    if (*pend > *plength)
-       LispDestroy("%s: :END %ld is larger then sequence length %ld",
-                   STRFUN(builtin), *pend, *plength);
-}
-
-long
-LispLength(LispObj *sequence)
-{
-    long length;
-
-    if (sequence == NIL)
-       return (0);
-    switch (OBJECT_TYPE(sequence)) {
-       case LispString_t:
-           length = STRLEN(sequence);
-           break;
-       case LispArray_t:
-           if (sequence->data.array.rank != 1)
-               goto not_a_sequence;
-           sequence = sequence->data.array.list;
-           /*FALLTROUGH*/
-       case LispCons_t:
-           for (length = 0;
-                CONSP(sequence);
-                length++, sequence = CDR(sequence))
-               ;
-           break;
-       default:
-not_a_sequence:
-           LispDestroy("LENGTH: %s is not a sequence", STROBJ(sequence));
-           /*NOTREACHED*/
-           length = 0;
-    }
-
-    return (length);
-}
-
-LispObj *
-LispCharacterCoerce(LispBuiltin *builtin, LispObj *object)
-{
-    if (SCHARP(object))
-       return (object);
-    else if (STRINGP(object) && STRLEN(object) == 1)
-       return (SCHAR(THESTR(object)[0]));
-    else if (SYMBOLP(object) && ATOMID(object)->value[1] == '\0')
-       return (SCHAR(ATOMID(object)->value[0]));
-    else if (INDEXP(object)) {
-       int c = FIXNUM_VALUE(object);
-
-       if (c <= 0xff)
-           return (SCHAR(c));
-    }
-    else if (object == T)
-       return (SCHAR('T'));
-
-    LispDestroy("%s: cannot convert %s to character",
-               STRFUN(builtin), STROBJ(object));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-LispStringCoerce(LispBuiltin *builtin, LispObj *object)
-{
-    if (STRINGP(object))
-       return (object);
-    else if (SYMBOLP(object))
-       return (LispSymbolName(object));
-    else if (SCHARP(object)) {
-       char string[1];
-
-       string[0] = SCHAR_VALUE(object);
-       return (LSTRING(string, 1));
-    }
-    else if (object == NIL)
-       return (LSTRING(Snil->value, 3));
-    else if (object == T)
-       return (LSTRING(St->value, 1));
-    else
-       LispDestroy("%s: cannot convert %s to string",
-                   STRFUN(builtin), STROBJ(object));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-LispCoerce(LispBuiltin *builtin,
-          LispObj *object, LispObj *result_type)
-{
-    LispObj *result = NIL;
-    LispType type = LispNil_t;
-
-    if (result_type == NIL)
-       /* not even NIL can be converted to NIL? */
-       LispDestroy("%s: cannot convert %s to NIL",
-                   STRFUN(builtin), STROBJ(object));
-
-    else if (result_type == T)
-       /* no conversion */
-       return (object);
-
-    else if (!SYMBOLP(result_type))
-       /* only know about simple types */
-       LispDestroy("%s: bad argument %s",
-                   STRFUN(builtin), STROBJ(result_type));
-
-    else {
-       /* check all known types */
-
-       Atom_id atom = ATOMID(result_type);
-
-       if (atom == Satom) {
-           if (CONSP(object))
-               goto coerce_fail;
-           return (object);
-       }
-       /* only convert ATOM to SYMBOL */
-
-       if (atom == Sfloat)
-           type = LispDFloat_t;
-       else if (atom == Sinteger)
-           type = LispInteger_t;
-       else if (atom == Scons || atom == Slist) {
-           if (object == NIL)
-               return (object);
-           type = LispCons_t;
-       }
-       else if (atom == Sstring)
-           type = LispString_t;
-       else if (atom == Scharacter)
-           type = LispSChar_t;
-       else if (atom == Scomplex)
-           type = LispComplex_t;
-       else if (atom == Svector || atom == Sarray)
-           type = LispArray_t;
-       else if (atom == Sopaque)
-           type = LispOpaque_t;
-       else if (atom == Srational)
-           type = LispRatio_t;
-       else if (atom == Spathname)
-           type = LispPathname_t;
-       else
-           LispDestroy("%s: invalid type specification %s",
-                       STRFUN(builtin), ATOMID(result_type)->value);
-    }
-
-    if (OBJECT_TYPE(object) == LispOpaque_t) {
-       switch (type) {
-           case LispAtom_t:
-               result = ATOM(object->data.opaque.data);
-               break;
-           case LispString_t:
-               result = STRING(object->data.opaque.data);
-               break;
-           case LispSChar_t:
-               result = SCHAR((unsigned long)object->data.opaque.data);
-               break;
-           case LispDFloat_t:
-               result = DFLOAT((double)((long)object->data.opaque.data));
-               break;
-           case LispInteger_t:
-               result = INTEGER(((long)object->data.opaque.data));
-               break;
-           case LispOpaque_t:
-               result = OPAQUE(object->data.opaque.data, 0);
-               break;
-           default:
-               goto coerce_fail;
-               break;
-       }
-    }
-
-    else if (OBJECT_TYPE(object) != type) {
-       switch (type) {
-           case LispInteger_t:
-               if (INTEGERP(object))
-                   result = object;
-               else if (DFLOATP(object)) {
-                   if ((long)DFLOAT_VALUE(object) == DFLOAT_VALUE(object))
-                       result = INTEGER((long)DFLOAT_VALUE(object));
-                   else {
-                       mpi *integer = LispMalloc(sizeof(mpi));
-
-                       mpi_init(integer);
-                       mpi_setd(integer, DFLOAT_VALUE(object));
-                       if (mpi_getd(integer) != DFLOAT_VALUE(object)) {
-                           mpi_clear(integer);
-                           LispFree(integer);
-                           goto coerce_fail;
-                       }
-                       result = BIGNUM(integer);
-                   }
-               }
-               else
-                   goto coerce_fail;
-               break;
-           case LispRatio_t:
-               if (DFLOATP(object)) {
-                   mpr *ratio = LispMalloc(sizeof(mpr));
-
-                   mpr_init(ratio);
-                   mpr_setd(ratio, DFLOAT_VALUE(object));
-                   if (mpr_fiti(ratio)) {
-                       result = RATIO(mpi_geti(mpr_num(ratio)),
-                                      mpi_geti(mpr_den(ratio)));
-                       mpr_clear(ratio);
-                       LispFree(ratio);
-                   }
-                   else
-                       result = BIGRATIO(ratio);
-               }
-               else if (RATIONALP(object))
-                   result = object;
-               else
-                   goto coerce_fail;
-               break;
-           case LispDFloat_t:
-               result = LispFloatCoerce(builtin, object);
-               break;
-           case LispComplex_t:
-               if (NUMBERP(object))
-                   result = object;
-               else
-                   goto coerce_fail;
-               break;
-           case LispString_t:
-               if (object == NIL)
-                   result = STRING("");
-               else
-                   result = LispStringCoerce(builtin, object);
-               break;
-           case LispSChar_t:
-               result = LispCharacterCoerce(builtin, object);
-               break;
-           case LispArray_t:
-               if (LISTP(object))
-                   result = VECTOR(object);
-               else
-                   goto coerce_fail;
-               break;
-           case LispCons_t:
-               if (ARRAYP(object) && object->data.array.rank == 1)
-                   result = object->data.array.list;
-               else
-                   goto coerce_fail;
-               break;
-           case LispPathname_t:
-               result = APPLY1(Oparse_namestring, object);
-               break;
-           default:
-               goto coerce_fail;
-       }
-    }
-    else
-       result = object;
-
-    return (result);
-
-coerce_fail:
-    LispDestroy("%s: cannot convert %s to %s",
-               STRFUN(builtin), STROBJ(object), ATOMID(result_type)->value);
-    /* NOTREACHED */
-    return (NIL);
-}
-
-static LispObj *
-LispReallyDo(LispBuiltin *builtin, int refs)
-/*
- do init test &rest body
- do* init test &rest body
- */
-{
-    GC_ENTER();
-    int stack, lex, head;
-    LispObj *list, *symbol, *value, *values, *cons;
-
-    LispObj *init, *test, *body;
-
-    body = ARGUMENT(2);
-    test = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    if (!CONSP(test))
-       LispDestroy("%s: end test condition must be a list, not %s",
-                   STRFUN(builtin), STROBJ(init));
-
-    CHECK_LIST(init);
-
-    /* Save state */
-    stack = lisp__data.stack.length;
-    lex = lisp__data.env.lex;
-    head = lisp__data.env.length;
-
-    values = cons = NIL;
-    for (list = init; CONSP(list); list = CDR(list)) {
-       symbol = CAR(list);
-       if (!SYMBOLP(symbol)) {
-           CHECK_CONS(symbol);
-           value = CDR(symbol);
-           symbol = CAR(symbol);
-           CHECK_SYMBOL(symbol);
-           CHECK_CONS(value);
-           value = EVAL(CAR(value));
-       }
-       else
-           value = NIL;
-
-       CHECK_CONSTANT(symbol);
-
-       LispAddVar(symbol, value);
-
-       /* Bind variable now */
-       if (refs) {
-           ++lisp__data.env.head;
-       }
-       else {
-           if (values == NIL) {
-               values = cons = CONS(NIL, NIL);
-               GC_PROTECT(values);
-           }
-           else {
-               RPLACD(cons, CONS(NIL, NIL));
-               cons = CDR(cons);
-           }
-       }
-    }
-    if (!refs)
-       lisp__data.env.head = lisp__data.env.length;
-
-    for (;;) {
-       if (EVAL(CAR(test)) != NIL)
-           break;
-
-       /* TODO Run this code in an implicit tagbody */
-       for (list = body; CONSP(list); list = CDR(list))
-           (void)EVAL(CAR(list));
-
-       /* Error checking already done in the initialization */
-       for (list = init, cons = values; CONSP(list); list = CDR(list)) {
-           symbol = CAR(list);
-           if (CONSP(symbol)) {
-               value = CDDR(symbol);
-               symbol = CAR(symbol);
-               if (CONSP(value))
-                   value = EVAL(CAR(value));
-               else
-                   value = NIL;
-           }
-           else
-               value = NIL;
-
-           if (refs)
-               LispSetVar(symbol, value);
-           else {
-               RPLACA(cons, value);
-               cons = CDR(cons);
-           }
-       }
-       if (!refs) {
-           for (list = init, cons = values;
-                CONSP(list);
-                list = CDR(list), cons = CDR(cons)) {
-               symbol = CAR(list);
-               if (CONSP(symbol)) {
-                   if (CONSP(CDR(symbol)))
-                       LispSetVar(CAR(symbol), CAR(cons));
-               }
-           }
-       }
-    }
-
-    if (CONSP(CDR(test)))
-       value = EVAL(CADR(test));
-    else
-       value = NIL;
-
-    /* Restore state */
-    lisp__data.stack.length = stack;
-    lisp__data.env.lex = lex;
-    lisp__data.env.head = lisp__data.env.length = head;
-    GC_LEAVE();
-
-    return (value);
-}
-
-LispObj *
-LispDo(LispBuiltin *builtin, int refs)
-/*
- do init test &rest body
- do* init test &rest body
- */
-{
-    int jumped;
-    LispObj *result;
-    LispBlock *block;
-
-    jumped = 1;
-    result = NIL;
-    block = LispBeginBlock(NIL, LispBlockTag);
-    if (setjmp(block->jmp) == 0) {
-       result = LispReallyDo(builtin, refs);
-       jumped = 0;
-    }
-    LispEndBlock(block);
-    if (jumped)
-       result = lisp__data.block.block_ret;
-
-    return (result);
-}
-
-static LispObj *
-LispReallyDoListTimes(LispBuiltin *builtin, int times)
-/*
- dolist init &rest body
- dotimes init &rest body
- */
-{
-    GC_ENTER();
-    int head = lisp__data.env.length;
-    long count = 0, end = 0;
-    LispObj *symbol, *value = NIL, *result = NIL, *init, *body, *object;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    /* Parse arguments */
-    CHECK_CONS(init);
-    symbol = CAR(init);
-    CHECK_SYMBOL(symbol);
-    init = CDR(init);
-
-    if (init == NIL) {
-       if (times)
-           LispDestroy("%s: NIL is not a number", STRFUN(builtin));
-    }
-    else {
-       CHECK_CONS(init);
-       value = CAR(init);
-       init = CDR(init);
-       if (init != NIL) {
-           CHECK_CONS(init);
-           result = CAR(init);
-       }
-
-       value = EVAL(value);
-
-       if (times) {
-           CHECK_INDEX(value);
-           end = FIXNUM_VALUE(value);
-       }
-       else {
-           CHECK_LIST(value);
-           /* Protect iteration control from gc */
-           GC_PROTECT(value);
-       }
-    }
-
-    /* The variable is only bound inside the loop, so it is safe to optimize
-     * it out if there is no code to execute. But the result form may reference
-     * the bound variable. */
-    if (!CONSP(body)) {
-       if (times)
-           count = end;
-       else
-           value = NIL;
-    }
-
-    /* Initialize counter */
-    CHECK_CONSTANT(symbol);
-    if (times)
-       LispAddVar(symbol, FIXNUM(count));
-    else
-       LispAddVar(symbol, CONSP(value) ? CAR(value) : value);
-    ++lisp__data.env.head;
-
-    if (!CONSP(body) || (times && count >= end) || (!times && !CONSP(value)))
-       goto loop_done;
-
-    /* Execute iterations */
-    for (;;) {
-       for (object = body; CONSP(object); object = CDR(object))
-           (void)EVAL(CAR(object));
-
-       /* Update symbols and check exit condition */
-       if (times) {
-           ++count;
-           LispSetVar(symbol, FIXNUM(count));
-           if (count >= end)
-               break;
-       }
-       else {
-           value = CDR(value);
-           if (!CONSP(value)) {
-               LispSetVar(symbol, NIL);
-               break;
-           }
-           LispSetVar(symbol, CAR(value));
-       }
-    }
-
-loop_done:
-    result = EVAL(result);
-    lisp__data.env.head = lisp__data.env.length = head;
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-LispDoListTimes(LispBuiltin *builtin, int times)
-/*
- dolist init &rest body
- dotimes init &rest body
- */
-{
-    int did_jump, *pdid_jump = &did_jump;
-    LispObj *result, **presult = &result;
-    LispBlock *block;
-
-    *presult = NIL;
-    *pdid_jump = 1;
-    block = LispBeginBlock(NIL, LispBlockTag);
-    if (setjmp(block->jmp) == 0) {
-       result = LispReallyDoListTimes(builtin, times);
-       did_jump = 0;
-    }
-    LispEndBlock(block);
-    if (did_jump)
-       result = lisp__data.block.block_ret;
-
-    return (result);
-}
-
-LispObj *
-LispLoadFile(LispObj *filename, int verbose, int print, int ifdoesnotexist)
-{
-    LispObj *stream, *cod, *obj, *result;
-    int ch;
-
-    LispObj *savepackage;
-    LispPackage *savepack;
-
-    if (verbose)
-       LispMessage("; Loading %s", THESTR(filename));
-
-    if (ifdoesnotexist) {
-       GC_ENTER();
-       result = CONS(filename, CONS(Kif_does_not_exist, CONS(Kerror, NIL)));
-       GC_PROTECT(result);
-       stream = APPLY(Oopen, result);
-       GC_LEAVE();
-    }
-    else
-       stream = APPLY1(Oopen, filename);
-
-    if (stream == NIL)
-       return (NIL);
-
-    result = NIL;
-    LispPushInput(stream);
-    ch = LispGet();
-    if (ch != '#')
-       LispUnget(ch);
-    else if ((ch = LispGet()) == '!') {
-       for (;;) {
-           ch = LispGet();
-           if (ch == '\n' || ch == EOF)
-               break;
-       }
-    }
-    else {
-       LispUnget(ch);
-       LispUnget('#');
-    }
-
-    /* Save package environment */
-    savepackage = PACKAGE;
-    savepack = lisp__data.pack;
-
-    cod = COD;
-
-    /*CONSTCOND*/
-    while (1) {
-       if ((obj = LispRead()) != NULL) {
-           result = EVAL(obj);
-           COD = cod;
-           if (print) {
-               int i;
-
-               if (RETURN_COUNT >= 0)
-                   LispPrint(result, NIL, 1);
-               for (i = 0; i < RETURN_COUNT; i++)
-                   LispPrint(RETURN(i), NIL, 1);
-           }
-       }
-       if (lisp__data.eof)
-           break;
-    }
-    LispPopInput(stream);
-
-    /* Restore package environment */
-    PACKAGE = savepackage;
-    lisp__data.pack = savepack;
-
-    APPLY1(Oclose, stream);
-
-    return (T);
-}
-
-void
-LispGetStringArgs(LispBuiltin *builtin,
-                 char **string1, char **string2,
-                 long *start1, long *end1, long *start2, long *end2)
-{
-    long length1, length2;
-    LispObj *ostring1, *ostring2, *ostart1, *oend1, *ostart2, *oend2;
-
-    oend2 = ARGUMENT(5);
-    ostart2 = ARGUMENT(4);
-    oend1 = ARGUMENT(3);
-    ostart1 = ARGUMENT(2);
-    ostring2 = ARGUMENT(1);
-    ostring1 = ARGUMENT(0);
-
-    CHECK_STRING(ostring1);
-    *string1 = THESTR(ostring1);
-    length1 = STRLEN(ostring1);
-
-    CHECK_STRING(ostring2);
-    *string2 = THESTR(ostring2);
-    length2 = STRLEN(ostring2);
-
-    if (ostart1 == UNSPEC)
-       *start1 = 0;
-    else {
-       CHECK_INDEX(ostart1);
-       *start1 = FIXNUM_VALUE(ostart1);
-    }
-    if (oend1 == UNSPEC)
-       *end1 = length1;
-    else {
-       CHECK_INDEX(oend1);
-       *end1 = FIXNUM_VALUE(oend1);
-    }
-
-    if (ostart2 == UNSPEC)
-       *start2 = 0;
-    else {
-       CHECK_INDEX(ostart2);
-       *start2 = FIXNUM_VALUE(ostart2);
-    }
-
-    if (oend2 == UNSPEC)
-       *end2 = length2;
-    else {
-       CHECK_INDEX(oend2);
-       *end2 = FIXNUM_VALUE(oend2);
-    }
-
-    if (*start1 > *end1)
-       LispDestroy("%s: :START1 %ld larger than :END1 %ld",
-                   STRFUN(builtin), *start1, *end1);
-    if (*start2 > *end2)
-       LispDestroy("%s: :START2 %ld larger than :END2 %ld",
-                   STRFUN(builtin), *start2, *end2);
-    if (*end1 > length1)
-       LispDestroy("%s: :END1 %ld larger than string length %ld",
-                   STRFUN(builtin), *end1, length1);
-    if (*end2 > length2)
-       LispDestroy("%s: :END2 %ld larger than string length %ld",
-                   STRFUN(builtin), *end2, length2);
-}
-
-LispObj *
-LispPathnameField(int field, int string)
-{
-    int offset = field;
-    LispObj *pathname, *result, *object;
-
-    pathname = ARGUMENT(0);
-
-    if (!PATHNAMEP(pathname))
-       pathname = APPLY1(Oparse_namestring, pathname);
-
-    result = pathname->data.pathname;
-    while (offset) {
-       result = CDR(result);
-       --offset;
-    }
-    object = result;
-    result = CAR(result);
-
-    if (string) {
-       if (!STRINGP(result)) {
-           if (result == NIL)
-               result = STRING("");
-           else if (field == PATH_DIRECTORY) {
-               char *name = THESTR(CAR(pathname->data.pathname)), *ptr;
-
-               ptr = strrchr(name, PATH_SEP);
-               if (ptr) {
-                   int length = ptr - name + 1;
-                   char data[PATH_MAX];
-
-                   if (length > PATH_MAX - 1)
-                       length = PATH_MAX - 1;
-                   strncpy(data, name, length);
-                   data[length] = '\0';
-                   result = STRING(data);
-               }
-               else
-                   result = STRING("");
-           }
-           else
-               result = Kunspecific;
-       }
-       else if (field == PATH_NAME) {
-           object = CAR(CDR(object));
-           if (STRINGP(object)) {
-               int length;
-               char name[PATH_MAX + 1];
-
-               strcpy(name, THESTR(result));
-               length = STRLEN(result);
-               if (length + 1 < sizeof(name)) {
-                   name[length++] = PATH_TYPESEP;
-                   name[length] = '\0';
-               }
-               if (STRLEN(object) + length < sizeof(name))
-                   strcpy(name + length, THESTR(object));
-               /* else LispDestroy ... */
-               result = STRING(name);
-           }
-       }
-    }
-
-    return (result);
-}
-
-LispObj *
-LispProbeFile(LispBuiltin *builtin, int probe)
-{
-    GC_ENTER();
-    LispObj *result;
-    char *name = NULL, resolved[PATH_MAX + 1];
-    struct stat st;
-
-    LispObj *pathname;
-
-    pathname = ARGUMENT(0);
-
-    if (!POINTERP(pathname))
-       goto bad_pathname;
-
-    if (XSTRINGP(pathname))
-       name = THESTR(pathname);
-    else if (XPATHNAMEP(pathname))
-       name = THESTR(CAR(pathname->data.pathname));
-    else if (STREAMP(pathname) && pathname->data.stream.type == LispStreamFile)
-       name = THESTR(CAR(pathname->data.stream.pathname->data.pathname));
-
-#ifndef __UNIXOS2__
-    if (realpath(name, &resolved[0]) == NULL ||
-       stat(resolved, &st)) {
-#else
-    if ((name == NULL) || stat(resolved, &st)) {
-#endif
-       if (probe)
-           return (NIL);
-       LispDestroy("%s: realpath(\"%s\"): %s",
-                   STRFUN(builtin), name, strerror(errno));
-    }
-
-    if (S_ISDIR(st.st_mode)) {
-       int length = strlen(resolved);
-
-       if (!length || resolved[length - 1] != PATH_SEP) {
-           resolved[length++] = PATH_SEP;
-           resolved[length] = '\0';
-       }
-    }
-
-    result = STRING(resolved);
-    GC_PROTECT(result);
-    result = APPLY1(Oparse_namestring, result);
-    GC_LEAVE();
-
-    return (result);
-
-bad_pathname:
-    LispDestroy("%s: bad pathname %s", STRFUN(builtin), STROBJ(pathname));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-LispWriteString_(LispBuiltin *builtin, int newline)
-/*
- write-line string &optional output-stream &key start end
- write-string string &optional output-stream &key start end
- */
-{
-    char *text;
-    long start, end, length;
-
-    LispObj *string, *output_stream, *ostart, *oend;
-
-    oend = ARGUMENT(3);
-    ostart = ARGUMENT(2);
-    output_stream = ARGUMENT(1);
-    string = ARGUMENT(0);
-
-    CHECK_STRING(string);
-    LispCheckSequenceStartEnd(builtin, string, ostart, oend,
-                             &start, &end, &length);
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    text = THESTR(string);
-    if (end > start)
-       LispWriteStr(output_stream, text + start, end - start);
-    if (newline)
-       LispWriteChar(output_stream, '\n');
-
-    return (string);
-}
diff --git a/xedit/lisp/helper.h b/xedit/lisp/helper.h
deleted file mode 100644 (file)
index 797fa3b..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/helper.h,v 1.15tsi Exp $ */
-
-#ifndef Lisp_helper_h
-#define Lisp_helper_h
-
-#include "lisp/private.h"
-
-/*
- * Prototypes
- */
-void LispCheckSequenceStartEnd(LispBuiltin*, LispObj*,
-                              LispObj*, LispObj*, long*, long*, long*);
-long LispLength(LispObj*);
-LispObj *LispCharacterCoerce(LispBuiltin*, LispObj*);
-LispObj *LispStringCoerce(LispBuiltin*, LispObj*);
-LispObj *LispCoerce(LispBuiltin*, LispObj*, LispObj*);
-
-/*
- do init test &rest body
- do* init test &rest body
- */
-LispObj *LispDo(LispBuiltin*, int);
-
-/*
- dolist init &rest body
- dotimes init &rest body
- */
-LispObj *LispDoListTimes(LispBuiltin*, int);
-
-#define FEQ    1
-#define FEQL   2
-#define FEQUAL 3
-#define FEQUALP        4
-LispObj *LispObjectCompare(LispObj*, LispObj*, int);
-#define XEQ(x, y)      LispObjectCompare(x, y, FEQ)
-#define XEQL(x, y)     LispObjectCompare(x, y, FEQL)
-#define XEQUAL(x, y)   LispObjectCompare(x, y, FEQUAL)
-#define XEQUALP(x, y)  LispObjectCompare(x, y, FEQUALP)
-
-LispObj *LispLoadFile(LispObj*, int, int, int);
-
-/*
- string= string1 string2 &key start1 end1 start2 end2
- string< string1 string2 &key start1 end1 start2 end2
- string> string1 string2 &key start1 end1 start2 end2
- string<= string1 string2 &key start1 end1 start2 end2
- string>= string1 string2 &key start1 end1 start2 end2
- string/= string1 string2 &key start1 end1 start2 end2
- string-equal string1 string2 &key start1 end1 start2 end2
- string-lessp string1 string2 &key start1 end1 start2 end2
- string-greaterp string1 string2 &key start1 end1 start2 end2
- string-not-lessp string1 string2 &key start1 end1 start2 end2
- string-not-greaterp string1 string2 &key start1 end1 start2 end2
- string-not-equal string1 string2 &key start1 end1 start2 end2
-*/
-void LispGetStringArgs(LispBuiltin*,
-                       char**, /* string1 */
-                       char**, /* string2 */
-                       long*,  /* start1 */
-                       long*,  /* end1 */
-                       long*,  /* start2 */
-                       long*); /* end2 */
-
-/*
- pathname-host pathname
- pathname-device pathname
- pathname-directory pathname
- pathname-name pathname
- pathname-type pathname
- pathname-version pathname
- */
-LispObj *LispPathnameField(int, int);
-
-/*
- truename pathname
- probe-file pathname
- */
-LispObj *LispProbeFile(LispBuiltin*, int);
-
-/*
- write-string string &optional output-stream &key start end
- write-line string &optional output-stream &key start end
- */
-LispObj *LispWriteString_(LispBuiltin*, int);
-
-#endif /* Lisp_helper_h */
diff --git a/xedit/lisp/internal.h b/xedit/lisp/internal.h
deleted file mode 100644 (file)
index 2ca4991..0000000
+++ /dev/null
@@ -1,800 +0,0 @@
-/* $XdotOrg: xc/programs/xedit/lisp/internal.h,v 1.2 2004/04/23 19:54:44 eich Exp $ */
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/internal.h,v 1.50tsi Exp $ */
-
-#ifndef Lisp_internal_h
-#define Lisp_internal_h
-
-#include <stdio.h>
-#include "lisp/lisp.h"
-
-#include "mp.h"
-#include "re.h"
-
-#include "util.h"
-
-/*
- * Defines
- */
-typedef struct _LispMac LispMac;
-
-#define STREAM_READ            0x01
-#define STREAM_WRITE           0x02
-#define STREAM_BINARY          0x20
-
-#define RPLACA(cons, object)   (CAR(cons) = object)
-#define RPLACD(cons, object)   (CDR(cons) = object)
-
-#define        CAR(list)               ((list)->data.cons.car)
-#define        CAAR(list)              ((list)->data.cons.car->data.cons.car)
-#define        CADR(list)              ((list)->data.cons.cdr->data.cons.car)
-#define CDR(list)              ((list)->data.cons.cdr)
-#define CDAR(list)             ((list)->data.cons.car->data.cons.cdr)
-#define CDDR(list)             ((list)->data.cons.cdr->data.cons.cdr)
-#define CONS(car, cdr)         LispNewCons(car, cdr)
-#define EVAL(list)             LispEval(list)
-#define APPLY(fun, args)       LispFuncall(fun, args, 0)
-#define APPLY1(fun, arg)       LispApply1(fun, arg)
-#define APPLY2(fun, arg1, arg2)        LispApply2(fun, arg1, arg2)
-#define APPLY3(f, a1, a2, a3)  LispApply3(f, a1, a2, a3)
-#define EXECUTE(string)                LispExecute(string)
-#define SYMBOL(atom)           LispNewSymbol(atom)
-#define ATOM(string)           LispNewAtom(string, 1)
-#define UNINTERNED_ATOM(string)        LispNewAtom(string, 0)
-#define FUNCTION(symbol)       LispNewFunction(symbol)
-#define FUNCTION_QUOTE(symbol) LispNewFunctionQuote(symbol)
-
-       /* atom string is a static variable */
-#define ATOM2(string)          LispNewSymbol(LispGetPermAtom(string))
-
-       /* make a gc never released variable with a static string argument */
-#define STATIC_ATOM(string)    LispNewStaticAtom(string)
-
-#define STRING(str)            LispNewString(str, strlen(str), 0)
-#define LSTRING(str, size)     LispNewString(str, size, 0)
-
-       /* string must be from the LispXXX allocation functions,
-        * and LispMused not yet called on it */
-#define STRING2(str)           LispNewString(str, strlen(str), 1)
-#define LSTRING2(str, size)    LispNewString(str, size, 1)
-
-#define VECTOR(objects)                LispNewVector(objects)
-
-       /* STRINGSTREAM2 and LSTRINGSTREAM2 require that the
-        * string be allocated from the LispXXX allocation functions,
-        * and LispMused not yet called on it */
-#define STRINGSTREAM(str, flag)                        \
-       LispNewStringStream(str, flag, strlen(str), 0)
-#define STRINGSTREAM2(str, flag)               \
-       LispNewStringStream(str, flag, strlen(str), 1)
-#define LSTRINGSTREAM(str, flag, length)       \
-       LispNewStringStream(str, flag, length, 0)
-#define LSTRINGSTREAM2(str, flag, length)      \
-       LispNewStringStream(str, flag, length, 1)
-
-#define FILESTREAM(file, path, flag)   \
-       LispNewFileStream(file, path, flag)
-#define PIPESTREAM(file, path, flag)   \
-       LispNewPipeStream(file, path, flag)
-
-#define CHECKO(obj, typ)                                               \
-       ((obj)->type == LispOpaque_t &&                                 \
-        ((obj)->data.opaque.type == typ || (obj)->data.opaque.type == 0))
-#define PROTECT(key, list)     LispProtect(key, list)
-#define UPROTECT(key, list)    LispUProtect(key, list)
-
-/* create a new unique static atom string */
-#define GETATOMID(string)      LispGetAtomKey(string, 1)
-
-#define        GCDisable()             ++gcpro
-#define        GCEnable()              --gcpro
-
-
-/* pointer to something unique to all atoms with the same print representation */
-#define ATOMID(object)         (object)->data.atom->key
-
-
-
-#define NIL_BIT                        0x01
-#define FIXNUM_BIT             0x02
-#define FIXNUM_MASK            0x03
-#define SCHAR_BIT              0x04
-#define SCHAR_MASK             0x05
-#define BIT_COUNT              4
-#define BIT_MASK               0x0f
-#define POINTERP(object)                                               \
-    (((unsigned long)(object) & NIL_BIT) == 0)
-
-#define MOST_POSITIVE_FIXNUM   ((1L << (sizeof(long) * 8 - 5)) - 1)
-#define MOST_NEGATIVE_FIXNUM   (-1L << (sizeof(long) * 8 - 5))
-
-#define SCHAR(value)                                                   \
-    ((LispObj*)(((long)(value) << BIT_COUNT) | SCHAR_MASK))
-#define SCHAR_VALUE(object)    FIXNUM_VALUE(object)
-#define SCHARP(object)                                                 \
-    (((unsigned long)(object) & BIT_MASK) == SCHAR_MASK)
-#define CHECK_SCHAR(object)                                            \
-    if (!SCHARP(object))                                               \
-       LispDestroy("%s: %s is not a character",                        \
-                   STRFUN(builtin), STROBJ(object))
-
-#define XOBJECT_TYPE(object)   ((object)->type)
-#define OBJECT_TYPE(object)    (POINTERP(object) ?                     \
-                               XOBJECT_TYPE(object) :                  \
-                               (LispType)((long)(object) & BIT_MASK))
-
-
-#define NIL                    (LispObj*)0x00000001
-#define T                      (LispObj*)0x00000011
-#define DOT                    (LispObj*)0x00000021
-/* unmatched ')' */
-#define        EOLIST                  (LispObj*)0x00000031
-#define READLABEL_MASK         0x00000041
-/* unspecified argument */
-#define UNSPEC                 (LispObj*)0x00000051
-#define INVALIDP(object)                                               \
-    ((object) == NULL || (object) == EOLIST || (object) == DOT)
-
-
-/* cons */
-#define XCONSP(object)         ((object)->type == LispCons_t)
-#define CONSP(object)          (POINTERP(object) && XCONSP(object))
-#define CHECK_CONS(object)                                             \
-    if (!CONSP(object))                                                        \
-       LispDestroy("%s: %s is not of type cons",                       \
-                   STRFUN(builtin), STROBJ(object))
-#define LISTP(object)          (object == NIL || CONSP(object))
-#define CHECK_LIST(object)                                             \
-    if (!LISTP(object))                                                        \
-       LispDestroy("%s: %s is not a list",                             \
-                   STRFUN(builtin), STROBJ(object))
-
-/* fixnum */
-#define FIXNUM(value)                                                  \
-    ((LispObj*)(((long)(value) << BIT_COUNT) | FIXNUM_MASK))
-#define FIXNUM_VALUE(object)   ((long)(object) >> BIT_COUNT)
-#define FIXNUMP(object)                                                        \
-    (((unsigned long)(object) & BIT_MASK) == FIXNUM_MASK)
-#define CHECK_FIXNUM(object)                                           \
-    if (!FIXNUMP(object))                                              \
-       LispDestroy("%s: %s is not a fixnum",                           \
-                   STRFUN(builtin), STROBJ(object))
-#define INDEXP(object)                                                 \
-    (FIXNUMP(object) && FIXNUM_VALUE(object) >= 0)
-#define CHECK_INDEX(object)                                            \
-    if (!INDEXP(object))                                               \
-       LispDestroy("%s: %s is not a positive fixnum",                  \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* long int integer */
-#define XINTP(object)          ((object)->type == LispInteger_t)
-#define INTP(objet)            (POINTERP(object) && XINTP(object))
-#define INT_VALUE(object)      (object)->data.integer
-
-
-/* values that fit in a machine long int but not in a fixnum */
-#define LONGINTP(object)                                               \
-    (POINTERP(object) ? XINTP(object) : FIXNUMP(object))
-#define LONGINT_VALUE(object)                                          \
-    (POINTERP(object) ? INT_VALUE(object) : FIXNUM_VALUE(object))
-#define CHECK_LONGINT(object)                                          \
-    if (!LONGINTP(object))                                             \
-       LispDestroy("%s: %s is not an integer",                         \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* bignum */
-#define XBIGNUMP(object)       ((object)->type == LispBignum_t)
-#define BIGNUMP(object)                (POINTERP(object) && XBIGNUMP(object))
-#define BIGNUM(object)         LispNewBignum(object)
-
-
-/* generic integer */
-#define INTEGER(integer)       LispNewInteger(integer)
-#define INTEGERP(object)                                               \
-    (POINTERP(object) ? XINTP(object) || XBIGNUMP(object) : FIXNUMP(object))
-#define CHECK_INTEGER(object)                                          \
-    if (!INTEGERP(object))                                             \
-       LispDestroy("%s: %s is not an integer",                         \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* ratio */
-#define XRATIOP(object)                ((object)->type == LispRatio_t)
-#define RATIOP(object)         (POINTERP(object) && XRATIOP(object))
-#define RATIO(num, den)                LispNewRatio(num, den)
-
-
-/* bigratio */
-#define XBIGRATIOP(object)     ((object)->type == LispBigratio_t)
-#define BIGRATIOP(object)      (POINTERP(object) && XBIGRATIOP(object))
-#define BIGRATIO(ratio)                LispNewBigratio(ratio)
-
-
-/* generic rational */
-#define RATIONALP(object)                                              \
-    (POINTERP(object) ? XINTP(object) || XRATIOP(object) ||            \
-                       XBIGNUMP(object) || XBIGRATIOP(object) :        \
-                       FIXNUMP(object))
-
-
-/* double float */
-#define XDFLOATP(object)       ((object)->type == LispDFloat_t)
-#define DFLOATP(object)                (POINTERP(object) && XDFLOATP(object))
-#define DFLOAT_VALUE(object)   (object)->data.dfloat
-#define CHECK_DFLOAT(object)                                           \
-    if (!DFLOATP(object))                                              \
-       LispDestroy("%s: %s is not a float number",                     \
-                   STRFUN(builtin), STROBJ(object))
-#define DFLOAT(value)          LispNewDFloat(value)
-
-
-/* generic float - currently only double float supported */
-#define FLOATP(object)         DFLOATP(object)
-
-
-/* real number */
-#define REALP(object)                                                  \
-    (POINTERP(object) ? XINTP(object) || XDFLOATP(object) ||           \
-                       XRATIOP(object) || XBIGNUMP(object) ||          \
-                       XBIGRATIOP(object) :                            \
-                       FIXNUMP(object))
-#define CHECK_REAL(object)                                             \
-    if (!REALP(object))                                                        \
-       LispDestroy("%s: %s is not a real number",                      \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* complex */
-#define XCOMPLEXP(object)      ((object)->type == LispComplex_t)
-#define COMPLEXP(object)       (POINTERP(object) && XCOMPLEXP(object))
-#define COMPLEX(real, imag)    LispNewComplex(real, imag)
-
-
-/* generic number */
-#define NUMBERP(object)                                                        \
-    (POINTERP(object) ? XINTP(object) || XDFLOATP(object) ||           \
-                       XRATIOP(object) || XBIGNUMP(object) ||          \
-                       XBIGRATIOP(object) || XCOMPLEXP(object) :       \
-                       FIXNUMP(object))
-#define CHECK_NUMBER(object)                                           \
-    if (!NUMBERP(object))                                              \
-       LispDestroy("%s: %s is not a number",                           \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* symbol */
-#define XSYMBOLP(object)       ((object)->type == LispAtom_t)
-#define SYMBOLP(object)                (POINTERP(object) && XSYMBOLP(object))
-#define CHECK_SYMBOL(object)                                           \
-    if (!SYMBOLP(object))                                              \
-       LispDestroy("%s: %s is not a symbol",                           \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* keyword */
-#define XKEYWORDP(object)                                              \
-    ((object)->data.atom->package == lisp__data.keyword)
-#define KEYWORDP(object)                                               \
-    (POINTERP(object) && XSYMBOLP(object) && XKEYWORDP(object))
-#define KEYWORD(string)                LispNewKeyword(string)
-#define CHECK_KEYWORD(object)                                          \
-    if (!KEYWORDP(object))                                             \
-       LispDestroy("%s: %s is not a keyword",                          \
-                   STRFUN(builtin), STROBJ(object))
-#define CHECK_CONSTANT(object)                                         \
-    if ((object)->data.atom->constant)                                 \
-       LispDestroy("%s: %s is a constant",                             \
-                   STRFUN(builtin), STROBJ(object))
-
-#define SETVALUE(atom, object) ((atom)->property->value = object)
-
-
-/* function */
-#define XFUNCTIONP(object)     ((object)->type == LispFunction_t)
-#define FUNCTIONP(object)      (POINTERP(object) && XFUNCTIONP(object))
-
-
-/* lambda */
-#define XLAMBDAP(object)       ((object)->type == LispLambda_t)
-#define LAMBDAP(object)                (POINTERP(object) && XLAMBDAP(object))
-
-
-/* string - currently only simple 8 bit characters */
-#define XSTRINGP(object)       ((object)->type == LispString_t)
-#define STRINGP(object)                (POINTERP(object) && XSTRINGP(object))
-#define THESTR(object)         (object)->data.string.string
-#define STRLEN(object)         (object)->data.string.length
-#define CHECK_STRING(object)                                           \
-    if (!STRINGP(object))                                              \
-       LispDestroy("%s: %s is not a string",                           \
-                   STRFUN(builtin), STROBJ(object))
-#define CHECK_STRING_WRITABLE(object)                                  \
-    if (!object->data.string.writable)                                 \
-       LispDestroy("%s: %s is readonly",                               \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* array/vector */
-#define XARRAYP(object)                ((object)->type == LispArray_t)
-#define ARRAYP(object)         (POINTERP(object) && XARRAYP(object))
-#define CHECK_ARRAY(object)                                            \
-    if (!ARRAYP(object))                                               \
-       LispDestroy("%s: %s is not an array",                           \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* quote */
-#define XQUOTEP(object)                ((object)->type == LispQuote_t)
-#define QUOTEP(object)         (POINTERP(object) && XQUOTEP(object))
-#define QUOTE(object)          LispNewQuote(object)
-
-#define XBACKQUOTEP(object)    ((object)->type == LispBackquote_t)
-#define BACKQUOTEP(object)     (POINTERP(object) && XBACKQUOTEP(object))
-#define BACKQUOTE(object)      LispNewBackquote(object)
-
-#define XCOMMAP(object)                ((object)->type == LispComma_t)
-#define COMMAP(object)         (POINTERP(object) && XCOMMAP(object))
-#define COMMA(object, at)      LispNewComma(object, at)
-
-
-/* package */
-#define XPACKAGEP(object)      ((object)->type == LispPackage_t)
-#define PACKAGEP(object)       (POINTERP(object) && XPACKAGEP(object))
-
-
-/* pathname */
-#define XPATHNAMEP(object)     ((object)->type == LispPathname_t)
-#define PATHNAMEP(object)      (POINTERP(object) && XPATHNAMEP(object))
-#define PATHNAME(object)       LispNewPathname(object)
-#define CHECK_PATHNAME(object)                                         \
-    if (!PATHNAMEP(object))                                            \
-       LispDestroy("%s: %s is not a pathname",                         \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* stream */
-#define XSTREAMP(object)       ((object)->type == LispStream_t)
-#define STREAMP(object)                (POINTERP(object) && XSTREAMP(object))
-#define CHECK_STREAM(object)                                           \
-    if (!STREAMP(object))                                              \
-       LispDestroy("%s: %s is not a stream",                           \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* hastable */
-#define XHASHTABLEP(object)    ((object)->type == LispHashTable_t)
-#define HASHTABLEP(object)     (POINTERP(object) && XHASHTABLEP(object))
-#define CHECK_HASHTABLE(object)                                                \
-    if (!HASHTABLEP(object))                                           \
-       LispDestroy("%s: %s is not a hash-table",                       \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* regex */
-#define XREGEXP(object)                ((object)->type == LispRegex_t)
-#define REGEXP(object)         (POINTERP(object) && XREGEXP(object))
-#define CHECK_REGEX(object)                                            \
-    if (!REGEXP(object))                                               \
-       LispDestroy("%s: %s is not a regexp",                           \
-                   STRFUN(builtin), STROBJ(object))
-
-
-/* bytecode */
-#define XBYTECODEP(object)     ((object)->type == LispBytecode_t)
-#define BYTECODEP(object)      (POINTERP(object) && XBYTECODEP(object))
-
-
-/* opaque */
-#define XOPAQUEP(object)       ((object)->type == LispOpaque_t)
-#define OPAQUEP(object)                (POINTERP(object) && XOPAQUEP(object))
-#define OPAQUE(data, type)     LispNewOpaque((void*)((long)data), type)
-
-
-
-#define SSTREAMP(str)          ((str)->data.stream.source.string)
-
-#define FSTREAMP(str)          ((str)->data.stream.source.file)
-
-#define PSTREAMP(str)          ((str)->data.stream.source.program)
-#define PIDPSTREAMP(str)       ((str)->data.stream.source.program->pid)
-#define IPSTREAMP(str)         ((str)->data.stream.source.program->input)
-#define OPSTREAMP(str)         ((str)->data.stream.source.program->output)
-#define EPSTREAMP(str)         \
-       FSTREAMP((str)->data.stream.source.program->errorp)
-
-#define LispFileno(file)       ((file)->descriptor)
-
-#define STRFUN(builtin)                ATOMID(builtin->symbol)->value
-#define STROBJ(obj)            LispStrObj(obj)
-
-/* fetch builtin function/macro argument value
- */
-#define ARGUMENT(index)                                                        \
-       lisp__data.stack.values[lisp__data.stack.base + (index)]
-
-#define RETURN(index)  lisp__data.returns.values[(index)]
-#define RETURN_COUNT   lisp__data.returns.count
-#define RETURN_CHECK(value)                                            \
-    value < MULTIPLE_VALUES_LIMIT ?                                    \
-       value : MULTIPLE_VALUES_LIMIT
-
-#define GC_ENTER()             int gc__protect = lisp__data.protect.length
-
-#define GC_PROTECT(object)                                             \
-    if (lisp__data.protect.length >= lisp__data.protect.space)         \
-       LispMoreProtects();                                             \
-    lisp__data.protect.objects[lisp__data.protect.length++] = object
-
-#define GC_LEAVE()             lisp__data.protect.length = gc__protect
-
-
-#define ERROR_CHECK_SPECIAL_FORM(atom)                                 \
-    if ((atom)->property->fun.builtin->compile)                                \
-       LispDestroy("%s: the special form %s cannot be redefined",      \
-                   STRFUN(builtin), (atom)->key->value)
-
-
-
-#define CONSTANTP(object)                                              \
-    (!POINTERP(object) ||                                              \
-     XOBJECT_TYPE(object) < LispAtom_t ||                              \
-     (XSYMBOLP(object) && XKEYWORDP(object)))
-
-/* slightly faster test, since keywords are very uncommon as eval arguments */
-#define NCONSTANTP(object)                                             \
-    (OBJECT_TYPE(object) >= LispAtom_t)
-
-
-/*
- * Types
- */
-typedef struct _LispObj LispObj;
-typedef struct _LispAtom LispAtom;
-typedef struct _LispBuiltin LispBuiltin;
-typedef struct _LispModuleData LispModuleData;
-typedef struct _LispFile LispFile;
-typedef struct _LispString LispString;
-typedef struct _LispPackage LispPackage;
-typedef struct _LispBytecode LispBytecode;
-typedef struct _LispHashTable LispHashTable;
-
-/* Bytecode compiler data */
-typedef struct _LispCom LispCom;
-
-typedef hash_key *Atom_id;
-
-typedef enum _LispType {
-    /* objects encoded in the LispObj pointer */
-    LispNil_t = 1,
-    LispFixnum_t = 3,
-    LispSChar_t = 5,
-
-    /* objects that have a structure */
-    LispInteger_t = 16,
-    LispDFloat_t,
-    LispString_t,
-    LispRatio_t,
-    LispOpaque_t,
-
-    /* simple access for marking */
-    LispBignum_t,
-    LispBigratio_t,
-
-    LispAtom_t,
-    LispFunction_t,
-    LispFunctionQuote_t,
-
-    LispLambda_t,
-
-    LispComplex_t,
-    LispCons_t,
-    LispQuote_t,
-    LispArray_t,
-    LispStruct_t,
-    LispStream_t,
-    LispBackquote_t,
-    LispComma_t,
-    LispPathname_t,
-    LispPackage_t,
-    LispRegex_t,
-    LispBytecode_t,
-    LispHashTable_t
-} LispType;
-
-typedef enum _LispFunType {
-    LispLambda,
-    LispFunction,
-    LispMacro,
-    LispSetf
-} LispFunType;
-
-typedef enum _LispStreamType {
-    LispStreamString,
-    LispStreamFile,
-    LispStreamStandard,
-    LispStreamPipe
-} LispStreamType;
-
-typedef struct {
-    int pid;                   /* process id of program */
-    LispFile *input;           /* if READABLE: stdout of program */
-    LispFile *output;          /* if WRITABLE: stdin of program */
-    LispObj *errorp;           /* ALWAYS (ONLY) READABLE: stderr of program */
-} LispPipe;
-
-/* silly IBM compiler */
-#ifdef AIXV5 /* probably want !gcc too */
-#define LispType int
-#define LispFunType int
-#define LispStreamType int
-#endif
-
-struct _LispObj {
-    LispType type : 6;
-    unsigned int mark : 1;     /* gc protected */
-    unsigned int prot: 1;      /* protection for constant/unamed variables */
-    LispFunType funtype : 4;   /* this is subject to change in the future */
-    union {
-       LispAtom *atom;
-       struct {
-           char *string;
-           long length;
-           unsigned int writable : 1;
-       } string;
-       long integer;
-       double dfloat;
-       LispObj *quote;
-       LispObj *pathname;      /* don't use quote generic name,
-                                * to avoid confusing code */
-       struct {
-           long numerator;
-           long denominator;
-       } ratio;
-       union {
-           mpi *integer;
-           mpr *ratio;
-       } mp;
-       struct {
-           LispObj *real;
-           LispObj *imag;
-       } complex;
-       struct {
-           LispObj *car;
-           LispObj *cdr;
-       } cons;
-       struct {
-           LispObj *name;
-           LispObj *code;
-           LispObj *data;              /* extra data to protect */
-       } lambda;
-       struct {
-           LispObj *list;              /* stored as a linear list */
-           LispObj *dim;               /* dimensions of array */
-           unsigned int rank : 8;      /* i.e. array-rank-limit => 256 */
-           unsigned int type : 7;      /* converted to LispType, if not
-                                        * Lisp_Nil_t only accepts given
-                                        * type in array fields */
-           unsigned int zero : 1;      /* at least one of the dimensions
-                                        * is zero */
-       } array;
-       struct {
-           LispObj *fields;    /* structure fields */
-           LispObj *def;       /* structure definition */
-       } struc;
-       struct {
-           union {
-               LispFile *file;
-               LispPipe *program;
-               LispString *string;
-           } source;
-           LispObj *pathname;
-           LispStreamType type : 6;
-           unsigned int readable : 1;
-           unsigned int writable : 1;
-       } stream;
-       struct {
-           void *data;
-           int type;
-       } opaque;
-       struct {
-           LispObj *eval;
-           int atlist;
-       } comma;
-       struct {
-           LispObj *name;
-           LispObj *nicknames;
-           LispPackage *package;
-       } package;
-       struct {
-           re_cod *regex;
-           LispObj *pattern;           /* regex string */
-           int options;                /* regex compile flags */
-       } regex;
-       struct {
-           LispBytecode *bytecode;
-           LispObj *code;              /* object used to generate bytecode */
-           LispObj *name;              /* name of function, or NIL */
-       } bytecode;
-       struct {
-           LispHashTable *table;
-           LispObj *test;
-       } hash;
-    } data;
-};
-#ifdef AIXV5
-#undef LispType
-#undef LispFunType
-#undef LispStreamType
-#endif
-
-typedef        LispObj *(*LispFunPtr)(LispBuiltin*);
-typedef void (*LispComPtr)(LispCom*, LispBuiltin*);
-
-struct _LispBuiltin {
-    /* these fields must be set */
-    LispFunType type;
-    LispFunPtr function;
-    char *declaration;
-
-    /* this field is optional, set if the function returns multiple values */
-    int multiple_values;
-
-    /* this field is also optional, set if the function should not be exported */
-    int internal;
-
-    /* this optional field points to a function of the bytecode compiler */
-    LispComPtr compile;
-
-    /* this field is set at runtime */
-    LispObj *symbol;
-};
-
-typedef int (*LispLoadModule)(void);
-typedef int (*LispUnloadModule)(void);
-
-#define LISP_MODULE_VERSION            1
-struct _LispModuleData {
-    int version;
-    LispLoadModule load;
-    LispUnloadModule unload;
-};
-
-/*
- * Prototypes
- */
-LispObj *LispEval(LispObj*);
-LispObj *LispFuncall(LispObj*, LispObj*, int);
-LispObj *LispApply1(LispObj*, LispObj*);
-LispObj *LispApply2(LispObj*, LispObj*, LispObj*);
-LispObj *LispApply3(LispObj*, LispObj*, LispObj*, LispObj*);
-
-LispObj *LispNew(LispObj*, LispObj*);
-LispObj *LispNewSymbol(LispAtom*);
-LispObj *LispNewAtom(char*, int);
-LispObj *LispNewFunction(LispObj*);
-LispObj *LispNewFunctionQuote(LispObj*);
-LispObj *LispNewStaticAtom(char*);
-LispObj *LispNewDFloat(double);
-LispObj *LispNewString(char*, long, int);
-LispObj *LispNewInteger(long);
-LispObj *LispNewRatio(long, long);
-LispObj *LispNewVector(LispObj*);
-LispObj *LispNewQuote(LispObj*);
-LispObj *LispNewBackquote(LispObj*);
-LispObj *LispNewComma(LispObj*, int);
-LispObj *LispNewCons(LispObj*, LispObj*);
-LispObj *LispNewLambda(LispObj*, LispObj*, LispObj*, LispFunType);
-LispObj *LispNewStruct(LispObj*, LispObj*);
-LispObj *LispNewComplex(LispObj*, LispObj*);
-LispObj *LispNewOpaque(void*, int);
-LispObj *LispNewKeyword(char*);
-LispObj *LispNewPathname(LispObj*);
-LispObj *LispNewStringStream(char*, int, long, int);
-LispObj *LispNewFileStream(LispFile*, LispObj*, int);
-LispObj *LispNewPipeStream(LispPipe*, LispObj*, int);
-LispObj *LispNewBignum(mpi*);
-LispObj *LispNewBigratio(mpr*);
-
-LispAtom *LispGetAtom(char*);
-
-/* This function does not allocate a copy of it's argument, but the argument
- * itself. The argument string should never change. */
-LispAtom *LispGetPermAtom(char*);
-
-void *LispMalloc(size_t);
-void *LispCalloc(size_t, size_t);
-void *LispRealloc(void*, size_t);
-char *LispStrdup(char*);
-void LispFree(void*);
-/* LispMused means memory is now safe from LispDestroy, and should not be
- * freed in case of an error */
-void LispMused(void*);
-
-void LispGC(LispObj*, LispObj*);
-
-char *LispStrObj(LispObj*);
-
-#ifdef __GNUC__
-#define PRINTF_FORMAT  __attribute__ ((format (printf, 1, 2)))
-#else
-#define PRINTF_FORMAT  /**/
-#endif
-void LispDestroy(char *fmt, ...) PRINTF_FORMAT;
-       /* continuable error */
-void LispContinuable(char *fmt, ...) PRINTF_FORMAT;
-void LispMessage(char *fmt, ...) PRINTF_FORMAT;
-void LispWarning(char *fmt, ...) PRINTF_FORMAT;
-#undef PRINTF_FORMAT
-
-LispObj *LispSetVariable(LispObj*, LispObj*, char*, int);
-
-int LispRegisterOpaqueType(char*);
-
-int LispPrintString(LispObj*, char*);
-
-void LispProtect(LispObj*, LispObj*);
-void LispUProtect(LispObj*, LispObj*);
-
-/* this function should be called when a module is loaded, and is called
- * when loading the interpreter */
-void LispAddBuiltinFunction(LispBuiltin*);
-
-/*
- * Initialization
- */
-extern LispObj *UNBOUND;
-extern int gcpro;
-
-extern LispObj *Okey, *Orest, *Ooptional, *Oaux, *Olambda;
-extern Atom_id Snil, St, Skey, Srest, Soptional, Saux;
-extern Atom_id Sand, Sor, Snot;
-extern Atom_id Satom, Ssymbol, Sinteger, Scharacter, Sstring, Slist,
-              Scons, Svector, Sarray, Sstruct, Skeyword, Sfunction, Spathname,
-              Srational, Sfloat, Scomplex, Sopaque, Sdefault;
-
-extern LispObj *Ocomplex, *Oformat, *Kunspecific;
-
-extern LispObj *Omake_array, *Kinitial_contents, *Osetf;
-extern Atom_id Svariable, Sstructure, Stype, Ssetf;
-
-extern Atom_id Smake_struct, Sstruct_access, Sstruct_store, Sstruct_type;
-extern LispObj *Omake_struct, *Ostruct_access, *Ostruct_store, *Ostruct_type;
-
-extern LispObj *Oparse_namestring, *Kerror, *Kabsolute, *Krelative, *Oopen,
-              *Oclose, *Kif_does_not_exist;
-
-extern LispObj *Oequal_;
-
-extern LispFile *Stdout, *Stdin, *Stderr;
-
-#endif /* Lisp_internal_h */
diff --git a/xedit/lisp/io.c b/xedit/lisp/io.c
deleted file mode 100644 (file)
index 3a33855..0000000
+++ /dev/null
@@ -1,717 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/io.c,v 1.16tsi Exp $ */
-
-#include "lisp/io.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* Match the FILE_XXX flags */
-#define READ_BIT       0x01
-#define WRITE_BIT      0x02
-#define APPEND_BIT     0x04
-#define BUFFERED_BIT   0x08
-#define UNBUFFERED_BIT 0x10
-#define BINARY_BIT     0x20
-
-/*
- * Prototypes
- */
-static int calculate_line(void*, int);
-static int calculate_column(void*, int, int);
-
-/*
- * Initialization
- */
-extern int pagesize;
-
-/*
- * Implementation
- */
-int
-LispGet(void)
-{
-    int ch = EOF;
-    LispUngetInfo *unget = lisp__data.unget[lisp__data.iunget];
-
-    if (unget->offset)
-       ch = ((unsigned char*)unget->buffer)[--unget->offset];
-    else if (SINPUT->data.stream.readable) {
-       LispFile *file = NULL;
-
-       switch (SINPUT->data.stream.type) {
-           case LispStreamStandard:
-           case LispStreamFile:
-               file = FSTREAMP(SINPUT);
-               break;
-           case LispStreamPipe:
-               file = IPSTREAMP(SINPUT);
-               break;
-           case LispStreamString:
-               ch = LispSgetc(SSTREAMP(SINPUT));
-               break;
-           default:
-               ch = EOF;
-               break;
-       }
-       if (file != NULL) {
-           if (file->nonblock) {
-               if (fcntl(file->descriptor, F_SETFL, 0) < 0)
-                   LispDestroy("fcntl: %s", strerror(errno));
-               file->nonblock = 0;
-           }
-           ch = LispFgetc(file);
-       }
-    }
-    else
-       LispDestroy("cannot read from *STANDARD-INPUT*");
-
-    if (ch == EOF)
-       lisp__data.eof = 1;
-
-    return (ch);
-}
-
-int
-LispUnget(int ch)
-{
-    LispUngetInfo *unget = lisp__data.unget[lisp__data.iunget];
-
-    if (unget->offset == sizeof(unget->buffer)) {
-       LispWarning("character %c lost at LispUnget()", unget->buffer[0]);
-       memmove(unget->buffer, unget->buffer + 1, unget->offset - 1);
-       unget->buffer[unget->offset - 1] = ch;
-    }
-    else
-       unget->buffer[unget->offset++] = ch;
-
-    return (ch);
-}
-
-void
-LispPushInput(LispObj *stream)
-{
-    if (!STREAMP(stream) || !stream->data.stream.readable)
-       LispDestroy("bad stream at PUSH-INPUT");
-    lisp__data.input_list = CONS(stream, lisp__data.input_list);
-    SINPUT = stream;
-    if (lisp__data.iunget + 1 == lisp__data.nunget) {
-       LispUngetInfo **info =
-           realloc(lisp__data.unget,
-                   sizeof(LispUngetInfo) * (lisp__data.nunget + 1));
-
-       if (!info ||
-           (info[lisp__data.nunget] =
-            calloc(1, sizeof(LispUngetInfo))) == NULL)
-           LispDestroy("out of memory");
-       lisp__data.unget = info;
-       ++lisp__data.nunget;
-    }
-    ++lisp__data.iunget;
-    memset(lisp__data.unget[lisp__data.iunget], '\0', sizeof(LispUngetInfo));
-    lisp__data.eof = 0;
-}
-
-void
-LispPopInput(LispObj *stream)
-{
-    if (!CONSP(lisp__data.input_list) || stream != CAR(lisp__data.input_list))
-       LispDestroy("bad stream at POP-INPUT");
-    lisp__data.input_list = CDR(lisp__data.input_list);
-    SINPUT = CONSP(lisp__data.input_list) ?
-    CAR(lisp__data.input_list) : lisp__data.input_list;
-    --lisp__data.iunget;
-    lisp__data.eof = 0;
-}
-
-/*
- * Low level functions
- */
-static int
-calculate_line(void *data, int size)
-{
-    int line = 0;
-    char *str, *ptr;
-
-    for (str = (char*)data, ptr = (char*)data + size; str < ptr; str++)
-       if (*ptr == '\n')
-           ++line;
-
-    return (line);
-}
-
-static int
-calculate_column(void *data, int size, int column)
-{
-    char *str, *ptr;
-
-    /* search for newline in data */
-    for (str = (char*)data, ptr = (char*)data + size - 1; ptr >= str; ptr--)
-       if (*ptr == '\n')
-           break;
-
-    /* newline found */
-    if (ptr >= str)
-       return (size - (ptr - str) - 1);
-
-    /* newline not found */
-    return (column + size);
-}
-
-LispFile *
-LispFdopen(int descriptor, int mode)
-{
-    LispFile *file = calloc(1, sizeof(LispFile));
-
-    if (file) {
-       struct stat st;
-
-       file->descriptor = descriptor;
-       file->readable = (mode & READ_BIT) != 0;
-       file->writable = (mode & WRITE_BIT) != 0;
-
-       if (fstat(descriptor, &st) == 0)
-           file->regular = S_ISREG(st.st_mode);
-       else
-           file->regular = 0;
-
-       file->buffered = (mode & BUFFERED_BIT) != 0;
-       if ((mode & UNBUFFERED_BIT) == 0)
-           file->buffered = file->regular;
-
-       if (file->buffered) {
-           file->buffer = malloc(pagesize);
-           if (file->buffer == NULL)
-               file->buffered = 0;
-       }
-       file->line = 1;
-       file->binary = (mode & BINARY_BIT) != 0;
-       file->io_write = write;
-    }
-
-    return (file);
-}
-
-LispFile *
-LispFopen(char *path, int mode)
-{
-    LispFile *file;
-    int descriptor;
-    int flags = O_NOCTTY;
-
-    /* check read/write attributes */
-    if ((mode & (READ_BIT | WRITE_BIT)) == (READ_BIT | WRITE_BIT))
-       flags |= O_RDWR;
-    else if (mode & READ_BIT)
-       flags |= O_RDONLY;
-    else if (mode & WRITE_BIT)
-       flags |= O_WRONLY;
-
-    /* create if does not exist */
-    if (mode & WRITE_BIT) {
-       flags |= O_CREAT;
-
-       /* append if exists? */
-       if (mode & APPEND_BIT)
-           flags |= O_APPEND;
-       else
-           flags |= O_TRUNC;
-    }
-
-    /* open file */
-    descriptor = open(path, flags, 0666);
-    if (descriptor < 0)
-       return (NULL);
-
-    /* initialize LispFile structure */
-    file = LispFdopen(descriptor, mode);
-    if (file == NULL)
-       close(descriptor);
-
-    return (file);
-}
-
-void
-LispFclose(LispFile *file)
-{
-    /* flush any pending output */
-    LispFflush(file);
-    /* cleanup */
-    close(file->descriptor);
-    if (file->buffer)
-       free(file->buffer);
-    free(file);
-}
-
-io_write_fn
-LispSetFileWrite(LispFile *file, io_write_fn new_write)
-{
-    io_write_fn old_write = file->io_write;
-
-    file->io_write = new_write;
-
-    return (old_write);
-}
-
-int
-LispFflush(LispFile *file)
-{
-    if (file->writable && file->length) {
-       int length = (*file->io_write)(file->descriptor,
-                                      file->buffer, file->length);
-
-       if (length > 0) {
-           if (file->length > length)
-               memmove(file->buffer, file->buffer + length,
-                       file->length - length);
-           file->length -= length;
-       }
-       return (length);
-    }
-
-    return (0);
-}
-
-int
-LispFungetc(LispFile *file, int ch)
-{
-    if (file->readable) {
-       file->available = 1;
-       file->unget = ch;
-       /* this should never happen */
-       if (ch == '\n' && !file->binary)
-           --file->line;
-    }
-
-    return (ch);
-}
-
-int
-LispFgetc(LispFile *file)
-{
-    int ch;
-
-    if (file->readable) {
-       unsigned char c;
-
-       if (file->available) {
-           ch = file->unget;
-           file->available = 0;
-       }
-       else if (file->buffered) {
-           if (file->writable) {
-               LispFflush(file);
-               if (read(file->descriptor, &c, 1) == 1)
-                   ch = c;
-               else
-                   ch = EOF;
-           }
-           else {
-               if (file->offset < file->length)
-                   ch = ((unsigned char*)file->buffer)[file->offset++];
-               else {
-                   int length = read(file->descriptor,
-                                     file->buffer, pagesize);
-
-                   if (length >= 0)
-                       file->length = length;
-                   else
-                       file->length = 0;
-                   file->offset = 0;
-                   if (file->length)
-                       ch = ((unsigned char*)file->buffer)[file->offset++];
-                   else
-                       ch = EOF;
-               }
-           }
-       }
-       else if (read(file->descriptor, &c, 1) == 1)
-           ch = c;
-       else
-           ch = EOF;
-    }
-    else
-       ch = EOF;
-
-    if (ch == '\n' && !file->binary)
-       ++file->line;
-
-    return (ch);
-}
-
-int
-LispFputc(LispFile *file, int ch)
-{
-    if (file->writable) {
-       unsigned char c = ch;
-
-       if (file->buffered) {
-           if (file->length + 1 >= pagesize)
-               LispFflush(file);
-           file->buffer[file->length++] = c;
-       }
-       else if ((*file->io_write)(file->descriptor, &c, 1) != 1)
-           ch = EOF;
-
-       if (!file->binary) {
-           /* update column number */
-           if (ch == '\n')
-               file->column = 0;
-           else
-               ++file->column;
-       }
-    }
-
-    return (ch);
-}
-
-int
-LispSgetc(LispString *string)
-{
-    int ch;
-
-    if (string->input >= string->length)
-       return (EOF);                   /* EOF reading from string */
-
-    ch = ((unsigned char*)string->string)[string->input++];
-    if (ch == '\n' && !string->binary)
-       ++string->line;
-
-    return (ch);
-}
-
-int
-LispSputc(LispString *string, int ch)
-{
-    if (string->output + 1 >= string->space) {
-       if (string->fixed)
-           return (EOF);
-       else {
-           char *tmp = realloc(string->string, string->space + pagesize);
-
-           if (tmp == NULL)
-               return (EOF);
-           string->string = tmp;
-           string->space += pagesize;
-       }
-    }
-
-    string->string[string->output++] = ch;
-    if (string->length < string->output)
-       string->length = string->output;
-
-    /* update column number */
-    if (!string->binary) {
-       if (ch == '\n')
-           string->column = 0;
-       else
-           ++string->column;
-    }
-
-    return (ch);
-}
-
-char *
-LispFgets(LispFile *file, char *string, int size)
-{
-    int ch, offset = 0;
-
-    if (size < 1)
-       return (string);
-
-    for (;;) {
-       if (offset + 1 >= size)
-           break;
-       if ((ch = LispFgetc(file)) == EOF)
-           break;
-       string[offset++] = ch;
-       /* line number is calculated in LispFgetc */
-       if (ch == '\n')
-           break;
-    }
-    string[offset] = '\0';
-
-    return (offset ? string : NULL);
-}
-
-int
-LispFputs(LispFile *file, char *buffer)
-{
-    return (LispFwrite(file, buffer, strlen(buffer)));
-}
-
-int
-LispSputs(LispString *string, char *buffer)
-{
-    return (LispSwrite(string, buffer, strlen(buffer)));
-}
-
-int
-LispFread(LispFile *file, void *data, int size)
-{
-    int bytes, length;
-    char *buffer;
-
-    if (!file->readable)
-       return (EOF);
-
-    if (size <= 0)
-       return (size);
-
-    length = 0;
-    buffer = (char*)data;
-
-    /* check if there is an unget character */
-    if (file->available) {
-       *buffer++ = file->unget;
-       file->available = 0;
-       if (--size == 0) {
-           if (file->unget == '\n' && !file->binary)
-               ++file->line;
-
-           return (1);
-       }
-
-       length = 1;
-    }
-
-    if (file->buffered) {
-       void *base_data = (char*)data - length;
-
-       if (file->writable) {
-           LispFflush(file);
-           bytes = read(file->descriptor, buffer, size);
-           if (bytes < 0)
-               bytes = 0;
-           if (!file->binary)
-               file->line += calculate_line(base_data, length + bytes);
-
-           return (length + bytes);
-       }
-
-       /* read anything that is in the buffer */
-       if (file->offset < file->length) {
-           bytes = file->length - file->offset;
-           if (bytes > size)
-               bytes = size;
-           memcpy(buffer, file->buffer + file->offset, bytes);
-           buffer += bytes;
-           file->offset += bytes;
-           size -= bytes;
-       }
-
-       /* if there is still something to read */
-       if (size) {
-           bytes = read(file->descriptor, buffer, size);
-           if (bytes < 0)
-               bytes = 0;
-
-           length += bytes;
-       }
-
-       if (!file->binary)
-           file->line += calculate_line(base_data, length);
-
-       return (length);
-    }
-
-    bytes = read(file->descriptor, buffer, size);
-    if (bytes < 0)
-       bytes = 0;
-    if (!file->binary)
-       file->line += calculate_line(buffer - length, length + bytes);
-
-    return (length + bytes);
-}
-
-int
-LispFwrite(LispFile *file, void *data, int size)
-{
-    if (!file->writable || size < 0)
-       return (EOF);
-
-    if (!file->binary)
-       file->column = calculate_column(data, size, file->column);
-
-    if (file->buffered) {
-       int length, bytes;
-       char *buffer = (char*)data;
-
-       length = 0;
-       if (size + file->length > pagesize) {
-           /* fill remaining space in buffer and flush */
-           bytes = pagesize - file->length;
-           memcpy(file->buffer + file->length, buffer, bytes);
-           file->length += bytes;
-           LispFflush(file);
-
-           /* check if all data was written */
-           if (file->length)
-               return (pagesize - file->length);
-
-           length = bytes;
-           buffer += bytes;
-           size -= bytes;
-       }
-
-       while (size > pagesize) {
-           /* write multiple of pagesize */
-           bytes = (*file->io_write)(file->descriptor, buffer,
-                                     size - (size % pagesize));
-           if (bytes <= 0)
-               return (length);
-
-           length += bytes;
-           buffer += bytes;
-           size -= bytes;
-       }
-
-       if (size) {
-           /* keep remaining data in buffer */
-           switch (size) {
-               case 8:
-                   file->buffer[file->length++] = *buffer++;
-               case 7:
-                   file->buffer[file->length++] = *buffer++;
-               case 6:
-                   file->buffer[file->length++] = *buffer++;
-               case 5:
-                   file->buffer[file->length++] = *buffer++;
-               case 4:
-                   file->buffer[file->length++] = *buffer++;
-               case 3:
-                   file->buffer[file->length++] = *buffer++;
-               case 2:
-                   file->buffer[file->length++] = *buffer++;
-               case 1:
-                   file->buffer[file->length++] = *buffer++;
-                   break;
-               default:
-                   memcpy(file->buffer + file->length, buffer, size);
-                   file->length += size;
-                   break;
-           }
-           length += size;
-       }
-
-       return (length);
-    }
-
-    return ((*file->io_write)(file->descriptor, data, size));
-}
-
-int
-LispSwrite(LispString *string, void *data, int size)
-{
-    int bytes;
-
-    if (size < 0)
-       return (EOF);
-
-    if (string->output + size >= string->space) {
-       if (string->fixed) {
-           /* leave space for a ending nul character */
-           bytes = string->space - string->output - 1;
-
-           if (bytes < size)
-               size = bytes;
-
-           if (size <= 0)
-               return (-1);
-       }
-       else {
-           char *tmp;
-
-           bytes = string->space + size;
-           bytes += pagesize - (bytes % pagesize);
-           tmp = realloc(string->string, bytes);
-
-           if (tmp == NULL)
-               return (-1);
-
-           string->string = tmp;
-           string->space = bytes;
-       }
-    }
-    memcpy(string->string + string->output, data, size);
-    string->output += size;
-    if (string->length < string->output)
-       string->length = string->output;
-
-    if (!string->binary)
-       string->column = calculate_column(data, size, string->column);
-
-    return (size);
-}
-
-char *
-LispGetSstring(LispString *string, int *length)
-{
-    if (string->string == NULL || string->length <= 0) {
-       *length = 0;
-
-       return ("");
-    }
-    *length = string->length;
-    if (string->string[string->length -1] != '\0') {
-       if (string->length < string->space)
-           string->string[string->length] = '\0';
-       else if (string->fixed && string->space)
-           string->string[string->space - 1] = '\0';
-       else {
-           char *tmp = realloc(string->string, string->space + pagesize);
-
-           if (tmp == NULL)
-               string->string[string->space - 1] = '\0';
-           else {
-               string->string = tmp;
-               string->space += pagesize;
-               string->string[string->length] = '\0';
-           }
-       }
-    }
-
-    return (string->string);
-}
-
-int
-LispRename(char *from, char *to)
-{
-    return (rename(from, to));
-}
-
-int
-LispUnlink(char *name)
-{
-    return (unlink(name));
-}
diff --git a/xedit/lisp/io.h b/xedit/lisp/io.h
deleted file mode 100644 (file)
index 2bb8c4d..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/io.h,v 1.9tsi Exp $ */
-
-#ifndef Lisp_io_h
-#define Lisp_io_h
-
-#include "lisp/private.h"
-
-#define        FILE_READ       0x01
-#define FILE_WRITE     0x02
-#define FILE_IO                0x03
-#define FILE_APPEND    0x06    /* append mode, write bit also set */
-#define FILE_BUFFERED  0x08    /* force buffered mode */
-#define FILE_UNBUFFERED        0x10    /* force unbuffered mode */
-#define FILE_BINARY    0x20
-
-/*
- * Types
- */
-typedef ssize_t (*io_write_fn)(int, const void*, size_t);
-
-struct _LispFile {
-    char *buffer;
-    int line;                  /* input line number */
-    int column;                        /* output column number */
-    int descriptor;
-    int length;                        /* number of bytes used */
-    int offset;                        /* read/write offset */
-    int unget : 8;             /* unread char */
-    unsigned int readable : 1;
-    unsigned int writable : 1;
-    unsigned int regular : 1;  /* regular file */
-    unsigned int buffered : 1;
-    unsigned int available : 1;        /* unget field holds a char */
-    unsigned int nonblock : 1; /* in nonblock mode */
-    unsigned int binary : 1;   /* if set, don't calculate column/line-number */
-    io_write_fn io_write;
-};
-
-struct _LispString {
-    char *string;
-    int line;                  /* input line number */
-    int column;                        /* output column number */
-    int space;                 /* number of bytes alocated */
-    int length;                        /* number of bytes used */
-    int input;                 /* input offset, for read operations */
-    int output;                        /* output offset, for write operations */
-    unsigned int fixed : 1;    /* if set, don't try to reallocate string */
-    unsigned int binary : 1;   /* if set, don't calculate column/line-number */
-};
-
-/*
- * Prototypes
- */
-       /* higher level functions */
-int LispGet(void);
-int LispUnget(int);
-void LispPushInput(LispObj*);
-void LispPopInput(LispObj*);
-
-       /* functions that read/write using the LispFile structure */
-LispFile *LispFdopen(int, int);
-LispFile *LispFopen(char*, int);
-void LispFclose(LispFile*);
-int LispFflush(LispFile*);
-int LispFungetc(LispFile*, int);
-int LispFgetc(LispFile*);
-int LispFputc(LispFile*, int);
-char *LispFgets(LispFile*, char*, int);
-int LispFputs(LispFile*, char*);
-int LispFread(LispFile*, void*, int);
-int LispFwrite(LispFile*, void*, int);
-int LispRename(char*, char*);
-int LispUnlink(char*);
-
-       /* io wrappers */
-io_write_fn LispSetFileWrite(LispFile*, io_write_fn);
-
-       /* functions that read/write using the LispString structure */
-int LispSgetc(LispString*);
-int LispSputc(LispString*, int);
-int LispSputs(LispString*, char*);
-int LispSwrite(LispString*, void*, int);
-
-char *LispGetSstring(LispString*, int*);
-
-#endif /* Lisp_io_h */
diff --git a/xedit/lisp/lisp.c b/xedit/lisp/lisp.c
deleted file mode 100644 (file)
index 4b393c1..0000000
+++ /dev/null
@@ -1,5491 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/lisp.c,v 1.87tsi Exp $ */
-
-#include <stdlib.h>
-#include <string.h>
-#ifdef sun
-#include <strings.h>
-#endif
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <signal.h>
-#include <sys/wait.h>
-
-#ifndef X_NOT_POSIX
-#include <unistd.h>    /* for sysconf(), and getpagesize() */
-#endif
-
-#if defined(linux)
-#define HAS_GETPAGESIZE
-#define HAS_SC_PAGESIZE        /* _SC_PAGESIZE may be an enum for Linux */
-#endif
-
-#if defined(CSRG_BASED)
-#define HAS_GETPAGESIZE
-#endif
-
-#if defined(sun)
-#define HAS_GETPAGESIZE
-#endif
-
-#if defined(QNX4)
-#define HAS_GETPAGESIZE
-#endif
-
-#if defined(__QNXNTO__)
-#define HAS_SC_PAGESIZE
-#endif
-
-#include "lisp/bytecode.h"
-
-#include "lisp/read.h"
-#include "lisp/format.h"
-#include "lisp/math.h"
-#include "lisp/hash.h"
-#include "lisp/package.h"
-#include "lisp/pathname.h"
-#include "lisp/regex.h"
-#include "lisp/require.h"
-#include "lisp/stream.h"
-#include "lisp/struct.h"
-#include "lisp/time.h"
-#include "lisp/write.h"
-#include <math.h>
-
-typedef struct {
-    LispObj **objects;
-    LispObj *freeobj;
-    int nsegs;
-    int nobjs;
-    int nfree;
-} LispObjSeg;
-
-/*
- * Prototypes
- */
-static void Lisp__GC(LispObj*, LispObj*);
-static LispObj *Lisp__New(LispObj*, LispObj*);
-
-/* run a user function, to be called only by LispEval */
-static LispObj *LispRunFunMac(LispObj*, LispObj*, int, int);
-
-/* expands and executes a setf method, to be called only by Lisp_Setf */
-LispObj *LispRunSetf(LispArgList*, LispObj*, LispObj*, LispObj*);
-LispObj *LispRunSetfMacro(LispAtom*, LispObj*, LispObj*);
-
-/* increases storage size for environment */
-void LispMoreEnvironment(void);
-
-/* increases storage size for stack of builtin arguments */
-void LispMoreStack(void);
-
-/* increases storage size for global variables */
-void LispMoreGlobals(LispPackage*);
-
-#ifdef __GNUC__
-static INLINE LispObj *LispDoGetVar(LispObj*);
-#endif
-static INLINE void LispDoAddVar(LispObj*, LispObj*);
-
-/* Helper for importing symbol(s) functions,
- * Search for the specified object in the current package */
-static INLINE LispObj *LispGetVarPack(LispObj*);
-
-/* create environment for function call */
-static int LispMakeEnvironment(LispArgList*, LispObj*, LispObj*, int, int);
-
-       /* if not already in keyword package, move atom to keyword package */
-static LispObj *LispCheckKeyword(LispObj*);
-
-       /* builtin backquote parsing */
-static LispObj *LispEvalBackquoteObject(LispObj*, int, int);
-       /* used also by the bytecode compiler */
-LispObj *LispEvalBackquote(LispObj*, int);
-
-       /* create or change object property */
-void LispSetAtomObjectProperty(LispAtom*, LispObj*);
-       /* remove object property */
-static void LispRemAtomObjectProperty(LispAtom*);
-
-       /* allocates a new LispProperty for the given atom */
-static void LispAllocAtomProperty(LispAtom*);
-       /* Increment reference count of atom property */
-static void LispIncrementAtomReference(LispAtom*);
-       /* Decrement reference count of atom property */
-static void LispDecrementAtomReference(LispAtom*);
-       /* Removes all atom properties */
-static void LispRemAtomAllProperties(LispAtom*);
-
-static LispObj *LispAtomPropertyFunction(LispAtom*, LispObj*, int);
-
-static INLINE void LispCheckMemLevel(void);
-
-void LispAllocSeg(LispObjSeg*, int);
-static INLINE void LispMark(LispObj*);
-
-/* functions, macros, setf methods, and structure definitions */
-static INLINE void LispProt(LispObj*);
-
-static LispObj *LispCheckNeedProtect(LispObj*);
-
-static
-#ifdef SIGNALRETURNSINT
-int
-#else
-void
-#endif
-LispSignalHandler(int);
-
-/*
- * Initialization
- */
-LispMac lisp__data;
-
-static LispObj lispunbound = {LispNil_t};
-LispObj *UNBOUND = &lispunbound;
-
-static volatile int lisp__disable_int;
-static volatile int lisp__interrupted;
-
-LispObj *Okey, *Orest, *Ooptional, *Oaux, *Olambda;
-
-Atom_id Snil, St;
-Atom_id Saux, Skey, Soptional, Srest;
-Atom_id Satom, Ssymbol, Sinteger, Scharacter, Sstring, Slist,
-       Scons, Svector, Sarray, Sstruct, Skeyword, Sfunction, Spathname,
-       Srational, Sfloat, Scomplex, Sopaque, Sdefault;
-
-LispObj *Oformat, *Kunspecific;
-LispObj *Oexpand_setf_method;
-
-static LispProperty noproperty;
-LispProperty *NOPROPERTY = &noproperty;
-static int segsize, minfree;
-int pagesize, gcpro;
-
-static LispObjSeg objseg = {NULL, NIL};
-static LispObjSeg atomseg = {NULL, NIL};
-
-int LispArgList_t;
-
-LispFile *Stdout, *Stdin, *Stderr;
-
-static LispBuiltin lispbuiltins[] = {
-    {LispFunction, Lisp_Mul, "* &rest numbers"},
-    {LispFunction, Lisp_Plus, "+ &rest numbers"},
-    {LispFunction, Lisp_Minus, "- number &rest more-numbers"},
-    {LispFunction, Lisp_Div, "/ number &rest more-numbers"},
-    {LispFunction, Lisp_OnePlus, "1+ number"},
-    {LispFunction, Lisp_OneMinus, "1- number"},
-    {LispFunction, Lisp_Less, "< number &rest more-numbers"},
-    {LispFunction, Lisp_LessEqual, "<= number &rest more-numbers"},
-    {LispFunction, Lisp_Equal_, "= number &rest more-numbers"},
-    {LispFunction, Lisp_Greater, "> number &rest more-numbers"},
-    {LispFunction, Lisp_GreaterEqual, ">= number &rest more-numbers"},
-    {LispFunction, Lisp_NotEqual, "/= number &rest more-numbers"},
-    {LispFunction, Lisp_Max, "max number &rest more-numbers"},
-    {LispFunction, Lisp_Min, "min number &rest more-numbers"},
-    {LispFunction, Lisp_Abs, "abs number"},
-    {LispFunction, Lisp_Acons, "acons key datum alist"},
-    {LispFunction, Lisp_Adjoin, "adjoin item list &key key test test-not"},
-    {LispFunction, Lisp_AlphaCharP, "alpha-char-p char"},
-    {LispMacro, Lisp_And, "and &rest args", 1, 0, Com_And},
-    {LispFunction, Lisp_Append, "append &rest lists"},
-    {LispFunction, Lisp_Apply, "apply function arg &rest more-args", 1},
-    {LispFunction, Lisp_Aref, "aref array &rest subscripts"},
-    {LispFunction, Lisp_Assoc, "assoc item list &key test test-not key"},
-    {LispFunction, Lisp_AssocIf, "assoc-if predicate list &key key"},
-    {LispFunction, Lisp_AssocIfNot, "assoc-if-not predicate list &key key"},
-    {LispFunction, Lisp_Atom, "atom object"},
-    {LispMacro, Lisp_Block, "block name &rest body", 1, 0, Com_Block},
-    {LispFunction, Lisp_BothCaseP, "both-case-p character"},
-    {LispFunction, Lisp_Boundp, "boundp symbol"},
-    {LispFunction, Lisp_Butlast, "butlast list &optional count"},
-    {LispFunction, Lisp_Nbutlast, "nbutlast list &optional count"},
-    {LispFunction, Lisp_Car, "car list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_Car, "first list", 0, 0, Com_C_r},
-    {LispMacro, Lisp_Case, "case keyform &rest body"},
-    {LispMacro, Lisp_Catch, "catch tag &rest body", 1},
-    {LispFunction, Lisp_Cdr, "cdr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_Cdr, "rest list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_Ceiling, "ceiling number &optional divisor", 1},
-    {LispFunction, Lisp_Fceiling, "fceiling number &optional divisor", 1},
-    {LispFunction, Lisp_Char, "char string index"},
-    {LispFunction, Lisp_Char, "schar simple-string index"},
-    {LispFunction, Lisp_CharLess, "char< character &rest more-characters"},
-    {LispFunction, Lisp_CharLessEqual, "char<= character &rest more-characters"},
-    {LispFunction, Lisp_CharEqual_, "char= character &rest more-characters"},
-    {LispFunction, Lisp_CharGreater, "char> character &rest more-characters"},
-    {LispFunction, Lisp_CharGreaterEqual, "char>= character &rest more-characters"},
-    {LispFunction, Lisp_CharNotEqual_, "char/= character &rest more-characters"},
-    {LispFunction, Lisp_CharLessp, "char-lessp character &rest more-characters"},
-    {LispFunction, Lisp_CharNotGreaterp, "char-not-greaterp character &rest more-characters"},
-    {LispFunction, Lisp_CharEqual, "char-equal character &rest more-characters"},
-    {LispFunction, Lisp_CharGreaterp, "char-greaterp character &rest more-characters"},
-    {LispFunction, Lisp_CharNotLessp, "char-not-lessp character &rest more-characters"},
-    {LispFunction, Lisp_CharNotEqual, "char-not-equal character &rest more-characters"},
-    {LispFunction, Lisp_CharDowncase, "char-downcase character"},
-    {LispFunction, Lisp_CharInt, "char-code character"},
-    {LispFunction, Lisp_CharInt, "char-int character"},
-    {LispFunction, Lisp_CharUpcase, "char-upcase character"},
-    {LispFunction, Lisp_Character, "character object"},
-    {LispFunction, Lisp_Characterp, "characterp object"},
-    {LispFunction, Lisp_Clrhash, "clrhash hash-table"},
-    {LispFunction, Lisp_IntChar, "code-char integer"},
-    {LispFunction, Lisp_Coerce, "coerce object result-type"},
-    {LispFunction, Lisp_Compile, "compile name &optional definition", 1},
-    {LispFunction, Lisp_Complex, "complex realpart &optional imagpart"},
-    {LispMacro, Lisp_Cond, "cond &rest body", 0, 0, Com_Cond},
-    {LispFunction, Lisp_Cons, "cons car cdr", 0, 0, Com_Cons},
-    {LispFunction, Lisp_Consp, "consp object", 0, 0, Com_Consp},
-    {LispFunction, Lisp_Constantp, "constantp form &optional environment"},
-    {LispFunction, Lisp_Conjugate, "conjugate number"},
-    {LispFunction, Lisp_Complexp, "complexp object"},
-    {LispFunction, Lisp_CopyAlist, "copy-alist list"},
-    {LispFunction, Lisp_CopyList, "copy-list list"},
-    {LispFunction, Lisp_CopyTree, "copy-tree list"},
-    {LispFunction, Lisp_Close, "close stream &key abort"},
-    {LispFunction, Lisp_C_r, "caar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cddr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caaar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cadar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caddr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdaar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cddar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdddr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caaaar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caaadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caadar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caaddr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cadaar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cadadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "caddar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cadddr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdaaar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdaadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdadar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdaddr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cddaar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cddadr list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cdddar list", 0, 0, Com_C_r},
-    {LispFunction, Lisp_C_r, "cddddr list", 0, 0, Com_C_r},
-    {LispMacro, Lisp_Decf, "decf place &optional delta"},
-    {LispMacro, Lisp_Defconstant, "defconstant name initial-value &optional documentation"},
-    {LispMacro, Lisp_Defmacro, "defmacro name lambda-list &rest body"},
-    {LispMacro, Lisp_Defstruct, "defstruct name &rest description"},
-    {LispMacro, Lisp_Defun, "defun name lambda-list &rest body"},
-    {LispMacro, Lisp_Defsetf, "defsetf function lambda-list &rest body"},
-    {LispMacro, Lisp_Defparameter, "defparameter name initial-value &optional documentation"},
-    {LispMacro, Lisp_Defvar, "defvar name &optional initial-value documentation"},
-    {LispFunction, Lisp_Delete, "delete item sequence &key from-end test test-not start end count key"},
-    {LispFunction, Lisp_DeleteDuplicates, "delete-duplicates sequence &key from-end test test-not start end key"},
-    {LispFunction, Lisp_DeleteIf, "delete-if predicate sequence &key from-end start end count key"},
-    {LispFunction, Lisp_DeleteIfNot, "delete-if-not predicate sequence &key from-end start end count key"},
-    {LispFunction, Lisp_DeleteFile, "delete-file filename"},
-    {LispFunction, Lisp_Denominator, "denominator rational"},
-    {LispFunction, Lisp_DigitChar, "digit-char weight &optional radix"},
-    {LispFunction, Lisp_DigitCharP, "digit-char-p character &optional radix"},
-    {LispFunction, Lisp_Directory, "directory pathname &key all if-cannot-read"},
-    {LispFunction, Lisp_DirectoryNamestring, "directory-namestring pathname"},
-    {LispFunction, Lisp_Disassemble, "disassemble function"},
-    {LispMacro, Lisp_Do, "do init test &rest body"},
-    {LispMacro, Lisp_DoP, "do* init test &rest body"},
-    {LispFunction, Lisp_Documentation, "documentation symbol type"},
-    {LispMacro, Lisp_DoList, "dolist init &rest body", 0, 0, Com_Dolist},
-    {LispMacro, Lisp_DoTimes, "dotimes init &rest body"},
-    {LispMacro, Lisp_DoAllSymbols, "do-all-symbols init &rest body"},
-    {LispMacro, Lisp_DoExternalSymbols, "do-external-symbols init &rest body"},
-    {LispMacro, Lisp_DoSymbols, "do-symbols init &rest body"},
-    {LispFunction, Lisp_Elt, "elt sequence index"},
-    {LispFunction, Lisp_Endp, "endp object"},
-    {LispFunction, Lisp_EnoughNamestring, "enough-namestring pathname &optional defaults"},
-    {LispFunction, Lisp_Eq, "eq left right", 0, 0, Com_Eq},
-    {LispFunction, Lisp_Eql, "eql left right", 0, 0, Com_Eq},
-    {LispFunction, Lisp_Equal, "equal left right", 0, 0, Com_Eq},
-    {LispFunction, Lisp_Equalp, "equalp left right", 0, 0, Com_Eq},
-    {LispFunction, Lisp_Error, "error control-string &rest arguments"},
-    {LispFunction, Lisp_Evenp, "evenp integer"},
-    {LispFunction, Lisp_Export, "export symbols &optional package"},
-    {LispFunction, Lisp_Eval, "eval form"},
-    {LispFunction, Lisp_Every, "every predicate sequence &rest more-sequences"},
-    {LispFunction, Lisp_Some, "some predicate sequence &rest more-sequences"},
-    {LispFunction, Lisp_Notevery, "notevery predicate sequence &rest more-sequences"},
-    {LispFunction, Lisp_Notany, "notany predicate sequence &rest more-sequences"},
-    {LispFunction, Lisp_Fboundp, "fboundp symbol"},
-    {LispFunction, Lisp_Find, "find item sequence &key from-end test test-not start end key"},
-    {LispFunction, Lisp_FindIf, "find-if predicate sequence &key from-end start end key"},
-    {LispFunction, Lisp_FindIfNot, "find-if-not predicate sequence &key from-end start end key"},
-    {LispFunction, Lisp_FileNamestring, "file-namestring pathname"},
-    {LispFunction, Lisp_Fill, "fill sequence item &key start end"},
-    {LispFunction, Lisp_FindAllSymbols, "find-all-symbols string-or-symbol"},
-    {LispFunction, Lisp_FindSymbol, "find-symbol string &optional package", 1},
-    {LispFunction, Lisp_FindPackage, "find-package name"},
-    {LispFunction, Lisp_Float, "float number &optional other"},
-    {LispFunction, Lisp_Floatp, "floatp object"},
-    {LispFunction, Lisp_Floor, "floor number &optional divisor", 1},
-    {LispFunction, Lisp_Ffloor, "ffloor number &optional divisor", 1},
-    {LispFunction, Lisp_Fmakunbound, "fmakunbound symbol"},
-    {LispFunction, Lisp_Format, "format destination control-string &rest arguments"},
-    {LispFunction, Lisp_FreshLine, "fresh-line &optional output-stream"},
-    {LispFunction, Lisp_Funcall, "funcall function &rest arguments", 1},
-    {LispFunction, Lisp_Functionp, "functionp object"},
-    {LispFunction, Lisp_Gc, "gc &optional car cdr"},
-    {LispFunction, Lisp_Gcd, "gcd &rest integers"},
-    {LispFunction, Lisp_Gensym, "gensym &optional arg"},
-    {LispFunction, Lisp_Get, "get symbol indicator &optional default"},
-    {LispFunction, Lisp_Gethash, "gethash key hash-table &optional default", 1},
-    {LispMacro, Lisp_Go, "go tag", 0, 0, Com_Go},
-    {LispFunction, Lisp_GraphicCharP, "graphic-char-p char"},
-    {LispFunction, Lisp_HashTableP, "hash-table-p object"},
-    {LispFunction, Lisp_HashTableCount, "hash-table-count hash-table"},
-    {LispFunction, Lisp_HashTableRehashSize, "hash-table-rehash-size hash-table"},
-    {LispFunction, Lisp_HashTableRehashThreshold, "hash-table-rehash-threshold hash-table"},
-    {LispFunction, Lisp_HashTableSize, "hash-table-size hash-table"},
-    {LispFunction, Lisp_HashTableTest, "hash-table-test hash-table"},
-    {LispFunction, Lisp_HostNamestring, "host-namestring pathname"},
-    {LispMacro, Lisp_If, "if test then &optional else", 0, 0, Com_If},
-    {LispMacro, Lisp_IgnoreErrors, "ignore-errors &rest body", 1},
-    {LispFunction, Lisp_Imagpart, "imagpart number"},
-    {LispMacro, Lisp_InPackage, "in-package name"},
-    {LispMacro, Lisp_Incf, "incf place &optional delta"},
-    {LispFunction, Lisp_Import, "import symbols &optional package"},
-    {LispFunction, Lisp_InputStreamP, "input-stream-p stream"},
-    {LispFunction, Lisp_IntChar, "int-char integer"},
-    {LispFunction, Lisp_Integerp, "integerp object"},
-    {LispFunction, Lisp_Intern, "intern string &optional package", 1},
-    {LispFunction, Lisp_Intersection, "intersection list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_Nintersection, "nintersection list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_Isqrt, "isqrt natural"},
-    {LispFunction, Lisp_Keywordp, "keywordp object"},
-    {LispFunction, Lisp_Last, "last list &optional count", 0, 0, Com_Last},
-    {LispMacro, Lisp_Lambda, "lambda lambda-list &rest body"},
-    {LispFunction, Lisp_Lcm, "lcm &rest integers"},
-    {LispFunction, Lisp_Length, "length sequence", 0, 0, Com_Length},
-    {LispMacro, Lisp_Let, "let init &rest body", 1, 0, Com_Let},
-    {LispMacro, Lisp_LetP, "let* init &rest body", 1, 0, Com_Letx},
-    {LispFunction, Lisp_ListP, "list* object &rest more-objects"},
-    {LispFunction, Lisp_ListAllPackages, "list-all-packages"},
-    {LispFunction, Lisp_List, "list &rest args"},
-    {LispFunction, Lisp_ListLength, "list-length list"},
-    {LispFunction, Lisp_Listp, "listp object", 0, 0, Com_Listp},
-    {LispFunction, Lisp_Listen, "listen &optional input-stream"},
-    {LispFunction, Lisp_Load, "load filename &key verbose print if-does-not-exist"},
-    {LispFunction, Lisp_Logand, "logand &rest integers"},
-    {LispFunction, Lisp_Logeqv, "logeqv &rest integers"},
-    {LispFunction, Lisp_Logior, "logior &rest integers"},
-    {LispFunction, Lisp_Lognot, "lognot integer"},
-    {LispFunction, Lisp_Logxor, "logxor &rest integers"},
-    {LispMacro, Lisp_Loop, "loop &rest body", 0, 0, Com_Loop},
-    {LispFunction, Lisp_LowerCaseP, "lower-case-p character"},
-    {LispFunction, Lisp_MakeArray, "make-array dimensions &key element-type initial-element initial-contents adjustable fill-pointer displaced-to displaced-index-offset"},
-    {LispFunction, Lisp_MakeHashTable, "make-hash-table &key test size rehash-size rehash-threshold initial-contents"},
-    {LispFunction, Lisp_MakeList, "make-list size &key initial-element"},
-    {LispFunction, Lisp_MakePackage, "make-package package-name &key nicknames use"},
-    {LispFunction, Lisp_MakePathname, "make-pathname &key host device directory name type version defaults"},
-    {LispFunction, Lisp_MakeString, "make-string size &key initial-element element-type"},
-    {LispFunction, Lisp_MakeSymbol, "make-symbol name"},
-    {LispFunction, Lisp_MakeStringInputStream, "make-string-input-stream string &optional start end"},
-    {LispFunction, Lisp_MakeStringOutputStream, "make-string-output-stream &key element-type"},
-    {LispFunction, Lisp_GetOutputStreamString, "get-output-stream-string string-output-stream"},
-    {LispFunction, Lisp_Makunbound, "makunbound symbol"},
-    {LispFunction, Lisp_Mapc, "mapc function list &rest more-lists"},
-    {LispFunction, Lisp_Mapcar, "mapcar function list &rest more-lists"},
-    {LispFunction, Lisp_Mapcan, "mapcan function list &rest more-lists"},
-    {LispFunction, Lisp_Maphash, "maphash function hash-table"},
-    {LispFunction, Lisp_Mapl, "mapl function list &rest more-lists"},
-    {LispFunction, Lisp_Maplist, "maplist function list &rest more-lists"},
-    {LispFunction, Lisp_Mapcon, "mapcon function list &rest more-lists"},
-    {LispFunction, Lisp_Member, "member item list &key test test-not key"},
-    {LispFunction, Lisp_MemberIf, "member-if predicate list &key key"},
-    {LispFunction, Lisp_MemberIfNot, "member-if-not predicate list &key key"},
-    {LispFunction, Lisp_Minusp, "minusp number"},
-    {LispFunction, Lisp_Mod, "mod number divisor"},
-    {LispMacro, Lisp_MultipleValueBind, "multiple-value-bind symbols values &rest body"},
-    {LispMacro, Lisp_MultipleValueCall, "multiple-value-call function &rest form", 1},
-    {LispMacro, Lisp_MultipleValueProg1, "multiple-value-prog1 first-form &rest form", 1},
-    {LispMacro, Lisp_MultipleValueList, "multiple-value-list form"},
-    {LispMacro, Lisp_MultipleValueSetq, "multiple-value-setq symbols form"},
-    {LispFunction, Lisp_Nconc, "nconc &rest lists"},
-    {LispFunction, Lisp_Nreverse, "nreverse sequence"},
-    {LispFunction, Lisp_NsetDifference, "nset-difference list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_Nsubstitute, "nsubstitute newitem olditem sequence &key from-end test test-not start end count key"},
-    {LispFunction, Lisp_NsubstituteIf, "nsubstitute-if newitem test sequence &key from-end start end count key"},
-    {LispFunction, Lisp_NsubstituteIfNot, "nsubstitute-if-not newitem test sequence &key from-end start end count key"},
-    {LispFunction, Lisp_Nth, "nth index list"},
-    {LispFunction, Lisp_Nthcdr, "nthcdr index list", 0, 0, Com_Nthcdr},
-    {LispMacro, Lisp_NthValue, "nth-value index form"},
-    {LispFunction, Lisp_Numerator, "numerator rational"},
-    {LispFunction, Lisp_Namestring, "namestring pathname"},
-    {LispFunction, Lisp_Null, "not arg", 0, 0, Com_Null},
-    {LispFunction, Lisp_Null, "null list", 0, 0, Com_Null},
-    {LispFunction, Lisp_Numberp, "numberp object", 0, 0, Com_Numberp},
-    {LispFunction, Lisp_Oddp, "oddp integer"},
-    {LispFunction, Lisp_Open, "open filename &key direction element-type if-exists if-does-not-exist external-format"},
-    {LispFunction, Lisp_OpenStreamP, "open-stream-p stream"},
-    {LispMacro, Lisp_Or, "or &rest args", 1, 0, Com_Or},
-    {LispFunction, Lisp_OutputStreamP, "output-stream-p stream"},
-    {LispFunction, Lisp_Packagep, "packagep object"},
-    {LispFunction, Lisp_PackageName, "package-name package"},
-    {LispFunction, Lisp_PackageNicknames, "package-nicknames package"},
-    {LispFunction, Lisp_PackageUseList, "package-use-list package"},
-    {LispFunction, Lisp_PackageUsedByList, "package-used-by-list package"},
-    {LispFunction, Lisp_Pairlis, "pairlis key data &optional alist"},
-    {LispFunction, Lisp_ParseInteger, "parse-integer string &key start end radix junk-allowed", 1},
-    {LispFunction, Lisp_ParseNamestring, "parse-namestring object &optional host defaults &key start end junk-allowed", 1},
-    {LispFunction, Lisp_PathnameHost, "pathname-host pathname"},
-    {LispFunction, Lisp_PathnameDevice, "pathname-device pathname"},
-    {LispFunction, Lisp_PathnameDirectory, "pathname-directory pathname"},
-    {LispFunction, Lisp_PathnameName, "pathname-name pathname"},
-    {LispFunction, Lisp_PathnameType, "pathname-type pathname"},
-    {LispFunction, Lisp_PathnameVersion, "pathname-version pathname"},
-    {LispFunction, Lisp_Pathnamep, "pathnamep object"},
-    {LispFunction, Lisp_Plusp, "plusp number"},
-    {LispMacro, Lisp_Pop, "pop place"},
-    {LispFunction, Lisp_Position, "position item sequence &key from-end test test-not start end key"},
-    {LispFunction, Lisp_PositionIf, "position-if predicate sequence &key from-end start end key"},
-    {LispFunction, Lisp_PositionIfNot, "position-if-not predicate sequence &key from-end start end key"},
-    {LispFunction, Lisp_Prin1, "prin1 object &optional output-stream"},
-    {LispFunction, Lisp_Princ, "princ object &optional output-stream"},
-    {LispFunction, Lisp_Print, "print object &optional output-stream"},
-    {LispFunction, Lisp_ProbeFile, "probe-file pathname"},
-    {LispFunction, Lisp_Proclaim, "proclaim declaration"},
-    {LispMacro, Lisp_Prog1, "prog1 first &rest body"},
-    {LispMacro, Lisp_Prog2, "prog2 first second &rest body"},
-    {LispMacro, Lisp_Progn, "progn &rest body", 1, 0, Com_Progn},
-    {LispMacro, Lisp_Progv, "progv symbols values &rest body", 1},
-    {LispFunction, Lisp_Provide, "provide module"},
-    {LispMacro, Lisp_Push, "push item place"},
-    {LispMacro, Lisp_Pushnew, "pushnew item place &key key test test-not"},
-    {LispFunction, Lisp_Quit, "quit &optional status"},
-    {LispMacro, Lisp_Quote, "quote object"},
-    {LispFunction, Lisp_Rational, "rational number"},
-    {LispFunction, Lisp_Rationalp, "rationalp object"},
-    {LispFunction, Lisp_Read, "read &optional input-stream eof-error-p eof-value recursive-p"},
-    {LispFunction, Lisp_ReadChar, "read-char &optional input-stream eof-error-p eof-value recursive-p"},
-    {LispFunction, Lisp_ReadCharNoHang, "read-char-no-hang &optional input-stream eof-error-p eof-value recursive-p"},
-    {LispFunction, Lisp_ReadLine, "read-line &optional input-stream eof-error-p eof-value recursive-p", 1},
-    {LispFunction, Lisp_Realpart, "realpart number"},
-    {LispFunction, Lisp_Replace, "replace sequence1 sequence2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_ReadFromString, "read-from-string string &optional eof-error-p eof-value &key start end preserve-whitespace", 1},
-    {LispFunction, Lisp_Require, "require module &optional pathname"},
-    {LispFunction, Lisp_Rem, "rem number divisor"},
-    {LispFunction, Lisp_Remhash, "remhash key hash-table"},
-    {LispFunction, Lisp_Remove, "remove item sequence &key from-end test test-not start end count key"},
-    {LispFunction, Lisp_RemoveDuplicates, "remove-duplicates sequence &key from-end test test-not start end key"},
-    {LispFunction, Lisp_RemoveIf, "remove-if predicate sequence &key from-end start end count key"},
-    {LispFunction, Lisp_RemoveIfNot, "remove-if-not predicate sequence &key from-end start end count key"},
-    {LispFunction, Lisp_Remprop, "remprop symbol indicator"},
-    {LispFunction, Lisp_RenameFile, "rename-file filename new-name", 1},
-    {LispMacro, Lisp_Return, "return &optional result", 1, 0, Com_Return},
-    {LispMacro, Lisp_ReturnFrom, "return-from name &optional result", 1, 0, Com_ReturnFrom},
-    {LispFunction, Lisp_Reverse, "reverse sequence"},
-    {LispFunction, Lisp_Round, "round number &optional divisor", 1},
-    {LispFunction, Lisp_Fround, "fround number &optional divisor", 1},
-    {LispFunction, Lisp_Rplaca, "rplaca place value", 0, 0, Com_Rplac_},
-    {LispFunction, Lisp_Rplacd, "rplacd place value", 0, 0, Com_Rplac_},
-    {LispFunction, Lisp_Search, "search sequence1 sequence2 &key from-end test test-not key start1 start2 end1 end2"},
-    {LispFunction, Lisp_Set, "set symbol value"},
-    {LispFunction, Lisp_SetDifference, "set-difference list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_SetExclusiveOr, "set-exclusive-or list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_NsetExclusiveOr, "nset-exclusive-or list1 list2 &key test test-not key"},
-    {LispMacro, Lisp_Setf, "setf &rest form"},
-    {LispMacro, Lisp_Psetf, "psetf &rest form"},
-    {LispMacro, Lisp_SetQ, "setq &rest form", 0, 0, Com_Setq},
-    {LispMacro, Lisp_Psetq, "psetq &rest form"},
-    {LispFunction, Lisp_Sleep, "sleep seconds"},
-    {LispFunction, Lisp_Sort, "sort sequence predicate &key key"},
-    {LispFunction, Lisp_Sqrt, "sqrt number"},
-    {LispFunction, Lisp_Elt, "svref sequence index"},
-    {LispFunction, Lisp_Sort, "stable-sort sequence predicate &key key"},
-    {LispFunction, Lisp_Streamp, "streamp object"},
-    {LispFunction, Lisp_String, "string object"},
-    {LispFunction, Lisp_Stringp, "stringp object"},
-    {LispFunction, Lisp_StringEqual_, "string= string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringLess, "string< string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringGreater, "string> string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringLessEqual, "string<= string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringGreaterEqual, "string>= string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringNotEqual_, "string/= string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringConcat, "string-concat &rest strings"},
-    {LispFunction, Lisp_StringEqual, "string-equal string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringGreaterp, "string-greaterp string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringNotEqual, "string-not-equal string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringNotGreaterp, "string-not-greaterp string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringNotLessp, "string-not-lessp string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringLessp, "string-lessp string1 string2 &key start1 end1 start2 end2"},
-    {LispFunction, Lisp_StringTrim, "string-trim character-bag string"},
-    {LispFunction, Lisp_StringLeftTrim, "string-left-trim character-bag string"},
-    {LispFunction, Lisp_StringRightTrim, "string-right-trim character-bag string"},
-    {LispFunction, Lisp_StringUpcase, "string-upcase string &key start end"},
-    {LispFunction, Lisp_NstringUpcase, "nstring-upcase string &key start end"},
-    {LispFunction, Lisp_StringDowncase, "string-downcase string &key start end"},
-    {LispFunction, Lisp_NstringDowncase, "nstring-downcase string &key start end"},
-    {LispFunction, Lisp_StringCapitalize, "string-capitalize string &key start end"},
-    {LispFunction, Lisp_NstringCapitalize, "nstring-capitalize string &key start end"},
-    {LispFunction, Lisp_Subseq, "subseq sequence start &optional end"},
-    {LispFunction, Lisp_Subsetp, "subsetp list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_Substitute, "substitute newitem olditem sequence &key from-end test test-not start end count key"},
-    {LispFunction, Lisp_SubstituteIf, "substitute-if newitem test sequence &key from-end start end count key"},
-    {LispFunction, Lisp_SubstituteIfNot, "substitute-if-not newitem test sequence &key from-end start end count key"},
-    {LispFunction, Lisp_SymbolFunction, "symbol-function symbol"},
-    {LispFunction, Lisp_SymbolName, "symbol-name symbol"},
-    {LispFunction, Lisp_Symbolp, "symbolp object"},
-    {LispFunction, Lisp_SymbolPlist, "symbol-plist symbol"},
-    {LispFunction, Lisp_SymbolPackage, "symbol-package symbol"},
-    {LispFunction, Lisp_SymbolValue, "symbol-value symbol"},
-    {LispMacro, Lisp_Tagbody, "tagbody &rest body", 0, 0, Com_Tagbody},
-    {LispFunction, Lisp_Terpri, "terpri &optional output-stream"},
-    {LispFunction, Lisp_Typep, "typep object type"},
-    {LispMacro, Lisp_The, "the value-type form"},
-    {LispMacro, Lisp_Throw, "throw tag result", 1},
-    {LispMacro, Lisp_Time, "time form"},
-    {LispFunction, Lisp_Truename, "truename pathname"},
-    {LispFunction, Lisp_TreeEqual, "tree-equal tree-1 tree-2 &key test test-not"},
-    {LispFunction, Lisp_Truncate, "truncate number &optional divisor", 1},
-    {LispFunction, Lisp_Ftruncate, "ftruncate number &optional divisor", 1},
-    {LispFunction, Lisp_Unexport, "unexport symbols &optional package"},
-    {LispFunction, Lisp_Union, "union list1 list2 &key test test-not key"},
-    {LispFunction, Lisp_Nunion, "nunion list1 list2 &key test test-not key"},
-    {LispMacro, Lisp_Unless, "unless test &rest body", 1, 0, Com_Unless},
-    {LispFunction, Lisp_UserHomedirPathname, "user-homedir-pathname &optional host"},
-    {LispMacro, Lisp_UnwindProtect, "unwind-protect protect &rest cleanup"},
-    {LispFunction, Lisp_UpperCaseP, "upper-case-p character"},
-    {LispFunction, Lisp_Values, "values &rest objects", 1},
-    {LispFunction, Lisp_ValuesList, "values-list list", 1},
-    {LispFunction, Lisp_Vector, "vector &rest objects"},
-    {LispMacro, Lisp_When, "when test &rest body", 1, 0, Com_When},
-    {LispFunction, Lisp_Write, " write object &key case circle escape length level lines pretty readably right-margin stream"},
-    {LispFunction, Lisp_WriteChar, "write-char string &optional output-stream"},
-    {LispFunction, Lisp_WriteLine, "write-line string &optional output-stream &key start end"},
-    {LispFunction, Lisp_WriteString, "write-string string &optional output-stream &key start end"},
-    {LispFunction, Lisp_XeditCharStore, "lisp::char-store string index value", 0, 1},
-    {LispFunction, Lisp_XeditEltStore, "lisp::elt-store sequence index value", 0, 1},
-    {LispFunction, Lisp_XeditMakeStruct, "lisp::make-struct atom &rest init", 0, 1},
-    {LispFunction, Lisp_XeditPut, " lisp::put symbol indicator value", 0, 1},
-    {LispFunction, Lisp_XeditPuthash, "lisp::puthash key hash-table value", 0, 1},
-    {LispFunction, Lisp_XeditSetSymbolPlist, "lisp::set-symbol-plist symbol list", 0, 1},
-    {LispFunction, Lisp_XeditStructAccess, "lisp::struct-access atom struct", 0, 1},
-    {LispFunction, Lisp_XeditStructType, "lisp::struct-type atom struct", 0, 1},
-    {LispFunction, Lisp_XeditStructStore, "lisp::struct-store atom struct value", 0, 1},
-    {LispFunction, Lisp_XeditVectorStore, "lisp::vector-store array &rest values", 0, 1},
-    {LispFunction, Lisp_XeditDocumentationStore, "lisp::documentation-store symbol type string", 0, 1},
-    {LispFunction, Lisp_Zerop, "zerop number"},
-};
-
-static LispBuiltin extbuiltins[] = {
-    {LispFunction, Lisp_Getenv, "getenv name"},
-    {LispFunction, Lisp_MakePipe, "make-pipe command-line &key direction element-type external-format"},
-    {LispFunction, Lisp_PipeBroken, "pipe-broken pipe-stream"},
-    {LispFunction, Lisp_PipeErrorStream, "pipe-error-stream pipe-stream"},
-    {LispFunction, Lisp_PipeInputDescriptor, "pipe-input-descriptor pipe-stream"},
-    {LispFunction, Lisp_PipeErrorDescriptor, "pipe-error-descriptor pipe-stream"},
-    {LispFunction, Lisp_Recomp, "re-comp pattern &key nospec icase nosub newline"},
-    {LispFunction, Lisp_Reexec, "re-exec regex string &key count start end notbol noteol"},
-    {LispFunction, Lisp_Rep, "re-p object"},
-    {LispFunction, Lisp_Setenv, "setenv name value &optional overwrite"},
-    {LispFunction, Lisp_Unsetenv, "unsetenv name"},
-    {LispFunction, Lisp_NstringTrim, "nstring-trim character-bag string"},
-    {LispFunction, Lisp_NstringLeftTrim, "nstring-left-trim character-bag string"},
-    {LispFunction, Lisp_NstringRightTrim, "nstring-right-trim character-bag string"},
-    {LispMacro, Lisp_Until, "until test &rest body", 0, 0, Com_Until},
-    {LispMacro, Lisp_While, "while test &rest body", 0, 0, Com_While},
-};
-
-/* byte code function argument list for functions that don't change it's
- * &REST argument list. */
-extern LispObj x_cons[8];
-
-/*
- * Implementation
- */
-static int
-LispGetPageSize(void)
-{
-    static int pagesize = -1;
-
-    if (pagesize != -1)
-       return pagesize;
-
-    /* Try each supported method in the preferred order */
-
-#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE)
-    pagesize = sysconf(_SC_PAGESIZE);
-#endif
-
-#ifdef _SC_PAGE_SIZE
-    if (pagesize == -1)
-       pagesize = sysconf(_SC_PAGE_SIZE);
-#endif
-
-#ifdef HAS_GETPAGESIZE
-    if (pagesize == -1)
-       pagesize = getpagesize();
-#endif
-
-#ifdef PAGE_SIZE
-    if (pagesize == -1)
-       pagesize = PAGE_SIZE;
-#endif
-
-    if (pagesize < sizeof(LispObj) * 16)
-       pagesize = sizeof(LispObj) * 16;        /* need a reasonable sane size */
-
-    return pagesize;
-}
-
-void
-LispDestroy(char *fmt, ...)
-{
-    static char Error[] = "*** ";
-
-    if (!lisp__data.destroyed) {
-       char string[128];
-       va_list ap;
-
-       va_start(ap, fmt);
-       vsnprintf(string, sizeof(string), fmt, ap);
-       va_end(ap);
-
-       if (!lisp__data.ignore_errors) {
-           if (Stderr->column)
-               LispFputc(Stderr, '\n');
-           LispFputs(Stderr, Error);
-           LispFputs(Stderr, string);
-           LispFputc(Stderr, '\n');
-           LispFflush(Stderr);
-       }
-       else
-           lisp__data.error_condition = STRING(string);
-
-#ifdef DEBUGGER
-       if (lisp__data.debugging) {
-           LispDebugger(LispDebugCallWatch, NIL, NIL);
-           LispDebugger(LispDebugCallFatal, NIL, NIL);
-       }
-#endif
-
-       lisp__data.destroyed = 1;
-       LispBlockUnwind(NULL);
-       if (lisp__data.errexit)
-           exit(1);
-    }
-
-#ifdef DEBUGGER
-    if (lisp__data.debugging) {
-       /* when stack variables could be changed, this must be also changed! */
-       lisp__data.debug_level = -1;
-       lisp__data.debug = LispDebugUnspec;
-    }
-#endif
-
-    while (lisp__data.mem.level) {
-       --lisp__data.mem.level;
-       if (lisp__data.mem.mem[lisp__data.mem.level])
-           free(lisp__data.mem.mem[lisp__data.mem.level]);
-    }
-    lisp__data.mem.index = 0;
-
-    /* If the package was changed and an error happened */
-    PACKAGE = lisp__data.savepackage;
-    lisp__data.pack = lisp__data.savepack;
-
-    LispTopLevel();
-
-    if (!lisp__data.running) {
-       static char Fatal[] = "*** Fatal: nowhere to longjmp.\n";
-
-       LispFputs(Stderr, Fatal);
-       LispFflush(Stderr);
-       abort();
-    }
-
-    siglongjmp(lisp__data.jmp, 1);
-}
-
-void
-LispContinuable(char *fmt, ...)
-{
-    va_list ap;
-    char string[128];
-    static char Error[] = "*** Error: ";
-
-    if (Stderr->column)
-       LispFputc(Stderr, '\n');
-    LispFputs(Stderr, Error);
-    va_start(ap, fmt);
-    vsnprintf(string, sizeof(string), fmt, ap);
-    va_end(ap);
-    LispFputs(Stderr, string);
-    LispFputc(Stderr, '\n');
-    LispFputs(Stderr, "Type 'continue' if you want to proceed: ");
-    LispFflush(Stderr);
-
-    /* NOTE: does not check if stdin is a tty */
-    if (LispFgets(Stdin, string, sizeof(string)) &&
-       strcmp(string, "continue\n") == 0)
-       return;
-
-    LispDestroy("aborted on continuable error");
-}
-
-void
-LispMessage(char *fmt, ...)
-{
-    va_list ap;
-    char string[128];
-
-    if (Stderr->column)
-       LispFputc(Stderr, '\n');
-    va_start(ap, fmt);
-    vsnprintf(string, sizeof(string), fmt, ap);
-    va_end(ap);
-    LispFputs(Stderr, string);
-    LispFputc(Stderr, '\n');
-    LispFflush(Stderr);
-}
-
-void
-LispWarning(char *fmt, ...)
-{
-    va_list ap;
-    char string[128];
-    static char Warning[] = "*** Warning: ";
-
-    if (Stderr->column)
-       LispFputc(Stderr, '\n');
-    LispFputs(Stderr, Warning);
-    va_start(ap, fmt);
-    vsnprintf(string, sizeof(string), fmt, ap);
-    va_end(ap);
-    LispFputs(Stderr, string);
-    LispFputc(Stderr, '\n');
-    LispFflush(Stderr);
-}
-
-void
-LispTopLevel(void)
-{
-    int count;
-
-    COD = NIL;
-#ifdef DEBUGGER
-    if (lisp__data.debugging) {
-       DBG = NIL;
-       if (lisp__data.debug == LispDebugFinish)
-           lisp__data.debug = LispDebugUnspec;
-       lisp__data.debug_level = -1;
-       lisp__data.debug_step = 0;
-    }
-#endif
-    gcpro = 0;
-    lisp__data.block.block_level = 0;
-    if (lisp__data.block.block_size) {
-       while (lisp__data.block.block_size)
-           free(lisp__data.block.block[--lisp__data.block.block_size]);
-       free(lisp__data.block.block);
-       lisp__data.block.block = NULL;
-    }
-
-    lisp__data.destroyed = lisp__data.ignore_errors = 0;
-
-    if (CONSP(lisp__data.input_list)) {
-       LispUngetInfo **info, *unget = lisp__data.unget[0];
-
-       while (CONSP(lisp__data.input_list))
-           lisp__data.input_list = CDR(lisp__data.input_list);
-       SINPUT = lisp__data.input_list;
-       while (lisp__data.nunget > 1)
-           free(lisp__data.unget[--lisp__data.nunget]);
-       if ((info = realloc(lisp__data.unget, sizeof(LispUngetInfo*))) != NULL)
-           lisp__data.unget = info;
-       lisp__data.unget[0] = unget;
-       lisp__data.iunget = 0;
-       lisp__data.eof = 0;
-    }
-
-    for (count = 0; lisp__data.mem.level;) {
-       --lisp__data.mem.level;
-       if (lisp__data.mem.mem[lisp__data.mem.level]) {
-           ++count;
-#if 0
-           printf("LEAK: %p\n", lisp__data.mem.mem[lisp__data.mem.level]);
-#endif
-       }
-    }
-    lisp__data.mem.index = 0;
-    if (count)
-       LispWarning("%d raw memory pointer(s) left. Probably a leak.", count);
-
-    lisp__data.stack.base = lisp__data.stack.length =
-       lisp__data.env.lex = lisp__data.env.length = lisp__data.env.head = 0;
-    RETURN_COUNT = 0;
-    lisp__data.protect.length = 0;
-
-    lisp__data.savepackage = PACKAGE;
-    lisp__data.savepack = lisp__data.pack;
-
-    lisp__disable_int = lisp__interrupted = 0;
-}
-
-void
-LispGC(LispObj *car, LispObj *cdr)
-{
-    Lisp__GC(car, cdr);
-}
-
-static void
-Lisp__GC(LispObj *car, LispObj *cdr)
-{
-    register LispObj *entry, *last, *freeobj, **pentry, **eentry;
-    register int nfree;
-    unsigned i, j;
-    LispAtom *atom;
-    struct timeval start, end;
-#ifdef DEBUG
-    long sec, msec;
-    int count = objseg.nfree;
-#else
-    long msec;
-#endif
-
-    if (gcpro)
-       return;
-
-    DISABLE_INTERRUPTS();
-
-    nfree = 0;
-    freeobj = NIL;
-
-    ++lisp__data.gc.count;
-
-#ifdef DEBUG
-    gettimeofday(&start, NULL);
-#else
-    if (lisp__data.gc.timebits)
-       gettimeofday(&start, NULL);
-#endif
-
-    /*  Need to measure timings again to check if it is not better/faster
-     * to just mark these fields as any other data, as the interface was
-     * changed to properly handle circular lists in the function body itself.
-     */
-    if (lisp__data.gc.immutablebits) {
-       for (j = 0; j < objseg.nsegs; j++) {
-           for (entry = objseg.objects[j], last = entry + segsize;
-                entry < last; entry++)
-               entry->prot = 0;
-       }
-    }
-
-    /* Protect all packages */
-    for (entry = PACK; CONSP(entry); entry = CDR(entry)) {
-       LispObj *package = CAR(entry);
-       LispPackage *pack = package->data.package.package;
-
-       /* Protect cons cell */
-       entry->mark = 1;
-
-       /* Protect the package cell */
-       package->mark = 1;
-
-       /* Protect package name */
-       package->data.package.name->mark = 1;
-
-       /* Protect package nicknames */
-       LispMark(package->data.package.nicknames);
-
-       /* Protect global symbols */
-       for (pentry = pack->glb.pairs, eentry = pentry + pack->glb.length;
-           pentry < eentry; pentry++)
-           LispMark((*pentry)->data.atom->property->value);
-
-       /* Traverse atom list, protecting properties, and function/structure
-        * definitions if lisp__data.gc.immutablebits set */
-       for (atom = (LispAtom *)hash_iter_first(pack->atoms);
-            atom;
-            atom = (LispAtom *)hash_iter_next(pack->atoms)) {
-           if (atom->property != NOPROPERTY) {
-               if (atom->a_property)
-                   LispMark(atom->property->properties);
-               if (lisp__data.gc.immutablebits) {
-                   if (atom->a_function || atom->a_compiled)
-                       LispProt(atom->property->fun.function);
-                   if (atom->a_defsetf)
-                       LispProt(atom->property->setf);
-                   if (atom->a_defstruct)
-                       LispProt(atom->property->structure.definition);
-               }
-           }
-       }
-    }
-
-    /* protect environment */
-    for (pentry = lisp__data.env.values,
-        eentry = pentry + lisp__data.env.length;
-        pentry < eentry; pentry++)
-       LispMark(*pentry);
-
-    /* protect multiple return values */
-    for (pentry = lisp__data.returns.values,
-        eentry = pentry + lisp__data.returns.count;
-        pentry < eentry; pentry++)
-       LispMark(*pentry);
-
-    /* protect stack of arguments to builtin functions */
-    for (pentry = lisp__data.stack.values,
-        eentry = pentry + lisp__data.stack.length;
-        pentry < eentry; pentry++)
-       LispMark(*pentry);
-
-    /* protect temporary data used by builtin functions */
-    for (pentry = lisp__data.protect.objects,
-        eentry = pentry + lisp__data.protect.length;
-        pentry < eentry; pentry++)
-       LispMark(*pentry);
-
-    for (i = 0; i < sizeof(x_cons) / sizeof(x_cons[0]); i++)
-       x_cons[i].mark = 0;
-
-    LispMark(COD);
-#ifdef DEBUGGER
-    LispMark(DBG);
-    LispMark(BRK);
-#endif
-    LispMark(PRO);
-    LispMark(lisp__data.input_list);
-    LispMark(lisp__data.output_list);
-    LispMark(car);
-    LispMark(cdr);
-
-    for (j = 0; j < objseg.nsegs; j++) {
-       for (entry = objseg.objects[j], last = entry + segsize;
-            entry < last; entry++) {
-           if (entry->prot)
-               continue;
-           else if (entry->mark)
-               entry->mark = 0;
-           else {
-               switch (XOBJECT_TYPE(entry)) {
-                   case LispString_t:
-                       free(THESTR(entry));
-                       entry->type = LispCons_t;
-                       break;
-                   case LispStream_t:
-                       switch (entry->data.stream.type) {
-                           case LispStreamString:
-                               free(SSTREAMP(entry)->string);
-                               free(SSTREAMP(entry));
-                               break;
-                           case LispStreamFile:
-                               if (FSTREAMP(entry))
-                                   LispFclose(FSTREAMP(entry));
-                               break;
-                           case LispStreamPipe:
-                               /* XXX may need special handling if child hangs */
-                               if (PSTREAMP(entry)) {
-                                   if (IPSTREAMP(entry))
-                                       LispFclose(IPSTREAMP(entry));
-                                   if (OPSTREAMP(entry))
-                                       LispFclose(OPSTREAMP(entry));
-                                   /* don't bother with error stream, will also
-                                    * freed in this GC call, maybe just out
-                                    * of order */
-                                   if (PIDPSTREAMP(entry) > 0) {
-                                       kill(PIDPSTREAMP(entry), SIGTERM);
-                                       waitpid(PIDPSTREAMP(entry), NULL, 0);
-                                   }
-                                   free(PSTREAMP(entry));
-                               }
-                               break;
-                           default:
-                               break;
-                       }
-                       entry->type = LispCons_t;
-                       break;
-                   case LispBignum_t:
-                       mpi_clear(entry->data.mp.integer);
-                       free(entry->data.mp.integer);
-                       entry->type = LispCons_t;
-                       break;
-                   case LispBigratio_t:
-                       mpr_clear(entry->data.mp.ratio);
-                       free(entry->data.mp.ratio);
-                       entry->type = LispCons_t;
-                       break;
-                   case LispLambda_t:
-                       if (!SYMBOLP(entry->data.lambda.name))
-                           LispFreeArgList((LispArgList*)
-                               entry->data.lambda.name->data.opaque.data);
-                       entry->type = LispCons_t;
-                       break;
-                   case LispRegex_t:
-                       refree(entry->data.regex.regex);
-                       free(entry->data.regex.regex);
-                       entry->type = LispCons_t;
-                       break;
-                   case LispBytecode_t:
-                       free(entry->data.bytecode.bytecode->code);
-                       free(entry->data.bytecode.bytecode);
-                       entry->type = LispCons_t;
-                       break;
-                   case LispHashTable_t:
-                       LispFreeHashTable(entry->data.hash.table);
-                       entry->type = LispCons_t;
-                       break;
-                   case LispCons_t:
-                       break;
-                   default:
-                       entry->type = LispCons_t;
-                       break;
-               }
-               CDR(entry) = freeobj;
-               freeobj = entry;
-               ++nfree;
-           }
-       }
-    }
-
-    objseg.nfree = nfree;
-    objseg.freeobj = freeobj;
-
-    lisp__data.gc.immutablebits = 0;
-
-#ifdef DEBUG
-    gettimeofday(&end, NULL);
-    sec = end.tv_sec - start.tv_sec;
-    msec = end.tv_usec - start.tv_usec;
-    if (msec < 0) {
-       --sec;
-       msec += 1000000;
-    }
-    LispMessage("gc: "
-               "%ld sec, %ld msec, "
-               "%d recovered, %d free, %d protected, %d total",
-               sec, msec,
-               objseg.nfree - count, objseg.nfree,
-               objseg.nobjs - objseg.nfree, objseg.nobjs);
-#else
-    if (lisp__data.gc.timebits) {
-       gettimeofday(&end, NULL);
-       if ((msec = end.tv_usec - start.tv_usec) < 0)
-           msec += 1000000;
-       lisp__data.gc.gctime += msec;
-    }
-#endif
-
-    ENABLE_INTERRUPTS();
-}
-
-static INLINE void
-LispCheckMemLevel(void)
-{
-    int i;
-
-    /* Check for a free slot before the end. */
-    for (i = lisp__data.mem.index; i < lisp__data.mem.level; i++)
-       if (lisp__data.mem.mem[i] == NULL) {
-           lisp__data.mem.index = i;
-           return;
-       }
-
-    /* Check for a free slot in the beginning */
-    for (i = 0; i < lisp__data.mem.index; i++)
-       if (lisp__data.mem.mem[i] == NULL) {
-           lisp__data.mem.index = i;
-           return;
-       }
-
-    lisp__data.mem.index = lisp__data.mem.level;
-    ++lisp__data.mem.level;
-    if (lisp__data.mem.index < lisp__data.mem.space)
-       /* There is free space to store pointer. */
-       return;
-    else {
-       void **ptr = (void**)realloc(lisp__data.mem.mem,
-                                    (lisp__data.mem.space + 16) *
-                                    sizeof(void*));
-
-       if (ptr == NULL)
-           LispDestroy("out of memory");
-       lisp__data.mem.mem = ptr;
-       lisp__data.mem.space += 16;
-    }
-}
-
-void
-LispMused(void *pointer)
-{
-    int i;
-
-    DISABLE_INTERRUPTS();
-    for (i = lisp__data.mem.index; i >= 0; i--)
-       if (lisp__data.mem.mem[i] == pointer) {
-           lisp__data.mem.mem[i] = NULL;
-           lisp__data.mem.index = i;
-           goto mused_done;
-       }
-
-    for (i = lisp__data.mem.level - 1; i > lisp__data.mem.index; i--)
-       if (lisp__data.mem.mem[i] == pointer) {
-           lisp__data.mem.mem[i] = NULL;
-           lisp__data.mem.index = i;
-           break;
-       }
-
-mused_done:
-    ENABLE_INTERRUPTS();
-}
-
-void *
-LispMalloc(size_t size)
-{
-    void *pointer;
-
-    DISABLE_INTERRUPTS();
-    LispCheckMemLevel();
-    if ((pointer = malloc(size)) == NULL)
-       LispDestroy("out of memory, couldn't allocate %lu bytes",
-                   (unsigned long)size);
-
-    lisp__data.mem.mem[lisp__data.mem.index] = pointer;
-    ENABLE_INTERRUPTS();
-
-    return (pointer);
-}
-
-void *
-LispCalloc(size_t nmemb, size_t size)
-{
-    void *pointer;
-
-    DISABLE_INTERRUPTS();
-    LispCheckMemLevel();
-    if ((pointer = calloc(nmemb, size)) == NULL)
-       LispDestroy("out of memory, couldn't allocate %lu bytes",
-                   (unsigned long)size);
-
-    lisp__data.mem.mem[lisp__data.mem.index] = pointer;
-    ENABLE_INTERRUPTS();
-
-    return (pointer);
-}
-
-void *
-LispRealloc(void *pointer, size_t size)
-{
-    void *ptr;
-    int i;
-
-    DISABLE_INTERRUPTS();
-    if (pointer != NULL) {
-       for (i = lisp__data.mem.index; i >= 0; i--)
-           if (lisp__data.mem.mem[i] == pointer)
-               goto index_found;
-
-       for (i = lisp__data.mem.index + 1; i < lisp__data.mem.level; i++)
-           if (lisp__data.mem.mem[i] == pointer)
-               goto index_found;
-
-    }
-    LispCheckMemLevel();
-    i = lisp__data.mem.index;
-
-index_found:
-    if ((ptr = realloc(pointer, size)) == NULL)
-       LispDestroy("out of memory, couldn't realloc");
-
-    lisp__data.mem.mem[i] = ptr;
-    ENABLE_INTERRUPTS();
-
-    return (ptr);
-}
-
-char *
-LispStrdup(char *str)
-{
-    char *ptr = LispMalloc(strlen(str) + 1);
-
-    strcpy(ptr, str);
-
-    return (ptr);
-}
-
-void
-LispFree(void *pointer)
-{
-    int i;
-
-    DISABLE_INTERRUPTS();
-    for (i = lisp__data.mem.index; i >= 0; i--)
-       if (lisp__data.mem.mem[i] == pointer) {
-           lisp__data.mem.mem[i] = NULL;
-           lisp__data.mem.index = i;
-           goto free_done;
-       }
-
-    for (i = lisp__data.mem.level - 1; i > lisp__data.mem.index; i--)
-       if (lisp__data.mem.mem[i] == pointer) {
-           lisp__data.mem.mem[i] = NULL;
-           lisp__data.mem.index = i;
-           break;
-       }
-
-free_done:
-    free(pointer);
-    ENABLE_INTERRUPTS();
-}
-
-LispObj *
-LispSetVariable(LispObj *var, LispObj *val, char *fname, int eval)
-{
-    if (!SYMBOLP(var))
-       LispDestroy("%s: %s is not a symbol", fname, STROBJ(var));
-    if (eval)
-       val = EVAL(val);
-
-    return (LispSetVar(var, val));
-}
-
-int
-LispRegisterOpaqueType(char *desc)
-{
-    int length;
-    LispOpaque *opaque;
-
-    length = strlen(desc);
-    opaque = (LispOpaque *)hash_check(lisp__data.opqs, desc, length);
-
-    if (opaque == NULL) {
-       opaque = (LispOpaque*)LispMalloc(sizeof(LispOpaque));
-       opaque->desc = (hash_key*)LispCalloc(1, sizeof(hash_key));
-       opaque->desc->value = LispStrdup(desc);
-       opaque->desc->length = length;
-       hash_put(lisp__data.opqs, (hash_entry *)opaque);
-       LispMused(opaque->desc->value);
-       LispMused(opaque->desc);
-       LispMused(opaque);
-       opaque->type = ++lisp__data.opaque;
-    }
-
-    return (opaque->type);
-}
-
-char *
-LispIntToOpaqueType(int type)
-{
-    LispOpaque *opaque;
-
-    if (type) {
-       for (opaque = (LispOpaque *)hash_iter_first(lisp__data.opqs);
-            opaque;
-            opaque = (LispOpaque *)hash_iter_next(lisp__data.opqs)) {
-           if (opaque->type == type)
-               return (opaque->desc->value);
-       }
-       LispDestroy("Opaque type %d not registered", type);
-    }
-
-    return (Snil->value);
-}
-
-hash_key *
-LispGetAtomKey(char *string, int perm)
-{
-    int length;
-    hash_entry *entry;
-
-    length = strlen(string);
-    entry = hash_check(lisp__data.strings, string, length);
-    if (entry == NULL) {
-       entry = LispCalloc(1, sizeof(hash_entry));
-       entry->key = LispCalloc(1, sizeof(hash_key));
-       if (perm)
-           entry->key->value = string;
-       else
-           entry->key->value = LispStrdup(string);
-       entry->key->length = length;
-
-       hash_put(lisp__data.strings, entry);
-       if (!perm)
-           LispMused(entry->key->value);
-       LispMused(entry->key);
-       LispMused(entry);
-    }
-
-    return (entry->key);
-}
-
-LispAtom *
-LispDoGetAtom(char *str, int perm)
-{
-    int length;
-    LispAtom *atom;
-
-    length = strlen(str);
-    atom = (LispAtom *)hash_check(lisp__data.pack->atoms, str, length);
-
-    if (atom == NULL) {
-       atom = (LispAtom*)LispCalloc(1, sizeof(LispAtom));
-       atom->key = LispGetAtomKey(str, perm);
-       hash_put(lisp__data.pack->atoms, (hash_entry *)atom);
-       atom->property = NOPROPERTY;
-       LispMused(atom);
-    }
-
-    return (atom);
-}
-
-static void
-LispAllocAtomProperty(LispAtom *atom)
-{
-    LispProperty *property;
-
-    if (atom->property != NOPROPERTY)
-       LispDestroy("internal error at ALLOC-ATOM-PROPERTY");
-
-    property = LispCalloc(1, sizeof(LispProperty));
-    LispMused(property);
-    atom->property = property;
-    property->package = lisp__data.pack;
-    if (atom->package == NULL)
-       atom->package = PACKAGE;
-
-    LispIncrementAtomReference(atom);
-}
-
-static void
-LispIncrementAtomReference(LispAtom *atom)
-{
-    if (atom->property != NOPROPERTY)
-       /* if atom->property is NOPROPERTY, this is an unbound symbol */
-       ++atom->property->refcount;
-}
-
-/* Assumes atom property is not NOPROPERTY */
-static void
-LispDecrementAtomReference(LispAtom *atom)
-{
-    if (atom->property == NOPROPERTY)
-       /* if atom->property is NOPROPERTY, this is an unbound symbol */
-       return;
-
-    if (atom->property->refcount <= 0)
-       LispDestroy("internal error at DECREMENT-ATOM-REFERENCE");
-
-    --atom->property->refcount;
-
-    if (atom->property->refcount == 0) {
-       LispRemAtomAllProperties(atom);
-       free(atom->property);
-       atom->property = NOPROPERTY;
-    }
-}
-
-static void
-LispRemAtomAllProperties(LispAtom *atom)
-{
-    if (atom->property != NOPROPERTY) {
-       if (atom->a_object)
-           LispRemAtomObjectProperty(atom);
-       if (atom->a_function) {
-           lisp__data.gc.immutablebits = 1;
-           LispRemAtomFunctionProperty(atom);
-       }
-       else if (atom->a_compiled) {
-           lisp__data.gc.immutablebits = 1;
-           LispRemAtomCompiledProperty(atom);
-       }
-       else if (atom->a_builtin) {
-           lisp__data.gc.immutablebits = 1;
-           LispRemAtomBuiltinProperty(atom);
-       }
-       if (atom->a_defsetf) {
-           lisp__data.gc.immutablebits = 1;
-           LispRemAtomSetfProperty(atom);
-       }
-       if (atom->a_defstruct) {
-           lisp__data.gc.immutablebits = 1;
-           LispRemAtomStructProperty(atom);
-       }
-    }
-}
-
-void
-LispSetAtomObjectProperty(LispAtom *atom, LispObj *object)
-{
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-    else if (atom->watch) {
-       if (atom->object == lisp__data.package) {
-           if (!PACKAGEP(object))
-               LispDestroy("Symbol %s must be a package, not %s",
-                           ATOMID(lisp__data.package)->value, STROBJ(object));
-           lisp__data.pack = object->data.package.package;
-       }
-    }
-
-    atom->a_object = 1;
-    SETVALUE(atom, object);
-}
-
-static void
-LispRemAtomObjectProperty(LispAtom *atom)
-{
-    if (atom->a_object) {
-       atom->a_object = 0;
-       atom->property->value = NULL;
-    }
-}
-
-void
-LispSetAtomCompiledProperty(LispAtom *atom, LispObj *bytecode)
-{
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-
-    lisp__data.gc.immutablebits = 1;
-    if (atom->a_builtin) {
-       atom->a_builtin = 0;
-       LispFreeArgList(atom->property->alist);
-    }
-    else
-       atom->a_function = 0;
-    atom->a_compiled = 1;
-    atom->property->fun.function = bytecode;
-}
-
-void
-LispRemAtomCompiledProperty(LispAtom *atom)
-{
-    if (atom->a_compiled) {
-       lisp__data.gc.immutablebits = 1;
-       atom->property->fun.function = NULL;
-       atom->a_compiled = 0;
-       LispFreeArgList(atom->property->alist);
-       atom->property->alist = NULL;
-    }
-}
-
-void
-LispSetAtomFunctionProperty(LispAtom *atom, LispObj *function,
-                           LispArgList *alist)
-{
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-
-    lisp__data.gc.immutablebits = 1;
-    if (atom->a_function == 0 && atom->a_builtin == 0 && atom->a_compiled == 0)
-       atom->a_function = 1;
-    else {
-       if (atom->a_builtin) {
-           atom->a_builtin = 0;
-           LispFreeArgList(atom->property->alist);
-       }
-       else
-           atom->a_compiled = 0;
-       atom->a_function = 1;
-    }
-
-    atom->property->fun.function = function;
-    atom->property->alist = alist;
-}
-
-void
-LispRemAtomFunctionProperty(LispAtom *atom)
-{
-    if (atom->a_function) {
-       lisp__data.gc.immutablebits = 1;
-       atom->property->fun.function = NULL;
-       atom->a_function = 0;
-       LispFreeArgList(atom->property->alist);
-       atom->property->alist = NULL;
-    }
-}
-
-void
-LispSetAtomBuiltinProperty(LispAtom *atom, LispBuiltin *builtin,
-                          LispArgList *alist)
-{
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-
-    lisp__data.gc.immutablebits = 1;
-    if (atom->a_builtin == 0 && atom->a_function == 0)
-       atom->a_builtin = 1;
-    else {
-       if (atom->a_function) {
-           atom->a_function = 0;
-           LispFreeArgList(atom->property->alist);
-       }
-    }
-
-    atom->property->fun.builtin = builtin;
-    atom->property->alist = alist;
-}
-
-void
-LispRemAtomBuiltinProperty(LispAtom *atom)
-{
-    if (atom->a_builtin) {
-       lisp__data.gc.immutablebits = 1;
-       atom->property->fun.function = NULL;
-       atom->a_builtin = 0;
-       LispFreeArgList(atom->property->alist);
-       atom->property->alist = NULL;
-    }
-}
-
-void
-LispSetAtomSetfProperty(LispAtom *atom, LispObj *setf, LispArgList *alist)
-{
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-
-    lisp__data.gc.immutablebits = 1;
-    if (atom->a_defsetf)
-       LispFreeArgList(atom->property->salist);
-
-    atom->a_defsetf = 1;
-    atom->property->setf = setf;
-    atom->property->salist = alist;
-}
-
-void
-LispRemAtomSetfProperty(LispAtom *atom)
-{
-    if (atom->a_defsetf) {
-       lisp__data.gc.immutablebits = 1;
-       atom->property->setf = NULL;
-       atom->a_defsetf = 0;
-       LispFreeArgList(atom->property->salist);
-       atom->property->salist = NULL;
-    }
-}
-
-void
-LispSetAtomStructProperty(LispAtom *atom, LispObj *def, int fun)
-{
-    if (fun > 0xff)
-       /* Not suported by the bytecode compiler... */
-       LispDestroy("SET-ATOM-STRUCT-PROPERTY: "
-                   "more than 256 fields not supported");
-
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-
-    lisp__data.gc.immutablebits = 1;
-    atom->a_defstruct = 1;
-    atom->property->structure.definition = def;
-    atom->property->structure.function = fun;
-}
-
-void
-LispRemAtomStructProperty(LispAtom *atom)
-{
-    if (atom->a_defstruct) {
-       lisp__data.gc.immutablebits = 1;
-       atom->property->structure.definition = NULL;
-       atom->a_defstruct = 0;
-    }
-}
-
-LispAtom *
-LispGetAtom(char *str)
-{
-    return (LispDoGetAtom(str, 0));
-}
-
-LispAtom *
-LispGetPermAtom(char *str)
-{
-    return (LispDoGetAtom(str, 1));
-}
-
-#define GET_PROPERTY   0
-#define ADD_PROPERTY   1
-#define REM_PROPERTY   2
-static LispObj *
-LispAtomPropertyFunction(LispAtom *atom, LispObj *key, int function)
-{
-    LispObj *list = NIL, *result = NIL;
-
-    if (function == ADD_PROPERTY) {
-       if (atom->property == NOPROPERTY)
-           LispAllocAtomProperty(atom);
-       if (atom->property->properties == NULL) {
-           atom->a_property = 1;
-           atom->property->properties = NIL;
-       }
-    }
-
-    if (atom->a_property) {
-       LispObj *base;
-
-       for (base = list = atom->property->properties;
-            CONSP(list);
-            list = CDR(list)) {
-           if (key == CAR(list)) {
-               result = CDR(list);
-               break;
-           }
-           base = list;
-           list = CDR(list);
-           if (!CONSP(list))
-               LispDestroy("%s: %s has an odd property list length",
-                           STROBJ(atom->object),
-                           function == REM_PROPERTY ? "REMPROP" : "GET");
-       }
-       if (CONSP(list) && function == REM_PROPERTY) {
-           if (!CONSP(CDR(list)))
-               LispDestroy("REMPROP: %s has an odd property list length",
-                           STROBJ(atom->object));
-           if (base == list)
-               atom->property->properties = CDDR(list);
-           else
-               RPLACD(CDR(base), CDDR(list));
-       }
-    }
-
-    if (!CONSP(list)) {
-       if (function == ADD_PROPERTY) {
-           atom->property->properties =
-               CONS(key, CONS(NIL, atom->property->properties));
-           result = CDR(atom->property->properties);
-       }
-    }
-    else if (function == REM_PROPERTY)
-       result = T;
-
-    return (result);
-}
-
-LispObj *
-LispGetAtomProperty(LispAtom *atom, LispObj *key)
-{
-    return (LispAtomPropertyFunction(atom, key, GET_PROPERTY));
-}
-
-LispObj *
-LispPutAtomProperty(LispAtom *atom, LispObj *key, LispObj *value)
-{
-    LispObj *result = LispAtomPropertyFunction(atom, key, ADD_PROPERTY);
-
-    RPLACA(result, value);
-
-    return (result);
-}
-
-LispObj *
-LispRemAtomProperty(LispAtom *atom, LispObj *key)
-{
-    return (LispAtomPropertyFunction(atom, key, REM_PROPERTY));
-}
-
-LispObj *
-LispReplaceAtomPropertyList(LispAtom *atom, LispObj *list)
-{
-    if (atom->property == NOPROPERTY)
-       LispAllocAtomProperty(atom);
-    if (atom->property->properties == NULL)
-       atom->a_property = 1;
-    atom->property->properties = list;
-
-    return (list);
-}
-#undef GET_PROPERTY
-#undef ADD_PROPERTY
-#undef REM_PROPERTY
-
-
-/* Used to make sure that when defining a function like:
- *     (defun my-function (... &key key1 key2 key3 ...)
- * key1, key2, and key3 will be in the keyword package
- */
-static LispObj *
-LispCheckKeyword(LispObj *keyword)
-{
-    if (KEYWORDP(keyword))
-       return (keyword);
-
-    return (KEYWORD(ATOMID(keyword)->value));
-}
-
-void
-LispUseArgList(LispArgList *alist)
-{
-    if (alist->normals.num_symbols)
-       LispMused(alist->normals.symbols);
-    if (alist->optionals.num_symbols) {
-       LispMused(alist->optionals.symbols);
-       LispMused(alist->optionals.defaults);
-       LispMused(alist->optionals.sforms);
-    }
-    if (alist->keys.num_symbols) {
-       LispMused(alist->keys.symbols);
-       LispMused(alist->keys.defaults);
-       LispMused(alist->keys.sforms);
-       LispMused(alist->keys.keys);
-    }
-    if (alist->auxs.num_symbols) {
-       LispMused(alist->auxs.symbols);
-       LispMused(alist->auxs.initials);
-    }
-    LispMused(alist);
-}
-
-void
-LispFreeArgList(LispArgList *alist)
-{
-    if (alist->normals.num_symbols)
-       LispFree(alist->normals.symbols);
-    if (alist->optionals.num_symbols) {
-       LispFree(alist->optionals.symbols);
-       LispFree(alist->optionals.defaults);
-       LispFree(alist->optionals.sforms);
-    }
-    if (alist->keys.num_symbols) {
-       LispFree(alist->keys.symbols);
-       LispFree(alist->keys.defaults);
-       LispFree(alist->keys.sforms);
-       LispFree(alist->keys.keys);
-    }
-    if (alist->auxs.num_symbols) {
-       LispFree(alist->auxs.symbols);
-       LispFree(alist->auxs.initials);
-    }
-    LispFree(alist);
-}
-
-static LispObj *
-LispCheckNeedProtect(LispObj *object)
-{
-    if (object) {
-       switch (OBJECT_TYPE(object)) {
-           case LispNil_t:
-           case LispAtom_t:
-           case LispFunction_t:
-           case LispFixnum_t:
-           case LispSChar_t:
-               return (NULL);
-           default:
-               return (object);
-       }
-    }
-    return (NULL);
-}
-
-LispObj *
-LispListProtectedArguments(LispArgList *alist)
-{
-    int i;
-    GC_ENTER();
-    LispObj *arguments, *cons, *obj, *prev;
-
-    arguments = cons = prev = NIL;
-    for (i = 0; i < alist->optionals.num_symbols; i++) {
-       if ((obj = LispCheckNeedProtect(alist->optionals.defaults[i])) != NULL) {
-           if (arguments == NIL) {
-               arguments = cons = prev = CONS(obj, NIL);
-               GC_PROTECT(arguments);
-           }
-           else {
-               RPLACD(cons, CONS(obj, NIL));
-               prev = cons;
-               cons = CDR(cons);
-           }
-       }
-    }
-    for (i = 0; i < alist->keys.num_symbols; i++) {
-       if ((obj = LispCheckNeedProtect(alist->keys.defaults[i])) != NULL) {
-           if (arguments == NIL) {
-               arguments = cons = prev = CONS(obj, NIL);
-               GC_PROTECT(arguments);
-           }
-           else {
-               RPLACD(cons, CONS(obj, NIL));
-               prev = cons;
-               cons = CDR(cons);
-           }
-       }
-    }
-    for (i = 0; i < alist->auxs.num_symbols; i++) {
-       if ((obj = LispCheckNeedProtect(alist->auxs.initials[i])) != NULL) {
-           if (arguments == NIL) {
-               arguments = cons = prev = CONS(obj, NIL);
-               GC_PROTECT(arguments);
-           }
-           else {
-               RPLACD(cons, CONS(obj, NIL));
-               prev = cons;
-               cons = CDR(cons);
-           }
-       }
-    }
-    GC_LEAVE();
-
-    /* Don't add a NIL cell at the end, to save some space */
-    if (arguments != NIL) {
-       if (arguments == cons)
-           arguments = CAR(cons);
-       else
-           CDR(prev) = CAR(cons);
-    }
-
-    return (arguments);
-}
-
-LispArgList *
-LispCheckArguments(LispFunType type, LispObj *list, char *name, int builtin)
-{
-    static char *types[4] = {"LAMBDA-LIST", "FUNCTION", "MACRO", "SETF-METHOD"};
-    static char *fnames[4] = {"LAMBDA", "DEFUN", "DEFMACRO", "DEFSETF"};
-#define IKEY           0
-#define IOPTIONAL      1
-#define IREST          2
-#define IAUX           3
-    static char *keys[4] = {"&KEY", "&OPTIONAL", "&REST", "&AUX"};
-    int rest, optional, key, aux, count;
-    LispArgList *alist;
-    LispObj *spec, *sform, *defval, *default_value;
-    char description[8], *desc;
-
-/* If LispRealloc fails, the previous memory will be released
- * in LispTopLevel, unless LispMused was called on the pointer */
-#define REALLOC_OBJECTS(pointer, count)                \
-    pointer = LispRealloc(pointer, (count) * sizeof(LispObj*))
-
-    alist = LispCalloc(1, sizeof(LispArgList));
-    if (!CONSP(list)) {
-       if (list != NIL)
-           LispDestroy("%s %s: %s cannot be a %s argument list",
-                       fnames[type], name, STROBJ(list), types[type]);
-       alist->description = GETATOMID("")->value;
-
-       return (alist);
-    }
-
-    default_value = builtin ? UNSPEC : NIL;
-
-    description[0] = '\0';
-    desc = description;
-    rest = optional = key = aux = 0;
-    for (; CONSP(list); list = CDR(list)) {
-       spec = CAR(list);
-
-       if (CONSP(spec)) {
-           if (builtin)
-               LispDestroy("builtin function argument cannot have default value");
-           if (aux) {
-               if (!SYMBOLP(CAR(spec)) ||
-                   (CDR(spec) != NIL && CDDR(spec) != NIL))
-                   LispDestroy("%s %s: bad &AUX argument %s",
-                               fnames[type], name, STROBJ(spec));
-               defval = CDR(spec) != NIL ? CADR(spec) : NIL;
-               count = alist->auxs.num_symbols;
-               REALLOC_OBJECTS(alist->auxs.symbols, count + 1);
-               REALLOC_OBJECTS(alist->auxs.initials, count + 1);
-               alist->auxs.symbols[count] = CAR(spec);
-               alist->auxs.initials[count] = defval;
-               ++alist->auxs.num_symbols;
-               if (count == 0)
-                   *desc++ = 'a';
-               ++alist->num_arguments;
-           }
-           else if (rest)
-               LispDestroy("%s %s: syntax error parsing %s",
-                           fnames[type], name, keys[IREST]);
-           else if (key) {
-               LispObj *akey = CAR(spec);
-
-               defval = default_value;
-               sform = NULL;
-               if (CONSP(akey)) {
-                   /* check for special case, as in:
-                    *  (defun a (&key ((key name) 'default-value)) name)
-                    *  (a 'key 'test)  => TEST
-                    *  (a)             => DEFAULT-VALUE
-                    */
-                   if (!SYMBOLP(CAR(akey)) || !CONSP(CDR(akey)) ||
-                       !SYMBOLP(CADR(akey)) || CDDR(akey) != NIL ||
-                       (CDR(spec) != NIL && CDDR(spec) != NIL))
-                       LispDestroy("%s %s: bad special &KEY %s",
-                                   fnames[type], name, STROBJ(spec));
-                   if (CDR(spec) != NIL)
-                       defval = CADR(spec);
-                   spec = CADR(akey);
-                   akey = CAR(akey);
-               }
-               else {
-                   akey = NULL;
-
-                   if (!SYMBOLP(CAR(spec)))
-                       LispDestroy("%s %s: %s cannot be a %s argument name",
-                                   fnames[type], name,
-                                   STROBJ(CAR(spec)), types[type]);
-                   /* check if default value provided, and optionally a `svar' */
-                   else if (CDR(spec) != NIL && (!CONSP(CDR(spec)) ||
-                             (CDDR(spec) != NIL &&
-                              (!SYMBOLP(CAR(CDDR(spec))) ||
-                               CDR(CDDR(spec)) != NIL))))
-                       LispDestroy("%s %s: bad argument specification %s",
-                                   fnames[type], name, STROBJ(spec));
-                   if (CONSP(CDR(spec))) {
-                       defval = CADR(spec);
-                       if (CONSP(CDDR(spec)))
-                           sform = CAR(CDDR(spec));
-                   }
-                   /* Add to keyword package, and set the keyword in the
-                    * argument list, so that a function argument keyword
-                    * will reference the same object, and make comparison
-                    * simpler. */
-                   spec = LispCheckKeyword(CAR(spec));
-               }
-
-               count = alist->keys.num_symbols;
-               REALLOC_OBJECTS(alist->keys.keys, count + 1);
-               REALLOC_OBJECTS(alist->keys.defaults, count + 1);
-               REALLOC_OBJECTS(alist->keys.sforms, count + 1);
-               REALLOC_OBJECTS(alist->keys.symbols, count + 1);
-               alist->keys.symbols[count] = spec;
-               alist->keys.defaults[count] = defval;
-               alist->keys.sforms[count] = sform;
-               alist->keys.keys[count] = akey;
-               ++alist->keys.num_symbols;
-               if (count == 0)
-                   *desc++ = 'k';
-               alist->num_arguments += 1 + (sform != NULL);
-           }
-           else if (optional) {
-               defval = default_value;
-               sform = NULL;
-
-               if (!SYMBOLP(CAR(spec)))
-                   LispDestroy("%s %s: %s cannot be a %s argument name",
-                               fnames[type], name,
-                               STROBJ(CAR(spec)), types[type]);
-               /* check if default value provided, and optionally a `svar' */
-               else if (CDR(spec) != NIL && (!CONSP(CDR(spec)) ||
-                         (CDDR(spec) != NIL &&
-                          (!SYMBOLP(CAR(CDDR(spec))) ||
-                           CDR(CDDR(spec)) != NIL))))
-                   LispDestroy("%s %s: bad argument specification %s",
-                               fnames[type], name, STROBJ(spec));
-               if (CONSP(CDR(spec))) {
-                   defval = CADR(spec);
-                   if (CONSP(CDDR(spec)))
-                       sform = CAR(CDDR(spec));
-               }
-               spec = CAR(spec);
-
-               count = alist->optionals.num_symbols;
-               REALLOC_OBJECTS(alist->optionals.symbols, count + 1);
-               REALLOC_OBJECTS(alist->optionals.defaults, count + 1);
-               REALLOC_OBJECTS(alist->optionals.sforms, count + 1);
-               alist->optionals.symbols[count] = spec;
-               alist->optionals.defaults[count] = defval;
-               alist->optionals.sforms[count] = sform;
-               ++alist->optionals.num_symbols;
-               if (count == 0)
-                   *desc++ = 'o';
-               alist->num_arguments += 1 + (sform != NULL);
-           }
-
-           /* Normal arguments cannot have default value */
-           else
-               LispDestroy("%s %s: syntax error parsing %s",
-                           fnames[type], name, STROBJ(spec));
-       }
-
-       /* spec must be an atom, excluding keywords */
-       else if (!SYMBOLP(spec) || KEYWORDP(spec))
-           LispDestroy("%s %s: %s cannot be a %s argument",
-                       fnames[type], name, STROBJ(spec), types[type]);
-       else {
-           Atom_id atom = ATOMID(spec);
-
-           if (atom->value[0] == '&') {
-               if (atom == Srest) {
-                   if (rest || aux || CDR(list) == NIL || !SYMBOLP(CADR(list))
-                       /* only &aux allowed after &rest */
-                       || (CDDR(list) != NIL && !SYMBOLP(CAR(CDDR(list))) &&
-                           ATOMID(CAR(CDDR(list))) != Saux))
-                       LispDestroy("%s %s: syntax error parsing %s",
-                                   fnames[type], name, ATOMID(spec)->value);
-                   if (key)
-                       LispDestroy("%s %s: %s not allowed after %s",
-                                   fnames[type], name, keys[IREST], keys[IKEY]);
-                   rest = 1;
-                   continue;
-               }
-
-               else if (atom == Skey) {
-                   if (rest || aux)
-                       LispDestroy("%s %s: %s not allowed after %s",
-                                   fnames[type], name, ATOMID(spec)->value,
-                                   rest ? keys[IREST] : keys[IAUX]);
-                   key = 1;
-                   continue;
-               }
-
-               else if (atom == Soptional) {
-                   if (rest || optional || aux || key)
-                       LispDestroy("%s %s: %s not allowed after %s",
-                                   fnames[type], name, ATOMID(spec)->value,
-                                   rest ? keys[IREST] :
-                                       optional ?
-                                       keys[IOPTIONAL] :
-                                           aux ? keys[IAUX] : keys[IKEY]);
-                   optional = 1;
-                   continue;
-               }
-
-               else if (atom == Saux) {
-                   /* &AUX must be the last keyword parameter */
-                   if (aux)
-                       LispDestroy("%s %s: syntax error parsing %s",
-                                   fnames[type], name, ATOMID(spec)->value);
-                   else if (builtin)
-                       LispDestroy("builtin function cannot have &AUX arguments");
-                   aux = 1;
-                   continue;
-               }
-
-               /* Untill more lambda-list keywords supported, don't allow
-                * argument names starting with the '&' character */
-               else
-                   LispDestroy("%s %s: %s not allowed/implemented",
-                               fnames[type], name, ATOMID(spec)->value);
-           }
-
-           /* Add argument to alist */
-           if (aux) {
-               count = alist->auxs.num_symbols;
-               REALLOC_OBJECTS(alist->auxs.symbols, count + 1);
-               REALLOC_OBJECTS(alist->auxs.initials, count + 1);
-               alist->auxs.symbols[count] = spec;
-               alist->auxs.initials[count] = default_value;
-               ++alist->auxs.num_symbols;
-               if (count == 0)
-                   *desc++ = 'a';
-               ++alist->num_arguments;
-           }
-           else if (rest) {
-               alist->rest = spec;
-               *desc++ = 'r';
-               ++alist->num_arguments;
-           }
-           else if (key) {
-               /* Add to keyword package, and set the keyword in the
-                * argument list, so that a function argument keyword
-                * will reference the same object, and make comparison
-                * simpler. */
-               spec = LispCheckKeyword(spec);
-               count = alist->keys.num_symbols;
-               REALLOC_OBJECTS(alist->keys.keys, count + 1);
-               REALLOC_OBJECTS(alist->keys.defaults, count + 1);
-               REALLOC_OBJECTS(alist->keys.sforms, count + 1);
-               REALLOC_OBJECTS(alist->keys.symbols, count + 1);
-               alist->keys.symbols[count] = spec;
-               alist->keys.defaults[count] = default_value;
-               alist->keys.sforms[count] = NULL;
-               alist->keys.keys[count] = NULL;
-               ++alist->keys.num_symbols;
-               if (count == 0)
-                   *desc++ = 'k';
-               ++alist->num_arguments;
-           }
-           else if (optional) {
-               count = alist->optionals.num_symbols;
-               REALLOC_OBJECTS(alist->optionals.symbols, count + 1);
-               REALLOC_OBJECTS(alist->optionals.defaults, count + 1);
-               REALLOC_OBJECTS(alist->optionals.sforms, count + 1);
-               alist->optionals.symbols[count] = spec;
-               alist->optionals.defaults[count] = default_value;
-               alist->optionals.sforms[count] = NULL;
-               ++alist->optionals.num_symbols;
-               if (count == 0)
-                   *desc++ = 'o';
-               ++alist->num_arguments;
-           }
-           else {
-               count = alist->normals.num_symbols;
-               REALLOC_OBJECTS(alist->normals.symbols, count + 1);
-               alist->normals.symbols[count] = spec;
-               ++alist->normals.num_symbols;
-               if (count == 0)
-                   *desc++ = '.';
-               ++alist->num_arguments;
-           }
-       }
-    }
-
-    /* Check for dotted argument list */
-    if (list != NIL)
-       LispDestroy("%s %s: %s cannot end %s arguments",
-                   fnames[type], name, STROBJ(list), types[type]);
-
-    *desc = '\0';
-    alist->description = LispGetAtomKey(description, 0)->value;
-
-    return (alist);
-}
-
-void
-LispAddBuiltinFunction(LispBuiltin *builtin)
-{
-    static LispObj stream;
-    static LispString string;
-    static int first = 1;
-    LispObj *name, *obj, *list, *cons, *code;
-    LispAtom *atom;
-    LispArgList *alist;
-    int length = lisp__data.protect.length;
-
-    if (first) {
-       stream.type = LispStream_t;
-       stream.data.stream.source.string = &string;
-       stream.data.stream.pathname = NIL;
-       stream.data.stream.type = LispStreamString;
-       stream.data.stream.readable = 1;
-       stream.data.stream.writable = 0;
-       string.output = 0;
-       first = 0;
-    }
-    string.string = builtin->declaration;
-    string.length = strlen(builtin->declaration);
-    string.input = 0;
-
-    code = COD;
-    LispPushInput(&stream);
-    name = LispRead();
-    list = cons = CONS(name, NIL);
-    if (length + 1 >= lisp__data.protect.space)
-       LispMoreProtects();
-    lisp__data.protect.objects[lisp__data.protect.length++] = list;
-    while ((obj = LispRead()) != NULL) {
-       RPLACD(cons, CONS(obj, NIL));
-       cons = CDR(cons);
-    }
-    LispPopInput(&stream);
-
-    atom = name->data.atom;
-    alist = LispCheckArguments(builtin->type, CDR(list), atom->key->value, 1);
-    builtin->symbol = CAR(list);
-    LispSetAtomBuiltinProperty(atom, builtin, alist);
-    LispUseArgList(alist);
-
-    /* Make function a extern symbol, unless told to not do so */
-    if (!builtin->internal)
-       LispExportSymbol(name);
-
-    lisp__data.protect.length = length;
-    COD = code;                        /* LispRead protect data in COD */
-}
-
-void
-LispAllocSeg(LispObjSeg *seg, int cellcount)
-{
-    unsigned int i;
-    LispObj **list, *obj;
-
-    DISABLE_INTERRUPTS();
-    while (seg->nfree < cellcount) {
-       if ((obj = (LispObj*)calloc(1, sizeof(LispObj) * segsize)) == NULL) {
-           ENABLE_INTERRUPTS();
-           LispDestroy("out of memory");
-       }
-       if ((list = (LispObj**)realloc(seg->objects,
-           sizeof(LispObj*) * (seg->nsegs + 1))) == NULL) {
-           free(obj);
-           ENABLE_INTERRUPTS();
-           LispDestroy("out of memory");
-       }
-       seg->objects = list;
-       seg->objects[seg->nsegs] = obj;
-
-       seg->nfree += segsize;
-       seg->nobjs += segsize;
-       for (i = 1; i < segsize; i++, obj++) {
-           /* Objects of type cons are the most used, save some time
-            * by not setting it's type in LispNewCons. */
-           obj->type = LispCons_t;
-           CDR(obj) = obj + 1;
-       }
-       obj->type = LispCons_t;
-       CDR(obj) = seg->freeobj;
-       seg->freeobj = seg->objects[seg->nsegs];
-       ++seg->nsegs;
-    }
-#ifdef DEBUG
-    LispMessage("gc: %d cell(s) allocated at %d segment(s)",
-               seg->nobjs, seg->nsegs);
-#endif
-    ENABLE_INTERRUPTS();
-}
-
-static INLINE void
-LispMark(register LispObj *object)
-{
-mark_again:
-    switch (OBJECT_TYPE(object)) {
-       case LispNil_t:
-       case LispAtom_t:
-       case LispFixnum_t:
-       case LispSChar_t:
-       case LispFunction_t:
-           return;
-       case LispLambda_t:
-           if (OPAQUEP(object->data.lambda.name))
-               object->data.lambda.name->mark = 1;
-           object->mark = 1;
-           LispMark(object->data.lambda.data);
-           object = object->data.lambda.code;
-           goto mark_cons;
-       case LispQuote_t:
-       case LispBackquote_t:
-       case LispFunctionQuote_t:
-           object->mark = 1;
-           object = object->data.quote;
-           goto mark_again;
-       case LispPathname_t:
-           object->mark = 1;
-           object = object->data.pathname;
-           goto mark_again;
-       case LispComma_t:
-           object->mark = 1;
-           object = object->data.comma.eval;
-           goto mark_again;
-       case LispComplex_t:
-           if (POINTERP(object->data.complex.real))
-               object->data.complex.real->mark = 1;
-           if (POINTERP(object->data.complex.imag))
-               object->data.complex.imag->mark = 1;
-           break;
-       case LispCons_t:
-mark_cons:
-           for (; CONSP(object) && !object->mark; object = CDR(object)) {
-               object->mark = 1;
-               switch (OBJECT_TYPE(CAR(object))) {
-                   case LispNil_t:
-                   case LispAtom_t:
-                   case LispFixnum_t:
-                   case LispSChar_t:
-                   case LispPackage_t:         /* protected in gc */
-                       break;
-                   case LispInteger_t:
-                   case LispDFloat_t:
-                   case LispString_t:
-                   case LispRatio_t:
-                   case LispOpaque_t:
-                   case LispBignum_t:
-                   case LispBigratio_t:
-                       CAR(object)->mark = 1;
-                       break;
-                   default:
-                       LispMark(CAR(object));
-                       break;
-               }
-           }
-           if (POINTERP(object) && !object->mark)
-               goto mark_again;
-           return;
-       case LispArray_t:
-           LispMark(object->data.array.list);
-           object->mark = 1;
-           object = object->data.array.dim;
-           goto mark_cons;
-       case LispStruct_t:
-           object->mark = 1;
-           object = object->data.struc.fields;
-           goto mark_cons;
-       case LispStream_t:
-mark_stream:
-           LispMark(object->data.stream.pathname);
-           if (object->data.stream.type == LispStreamPipe) {
-               object->mark = 1;
-               object = object->data.stream.source.program->errorp;
-               goto mark_stream;
-           }
-           break;
-       case LispRegex_t:
-           object->data.regex.pattern->mark = 1;
-           break;
-       case LispBytecode_t:
-           object->mark = 1;
-           object = object->data.bytecode.code;
-           goto mark_again;
-       case LispHashTable_t: {
-           unsigned long i;
-           LispHashEntry *entry = object->data.hash.table->entries,
-                         *last = entry + object->data.hash.table->num_entries;
-
-           if (object->mark)
-               return;
-           object->mark = 1;
-           for (; entry < last; entry++) {
-               for (i = 0; i < entry->count; i++) {
-                   switch (OBJECT_TYPE(entry->keys[i])) {
-                       case LispNil_t:
-                       case LispAtom_t:
-                       case LispFixnum_t:
-                       case LispSChar_t:
-                       case LispFunction_t:
-                       case LispPackage_t:
-                           break;
-                       case LispInteger_t:
-                       case LispDFloat_t:
-                       case LispString_t:
-                       case LispRatio_t:
-                       case LispOpaque_t:
-                       case LispBignum_t:
-                       case LispBigratio_t:
-                           entry->keys[i]->mark = 1;
-                           break;
-                       default:
-                           LispMark(entry->keys[i]);
-                           break;
-                   }
-                   switch (OBJECT_TYPE(entry->values[i])) {
-                       case LispNil_t:
-                       case LispAtom_t:
-                       case LispFixnum_t:
-                       case LispSChar_t:
-                       case LispFunction_t:
-                       case LispPackage_t:
-                           break;
-                       case LispInteger_t:
-                       case LispDFloat_t:
-                       case LispString_t:
-                       case LispRatio_t:
-                       case LispOpaque_t:
-                       case LispBignum_t:
-                       case LispBigratio_t:
-                           entry->values[i]->mark = 1;
-                           break;
-                       default:
-                           LispMark(entry->values[i]);
-                           break;
-                   }
-               }
-           }
-       }   return;
-       default:
-           break;
-    }
-    object->mark = 1;
-}
-
-static INLINE void
-LispProt(register LispObj *object)
-{
-prot_again:
-    switch (OBJECT_TYPE(object)) {
-       case LispNil_t:
-       case LispAtom_t:
-       case LispFixnum_t:
-       case LispSChar_t:
-       case LispFunction_t:
-           return;
-       case LispLambda_t:
-           if (OPAQUEP(object->data.lambda.name))
-               object->data.lambda.name->prot = 1;
-           object->prot = 1;
-           LispProt(object->data.lambda.data);
-           object = object->data.lambda.code;
-           goto prot_cons;
-       case LispQuote_t:
-       case LispBackquote_t:
-       case LispFunctionQuote_t:
-           object->prot = 1;
-           object = object->data.quote;
-           goto prot_again;
-       case LispPathname_t:
-           object->prot = 1;
-           object = object->data.pathname;
-           goto prot_again;
-       case LispComma_t:
-           object->prot = 1;
-           object = object->data.comma.eval;
-           goto prot_again;
-       case LispComplex_t:
-           if (POINTERP(object->data.complex.real))
-               object->data.complex.real->prot = 1;
-           if (POINTERP(object->data.complex.imag))
-               object->data.complex.imag->prot = 1;
-           break;
-       case LispCons_t:
-prot_cons:
-           for (; CONSP(object) && !object->prot; object = CDR(object)) {
-               object->prot = 1;
-               switch (OBJECT_TYPE(CAR(object))) {
-                   case LispNil_t:
-                   case LispAtom_t:
-                   case LispFixnum_t:
-                   case LispSChar_t:
-                   case LispFunction_t:
-                   case LispPackage_t:         /* protected in gc */
-                       break;
-                   case LispInteger_t:
-                   case LispDFloat_t:
-                   case LispString_t:
-                   case LispRatio_t:
-                   case LispOpaque_t:
-                   case LispBignum_t:
-                   case LispBigratio_t:
-                       CAR(object)->prot = 1;
-                       break;
-                   default:
-                       LispProt(CAR(object));
-                       break;
-               }
-           }
-           if (POINTERP(object) && !object->prot)
-               goto prot_again;
-           return;
-       case LispArray_t:
-           LispProt(object->data.array.list);
-           object->prot = 1;
-           object = object->data.array.dim;
-           goto prot_cons;
-       case LispStruct_t:
-           object->prot = 1;
-           object = object->data.struc.fields;
-           goto prot_cons;
-       case LispStream_t:
-prot_stream:
-           LispProt(object->data.stream.pathname);
-           if (object->data.stream.type == LispStreamPipe) {
-               object->prot = 1;
-               object = object->data.stream.source.program->errorp;
-               goto prot_stream;
-           }
-           break;
-       case LispRegex_t:
-           object->data.regex.pattern->prot = 1;
-           break;
-       case LispBytecode_t:
-           object->prot = 1;
-           object = object->data.bytecode.code;
-           goto prot_again;
-       case LispHashTable_t: {
-           unsigned long i;
-           LispHashEntry *entry = object->data.hash.table->entries,
-                         *last = entry + object->data.hash.table->num_entries;
-
-           if (object->prot)
-               return;
-           object->prot = 1;
-           for (; entry < last; entry++) {
-               for (i = 0; i < entry->count; i++) {
-                   switch (OBJECT_TYPE(entry->keys[i])) {
-                       case LispNil_t:
-                       case LispAtom_t:
-                       case LispFixnum_t:
-                       case LispSChar_t:
-                       case LispFunction_t:
-                       case LispPackage_t:
-                           break;
-                       case LispInteger_t:
-                       case LispDFloat_t:
-                       case LispString_t:
-                       case LispRatio_t:
-                       case LispOpaque_t:
-                       case LispBignum_t:
-                       case LispBigratio_t:
-                           entry->keys[i]->prot = 1;
-                           break;
-                       default:
-                           LispProt(entry->keys[i]);
-                           break;
-                   }
-                   switch (OBJECT_TYPE(entry->values[i])) {
-                       case LispNil_t:
-                       case LispAtom_t:
-                       case LispFixnum_t:
-                       case LispSChar_t:
-                       case LispFunction_t:
-                       case LispPackage_t:
-                           break;
-                       case LispInteger_t:
-                       case LispDFloat_t:
-                       case LispString_t:
-                       case LispRatio_t:
-                       case LispOpaque_t:
-                       case LispBignum_t:
-                       case LispBigratio_t:
-                           entry->values[i]->prot = 1;
-                           break;
-                       default:
-                           LispProt(entry->values[i]);
-                           break;
-                   }
-               }
-           }
-       }   return;
-       default:
-           break;
-    }
-    object->prot = 1;
-}
-
-void
-LispProtect(LispObj *key, LispObj *list)
-{
-    PRO = CONS(CONS(key, list), PRO);
-}
-
-void
-LispUProtect(LispObj *key, LispObj *list)
-{
-    LispObj *prev, *obj;
-
-    for (prev = obj = PRO; obj != NIL; prev = obj, obj = CDR(obj))
-       if (CAR(CAR(obj)) == key && CDR(CAR(obj)) == list) {
-           if (obj == PRO)
-               PRO = CDR(PRO);
-           else
-               CDR(prev) = CDR(obj);
-           return;
-       }
-
-    LispDestroy("no match for %s, at UPROTECT", STROBJ(key));
-}
-
-static LispObj *
-Lisp__New(LispObj *car, LispObj *cdr)
-{
-    int cellcount;
-    LispObj *obj;
-
-    Lisp__GC(car, cdr);
-#if 0
-    lisp__data.gc.average = (objseg.nfree + lisp__data.gc.average) >> 1;
-    if (lisp__data.gc.average < minfree) {
-       if (lisp__data.gc.expandbits < 6)
-           ++lisp__data.gc.expandbits;
-    }
-    else if (lisp__data.gc.expandbits)
-       --lisp__data.gc.expandbits;
-    /* For 32 bit computers, where sizeof(LispObj) == 16,
-     * minfree is set to 1024, and expandbits limited to 6,
-     * the maximum extra memory requested here should be 1Mb
-     */
-    cellcount = minfree << lisp__data.gc.expandbits;
-#else
-    /* Try to keep at least 3 times more free cells than the de number
-     * of used cells in the freelist, to amenize the cost of the gc time,
-     * in the, currently, very simple gc strategy code. */
-    cellcount = (objseg.nobjs - objseg.nfree) * 3;
-    cellcount = cellcount + (minfree - (cellcount % minfree));
-#endif
-
-    if (objseg.freeobj == NIL || objseg.nfree < cellcount)
-       LispAllocSeg(&objseg, cellcount);
-
-    obj = objseg.freeobj;
-    objseg.freeobj = CDR(obj);
-    --objseg.nfree;
-    
-    return (obj);
-}
-
-LispObj *
-LispNew(LispObj *car, LispObj *cdr)
-{
-    LispObj *obj = objseg.freeobj;
-
-    if (obj == NIL)
-       obj = Lisp__New(car, cdr);
-    else {
-       objseg.freeobj = CDR(obj);
-       --objseg.nfree;
-    }
-    
-    return (obj);
-}
-
-LispObj *
-LispNewAtom(char *str, int intern)
-{
-    LispObj *object;
-    LispAtom *atom = LispDoGetAtom(str, 0);
-
-    if (atom->object) {
-       if (intern && atom->package == NULL)
-           atom->package = PACKAGE;
-
-       return (atom->object);
-    }
-
-    if (atomseg.freeobj == NIL)
-       LispAllocSeg(&atomseg, pagesize);
-    object = atomseg.freeobj;
-    atomseg.freeobj = CDR(object);
-    --atomseg.nfree;
-
-    object->type = LispAtom_t;
-    object->data.atom = atom;
-    atom->object = object;
-    if (intern)
-       atom->package = PACKAGE;
-
-    return (object);
-}
-
-LispObj *
-LispNewStaticAtom(char *str)
-{
-    LispObj *object;
-    LispAtom *atom = LispDoGetAtom(str, 1);
-
-    object = LispNewSymbol(atom);
-
-    return (object);
-}
-
-LispObj *
-LispNewSymbol(LispAtom *atom)
-{
-    if (atom->object) {
-       if (atom->package == NULL)
-           atom->package = PACKAGE;
-
-       return (atom->object);
-    }
-    else {
-       LispObj *symbol;
-
-       if (atomseg.freeobj == NIL)
-           LispAllocSeg(&atomseg, pagesize);
-       symbol = atomseg.freeobj;
-       atomseg.freeobj = CDR(symbol);
-       --atomseg.nfree;
-
-       symbol->type = LispAtom_t;
-       symbol->data.atom = atom;
-       atom->object = symbol;
-       atom->package = PACKAGE;
-
-       return (symbol);
-    }
-}
-
-/* function representation is created on demand and never released,
- * even if the function is undefined and never defined again */
-LispObj *
-LispNewFunction(LispObj *symbol)
-{
-    LispObj *function;
-
-    if (symbol->data.atom->function)
-       return (symbol->data.atom->function);
-
-    if (symbol->data.atom->package == NULL)
-       symbol->data.atom->package = PACKAGE;
-
-    if (atomseg.freeobj == NIL)
-       LispAllocSeg(&atomseg, pagesize);
-    function = atomseg.freeobj;
-    atomseg.freeobj = CDR(function);
-    --atomseg.nfree;
-
-    function->type = LispFunction_t;
-    function->data.atom = symbol->data.atom;
-    symbol->data.atom->function = function;
-
-    return (function);
-}
-
-/* symbol name representation is created on demand and never released */
-LispObj *
-LispSymbolName(LispObj *symbol)
-{
-    LispObj *name;
-    LispAtom *atom = symbol->data.atom;
-
-    if (atom->name)
-       return (atom->name);
-
-    if (atomseg.freeobj == NIL)
-       LispAllocSeg(&atomseg, pagesize);
-    name = atomseg.freeobj;
-    atomseg.freeobj = CDR(name);
-    --atomseg.nfree;
-
-    name->type = LispString_t;
-    THESTR(name) = atom->key->value;
-    STRLEN(name) = atom->key->length;
-    name->data.string.writable = 0;
-    atom->name = name;
-
-    return (name);
-}
-
-LispObj *
-LispNewFunctionQuote(LispObj *object)
-{
-    LispObj *quote = LispNew(object, NIL);
-
-    quote->type = LispFunctionQuote_t;
-    quote->data.quote = object;
-
-    return (quote);
-}
-
-LispObj *
-LispNewDFloat(double value)
-{
-    LispObj *dfloat = objseg.freeobj;
-
-    if (dfloat == NIL)
-       dfloat = Lisp__New(NIL, NIL);
-    else {
-       objseg.freeobj = CDR(dfloat);
-       --objseg.nfree;
-    }
-    dfloat->type = LispDFloat_t;
-    dfloat->data.dfloat = value;
-
-    return (dfloat);
-}
-
-LispObj *
-LispNewString(char *str, long length, int alloced)
-{
-    char *cstring;
-    LispObj *string = objseg.freeobj;
-
-    if (string == NIL)
-       string = Lisp__New(NIL, NIL);
-    else {
-       objseg.freeobj = CDR(string);
-       --objseg.nfree;
-    }
-    if (alloced)
-       cstring = str;
-    else {
-       cstring = LispMalloc(length + 1);
-       memcpy(cstring, str, length);
-       cstring[length] = '\0';
-    }
-    LispMused(cstring);
-    string->type = LispString_t;
-    THESTR(string) = cstring;
-    STRLEN(string) = length;
-    string->data.string.writable = 1;
-
-    return (string);
-}
-
-LispObj *
-LispNewComplex(LispObj *realpart, LispObj *imagpart)
-{
-    LispObj *complexp = objseg.freeobj;
-
-    if (complexp == NIL)
-       complexp = Lisp__New(realpart, imagpart);
-    else {
-       objseg.freeobj = CDR(complexp);
-       --objseg.nfree;
-    }
-    complexp->type = LispComplex_t;
-    complexp->data.complex.real = realpart;
-    complexp->data.complex.imag = imagpart;
-
-    return (complexp);
-}
-
-LispObj *
-LispNewInteger(long integer)
-{
-    if (integer > MOST_POSITIVE_FIXNUM || integer < MOST_NEGATIVE_FIXNUM) {
-       LispObj *object = objseg.freeobj;
-
-       if (object == NIL)
-           object = Lisp__New(NIL, NIL);
-       else {
-           objseg.freeobj = CDR(object);
-           --objseg.nfree;
-       }
-       object->type = LispInteger_t;
-       object->data.integer = integer;
-
-       return (object);
-    }
-    return (FIXNUM(integer));
-}
-
-LispObj *
-LispNewRatio(long num, long den)
-{
-    LispObj *ratio = objseg.freeobj;
-
-    if (ratio == NIL)
-       ratio = Lisp__New(NIL, NIL);
-    else {
-       objseg.freeobj = CDR(ratio);
-       --objseg.nfree;
-    }
-    ratio->type = LispRatio_t;
-    ratio->data.ratio.numerator = num;
-    ratio->data.ratio.denominator = den;
-
-    return (ratio);
-}
-
-LispObj *
-LispNewVector(LispObj *objects)
-{
-    GC_ENTER();
-    long count;
-    LispObj *array, *dimension;
-
-    for (count = 0, array = objects; CONSP(array); count++, array = CDR(array))
-       ;
-
-    GC_PROTECT(objects);
-    dimension = CONS(FIXNUM(count), NIL);
-    array = LispNew(objects, dimension);
-    array->type = LispArray_t;
-    array->data.array.list = objects;
-    array->data.array.dim = dimension;
-    array->data.array.rank = 1;
-    array->data.array.type = LispNil_t;
-    array->data.array.zero = count == 0;
-    GC_LEAVE();
-
-    return (array);
-}
-
-LispObj *
-LispNewQuote(LispObj *object)
-{
-    LispObj *quote = LispNew(object, NIL);
-
-    quote->type = LispQuote_t;
-    quote->data.quote = object;
-
-    return (quote);
-}
-
-LispObj *
-LispNewBackquote(LispObj *object)
-{
-    LispObj *backquote = LispNew(object, NIL);
-
-    backquote->type = LispBackquote_t;
-    backquote->data.quote = object;
-
-    return (backquote);
-}
-
-LispObj *
-LispNewComma(LispObj *object, int atlist)
-{
-    LispObj *comma = LispNew(object, NIL);
-
-    comma->type = LispComma_t;
-    comma->data.comma.eval = object;
-    comma->data.comma.atlist = atlist;
-
-    return (comma);
-}
-
-LispObj *
-LispNewCons(LispObj *car, LispObj *cdr)
-{
-    LispObj *cons = objseg.freeobj;
-
-    if (cons == NIL)
-       cons = Lisp__New(car, cdr);
-    else {
-       objseg.freeobj = CDR(cons);
-       --objseg.nfree;
-    }
-    CAR(cons) = car;
-    CDR(cons) = cdr;
-
-    return (cons);
-}
-
-LispObj *
-LispNewLambda(LispObj *name, LispObj *code, LispObj *data, LispFunType type)
-{
-    LispObj *fun = LispNew(data, code);
-
-    fun->type = LispLambda_t;
-    fun->funtype = type;
-    fun->data.lambda.name = name;
-    fun->data.lambda.code = code;
-    fun->data.lambda.data = data;
-
-    return (fun);
-}
-
-LispObj *
-LispNewStruct(LispObj *fields, LispObj *def)
-{
-    LispObj *struc = LispNew(fields, def);
-
-    struc->type = LispStruct_t;
-    struc->data.struc.fields = fields;
-    struc->data.struc.def = def;
-
-    return (struc);
-}
-
-LispObj *
-LispNewOpaque(void *data, int type)
-{
-    LispObj *opaque = LispNew(NIL, NIL);
-
-    opaque->type = LispOpaque_t;
-    opaque->data.opaque.data = data;
-    opaque->data.opaque.type = type;
-
-    return (opaque);
-}
-
-/* string argument must be static, or allocated */
-LispObj *
-LispNewKeyword(char *string)
-{
-    LispObj *keyword;
-
-    if (PACKAGE != lisp__data.keyword) {
-       LispObj *savepackage;
-       LispPackage *savepack;
-
-       /* Save package environment */
-       savepackage = PACKAGE;
-       savepack = lisp__data.pack;
-
-       /* Change package environment */
-       PACKAGE = lisp__data.keyword;
-       lisp__data.pack = lisp__data.key;
-
-       /* Create symbol in keyword package */
-       keyword = LispNewStaticAtom(string);
-
-       /* Restore package environment */
-       PACKAGE = savepackage;
-       lisp__data.pack = savepack;
-    }
-    else
-       /* Just create symbol in keyword package */
-       keyword = LispNewStaticAtom(string);
-
-    /* Export keyword symbol */
-    LispExportSymbol(keyword);
-
-    /* All keywords are constants */
-    keyword->data.atom->constant = 1;
-
-    /* XXX maybe should bound the keyword to itself, but that would
-     * require allocating a LispProperty structure for every keyword */
-
-    return (keyword);
-}
-
-LispObj *
-LispNewPathname(LispObj *obj)
-{
-    LispObj *path = LispNew(obj, NIL);
-
-    path->type = LispPathname_t;
-    path->data.pathname = obj;
-
-    return (path);
-}
-
-LispObj *
-LispNewStringStream(char *string, int flags, long length, int alloced)
-{
-    LispObj *stream = LispNew(NIL, NIL);
-
-    SSTREAMP(stream) = LispCalloc(1, sizeof(LispString));
-    if (alloced)
-       SSTREAMP(stream)->string = string;
-    else {
-       SSTREAMP(stream)->string = LispMalloc(length + 1);
-       memcpy(SSTREAMP(stream)->string, string, length);
-       SSTREAMP(stream)->string[length] = '\0';
-    }
-
-    stream->type = LispStream_t;
-
-    SSTREAMP(stream)->length = length;
-    LispMused(SSTREAMP(stream));
-    LispMused(SSTREAMP(stream)->string);
-    stream->data.stream.type = LispStreamString;
-    stream->data.stream.readable = (flags & STREAM_READ) != 0;
-    stream->data.stream.writable = (flags & STREAM_WRITE) != 0;
-    SSTREAMP(stream)->space = length + 1;
-
-    stream->data.stream.pathname = NIL;
-
-    return (stream);
-}
-
-LispObj *
-LispNewFileStream(LispFile *file, LispObj *path, int flags)
-{
-    LispObj *stream = LispNew(NIL, NIL);
-
-    stream->type = LispStream_t;
-    FSTREAMP(stream) = file;
-    stream->data.stream.pathname = path;
-    stream->data.stream.type = LispStreamFile;
-    stream->data.stream.readable = (flags & STREAM_READ) != 0;
-    stream->data.stream.writable = (flags & STREAM_WRITE) != 0;
-
-    return (stream);
-}
-
-LispObj *
-LispNewPipeStream(LispPipe *program, LispObj *path, int flags)
-{
-    LispObj *stream = LispNew(NIL, NIL);
-
-    stream->type = LispStream_t;
-    PSTREAMP(stream) = program;
-    stream->data.stream.pathname = path;
-    stream->data.stream.type = LispStreamPipe;
-    stream->data.stream.readable = (flags & STREAM_READ) != 0;
-    stream->data.stream.writable = (flags & STREAM_WRITE) != 0;
-
-    return (stream);
-}
-
-LispObj *
-LispNewStandardStream(LispFile *file, LispObj *description, int flags)
-{
-    LispObj *stream = LispNew(NIL, NIL);
-
-    stream->type = LispStream_t;
-    FSTREAMP(stream) = file;
-    stream->data.stream.pathname = description;
-    stream->data.stream.type = LispStreamStandard;
-    stream->data.stream.readable = (flags & STREAM_READ) != 0;
-    stream->data.stream.writable = (flags & STREAM_WRITE) != 0;
-
-    return (stream);
-}
-
-LispObj *
-LispNewBignum(mpi *bignum)
-{
-    LispObj *integer = LispNew(NIL, NIL);
-
-    integer->type = LispBignum_t;
-    integer->data.mp.integer = bignum;
-    LispMused(bignum->digs);
-    LispMused(bignum);
-
-    return (integer);
-}
-
-LispObj *
-LispNewBigratio(mpr *bigratio)
-{
-    LispObj *ratio = LispNew(NIL, NIL);
-
-    ratio->type = LispBigratio_t;
-    ratio->data.mp.ratio = bigratio;
-    LispMused(mpr_num(bigratio)->digs);
-    LispMused(mpr_den(bigratio)->digs);
-    LispMused(bigratio);
-
-    return (ratio);
-}
-
-/* name must be of type LispString_t */
-LispObj *
-LispNewPackage(LispObj *name, LispObj *nicknames)
-{
-    LispObj *package = LispNew(name, nicknames);
-    LispPackage *pack = LispCalloc(1, sizeof(LispPackage));
-
-    package->type = LispPackage_t;
-    package->data.package.name = name;
-    package->data.package.nicknames = nicknames;
-    package->data.package.package = pack;
-
-    package->data.package.package->atoms = hash_new(STRTBLSZ, NULL);
-
-    LispMused(pack);
-
-    return (package);
-}
-
-LispObj *
-LispSymbolFunction(LispObj *symbol)
-{
-    LispAtom *atom = symbol->data.atom;
-
-    if ((atom->a_builtin &&
-        atom->property->fun.builtin->type == LispFunction) ||
-       (atom->a_function &&
-        atom->property->fun.function->funtype == LispFunction) ||
-       (atom->a_defstruct &&
-        atom->property->structure.function != STRUCT_NAME) ||
-       /* XXX currently bytecode is only generated for functions */
-       atom->a_compiled)
-       symbol = FUNCTION(symbol);
-    else
-       LispDestroy("SYMBOL-FUNCTION: %s is not a function", STROBJ(symbol));
-
-    return (symbol);
-}
-
-
-static INLINE LispObj *
-LispGetVarPack(LispObj *symbol)
-{
-    LispAtom *atom;
-
-    atom = (LispAtom *)hash_get(lisp__data.pack->atoms,
-                                symbol->data.atom->key);
-
-    return (atom ? atom->object : NULL);
-}
-
-/* package must be of type LispPackage_t */
-void
-LispUsePackage(LispObj *package)
-{
-    LispAtom *atom;
-    LispPackage *pack;
-    LispObj **pentry, **eentry;
-
-    /* Already using its own symbols... */
-    if (package == PACKAGE)
-       return;
-
-    /* Check if package not already in use-package list */
-    for (pentry = lisp__data.pack->use.pairs,
-        eentry = pentry + lisp__data.pack->use.length;
-        pentry < eentry; pentry++)
-       if (*pentry == package)
-       return;
-
-    /* Remember this package is in the use-package list */
-    if (lisp__data.pack->use.length + 1 >= lisp__data.pack->use.space) {
-       LispObj **pairs = realloc(lisp__data.pack->use.pairs,
-                                 (lisp__data.pack->use.space + 1) *
-                                 sizeof(LispObj*));
-
-       if (pairs == NULL)
-           LispDestroy("out of memory");
-
-       lisp__data.pack->use.pairs = pairs;
-       ++lisp__data.pack->use.space;
-    }
-    lisp__data.pack->use.pairs[lisp__data.pack->use.length++] = package;
-
-    /* Import all extern symbols from package */
-    pack = package->data.package.package;
-
-    /* Traverse atom list, searching for extern symbols */
-    for (atom = (LispAtom *)hash_iter_first(pack->atoms);
-        atom;
-        atom = (LispAtom *)hash_iter_next(pack->atoms)) {
-       if (atom->ext)
-           LispImportSymbol(atom->object);
-    }
-}
-
-/* symbol must be of type LispAtom_t */
-void
-LispImportSymbol(LispObj *symbol)
-{
-    int increment;
-    LispAtom *atom;
-    LispObj *current;
-
-    current = LispGetVarPack(symbol);
-    if (current == NULL || current->data.atom->property == NOPROPERTY) {
-       /* No conflicts */
-
-       if (symbol->data.atom->a_object) {
-           /* If it is a bounded variable */
-           if (lisp__data.pack->glb.length + 1 >= lisp__data.pack->glb.space)
-               LispMoreGlobals(lisp__data.pack);
-           lisp__data.pack->glb.pairs[lisp__data.pack->glb.length++] = symbol;
-       }
-
-       /* Create copy of atom in current package */
-       atom = LispDoGetAtom(ATOMID(symbol)->value, 0);
-       /*   Need to create a copy because if anything new is atached to the
-        * property, the current package is the owner, not the previous one. */
-
-       /* And reference the same properties */
-       atom->property = symbol->data.atom->property;
-
-       increment = 1;
-    }
-    else if (current->data.atom->property != symbol->data.atom->property) {
-       /* Symbol already exists in the current package,
-        * but does not reference the same variable */
-       LispContinuable("Symbol %s already defined in package %s. Redefine?",
-                       ATOMID(symbol)->value, THESTR(PACKAGE->data.package.name));
-
-       atom = current->data.atom;
-
-       /* Continued from error, redefine variable */
-       LispDecrementAtomReference(atom);
-       atom->property = symbol->data.atom->property;
-       
-       atom->a_object = atom->a_function = atom->a_builtin =
-           atom->a_property = atom->a_defsetf = atom->a_defstruct = 0;
-
-       increment = 1;
-    }
-    else {
-       /* Symbol is already available in the current package, just update */
-       atom = current->data.atom;
-
-       increment = 0;
-    }
-
-    /* If importing an important system variable */
-    atom->watch = symbol->data.atom->watch;
-
-    /* Update constant flag */
-    atom->constant = symbol->data.atom->constant;
-
-    /* Set home-package and unique-atom associated with symbol */
-    atom->package = symbol->data.atom->package;
-    atom->object = symbol->data.atom->object;
-
-    if (symbol->data.atom->a_object)
-       atom->a_object = 1;
-    if (symbol->data.atom->a_function)
-       atom->a_function = 1;
-    else if (symbol->data.atom->a_builtin)
-       atom->a_builtin = 1;
-    else if (symbol->data.atom->a_compiled)
-       atom->a_compiled = 1;
-    if (symbol->data.atom->a_property)
-       atom->a_property = 1;
-    if (symbol->data.atom->a_defsetf)
-       atom->a_defsetf = 1;
-    if (symbol->data.atom->a_defstruct)
-       atom->a_defstruct = 1;
-
-    if (increment)
-       /* Increase reference count, more than one package using the symbol */
-       LispIncrementAtomReference(symbol->data.atom);
-}
-
-/* symbol must be of type LispAtom_t */
-void
-LispExportSymbol(LispObj *symbol)
-{
-    /* This does not automatically export symbols to another package using
-     * the symbols of the current package */
-    symbol->data.atom->ext = 1;
-}
-
-#ifdef __GNUC__
-LispObj *
-LispGetVar(LispObj *atom)
-{
-    return (LispDoGetVar(atom));
-}
-
-static INLINE LispObj *
-LispDoGetVar(LispObj *atom)
-#else
-#define LispDoGetVar LispGetVar
-LispObj *
-LispGetVar(LispObj *atom)
-#endif
-{
-    LispAtom *name;
-    int i, base, offset;
-    Atom_id id;
-
-    name = atom->data.atom;
-    if (name->constant && name->package == lisp__data.keyword)
-       return (atom);
-
-    /* XXX offset should be stored elsewhere, it is unique, like the string
-     * pointer. Unless a multi-thread interface is implemented (where
-     * multiple stacks would be required, the offset value should be
-     * stored with the string, so that a few cpu cicles could be saved
-     * by initializing the value to -1, and only searching for the symbol
-     * binding if it is not -1, and if no binding is found, because the
-     * lexical scope was left, reset offset to -1. */
-    offset = name->offset;
-    id = name->key;
-    base = lisp__data.env.lex;
-    i = lisp__data.env.head - 1;
-
-    if (offset <= i && (offset >= base || name->dyn) &&
-       lisp__data.env.names[offset] == id)
-       return (lisp__data.env.values[offset]);
-
-    for (; i >= base; i--)
-       if (lisp__data.env.names[i] == id) {
-           name->offset = i;
-
-           return (lisp__data.env.values[i]);
-       }
-
-    if (name->dyn) {
-       /* Keep searching as maybe a rebound dynamic variable */
-       for (; i >= 0; i--)
-           if (lisp__data.env.names[i] == id) {
-               name->offset = i;
-
-           return (lisp__data.env.values[i]);
-       }
-
-       if (name->a_object) {
-           /* Check for a symbol defined as special, but not yet bound. */
-           if (name->property->value == UNBOUND)
-               return (NULL);
-
-           return (name->property->value);
-       }
-    }
-
-    return (name->a_object ? name->property->value : NULL);
-}
-
-#ifdef DEBUGGER
-/* Same code as LispDoGetVar, but returns the address of the pointer to
- * the object value. Used only by the debugger */
-void *
-LispGetVarAddr(LispObj *atom)
-{
-    LispAtom *name;
-    int i, base;
-    Atom_id id;
-
-    name = atom->data.atom;
-    if (name->constant && name->package == lisp__data.keyword)
-       return (&atom);
-
-    id = name->string;
-
-    i = lisp__data.env.head - 1;
-    for (base = lisp__data.env.lex; i >= base; i--)
-       if (lisp__data.env.names[i] == id)
-           return (&(lisp__data.env.values[i]));
-
-    if (name->dyn) {
-       for (; i >= 0; i--)
-           if (lisp__data.env.names[i] == id)
-               return (&(lisp__data.env.values[i]));
-
-       if (name->a_object) {
-           /* Check for a symbol defined as special, but not yet bound */
-           if (name->property->value == UNBOUND)
-               return (NULL);
-
-           return (&(name->property->value));
-       }
-    }
-
-    return (name->a_object ? &(name->property->value) : NULL);
-}
-#endif
-
-/* Only removes global variables. To be called by makunbound
- * Local variables are unbounded once their block is closed anyway.
- */
-void
-LispUnsetVar(LispObj *atom)
-{
-    LispAtom *name = atom->data.atom;
-
-    if (name->package) {
-       int i;
-       LispPackage *pack = name->package->data.package.package;
-
-       for (i = pack->glb.length - 1; i > 0; i--)
-           if (pack->glb.pairs[i] == atom) {
-               LispRemAtomObjectProperty(name);
-               --pack->glb.length;
-               if (i < pack->glb.length)
-                   memmove(pack->glb.pairs + i, pack->glb.pairs + i + 1,
-                           sizeof(LispObj*) * (pack->glb.length - i));
-
-               /* unset hint about dynamically binded variable */
-               if (name->dyn)
-                   name->dyn = 0;
-               break;
-           }
-    }
-}
-
-LispObj *
-LispAddVar(LispObj *atom, LispObj *obj)
-{
-    if (lisp__data.env.length >= lisp__data.env.space)
-       LispMoreEnvironment();
-
-    LispDoAddVar(atom, obj);
-
-    return (obj);
-}
-
-static INLINE void
-LispDoAddVar(LispObj *symbol, LispObj *value)
-{
-    LispAtom *atom = symbol->data.atom;
-
-    atom->offset = lisp__data.env.length;
-    lisp__data.env.values[lisp__data.env.length] = value;
-    lisp__data.env.names[lisp__data.env.length++] = atom->key;
-}
-
-LispObj *
-LispSetVar(LispObj *atom, LispObj *obj)
-{
-    LispPackage *pack;
-    LispAtom *name;
-    int i, base, offset;
-    Atom_id id;
-
-    name = atom->data.atom;
-    offset = name->offset;
-    id = name->key;
-    base = lisp__data.env.lex;
-    i = lisp__data.env.head - 1;
-
-    if (offset <= i && (offset >= base || name->dyn) &&
-       lisp__data.env.names[offset] == id)
-       return (lisp__data.env.values[offset] = obj);
-
-    for (; i >= base; i--)
-       if (lisp__data.env.names[i] == id) {
-           name->offset = i;
-
-           return (lisp__data.env.values[i] = obj);
-       }
-
-    if (name->dyn) {
-       for (; i >= 0; i--)
-           if (lisp__data.env.names[i] == id)
-               return (lisp__data.env.values[i] = obj);
-
-       if (name->watch) {
-           LispSetAtomObjectProperty(name, obj);
-
-           return (obj);
-       }
-
-       return (SETVALUE(name, obj));
-    }
-
-    if (name->a_object) {
-       if (name->watch) {
-           LispSetAtomObjectProperty(name, obj);
-
-           return (obj);
-       }
-
-       return (SETVALUE(name, obj));
-    }
-
-    LispSetAtomObjectProperty(name, obj);
-
-    pack = name->package->data.package.package;
-    if (pack->glb.length >= pack->glb.space)
-       LispMoreGlobals(pack);
-
-    pack->glb.pairs[pack->glb.length++] = atom;
-
-    return (obj);
-}
-
-void
-LispProclaimSpecial(LispObj *atom, LispObj *value, LispObj *doc)
-{
-    int i = 0, dyn, glb;
-    LispAtom *name;
-    LispPackage *pack;
-
-    glb = 0;
-    name = atom->data.atom;
-    pack = name->package->data.package.package;
-    dyn = name->dyn;
-
-    if (!dyn) {
-       /* Note: don't check if a local variable already is using the symbol */
-       for (i = pack->glb.length - 1; i >= 0; i--)
-           if (pack->glb.pairs[i] == atom) {
-               glb = 1;
-               break;
-           }
-    }
-
-    if (dyn) {
-       if (name->property->value == UNBOUND && value)
-           /* if variable was just made special, but not bounded */
-           LispSetAtomObjectProperty(name, value);
-    }
-    else if (glb)
-       /* Already a global variable, but not marked as special.
-        * Set hint about dynamically binded variable. */
-       name->dyn = 1;
-    else {
-       /* create new special variable */
-       LispSetAtomObjectProperty(name, value ? value : UNBOUND);
-
-       if (pack->glb.length >= pack->glb.space)
-           LispMoreGlobals(pack);
-
-       pack->glb.pairs[pack->glb.length] = atom;
-       ++pack->glb.length;
-       /* set hint about possibly dynamically binded variable */
-       name->dyn = 1;
-    }
-
-    if (doc != NIL)
-       LispAddDocumentation(atom, doc, LispDocVariable);
-}
-
-void
-LispDefconstant(LispObj *atom, LispObj *value, LispObj *doc)
-{
-    int i;
-    LispAtom *name = atom->data.atom;
-    LispPackage *pack = name->package->data.package.package;
-
-    /* Unset hint about dynamically binded variable, if set. */
-    name->dyn = 0;
-
-    /* Check if variable is bounded as a global variable */
-    for (i = pack->glb.length - 1; i >= 0; i--)
-       if (pack->glb.pairs[i] == atom)
-           break;
-
-    if (i < 0) {
-       /* Not a global variable */
-       if (pack->glb.length >= pack->glb.space)
-           LispMoreGlobals(pack);
-
-       pack->glb.pairs[pack->glb.length] = atom;
-       ++pack->glb.length;
-    }
-
-    /* If already a constant variable */
-    if (name->constant && name->a_object && name->property->value != value)
-       LispWarning("constant %s is being redefined", STROBJ(atom));
-    else
-       name->constant = 1;
-
-    /* Set constant value */
-    LispSetAtomObjectProperty(name, value);
-
-    if (doc != NIL)
-       LispAddDocumentation(atom, doc, LispDocVariable);
-}
-
-void
-LispAddDocumentation(LispObj *symbol, LispObj *documentation, LispDocType_t type)
-{
-    int length;
-    char *string;
-    LispAtom *atom;
-    LispObj *object;
-
-    if (!SYMBOLP(symbol) || !STRINGP(documentation))
-       LispDestroy("DOCUMENTATION: invalid argument");
-
-    atom = symbol->data.atom;
-    if (atom->documentation[type])
-       LispRemDocumentation(symbol, type);
-
-    /* allocate documentation in atomseg */
-    if (atomseg.freeobj == NIL)
-       LispAllocSeg(&atomseg, pagesize);
-    length = STRLEN(documentation);
-    string = LispMalloc(length);
-    memcpy(string, THESTR(documentation), length);
-    string[length] = '\0';
-    object = atomseg.freeobj;
-    atomseg.freeobj = CDR(object);
-    --atomseg.nfree;
-
-    object->type = LispString_t;
-    THESTR(object) = string;
-    STRLEN(object) = length;
-    object->data.string.writable = 0;
-    atom->documentation[type] = object;
-    LispMused(string);
-}
-
-void
-LispRemDocumentation(LispObj *symbol, LispDocType_t type)
-{
-    LispAtom *atom;
-
-    if (!SYMBOLP(symbol))
-       LispDestroy("DOCUMENTATION: invalid argument");
-
-    atom = symbol->data.atom;
-    if (atom->documentation[type]) {
-       /* reclaim object to atomseg */
-       free(THESTR(atom->documentation[type]));
-       CDR(atom->documentation[type]) = atomseg.freeobj;
-       atomseg.freeobj = atom->documentation[type];
-       atom->documentation[type] = NULL;
-       ++atomseg.nfree;
-    }
-}
-
-LispObj *
-LispGetDocumentation(LispObj *symbol, LispDocType_t type)
-{
-    LispAtom *atom;
-
-    if (!SYMBOLP(symbol))
-       LispDestroy("DOCUMENTATION: invalid argument");
-
-    atom = symbol->data.atom;
-
-    return (atom->documentation[type] ? atom->documentation[type] : NIL);
-}
-
-LispObj *
-LispReverse(LispObj *list)
-{
-    LispObj *tmp, *res = NIL;
-
-    while (list != NIL) {
-       tmp = CDR(list);
-       CDR(list) = res;
-       res = list;
-       list = tmp;
-    }
-
-    return (res);
-}
-
-LispBlock *
-LispBeginBlock(LispObj *tag, LispBlockType type)
-{
-    LispBlock *block;
-    unsigned blevel = lisp__data.block.block_level + 1;
-
-    if (blevel > lisp__data.block.block_size) {
-       LispBlock **blk;
-
-       if (blevel > MAX_STACK_DEPTH)
-           LispDestroy("stack overflow");
-
-       DISABLE_INTERRUPTS();
-       blk = realloc(lisp__data.block.block, sizeof(LispBlock*) * (blevel + 1));
-
-       block = NULL;
-       if (blk == NULL || (block = malloc(sizeof(LispBlock))) == NULL) {
-           ENABLE_INTERRUPTS();
-           LispDestroy("out of memory");
-       }
-       lisp__data.block.block = blk;
-       lisp__data.block.block[lisp__data.block.block_size] = block;
-       lisp__data.block.block_size = blevel;
-       ENABLE_INTERRUPTS();
-    }
-    block = lisp__data.block.block[lisp__data.block.block_level];
-    if (type == LispBlockCatch && !CONSTANTP(tag)) {
-       tag = EVAL(tag);
-       lisp__data.protect.objects[lisp__data.protect.length++] = tag;
-    }
-    block->type = type;
-    block->tag = tag;
-    block->stack = lisp__data.stack.length;
-    block->protect = lisp__data.protect.length;
-    block->block_level = lisp__data.block.block_level;
-
-    lisp__data.block.block_level = blevel;
-
-#ifdef DEBUGGER
-    if (lisp__data.debugging) {
-       block->debug_level = lisp__data.debug_level;
-       block->debug_step = lisp__data.debug_step;
-    }
-#endif
-
-    return (block);
-}
-
-void
-LispEndBlock(LispBlock *block)
-{
-    lisp__data.protect.length = block->protect;
-    lisp__data.block.block_level = block->block_level;
-
-#ifdef DEBUGGER
-    if (lisp__data.debugging) {
-       if (lisp__data.debug_level >= block->debug_level) {
-           while (lisp__data.debug_level > block->debug_level) {
-               DBG = CDR(DBG);
-               --lisp__data.debug_level;
-           }
-       }
-       lisp__data.debug_step = block->debug_step;
-    }
-#endif
-}
-
-void
-LispBlockUnwind(LispBlock *block)
-{
-    LispBlock *unwind;
-    int blevel = lisp__data.block.block_level;
-
-    while (blevel > 0) {
-       unwind = lisp__data.block.block[--blevel];
-       if (unwind->type == LispBlockProtect) {
-           BLOCKJUMP(unwind);
-       }
-       if (unwind == block)
-           /* jump above unwind block */
-           break;
-    }
-}
-
-static LispObj *
-LispEvalBackquoteObject(LispObj *argument, int list, int quote)
-{
-    LispObj *result = argument, *object;
-
-    if (!POINTERP(argument))
-       return (argument);
-
-    else if (XCOMMAP(argument)) {
-       /* argument may need to be evaluated */
-
-       int atlist;
-
-       if (!list && argument->data.comma.atlist)
-           /* cannot append, not in a list */
-           LispDestroy("EVAL: ,@ only allowed on lists");
-
-       --quote;
-       if (quote < 0)
-           LispDestroy("EVAL: comma outside of backquote");
-
-       result = object = argument->data.comma.eval;
-       atlist = COMMAP(object) && object->data.comma.atlist;
-
-       if (POINTERP(result) && (XCOMMAP(result) || XBACKQUOTEP(result)))
-           /* nested commas, reduce 1 level, or backquote,
-            * don't call LispEval or quote argument will be reset */
-           result = LispEvalBackquoteObject(object, 0, quote);
-
-       else if (quote == 0)
-          /* just evaluate it */
-           result = EVAL(result);
-
-       if (quote != 0)
-           result = result == object ? argument : COMMA(result, atlist);
-    }
-
-    else if (XBACKQUOTEP(argument)) {
-       object = argument->data.quote;
-
-       result = LispEvalBackquote(object, quote + 1);
-       if (quote)
-           result = result == object ? argument : BACKQUOTE(result);
-    }
-
-    else if (XQUOTEP(argument) && POINTERP(argument->data.quote) &&
-            (XCOMMAP(argument->data.quote) ||
-             XBACKQUOTEP(argument->data.quote) ||
-             XCONSP(argument->data.quote))) {
-       /* ensures `',sym to be the same as `(quote ,sym) */
-       object = argument->data.quote;
-
-       result = LispEvalBackquote(argument->data.quote, quote);
-       result = result == object ? argument : QUOTE(result);
-    }
-
-    return (result);
-}
-
-LispObj *
-LispEvalBackquote(LispObj *argument, int quote)
-{
-    int protect;
-    LispObj *result, *object, *cons, *cdr;
-
-    if (!CONSP(argument))
-       return (LispEvalBackquoteObject(argument, 0, quote));
-
-    result = cdr = NIL;
-    protect = lisp__data.protect.length;
-
-    /* always generate a new list for the result, even if nothing
-     * is evaluated. It is not expected to use backqoutes when
-     * not required. */
-
-    /* reserve a GC protected slot for the result */
-    if (protect + 1 >= lisp__data.protect.space)
-       LispMoreProtects();
-    lisp__data.protect.objects[lisp__data.protect.length++] = NIL;
-
-    for (cons = argument; ; cons = CDR(cons)) {
-       /* if false, last argument, and if cons is not NIL, a dotted list */
-       int list = CONSP(cons), insert;
-
-       if (list)
-           object = CAR(cons);
-       else
-           object = cons;
-
-       if (COMMAP(object))
-           /* need to insert list elements in result, not just cons it? */
-           insert = object->data.comma.atlist;
-       else
-           insert = 0;
-
-       /* evaluate object, if required */
-       if (CONSP(object))
-           object = LispEvalBackquote(object, quote);
-       else
-           object = LispEvalBackquoteObject(object, insert, quote);
-
-       if (result == NIL) {
-           /* if starting result list */
-           if (!insert) {
-               if (list)
-                   result = cdr = CONS(object, NIL);
-               else
-                   result = cdr = object;
-               /* gc protect result */
-               lisp__data.protect.objects[protect] = result;
-           }
-           else {
-               if (!CONSP(object)) {
-                   result = cdr = object;
-                   /* gc protect result */
-                   lisp__data.protect.objects[protect] = result;
-               }
-               else {
-                   result = cdr = CONS(CAR(object), NIL);
-                   /* gc protect result */
-                   lisp__data.protect.objects[protect] = result;
-
-                   /* add remaining elements to result */
-                   for (object = CDR(object);
-                        CONSP(object);
-                        object = CDR(object)) {
-                       RPLACD(cdr, CONS(CAR(object), NIL));
-                       cdr = CDR(cdr);
-                   }
-                   if (object != NIL) {
-                       /* object was a dotted list */
-                       RPLACD(cdr, object);
-                       cdr = CDR(cdr);
-                   }
-               }
-           }
-       }
-       else {
-           if (!CONSP(cdr))
-               LispDestroy("EVAL: cannot append to %s", STROBJ(cdr));
-
-           if (!insert) {
-               if (list) {
-                   RPLACD(cdr, CONS(object, NIL));
-                   cdr = CDR(cdr);
-               }
-               else {
-                   RPLACD(cdr, object);
-                   cdr = object;
-               }
-           }
-           else {
-               if (!CONSP(object)) {
-                   RPLACD(cdr, object);
-                   /* if object is NIL, it is a empty list appended, not
-                    * creating a dotted list. */
-                   if (object != NIL)
-                       cdr = object;
-               }
-               else {
-                   for (; CONSP(object); object = CDR(object)) {
-                       RPLACD(cdr, CONS(CAR(object), NIL));
-                       cdr = CDR(cdr);
-                   }
-                   if (object != NIL) {
-                       /* object was a dotted list */
-                       RPLACD(cdr, object);
-                       cdr = CDR(cdr);
-                   }
-               }
-           }
-       }
-
-       /* if last argument list element processed */
-       if (!list)
-           break;
-    }
-
-    lisp__data.protect.length = protect;
-
-    return (result);
-}
-
-void
-LispMoreEnvironment(void)
-{
-    Atom_id *names;
-    LispObj **values;
-
-    DISABLE_INTERRUPTS();
-    names = realloc(lisp__data.env.names,
-                   (lisp__data.env.space + 256) * sizeof(Atom_id));
-    if (names != NULL) {
-       values = realloc(lisp__data.env.values,
-                        (lisp__data.env.space + 256) * sizeof(LispObj*));
-       if (values != NULL) {
-           lisp__data.env.names = names;
-           lisp__data.env.values = values;
-           lisp__data.env.space += 256;
-           ENABLE_INTERRUPTS();
-           return;
-       }
-       else
-           free(names);
-    }
-    ENABLE_INTERRUPTS();
-    LispDestroy("out of memory");
-}
-
-void
-LispMoreStack(void)
-{
-    LispObj **values;
-
-    DISABLE_INTERRUPTS();
-    values = realloc(lisp__data.stack.values,
-                    (lisp__data.stack.space + 256) * sizeof(LispObj*));
-    if (values == NULL) {
-       ENABLE_INTERRUPTS();
-       LispDestroy("out of memory");
-    }
-    lisp__data.stack.values = values;
-    lisp__data.stack.space += 256;
-    ENABLE_INTERRUPTS();
-}
-
-void
-LispMoreGlobals(LispPackage *pack)
-{
-    LispObj **pairs;
-
-    DISABLE_INTERRUPTS();
-    pairs = realloc(pack->glb.pairs,
-                   (pack->glb.space + 256) * sizeof(LispObj*));
-    if (pairs == NULL) {
-       ENABLE_INTERRUPTS();
-       LispDestroy("out of memory");
-    }
-    pack->glb.pairs = pairs;
-    pack->glb.space += 256;
-    ENABLE_INTERRUPTS();
-}
-
-void
-LispMoreProtects(void)
-{
-    LispObj **objects;
-
-    DISABLE_INTERRUPTS();
-    objects = realloc(lisp__data.protect.objects,
-                     (lisp__data.protect.space + 256) * sizeof(LispObj*));
-    if (objects == NULL) {
-       ENABLE_INTERRUPTS();
-       LispDestroy("out of memory");
-    }
-    lisp__data.protect.objects = objects;
-    lisp__data.protect.space += 256;
-    ENABLE_INTERRUPTS();
-}
-
-static int
-LispMakeEnvironment(LispArgList *alist, LispObj *values,
-                   LispObj *name, int eval, int builtin)
-{
-    char *desc;
-    int i, count, base;
-    LispObj **symbols, **defaults, **sforms;
-
-#define BUILTIN_ARGUMENT(value)                                \
-    lisp__data.stack.values[lisp__data.stack.length++] = value
-
-/* If the index value is from register variables, this
- * can save some cpu time. Useful for normal arguments
- * that are the most common, and thus the ones that
- * consume more time in LispMakeEnvironment. */
-#define BUILTIN_NO_EVAL_ARGUMENT(index, value)         \
-    lisp__data.stack.values[index] = value
-
-#define NORMAL_ARGUMENT(symbol, value)                 \
-    LispDoAddVar(symbol, value)
-
-    if (builtin) {
-       base = lisp__data.stack.length;
-       if (base + alist->num_arguments > lisp__data.stack.space) {
-           do
-               LispMoreStack();
-           while (base + alist->num_arguments > lisp__data.stack.space);
-       }
-    }
-    else {
-       base = lisp__data.env.length;
-       if (base + alist->num_arguments > lisp__data.env.space) {
-           do
-               LispMoreEnvironment();
-           while (base + alist->num_arguments > lisp__data.env.space);
-       }
-    }
-
-    desc = alist->description;
-    switch (*desc++) {
-       case '.':
-           goto normal_label;
-       case 'o':
-           goto optional_label;
-       case 'k':
-           goto key_label;
-       case 'r':
-           goto rest_label;
-       case 'a':
-           goto aux_label;
-       default:
-           goto done_label;
-    }
-
-
-    /* Code below is done in several almost identical loops, to avoid
-     * checking the value of the arguments eval and builtin too much times */
-
-
-    /* Normal arguments */
-normal_label:
-    i = 0;
-    count = alist->normals.num_symbols;
-    if (builtin) {
-       if (eval) {
-           for (; i < count && CONSP(values); i++, values = CDR(values)) {
-               BUILTIN_ARGUMENT(EVAL(CAR(values)));
-           }
-       }
-       else {
-           for (; i < count && CONSP(values); i++, values = CDR(values)) {
-               BUILTIN_NO_EVAL_ARGUMENT(base + i, CAR(values));
-           }
-           /* macro BUILTIN_NO_EVAL_ARGUMENT does not update
-            * lisp__data.stack.length, as there is no risk of GC while
-            * adding the arguments. */
-           lisp__data.stack.length += i;
-       }
-    }
-    else {
-       symbols = alist->normals.symbols;
-       if (eval) {
-           for (; i < count && CONSP(values); i++, values = CDR(values)) {
-               NORMAL_ARGUMENT(symbols[i], EVAL(CAR(values)));
-           }
-       }
-       else {
-           for (; i < count && CONSP(values); i++, values = CDR(values)) {
-               NORMAL_ARGUMENT(symbols[i], CAR(values));
-           }
-       }
-    }
-    if (i < count)
-       LispDestroy("%s: too few arguments", STROBJ(name));
-
-    switch (*desc++) {
-       case 'o':
-           goto optional_label;
-       case 'k':
-           goto key_label;
-       case 'r':
-           goto rest_label;
-       case 'a':
-           goto aux_label;
-       default:
-           goto done_label;
-    }
-
-    /* &OPTIONAL */
-optional_label:
-    i = 0;
-    count = alist->optionals.num_symbols;
-    defaults = alist->optionals.defaults;
-    sforms = alist->optionals.sforms;
-    if (builtin) {
-       if (eval) {
-           for (; i < count && CONSP(values); i++, values = CDR(values))
-               BUILTIN_ARGUMENT(EVAL(CAR(values)));
-           for (; i < count; i++)
-               BUILTIN_ARGUMENT(UNSPEC);
-       }
-       else {
-           for (; i < count && CONSP(values); i++, values = CDR(values))
-               BUILTIN_ARGUMENT(CAR(values));
-           for (; i < count; i++)
-               BUILTIN_ARGUMENT(UNSPEC);
-       }
-    }
-    else {
-       symbols = alist->optionals.symbols;
-       if (eval) {
-           for (; i < count && CONSP(values); i++, values = CDR(values)) {
-               NORMAL_ARGUMENT(symbols[i], EVAL(CAR(values)));
-               if (sforms[i]) {
-                   NORMAL_ARGUMENT(sforms[i], T);
-               }
-           }
-       }
-       else {
-           for (; i < count && CONSP(values); i++, values = CDR(values)) {
-               NORMAL_ARGUMENT(symbols[i], CAR(values));
-               if (sforms[i]) {
-                   NORMAL_ARGUMENT(sforms[i], T);
-               }
-           }
-       }
-
-       /* default arguments are evaluated for macros */
-       for (; i < count; i++) {
-           if (!CONSTANTP(defaults[i])) {
-               int head = lisp__data.env.head;
-               int lex = lisp__data.env.lex;
-
-               lisp__data.env.lex = base;
-               lisp__data.env.head = lisp__data.env.length;
-               NORMAL_ARGUMENT(symbols[i], EVAL(defaults[i]));
-               lisp__data.env.head = head;
-               lisp__data.env.lex = lex;
-           }
-           else {
-               NORMAL_ARGUMENT(symbols[i], defaults[i]);
-           }
-           if (sforms[i]) {
-               NORMAL_ARGUMENT(sforms[i], NIL);
-           }
-       }
-    }
-    switch (*desc++) {
-       case 'k':
-           goto key_label;
-       case 'r':
-           goto rest_label;
-       case 'a':
-           goto aux_label;
-       default:
-           goto done_label;
-    }
-
-    /* &KEY */
-key_label:
-    {
-       int argc, nused;
-       LispObj *val, *karg, **keys;
-
-       /* Count number of remaining arguments */
-       for (karg = values, argc = 0; CONSP(karg); karg = CDR(karg), argc++) {
-           karg = CDR(karg);
-           if (!CONSP(karg))
-               LispDestroy("%s: &KEY needs arguments as pairs",
-                           STROBJ(name));
-       }
-
-
-       /* OPTIMIZATION:
-        * Builtin functions require that the keyword be in the keyword package.
-        * User functions don't need the arguments being pushed in the stack
-        * in the declared order (bytecode expects it...).
-        * XXX Error checking should be done elsewhere, code may be looping
-        * and doing error check here may consume too much cpu time.
-        * XXX Would also be good to already have the arguments specified in
-        * the correct order.
-        */
-
-
-       nused = 0;
-       val = NIL;
-       count = alist->keys.num_symbols;
-       symbols = alist->keys.symbols;
-       defaults = alist->keys.defaults;
-       sforms = alist->keys.sforms;
-       if (builtin) {
-
-           /* Arguments must be created in the declared order */
-           i = 0;
-           if (eval) {
-               for (; i < count; i++) {
-                   for (karg = values; CONSP(karg); karg = CDDR(karg)) {
-                       /* This is only true if both point to the
-                        * same symbol in the keyword package. */
-                       if (symbols[i] == CAR(karg)) {
-                           if (karg == values)
-                               values = CDDR(values);
-                           ++nused;
-                           BUILTIN_ARGUMENT(EVAL(CADR(karg)));
-                           goto keyword_builtin_eval_used_label;
-                       }
-                   }
-                   BUILTIN_ARGUMENT(UNSPEC);
-keyword_builtin_eval_used_label:;
-               }
-           }
-           else {
-               for (; i < count; i++) {
-                   for (karg = values; CONSP(karg); karg = CDDR(karg)) {
-                       if (symbols[i] == CAR(karg)) {
-                           if (karg == values)
-                               values = CDDR(values);
-                           ++nused;
-                           BUILTIN_ARGUMENT(CADR(karg));
-                           goto keyword_builtin_used_label;
-                       }
-                   }
-                   BUILTIN_ARGUMENT(UNSPEC);
-keyword_builtin_used_label:;
-               }
-           }
-
-           if (argc != nused) {
-               /* Argument(s) may be incorrectly specified, or specified
-                * twice (what is not an error). */
-               for (karg = values; CONSP(karg); karg = CDDR(karg)) {
-                   val = CAR(karg);
-                   if (KEYWORDP(val)) {
-                       for (i = 0; i < count; i++)
-                           if (symbols[i] == val)
-                               break;
-                   }
-                   else
-                       /* Just make the error test true */
-                       i = count;
-
-                   if (i == count)
-                       goto invalid_keyword_label;
-               }
-           }
-       }
-
-#if 0
-       else {
-           /* The base offset of the atom in the stack, to check for
-            * keywords specified twice. */
-           LispObj *symbol;
-           int offset = lisp__data.env.length;
-
-           keys = alist->keys.keys;
-           for (karg = values; CONSP(karg); karg = CDDR(karg)) {
-               symbol = CAR(karg);
-               if (SYMBOLP(symbol)) {
-                   /* Must be a keyword, but even if it is a keyword, may
-                    * be a typo, so assume it is correct. If it is not
-                    * in the argument list, it is an error. */
-                   for (i = 0; i < count; i++) {
-                       if (!keys[i] && symbols[i] == symbol) {
-                           LispAtom *atom = symbol->data.atom;
-
-                           /* Symbol found in the argument list. */
-                           if (atom->offset >= offset &&
-                               atom->offset < offset + nused &&
-                               lisp__data.env.names[atom->offset] ==
-                               atom->string)
-                               /* Specified more than once... */
-                               goto keyword_duplicated_label;
-                           break;
-                       }
-                   }
-               }
-               else {
-                   Atom_id id;
-
-                   if (!QUOTEP(symbol) || !SYMBOLP(val = symbol->data.quote)) {
-                       /* Bad argument. */
-                       val = symbol;
-                       goto invalid_keyword_label;
-                   }
-
-                   id = ATOMID(val);
-                   for (i = 0; i < count; i++) {
-                       if (keys[i] && ATOMID(keys[i]) == id) {
-                           LispAtom *atom = val->data.atom;
-
-                           /* Symbol found in the argument list. */
-                           if (atom->offset >= offset &&
-                               atom->offset < offset + nused &&
-                               lisp__data.env.names[atom->offset] ==
-                               atom->string)
-                               /* Specified more than once... */
-                               goto keyword_duplicated_label;
-                           break;
-                       }
-                   }
-               }
-               if (i == count) {
-                   /* Argument specification not found. */
-                   val = symbol;
-                   goto invalid_keyword_label;
-               }
-               ++nused;
-               if (eval) {
-                   NORMAL_ARGUMENT(symbols[i], EVAL(CADR(karg)));
-               }
-               else {
-                   NORMAL_ARGUMENT(symbols[i], CADR(karg));
-               }
-               if (sforms[i]) {
-                   NORMAL_ARGUMENT(sforms[i], T);
-               }
-keyword_duplicated_label:;
-           }
-
-           /* Add variables that were not specified in the function call. */
-           if (nused < count) {
-               int j;
-
-               for (i = 0; i < count; i++) {
-                   Atom_id id = ATOMID(symbols[i]);
-
-                   for (j = offset + nused - 1; j >= offset; j--) {
-                       if (lisp__data.env.names[j] == id)
-                           break;
-                   }
-
-                   if (j < offset) {
-                       /* Argument not specified. Use default value */
-
-                       /* default arguments are evaluated for macros */
-                       if (!CONSTANTP(defaults[i])) {
-                           int head = lisp__data.env.head;
-                           int lex = lisp__data.env.lex;
-
-                           lisp__data.env.lex = base;
-                           lisp__data.env.head = lisp__data.env.length;
-                           NORMAL_ARGUMENT(symbols[i], EVAL(defaults[i]));
-                           lisp__data.env.head = head;
-                           lisp__data.env.lex = lex;
-                       }
-                       else {
-                           NORMAL_ARGUMENT(symbols[i], defaults[i]);
-                       }
-                       if (sforms[i]) {
-                           NORMAL_ARGUMENT(sforms[i], NIL);
-                       }
-                   }
-               }
-           }
-       }
-#else
-       else {
-           int varset;
-
-           sforms = alist->keys.sforms;
-           keys = alist->keys.keys;
-
-           /* Add variables */
-           for (i = 0; i < alist->keys.num_symbols; i++) {
-               val = defaults[i];
-               varset = 0;
-               if (keys[i]) {
-                   Atom_id atom = ATOMID(keys[i]);
-
-                   /* Special keyword specification, need to compare ATOMID
-                    * and keyword specification must be a quoted object */
-                   for (karg = values; CONSP(karg); karg = CDR(karg)) {
-                       val = CAR(karg);
-                       if (QUOTEP(val) && atom == ATOMID(val->data.quote)) {
-                           val = CADR(karg);
-                           varset = 1;
-                           ++nused;
-                           break;
-                       }
-                       karg = CDR(karg);
-                   }
-               }
-
-               else {
-                   /* Normal keyword specification, can compare object pointers,
-                    * as they point to the same object in the keyword package */
-                   for (karg = values; CONSP(karg); karg = CDR(karg)) {
-                       /* Don't check if argument is a valid keyword or
-                        * special quoted keyword */
-                       if (symbols[i] == CAR(karg)) {
-                           val = CADR(karg);
-                           varset = 1;
-                           ++nused;
-                           break;
-                       }
-                       karg = CDR(karg);
-                   }
-               }
-
-               /* Add the variable to environment */
-               if (varset) {
-                   NORMAL_ARGUMENT(symbols[i], eval ? EVAL(val) : val);
-                   if (sforms[i]) {
-                       NORMAL_ARGUMENT(sforms[i], T);
-                   }
-               }
-               else {
-                   /* default arguments are evaluated for macros */
-                   if (!CONSTANTP(val)) {
-                       int head = lisp__data.env.head;
-                       int lex = lisp__data.env.lex;
-
-                       lisp__data.env.lex = base;
-                       lisp__data.env.head = lisp__data.env.length;
-                       NORMAL_ARGUMENT(symbols[i], EVAL(val));
-                       lisp__data.env.head = head;
-                       lisp__data.env.lex = lex;
-                   }
-                   else {
-                       NORMAL_ARGUMENT(symbols[i], val);
-                   }
-                   if (sforms[i]) {
-                       NORMAL_ARGUMENT(sforms[i], NIL);
-                   }
-               }
-           }
-
-           if (argc != nused) {
-               /* Argument(s) may be incorrectly specified, or specified
-                * twice (what is not an error). */
-               for (karg = values; CONSP(karg); karg = CDDR(karg)) {
-                   val = CAR(karg);
-                   if (KEYWORDP(val)) {
-                       for (i = 0; i < count; i++)
-                           if (symbols[i] == val)
-                               break;
-                   }
-                   else if (QUOTEP(val) && SYMBOLP(val->data.quote)) {
-                       Atom_id atom = ATOMID(val->data.quote);
-
-                       for (i = 0; i < count; i++)
-                           if (ATOMID(keys[i]) == atom)
-                               break;
-                   }
-                   else
-                       /* Just make the error test true */
-                       i = count;
-
-                   if (i == count)
-                       goto invalid_keyword_label;
-               }
-           }
-       }
-#endif
-       goto check_aux_label;
-
-invalid_keyword_label:
-       {
-           /* If not in argument specification list... */
-           char function_name[36];
-
-           strcpy(function_name, STROBJ(name));
-           LispDestroy("%s: %s is an invalid keyword",
-                       function_name, STROBJ(val));
-       }
-    }
-
-check_aux_label:
-    if (*desc == 'a') {
-       /* &KEY uses all remaining arguments */
-       values = NIL;
-       goto aux_label;
-    }
-    goto finished_label;
-
-    /* &REST */
-rest_label:
-    if (!CONSP(values)) {
-       if (builtin) {
-           BUILTIN_ARGUMENT(values);
-       }
-       else {
-           NORMAL_ARGUMENT(alist->rest, values);
-       }
-       values = NIL;
-    }
-    /* always allocate a new list, don't know if it will be retained */
-    else if (eval) {
-       LispObj *cons;
-
-       cons = CONS(EVAL(CAR(values)), NIL);
-       if (builtin) {
-           BUILTIN_ARGUMENT(cons);
-       }
-       else {
-           NORMAL_ARGUMENT(alist->rest, cons);
-       }
-       values = CDR(values);
-       for (; CONSP(values); values = CDR(values)) {
-           RPLACD(cons, CONS(EVAL(CAR(values)), NIL));
-           cons = CDR(cons);
-       }
-    }
-    else {
-       LispObj *cons;
-
-       cons = CONS(CAR(values), NIL);
-       if (builtin) {
-           BUILTIN_ARGUMENT(cons);
-       }
-       else {
-           NORMAL_ARGUMENT(alist->rest, cons);
-       }
-       values = CDR(values);
-       for (; CONSP(values); values = CDR(values)) {
-           RPLACD(cons, CONS(CAR(values), NIL));
-           cons = CDR(cons);
-       }
-    }
-    if (*desc != 'a')
-       goto finished_label;
-
-    /* &AUX */
-aux_label:
-    i = 0;
-    count = alist->auxs.num_symbols;
-    defaults = alist->auxs.initials;
-    symbols = alist->auxs.symbols;
-    {
-       int lex = lisp__data.env.lex;
-
-       lisp__data.env.lex = base;
-       lisp__data.env.head = lisp__data.env.length;
-       for (; i < count; i++) {
-           NORMAL_ARGUMENT(symbols[i], EVAL(defaults[i]));
-           ++lisp__data.env.head;
-       }
-       lisp__data.env.lex = lex;
-    }
-
-done_label:
-    if (CONSP(values))
-       LispDestroy("%s: too many arguments", STROBJ(name));
-
-finished_label:
-    if (builtin)
-       lisp__data.stack.base = base;
-    else {
-       lisp__data.env.head = lisp__data.env.length;
-    }
-#undef BULTIN_ARGUMENT
-#undef NORMAL_ARGUMENT
-#undef BUILTIN_NO_EVAL_ARGUMENT
-
-    return (base);
-}
-
-LispObj *
-LispFuncall(LispObj *function, LispObj *arguments, int eval)
-{
-    LispAtom *atom;
-    LispArgList *alist;
-    LispBuiltin *builtin;
-    LispObj *lambda, *result;
-    int macro, base;
-
-#ifdef DEBUGGER
-    if (lisp__data.debugging)
-       LispDebugger(LispDebugCallBegin, function, arguments);
-#endif
-
-    switch (OBJECT_TYPE(function)) {
-       case LispFunction_t:
-           function = function->data.atom->object;
-       case LispAtom_t:
-           atom = function->data.atom;
-           if (atom->a_builtin) {
-               builtin = atom->property->fun.builtin;
-
-               if (eval)
-                   eval = builtin->type != LispMacro;
-               base = LispMakeEnvironment(atom->property->alist,
-                                          arguments, function, eval, 1);
-               if (builtin->multiple_values) {
-                   RETURN_COUNT = 0;
-                   result = builtin->function(builtin);
-               }
-               else {
-                   result = builtin->function(builtin);
-                   RETURN_COUNT = 0;
-               }
-               lisp__data.stack.base = lisp__data.stack.length = base;
-           }
-           else if (atom->a_compiled) {
-               int lex = lisp__data.env.lex;
-               lambda = atom->property->fun.function;
-               alist = atom->property->alist;
-
-               base = LispMakeEnvironment(alist, arguments, function, eval, 0);
-               lisp__data.env.lex = base;
-               result = LispExecuteBytecode(lambda);
-               lisp__data.env.lex = lex;
-               lisp__data.env.head = lisp__data.env.length = base;
-           }
-           else if (atom->a_function) {
-               lambda = atom->property->fun.function;
-               macro = lambda->funtype == LispMacro;
-               alist = atom->property->alist;
-
-               lambda = lambda->data.lambda.code;
-               if (eval)
-                   eval = !macro;
-               base = LispMakeEnvironment(alist, arguments, function, eval, 0);
-               result = LispRunFunMac(function, lambda, macro, base);
-           }
-           else if (atom->a_defstruct &&
-                    atom->property->structure.function != STRUCT_NAME) {
-               LispObj cons;
-
-               if (atom->property->structure.function == STRUCT_CONSTRUCTOR)
-                   atom = Omake_struct->data.atom;
-               else if (atom->property->structure.function == STRUCT_CHECK)
-                   atom = Ostruct_type->data.atom;
-               else
-                   atom = Ostruct_access->data.atom;
-               builtin = atom->property->fun.builtin;
-
-               cons.type = LispCons_t;
-               cons.data.cons.cdr = arguments;
-               if (eval) {
-                   LispObj quote;
-
-                   quote.type = LispQuote_t;
-                   quote.data.quote = function;
-                   cons.data.cons.car = &quote;
-                   base = LispMakeEnvironment(atom->property->alist,
-                                              &cons, function, 1, 1);
-               }
-               else {
-                   cons.data.cons.car = function;
-                   base = LispMakeEnvironment(atom->property->alist,
-                                              &cons, function, 0, 1);
-               }
-               result = builtin->function(builtin);
-               RETURN_COUNT = 0;
-               lisp__data.stack.length = base;
-           }
-           else {
-               LispDestroy("EVAL: the function %s is not defined",
-                           STROBJ(function));
-               /*NOTREACHED*/
-               result = NIL;
-           }
-           break;
-       case LispLambda_t:
-           lambda = function->data.lambda.code;
-           alist = (LispArgList*)function->data.lambda.name->data.opaque.data;
-           base = LispMakeEnvironment(alist, arguments, function, eval, 0);
-           result = LispRunFunMac(function, lambda, 0, base);
-           break;
-       case LispCons_t:
-           if (CAR(function) == Olambda) {
-               function = EVAL(function);
-               if (LAMBDAP(function)) {
-                   GC_ENTER();
-
-                   GC_PROTECT(function);
-                   lambda = function->data.lambda.code;
-                   alist = (LispArgList*)function->data.lambda.name->data.opaque.data;
-                   base = LispMakeEnvironment(alist, arguments, NIL, eval, 0);
-                   result = LispRunFunMac(NIL, lambda, 0, base);
-                   GC_LEAVE();
-                   break;
-               }
-           }
-       default:
-           LispDestroy("EVAL: %s is invalid as a function",
-                       STROBJ(function));
-           /*NOTREACHED*/
-           result = NIL;
-           break;
-    }
-
-#ifdef DEBUGGER
-    if (lisp__data.debugging)
-       LispDebugger(LispDebugCallEnd, function, result);
-#endif
-
-    return (result);
-}
-
-LispObj *
-LispEval(LispObj *object)
-{
-    LispObj *result;
-
-    switch (OBJECT_TYPE(object)) {
-       case LispAtom_t:
-           if ((result = LispDoGetVar(object)) == NULL)
-               LispDestroy("EVAL: the variable %s is unbound", STROBJ(object));
-           break;
-       case LispCons_t:
-           result = LispFuncall(CAR(object), CDR(object), 1);
-           break;
-       case LispQuote_t:
-           result = object->data.quote;
-           break;
-       case LispFunctionQuote_t:
-           result = object->data.quote;
-           if (SYMBOLP(result))
-               result = LispSymbolFunction(result);
-           else if (CONSP(result) && CAR(result) == Olambda)
-               result = EVAL(result);
-           else
-               LispDestroy("FUNCTION: %s is not a function", STROBJ(result));
-           break;
-       case LispBackquote_t:
-           result = LispEvalBackquote(object->data.quote, 1);
-           break;
-       case LispComma_t:
-           LispDestroy("EVAL: comma outside of backquote");
-       default:
-           result = object;
-           break;
-    }
-
-    return (result);
-}
-
-LispObj *
-LispApply1(LispObj *function, LispObj *argument)
-{
-    LispObj arguments;
-
-    arguments.type = LispCons_t;
-    arguments.data.cons.car = argument;
-    arguments.data.cons.cdr = NIL;
-
-    return (LispFuncall(function, &arguments, 0));
-}
-
-LispObj *
-LispApply2(LispObj *function, LispObj *argument1, LispObj *argument2)
-{
-    LispObj arguments, cdr;
-
-    arguments.type = cdr.type = LispCons_t;
-    arguments.data.cons.car = argument1;
-    arguments.data.cons.cdr = &cdr;
-    cdr.data.cons.car = argument2;
-    cdr.data.cons.cdr = NIL;
-
-    return (LispFuncall(function, &arguments, 0));
-}
-
-LispObj *
-LispApply3(LispObj *function, LispObj *arg1, LispObj *arg2, LispObj *arg3)
-{
-    LispObj arguments, car, cdr;
-
-    arguments.type = car.type = cdr.type = LispCons_t;
-    arguments.data.cons.car = arg1;
-    arguments.data.cons.cdr = &car;
-    car.data.cons.car = arg2;
-    car.data.cons.cdr = &cdr;
-    cdr.data.cons.car = arg3;
-    cdr.data.cons.cdr = NIL;
-
-    return (LispFuncall(function, &arguments, 0));
-}
-
-static LispObj *
-LispRunFunMac(LispObj *name, LispObj *code, int macro, int base)
-{
-    LispObj *result = NIL;
-
-    if (!macro) {
-       int lex = lisp__data.env.lex;
-       int did_jump = 1;
-       LispBlock *block;
-
-       block = LispBeginBlock(name, LispBlockClosure);
-       lisp__data.env.lex = base;
-       if (setjmp(block->jmp) == 0) {
-           for (; CONSP(code); code = CDR(code))
-               result = EVAL(CAR(code));
-           did_jump = 0;
-       }
-       LispEndBlock(block);
-       if (did_jump)
-           result = lisp__data.block.block_ret;
-       lisp__data.env.lex = lex;
-       lisp__data.env.head = lisp__data.env.length = base;
-    }
-    else {
-       GC_ENTER();
-
-       for (; CONSP(code); code = CDR(code))
-           result = EVAL(CAR(code));
-       /* FIXME this does not work if macro has &aux variables,
-        * but there are several other missing features, like
-        * destructuring and more lambda list keywords still missing.
-        * TODO later.
-        */
-       lisp__data.env.head = lisp__data.env.length = base;
-
-       GC_PROTECT(result);
-       result = EVAL(result);
-       GC_LEAVE();
-    }
-
-    return (result);
-}
-
-LispObj *
-LispRunSetf(LispArgList *alist, LispObj *setf, LispObj *place, LispObj *value)
-{
-    GC_ENTER();
-    LispObj *store, *code, *expression, *result, quote;
-    int base;
-
-    code = setf->data.lambda.code;
-    store = setf->data.lambda.data;
-
-    quote.type = LispQuote_t;
-    quote.data.quote = value;
-    LispDoAddVar(CAR(store), &quote);
-    ++lisp__data.env.head;
-    base = LispMakeEnvironment(alist, place, Oexpand_setf_method, 0, 0);
-
-    /* build expansion macro */
-    expression = NIL;
-    for (; CONSP(code); code = CDR(code))
-       expression = EVAL(CAR(code));
-
-    /* Minus 1 to pop the added variable */
-    lisp__data.env.head = lisp__data.env.length = base - 1;
-
-    /* protect expansion, and executes it */
-    GC_PROTECT(expression);
-    result = EVAL(expression);
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-LispRunSetfMacro(LispAtom *atom, LispObj *arguments, LispObj *value)
-{
-    int base;
-    GC_ENTER();
-    LispObj *place, *body, *result, quote;
-
-    place = NIL;
-    base = LispMakeEnvironment(atom->property->alist,
-                              arguments, atom->object, 0, 0);
-    body = atom->property->fun.function->data.lambda.code;
-
-    /* expand macro body */
-    for (; CONSP(body); body = CDR(body))
-       place = EVAL(CAR(body));
-
-    /* protect expansion */
-    GC_PROTECT(place);
-
-    /* restore environment */
-    lisp__data.env.head = lisp__data.env.length = base;
-
-    /* value is already evaluated */
-    quote.type = LispQuote_t;
-    quote.data.quote = value;
-
-    /* call setf again */
-    result = APPLY2(Osetf, place, &quote);
-
-    GC_LEAVE();
-
-    return (result);
-}
-
-char *
-LispStrObj(LispObj *object)
-{
-    static int first = 1;
-    static char buffer[34];
-    static LispObj stream;
-    static LispString string;
-
-    if (first) {
-       stream.type = LispStream_t;
-       stream.data.stream.source.string = &string;
-       stream.data.stream.pathname = NIL;
-       stream.data.stream.type = LispStreamString;
-       stream.data.stream.readable = 0;
-       stream.data.stream.writable = 1;
-
-       string.string = buffer;
-       string.fixed = 1;
-       string.space = sizeof(buffer) - 1;
-       first = 0;
-    }
-
-    string.length = string.output = 0;
-
-    LispWriteObject(&stream, object);
-
-    /* make sure string is nul terminated */
-    string.string[string.length] = '\0';
-    if (string.length >= 32) {
-       if (buffer[0] == '(')
-           strcpy(buffer + 27, "...)");
-       else
-           strcpy(buffer + 28, "...");
-    }
-
-    return (buffer);
-}
-
-void
-LispPrint(LispObj *object, LispObj *stream, int newline)
-{
-    if (stream != NIL && !STREAMP(stream)) {
-       LispDestroy("PRINT: %s is not a stream", STROBJ(stream));
-    }
-    if (newline && LispGetColumn(stream))
-       LispWriteChar(stream, '\n');
-    LispWriteObject(stream, object);
-    if (stream == NIL || (stream->data.stream.type == LispStreamStandard &&
-       stream->data.stream.source.file == Stdout))
-       LispFflush(Stdout);
-}
-
-void
-LispUpdateResults(LispObj *cod, LispObj *res)
-{
-    LispSetVar(RUN[2], LispGetVar(RUN[1]));
-    LispSetVar(RUN[1], LispGetVar(RUN[0]));
-    LispSetVar(RUN[0], cod);
-
-    LispSetVar(RES[2], LispGetVar(RES[1]));
-    LispSetVar(RES[1], LispGetVar(RES[0]));
-    LispSetVar(RES[0], res);
-}
-
-#ifdef SIGNALRETURNSINT
-int
-#else
-void
-#endif
-LispSignalHandler(int signum)
-{
-    LispSignal(signum);
-#ifdef SIGNALRETURNSINT
-    return (0);
-#endif
-}
-
-void
-LispSignal(int signum)
-{
-    char *errstr;
-    char buffer[32];
-
-    if (lisp__disable_int) {
-       lisp__interrupted = signum;
-       return;
-    }
-    switch (signum) {
-       case SIGINT:
-           errstr = "interrupted";
-           break;
-       case SIGFPE:
-           errstr = "floating point exception";
-           break;
-       default:
-           sprintf(buffer, "signal %d received", signum);
-           errstr = buffer;
-           break;
-    }
-    LispDestroy(errstr);
-}
-
-void
-LispDisableInterrupts(void)
-{
-    ++lisp__disable_int;
-}
-
-void
-LispEnableInterrupts(void)
-{
-    --lisp__disable_int;
-    if (lisp__disable_int <= 0 && lisp__interrupted)
-       LispSignal(lisp__interrupted);
-}
-
-void
-LispMachine(void)
-{
-    LispObj *cod, *obj;
-
-    lisp__data.sigint = signal(SIGINT, LispSignalHandler);
-    lisp__data.sigfpe = signal(SIGFPE, LispSignalHandler);
-
-    /*CONSTCOND*/
-    while (1) {
-       if (sigsetjmp(lisp__data.jmp, 1) == 0) {
-           lisp__data.running = 1;
-           if (lisp__data.interactive && lisp__data.prompt) {
-               LispFputs(Stdout, lisp__data.prompt);
-               LispFflush(Stdout);
-           }
-           if ((cod = LispRead()) != NULL) {
-               obj = EVAL(cod);
-               if (lisp__data.interactive) {
-                   if (RETURN_COUNT >= 0)
-                       LispPrint(obj, NIL, 1);
-                   if (RETURN_COUNT > 0) {
-                       int i;
-
-                       for (i = 0; i < RETURN_COUNT; i++)
-                           LispPrint(RETURN(i), NIL, 1);
-                   }
-                   LispUpdateResults(cod, obj);
-                   if (LispGetColumn(NIL))
-                       LispWriteChar(NIL, '\n');
-               }
-           }
-           LispTopLevel();
-       }
-       if (lisp__data.eof)
-           break;
-    }
-
-    signal(SIGINT, lisp__data.sigint);
-    signal(SIGFPE, lisp__data.sigfpe);
-
-    lisp__data.running = 0;
-}
-
-void *
-LispExecute(char *str)
-{
-    static LispObj stream;
-    static LispString string;
-    static int first = 1;
-
-    int running = lisp__data.running;
-    LispObj *result, *cod, *obj, **presult = &result;
-
-    if (str == NULL || *str == '\0')
-       return (NIL);
-
-    *presult = NIL;
-
-    if (first) {
-       stream.type = LispStream_t;
-       stream.data.stream.source.string = &string;
-       stream.data.stream.pathname = NIL;
-       stream.data.stream.type = LispStreamString;
-       stream.data.stream.readable = 1;
-       stream.data.stream.writable = 0;
-       string.output = 0;
-       first = 0;
-    }
-    string.string = str;
-    string.length = strlen(str);
-    string.input = 0;
-
-    LispPushInput(&stream);
-    if (!running) {
-       lisp__data.running = 1;
-       if (sigsetjmp(lisp__data.jmp, 1) != 0)
-           return (NULL);
-    }
-
-    cod = COD;
-    /*CONSTCOND*/
-    while (1) {
-       if ((obj = LispRead()) != NULL) {
-           result = EVAL(obj);
-           COD = cod;
-       }
-       if (lisp__data.eof)
-           break;
-    }
-    LispPopInput(&stream);
-
-    lisp__data.running = running;
-
-    return (result);
-}
-
-void
-LispBegin(void)
-{
-    int i;
-    LispAtom *atom;
-    char results[4];
-    LispObj *object, *path, *ext;
-
-    pagesize = LispGetPageSize();
-    segsize = pagesize / sizeof(LispObj);
-
-    lisp__data.strings = hash_new(STRTBLSZ, NULL);
-    lisp__data.opqs = hash_new(STRTBLSZ, NULL);
-
-    /* Initialize memory management */
-    lisp__data.mem.mem = (void**)calloc(lisp__data.mem.space = 16,
-                                       sizeof(void*));
-    lisp__data.mem.index = lisp__data.mem.level = 0;
-
-    /* Allow LispGetVar to check ATOMID() of unbound symbols */
-    UNBOUND->data.atom = (LispAtom*)LispCalloc(1, sizeof(LispAtom));
-    LispMused(UNBOUND->data.atom);
-    noproperty.value = UNBOUND;
-
-    if (Stdin == NULL)
-       Stdin = LispFdopen(0, FILE_READ);
-    if (Stdout == NULL)
-       Stdout = LispFdopen(1, FILE_WRITE | FILE_BUFFERED);
-    if (Stderr == NULL)
-       Stderr = LispFdopen(2, FILE_WRITE);
-
-    /* minimum number of free cells after GC
-     * if sizeof(LispObj) == 16, than a minfree of 1024 would try to keep
-     * at least 16Kb of free cells.
-     */
-    minfree = 1024;
-
-    MOD = COD = PRO = NIL;
-#ifdef DEBUGGER
-    DBG = BRK = NIL;
-#endif
-
-    /* allocate initial object cells */
-    LispAllocSeg(&objseg, minfree);
-    LispAllocSeg(&atomseg, pagesize);
-    lisp__data.gc.average = segsize;
-
-    /* Don't allow gc in initialization */
-    GCDisable();
-
-    /* Initialize package system, the current package is LISP. Order of
-     * initialization is very important here */
-    lisp__data.lisp = LispNewPackage(STRING("LISP"),
-                                    CONS(STRING("COMMON-LISP"), NIL));
-
-    /* Make LISP package the current one */
-    lisp__data.pack = lisp__data.savepack =
-       lisp__data.lisp->data.package.package;
-
-    /* Allocate space in LISP package */
-    LispMoreGlobals(lisp__data.pack);
-
-    /* Allocate  space for multiple value return values */
-    lisp__data.returns.values = malloc(MULTIPLE_VALUES_LIMIT *
-                                      (sizeof(LispObj*)));
-
-    /*  Create the first atom, do it "by hand" because macro "PACKAGE"
-     * cannot yet be used. */
-    atom = LispGetPermAtom("*PACKAGE*");
-    lisp__data.package = atomseg.freeobj;
-    atomseg.freeobj = CDR(atomseg.freeobj);
-    --atomseg.nfree;
-    lisp__data.package->type = LispAtom_t;
-    lisp__data.package->data.atom = atom;
-    atom->object = lisp__data.package;
-    atom->package = lisp__data.lisp;
-
-    /* Set package list, to be used by (gc) and (list-all-packages) */
-    PACK = CONS(lisp__data.lisp, NIL);
-
-    /* Make *PACKAGE* a special variable */
-    LispProclaimSpecial(lisp__data.package, lisp__data.lisp, NIL);
-
-       /* Value of macro "PACKAGE" is now properly available */
-
-    /* Changing *PACKAGE* is like calling (in-package) */
-    lisp__data.package->data.atom->watch = 1;
-
-    /* And available to other packages */
-    LispExportSymbol(lisp__data.package);
-
-    /* Initialize stacks */
-    LispMoreEnvironment();
-    LispMoreStack();
-
-    /* Create the KEYWORD package */
-    Skeyword = GETATOMID("KEYWORD");
-    object = LispNewPackage(STRING(Skeyword->value),
-                           CONS(STRING(""), NIL));
-
-    /* Update list of packages */
-    PACK = CONS(object, PACK);
-
-    /* Allow easy access to the keyword package */
-    lisp__data.keyword = object;
-    lisp__data.key = object->data.package.package;
-
-    /* Initialize some static important symbols */
-    Olambda            = STATIC_ATOM("LAMBDA");
-    LispExportSymbol(Olambda);
-    Okey               = STATIC_ATOM("&KEY");
-    LispExportSymbol(Okey);
-    Orest              = STATIC_ATOM("&REST");
-    LispExportSymbol(Orest);
-    Ooptional          = STATIC_ATOM("&OPTIONAL");
-    LispExportSymbol(Ooptional);
-    Oaux               = STATIC_ATOM("&AUX");
-    LispExportSymbol(Oaux);
-    Kunspecific                = KEYWORD("UNSPECIFIC");
-    Oformat            = STATIC_ATOM("FORMAT");
-    Oexpand_setf_method        = STATIC_ATOM("EXPAND-SETF-METHOD");
-
-    Omake_struct       = STATIC_ATOM("MAKE-STRUCT");
-    Ostruct_access     = STATIC_ATOM("STRUCT-ACCESS");
-    Ostruct_store      = STATIC_ATOM("STRUCT-STORE");
-    Ostruct_type       = STATIC_ATOM("STRUCT-TYPE");
-    Smake_struct       = ATOMID(Omake_struct);
-    Sstruct_access     = ATOMID(Ostruct_access);
-    Sstruct_store      = ATOMID(Ostruct_store);
-    Sstruct_type       = ATOMID(Ostruct_type);
-
-    /* Initialize some static atom ids */
-    Snil               = GETATOMID("NIL");
-    St                 = GETATOMID("T");
-    Saux               = ATOMID(Oaux);
-    Skey               = ATOMID(Okey);
-    Soptional          = ATOMID(Ooptional);
-    Srest              = ATOMID(Orest);
-    Sand               = GETATOMID("AND");
-    Sor                        = GETATOMID("OR");
-    Snot               = GETATOMID("NOT");
-    Satom              = GETATOMID("ATOM");
-    Ssymbol            = GETATOMID("SYMBOL");
-    Sinteger           = GETATOMID("INTEGER");
-    Scharacter         = GETATOMID("CHARACTER");
-    Sstring            = GETATOMID("STRING");
-    Slist              = GETATOMID("LIST");
-    Scons              = GETATOMID("CONS");
-    Svector            = GETATOMID("VECTOR");
-    Sarray             = GETATOMID("ARRAY");
-    Sstruct            = GETATOMID("STRUCT");
-    Sfunction          = GETATOMID("FUNCTION");
-    Spathname          = GETATOMID("PATHNAME");
-    Srational          = GETATOMID("RATIONAL");
-    Sfloat             = GETATOMID("FLOAT");
-    Scomplex           = GETATOMID("COMPLEX");
-    Sopaque            = GETATOMID("OPAQUE");
-    Sdefault           = GETATOMID("DEFAULT");
-
-    LispArgList_t      = LispRegisterOpaqueType("LispArgList*");
-
-    lisp__data.unget = malloc(sizeof(LispUngetInfo*));
-    lisp__data.unget[0] = calloc(1, sizeof(LispUngetInfo));
-    lisp__data.nunget = 1;
-
-    lisp__data.standard_input = ATOM2("*STANDARD-INPUT*");
-    SINPUT = STANDARDSTREAM(Stdin, lisp__data.standard_input, STREAM_READ);
-    lisp__data.interactive = 1;
-    LispProclaimSpecial(lisp__data.standard_input,
-                       lisp__data.input_list = SINPUT, NIL);
-    LispExportSymbol(lisp__data.standard_input);
-
-    lisp__data.standard_output = ATOM2("*STANDARD-OUTPUT*");
-    SOUTPUT = STANDARDSTREAM(Stdout, lisp__data.standard_output, STREAM_WRITE);
-    LispProclaimSpecial(lisp__data.standard_output,
-                       lisp__data.output_list = SOUTPUT, NIL);
-    LispExportSymbol(lisp__data.standard_output);
-
-    object = ATOM2("*STANDARD-ERROR*");
-    lisp__data.error_stream = STANDARDSTREAM(Stderr, object, STREAM_WRITE);
-    LispProclaimSpecial(object, lisp__data.error_stream, NIL);
-    LispExportSymbol(object);
-
-    lisp__data.modules = ATOM2("*MODULES*");
-    LispProclaimSpecial(lisp__data.modules, MOD, NIL);
-    LispExportSymbol(lisp__data.modules);
-
-    object = CONS(KEYWORD("UNIX"), CONS(KEYWORD("XEDIT"), NIL));
-    lisp__data.features = ATOM2("*FEATURES*");
-    LispProclaimSpecial(lisp__data.features, object, NIL);
-    LispExportSymbol(lisp__data.features);
-
-    object = ATOM2("MULTIPLE-VALUES-LIMIT");
-    LispDefconstant(object, FIXNUM(MULTIPLE_VALUES_LIMIT + 1), NIL);
-    LispExportSymbol(object);
-
-    /* Reenable gc */
-    GCEnable();
-
-    LispBytecodeInit();
-    LispPackageInit();
-    LispCoreInit();
-    LispMathInit();
-    LispPathnameInit();
-    LispStreamInit();
-    LispRegexInit();
-    LispWriteInit();
-
-    lisp__data.prompt = isatty(0) ? "> " : NULL;
-
-    lisp__data.errexit = !lisp__data.interactive;
-
-    if (lisp__data.interactive) {
-       /* add +, ++, +++, *, **, and *** */
-       for (i = 0; i < 3; i++) {
-           results[i] = '+';
-           results[i + 1] = '\0';
-           RUN[i] = ATOM(results);
-           LispSetVar(RUN[i], NIL);
-           LispExportSymbol(RUN[i]);
-       }
-       for (i = 0; i < 3; i++) {
-           results[i] = '*';
-           results[i + 1] = '\0';
-           RES[i] = ATOM(results);
-           LispSetVar(RES[i], NIL);
-           LispExportSymbol(RES[i]);
-       }
-    }
-    else
-       RUN[0] = RUN[1] = RUN[2] = RES[0] = RES[1] = RES[2] = NIL;
-
-    /* Add LISP builtin functions */
-    for (i = 0; i < sizeof(lispbuiltins) / sizeof(lispbuiltins[0]); i++)
-       LispAddBuiltinFunction(&lispbuiltins[i]);
-
-    EXECUTE("(require \"lisp\")");
-
-    object = ATOM2("*DEFAULT-PATHNAME-DEFAULTS*");
-#ifdef LISPDIR
-    {
-       int length;
-       char *pathname = LISPDIR;
-
-       length = strlen(pathname);
-       if (length && pathname[length - 1] != '/') {
-           pathname = LispMalloc(length + 2);
-
-           strcpy(pathname, LISPDIR);
-           strcpy(pathname + length, "/");
-           path = LSTRING2(pathname, length + 1);
-       }
-       else
-           path = LSTRING(pathname, length);
-    }
-#else
-    path = STRING("");
-#endif
-    GCDisable();
-    LispProclaimSpecial(object, APPLY1(Oparse_namestring, path), NIL);
-    LispExportSymbol(object);
-    GCEnable();
-
-    /* Create and make EXT the current package */
-    PACKAGE = ext = LispNewPackage(STRING("EXT"), NIL);
-    lisp__data.pack = lisp__data.savepack = PACKAGE->data.package.package;
-
-    /* Update list of packages */
-    PACK = CONS(ext, PACK);
-
-    /* Import LISP external symbols in EXT package */
-    LispUsePackage(lisp__data.lisp);
-
-    /* Add EXT non standard builtin functions */
-    for (i = 0; i < sizeof(extbuiltins) / sizeof(extbuiltins[0]); i++)
-       LispAddBuiltinFunction(&extbuiltins[i]);
-
-    /* Create and make USER the current package */
-    GCDisable();
-    PACKAGE = LispNewPackage(STRING("USER"),
-                            CONS(STRING("COMMON-LISP-USER"), NIL));
-    GCEnable();
-    lisp__data.pack = lisp__data.savepack = PACKAGE->data.package.package;
-
-    /* Update list of packages */
-    PACK = CONS(PACKAGE, PACK);
-
-    /* USER package inherits all LISP external symbols */
-    LispUsePackage(lisp__data.lisp);
-    /* And all EXT external symbols */
-    LispUsePackage(ext);
-
-    LispTopLevel();
-}
-
-void
-LispEnd(void)
-{
-    /* XXX needs to free all used memory, not just close file descriptors */
-}
-
-void
-LispSetPrompt(char *prompt)
-{
-    lisp__data.prompt = prompt;
-}
-
-void
-LispSetInteractive(int interactive)
-{
-    lisp__data.interactive = !!interactive;
-}
-
-void
-LispSetExitOnError(int errexit)
-{
-    lisp__data.errexit = !!errexit;
-}
-
-void
-LispDebug(int enable)
-{
-    lisp__data.debugging = !!enable;
-
-#ifdef DEBUGGER
-    /* assumes we are at the toplevel */
-    DBG = BRK = NIL;
-    lisp__data.debug_level = -1;
-    lisp__data.debug_step = 0;
-#endif
-}
diff --git a/xedit/lisp/lisp.h b/xedit/lisp/lisp.h
deleted file mode 100644 (file)
index baabb85..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/lisp.h,v 1.4 2002/07/16 05:19:39 paulo Exp $ */
-
-#ifndef Lisp_lisp_h
-#define Lisp_lisp_h
-
-void LispBegin(void);
-void LispEnd(void);
-void *LispExecute(char*);
-void LispMachine(void);
-void LispSetPrompt(char*);
-void LispSetInteractive(int);
-void LispSetExitOnError(int);
-void LispDebug(int);           /* argument is boolean to enable/disable */
-
-#endif /* Lisp_lisp_h */
diff --git a/xedit/lisp/lsp.c b/xedit/lisp/lsp.c
deleted file mode 100644 (file)
index 17c24e9..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/lsp.c,v 1.7tsi Exp $ */
-
-#include <stdio.h>
-#include <string.h>
-#include "lisp/lisp.h"
-
-#ifdef NEED_STRCASECMP
-int strcasecmp(const char *s1, const char *s2);
-int strncasecmp(const char *s1, const char *s2, size_t n);
-#endif
-#ifdef NEED_REALPATH
-#include <sys/param.h>
-#if defined(ISC)
-#ifndef MAXPATHLEN
-#define MAXPATHLEN      1024
-#endif
-#endif
-char *realpath(const char *pathname, char resolvedname[MAXPATHLEN]);
-#endif
-
-int
-main(int argc, char *argv[])
-{
-    int i;
-
-    LispBegin();
-
-    i = 1;
-    if (argc > 1 && strcmp(argv[1], "-d") == 0) {
-       LispDebug(1);
-       ++i;
-    }
-
-    if (i < argc) {
-       char buffer[2048];
-
-       for (; i < argc; i++) {
-           snprintf(buffer, sizeof(buffer),
-                    "(load \"%s\" :if-does-not-exist :error)",
-                    argv[i]);
-           LispExecute(buffer);
-       }
-    }
-    else
-       LispMachine();
-
-    LispEnd();
-
-    return (0);
-}
diff --git a/xedit/lisp/math.c b/xedit/lisp/math.c
deleted file mode 100644 (file)
index bdca034..0000000
+++ /dev/null
@@ -1,1477 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/math.c,v 1.23tsi Exp $ */
-
-#include "lisp/math.h"
-#include "lisp/private.h"
-
-#ifdef __UNIXOS2__
-# define finite(x) isfinite(x)
-#endif
-
-/*
- * Prototypes
- */
-static LispObj *LispDivide(LispBuiltin*, int, int);
-
-/*
- * Initialization
- */
-static LispObj *obj_zero, *obj_one;
-LispObj *Ocomplex, *Oequal_;
-
-LispObj *Oshort_float, *Osingle_float, *Odouble_float, *Olong_float;
-
-Atom_id Sdefault_float_format;
-
-/*
- * Implementation
- */
-#include "lisp/mathimp.c"
-
-void
-LispMathInit(void)
-{
-    LispObj *object, *result;
-
-    mp_set_malloc(LispMalloc);
-    mp_set_calloc(LispCalloc);
-    mp_set_realloc(LispRealloc);
-    mp_set_free(LispFree);
-
-    number_init();
-    obj_zero = FIXNUM(0);
-    obj_one = FIXNUM(1);
-
-    Oequal_            = STATIC_ATOM("=");
-    Ocomplex           = STATIC_ATOM(Scomplex->value);
-    Oshort_float       = STATIC_ATOM("SHORT-FLOAT");
-    LispExportSymbol(Oshort_float);
-    Osingle_float      = STATIC_ATOM("SINGLE-FLOAT");
-    LispExportSymbol(Osingle_float);
-    Odouble_float      = STATIC_ATOM("DOUBLE-FLOAT");
-    LispExportSymbol(Odouble_float);
-    Olong_float                = STATIC_ATOM("LONG-FLOAT");
-    LispExportSymbol(Olong_float);
-
-    object             = STATIC_ATOM("*DEFAULT-FLOAT-FORMAT*");
-    LispProclaimSpecial(object, Odouble_float, NIL);
-    LispExportSymbol(object);
-    Sdefault_float_format = ATOMID(object);
-
-    object             = STATIC_ATOM("PI");
-    result = number_pi();
-    LispProclaimSpecial(object, result, NIL);
-    LispExportSymbol(object);
-
-    object             = STATIC_ATOM("MOST-POSITIVE-FIXNUM");
-    LispDefconstant(object, FIXNUM(MOST_POSITIVE_FIXNUM), NIL);
-    LispExportSymbol(object);
-
-    object             = STATIC_ATOM("MOST-NEGATIVE-FIXNUM");
-    LispDefconstant(object, FIXNUM(MOST_NEGATIVE_FIXNUM), NIL);
-    LispExportSymbol(object);
-}
-
-LispObj *
-Lisp_Mul(LispBuiltin *builtin)
-/*
- * &rest numbers
- */
-{
-    n_number num;
-    LispObj *number, *numbers;
-
-    numbers = ARGUMENT(0);
-
-    if (CONSP(numbers)) {
-       number = CAR(numbers);
-
-       numbers = CDR(numbers);
-       if (!CONSP(numbers)) {
-           CHECK_NUMBER(number);
-           return (number);
-       }
-    }
-    else
-       return (FIXNUM(1));
-
-    set_number_object(&num, number);
-    do {
-       mul_number_object(&num, CAR(numbers));
-       numbers = CDR(numbers);
-    } while (CONSP(numbers));
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_Plus(LispBuiltin *builtin)
-/*
- + &rest numbers
- */
-{
-    n_number num;
-    LispObj *number, *numbers;
-
-    numbers = ARGUMENT(0);
-
-    if (CONSP(numbers)) {
-       number = CAR(numbers);
-
-       numbers = CDR(numbers);
-       if (!CONSP(numbers)) {
-           CHECK_NUMBER(number);
-           return (number);
-       }
-    }
-    else
-       return (FIXNUM(0));
-
-    set_number_object(&num, number);
-    do {
-       add_number_object(&num, CAR(numbers));
-       numbers = CDR(numbers);
-    } while (CONSP(numbers));
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_Minus(LispBuiltin *builtin)
-/*
- - number &rest more_numbers
- */
-{
-    n_number num;
-    LispObj *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    set_number_object(&num, number);
-    if (!CONSP(more_numbers)) {
-       neg_number(&num);
-
-       return (make_number_object(&num));
-    }
-    do {
-       sub_number_object(&num, CAR(more_numbers));
-       more_numbers = CDR(more_numbers);
-    } while (CONSP(more_numbers));
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_Div(LispBuiltin *builtin)
-/*
- / number &rest more_numbers
- */
-{
-    n_number num;
-    LispObj *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    if (CONSP(more_numbers))
-       set_number_object(&num, number);
-    else {
-       num.complex = 0;
-       num.real.type = N_FIXNUM;
-       num.real.data.fixnum = 1;
-       goto div_one_argument;
-    }
-
-    for (;;) {
-       number = CAR(more_numbers);
-       more_numbers = CDR(more_numbers);
-
-div_one_argument:
-       div_number_object(&num, number);
-       if (!CONSP(more_numbers))
-           break;
-    }
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_OnePlus(LispBuiltin *builtin)
-/*
- 1+ number
- */
-{
-    n_number num;
-    LispObj *number;
-
-    number = ARGUMENT(0);
-    num.complex = 0;
-    num.real.type = N_FIXNUM;
-    num.real.data.fixnum = 1;
-    add_number_object(&num, number);
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_OneMinus(LispBuiltin *builtin)
-/*
- 1- number
- */
-{
-    n_number num;
-    LispObj *number;
-
-    number = ARGUMENT(0);
-    num.complex = 0;
-    num.real.type = N_FIXNUM;
-    num.real.data.fixnum = -1;
-    add_number_object(&num, number);
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_Less(LispBuiltin *builtin)
-/*
- < number &rest more-numbers
- */
-{
-    LispObj *compare, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    compare = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(compare, number, 1) >= 0)
-               return (NIL);
-           compare = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(compare);
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_LessEqual(LispBuiltin *builtin)
-/*
- <= number &rest more-numbers
- */
-{
-    LispObj *compare, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    compare = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(compare, number, 1) > 0)
-               return (NIL);
-           compare = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(compare);
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_Equal_(LispBuiltin *builtin)
-/*
- = number &rest more-numbers
- */
-{
-    LispObj *compare, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    compare = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(compare, number, 0) != 0)
-               return (NIL);
-           compare = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(compare);
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_Greater(LispBuiltin *builtin)
-/*
- > number &rest more-numbers
- */
-{
-    LispObj *compare, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    compare = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(compare, number, 1) <= 0)
-               return (NIL);
-           compare = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(compare);
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_GreaterEqual(LispBuiltin *builtin)
-/*
- >= number &rest more-numbers
- */
-{
-    LispObj *compare, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    compare = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(compare, number, 1) < 0)
-               return (NIL);
-           compare = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(compare);
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_NotEqual(LispBuiltin *builtin)
-/*
- /= number &rest more-numbers
- */
-{
-    LispObj *object, *compare, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    if (!CONSP(more_numbers)) {
-       CHECK_REAL(number);
-
-       return (T);
-    }
-
-    /* compare all numbers */
-    while (1) {
-       compare = number;
-       for (object = more_numbers; CONSP(object); object = CDR(object)) {
-           number = CAR(object);
-
-           if (cmp_object_object(compare, number, 0) == 0)
-               return (NIL);
-       }
-       if (CONSP(more_numbers)) {
-           number = CAR(more_numbers);
-           more_numbers = CDR(more_numbers);
-       }
-       else
-           break;
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_Min(LispBuiltin *builtin)
-/*
- min number &rest more-numbers
- */
-{
-    LispObj *result, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(result, number, 1) > 0)
-               result = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(result);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Max(LispBuiltin *builtin)
-/*
- max number &rest more-numbers
- */
-{
-    LispObj *result, *number, *more_numbers;
-
-    more_numbers = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (CONSP(more_numbers)) {
-       do {
-           number = CAR(more_numbers);
-           if (cmp_object_object(result, number, 1) < 0)
-               result = number;
-           more_numbers = CDR(more_numbers);
-       } while (CONSP(more_numbers));
-    }
-    else {
-       CHECK_REAL(result);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Abs(LispBuiltin *builtin)
-/*
- abs number
- */
-{
-    LispObj *result, *number;
-
-    result = number = ARGUMENT(0);
-
-    switch (OBJECT_TYPE(number)) {
-       case LispFixnum_t:
-       case LispInteger_t:
-       case LispBignum_t:
-       case LispDFloat_t:
-       case LispRatio_t:
-       case LispBigratio_t:
-           if (cmp_real_object(&zero, number) > 0) {
-               n_real real;
-
-               set_real_object(&real, number);
-               neg_real(&real);
-               result = make_real_object(&real);
-           }
-           break;
-       case LispComplex_t: {
-           n_number num;
-
-           set_number_object(&num, number);
-           abs_number(&num);
-           result = make_number_object(&num);
-       }   break;
-       default:
-           fatal_builtin_object_error(builtin, number, NOT_A_NUMBER);
-           break;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Complex(LispBuiltin *builtin)
-/*
- complex realpart &optional imagpart
- */
-{
-    LispObj *realpart, *imagpart;
-
-    imagpart = ARGUMENT(1);
-    realpart = ARGUMENT(0);
-
-    CHECK_REAL(realpart);
-
-    if (imagpart == UNSPEC)
-       return (realpart);
-    else {
-       CHECK_REAL(imagpart);
-    }
-    if (!FLOATP(imagpart) && cmp_real_object(&zero, imagpart) == 0)
-       return (realpart);
-
-    return (COMPLEX(realpart, imagpart));
-}
-
-LispObj *
-Lisp_Complexp(LispBuiltin *builtin)
-/*
- complexp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (COMPLEXP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Conjugate(LispBuiltin *builtin)
-/*
- conjugate number
- */
-{
-    n_number num;
-    LispObj *number, *realpart, *imagpart;
-
-    number = ARGUMENT(0);
-
-    CHECK_NUMBER(number);
-
-    if (REALP(number))
-       return (number);
-
-    realpart = OCXR(number);
-    num.complex = 0;
-    num.real.type = N_FIXNUM;
-    num.real.data.fixnum = -1;
-    mul_number_object(&num, OCXI(number));
-    imagpart = make_number_object(&num);
-
-    return (COMPLEX(realpart, imagpart));
-}
-
-LispObj *
-Lisp_Decf(LispBuiltin *builtin)
-/*
- decf place &optional delta
- */
-{
-    n_number num;
-    LispObj *place, *delta, *number;
-
-    delta = ARGUMENT(1);
-    place = ARGUMENT(0);
-
-    if (SYMBOLP(place)) {
-       number = LispGetVar(place);
-       if (number == NULL)
-           LispDestroy("EVAL: the variable %s is unbound", STROBJ(place));
-    }
-    else
-       number = EVAL(place);
-
-    if (delta != UNSPEC) {
-       LispObj *operand;
-
-       operand = EVAL(delta);
-       set_number_object(&num, number);
-       sub_number_object(&num, operand);
-       number = make_number_object(&num);
-    }
-    else {
-       num.complex = 0;
-       num.real.type = N_FIXNUM;
-       num.real.data.fixnum = -1;
-       add_number_object(&num, number);
-       number = make_number_object(&num);
-    }
-
-    if (SYMBOLP(place)) {
-       CHECK_CONSTANT(place);
-       LispSetVar(place, number);
-    }
-    else {
-       GC_ENTER();
-
-       GC_PROTECT(number);
-       (void)APPLY2(Osetf, place, number);
-       GC_LEAVE();
-    }
-
-    return (number);
-}
-
-LispObj *
-Lisp_Denominator(LispBuiltin *builtin)
-/*
- denominator rational
- */
-{
-    LispObj *result, *rational;
-
-    rational = ARGUMENT(0);
-
-    switch (OBJECT_TYPE(rational)) {
-       case LispFixnum_t:
-       case LispInteger_t:
-       case LispBignum_t:
-           result = FIXNUM(1);
-           break;
-       case LispRatio_t:
-           result = INTEGER(OFRD(rational));
-           break;
-       case LispBigratio_t:
-           if (mpi_fiti(OBRD(rational)))
-               result = INTEGER(mpi_geti(OBRD(rational)));
-           else {
-               mpi *den = XALLOC(mpi);
-
-               mpi_init(den);
-               mpi_set(den, OBRD(rational));
-               result = BIGNUM(den);
-           }
-           break;
-       default:
-           LispDestroy("%s: %s is not a rational number",
-                       STRFUN(builtin), STROBJ(rational));
-           /*NOTREACHED*/
-           result = NIL;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Evenp(LispBuiltin *builtin)
-/*
- evenp integer
- */
-{
-    LispObj *result, *integer;
-
-    integer = ARGUMENT(0);
-
-    switch (OBJECT_TYPE(integer)) {
-       case LispFixnum_t:
-           result = FIXNUM_VALUE(integer) % 2 ? NIL : T;
-           break;
-       case LispInteger_t:
-           result = INT_VALUE(integer) % 2 ? NIL : T;
-           break;
-       case LispBignum_t:
-           result = mpi_remi(OBI(integer), 2) ? NIL : T;
-           break;
-       default:
-           fatal_builtin_object_error(builtin, integer, NOT_AN_INTEGER);
-           /*NOTREACHED*/
-           result = NIL;
-    }
-
-    return (result);
-}
-
-/* only one float format */
-LispObj *
-Lisp_Float(LispBuiltin *builtin)
-/*
- float number &optional other
- */
-{
-    LispObj *number, *other;
-
-    other = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    if (other != UNSPEC) {
-       CHECK_DFLOAT(other);
-    }
-
-    return (LispFloatCoerce(builtin, number));
-}
-
-LispObj *
-LispFloatCoerce(LispBuiltin *builtin, LispObj *number)
-{
-    double value;
-
-    switch (OBJECT_TYPE(number)) {
-       case LispFixnum_t:
-           value = FIXNUM_VALUE(number);
-           break;
-       case LispInteger_t:
-           value = INT_VALUE(number);
-           break;
-       case LispBignum_t:
-           value = mpi_getd(OBI(number));
-           break;
-       case LispDFloat_t:
-           return (number);
-       case LispRatio_t:
-           value = (double)OFRN(number) / (double)OFRD(number);
-           break;
-       case LispBigratio_t:
-           value = mpr_getd(OBR(number));
-           break;
-       default:
-           value = 0.0;
-           fatal_builtin_object_error(builtin, number, NOT_A_REAL_NUMBER);
-           break;
-    }
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-
-    return (DFLOAT(value));
-}
-
-LispObj *
-Lisp_Floatp(LispBuiltin *builtin)
-/*
- floatp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (FLOATP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Gcd(LispBuiltin *builtin)
-/*
- gcd &rest integers
- */
-{
-    n_real real;
-    LispObj *integers, *integer, *operand;
-
-    integers = ARGUMENT(0);
-
-    if (!CONSP(integers))
-       return (FIXNUM(0));
-
-    integer = CAR(integers);
-
-    CHECK_INTEGER(integer);
-    set_real_object(&real, integer);
-    integers = CDR(integers);
-
-    for (; CONSP(integers); integers = CDR(integers)) {
-       operand = CAR(integers);
-       gcd_real_object(&real, operand);
-    }
-    abs_real(&real);
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Imagpart(LispBuiltin *builtin)
-/*
- imagpart number
- */
-{
-    LispObj *number;
-
-    number = ARGUMENT(0);
-
-    if (COMPLEXP(number))
-       return (OCXI(number));
-    else {
-       CHECK_REAL(number);
-    }
-
-    return (FIXNUM(0));
-}
-
-LispObj *
-Lisp_Incf(LispBuiltin *builtin)
-/*
- incf place &optional delta
- */
-{
-    n_number num;
-    LispObj *place, *delta, *number;
-
-    delta = ARGUMENT(1);
-    place = ARGUMENT(0);
-
-    if (SYMBOLP(place)) {
-       number = LispGetVar(place);
-       if (number == NULL)
-           LispDestroy("EVAL: the variable %s is unbound", STROBJ(place));
-    }
-    else
-       number = EVAL(place);
-
-    if (delta != UNSPEC) {
-       LispObj *operand;
-
-       operand = EVAL(delta);
-       set_number_object(&num, number);
-       add_number_object(&num, operand);
-       number = make_number_object(&num);
-    }
-    else {
-       num.complex = 0;
-       num.real.type = N_FIXNUM;
-       num.real.data.fixnum = 1;
-       add_number_object(&num, number);
-       number = make_number_object(&num);
-    }
-
-    if (SYMBOLP(place)) {
-       CHECK_CONSTANT(place);
-       LispSetVar(place, number);
-    }
-    else {
-       GC_ENTER();
-
-       GC_PROTECT(number);
-       (void)APPLY2(Osetf, place, number);
-       GC_LEAVE();
-    }
-
-    return (number);
-}
-
-LispObj *
-Lisp_Integerp(LispBuiltin *builtin)
-/*
- integerp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (INTEGERP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Isqrt(LispBuiltin *builtin)
-/*
- isqrt natural
- */
-{
-    LispObj *natural, *result;
-
-    natural = ARGUMENT(0);
-
-    if (cmp_object_object(natural, obj_zero, 1) < 0)
-       goto not_a_natural_number;
-
-    switch (OBJECT_TYPE(natural)) {
-       case LispFixnum_t:
-           result = FIXNUM((long)floor(sqrt(FIXNUM_VALUE(natural))));
-           break;
-       case LispInteger_t:
-           result = INTEGER((long)floor(sqrt(INT_VALUE(natural))));
-           break;
-       case LispBignum_t: {
-           mpi *bigi;
-
-           bigi = XALLOC(mpi);
-           mpi_init(bigi);
-           mpi_sqrt(bigi, OBI(natural));
-           if (mpi_fiti(bigi)) {
-               result = INTEGER(mpi_geti(bigi));
-               mpi_clear(bigi);
-               XFREE(bigi);
-           }
-           else
-               result = BIGNUM(bigi);
-       }   break;
-       default:
-           goto not_a_natural_number;
-    }
-
-    return (result);
-
-not_a_natural_number:
-    LispDestroy("%s: %s is not a natural number",
-               STRFUN(builtin), STROBJ(natural));
-    /*NOTREACHED*/
-    return (NIL);
-}
-
-LispObj *
-Lisp_Lcm(LispBuiltin *builtin)
-/*
- lcm &rest integers
- */
-{
-    n_real real, gcd;
-    LispObj *integers, *operand;
-
-    integers = ARGUMENT(0);
-
-    if (!CONSP(integers))
-       return (FIXNUM(1));
-
-    operand = CAR(integers);
-
-    CHECK_INTEGER(operand);
-    set_real_object(&real, operand);
-    integers = CDR(integers);
-
-    gcd.type = N_FIXNUM;
-    gcd.data.fixnum = 0;
-
-    for (; CONSP(integers); integers = CDR(integers)) {
-       operand = CAR(integers);
-
-       if (real.type == N_FIXNUM && real.data.fixnum == 0)
-           break;
-
-       /* calculate gcd before changing integer */
-       clear_real(&gcd);
-       set_real_real(&gcd, &real);
-       gcd_real_object(&gcd, operand);
-
-       /* calculate lcm */
-       mul_real_object(&real, operand);
-       div_real_real(&real, &gcd);
-    }
-    clear_real(&gcd);
-    abs_real(&real);
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Logand(LispBuiltin *builtin)
-/*
- logand &rest integers
- */
-{
-    n_real real;
-
-    LispObj *integers;
-
-    integers = ARGUMENT(0);
-
-    real.type = N_FIXNUM;
-    real.data.fixnum = -1;
-
-    for (; CONSP(integers); integers = CDR(integers))
-       and_real_object(&real, CAR(integers));
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Logeqv(LispBuiltin *builtin)
-/*
- logeqv &rest integers
- */
-{
-    n_real real;
-
-    LispObj *integers;
-
-    integers = ARGUMENT(0);
-
-    real.type = N_FIXNUM;
-    real.data.fixnum = -1;
-
-    for (; CONSP(integers); integers = CDR(integers))
-       eqv_real_object(&real, CAR(integers));
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Logior(LispBuiltin *builtin)
-/*
- logior &rest integers
- */
-{
-    n_real real;
-
-    LispObj *integers;
-
-    integers = ARGUMENT(0);
-
-    real.type = N_FIXNUM;
-    real.data.fixnum = 0;
-
-    for (; CONSP(integers); integers = CDR(integers))
-       ior_real_object(&real, CAR(integers));
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Lognot(LispBuiltin *builtin)
-/*
- lognot integer
- */
-{
-    n_real real;
-
-    LispObj *integer;
-
-    integer = ARGUMENT(0);
-
-    CHECK_INTEGER(integer);
-
-    set_real_object(&real, integer);
-    not_real(&real);
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Logxor(LispBuiltin *builtin)
-/*
- logxor &rest integers
- */
-{
-    n_real real;
-
-    LispObj *integers;
-
-    integers = ARGUMENT(0);
-
-    real.type = N_FIXNUM;
-    real.data.fixnum = 0;
-
-    for (; CONSP(integers); integers = CDR(integers))
-       xor_real_object(&real, CAR(integers));
-
-    return (make_real_object(&real));
-}
-
-LispObj *
-Lisp_Minusp(LispBuiltin *builtin)
-/*
- minusp number
- */
-{
-    LispObj *number;
-
-    number = ARGUMENT(0);
-
-    CHECK_REAL(number);
-
-    return (cmp_real_object(&zero, number) > 0 ? T : NIL);
-}
-
-LispObj *
-Lisp_Mod(LispBuiltin *builtin)
-/*
- mod number divisor
- */
-{
-    LispObj *result;
-
-    LispObj *number, *divisor;
-
-    divisor = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    if (INTEGERP(number) && INTEGERP(divisor)) {
-       n_real real;
-
-       set_real_object(&real, number);
-       mod_real_object(&real, divisor);
-       result = make_real_object(&real);
-    }
-    else {
-       n_number num;
-
-       set_number_object(&num, number);
-       divide_number_object(&num, divisor, NDIVIDE_FLOOR, 0);
-       result = make_real_object(&(num.imag));
-       clear_real(&(num.real));
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Numberp(LispBuiltin *builtin)
-/*
- numberp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (NUMBERP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Numerator(LispBuiltin *builtin)
-/*
- numerator rational
- */
-{
-    LispObj *result, *rational;
-
-    rational = ARGUMENT(0);
-
-    switch (OBJECT_TYPE(rational)) {
-       case LispFixnum_t:
-       case LispInteger_t:
-       case LispBignum_t:
-           result = rational;
-           break;
-       case LispRatio_t:
-           result = INTEGER(OFRN(rational));
-           break;
-       case LispBigratio_t:
-           if (mpi_fiti(OBRN(rational)))
-               result = INTEGER(mpi_geti(OBRN(rational)));
-           else {
-               mpi *num = XALLOC(mpi);
-
-               mpi_init(num);
-               mpi_set(num, OBRN(rational));
-               result = BIGNUM(num);
-           }
-           break;
-       default:
-           LispDestroy("%s: %s is not a rational number",
-                       STRFUN(builtin), STROBJ(rational));
-           /*NOTREACHED*/
-           result = NIL;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Oddp(LispBuiltin *builtin)
-/*
- oddp integer
- */
-{
-    LispObj *result, *integer;
-
-    integer = ARGUMENT(0);
-
-    switch (OBJECT_TYPE(integer)) {
-       case LispFixnum_t:
-           result = FIXNUM_VALUE(integer) % 2 ? T : NIL;
-           break;
-       case LispInteger_t:
-           result = INT_VALUE(integer) % 2 ? T : NIL;
-           break;
-       case LispBignum_t:
-           result = mpi_remi(OBI(integer), 2) ? T : NIL;
-           break;
-       default:
-           fatal_builtin_object_error(builtin, integer, NOT_AN_INTEGER);
-           /*NOTREACHED*/
-           result = NIL;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Plusp(LispBuiltin *builtin)
-/*
- plusp number
- */
-{
-    LispObj *number;
-
-    number = ARGUMENT(0);
-
-    CHECK_REAL(number);
-
-    return (cmp_real_object(&zero, number) < 0 ? T : NIL);
-}
-
-LispObj *
-Lisp_Rational(LispBuiltin *builtin)
-/*
- rational number
- */
-{
-    LispObj *number;
-
-    number = ARGUMENT(0);
-
-    if (DFLOATP(number)) {
-       double numerator = ODF(number);
-
-       if ((long)numerator == numerator)
-           number = INTEGER(numerator);
-       else {
-           n_real real;
-           mpr *bigr = XALLOC(mpr);
-
-           mpr_init(bigr);
-           mpr_setd(bigr, numerator);
-           real.type = N_BIGRATIO;
-           real.data.bigratio = bigr;
-           rbr_canonicalize(&real);
-           number = make_real_object(&real);
-       }
-    }
-    else {
-       CHECK_REAL(number);
-    }
-
-    return (number);
-}
-
-LispObj *
-Lisp_Rationalp(LispBuiltin *builtin)
-/*
- rationalp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (RATIONALP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_Realpart(LispBuiltin *builtin)
-/*
- realpart number
- */
-{
-    LispObj *number;
-
-    number = ARGUMENT(0);
-
-    if (COMPLEXP(number))
-       return (OCXR(number));
-    else {
-       CHECK_REAL(number);
-    }
-
-    return (number);
-}
-
-LispObj *
-Lisp_Rem(LispBuiltin *builtin)
-/*
- rem number divisor
- */
-{
-    LispObj *result;
-
-    LispObj *number, *divisor;
-
-    divisor = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    if (INTEGERP(number) && INTEGERP(divisor)) {
-       n_real real;
-
-       set_real_object(&real, number);
-       rem_real_object(&real, divisor);
-       result = make_real_object(&real);
-    }
-    else {
-       n_number num;
-
-       set_number_object(&num, number);
-       divide_number_object(&num, divisor, NDIVIDE_TRUNC, 0);
-       result = make_real_object(&(num.imag));
-       clear_real(&(num.real));
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Sqrt(LispBuiltin *builtin)
-/*
- sqrt number
- */
-{
-    n_number num;
-    LispObj *number;
-
-    number = ARGUMENT(0);
-
-    set_number_object(&num, number);
-    sqrt_number(&num);
-
-    return (make_number_object(&num));
-}
-
-LispObj *
-Lisp_Zerop(LispBuiltin *builtin)
-/*
- zerop number
- */
-{
-    LispObj *result, *number;
-
-    number = ARGUMENT(0);
-
-    switch (OBJECT_TYPE(number)) {
-       case LispFixnum_t:
-       case LispInteger_t:
-       case LispBignum_t:
-       case LispDFloat_t:
-       case LispRatio_t:
-       case LispBigratio_t:
-           result = cmp_real_object(&zero, number) == 0 ? T : NIL;
-           break;
-       case LispComplex_t:
-           result = cmp_real_object(&zero, OCXR(number)) == 0 &&
-                    cmp_real_object(&zero, OCXI(number)) == 0 ? T : NIL;
-           break;
-       default:
-           fatal_builtin_object_error(builtin, number, NOT_A_NUMBER);
-           /*NOTREACHED*/
-           result = NIL;
-    }
-
-    return (result);
-}
-
-static LispObj *
-LispDivide(LispBuiltin *builtin, int fun, int flo)
-{
-    n_number num;
-    LispObj *number, *divisor;
-
-    divisor = ARGUMENT(1);
-    number = ARGUMENT(0);
-
-    RETURN_COUNT = 1;
-
-    if (cmp_real_object(&zero, number) == 0) {
-       if (divisor != NIL) {
-           CHECK_REAL(divisor);
-       }
-
-       return (RETURN(0) = obj_zero);
-    }
-
-    if (divisor == UNSPEC)
-       divisor = obj_one;
-
-    set_number_object(&num, number);
-    if (num.complex)
-       fatal_builtin_object_error(builtin, divisor, NOT_A_REAL_NUMBER);
-
-    divide_number_object(&num, divisor, fun, flo);
-    RETURN(0) = make_real_object(&(num.imag));
-
-    return (make_real_object(&(num.real)));
-}
-
-LispObj *
-Lisp_Ceiling(LispBuiltin *builtin)
-/*
- ceiling number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_CEIL, 0));
-}
-
-LispObj *
-Lisp_Fceiling(LispBuiltin *builtin)
-/*
- fceiling number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_CEIL, 1));
-}
-
-LispObj *
-Lisp_Floor(LispBuiltin *builtin)
-/*
- floor number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_FLOOR, 0));
-}
-
-LispObj *
-Lisp_Ffloor(LispBuiltin *builtin)
-/*
- ffloor number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_FLOOR, 1));
-}
-
-LispObj *
-Lisp_Round(LispBuiltin *builtin)
-/*
- round number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_ROUND, 0));
-}
-
-LispObj *
-Lisp_Fround(LispBuiltin *builtin)
-/*
- fround number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_ROUND, 1));
-}
-
-LispObj *
-Lisp_Truncate(LispBuiltin *builtin)
-/*
- truncate number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_TRUNC, 0));
-}
-
-LispObj *
-Lisp_Ftruncate(LispBuiltin *builtin)
-/*
- ftruncate number &optional divisor
- */
-{
-    return (LispDivide(builtin, NDIVIDE_TRUNC, 1));
-}
diff --git a/xedit/lisp/math.h b/xedit/lisp/math.h
deleted file mode 100644 (file)
index b067c9e..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/math.h,v 1.6tsi Exp $ */
-
-#ifndef Lisp_math_h
-#define Lisp_math_h
-
-#include "lisp/internal.h"
-#include "mp.h"
-
-void LispMathInit(void);
-LispObj *LispFloatCoerce(LispBuiltin*, LispObj*);
-
-LispObj *Lisp_Mul(LispBuiltin*);
-LispObj *Lisp_Plus(LispBuiltin*);
-LispObj *Lisp_Minus(LispBuiltin*);
-LispObj *Lisp_Div(LispBuiltin*);
-LispObj *Lisp_OnePlus(LispBuiltin*);
-LispObj *Lisp_OneMinus(LispBuiltin*);
-LispObj *Lisp_Less(LispBuiltin*);
-LispObj *Lisp_LessEqual(LispBuiltin*);
-LispObj *Lisp_Equal_(LispBuiltin*);
-LispObj *Lisp_Greater(LispBuiltin*);
-LispObj *Lisp_GreaterEqual(LispBuiltin*);
-LispObj *Lisp_NotEqual(LispBuiltin*);
-LispObj *Lisp_Max(LispBuiltin*);
-LispObj *Lisp_Min(LispBuiltin*);
-LispObj *Lisp_Mod(LispBuiltin*);
-LispObj *Lisp_Abs(LispBuiltin*);
-LispObj *Lisp_Complex(LispBuiltin*);
-LispObj *Lisp_Complexp(LispBuiltin*);
-LispObj *Lisp_Conjugate(LispBuiltin*);
-LispObj *Lisp_Decf(LispBuiltin*);
-LispObj *Lisp_Denominator(LispBuiltin*);
-LispObj *Lisp_Evenp(LispBuiltin*);
-LispObj *Lisp_Float(LispBuiltin*);
-LispObj *Lisp_Floatp(LispBuiltin*);
-LispObj *Lisp_Gcd(LispBuiltin*);
-LispObj *Lisp_Imagpart(LispBuiltin*);
-LispObj *Lisp_Incf(LispBuiltin*);
-LispObj *Lisp_Integerp(LispBuiltin*);
-LispObj *Lisp_Isqrt(LispBuiltin*);
-LispObj *Lisp_Lcm(LispBuiltin*);
-LispObj *Lisp_Logand(LispBuiltin*);
-LispObj *Lisp_Logeqv(LispBuiltin*);
-LispObj *Lisp_Logior(LispBuiltin*);
-LispObj *Lisp_Lognot(LispBuiltin*);
-LispObj *Lisp_Logxor(LispBuiltin*);
-LispObj *Lisp_Minusp(LispBuiltin*);
-LispObj *Lisp_Numberp(LispBuiltin*);
-LispObj *Lisp_Numerator(LispBuiltin*);
-LispObj *Lisp_Oddp(LispBuiltin*);
-LispObj *Lisp_Plusp(LispBuiltin*);
-LispObj *Lisp_Rational(LispBuiltin*);
-#if 0
-LispObj *Lisp_Rationalize(LispBuiltin*);
-#endif
-LispObj *Lisp_Rationalp(LispBuiltin*);
-LispObj *Lisp_Realpart(LispBuiltin*);
-LispObj *Lisp_Rem(LispBuiltin*);
-LispObj *Lisp_Sqrt(LispBuiltin*);
-LispObj *Lisp_Zerop(LispBuiltin*);
-LispObj *Lisp_Ceiling(LispBuiltin*);
-LispObj *Lisp_Fceiling(LispBuiltin*);
-LispObj *Lisp_Floor(LispBuiltin*);
-LispObj *Lisp_Ffloor(LispBuiltin*);
-LispObj *Lisp_Round(LispBuiltin*);
-LispObj *Lisp_Fround(LispBuiltin*);
-LispObj *Lisp_Truncate(LispBuiltin*);
-LispObj *Lisp_Ftruncate(LispBuiltin*);
-
-
-#endif /* Lisp_math_h */
diff --git a/xedit/lisp/mathimp.c b/xedit/lisp/mathimp.c
deleted file mode 100644 (file)
index f5c098f..0000000
+++ /dev/null
@@ -1,5223 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/mathimp.c,v 1.14tsi Exp $ */
-
-
-/*
- * Defines
- */
-#ifdef __GNUC__
-#define CONST                  __attribute__ ((__const__))
-#else
-#define CONST                  /**/
-#endif
-
-/* mask for checking overflow on long operations */
-#ifdef LONG64
-#define FI_MASK                        0x4000000000000000L
-#define LONGSBITS              63
-#else
-#define FI_MASK                        0x40000000L
-#define LONGSBITS              31
-#endif
-
-#define N_FIXNUM               1
-#define N_BIGNUM               2
-#define N_FLONUM               3
-#define N_FIXRATIO             4
-#define N_BIGRATIO             5
-
-#define NOP_ADD                        1
-#define NOP_SUB                        2
-#define NOP_MUL                        3
-#define NOP_DIV                        4
-
-#define NDIVIDE_CEIL           1
-#define NDIVIDE_FLOOR          2
-#define NDIVIDE_ROUND          3
-#define NDIVIDE_TRUNC          4
-
-/* real part from number */
-#define NREAL(num)             &((num)->real)
-#define NRTYPE(num)            (num)->real.type
-#define NRFI(num)              (num)->real.data.fixnum
-#define NRBI(num)              (num)->real.data.bignum
-#define NRFF(num)              (num)->real.data.flonum
-#define NRFRN(Num)             (Num)->real.data.fixratio.num
-#define NRFRD(num)             (num)->real.data.fixratio.den
-#define NRBR(num)              (num)->real.data.bigratio
-#define NRBRN(num)             mpr_num(NRBR(num))
-#define NRBRD(num)             mpr_den(NRBR(num))
-
-#define NRCLEAR_BI(num)                mpi_clear(NRBI(num)); XFREE(NRBI(num))
-#define NRCLEAR_BR(num)                mpr_clear(NRBR(num)); XFREE(NRBR(num))
-
-/* imag part from number */
-#define NIMAG(num)             &((num)->imag)
-#define NITYPE(num)            (num)->imag.type
-#define NIFI(num)              (num)->imag.data.fixnum
-#define NIBI(num)              (num)->imag.data.bignum
-#define NIFF(num)              (num)->imag.data.flonum
-#define NIFRN(Num)             (Num)->imag.data.fixratio.num
-#define NIFRD(num)             (num)->imag.data.fixratio.den
-#define NIBR(num)              (num)->imag.data.bigratio
-#define NIBRN(obj)             mpr_num(NIBR(obj))
-#define NIBRD(obj)             mpr_den(NIBR(obj))
-
-/* real number fields */
-#define RTYPE(real)            (real)->type
-#define RFI(real)              (real)->data.fixnum
-#define RBI(real)              (real)->data.bignum
-#define RFF(real)              (real)->data.flonum
-#define RFRN(real)             (real)->data.fixratio.num
-#define RFRD(real)             (real)->data.fixratio.den
-#define RBR(real)              (real)->data.bigratio
-#define RBRN(real)             mpr_num(RBR(real))
-#define RBRD(real)             mpr_den(RBR(real))
-
-#define RINTEGERP(real)                                \
-    (RTYPE(real) == N_FIXNUM || RTYPE(real) == N_BIGNUM)
-
-#define RCLEAR_BI(real)                mpi_clear(RBI(real)); XFREE(RBI(real))
-#define RCLEAR_BR(real)                mpr_clear(RBR(real)); XFREE(RBR(real))
-
-/* numeric value from lisp object */
-#define OFI(object)            FIXNUM_VALUE(object)
-#define OII(object)            INT_VALUE(object)
-#define OBI(object)            (object)->data.mp.integer
-#define ODF(object)            DFLOAT_VALUE(object)
-#define OFRN(object)           (object)->data.ratio.numerator
-#define OFRD(object)           (object)->data.ratio.denominator
-#define OBR(object)            (object)->data.mp.ratio
-#define OBRN(object)           mpr_num(OBR(object))
-#define OBRD(object)           mpr_den(OBR(object))
-#define OCXR(object)           (object)->data.complex.real
-#define OCXI(object)           (object)->data.complex.imag
-
-#define XALLOC(type)           LispMalloc(sizeof(type))
-#define XFREE(ptr)             LispFree(ptr)
-
-
-/*
- * Types
- */
-typedef struct _n_real {
-    char type;
-    union {
-       long fixnum;
-       mpi *bignum;
-       double flonum;
-       struct {
-           long num;
-           long den;
-       } fixratio;
-       mpr *bigratio;
-    } data;
-} n_real;
-
-typedef struct _n_number {
-    char complex;
-    n_real real;
-    n_real imag;
-} n_number;
-
-
-/*
- * Prototypes
- */
-static void number_init(void);
-static LispObj *number_pi(void);
-
-static void set_real_real(n_real*, n_real*);
-static void set_real_object(n_real*, LispObj*);
-static void set_number_object(n_number*, LispObj*);
-static void clear_real(n_real*);
-static void clear_number(n_number*);
-
-static LispObj *make_real_object(n_real*);
-static LispObj *make_number_object(n_number*);
-
-static void fatal_error(int);
-static void fatal_object_error(LispObj*, int);
-static void fatal_builtin_object_error(LispBuiltin*, LispObj*, int);
-
-static double bi_getd(mpi*);
-static double br_getd(mpr*);
-
-/* add */
-static void add_real_object(n_real*, LispObj*);
-static void add_number_object(n_number*, LispObj*);
-
-/* sub */
-static void sub_real_object(n_real*, LispObj*);
-static void sub_number_object(n_number*, LispObj*);
-
-/* mul */
-static void mul_real_object(n_real*, LispObj*);
-static void mul_number_object(n_number*, LispObj*);
-
-/* div */
-static void div_real_object(n_real*, LispObj*);
-static void div_number_object(n_number*, LispObj*);
-
-/* compare */
-static int cmp_real_real(n_real*, n_real*);
-static int cmp_real_object(n_real*, LispObj*);
-#if 0  /* not used */
-static int cmp_number_object(n_number*, LispObj*);
-#endif
-static int cmp_object_object(LispObj*, LispObj*, int);
-
-/* fixnum */
-static INLINE int fi_fi_add_overflow(long, long) CONST;
-static INLINE int fi_fi_sub_overflow(long, long) CONST;
-static INLINE int fi_fi_mul_overflow(long, long) CONST;
-
-/* bignum */
-static void rbi_canonicalize(n_real*);
-
-/* ratio */
-static void rfr_canonicalize(n_real*);
-static void rbr_canonicalize(n_real*);
-
-/* complex */
-static void ncx_canonicalize(n_number*);
-
-/* abs */
-static void abs_real(n_real*);
-static void abs_number(n_number*);
-static void nabs_cx(n_number*);
-static INLINE void rabs_fi(n_real*);
-static INLINE void rabs_bi(n_real*);
-static INLINE void rabs_ff(n_real*);
-static INLINE void rabs_fr(n_real*);
-static INLINE void rabs_br(n_real*);
-
-/* neg */
-static void neg_real(n_real*);
-static void neg_number(n_number*);
-static void rneg_fi(n_real*);
-static INLINE void rneg_bi(n_real*);
-static INLINE void rneg_ff(n_real*);
-static INLINE void rneg_fr(n_real*);
-static INLINE void rneg_br(n_real*);
-
-/* sqrt */
-static void sqrt_real(n_real*);
-static void sqrt_number(n_number*);
-static void rsqrt_xi(n_real*);
-static void rsqrt_xr(n_real*);
-static void rsqrt_ff(n_real*);
-static void nsqrt_cx(n_number*);
-static void nsqrt_xi(n_number*);
-static void nsqrt_ff(n_number*);
-static void nsqrt_xr(n_number*);
-
-/* mod */
-static void mod_real_real(n_real*, n_real*);
-static void mod_real_object(n_real*, LispObj*);
-static void rmod_fi_fi(n_real*, long);
-static void rmod_fi_bi(n_real*, mpi*);
-static void rmod_bi_fi(n_real*, long);
-static void rmod_bi_bi(n_real*, mpi*);
-
-/* rem */
-static void rem_real_object(n_real*, LispObj*);
-static void rrem_fi_fi(n_real*, long);
-static void rrem_fi_bi(n_real*, mpi*);
-static void rrem_bi_fi(n_real*, long);
-static void rrem_bi_bi(n_real*, mpi*);
-
-/* gcd */
-static void gcd_real_object(n_real*, LispObj*);
-
-/* and */
-static void and_real_object(n_real*, LispObj*);
-
-/* eqv */
-static void eqv_real_object(n_real*, LispObj*);
-
-/* ior */
-static void ior_real_object(n_real*, LispObj*);
-
-/* not */
-static void not_real(n_real*);
-
-/* xor */
-static void xor_real_object(n_real*, LispObj*);
-
-/* divide */
-static void divide_number_object(n_number*, LispObj*, int, int);
-static void ndivide_xi_xi(n_number*, LispObj*, int, int);
-static void ndivide_flonum(n_number*, double, double, int, int);
-static void ndivide_xi_xr(n_number*, LispObj*, int, int);
-static void ndivide_xr_xi(n_number*, LispObj*, int, int);
-static void ndivide_xr_xr(n_number*, LispObj*, int, int);
-
-/* real complex */
-static void nadd_re_cx(n_number*, LispObj*);
-static void nsub_re_cx(n_number*, LispObj*);
-static void nmul_re_cx(n_number*, LispObj*);
-static void ndiv_re_cx(n_number*, LispObj*);
-
-/* complex real */
-static void nadd_cx_re(n_number*, LispObj*);
-static void nsub_cx_re(n_number*, LispObj*);
-static void nmul_cx_re(n_number*, LispObj*);
-static void ndiv_cx_re(n_number*, LispObj*);
-
-/* complex complex */
-static void nadd_cx_cx(n_number*, LispObj*);
-static void nsub_cx_cx(n_number*, LispObj*);
-static void nmul_cx_cx(n_number*, LispObj*);
-static void ndiv_cx_cx(n_number*, LispObj*);
-static int cmp_cx_cx(LispObj*, LispObj*);
-
-/* flonum flonum */
-static void radd_flonum(n_real*, double, double);
-static void rsub_flonum(n_real*, double, double);
-static void rmul_flonum(n_real*, double, double);
-static void rdiv_flonum(n_real*, double, double);
-static int cmp_flonum(double, double);
-
-/* fixnum fixnum */
-static void rop_fi_fi_bi(n_real*, long, int);
-static INLINE void radd_fi_fi(n_real*, long);
-static INLINE void rsub_fi_fi(n_real*, long);
-static INLINE void rmul_fi_fi(n_real*, long);
-static INLINE void rdiv_fi_fi(n_real*, long);
-static INLINE int cmp_fi_fi(long, long);
-static void ndivide_fi_fi(n_number*, long, int, int);
-
-/* fixnum bignum */
-static void rop_fi_bi_xi(n_real*, mpi*, int);
-static INLINE void radd_fi_bi(n_real*, mpi*);
-static INLINE void rsub_fi_bi(n_real*, mpi*);
-static INLINE void rmul_fi_bi(n_real*, mpi*);
-static void rdiv_fi_bi(n_real*, mpi*);
-static INLINE int cmp_fi_bi(long, mpi*);
-
-/* fixnum fixratio */
-static void rop_fi_fr_as_xr(n_real*, long, long, int);
-static void rop_fi_fr_md_xr(n_real*, long, long, int);
-static INLINE void radd_fi_fr(n_real*, long, long);
-static INLINE void rsub_fi_fr(n_real*, long, long);
-static INLINE void rmul_fi_fr(n_real*, long, long);
-static INLINE void rdiv_fi_fr(n_real*, long, long);
-static INLINE int cmp_fi_fr(long, long, long);
-
-/* fixnum bigratio */
-static void rop_fi_br_as_xr(n_real*, mpr*, int);
-static void rop_fi_br_md_xr(n_real*, mpr*, int);
-static INLINE void radd_fi_br(n_real*, mpr*);
-static INLINE void rsub_fi_br(n_real*, mpr*);
-static INLINE void rmul_fi_br(n_real*, mpr*);
-static INLINE void rdiv_fi_br(n_real*, mpr*);
-static INLINE int cmp_fi_br(long, mpr*);
-
-/* bignum fixnum */
-static INLINE void radd_bi_fi(n_real*, long);
-static INLINE void rsub_bi_fi(n_real*, long);
-static INLINE void rmul_bi_fi(n_real*, long);
-static void rdiv_bi_fi(n_real*, long);
-static INLINE int cmp_bi_fi(mpi*, long);
-
-/* bignum bignum */
-static INLINE void radd_bi_bi(n_real*, mpi*);
-static INLINE void rsub_bi_bi(n_real*, mpi*);
-static INLINE void rmul_bi_bi(n_real*, mpi*);
-static void rdiv_bi_bi(n_real*, mpi*);
-static INLINE int cmp_bi_bi(mpi*, mpi*);
-
-/* bignum fixratio */
-static void rop_bi_fr_as_xr(n_real*, long, long, int);
-static void rop_bi_fr_md_xr(n_real*, long, long, int);
-static INLINE void radd_bi_fr(n_real*, long, long);
-static INLINE void rsub_bi_fr(n_real*, long, long);
-static INLINE void rmul_bi_fr(n_real*, long, long);
-static INLINE void rdiv_bi_fr(n_real*, long, long);
-static int cmp_bi_fr(mpi*, long, long);
-
-/* bignum bigratio */
-static void rop_bi_br_as_xr(n_real*, mpr*, int);
-static void rop_bi_br_md_xr(n_real*, mpr*, int);
-static INLINE void radd_bi_br(n_real*, mpr*);
-static INLINE void rsub_bi_br(n_real*, mpr*);
-static INLINE void rmul_bi_br(n_real*, mpr*);
-static INLINE void rdiv_bi_br(n_real*, mpr*);
-static int cmp_bi_br(mpi*, mpr*);
-
-/* fixratio fixnum */
-static void rop_fr_fi_as_xr(n_real*, long, int);
-static void rop_fr_fi_md_xr(n_real*, long, int);
-static INLINE void radd_fr_fi(n_real*, long);
-static INLINE void rsub_fr_fi(n_real*, long);
-static INLINE void rmul_fr_fi(n_real*, long);
-static INLINE void rdiv_fr_fi(n_real*, long);
-static INLINE int cmp_fr_fi(long, long, long);
-
-/* fixratio bignum */
-static void rop_fr_bi_as_xr(n_real*, mpi*, int);
-static void rop_fr_bi_md_xr(n_real*, mpi*, int);
-static INLINE void radd_fr_bi(n_real*, mpi*);
-static INLINE void rsub_fr_bi(n_real*, mpi*);
-static INLINE void rmul_fr_bi(n_real*, mpi*);
-static INLINE void rdiv_fr_bi(n_real*, mpi*);
-static int cmp_fr_bi(long, long, mpi*);
-
-/* fixratio fixratio */
-static void rop_fr_fr_as_xr(n_real*, long, long, int);
-static void rop_fr_fr_md_xr(n_real*, long, long, int);
-static INLINE void radd_fr_fr(n_real*, long, long);
-static INLINE void rsub_fr_fr(n_real*, long, long);
-static INLINE void rmul_fr_fr(n_real*, long, long);
-static INLINE void rdiv_fr_fr(n_real*, long, long);
-static INLINE int cmp_fr_fr(long, long, long, long);
-
-/* fixratio bigratio */
-static void rop_fr_br_asmd_xr(n_real*, mpr*, int);
-static INLINE void radd_fr_br(n_real*, mpr*);
-static INLINE void rsub_fr_br(n_real*, mpr*);
-static INLINE void rmul_fr_br(n_real*, mpr*);
-static INLINE void rdiv_fr_br(n_real*, mpr*);
-static int cmp_fr_br(long, long, mpr*);
-
-/* bigratio fixnum */
-static void rop_br_fi_asmd_xr(n_real*, long, int);
-static INLINE void radd_br_fi(n_real*, long);
-static INLINE void rsub_br_fi(n_real*, long);
-static INLINE void rmul_br_fi(n_real*, long);
-static INLINE void rdiv_br_fi(n_real*, long);
-static int cmp_br_fi(mpr*, long);
-
-/* bigratio bignum */
-static void rop_br_bi_as_xr(n_real*, mpi*, int);
-static INLINE void radd_br_bi(n_real*, mpi*);
-static INLINE void rsub_br_bi(n_real*, mpi*);
-static INLINE void rmul_br_bi(n_real*, mpi*);
-static INLINE void rdiv_br_bi(n_real*, mpi*);
-static int cmp_br_bi(mpr*, mpi*);
-
-/* bigratio fixratio */
-static void rop_br_fr_asmd_xr(n_real*, long, long, int);
-static INLINE void radd_br_fr(n_real*, long, long);
-static INLINE void rsub_br_fr(n_real*, long, long);
-static INLINE void rmul_br_fr(n_real*, long, long);
-static INLINE void rdiv_br_fr(n_real*, long, long);
-static int cmp_br_fr(mpr*, long, long);
-
-/* bigratio bigratio */
-static INLINE void radd_br_br(n_real*, mpr*);
-static INLINE void rsub_br_br(n_real*, mpr*);
-static INLINE void rmul_br_br(n_real*, mpr*);
-static INLINE void rdiv_br_br(n_real*, mpr*);
-static INLINE int cmp_br_br(mpr*, mpr*);
-
-/*
- * Initialization
- */
-static n_real zero, one, two;
-
-static char *fatal_error_strings[] = {
-#define DIVIDE_BY_ZERO                 0
-    "divide by zero",
-#define FLOATING_POINT_OVERFLOW                1
-    "floating point overflow",
-#define FLOATING_POINT_EXCEPTION       2
-    "floating point exception"
-};
-
-static char *fatal_object_error_strings[] = {
-#define NOT_A_NUMBER                   0
-    "is not a number",
-#define NOT_A_REAL_NUMBER              1
-    "is not a real number",
-#define NOT_AN_INTEGER                 2
-    "is not an integer"
-};
-
-/*
- * Implementation
- */
-static void
-fatal_error(int num)
-{
-    LispDestroy(fatal_error_strings[num]);
-}
-
-static void
-fatal_object_error(LispObj *obj, int num)
-{
-    LispDestroy("%s %s", STROBJ(obj), fatal_object_error_strings[num]);
-}
-
-static void
-fatal_builtin_object_error(LispBuiltin *builtin, LispObj *obj, int num)
-{
-    LispDestroy("%s: %s %s", STRFUN(builtin), STROBJ(obj),
-               fatal_object_error_strings[num]);
-}
-
-static void
-number_init(void)
-{
-    zero.type = one.type = two.type = N_FIXNUM;
-    zero.data.fixnum = 0;
-    one.data.fixnum = 1;
-    two.data.fixnum = 2;
-}
-
-static double
-bi_getd(mpi *bignum)
-{
-    double value = mpi_getd(bignum);
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_EXCEPTION);
-
-    return (value);
-}
-
-static double
-br_getd(mpr *bigratio)
-{
-    double value = mpr_getd(bigratio);
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_EXCEPTION);
-
-    return (value);
-}
-
-static LispObj *
-number_pi(void)
-{
-    LispObj *result;
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-    result = DFLOAT(M_PI);
-
-    return (result);
-}
-
-static void
-set_real_real(n_real *real, n_real *val)
-{
-    switch (RTYPE(real) = RTYPE(val)) {
-       case N_FIXNUM:
-           RFI(real) = RFI(val);
-           break;
-       case N_BIGNUM:
-           RBI(real) = XALLOC(mpi);
-           mpi_init(RBI(real));
-           mpi_set(RBI(real), RBI(val));
-           break;
-       case N_FLONUM:
-           RFF(real) = RFF(val);
-           break;
-       case N_FIXRATIO:
-           RFRN(real) = RFRN(val);
-           RFRD(real) = RFRD(val);
-           break;
-       case N_BIGRATIO:
-           RBR(real) = XALLOC(mpr);
-           mpr_init(RBR(real));
-           mpr_set(RBR(real), RBR(val));
-           break;
-    }
-}
-
-static void
-set_real_object(n_real *real, LispObj *obj)
-{
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           RTYPE(real) = N_FIXNUM;
-           RFI(real) = OFI(obj);
-           break;
-       case LispInteger_t:
-           RTYPE(real) = N_FIXNUM;
-           RFI(real) = OII(obj);
-           break;
-       case LispBignum_t:
-           RTYPE(real) = N_BIGNUM;
-           RBI(real) = XALLOC(mpi);
-           mpi_init(RBI(real));
-           mpi_set(RBI(real), OBI(obj));
-           break;
-       case LispDFloat_t:
-           RTYPE(real) = N_FLONUM;
-           RFF(real) = ODF(obj);
-           break;
-       case LispRatio_t:
-           RTYPE(real) = N_FIXRATIO;
-           RFRN(real) = OFRN(obj);
-           RFRD(real) = OFRD(obj);
-           break;
-       case LispBigratio_t:
-           RTYPE(real) = N_BIGRATIO;
-           RBR(real) = XALLOC(mpr);
-           mpr_init(RBR(real));
-           mpr_set(RBR(real), OBR(obj));
-           break;
-       default:
-           fatal_object_error(obj, NOT_A_REAL_NUMBER);
-           break;
-    }
-}
-
-static void
-set_number_object(n_number *num, LispObj *obj)
-{
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           num->complex = 0;
-           NRTYPE(num) = N_FIXNUM;
-           NRFI(num) = OFI(obj);
-           break;
-       case LispInteger_t:
-           num->complex = 0;
-           NRTYPE(num) = N_FIXNUM;
-           NRFI(num) = OII(obj);
-           break;
-       case LispBignum_t:
-           num->complex = 0;
-           NRTYPE(num) = N_BIGNUM;
-           NRBI(num) = XALLOC(mpi);
-           mpi_init(NRBI(num));
-           mpi_set(NRBI(num), OBI(obj));
-           break;
-       case LispDFloat_t:
-           num->complex = 0;
-           NRTYPE(num) = N_FLONUM;
-           NRFF(num) = ODF(obj);
-           break;
-       case LispRatio_t:
-           num->complex = 0;
-           NRTYPE(num) = N_FIXRATIO;
-           NRFRN(num) = OFRN(obj);
-           NRFRD(num) = OFRD(obj);
-           break;
-       case LispBigratio_t:
-           num->complex = 0;
-           NRTYPE(num) = N_BIGRATIO;
-           NRBR(num) = XALLOC(mpr);
-           mpr_init(NRBR(num));
-           mpr_set(NRBR(num), OBR(obj));
-           break;
-       case LispComplex_t:
-           num->complex = 1;
-           set_real_object(NREAL(num), OCXR(obj));
-           set_real_object(NIMAG(num), OCXI(obj));
-           break;
-       default:
-           fatal_object_error(obj, NOT_A_NUMBER);
-           break;
-    }
-}
-
-static void
-clear_real(n_real *real)
-{
-    if (RTYPE(real) == N_BIGNUM) {
-       mpi_clear(RBI(real));
-       XFREE(RBI(real));
-    }
-    else if (RTYPE(real) == N_BIGRATIO) {
-       mpr_clear(RBR(real));
-       XFREE(RBR(real));
-    }
-}
-
-static void
-clear_number(n_number *num)
-{
-    clear_real(NREAL(num));
-    if (num->complex)
-       clear_real(NIMAG(num));
-}
-
-static LispObj *
-make_real_object(n_real *real)
-{
-    LispObj *obj;
-
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-           if (RFI(real) > MOST_POSITIVE_FIXNUM ||
-               RFI(real) < MOST_NEGATIVE_FIXNUM) {
-               obj = LispNew(NIL, NIL);
-               obj->type = LispInteger_t;
-               OII(obj) = RFI(real);
-           }
-           else
-               obj = FIXNUM(RFI(real));
-           break;
-       case N_BIGNUM:
-           obj = BIGNUM(RBI(real));
-           break;
-       case N_FLONUM:
-           obj = DFLOAT(RFF(real));
-           break;
-       case N_FIXRATIO:
-           obj = LispNew(NIL, NIL);
-           obj->type = LispRatio_t;
-           OFRN(obj) = RFRN(real);
-           OFRD(obj) = RFRD(real);
-           break;
-       case N_BIGRATIO:
-           obj = BIGRATIO(RBR(real));
-           break;
-       default:
-           obj = NIL;
-           break;
-    }
-
-    return (obj);
-}
-
-static LispObj *
-make_number_object(n_number *num)
-{
-    LispObj *obj;
-
-    if (num->complex) {
-       GC_ENTER();
-
-       obj = LispNew(NIL, NIL);
-       GC_PROTECT(obj);
-       OCXI(obj) = NIL;
-       obj->type = LispComplex_t;
-       OCXR(obj) = make_real_object(NREAL(num));
-       OCXI(obj) = make_real_object(NIMAG(num));
-       GC_LEAVE();
-    }
-    else {
-       switch (NRTYPE(num)) {
-           case N_FIXNUM:
-               if (NRFI(num) > MOST_POSITIVE_FIXNUM ||
-                   NRFI(num) < MOST_NEGATIVE_FIXNUM) {
-                   obj = LispNew(NIL, NIL);
-                   obj->type = LispInteger_t;
-                   OII(obj) = NRFI(num);
-               }
-               else
-                   obj = FIXNUM(NRFI(num));
-               break;
-           case N_BIGNUM:
-               obj = BIGNUM(NRBI(num));
-               break;
-           case N_FLONUM:
-               obj = DFLOAT(NRFF(num));
-               break;
-           case N_FIXRATIO:
-               obj = LispNew(NIL, NIL);
-               obj->type = LispRatio_t;
-               OFRN(obj) = NRFRN(num);
-               OFRD(obj) = NRFRD(num);
-               break;
-           case N_BIGRATIO:
-               obj = BIGRATIO(NRBR(num));
-               break;
-           default:
-               obj = NIL;
-               break;
-       }
-    }
-
-    return (obj);
-}
-
-#define DEFOP_REAL_REAL(OP)                                            \
-OP##_real_real(n_real *real, n_real *val)                              \
-{                                                                      \
-    switch (RTYPE(real)) {                                             \
-       case N_FIXNUM:                                                  \
-           switch (RTYPE(val)) {                                       \
-               case N_FIXNUM:                                          \
-                   r##OP##_fi_fi(real, RFI(val));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_fi_bi(real, RBI(val));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, (double)RFI(real), RFF(val));  \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fi_fr(real, RFRN(val), RFRD(val));          \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_fi_br(real, RBR(val));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case N_BIGNUM:                                                  \
-           switch (RTYPE(val)) {                                       \
-               case N_FIXNUM:                                          \
-                   r##OP##_bi_fi(real, RFI(val));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_bi_bi(real, RBI(val));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, bi_getd(RBI(real)), RFF(val)); \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_bi_fr(real, RFRN(val), RFRD(val));          \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_bi_br(real, RBR(val));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case N_FLONUM:                                                  \
-           switch (RTYPE(val)) {                                       \
-               case N_FIXNUM:                                          \
-                   r##OP##_flonum(real, RFF(real), (double)RFI(val));  \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_flonum(real, RFF(real), bi_getd(RBI(val))); \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real), RFF(val));          \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_flonum(real, RFF(real),                     \
-                                (double)RFRN(val) / (double)RFRD(val));\
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_flonum(real, RFF(real), br_getd(RBR(val))); \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case N_FIXRATIO:                                                \
-           switch (RTYPE(val)) {                                       \
-               case N_FIXNUM:                                          \
-                   r##OP##_fr_fi(real, RFI(val));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_fr_bi(real, RBI(val));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real,                                \
-                               (double)RFRN(real) / (double)RFRD(real),\
-                               RFF(val));                              \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fr_fr(real, RFRN(val), RFRD(val));          \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_fr_br(real, RBR(val));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case N_BIGRATIO:                                                \
-           switch (RTYPE(val)) {                                       \
-               case N_FIXNUM:                                          \
-                   r##OP##_br_fi(real, RFI(val));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_br_bi(real, RBI(val));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, br_getd(RBR(real)), RFF(val)); \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_br_fr(real, RFRN(val), RFRD(val));          \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_br_br(real, RBR(val));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-    }                                                                  \
-}
-
-static void
-DEFOP_REAL_REAL(add)
-
-static void
-DEFOP_REAL_REAL(sub)
-
-static void
-DEFOP_REAL_REAL(div)
-
-static void
-DEFOP_REAL_REAL(mul)
-
-
-#define DEFOP_REAL_OBJECT(OP)                                          \
-OP##_real_object(n_real *real, LispObj *obj)                           \
-{                                                                      \
-    switch (OBJECT_TYPE(obj)) {                                                \
-       case LispFixnum_t:                                              \
-           switch (RTYPE(real)) {                                      \
-               case N_FIXNUM:                                          \
-                   r##OP##_fi_fi(real, OFI(obj));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_bi_fi(real, OFI(obj));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real), (double)OFI(obj));  \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fr_fi(real, OFI(obj));                      \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_br_fi(real, OFI(obj));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case LispInteger_t:                                             \
-           switch (RTYPE(real)) {                                      \
-               case N_FIXNUM:                                          \
-                   r##OP##_fi_fi(real, OII(obj));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_bi_fi(real, OII(obj));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real), (double)OII(obj));  \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fr_fi(real, OII(obj));                      \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_br_fi(real, OII(obj));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case LispBignum_t:                                              \
-           switch (RTYPE(real)) {                                      \
-               case N_FIXNUM:                                          \
-                   r##OP##_fi_bi(real, OBI(obj));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_bi_bi(real, OBI(obj));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real), bi_getd(OBI(obj))); \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fr_bi(real, OBI(obj));                      \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_br_bi(real, OBI(obj));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case LispDFloat_t:                                              \
-           switch (RTYPE(real)) {                                      \
-               case N_FIXNUM:                                          \
-                   r##OP##_flonum(real, (double)RFI(real), ODF(obj));  \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_flonum(real, bi_getd(RBI(real)), ODF(obj)); \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real), ODF(obj));          \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_flonum(real,                                \
-                               (double)RFRN(real) / (double)RFRD(real),\
-                               ODF(obj));                              \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_flonum(real, br_getd(RBR(real)), ODF(obj)); \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case LispRatio_t:                                               \
-           switch (RTYPE(real)) {                                      \
-               case N_FIXNUM:                                          \
-                   r##OP##_fi_fr(real, OFRN(obj), OFRD(obj));          \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_bi_fr(real, OFRN(obj), OFRD(obj));          \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real),                     \
-                               (double)OFRN(obj) / (double)OFRD(obj)); \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fr_fr(real, OFRN(obj), OFRD(obj));          \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_br_fr(real, OFRN(obj), OFRD(obj));          \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       case LispBigratio_t:                                            \
-           switch (RTYPE(real)) {                                      \
-               case N_FIXNUM:                                          \
-                   r##OP##_fi_br(real, OBR(obj));                      \
-                   break;                                              \
-               case N_BIGNUM:                                          \
-                   r##OP##_bi_br(real, OBR(obj));                      \
-                   break;                                              \
-               case N_FLONUM:                                          \
-                   r##OP##_flonum(real, RFF(real), br_getd(OBR(obj))); \
-                   break;                                              \
-               case N_FIXRATIO:                                        \
-                   r##OP##_fr_br(real, OBR(obj));                      \
-                   break;                                              \
-               case N_BIGRATIO:                                        \
-                   r##OP##_br_br(real, OBR(obj));                      \
-                   break;                                              \
-           }                                                           \
-           break;                                                      \
-       default:                                                        \
-           fatal_object_error(obj, NOT_A_REAL_NUMBER);                 \
-           break;                                                      \
-    }                                                                  \
-}
-
-static void
-DEFOP_REAL_OBJECT(add)
-
-static void
-DEFOP_REAL_OBJECT(sub)
-
-static void
-DEFOP_REAL_OBJECT(div)
-
-static void
-DEFOP_REAL_OBJECT(mul)
-
-
-#define DEFOP_NUMBER_OBJECT(OP)                                                \
-OP##_number_object(n_number *num, LispObj *obj)                                \
-{                                                                      \
-    if (num->complex) {                                                        \
-       switch (OBJECT_TYPE(obj)) {                                     \
-           case LispFixnum_t:                                          \
-           case LispInteger_t:                                         \
-           case LispBignum_t:                                          \
-           case LispDFloat_t:                                          \
-           case LispRatio_t:                                           \
-           case LispBigratio_t:                                        \
-               n##OP##_cx_re(num, obj);                                \
-               break;                                                  \
-           case LispComplex_t:                                         \
-               n##OP##_cx_cx(num, obj);                                \
-               break;                                                  \
-           default:                                                    \
-               fatal_object_error(obj, NOT_A_NUMBER);                  \
-               break;                                                  \
-       }                                                               \
-    }                                                                  \
-    else {                                                             \
-       switch (OBJECT_TYPE(obj)) {                                     \
-           case LispFixnum_t:                                          \
-               switch (NRTYPE(num)) {                                  \
-                   case N_FIXNUM:                                      \
-                       r##OP##_fi_fi(NREAL(num), OFI(obj));            \
-                       break;                                          \
-                   case N_BIGNUM:                                      \
-                       r##OP##_bi_fi(NREAL(num), OFI(obj));            \
-                       break;                                          \
-                   case N_FLONUM:                                      \
-                       r##OP##_flonum(NREAL(num), NRFF(num),           \
-                                   (double)OFI(obj));                  \
-                       break;                                          \
-                   case N_FIXRATIO:                                    \
-                       r##OP##_fr_fi(NREAL(num), OFI(obj));            \
-                       break;                                          \
-                   case N_BIGRATIO:                                    \
-                       r##OP##_br_fi(NREAL(num), OFI(obj));            \
-                       break;                                          \
-               }                                                       \
-               break;                                                  \
-           case LispInteger_t:                                         \
-               switch (NRTYPE(num)) {                                  \
-                   case N_FIXNUM:                                      \
-                       r##OP##_fi_fi(NREAL(num), OII(obj));            \
-                       break;                                          \
-                   case N_BIGNUM:                                      \
-                       r##OP##_bi_fi(NREAL(num), OII(obj));            \
-                       break;                                          \
-                   case N_FLONUM:                                      \
-                       r##OP##_flonum(NREAL(num), NRFF(num),           \
-                                   (double)OII(obj));                  \
-                       break;                                          \
-                   case N_FIXRATIO:                                    \
-                       r##OP##_fr_fi(NREAL(num), OII(obj));            \
-                       break;                                          \
-                   case N_BIGRATIO:                                    \
-                       r##OP##_br_fi(NREAL(num), OII(obj));            \
-                       break;                                          \
-               }                                                       \
-               break;                                                  \
-           case LispBignum_t:                                          \
-               switch (NRTYPE(num)) {                                  \
-                   case N_FIXNUM:                                      \
-                       r##OP##_fi_bi(NREAL(num), OBI(obj));            \
-                       break;                                          \
-                   case N_BIGNUM:                                      \
-                       r##OP##_bi_bi(NREAL(num), OBI(obj));            \
-                       break;                                          \
-                   case N_FLONUM:                                      \
-                       r##OP##_flonum(NREAL(num), NRFF(num),           \
-                                      bi_getd(OBI(obj)));              \
-                       break;                                          \
-                   case N_FIXRATIO:                                    \
-                       r##OP##_fr_bi(NREAL(num), OBI(obj));            \
-                       break;                                          \
-                   case N_BIGRATIO:                                    \
-                       r##OP##_br_bi(NREAL(num), OBI(obj));            \
-                       break;                                          \
-               }                                                       \
-               break;                                                  \
-           case LispDFloat_t:                                          \
-               switch (NRTYPE(num)) {                                  \
-                   case N_FIXNUM:                                      \
-                       r##OP##_flonum(NREAL(num), (double)NRFI(num),   \
-                                   ODF(obj));                          \
-                       break;                                          \
-                   case N_BIGNUM:                                      \
-                       r##OP##_flonum(NREAL(num), bi_getd(NRBI(num)),  \
-                                   ODF(obj));                          \
-                       break;                                          \
-                   case N_FLONUM:                                      \
-                       r##OP##_flonum(NREAL(num), NRFF(num), ODF(obj));\
-                       break;                                          \
-                   case N_FIXRATIO:                                    \
-                       r##OP##_flonum(NREAL(num),                      \
-                                   (double)NRFRN(num) /                \
-                                   (double)NRFRD(num),                 \
-                                   ODF(obj));                          \
-                       break;                                          \
-                   case N_BIGRATIO:                                    \
-                       r##OP##_flonum(NREAL(num), br_getd(NRBR(num)),  \
-                                   ODF(obj));                          \
-                       break;                                          \
-               }                                                       \
-               break;                                                  \
-           case LispRatio_t:                                           \
-               switch (NRTYPE(num)) {                                  \
-                   case N_FIXNUM:                                      \
-                       r##OP##_fi_fr(NREAL(num), OFRN(obj), OFRD(obj));\
-                       break;                                          \
-                   case N_BIGNUM:                                      \
-                       r##OP##_bi_fr(NREAL(num), OFRN(obj), OFRD(obj));\
-                       break;                                          \
-                   case N_FLONUM:                                      \
-                       r##OP##_flonum(NREAL(num), NRFF(num),           \
-                                   (double)OFRN(obj) /                 \
-                                   (double)OFRD(obj));                 \
-                       break;                                          \
-                   case N_FIXRATIO:                                    \
-                       r##OP##_fr_fr(NREAL(num), OFRN(obj), OFRD(obj));\
-                       break;                                          \
-                   case N_BIGRATIO:                                    \
-                       r##OP##_br_fr(NREAL(num), OFRN(obj), OFRD(obj));\
-                       break;                                          \
-               }                                                       \
-               break;                                                  \
-           case LispBigratio_t:                                        \
-               switch (NRTYPE(num)) {                                  \
-                   case N_FIXNUM:                                      \
-                       r##OP##_fi_br(NREAL(num), OBR(obj));            \
-                       break;                                          \
-                   case N_BIGNUM:                                      \
-                       r##OP##_bi_br(NREAL(num), OBR(obj));            \
-                       break;                                          \
-                   case N_FLONUM:                                      \
-                       r##OP##_flonum(NREAL(num), NRFF(num),           \
-                                   br_getd(OBR(obj)));         \
-                       break;                                          \
-                   case N_FIXRATIO:                                    \
-                       r##OP##_fr_br(NREAL(num), OBR(obj));            \
-                       break;                                          \
-                   case N_BIGRATIO:                                    \
-                       r##OP##_br_br(NREAL(num), OBR(obj));            \
-                       break;                                          \
-               }                                                       \
-               break;                                                  \
-           case LispComplex_t:                                         \
-               n##OP##_re_cx(num, obj);                                \
-               break;                                                  \
-           default:                                                    \
-               fatal_object_error(obj, NOT_A_NUMBER);                  \
-               break;                                                  \
-       }                                                               \
-    }                                                                  \
-}
-
-static void
-DEFOP_NUMBER_OBJECT(add)
-
-static void
-DEFOP_NUMBER_OBJECT(sub)
-
-static void
-DEFOP_NUMBER_OBJECT(div)
-
-static void
-DEFOP_NUMBER_OBJECT(mul)
-
-
-/************************************************************************
- * ABS
- ************************************************************************/
-static void
-abs_real(n_real *real)
-{
-    switch (RTYPE(real)) {
-       case N_FIXNUM:          rabs_fi(real);  break;
-       case N_BIGNUM:          rabs_bi(real);  break;
-       case N_FLONUM:          rabs_ff(real);  break;
-       case N_FIXRATIO:        rabs_fr(real);  break;
-       case N_BIGRATIO:        rabs_br(real);  break;
-    }
-}
-
-static void
-abs_number(n_number *num)
-{
-    if (num->complex)
-       nabs_cx(num);
-    else {
-       switch (NRTYPE(num)) {
-           case N_FIXNUM:      rabs_fi(NREAL(num));    break;
-           case N_BIGNUM:      rabs_bi(NREAL(num));    break;
-           case N_FLONUM:      rabs_ff(NREAL(num));    break;
-           case N_FIXRATIO:    rabs_fr(NREAL(num));    break;
-           case N_BIGRATIO:    rabs_br(NREAL(num));    break;
-       }
-    }
-}
-
-static void
-nabs_cx(n_number *num)
-{
-    n_real temp;
-
-    abs_real(NREAL(num));
-    abs_real(NIMAG(num));
-
-    if (cmp_real_real(NREAL(num), NIMAG(num)) < 0) {
-       memcpy(&temp, NIMAG(num), sizeof(n_real));
-       memcpy(NIMAG(num), NREAL(num), sizeof(n_real));
-       memcpy(NREAL(num), &temp, sizeof(n_real));
-    }
-
-    if (cmp_real_real(NIMAG(num), &zero) == 0) {
-       num->complex = 0;
-       if (NITYPE(num) == N_FLONUM) {
-           /* change number type */
-           temp.type = N_FLONUM;
-           temp.data.flonum = 1.0;
-           mul_real_real(NREAL(num), &temp);
-       }
-       else
-           clear_real(NIMAG(num));
-    }
-    else {
-       div_real_real(NIMAG(num), NREAL(num));
-       set_real_real(&temp, NIMAG(num));
-       mul_real_real(NIMAG(num), &temp);
-       clear_real(&temp);
-
-       add_real_real(NIMAG(num), &one);
-       sqrt_real(NIMAG(num));
-
-       mul_real_real(NIMAG(num), NREAL(num));
-       clear_real(NREAL(num));
-       memcpy(NREAL(num), NIMAG(num), sizeof(n_real));
-       num->complex = 0;
-    }
-}
-
-static INLINE void
-rabs_fi(n_real *real)
-{
-    if (RFI(real) < 0)
-       rneg_fi(real);
-}
-
-static INLINE void
-rabs_bi(n_real *real)
-{
-    if (mpi_cmpi(RBI(real), 0) < 0)
-       mpi_neg(RBI(real), RBI(real));
-}
-
-static INLINE void
-rabs_ff(n_real *real)
-{
-    if (RFF(real) < 0.0)
-       RFF(real) = -RFF(real);
-}
-
-static INLINE void
-rabs_fr(n_real *real)
-{
-    if (RFRN(real) < 0)
-       rneg_fr(real);
-}
-
-static INLINE void
-rabs_br(n_real *real)
-{
-    if (mpi_cmpi(RBRN(real), 0) < 0)
-       mpi_neg(RBRN(real), RBRN(real));
-}
-
-
-/************************************************************************
- * NEG
- ************************************************************************/
-static void
-neg_real(n_real *real)
-{
-    switch (RTYPE(real)) {
-       case N_FIXNUM:          rneg_fi(real);  break;
-       case N_BIGNUM:          rneg_bi(real);  break;
-       case N_FLONUM:          rneg_ff(real);  break;
-       case N_FIXRATIO:        rneg_fr(real);  break;
-       case N_BIGRATIO:        rneg_br(real);  break;
-    }
-}
-
-static void
-neg_number(n_number *num)
-{
-    if (num->complex) {
-       neg_real(NREAL(num));
-       neg_real(NIMAG(num));
-    }
-    else {
-       switch (NRTYPE(num)) {
-           case N_FIXNUM:      rneg_fi(NREAL(num));    break;
-           case N_BIGNUM:      rneg_bi(NREAL(num));    break;
-           case N_FLONUM:      rneg_ff(NREAL(num));    break;
-           case N_FIXRATIO:    rneg_fr(NREAL(num));    break;
-           case N_BIGRATIO:    rneg_br(NREAL(num));    break;
-       }
-    }
-}
-
-static void
-rneg_fi(n_real *real)
-{
-    if (RFI(real) == MINSLONG) {
-       mpi *bigi = XALLOC(mpi);
-
-       mpi_init(bigi);
-       mpi_seti(bigi, RFI(real));
-       mpi_neg(bigi, bigi);
-       RTYPE(real) = N_BIGNUM;
-       RBI(real) = bigi;
-    }
-    else
-       RFI(real) = -RFI(real);
-}
-
-static INLINE void
-rneg_bi(n_real *real)
-{
-    mpi_neg(RBI(real), RBI(real));
-}
-
-static INLINE void
-rneg_ff(n_real *real)
-{
-    RFF(real) = -RFF(real);
-}
-
-static void
-rneg_fr(n_real *real)
-{
-    if (RFRN(real) == MINSLONG) {
-       mpr *bigr = XALLOC(mpr);
-
-       mpr_init(bigr);
-       mpr_seti(bigr, RFRN(real), RFRD(real));
-       mpi_neg(mpr_num(bigr), mpr_num(bigr));
-       RTYPE(real) = N_BIGRATIO;
-       RBR(real) = bigr;
-    }
-    else
-       RFRN(real) = -RFRN(real);
-}
-
-static INLINE void
-rneg_br(n_real *real)
-{
-    mpi_neg(RBRN(real), RBRN(real));
-}
-
-
-/************************************************************************
- * SQRT
- ************************************************************************/
-static void
-sqrt_real(n_real *real)
-{
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-       case N_BIGNUM:
-           rsqrt_xi(real);
-           break;
-       case N_FLONUM:
-           rsqrt_ff(real);
-           break;
-       case N_FIXRATIO:
-       case N_BIGRATIO:
-           rsqrt_xr(real);
-           break;
-    }
-}
-
-static void
-sqrt_number(n_number *num)
-{
-    if (num->complex)
-       nsqrt_cx(num);
-    else {
-       switch (NRTYPE(num)) {
-           case N_FIXNUM:
-           case N_BIGNUM:
-               nsqrt_xi(num);
-               break;
-           case N_FLONUM:
-               nsqrt_ff(num);
-               break;
-           case N_FIXRATIO:
-           case N_BIGRATIO:
-               nsqrt_xr(num);
-               break;
-       }
-    }
-}
-
-static void
-rsqrt_xi(n_real *real)
-{
-    int exact;
-    mpi bignum;
-
-    if (cmp_real_real(real, &zero) < 0)
-       fatal_error(FLOATING_POINT_EXCEPTION);
-
-    mpi_init(&bignum);
-    if (RTYPE(real) == N_BIGNUM)
-       exact = mpi_sqrt(&bignum, RBI(real));
-    else {
-       mpi tmp;
-
-       mpi_init(&tmp);
-       mpi_seti(&tmp, RFI(real));
-       exact = mpi_sqrt(&bignum, &tmp);
-       mpi_clear(&tmp);
-    }
-    if (exact) {
-       if (RTYPE(real) == N_BIGNUM) {
-           mpi_set(RBI(real), &bignum);
-           rbi_canonicalize(real);
-       }
-       else
-           RFI(real) = mpi_geti(&bignum);
-    }
-    else {
-       double value;
-
-       if (RTYPE(real) == N_BIGNUM) {
-           value = bi_getd(RBI(real));
-           RCLEAR_BI(real);
-       }
-       else
-           value = (double)RFI(real);
-
-       value = sqrt(value);
-       RTYPE(real) = N_FLONUM;
-       RFF(real) = value;
-    }
-    mpi_clear(&bignum);
-}
-
-static void
-rsqrt_xr(n_real *real)
-{
-    n_real num, den;
-
-    if (cmp_real_real(real, &zero) < 0)
-       fatal_error(FLOATING_POINT_EXCEPTION);
-
-    if (RTYPE(real) == N_FIXRATIO) {
-       num.type = den.type = N_FIXNUM;
-       num.data.fixnum = RFRN(real);
-       den.data.fixnum = RFRD(real);
-    }
-    else {
-       mpi *bignum;
-
-       if (mpi_fiti(RBRN(real))) {
-           num.type = N_FIXNUM;
-           num.data.fixnum = mpi_geti(RBRN(real));
-       }
-       else {
-           bignum = XALLOC(mpi);
-           mpi_init(bignum);
-           mpi_set(bignum, RBRN(real));
-           num.type = N_BIGNUM;
-           num.data.bignum = bignum;
-       }
-
-       if (mpi_fiti(RBRD(real))) {
-           den.type = N_FIXNUM;
-           den.data.fixnum = mpi_geti(RBRD(real));
-       }
-       else {
-           bignum = XALLOC(mpi);
-           mpi_init(bignum);
-           mpi_set(bignum, RBRD(real));
-           den.type = N_BIGNUM;
-           den.data.bignum = bignum;
-       }
-    }
-
-    rsqrt_xi(&num);
-    rsqrt_xi(&den);
-
-    clear_real(real);
-    memcpy(real, &num, sizeof(n_real));
-    div_real_real(real, &den);
-    clear_real(&den);
-}
-
-static void
-rsqrt_ff(n_real *real)
-{
-    if (RFF(real) < 0.0)
-       fatal_error(FLOATING_POINT_EXCEPTION);
-    RFF(real) = sqrt(RFF(real));
-}
-
-
-static void
-nsqrt_cx(n_number *num)
-{
-    n_number mag;
-    n_real *real, *imag;
-
-    real = &(mag.real);
-    imag = &(mag.imag);
-    set_real_real(real, NREAL(num));
-    set_real_real(imag, NIMAG(num));
-    mag.complex = 1;
-
-    nabs_cx(&mag);     /* this will free the imag part data */
-    if (cmp_real_real(real, &zero) == 0) {
-       clear_number(num);
-       memcpy(NREAL(num), real, sizeof(n_real));
-       clear_real(real);
-       num->complex = 0;
-       return;
-    }
-    else if (cmp_real_real(NREAL(num), &zero) > 0) {
-       /* R = sqrt((mag + Ra) / 2) */
-       add_real_real(NREAL(num), real);
-       clear_real(real);
-       div_real_real(NREAL(num), &two);
-       sqrt_real(NREAL(num));
-
-       /* I = Ia / R / 2 */
-       div_real_real(NIMAG(num), NREAL(num));
-       div_real_real(NIMAG(num), &two);
-    }
-    else {
-       /* remember old imag part */
-       memcpy(imag, NIMAG(num), sizeof(n_real));
-
-       /* I = sqrt((mag - Ra) / 2) */
-       memcpy(NIMAG(num), real, sizeof(n_real));
-       sub_real_real(NIMAG(num), NREAL(num));
-       div_real_real(NIMAG(num), &two);
-       sqrt_real(NIMAG(num));
-       if (cmp_real_real(imag, &zero) < 0)
-           neg_real(NIMAG(num));
-
-       /* R = Ia / I / 2 */
-       clear_real(NREAL(num));
-       /* start with old imag part */
-       memcpy(NREAL(num), imag, sizeof(n_real));
-       div_real_real(NREAL(num), NIMAG(num));
-       div_real_real(NREAL(num), &two);
-    }
-
-    ncx_canonicalize(num);
-}
-
-static void
-nsqrt_xi(n_number *num)
-{
-    if (cmp_real_real(NREAL(num), &zero) < 0) {
-       memcpy(NIMAG(num), NREAL(num), sizeof(n_real));
-       neg_real(NIMAG(num));
-       rsqrt_xi(NIMAG(num));
-       NRTYPE(num) = N_FIXNUM;
-       NRFI(num) = 0;
-       num->complex = 1;
-    }
-    else
-       rsqrt_xi(NREAL(num));
-}
-
-static void
-nsqrt_ff(n_number *num)
-{
-    double value;
-
-    if (NRFF(num) < 0.0) {
-       value = sqrt(-NRFF(num));
-
-       NITYPE(num) = N_FLONUM;
-       NIFF(num) = value;
-       NRTYPE(num) = N_FIXNUM;
-       NRFI(num) = 0;
-       num->complex = 1;
-    }
-    else {
-       value = sqrt(NRFF(num));
-       NRFF(num) = value;
-    }
-}
-
-static void
-nsqrt_xr(n_number *num)
-{
-    if (cmp_real_real(NREAL(num), &zero) < 0) {
-       memcpy(NIMAG(num), NREAL(num), sizeof(n_real));
-       neg_real(NIMAG(num));
-       rsqrt_xr(NIMAG(num));
-       NRTYPE(num) = N_FIXNUM;
-       NRFI(num) = 0;
-       num->complex = 1;
-    }
-    else
-       rsqrt_xr(NREAL(num));
-}
-
-
-/************************************************************************
- * MOD
- ************************************************************************/
-static void
-mod_real_real(n_real *real, n_real *val)
-{
-    /* Assume both operands are integers */
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-           switch (RTYPE(val)) {
-               case N_FIXNUM:
-                   rmod_fi_fi(real, RFI(val));
-                   break;
-               case N_BIGNUM:
-                   rmod_fi_bi(real, RBI(val));
-                   break;
-           }
-           break;
-       case N_BIGNUM:
-           switch (RTYPE(val)) {
-               case N_FIXNUM:
-                   rmod_bi_fi(real, RFI(val));
-                   break;
-               case N_BIGNUM:
-                   rmod_bi_bi(real, RBI(val));
-                   break;
-           }
-           break;
-    }
-}
-
-static void
-mod_real_object(n_real *real, LispObj *obj)
-{
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-           switch (OBJECT_TYPE(obj)) {
-               case LispFixnum_t:
-                   rmod_fi_fi(real, OFI(obj));
-                   return;
-               case LispInteger_t:
-                   rmod_fi_fi(real, OII(obj));
-                   return;
-               case LispBignum_t:
-                   rmod_fi_bi(real, OBI(obj));
-                   return;
-               default:
-                   break;
-           }
-           break;
-       case N_BIGNUM:
-           switch (OBJECT_TYPE(obj)) {
-               case LispFixnum_t:
-                   rmod_bi_fi(real, OFI(obj));
-                   return;
-               case LispInteger_t:
-                   rmod_bi_fi(real, OII(obj));
-                   return;
-               case LispBignum_t:
-                   rmod_bi_bi(real, OBI(obj));
-                   return;
-               default:
-                   break;
-           }
-           break;
-       /* Assume the n_real object is an integer */
-    }
-    fatal_object_error(obj, NOT_AN_INTEGER);
-}
-
-static void
-rmod_fi_fi(n_real *real, long fi)
-{
-    if (fi == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    if ((RFI(real) < 0) ^ (fi < 0))
-       RFI(real) = (RFI(real) % fi) + fi;
-    else if (RFI(real) == MINSLONG || fi == MINSLONG) {
-       mpi bignum;
-
-       mpi_init(&bignum);
-       mpi_seti(&bignum, RFI(real));
-       RFI(real) = mpi_modi(&bignum, fi);
-       mpi_clear(&bignum);
-    }
-    else
-       RFI(real) = RFI(real) % fi;
-}
-
-static void
-rmod_fi_bi(n_real *real, mpi *bignum)
-{
-    mpi *bigi;
-
-    if (mpi_cmpi(bignum, 0) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    bigi = XALLOC(mpi);
-    mpi_init(bigi);
-    mpi_seti(bigi, RFI(real));
-    mpi_mod(bigi, bigi, bignum);
-    RTYPE(real) = N_BIGNUM;
-    RBI(real) = bigi;
-    rbi_canonicalize(real);
-}
-
-static void
-rmod_bi_fi(n_real *real, long fi)
-{
-    mpi iop;
-
-    if (fi == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    mpi_init(&iop);
-    mpi_seti(&iop, fi);
-    mpi_mod(RBI(real), RBI(real), &iop);
-    mpi_clear(&iop);
-    rbi_canonicalize(real);
-}
-
-static void
-rmod_bi_bi(n_real *real, mpi *bignum)
-{
-    if (mpi_cmpi(bignum, 0) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    mpi_mod(RBI(real), RBI(real), bignum);
-    rbi_canonicalize(real);
-}
-
-/************************************************************************
- * REM
- ************************************************************************/
-static void
-rem_real_object(n_real *real, LispObj *obj)
-{
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-           switch (OBJECT_TYPE(obj)) {
-               case LispFixnum_t:
-                   rrem_fi_fi(real, OFI(obj));
-                   return;
-               case LispInteger_t:
-                   rrem_fi_fi(real, OII(obj));
-                   return;
-               case LispBignum_t:
-                   rrem_fi_bi(real, OBI(obj));
-                   return;
-               default:
-                   break;
-           }
-           break;
-       case N_BIGNUM:
-           switch (OBJECT_TYPE(obj)) {
-               case LispFixnum_t:
-                   rrem_bi_fi(real, OFI(obj));
-                   return;
-               case LispInteger_t:
-                   rrem_bi_fi(real, OII(obj));
-                   return;
-               case LispBignum_t:
-                   rrem_bi_bi(real, OBI(obj));
-                   return;
-               default:
-                   break;
-           }
-           break;
-       /* Assume the n_real object is an integer */
-    }
-    fatal_object_error(obj, NOT_AN_INTEGER);
-}
-
-static void
-rrem_fi_fi(n_real *real, long fi)
-{
-    if (fi == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    if (RFI(real) == MINSLONG || fi == MINSLONG) {
-       mpi bignum;
-
-       mpi_init(&bignum);
-       mpi_seti(&bignum, RFI(real));
-       RFI(real) = mpi_remi(&bignum, fi);
-       mpi_clear(&bignum);
-    }
-    else
-       RFI(real) = RFI(real) % fi;
-}
-
-static void
-rrem_fi_bi(n_real *real, mpi *bignum)
-{
-    mpi *bigi;
-
-    if (mpi_cmpi(bignum, 0) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    bigi = XALLOC(mpi);
-    mpi_init(bigi);
-    mpi_seti(bigi, RFI(real));
-    mpi_rem(bigi, bigi, bignum);
-    RTYPE(real) = N_BIGNUM;
-    RBI(real) = bigi;
-    rbi_canonicalize(real);
-}
-
-static void
-rrem_bi_fi(n_real *real, long fi)
-{
-    mpi iop;
-
-    if (fi == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    mpi_init(&iop);
-    mpi_seti(&iop, fi);
-    mpi_rem(RBI(real), RBI(real), &iop);
-    mpi_clear(&iop);
-    rbi_canonicalize(real);
-}
-
-static void
-rrem_bi_bi(n_real *real, mpi *bignum)
-{
-    if (mpi_cmpi(bignum, 0) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    mpi_rem(RBI(real), RBI(real), bignum);
-    rbi_canonicalize(real);
-}
-
-
-/************************************************************************
- * GCD
- ************************************************************************/
-static void
-gcd_real_object(n_real *real, LispObj *obj)
-{
-    if (!INTEGERP(obj))
-       fatal_object_error(obj, NOT_AN_INTEGER);
-
-    /* check for zero operand */
-    if (cmp_real_real(real, &zero) == 0)
-       set_real_object(real, obj);
-    else if (cmp_real_object(&zero, obj) != 0) {
-       n_real rest, temp;
-
-       set_real_object(&rest, obj);
-       for (;;) {
-           mod_real_real(&rest, real);
-           if (cmp_real_real(&rest, &zero) == 0)
-               break;
-           memcpy(&temp, real, sizeof(n_real));
-           memcpy(real, &rest, sizeof(n_real));
-           memcpy(&rest, &temp, sizeof(n_real));
-       }
-       clear_real(&rest);
-    }
-}
-
-/************************************************************************
- * AND
- ************************************************************************/
-static void
-and_real_object(n_real *real, LispObj *obj)
-{
-    mpi *bigi, iop;
-
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) &= OFI(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OFI(obj));
-                   mpi_and(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispInteger_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) &= OII(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OII(obj));
-                   mpi_and(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispBignum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   bigi = XALLOC(mpi);
-                   mpi_init(bigi);
-                   mpi_seti(bigi, RFI(real));
-                   mpi_and(bigi, bigi, OBI(obj));
-                   RTYPE(real) = N_BIGNUM;
-                   RBI(real) = bigi;
-                   rbi_canonicalize(real);
-                   break;
-               case N_BIGNUM:
-                   mpi_and(RBI(real), RBI(real), OBI(obj));
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       default:
-           fatal_object_error(obj, NOT_AN_INTEGER);
-           break;
-    }
-}
-
-
-/************************************************************************
- * EQV
- ************************************************************************/
-static void
-eqv_real_object(n_real *real, LispObj *obj)
-{
-    mpi *bigi, iop;
-
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) ^= ~OFI(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OFI(obj));
-                   mpi_com(&iop, &iop);
-                   mpi_xor(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispInteger_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) ^= ~OII(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OII(obj));
-                   mpi_com(&iop, &iop);
-                   mpi_xor(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispBignum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   bigi = XALLOC(mpi);
-                   mpi_init(bigi);
-                   mpi_seti(bigi, RFI(real));
-                   mpi_com(bigi, bigi);
-                   mpi_xor(bigi, bigi, OBI(obj));
-                   RTYPE(real) = N_BIGNUM;
-                   RBI(real) = bigi;
-                   rbi_canonicalize(real);
-                   break;
-               case N_BIGNUM:
-                   mpi_com(RBI(real), RBI(real));
-                   mpi_xor(RBI(real), RBI(real), OBI(obj));
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       default:
-           fatal_object_error(obj, NOT_AN_INTEGER);
-           break;
-    }
-}
-
-
-/************************************************************************
- * IOR
- ************************************************************************/
-static void
-ior_real_object(n_real *real, LispObj *obj)
-{
-    mpi *bigi, iop;
-
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) |= OFI(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OFI(obj));
-                   mpi_ior(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispInteger_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) |= OII(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OII(obj));
-                   mpi_ior(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispBignum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   bigi = XALLOC(mpi);
-                   mpi_init(bigi);
-                   mpi_seti(bigi, RFI(real));
-                   mpi_ior(bigi, bigi, OBI(obj));
-                   RTYPE(real) = N_BIGNUM;
-                   RBI(real) = bigi;
-                   rbi_canonicalize(real);
-                   break;
-               case N_BIGNUM:
-                   mpi_ior(RBI(real), RBI(real), OBI(obj));
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       default:
-           fatal_object_error(obj, NOT_AN_INTEGER);
-           break;
-    }
-}
-
-
-/************************************************************************
- * NOT
- ************************************************************************/
-static void
-not_real(n_real *real)
-{
-    if (RTYPE(real) == N_FIXNUM)
-       RFI(real) = ~RFI(real);
-    else {
-       mpi_com(RBI(real), RBI(real));
-       rbi_canonicalize(real);
-    }
-}
-
-/************************************************************************
- * XOR
- ************************************************************************/
-static void
-xor_real_object(n_real *real, LispObj *obj)
-{
-    mpi *bigi, iop;
-
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) ^= OFI(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OFI(obj));
-                   mpi_xor(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispInteger_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   RFI(real) ^= OII(obj);
-                   break;
-               case N_BIGNUM:
-                   mpi_init(&iop);
-                   mpi_seti(&iop, OII(obj));
-                   mpi_xor(RBI(real), RBI(real), &iop);
-                   mpi_clear(&iop);
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       case LispBignum_t:
-           switch (RTYPE(real)) {
-               case N_FIXNUM:
-                   bigi = XALLOC(mpi);
-                   mpi_init(bigi);
-                   mpi_seti(bigi, RFI(real));
-                   mpi_xor(bigi, bigi, OBI(obj));
-                   RTYPE(real) = N_BIGNUM;
-                   RBI(real) = bigi;
-                   rbi_canonicalize(real);
-                   break;
-               case N_BIGNUM:
-                   mpi_xor(RBI(real), RBI(real), OBI(obj));
-                   rbi_canonicalize(real);
-                   break;
-           }
-           break;
-       default:
-           fatal_object_error(obj, NOT_AN_INTEGER);
-           break;
-    }
-}
-
-
-/************************************************************************
- * DIVIDE
- ************************************************************************/
-static void
-divide_number_object(n_number *num, LispObj *obj, int fun, int flo)
-{
-    switch (OBJECT_TYPE(obj)) {
-       case LispFixnum_t:
-           switch (NRTYPE(num)) {
-               case N_FIXNUM:
-                   ndivide_fi_fi(num, OFI(obj), fun, flo);
-                   break;
-               case N_BIGNUM:
-                   ndivide_xi_xi(num, obj, fun, flo);
-                   break;
-               case N_FLONUM:
-                   ndivide_flonum(num, NRFF(num), (double)OFI(obj), fun, flo);
-                   break;
-               case N_FIXRATIO:
-               case N_BIGRATIO:
-                   ndivide_xr_xi(num, obj, fun, flo);
-                   break;
-           }
-           break;
-       case LispInteger_t:
-           switch (NRTYPE(num)) {
-               case N_FIXNUM:
-                   ndivide_fi_fi(num, OII(obj), fun, flo);
-                   break;
-               case N_BIGNUM:
-                   ndivide_xi_xi(num, obj, fun, flo);
-                   break;
-               case N_FLONUM:
-                   ndivide_flonum(num, NRFF(num), (double)OII(obj), fun, flo);
-                   break;
-               case N_FIXRATIO:
-               case N_BIGRATIO:
-                   ndivide_xr_xi(num, obj, fun, flo);
-                   break;
-           }
-           break;
-       case LispBignum_t:
-           switch (NRTYPE(num)) {
-               case N_FIXNUM:
-               case N_BIGNUM:
-                   ndivide_xi_xi(num, obj, fun, flo);
-                   break;
-               case N_FLONUM:
-                   ndivide_flonum(num, NRFF(num), bi_getd(OBI(obj)),
-                                  fun, flo);
-                   break;
-               case N_FIXRATIO:
-               case N_BIGRATIO:
-                   ndivide_xr_xi(num, obj, fun, flo);
-                   break;
-           }
-           break;
-       case LispDFloat_t:
-           switch (NRTYPE(num)) {
-               case N_FIXNUM:
-                   ndivide_flonum(num, (double)NRFI(num), ODF(obj),
-                                  fun, flo);
-                   break;
-               case N_BIGNUM:
-                   ndivide_flonum(num, bi_getd(NRBI(num)), ODF(obj),
-                                  fun, flo);
-                   break;
-               case N_FLONUM:
-                   ndivide_flonum(num, NRFF(num), ODF(obj), fun, flo);
-                   break;
-               case N_FIXRATIO:
-                   ndivide_flonum(num,
-                                  (double)NRFRN(num) / (double)NRFRD(num),
-                                  ODF(obj), fun, flo);
-                   break;
-               case N_BIGRATIO:
-                   ndivide_flonum(num, br_getd(NRBR(num)), ODF(obj),
-                                  fun, flo);
-                   break;
-           }
-           break;
-       case LispRatio_t:
-           switch (NRTYPE(num)) {
-               case N_FIXNUM:
-               case N_BIGNUM:
-                   ndivide_xi_xr(num, obj, fun, flo);
-                   break;
-               case N_FLONUM:
-                   ndivide_flonum(num, NRFF(num),
-                                  (double)OFRN(obj) / (double)OFRD(obj),
-                                  fun, flo);
-                   break;
-               case N_FIXRATIO:
-               case N_BIGRATIO:
-                   ndivide_xr_xr(num, obj, fun, flo);
-                   break;
-           }
-           break;
-       case LispBigratio_t:
-           switch (NRTYPE(num)) {
-               case N_FIXNUM:
-               case N_BIGNUM:
-                   ndivide_xi_xr(num, obj, fun, flo);
-                   break;
-               case N_FLONUM:
-                   ndivide_flonum(num, NRFF(num), br_getd(OBR(obj)),
-                                  fun, flo);
-                   break;
-               case N_FIXRATIO:
-               case N_BIGRATIO:
-                   ndivide_xr_xr(num, obj, fun, flo);
-                   break;
-           }
-           break;
-       default:
-           fatal_object_error(obj, NOT_A_REAL_NUMBER);
-           break;
-    }
-}
-
-
-/************************************************************************
- * COMPARE
- ************************************************************************/
-static int
-cmp_real_real(n_real *op1, n_real *op2)
-{
-    switch (RTYPE(op1)) {
-       case N_FIXNUM:
-           switch (RTYPE(op2)) {
-               case N_FIXNUM:
-                   return (cmp_fi_fi(RFI(op1), RFI(op2)));
-               case N_BIGNUM:
-                   return (cmp_fi_bi(RFI(op1), RBI(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum((double)RFI(op1), RFF(op2)));
-               case N_FIXRATIO:
-                   return (cmp_fi_fr(RFI(op1), RFRN(op2), RFRD(op2)));
-               case N_BIGRATIO:
-                   return (cmp_fi_br(RFI(op1), RBR(op2)));
-           }
-           break;
-       case N_BIGNUM:
-           switch (RTYPE(op2)) {
-               case N_FIXNUM:
-                   return (cmp_bi_fi(RBI(op1), RFI(op2)));
-               case N_BIGNUM:
-                   return (cmp_bi_bi(RBI(op1), RBI(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(bi_getd(RBI(op1)), RFF(op2)));
-               case N_FIXRATIO:
-                   return (cmp_bi_fr(RBI(op1), RFRN(op2), RFRD(op2)));
-               case N_BIGRATIO:
-                   return (cmp_bi_br(RBI(op1), RBR(op2)));
-           }
-           break;
-       case N_FLONUM:
-           switch (RTYPE(op2)) {
-               case N_FIXNUM:
-                   return (cmp_flonum(RFF(op1), (double)RFI(op2)));
-               case N_BIGNUM:
-                   return (cmp_flonum(RFF(op1), bi_getd(RBI(op2))));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1), RFF(op2)));
-               case N_FIXRATIO:
-                   return (cmp_flonum(RFF(op1),
-                                      (double)RFRN(op2) / (double)RFRD(op2)));
-               case N_BIGRATIO:
-                   return (cmp_flonum(RFF(op1), br_getd(RBR(op2))));
-           }
-           break;
-       case N_FIXRATIO:
-           switch (RTYPE(op2)) {
-               case N_FIXNUM:
-                   return (cmp_fr_fi(RFRN(op1), RFRD(op1), RFI(op2)));
-               case N_BIGNUM:
-                   return (cmp_fr_bi(RFRN(op1), RFRD(op1), RBI(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum((double)RFRN(op1) / (double)RFRD(op1),
-                                      RFF(op2)));
-               case N_FIXRATIO:
-                   return (cmp_fr_fr(RFRN(op1), RFRD(op1),
-                                     RFRN(op2), RFRD(op2)));
-               case N_BIGRATIO:
-                   return (cmp_fr_br(RFRN(op1), RFRD(op1), RBR(op2)));
-           }
-           break;
-       case N_BIGRATIO:
-           switch (RTYPE(op2)) {
-               case N_FIXNUM:
-                   return (cmp_br_fi(RBR(op1), RFI(op2)));
-               case N_BIGNUM:
-                   return (cmp_br_bi(RBR(op1), RBI(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(br_getd(RBR(op1)), RFF(op2)));
-               case N_FIXRATIO:
-                   return (cmp_br_fr(RBR(op1), RFRN(op2), RFRD(op2)));
-               case N_BIGRATIO:
-                   return (cmp_br_br(RBR(op1), RBR(op2)));
-           }
-    }
-
-    return (0);
-}
-
-static int
-cmp_real_object(n_real *op1, LispObj *op2)
-{
-    switch (OBJECT_TYPE(op2)) {
-       case LispFixnum_t:
-           switch (RTYPE(op1)) {
-               case N_FIXNUM:
-                   return (cmp_fi_fi(RFI(op1), OFI(op2)));
-               case N_BIGNUM:
-                   return (cmp_bi_fi(RBI(op1), OFI(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1), (double)OFI(op2)));
-               case N_FIXRATIO:
-                   return (cmp_fr_fi(RFRD(op1), RFRN(op1), OFI(op2)));
-               case N_BIGRATIO:
-                   return (cmp_br_fi(RBR(op1), OFI(op2)));
-           }
-           break;
-       case LispInteger_t:
-           switch (RTYPE(op1)) {
-               case N_FIXNUM:
-                   return (cmp_fi_fi(RFI(op1), OII(op2)));
-               case N_BIGNUM:
-                   return (cmp_bi_fi(RBI(op1), OII(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1), (double)OII(op2)));
-               case N_FIXRATIO:
-                   return (cmp_fr_fi(RFRD(op1), RFRN(op1), OII(op2)));
-               case N_BIGRATIO:
-                   return (cmp_br_fi(RBR(op1), OII(op2)));
-           }
-           break;
-       case LispBignum_t:
-           switch (RTYPE(op1)) {
-               case N_FIXNUM:
-                   return (cmp_fi_bi(RFI(op1), OBI(op2)));
-               case N_BIGNUM:
-                   return (cmp_bi_bi(RBI(op1), OBI(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1), bi_getd(OBI(op2))));
-               case N_FIXRATIO:
-                   return (cmp_fr_bi(RFRD(op1), RFRN(op1), OBI(op2)));
-               case N_BIGRATIO:
-                   return (cmp_br_bi(RBR(op1), OBI(op2)));
-           }
-           break;
-       case LispDFloat_t:
-           switch (RTYPE(op1)) {
-               case N_FIXNUM:
-                   return (cmp_flonum((double)RFI(op1), ODF(op2)));
-               case N_BIGNUM:
-                   return (cmp_flonum(bi_getd(RBI(op1)), ODF(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1), ODF(op2)));
-               case N_FIXRATIO:
-                   return (cmp_flonum((double)RFRN(op1) / (double)RFRD(op1),
-                                      ODF(op2)));
-               case N_BIGRATIO:
-                   return (cmp_flonum(br_getd(RBR(op1)), ODF(op2)));
-           }
-           break;
-       case LispRatio_t:
-           switch (RTYPE(op1)) {
-               case N_FIXNUM:
-                   return (cmp_fi_fr(RFI(op1), OFRN(op2), OFRD(op2)));
-               case N_BIGNUM:
-                   return (cmp_bi_fr(RBI(op1), OFRN(op2), OFRD(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1),
-                                      (double)OFRN(op2) / (double)OFRD(op2)));
-               case N_FIXRATIO:
-                   return (cmp_fr_fr(RFRN(op1), RFRD(op1),
-                                     OFRN(op2), OFRD(op2)));
-               case N_BIGRATIO:
-                   return (cmp_br_fr(RBR(op1), OFRN(op2), OFRD(op2)));
-           }
-           break;
-       case LispBigratio_t:
-           switch (RTYPE(op1)) {
-               case N_FIXNUM:
-                   return (cmp_fi_br(RFI(op1), OBR(op2)));
-               case N_BIGNUM:
-                   return (cmp_bi_br(RBI(op1), OBR(op2)));
-               case N_FLONUM:
-                   return (cmp_flonum(RFF(op1), br_getd(OBR(op2))));
-               case N_FIXRATIO:
-                   return (cmp_fr_br(RFRN(op1), RFRD(op1), OBR(op2)));
-               case N_BIGRATIO:
-                   return (cmp_br_br(RBR(op1), OBR(op2)));
-           }
-           break;
-       default:
-           fatal_object_error(op2, NOT_A_REAL_NUMBER);
-           break;
-    }
-
-    return (0);
-}
-
-#if 0          /* not used */
-static int
-cmp_number_object(n_number *op1, LispObj *op2)
-{
-    if (op1->complex) {
-       if (OBJECT_TYPE(op2) == LispComplex_t) {
-           if (cmp_real_object(NREAL(op1), OCXR(op2)) == 0)
-               return (cmp_real_object(NIMAG(op1), OCXI(op2)));
-           return (1);
-       }
-       else if (cmp_real_real(NIMAG(op1), &zero) == 0)
-           return (cmp_real_object(NREAL(op1), op2));
-       else
-           return (1);
-    }
-    else {
-       switch (OBJECT_TYPE(op2)) {
-           case LispFixnum_t:
-               switch (NRTYPE(op1)) {
-                   case N_FIXNUM:
-                       return (cmp_fi_fi(NRFI(op1), OFI(op2)));
-                   case N_BIGNUM:
-                       return (cmp_bi_fi(NRBI(op1), OFI(op2)));
-                   case N_FLONUM:
-                       return (cmp_flonum(NRFF(op1), (double)OFI(op2)));
-                   case N_FIXRATIO:
-                       return (cmp_fr_fi(NRFRD(op1), NRFRN(op1), OFI(op2)));
-                   case N_BIGRATIO:
-                       return (cmp_br_fi(NRBR(op1), OFI(op2)));
-               }
-               break;
-           case LispInteger_t:
-               switch (NRTYPE(op1)) {
-                   case N_FIXNUM:
-                       return (cmp_fi_fi(NRFI(op1), OII(op2)));
-                   case N_BIGNUM:
-                       return (cmp_bi_fi(NRBI(op1), OII(op2)));
-                   case N_FLONUM:
-                       return (cmp_flonum(NRFF(op1), (double)OII(op2)));
-                   case N_FIXRATIO:
-                       return (cmp_fr_fi(NRFRD(op1), NRFRN(op1), OII(op2)));
-                   case N_BIGRATIO:
-                       return (cmp_br_fi(NRBR(op1), OII(op2)));
-               }
-               break;
-           case LispBignum_t:
-               switch (NRTYPE(op1)) {
-                   case N_FIXNUM:
-                       return (cmp_fi_bi(NRFI(op1), OBI(op2)));
-                   case N_BIGNUM:
-                       return (cmp_bi_bi(NRBI(op1), OBI(op2)));
-                   case N_FLONUM:
-                       return (cmp_flonum(NRFF(op1), bi_getd(OBI(op2))));
-                   case N_FIXRATIO:
-                       return (cmp_fr_bi(NRFRD(op1), NRFRN(op1), OBI(op2)));
-                   case N_BIGRATIO:
-                       return (cmp_br_bi(NRBR(op1), OBI(op2)));
-               }
-               break;
-           case LispDFloat_t:
-               switch (NRTYPE(op1)) {
-                   case N_FIXNUM:
-                       return (cmp_flonum((double)NRFI(op1), ODF(op2)));
-                   case N_BIGNUM:
-                       return (cmp_flonum(bi_getd(NRBI(op1)), ODF(op2)));
-                   case N_FLONUM:
-                       return (cmp_flonum(NRFF(op1), ODF(op2)));
-                   case N_FIXRATIO:
-                       return (cmp_flonum((double)NRFRN(op1) /
-                                          (double)NRFRD(op1),
-                                          ODF(op2)));
-                   case N_BIGRATIO:
-                       return (cmp_flonum(br_getd(NRBR(op1)), ODF(op2)));
-               }
-               break;
-           case LispRatio_t:
-               switch (NRTYPE(op1)) {
-                   case N_FIXNUM:
-                       return (cmp_fi_fr(NRFI(op1), OFRN(op2), OFRD(op2)));
-                   case N_BIGNUM:
-                       return (cmp_bi_fr(NRBI(op1), OFRN(op2), OFRD(op2)));
-                   case N_FLONUM:
-                       return (cmp_flonum(NRFF(op1),
-                                          (double)OFRN(op2) / (double)OFRD(op2)));
-                   case N_FIXRATIO:
-                       return (cmp_fr_fr(NRFRN(op1), NRFRD(op1),
-                                         OFRN(op2), OFRD(op2)));
-                   case N_BIGRATIO:
-                       return (cmp_br_fr(NRBR(op1), OFRN(op2), OFRD(op2)));
-               }
-               break;
-           case LispBigratio_t:
-               switch (NRTYPE(op1)) {
-                   case N_FIXNUM:
-                       return (cmp_fi_br(NRFI(op1), OBR(op2)));
-                   case N_BIGNUM:
-                       return (cmp_bi_br(NRBI(op1), OBR(op2)));
-                   case N_FLONUM:
-                       return (cmp_flonum(NRFF(op1), br_getd(OBR(op2))));
-                   case N_FIXRATIO:
-                       return (cmp_fr_br(NRFRN(op1), NRFRD(op1), OBR(op2)));
-                   case N_BIGRATIO:
-                       return (cmp_br_br(NRBR(op1), OBR(op2)));
-               }
-               break;
-           case LispComplex_t:
-               if (cmp_real_object(&zero, OCXI(op2)) == 0)
-                   return (cmp_real_object(NREAL(op1), OCXR(op2)));
-               return (1);
-           default:
-               fatal_object_error(op2, NOT_A_NUMBER);
-               break;
-       }
-    }
-
-    return (0);
-}
-#endif
-
-static int
-cmp_object_object(LispObj *op1, LispObj *op2, int real)
-{
-    if (OBJECT_TYPE(op1) == LispComplex_t) {
-       if (real)
-           fatal_object_error(op1, NOT_A_REAL_NUMBER);
-       if (OBJECT_TYPE(op2) == LispComplex_t)
-           return (cmp_cx_cx(op1, op2));
-       else if (cmp_real_object(&zero, OCXI(op1)) == 0)
-           return (cmp_object_object(OCXR(op1), op2, real));
-       return (1);
-    }
-    else if (OBJECT_TYPE(op2) == LispComplex_t) {
-       if (real)
-           fatal_object_error(op1, NOT_A_REAL_NUMBER);
-       if (cmp_real_object(&zero, OCXI(op2)) == 0)
-           return (cmp_object_object(op1, OCXR(op2), real));
-       return (1);
-    }
-    else {
-       switch (OBJECT_TYPE(op1)) {
-           case LispFixnum_t:
-               switch (OBJECT_TYPE(op2)) {
-                   case LispFixnum_t:
-                       return (cmp_fi_fi(OFI(op1), OFI(op2)));
-                   case LispInteger_t:
-                       return (cmp_fi_fi(OFI(op1), OII(op2)));
-                   case LispBignum_t:
-                       return (cmp_fi_bi(OFI(op1), OBI(op2)));
-                   case LispDFloat_t:
-                       return (cmp_flonum((double)OFI(op1), ODF(op2)));
-                   case LispRatio_t:
-                       return (cmp_fi_fr(OFI(op1),
-                                         OFRN(op2), OFRD(op2)));
-                   case LispBigratio_t:
-                       return (cmp_fi_br(OFI(op1), OBR(op2)));
-                   default:
-                       break;
-               }
-               break;
-           case LispInteger_t:
-               switch (OBJECT_TYPE(op2)) {
-                   case LispFixnum_t:
-                       return (cmp_fi_fi(OII(op1), OFI(op2)));
-                   case LispInteger_t:
-                       return (cmp_fi_fi(OII(op1), OII(op2)));
-                   case LispBignum_t:
-                       return (cmp_fi_bi(OII(op1), OBI(op2)));
-                   case LispDFloat_t:
-                       return (cmp_flonum((double)OII(op1), ODF(op2)));
-                   case LispRatio_t:
-                       return (cmp_fi_fr(OII(op1),
-                                         OFRN(op2), OFRD(op2)));
-                   case LispBigratio_t:
-                       return (cmp_fi_br(OII(op1), OBR(op2)));
-                   default:
-                       break;
-               }
-               break;
-           case LispBignum_t:
-               switch (OBJECT_TYPE(op2)) {
-                   case LispFixnum_t:
-                       return (cmp_bi_fi(OBI(op1), OFI(op2)));
-                   case LispInteger_t:
-                       return (cmp_bi_fi(OBI(op1), OII(op2)));
-                   case LispBignum_t:
-                       return (cmp_bi_bi(OBI(op1), OBI(op2)));
-                   case LispDFloat_t:
-                       return (cmp_flonum(bi_getd(OBI(op1)), ODF(op2)));
-                   case LispRatio_t:
-                       return (cmp_bi_fr(OBI(op1),
-                                         OFRN(op2), OFRD(op2)));
-                   case LispBigratio_t:
-                       return (cmp_bi_br(OBI(op1), OBR(op2)));
-                   default:
-                       break;
-               }
-               break;
-           case LispDFloat_t:
-               switch (OBJECT_TYPE(op2)) {
-                   case LispFixnum_t:
-                       return (cmp_flonum(ODF(op1), (double)OFI(op2)));
-                   case LispInteger_t:
-                       return (cmp_flonum(ODF(op1), (double)OII(op2)));
-                   case LispBignum_t:
-                       return (cmp_flonum(ODF(op1), bi_getd(OBI(op2))));
-                   case LispDFloat_t:
-                       return (cmp_flonum(ODF(op1), ODF(op2)));
-                       break;
-                   case LispRatio_t:
-                       return (cmp_flonum(ODF(op1),
-                                          (double)OFRN(op2) /
-                                          (double)OFRD(op2)));
-                   case LispBigratio_t:
-                       return (cmp_flonum(ODF(op1), br_getd(OBR(op2))));
-                   default:
-                       break;
-               }
-               break;
-           case LispRatio_t:
-               switch (OBJECT_TYPE(op2)) {
-                   case LispFixnum_t:
-                       return (cmp_fr_fi(OFRN(op1), OFRD(op1), OFI(op2)));
-                   case LispInteger_t:
-                       return (cmp_fr_fi(OFRN(op1), OFRD(op1), OII(op2)));
-                   case LispBignum_t:
-                       return (cmp_fr_bi(OFRN(op1), OFRD(op1), OBI(op2)));
-                   case LispDFloat_t:
-                       return (cmp_flonum((double)OFRN(op1) /
-                                          (double)OFRD(op1),
-                                          ODF(op2)));
-                   case LispRatio_t:
-                       return (cmp_fr_fr(OFRN(op1), OFRD(op1),
-                                         OFRN(op2), OFRD(op2)));
-                   case LispBigratio_t:
-                       return (cmp_fr_br(OFRN(op1), OFRD(op1), OBR(op2)));
-                   default:
-                       break;
-               }
-               break;
-           case LispBigratio_t:
-               switch (OBJECT_TYPE(op2)) {
-                   case LispFixnum_t:
-                       return (cmp_br_fi(OBR(op1), OFI(op2)));
-                   case LispInteger_t:
-                       return (cmp_br_fi(OBR(op1), OII(op2)));
-                   case LispBignum_t:
-                       return (cmp_br_bi(OBR(op1), OBI(op2)));
-                   case LispDFloat_t:
-                       return (cmp_flonum(br_getd(OBR(op1)), ODF(op2)));
-                   case LispRatio_t:
-                       return (cmp_br_fr(OBR(op1), OFRN(op2), OFRD(op2)));
-                   case LispBigratio_t:
-                       return (cmp_br_br(OBR(op1), OBR(op2)));
-                   default:
-                       break;
-               }
-               break;
-           default:
-               fatal_object_error(op1, NOT_A_NUMBER);
-               break;
-       }
-    }
-
-    fatal_object_error(op2, NOT_A_NUMBER);
-    return (0);
-}
-
-
-/************************************************************************
- * FIXNUM
- ************************************************************************/
-/*
- * check if op1 + op2 will overflow
- */
-static INLINE int
-fi_fi_add_overflow(long op1, long op2)
-{
-    long op = op1 + op2;
-
-    return (op1 > 0 ? op2 > op : op2 < op);
-}
-
-/*
- * check if op1 - op2 will overflow
- */
-static INLINE int
-fi_fi_sub_overflow(long op1, long op2)
-{
-    long op = op1 - op2;
-
-    return (((op1 < 0) ^ (op2 < 0)) && ((op < 0) ^ (op1 < 0)));
-}
-
-/*
- * check if op1 * op2 will overflow
- */
-static INLINE int
-fi_fi_mul_overflow(long op1, long op2)
-{
-#ifndef LONG64
-    double op = (double)op1 * (double)op2;
-
-    return (op > 2147483647.0 || op < -2147483648.0);
-#else
-    int shift;
-    long mask;
-
-    if (op1 == 0 || op1 == 1 || op2 == 0 || op2 == 1)
-       return (0);
-
-    if (op1 == MINSLONG || op2 == MINSLONG)
-       return (1);
-
-    if (op1 < 0)
-       op1 = -op1;
-    if (op2 < 0)
-       op2 = -op2;
-
-    for (shift = 0, mask = FI_MASK; shift < LONGSBITS; shift++, mask >>= 1)
-       if (op1 & mask)
-           break;
-    ++shift;
-    for (mask = FI_MASK; shift < LONGSBITS; shift++, mask >>= 1)
-       if (op2 & mask)
-           break;
-
-    return (shift < LONGSBITS);
-#endif
-}
-
-
-/************************************************************************
- * BIGNUM
- ************************************************************************/
-static void
-rbi_canonicalize(n_real *real)
-{
-    if (mpi_fiti(RBI(real))) {
-       long fi = mpi_geti(RBI(real));
-
-       RTYPE(real) = N_FIXNUM;
-       mpi_clear(RBI(real));
-       XFREE(RBI(real));
-       RFI(real) = fi;
-    }
-}
-
-
-/************************************************************************
- * RATIO
- ************************************************************************/
-static void
-rfr_canonicalize(n_real *real)
-{
-    long num, numerator, den, denominator, rest;
-
-    num = numerator = RFRN(real);
-    den = denominator = RFRD(real);
-    if (denominator == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    if (num == MINSLONG || den == MINSLONG) {
-       mpr *bigratio = XALLOC(mpr);
-
-       mpr_init(bigratio);
-       mpr_seti(bigratio, num, den);
-       RTYPE(real) = N_BIGRATIO;
-       RBR(real) = bigratio;
-       rbr_canonicalize(real);
-       return;
-    }
-
-    if (num < 0)
-       num = -num;
-    else if (num == 0) {
-       RFI(real) = 0;
-       RTYPE(real) = N_FIXNUM;
-       return;
-    }
-    for (;;) {
-       if ((rest = den % num) == 0)
-           break;
-       den = num;
-       num = rest;
-    }
-    if (den != 1) {
-       denominator /= num;
-       numerator /= num;
-    }
-    if (denominator < 0) {
-       numerator = -numerator;
-       denominator = -denominator;
-    }
-    if (denominator == 1) {
-       RTYPE(real) = N_FIXNUM;
-       RFI(real) = numerator;
-    }
-    else {
-       RFRN(real) = numerator;
-       RFRD(real) = denominator;
-    }
-}
-
-static void
-rbr_canonicalize(n_real *real)
-{
-    int fitnum, fitden;
-    long numerator, denominator;
-
-    mpr_canonicalize(RBR(real));
-    fitnum = mpi_fiti(RBRN(real));
-    fitden = mpi_fiti(RBRD(real));
-    if (fitnum && fitden) {
-       numerator = mpi_geti(RBRN(real));
-       denominator = mpi_geti(RBRD(real));
-       mpr_clear(RBR(real));
-       XFREE(RBR(real));
-       if (numerator == 0) {
-           RFI(real) = 0;
-           RTYPE(real) = N_FIXNUM;
-       }
-       else if (denominator == 1) {
-           RTYPE(real) = N_FIXNUM;
-           RFI(real) = numerator;
-       }
-       else {
-           RTYPE(real) = N_FIXRATIO;
-           RFRN(real) = numerator;
-           RFRD(real) = denominator;
-       }
-    }
-    else if (fitden) {
-       denominator = mpi_geti(RBRD(real));
-       if (denominator == 1) {
-           mpi *bigi = XALLOC(mpi);
-
-           mpi_init(bigi);
-           mpi_set(bigi, RBRN(real));
-           mpr_clear(RBR(real));
-           XFREE(RBR(real));
-           RTYPE(real) = N_BIGNUM;
-           RBI(real) = bigi;
-       }
-       else if (denominator == 0)
-           fatal_error(DIVIDE_BY_ZERO);
-    }
-}
-
-
-/************************************************************************
- * COMPLEX
- ************************************************************************/
-static void
-ncx_canonicalize(n_number *num)
-{
-    if (NITYPE(num) == N_FIXNUM && NIFI(num) == 0)
-       num->complex = 0;
-}
-
-
-/************************************************************************
- * DIVIDE
- ************************************************************************/
-#define NDIVIDE_NOP    0
-#define NDIVIDE_ADD    1
-#define NDIVIDE_SUB    2
-static void
-ndivide_fi_fi(n_number *num, long div, int fun, int flo)
-{
-    long quo, rem;
-
-    if (NRFI(num) == MINSLONG || div == MINSLONG) {
-       LispObj integer;
-       mpi *bignum = XALLOC(mpi);
-
-       mpi_init(bignum);
-       mpi_seti(bignum, NRFI(num));
-       NRBI(num) = bignum;
-       NRTYPE(num) = N_BIGNUM;
-       integer.type = LispInteger_t;
-       integer.data.integer = div;
-       ndivide_xi_xi(num, &integer, fun, flo);
-       return;
-    }
-    else {
-       quo = NRFI(num) / div;
-       rem = NRFI(num) % div;
-    }
-
-    switch (fun) {
-       case NDIVIDE_CEIL:
-           if ((rem < 0 && div < 0) || (rem > 0 && div > 0)) {
-               ++quo;
-               rem -= div;
-           }
-           break;
-       case NDIVIDE_FLOOR:
-           if ((rem < 0 && div > 0) || (rem > 0 && div < 0)) {
-               --quo;
-               rem += div;
-           }
-           break;
-       case NDIVIDE_ROUND:
-           if (div > 0) {
-               if (rem > 0) {
-                   if (rem >= (div + 1) / 2) {
-                       ++quo;
-                       rem -= div;
-                   }
-               }
-               else {
-                   if (rem <= (-div - 1) / 2) {
-                       --quo;
-                       rem += div;
-                   }
-               }
-           }
-           else {
-               if (rem > 0) {
-                   if (rem >= (-div + 1) / 2) {
-                       --quo;
-                       rem += div;
-                   }
-               }
-               else {
-                   if (rem <= (div - 1) / 2) {
-                       ++quo;
-                       rem -= div;
-                   }
-               }
-           }
-           break;
-    }
-
-    NITYPE(num) = N_FIXNUM;
-    NIFI(num) = rem;
-    if (flo) {
-       NRTYPE(num) = N_FLONUM;
-       NRFF(num) = (double)quo;
-    }
-    else
-       NRFI(num) = quo;
-}
-
-static void
-ndivide_xi_xi(n_number *num, LispObj *div, int fun, int flo)
-{
-    LispType type = OBJECT_TYPE(div);
-    int state = NDIVIDE_NOP, dsign, rsign;
-    mpi *quo, *rem;
-
-    quo = XALLOC(mpi);
-    mpi_init(quo);
-    if (NRTYPE(num) == N_FIXNUM)
-       mpi_seti(quo, NRFI(num));
-    else
-       mpi_set(quo, NRBI(num));
-
-    rem = XALLOC(mpi);
-    mpi_init(rem);
-
-    switch (type) {
-       case LispFixnum_t:
-           mpi_seti(rem, OFI(div));
-           break;
-       case LispInteger_t:
-           mpi_seti(rem, OII(div));
-           break;
-       default:
-           mpi_set(rem, OBI(div));
-    }
-
-    dsign = mpi_sgn(rem);
-
-    mpi_divqr(quo, rem, quo, rem);
-    rsign = mpi_sgn(rem);
-
-    switch (fun) {
-       case NDIVIDE_CEIL:
-           if ((rsign < 0 && dsign < 0) || (rsign > 0 && dsign > 0))
-               state = NDIVIDE_ADD;
-           break;
-       case NDIVIDE_FLOOR:
-           if ((rsign < 0 && dsign > 0) || (rsign > 0 && dsign < 0))
-               state = NDIVIDE_SUB;
-           break;
-       case NDIVIDE_ROUND: {
-           mpi test;
-
-           mpi_init(&test);
-           switch (type) {
-               case LispFixnum_t:
-                   mpi_seti(&test, OFI(div));
-                   break;
-               case LispInteger_t:
-                   mpi_seti(&test, OII(div));
-                   break;
-               default:
-                   mpi_set(&test, OBI(div));
-           }
-           if (dsign > 0) {
-               if (rsign > 0) {
-                   mpi_addi(&test, &test, 1);
-                   mpi_divi(&test, &test, 2);
-                   if (mpi_cmp(rem, &test) >= 0)
-                       state = NDIVIDE_ADD;
-               }
-               else {
-                   mpi_neg(&test, &test);
-                   mpi_subi(&test, &test, 1);
-                   mpi_divi(&test, &test, 2);
-                   if (mpi_cmp(rem, &test) <= 0)
-                       state = NDIVIDE_SUB;
-               }
-           }
-           else {
-               if (rsign > 0) {
-                   mpi_neg(&test, &test);
-                   mpi_addi(&test, &test, 1);
-                   mpi_divi(&test, &test, 2);
-                   if (mpi_cmp(rem, &test) >= 0)
-                       state = NDIVIDE_SUB;
-               }
-               else {
-                   mpi_subi(&test, &test, 1);
-                   mpi_divi(&test, &test, 2);
-                   if (mpi_cmp(rem, &test) <= 0)
-                       state = NDIVIDE_ADD;
-               }
-           }
-           mpi_clear(&test);
-       }   break;
-    }
-
-    if (state == NDIVIDE_ADD) {
-       mpi_addi(quo, quo, 1);
-       switch (type) {
-           case LispFixnum_t:
-               mpi_subi(rem, rem, OFI(div));
-               break;
-           case LispInteger_t:
-               mpi_subi(rem, rem, OII(div));
-               break;
-           default:
-               mpi_sub(rem, rem, OBI(div));
-       }
-    }
-    else if (state == NDIVIDE_SUB) {
-       mpi_subi(quo, quo, 1);
-       switch (type) {
-           case LispFixnum_t:
-               mpi_addi(rem, rem, OFI(div));
-               break;
-           case LispInteger_t:
-               mpi_addi(rem, rem, OII(div));
-               break;
-           default:
-               mpi_add(rem, rem, OBI(div));
-       }
-    }
-
-    if (mpi_fiti(rem)) {
-       NITYPE(num) = N_FIXNUM;
-       NIFI(num) = mpi_geti(rem);
-       mpi_clear(rem);
-       XFREE(rem);
-    }
-    else {
-       NITYPE(num) = N_BIGNUM;
-       NIBI(num) = rem;
-    }
-
-    clear_real(NREAL(num));
-
-    if (flo) {
-       double dval = bi_getd(quo);
-
-       mpi_clear(quo);
-       XFREE(quo);
-       NRTYPE(num) = N_FLONUM;
-       NRFF(num) = dval;
-    }
-    else {
-       NRTYPE(num) = N_BIGNUM;
-       NRBI(num) = quo;
-       rbi_canonicalize(NREAL(num));
-    }
-}
-
-static void
-ndivide_flonum(n_number *number, double num, double div, int fun, int flo)
-{
-    double quo, rem, modp, tmp;
-
-    modp = modf(num / div, &quo);
-    rem = num - quo * div;
-
-    switch (fun) {
-       case NDIVIDE_CEIL:
-           if ((rem < 0.0 && div < 0.0) || (rem > 0.0 && div > 0.0)) {
-               quo += 1.0;
-               rem -= div;
-           }
-           break;
-       case NDIVIDE_FLOOR:
-           if ((rem < 0.0 && div > 0.0) || (rem > 0.0 && div < 0.0)) {
-               quo -= 1.0;
-               rem += div;
-           }
-           break;
-       case NDIVIDE_ROUND:
-           if (fabs(modp) != 0.5 || modf(quo * 0.5, &tmp) != 0.0) {
-               if (div > 0.0) {
-                   if (rem > 0.0) {
-                       if (rem >= div * 0.5) {
-                           quo += 1.0;
-                           rem -= div;
-                       }
-                   }
-                   else {
-                       if (rem <= div * -0.5) {
-                           quo -= 1.0;
-                           rem += div;
-                       }
-                   }
-               }
-               else {
-                   if (rem > 0.0) {
-                       if (rem >= div * -0.5) {
-                           quo -= 1.0;
-                           rem += div;
-                       }
-                   }
-                   else {
-                       if (rem <= div * 0.5) {
-                           quo += 1.0;
-                           rem -= div;
-                       }
-                   }
-               }
-           }
-           break;
-    }
-    if (!finite(quo) || !finite(rem))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-
-    NITYPE(number) = N_FLONUM;
-    NIFF(number) = rem;
-
-    clear_real(NREAL(number));
-
-    if (flo) {
-       NRTYPE(number) = N_FLONUM;
-       NRFF(number) = quo;
-    }
-    else {
-       if ((long)quo == quo) {
-           NRTYPE(number) = N_FIXNUM;
-           NRFI(number) = (long)quo;
-       }
-       else {
-           mpi *bigi = XALLOC(mpi);
-
-           mpi_init(bigi);
-           mpi_setd(bigi, quo);
-           NRBI(number) = bigi;
-           NRTYPE(number) = N_BIGNUM;
-       }
-    }
-}
-
-static void
-ndivide_xi_xr(n_number *num, LispObj *div, int fun, int flo)
-{
-    int state = NDIVIDE_NOP, dsign, rsign;
-    mpi *quo;
-    mpr *rem;
-
-    quo = XALLOC(mpi);
-    mpi_init(quo);
-    if (NRTYPE(num) == N_FIXNUM)
-       mpi_seti(quo, NRFI(num));
-    else    
-       mpi_set(quo, NRBI(num));
-
-    rem = XALLOC(mpr);
-    mpr_init(rem);
-
-    if (XOBJECT_TYPE(div) == LispRatio_t)
-       mpr_seti(rem, OFRN(div), OFRD(div));
-    else
-       mpr_set(rem, OBR(div));
-    dsign = mpi_sgn(mpr_num(rem));
-    mpi_mul(quo, quo, mpr_den(rem));
-
-    mpi_divqr(quo, mpr_num(rem), quo, mpr_num(rem));
-    mpr_canonicalize(rem);
-
-    rsign = mpi_sgn(mpr_num(rem));
-    if (mpr_fiti(rem)) {
-       if (mpi_geti(mpr_den(rem)) == 1) {
-           NITYPE(num) = N_FIXNUM;
-           NIFI(num) = mpi_geti(mpr_num(rem));
-       }
-       else {
-           NITYPE(num) = N_FIXRATIO;
-           NIFRN(num) = mpi_geti(mpr_num(rem));
-           NIFRD(num) = mpi_geti(mpr_den(rem));
-       }
-       mpr_clear(rem);
-       XFREE(rem);     
-    }
-    else {
-       if (mpi_fiti(mpr_den(rem)) && mpi_geti(mpr_den(rem)) == 1) {
-           NITYPE(num) = N_BIGNUM;
-           NIBI(num) = mpr_num(rem);
-           mpi_clear(mpr_den(rem));
-           XFREE(rem);
-       }
-       else {
-           NITYPE(num) = N_BIGRATIO;
-           NIBR(num) = rem;
-       }
-    }
-
-    switch (fun) {
-       case NDIVIDE_CEIL:
-           if ((rsign < 0 && dsign < 0) || (rsign > 0 && dsign > 0))
-               state = NDIVIDE_ADD;
-           break;
-       case NDIVIDE_FLOOR:
-           if ((rsign < 0 && dsign > 0) || (rsign > 0 && dsign < 0))
-               state = NDIVIDE_SUB;
-           break;
-       case NDIVIDE_ROUND: {
-           n_real cmp;
-
-           set_real_object(&cmp, div);
-           div_real_real(&cmp, &two);
-           if (dsign > 0) {
-               if (rsign > 0) {
-                   if (cmp_real_real(NIMAG(num), &cmp) >= 0)
-                       state = NDIVIDE_ADD;
-               }
-               else {
-                   neg_real(&cmp);
-                   if (cmp_real_real(NIMAG(num), &cmp) <= 0)
-                       state = NDIVIDE_SUB;
-               }
-           }
-           else {
-               if (rsign > 0) {
-                   neg_real(&cmp);
-                   if (cmp_real_real(NIMAG(num), &cmp) >= 0)
-                       state = NDIVIDE_SUB;
-               }
-               else {
-                   if (cmp_real_real(NIMAG(num), &cmp) <= 0)
-                       state = NDIVIDE_ADD;
-               }
-           }
-           clear_real(&cmp);
-       }   break;
-    }
-
-    if (state == NDIVIDE_ADD) {
-       mpi_addi(quo, quo, 1);
-       sub_real_object(NIMAG(num), div);
-    }
-    else if (state == NDIVIDE_SUB) {
-       mpi_subi(quo, quo, 1);
-       add_real_object(NIMAG(num), div);
-    }
-
-    clear_real(NREAL(num));
-
-    if (flo) {
-       double dval = bi_getd(quo);
-
-       mpi_clear(quo);
-       XFREE(quo);
-       NRTYPE(num) = N_FLONUM;
-       NRFF(num) = dval;
-    }
-    else {
-       NRBI(num)  = quo;
-       NRTYPE(num) = N_BIGNUM;
-       rbi_canonicalize(NREAL(num));
-    }
-}
-
-static void
-ndivide_xr_xi(n_number *num, LispObj *div, int fun, int flo)
-{
-    LispType type = OBJECT_TYPE(div);
-    int state = NDIVIDE_NOP, dsign, rsign;
-    mpi *quo;
-    mpr *rem;
-
-    quo = XALLOC(mpi);
-    mpi_init(quo);
-    switch (type) {
-       case LispFixnum_t:
-           dsign = OFI(div) < 0 ? -1 : OFI(div) > 0 ? 1 : 0;
-           mpi_seti(quo, OFI(div));
-           break;
-       case LispInteger_t:
-           dsign = OII(div) < 0 ? -1 : OII(div) > 0 ? 1 : 0;
-           mpi_seti(quo, OII(div));
-           break;
-       default:
-           dsign = mpi_sgn(OBI(div));
-           mpi_set(quo, OBI(div));
-           break;
-    }
-
-    rem = XALLOC(mpr);
-    mpr_init(rem);
-    if (NRTYPE(num) == N_FIXRATIO) {
-       mpr_seti(rem, NRFRN(num), NRFRD(num));
-       mpi_muli(quo, quo, NRFRD(num));
-    }
-    else {
-       mpr_set(rem, NRBR(num));
-       mpi_mul(quo, quo, NRBRD(num));
-    }
-    mpi_divqr(quo, mpr_num(rem), mpr_num(rem), quo);
-    mpr_canonicalize(rem);
-
-    rsign = mpi_sgn(mpr_num(rem));
-    if (mpr_fiti(rem)) {
-       NITYPE(num) = N_FIXRATIO;
-       NIFRN(num) = mpi_geti(mpr_num(rem));
-       NIFRD(num) = mpi_geti(mpr_den(rem));
-       mpr_clear(rem);
-       XFREE(rem);
-    }
-    else {
-       NITYPE(num) = N_BIGRATIO;
-       NIBR(num) = rem;
-    }
-
-    switch (fun) {
-       case NDIVIDE_CEIL:
-           if ((rsign < 0 && dsign < 0) || (rsign > 0 && dsign > 0))
-               state = NDIVIDE_ADD;
-           break;
-       case NDIVIDE_FLOOR:
-           if ((rsign < 0 && dsign > 0) || (rsign > 0 && dsign < 0))
-               state = NDIVIDE_SUB;
-           break;
-       case NDIVIDE_ROUND: {
-           n_real cmp;
-
-           set_real_object(&cmp, div);
-           div_real_real(&cmp, &two);
-           if (dsign > 0) {
-               if (rsign > 0) {
-                   if (cmp_real_real(NIMAG(num), &cmp) >= 0)
-                       state = NDIVIDE_ADD;
-               }
-               else {
-                   neg_real(&cmp);
-                   if (cmp_real_real(NIMAG(num), &cmp) <= 0)
-                       state = NDIVIDE_SUB;
-               }
-           }
-           else {
-               if (rsign > 0) {
-                   neg_real(&cmp);
-                   if (cmp_real_real(NIMAG(num), &cmp) >= 0)
-                       state = NDIVIDE_SUB;
-               }
-               else {
-                   if (cmp_real_real(NIMAG(num), &cmp) <= 0)
-                       state = NDIVIDE_ADD;
-               }
-           }
-           clear_real(&cmp);
-       }   break;
-    }
-
-    if (state == NDIVIDE_ADD) {
-       mpi_addi(quo, quo, 1);
-       sub_real_object(NIMAG(num), div);
-    }
-    else if (state == NDIVIDE_SUB) {
-       mpi_subi(quo, quo, 1);
-       add_real_object(NIMAG(num), div);
-    }
-
-    clear_real(NREAL(num));
-
-    if (flo) {
-       double dval = bi_getd(quo);
-
-       mpi_clear(quo);
-       XFREE(quo);
-       NRTYPE(num) = N_FLONUM;
-       NRFF(num) = dval;
-    }
-    else {
-       NRBI(num) = quo;
-       NRTYPE(num) = N_BIGNUM;
-       rbi_canonicalize(NREAL(num));
-    }
-}
-
-static void
-ndivide_xr_xr(n_number *num, LispObj *div, int fun, int flo)
-{
-    int state = NDIVIDE_NOP, dsign, rsign, modp;
-    mpr *bigr;
-    mpi *bigi;
-
-    bigr = XALLOC(mpr);
-    mpr_init(bigr);
-    if (NRTYPE(num) == N_FIXRATIO)
-       mpr_seti(bigr, NRFRN(num), NRFRD(num));
-    else
-       mpr_set(bigr, NRBR(num));
-
-    NITYPE(num) = N_BIGRATIO;
-    NIBR(num) = bigr;
-
-    if (OBJECT_TYPE(div) == LispRatio_t) {
-       dsign = OFRN(div) < 0 ? -1 : OFRN(div) > 0 ? 1 : 0;
-       mpi_muli(mpr_num(bigr), mpr_num(bigr), OFRD(div));
-       mpi_muli(mpr_den(bigr), mpr_den(bigr), OFRN(div));
-    }
-    else {
-       dsign = mpi_sgn(OBRN(div));
-       mpr_div(bigr, bigr, OBR(div));
-    }
-    modp = mpi_fiti(mpr_den(bigr)) && mpi_geti(mpr_den(bigr)) == 2;
-
-    bigi = XALLOC(mpi);
-    mpi_init(bigi);
-    mpi_divqr(bigi, mpr_num(bigr), mpr_num(bigr), mpr_den(bigr));
-
-    if (OBJECT_TYPE(div) == LispRatio_t)
-       mpi_seti(mpr_den(bigr), OFRD(div));
-    else
-       mpi_set(mpr_den(bigr), OBRD(div));
-    if (NRTYPE(num) == N_FIXRATIO)
-       mpi_muli(mpr_den(bigr), mpr_den(bigr), NRFRD(num));
-    else
-       mpi_mul(mpr_den(bigr), mpr_den(bigr), NRBRD(num));
-
-    clear_real(NREAL(num));
-    NRTYPE(num) = N_BIGNUM;
-    NRBI(num) = bigi;
-
-    rbr_canonicalize(NIMAG(num));
-    rsign = cmp_real_real(NIMAG(num), &zero);
-
-    switch (fun) {
-       case NDIVIDE_CEIL:
-           if ((rsign < 0 && dsign < 0) || (rsign > 0 && dsign > 0))
-               state = NDIVIDE_ADD;
-           break;
-       case NDIVIDE_FLOOR:
-           if ((rsign < 0 && dsign > 0) || (rsign > 0 && dsign < 0))
-               state = NDIVIDE_SUB;
-           break;
-       case NDIVIDE_ROUND:
-           if (!modp || (bigi->digs[0] & 1) == 1) {
-               n_real cmp;
-
-               set_real_object(&cmp, div);
-               div_real_real(&cmp, &two);
-               if (dsign > 0) {
-                   if (rsign > 0) {
-                       if (cmp_real_real(NIMAG(num), &cmp) >= 0)
-                           state = NDIVIDE_ADD;
-                   }
-                   else {
-                       neg_real(&cmp);
-                       if (cmp_real_real(NIMAG(num), &cmp) <= 0)
-                           state = NDIVIDE_SUB;
-                   }
-               }
-               else {
-                   if (rsign > 0) {
-                       neg_real(&cmp);
-                       if (cmp_real_real(NIMAG(num), &cmp) >= 0)
-                           state = NDIVIDE_SUB;
-                   }
-                   else {
-                       if (cmp_real_real(NIMAG(num), &cmp) <= 0)
-                           state = NDIVIDE_ADD;
-                   }
-               }
-               clear_real(&cmp);
-           }
-           break;
-    }
-
-    if (state == NDIVIDE_ADD) {
-       add_real_real(NREAL(num), &one);
-       sub_real_object(NIMAG(num), div);
-    }
-    else if (state == NDIVIDE_SUB) {
-       sub_real_real(NREAL(num), &one);
-       add_real_object(NIMAG(num), div);
-    }
-
-    if (NRTYPE(num) == N_BIGNUM) {
-       if (flo) {
-           double dval = bi_getd(bigi);
-
-           mpi_clear(bigi);
-           XFREE(bigi);
-           NRTYPE(num) = N_FLONUM;
-           NRFF(num) = dval;
-       }
-       else
-           rbi_canonicalize(NREAL(num));
-    }
-    else if (flo) {
-       NRTYPE(num) = N_FLONUM;
-       NRFF(num) = (double)NRFI(num);
-    }
-}
-
-
-/************************************************************************
- * REAL COMPLEX
- ************************************************************************/
-static void
-nadd_re_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra+Rb Ib
- */
-    /* Ra+Rb */
-    add_real_object(NREAL(num), OCXR(comp));
-
-    /* Ib */
-    set_real_object(NIMAG(num), OCXI(comp));
-
-    num->complex = 1;
-
-    ncx_canonicalize(num);
-}
-
-static void
-nsub_re_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra-Rb -Ib
- */
-    /* Ra-Rb */
-    sub_real_object(NREAL(num), OCXR(comp));
-
-    /* -Ib */
-    NITYPE(num) = N_FIXNUM;
-    NIFI(num) = -1;
-    mul_real_object(NIMAG(num), OCXI(comp));
-
-    num->complex = 1;
-
-    ncx_canonicalize(num);
-}
-
-static void
-nmul_re_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra*Rb Ra*Ib
- */
-    /* copy before change */
-    set_real_real(NIMAG(num), NREAL(num));
-
-    /* Ra*Rb */
-    mul_real_object(NREAL(num), OCXR(comp));
-
-    /* Ra*Ib */
-    mul_real_object(NIMAG(num), OCXI(comp));
-
-    num->complex = 1;
-
-    ncx_canonicalize(num);
-}
-
-static void
-ndiv_re_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra*Rb        -Ib*Ra
-       -----------  -----------
-       Rb*Rb+Ib*Ib  Rb*Rb+Ib*Ib
- */
-    n_real div, temp;
-
-    /* Rb*Rb */
-    set_real_object(&div, OCXR(comp));
-    mul_real_object(&div, OCXR(comp));
-
-    /* Ib*Ib */
-    set_real_object(&temp, OCXI(comp));
-    mul_real_object(&temp, OCXI(comp));
-
-    /* Rb*Rb+Ib*Ib */
-    add_real_real(&div, &temp);
-    clear_real(&temp);
-
-    /* -Ib*Ra */
-    NITYPE(num) = N_FIXNUM;
-    NIFI(num) = -1;
-    mul_real_object(NIMAG(num), OCXI(comp));
-    mul_real_real(NIMAG(num), NREAL(num));
-
-    /* Ra*Rb */
-    mul_real_object(NREAL(num), OCXR(comp));
-
-    div_real_real(NREAL(num), &div);
-    div_real_real(NIMAG(num), &div);
-    clear_real(&div);
-
-    num->complex = 1;
-
-    ncx_canonicalize(num);
-}
-
-
-/************************************************************************
- * COMPLEX REAL
- ************************************************************************/
-static void
-nadd_cx_re(n_number *num, LispObj *re)
-{
-/*
-       Ra+Rb Ia
- */
-    add_real_object(NREAL(num), re);
-
-    ncx_canonicalize(num);
-}
-
-static void
-nsub_cx_re(n_number *num, LispObj *re)
-{
-/*
-       Ra-Rb Ia
- */
-    sub_real_object(NREAL(num), re);
-
-    ncx_canonicalize(num);
-}
-
-static void
-nmul_cx_re(n_number *num, LispObj *re)
-{
-/*
-       Ra*Rb Ia*Rb
- */
-    mul_real_object(NREAL(num), re);
-    mul_real_object(NIMAG(num), re);
-
-    ncx_canonicalize(num);
-}
-
-static void
-ndiv_cx_re(n_number *num, LispObj *re)
-{
-/*
-       Ra/Rb Ia/Rb
- */
-    div_real_object(NREAL(num), re);
-    div_real_object(NIMAG(num), re);
-
-    ncx_canonicalize(num);
-}
-
-
-/************************************************************************
- * COMPLEX COMPLEX
- ************************************************************************/
-static void
-nadd_cx_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra+Rb Ia+Ib
- */
-    add_real_object(NREAL(num), OCXR(comp));
-    add_real_object(NIMAG(num), OCXI(comp));
-
-    ncx_canonicalize(num);
-}
-
-static void
-nsub_cx_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra-Rb Ia-Ib
- */
-    sub_real_object(NREAL(num), OCXR(comp));
-    sub_real_object(NIMAG(num), OCXI(comp));
-
-    ncx_canonicalize(num);
-}
-
-static void
-nmul_cx_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra*Rb-Ia*Ib Ra*Ib+Ia*Rb
- */
-    n_real IaIb, RaIb;
-
-    set_real_real(&IaIb, NIMAG(num));
-    mul_real_object(&IaIb, OCXI(comp));
-
-    set_real_real(&RaIb, NREAL(num));
-    mul_real_object(&RaIb, OCXI(comp));
-
-    /* Ra*Rb-Ia*Ib */
-    mul_real_object(NREAL(num), OCXR(comp));
-    sub_real_real(NREAL(num), &IaIb);
-    clear_real(&IaIb);
-
-    /* Ra*Ib+Ia*Rb */
-    mul_real_object(NIMAG(num), OCXR(comp));
-    add_real_real(NIMAG(num), &RaIb);
-    clear_real(&RaIb);
-
-    ncx_canonicalize(num);
-}
-
-static void
-ndiv_cx_cx(n_number *num, LispObj *comp)
-{
-/*
-       Ra*Rb+Ia*Ib  Ia*Rb-Ib*Ra
-       -----------  -----------
-       Rb*Rb+Ib*Ib  Rb*Rb+Ib*Ib
- */
-    n_real temp1, temp2;
-
-    /* IaIb */
-    set_real_real(&temp1, NIMAG(num));
-    mul_real_object(&temp1, OCXI(comp));
-
-    /* IbRa */
-    set_real_real(&temp2, NREAL(num));
-    mul_real_object(&temp2, OCXI(comp));
-
-    /* Ra*Rb+Ia*Ib */
-    mul_real_object(NREAL(num), OCXR(comp));
-    add_real_real(NREAL(num), &temp1);
-    clear_real(&temp1);
-
-    /* Ia*Rb-Ib*Ra */
-    mul_real_object(NIMAG(num), OCXR(comp));
-    sub_real_real(NIMAG(num), &temp2);
-    clear_real(&temp2);
-
-
-    /* Rb*Rb */
-    set_real_object(&temp1, OCXR(comp));
-    mul_real_object(&temp1, OCXR(comp));
-
-    /* Ib*Ib */
-    set_real_object(&temp2, OCXI(comp));
-    mul_real_object(&temp2, OCXI(comp));
-
-    /* Rb*Rb+Ib*Ib */
-    add_real_real(&temp1, &temp2);
-    clear_real(&temp2);
-
-    div_real_real(NREAL(num), &temp1);
-    div_real_real(NIMAG(num), &temp1);
-    clear_real(&temp1);
-
-    ncx_canonicalize(num);
-}
-
-static int
-cmp_cx_cx(LispObj *op1, LispObj *op2)
-{
-    int cmp;
-
-    cmp = cmp_object_object(OCXR(op1), OCXR(op2), 1);
-    if (cmp == 0)
-       cmp = cmp_object_object(OCXI(op1), OCXI(op2), 1);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * FLONUM FLONUM
- ************************************************************************/
-static void
-radd_flonum(n_real *real, double op1, double op2)
-{
-    double value = op1 + op2;
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-       case N_FIXRATIO:
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGNUM:
-           RCLEAR_BI(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGRATIO:
-           RCLEAR_BR(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-    }
-    RFF(real) = value;
-}
-
-static void
-rsub_flonum(n_real *real, double op1, double op2)
-{
-    double value = op1 - op2;
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-       case N_FIXRATIO:
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGNUM:
-           RCLEAR_BI(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGRATIO:
-           RCLEAR_BR(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-    }
-    RFF(real) = value;
-}
-
-static void
-rmul_flonum(n_real *real, double op1, double op2)
-{
-    double value = op1 * op2;
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-       case N_FIXRATIO:
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGNUM:
-           RCLEAR_BI(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGRATIO:
-           RCLEAR_BR(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-    }
-    RFF(real) = value;
-}
-
-static void
-rdiv_flonum(n_real *real, double op1, double op2)
-{
-    double value;
-
-    if (op2 == 0.0)
-       fatal_error(DIVIDE_BY_ZERO);
-    value = op1 / op2;
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-    switch (RTYPE(real)) {
-       case N_FIXNUM:
-       case N_FIXRATIO:
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGNUM:
-           RCLEAR_BI(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-       case N_BIGRATIO:
-           RCLEAR_BR(real);
-           RTYPE(real) = N_FLONUM;
-           break;
-    }
-    RFF(real) = value;
-}
-
-static int
-cmp_flonum(double op1, double op2)
-{
-    double value = op1 - op2;
-
-    if (!finite(value))
-       fatal_error(FLOATING_POINT_OVERFLOW);
-
-    return (value > 0.0 ? 1 : value < 0.0 ? -1 : 0);
-}
-
-
-/************************************************************************
- * FIXNUM FIXNUM
- ************************************************************************/
-static void
-rop_fi_fi_bi(n_real *real, long fi, int op)
-{
-    mpi *bigi = XALLOC(mpi);
-
-    mpi_init(bigi);
-    mpi_seti(bigi, RFI(real));
-    if (op == NOP_ADD)
-       mpi_addi(bigi, bigi, fi);
-    else if (op == NOP_SUB)
-       mpi_subi(bigi, bigi, fi);
-    else
-       mpi_muli(bigi, bigi, fi);
-    RBI(real) = bigi;
-    RTYPE(real) = N_BIGNUM;
-}
-
-static INLINE void
-radd_fi_fi(n_real *real, long fi)
-{
-    if (!fi_fi_add_overflow(RFI(real), fi))
-       RFI(real) += fi;
-    else
-       rop_fi_fi_bi(real, fi, NOP_ADD);
-}
-
-static INLINE void
-rsub_fi_fi(n_real *real, long fi)
-{
-    if (!fi_fi_sub_overflow(RFI(real), fi))
-       RFI(real) -= fi;
-    else
-       rop_fi_fi_bi(real, fi, NOP_SUB);
-}
-
-static INLINE void
-rmul_fi_fi(n_real *real, long fi)
-{
-    if (!fi_fi_mul_overflow(RFI(real), fi))
-       RFI(real) *= fi;
-    else
-       rop_fi_fi_bi(real, fi, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fi_fi(n_real *real, long fi)
-{
-    RTYPE(real) = N_FIXRATIO;
-    RFRN(real) = RFI(real);
-    RFRD(real) = fi;
-    rfr_canonicalize(real);
-}
-
-static INLINE int
-cmp_fi_fi(long op1, long op2)
-{
-    if (op1 > op2)
-       return (1);
-    else if (op1 < op2)
-       return (-1);
-
-    return (0);
-}
-
-
-/************************************************************************
- * FIXNUM BIGNUM
- ************************************************************************/
-static void
-rop_fi_bi_xi(n_real *real, mpi *bi, int nop)
-{
-    mpi *bigi = XALLOC(mpi);
-
-    mpi_init(bigi);
-    mpi_seti(bigi, RFI(real));
-    if (nop == NOP_ADD)
-       mpi_add(bigi, bigi, bi);
-    else if (nop == NOP_SUB)
-       mpi_sub(bigi, bigi, bi);
-    else
-       mpi_mul(bigi, bigi, bi);
-
-    if (mpi_fiti(bigi)) {
-       RFI(real) = mpi_geti(bigi);
-       mpi_clear(bigi);
-       XFREE(bigi);
-    }
-    else {
-       RBI(real) = bigi;
-       RTYPE(real) = N_BIGNUM;
-    }
-}
-
-static INLINE void
-radd_fi_bi(n_real *real, mpi *bi)
-{
-    rop_fi_bi_xi(real, bi, NOP_ADD);
-}
-
-static INLINE void
-rsub_fi_bi(n_real *real, mpi *bi)
-{
-    rop_fi_bi_xi(real, bi, NOP_SUB);
-}
-
-static INLINE void
-rmul_fi_bi(n_real *real, mpi *bi)
-{
-    rop_fi_bi_xi(real, bi, NOP_MUL);
-}
-
-static void
-rdiv_fi_bi(n_real *real, mpi *bi)
-{
-    mpr *bigr;
-
-    if (mpi_cmpi(bi, 0) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    bigr = XALLOC(mpr);
-    mpr_init(bigr);
-    mpi_seti(mpr_num(bigr), RFI(real));
-    mpi_set(mpr_den(bigr), bi);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real);
-}
-
-static INLINE int
-cmp_fi_bi(long fixnum, mpi *bignum)
-{
-    return (-mpi_cmpi(bignum, fixnum));
-}
-
-
-/************************************************************************
- * FIXNUM FIXRATIO
- ************************************************************************/
-static void
-rop_fi_fr_as_xr(n_real *real, long num, long den, int nop)
-{
-    int fit;
-    long value = 0, op = RFI(real);
-
-    fit = !fi_fi_mul_overflow(op, den);
-    if (fit) {
-       value = op * den;
-       if (nop == NOP_ADD)
-           fit = !fi_fi_add_overflow(value, num);
-       else
-           fit = !fi_fi_sub_overflow(value, num);
-    }
-    if (fit) {
-       if (nop == NOP_ADD)
-           RFRN(real) = value + num;
-       else
-           RFRN(real) = value - num;
-       RFRD(real) = den;
-       RTYPE(real) = N_FIXRATIO;
-       rfr_canonicalize(real);
-    }
-    else {
-       mpi iop;
-       mpr *bigr = XALLOC(mpr);
-
-       mpi_init(&iop);
-       mpi_seti(&iop, op);
-       mpi_muli(&iop, &iop, den);
-
-       mpr_init(bigr);
-       mpr_seti(bigr, num, den);
-       if (nop == NOP_ADD)
-           mpi_add(mpr_num(bigr), &iop, mpr_num(bigr));
-       else
-           mpi_sub(mpr_num(bigr), &iop, mpr_num(bigr));
-       mpi_clear(&iop);
-       RBR(real) = bigr;
-       RTYPE(real) = N_BIGRATIO;
-       rbr_canonicalize(real);
-    }
-}
-
-static void
-rop_fi_fr_md_xr(n_real *real, long num, long den, int nop)
-{
-    int fit;
-    long op = RFI(real);
-
-    if (nop == NOP_MUL)
-       fit = !fi_fi_mul_overflow(op, num);
-    else
-       fit = !fi_fi_mul_overflow(op, den);
-    if (fit) {
-       if (nop == NOP_MUL) {
-           RFRN(real) = op * num;
-           RFRD(real) = den;
-       }
-       else {
-           RFRN(real) = op * den;
-           RFRD(real) = num;
-       }
-       RTYPE(real) = N_FIXRATIO;
-       rfr_canonicalize(real);
-    }
-    else {
-       mpi iop;
-       mpr *bigr = XALLOC(mpr);
-
-       mpi_init(&iop);
-       mpi_seti(&iop, op);
-
-       mpr_init(bigr);
-       if (nop == NOP_MUL)
-           mpr_seti(bigr, num, den);
-       else
-           mpr_seti(bigr, den, num);
-       mpi_mul(mpr_num(bigr), mpr_num(bigr), &iop);
-       mpi_clear(&iop);
-       RBR(real) = bigr;
-       RTYPE(real) = N_BIGRATIO;
-       rbr_canonicalize(real);
-    }
-}
-
-static INLINE void
-radd_fi_fr(n_real *real, long num, long den)
-{
-    rop_fi_fr_as_xr(real, num, den, NOP_ADD);
-}
-
-static INLINE void
-rsub_fi_fr(n_real *real, long num, long den)
-{
-    rop_fi_fr_as_xr(real, num, den, NOP_SUB);
-}
-
-static INLINE void
-rmul_fi_fr(n_real *real, long num, long den)
-{
-    rop_fi_fr_md_xr(real, num, den, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fi_fr(n_real *real, long num, long den)
-{
-    rop_fi_fr_md_xr(real, num, den, NOP_DIV);
-}
-
-static INLINE int
-cmp_fi_fr(long fi, long num, long den)
-{
-    return (cmp_flonum((double)fi, (double)num / (double)den));
-}
-
-
-/************************************************************************
- * FIXNUM BIGRATIO
- ************************************************************************/
-static void
-rop_fi_br_as_xr(n_real *real, mpr *ratio, int nop)
-{
-    mpi iop;
-    mpr *bigr = XALLOC(mpr);
-
-    mpi_init(&iop);
-    mpi_seti(&iop, RFI(real));
-
-    mpr_init(bigr);
-    mpr_set(bigr, ratio);
-
-    mpi_mul(&iop, &iop, mpr_den(ratio));
-    if (nop == NOP_ADD)
-       mpi_add(mpr_num(bigr), &iop, mpr_num(bigr));
-    else
-       mpi_sub(mpr_num(bigr), &iop, mpr_num(bigr));
-
-    mpi_clear(&iop);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real); 
-}
-
-static void
-rop_fi_br_md_xr(n_real *real, mpr *ratio, int nop)
-{
-    mpi iop;
-    mpr *bigr = XALLOC(mpr);
-
-    mpi_init(&iop);
-    mpi_seti(&iop, RFI(real));
-
-    mpr_init(bigr);
-    if (nop == NOP_MUL)
-       mpr_set(bigr, ratio);
-    else
-       mpr_inv(bigr, ratio);
-
-    mpi_mul(mpr_num(bigr), &iop, mpr_num(bigr));
-
-    mpi_clear(&iop);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real);
-}
-
-static INLINE void
-radd_fi_br(n_real *real, mpr *ratio)
-{
-    rop_fi_br_as_xr(real, ratio, NOP_ADD);
-}
-
-static INLINE void
-rsub_fi_br(n_real *real, mpr *ratio)
-{
-    rop_fi_br_as_xr(real, ratio, NOP_SUB);
-}
-
-static INLINE void
-rmul_fi_br(n_real *real, mpr *ratio)
-{
-    rop_fi_br_md_xr(real, ratio, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fi_br(n_real *real, mpr *ratio)
-{
-    rop_fi_br_md_xr(real, ratio, NOP_DIV);
-}
-
-static INLINE int
-cmp_fi_br(long op1, mpr *op2)
-{
-    return (-mpr_cmpi(op2, op1));
-}
-
-
-/************************************************************************
- * BIGNUM FIXNUM
- ************************************************************************/
-static INLINE void
-radd_bi_fi(n_real *real, long fi)
-{
-    mpi_addi(RBI(real), RBI(real), fi);
-    rbi_canonicalize(real);
-}
-
-static INLINE void
-rsub_bi_fi(n_real *real, long fi)
-{
-    mpi_subi(RBI(real), RBI(real), fi);
-    rbi_canonicalize(real);
-}
-
-static INLINE void
-rmul_bi_fi(n_real *real, long fi)
-{
-    mpi_muli(RBI(real), RBI(real), fi);
-    rbi_canonicalize(real);
-}
-
-static void
-rdiv_bi_fi(n_real *real, long fi)
-{
-    mpr *bigr;
-
-    if (RFI(real) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    bigr = XALLOC(mpr);
-    mpr_init(bigr);
-    mpi_set(mpr_num(bigr), RBI(real));
-    mpi_seti(mpr_den(bigr), fi);
-    RCLEAR_BI(real);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real);
-}
-
-static INLINE int
-cmp_bi_fi(mpi *bignum, long fi)
-{
-    return (mpi_cmpi(bignum, fi));
-}
-
-
-/************************************************************************
- * BIGNUM BIGNUM
- ************************************************************************/
-static INLINE void
-radd_bi_bi(n_real *real, mpi *bignum)
-{
-    mpi_add(RBI(real), RBI(real), bignum);
-    rbi_canonicalize(real);
-}
-
-static INLINE void
-rsub_bi_bi(n_real *real, mpi *bignum)
-{
-    mpi_sub(RBI(real), RBI(real), bignum);
-    rbi_canonicalize(real);
-}
-
-static INLINE void
-rmul_bi_bi(n_real *real, mpi *bignum)
-{
-    mpi_mul(RBI(real), RBI(real), bignum);
-    rbi_canonicalize(real);
-}
-
-static void
-rdiv_bi_bi(n_real *real, mpi *bignum)
-{
-    mpr *bigr;
-
-    if (mpi_cmpi(bignum, 0) == 0)
-       fatal_error(DIVIDE_BY_ZERO);
-
-    bigr = XALLOC(mpr);
-    mpr_init(bigr);
-    mpi_set(mpr_num(bigr), RBI(real));
-    mpi_set(mpr_den(bigr), bignum);
-    RCLEAR_BI(real);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real); 
-}
-
-static INLINE int
-cmp_bi_bi(mpi *op1, mpi *op2)
-{
-    return (mpi_cmp(op1, op2));
-}
-
-
-/************************************************************************
- * BIGNUM FIXRATIO
- ************************************************************************/
-static void
-rop_bi_fr_as_xr(n_real *real, long num, long den, int nop)
-{
-    mpi iop;
-    mpr *bigr = XALLOC(mpr);
-
-    mpi_init(&iop);
-    mpi_set(&iop, RBI(real));
-    mpi_muli(&iop, &iop, den);
-
-    mpr_init(bigr);
-    mpr_seti(bigr, num, den);
-
-    if (nop == NOP_ADD)
-       mpi_add(mpr_num(bigr), &iop, mpr_num(bigr));
-    else
-       mpi_sub(mpr_num(bigr), &iop, mpr_num(bigr));
-    mpi_clear(&iop);
-
-    RCLEAR_BI(real);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real);
-}
-
-static INLINE void
-rop_bi_fr_md_xr(n_real *real, long num, long den, int nop)
-{
-    mpr *bigr = XALLOC(mpr);
-
-    mpr_init(bigr);
-
-    mpr_seti(bigr, num, den);
-
-    if (nop == NOP_MUL)
-       mpi_mul(mpr_num(bigr), RBI(real), mpr_num(bigr));
-    else {
-       mpi_mul(mpr_den(bigr), RBI(real), mpr_den(bigr));
-       mpr_inv(bigr, bigr);
-    }
-
-    RCLEAR_BI(real);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real);
-}
-
-static INLINE void
-radd_bi_fr(n_real *real, long num, long den)
-{
-    rop_bi_fr_as_xr(real, num, den, NOP_ADD);
-}
-
-static INLINE void
-rsub_bi_fr(n_real *real, long num, long den)
-{
-    rop_bi_fr_as_xr(real, num, den, NOP_SUB);
-}
-
-static INLINE void
-rmul_bi_fr(n_real *real, long num, long den)
-{
-    rop_bi_fr_md_xr(real, num, den, NOP_MUL);
-}
-
-static INLINE void
-rdiv_bi_fr(n_real *real, long num, long den)
-{
-    rop_bi_fr_md_xr(real, num, den, NOP_DIV);
-}
-
-static int
-cmp_bi_fr(mpi *bignum, long num, long den)
-{
-    int cmp;
-    mpr cmp1, cmp2;
-
-    mpr_init(&cmp1);
-    mpi_set(mpr_num(&cmp1), bignum);
-    mpi_seti(mpr_den(&cmp1), 1);
-
-    mpr_init(&cmp2);
-    mpr_seti(&cmp2, num, den);
-
-    cmp = mpr_cmp(&cmp1, &cmp2);
-    mpr_clear(&cmp1);
-    mpr_clear(&cmp2);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * BIGNUM BIGRATIO
- ************************************************************************/
-static void
-rop_bi_br_as_xr(n_real *real, mpr *bigratio, int nop)
-{
-    mpi iop;
-    mpr *bigr = XALLOC(mpr);
-
-    mpi_init(&iop);
-    mpi_set(&iop, RBI(real));
-    mpr_init(bigr);
-    mpr_set(bigr, bigratio);
-
-    mpi_mul(&iop, &iop, mpr_den(bigratio));
-
-    if (nop == NOP_ADD)
-       mpi_add(mpr_num(bigr), &iop, mpr_num(bigr));
-    else
-       mpi_sub(mpr_num(bigr), &iop, mpr_num(bigr));
-    mpi_clear(&iop);
-
-    RCLEAR_BI(real);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real);
-}
-
-static void
-rop_bi_br_md_xr(n_real *real, mpr *bigratio, int nop)
-{
-    mpr *bigr = XALLOC(mpr);
-
-    mpr_init(bigr);
-    if (nop == NOP_MUL)
-       mpr_set(bigr, bigratio);
-    else
-       mpr_inv(bigr, bigratio);
-
-    mpi_mul(mpr_num(bigr), RBI(real), mpr_num(bigr));
-
-    RCLEAR_BI(real);
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-radd_bi_br(n_real *real, mpr *bigratio)
-{
-    rop_bi_br_as_xr(real, bigratio, NOP_ADD);
-}
-
-static INLINE void
-rsub_bi_br(n_real *real, mpr *bigratio)
-{
-    rop_bi_br_as_xr(real, bigratio, NOP_SUB);
-}
-
-static INLINE void
-rmul_bi_br(n_real *real, mpr *bigratio)
-{
-    rop_bi_br_md_xr(real, bigratio, NOP_MUL);
-}
-
-static INLINE void
-rdiv_bi_br(n_real *real, mpr *bigratio)
-{
-    rop_bi_br_md_xr(real, bigratio, NOP_DIV);
-}
-
-static int
-cmp_bi_br(mpi *bignum, mpr *bigratio)
-{
-    int cmp;
-    mpr cmp1;
-
-    mpr_init(&cmp1);
-    mpi_set(mpr_num(&cmp1), bignum);
-    mpi_seti(mpr_den(&cmp1), 1);
-
-    cmp = mpr_cmp(&cmp1, bigratio);
-    mpr_clear(&cmp1);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * FIXRATIO FIXNUM
- ************************************************************************/
-static void
-rop_fr_fi_as_xr(n_real *real, long op, int nop)
-{
-    int fit;
-    long value = 0, num = RFRN(real), den = RFRD(real);
-
-    fit = !fi_fi_mul_overflow(op, den);
-
-    if (fit) {
-       value = op * den;
-       if (nop == NOP_ADD)
-           fit = !fi_fi_add_overflow(value, num);
-       else
-           fit = !fi_fi_sub_overflow(value, num);
-    }
-    if (fit) {
-       if (nop == NOP_ADD)
-           RFRN(real) = num + value;
-       else
-           RFRN(real) = num - value;
-       rfr_canonicalize(real);
-    }
-    else {
-       mpi iop;
-       mpr *bigr = XALLOC(mpr);
-
-       mpr_init(bigr);
-       mpr_seti(bigr, num, den);
-       mpi_init(&iop);
-       mpi_seti(&iop, op);
-       mpi_muli(&iop, &iop, den);
-       if (nop == NOP_ADD)
-           mpi_add(mpr_num(bigr), mpr_num(bigr), &iop);
-       else
-           mpi_sub(mpr_num(bigr), mpr_num(bigr), &iop);
-       mpi_clear(&iop);
-       RBR(real) = bigr;
-       RTYPE(real) = N_BIGRATIO;
-       rbr_canonicalize(real);
-    }
-}
-
-static void
-rop_fr_fi_md_xr(n_real *real, long op, int nop)
-{
-    long num = RFRN(real), den = RFRD(real);
-
-    if (nop == NOP_MUL) {
-       if (!fi_fi_mul_overflow(op, num)) {
-           RFRN(real) = op * num;
-           rfr_canonicalize(real);
-           return;
-       }
-    }
-    else if (!fi_fi_mul_overflow(op, den)) {
-       RFRD(real) = op * den;
-       rfr_canonicalize(real);
-       return;
-    }
-
-    {
-       mpr *bigr = XALLOC(mpr);
-
-       mpr_init(bigr);
-       mpr_seti(bigr, num, den);
-       if (nop == NOP_MUL)
-           mpr_muli(bigr, bigr, op);
-       else
-           mpr_divi(bigr, bigr, op);
-       RBR(real) = bigr;
-       RTYPE(real) = N_BIGRATIO;
-       rbr_canonicalize(real);
-    }
-}
-
-static INLINE void
-radd_fr_fi(n_real *real, long op)
-{
-    rop_fr_fi_as_xr(real, op, NOP_ADD);
-}
-
-static INLINE void
-rsub_fr_fi(n_real *real, long op)
-{
-    rop_fr_fi_as_xr(real, op, NOP_SUB);
-}
-
-static INLINE void
-rmul_fr_fi(n_real *real, long op)
-{
-    rop_fr_fi_md_xr(real, op, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fr_fi(n_real *real, long op)
-{
-    rop_fr_fi_md_xr(real, op, NOP_DIV);
-}
-
-static INLINE int
-cmp_fr_fi(long num, long den, long fixnum)
-{
-    return (cmp_flonum((double)num / (double)den, (double)fixnum));
-}
-
-
-/************************************************************************
- * FIXRATIO BIGNUM
- ************************************************************************/
-static void
-rop_fr_bi_as_xr(n_real *real, mpi *bignum, int nop)
-{
-    mpi iop;
-    mpr *bigr = XALLOC(mpr);
-
-    mpr_init(bigr);
-    mpr_seti(bigr, RFRN(real), RFRD(real));
-
-    mpi_init(&iop);
-    mpi_set(&iop, bignum);
-    mpi_muli(&iop, &iop, RFRD(real));
-
-    if (nop == NOP_ADD)
-       mpi_add(mpr_num(bigr), mpr_num(bigr), &iop);
-    else
-       mpi_sub(mpr_num(bigr), mpr_num(bigr), &iop);
-    mpi_clear(&iop);
-
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real); 
-}
-
-static void
-rop_fr_bi_md_xr(n_real *real, mpi *bignum, int nop)
-{
-    mpr *bigr = XALLOC(mpr);
-
-    mpr_init(bigr);
-    mpr_seti(bigr, RFRN(real), RFRD(real));
-
-    if (nop == NOP_MUL)
-       mpi_mul(mpr_num(bigr), mpr_num(bigr), bignum);
-    else
-       mpi_mul(mpr_den(bigr), mpr_den(bigr), bignum);
-
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-radd_fr_bi(n_real *real, mpi *bignum)
-{
-    rop_fr_bi_as_xr(real, bignum, NOP_ADD);
-}
-
-static INLINE void
-rsub_fr_bi(n_real *real, mpi *bignum)
-{
-    rop_fr_bi_as_xr(real, bignum, NOP_SUB);
-}
-
-static INLINE void
-rmul_fr_bi(n_real *real, mpi *bignum)
-{
-    rop_fr_bi_md_xr(real, bignum, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fr_bi(n_real *real, mpi *bignum)
-{
-    rop_fr_bi_md_xr(real, bignum, NOP_DIV);
-}
-
-static int
-cmp_fr_bi(long num, long den, mpi *bignum)
-{
-    int cmp;
-    mpr cmp1, cmp2;
-
-    mpr_init(&cmp1);
-    mpr_seti(&cmp1, num, den);
-
-    mpr_init(&cmp2);
-    mpi_set(mpr_num(&cmp2), bignum);
-    mpi_seti(mpr_den(&cmp2), 1);
-
-    cmp = mpr_cmp(&cmp1, &cmp2);
-    mpr_clear(&cmp1);
-    mpr_clear(&cmp2);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * FIXRATIO FIXRATIO
- ************************************************************************/
-static void
-rop_fr_fr_as_xr(n_real *real, long num2, long den2, int nop)
-{
-    int fit;
-    long num1 = RFRN(real), den1 = RFRD(real), num = 0, den = 0;
-
-    fit = !fi_fi_mul_overflow(num1, den2);
-    if (fit) {
-       num = num1 * den2;
-       fit = !fi_fi_mul_overflow(num2, den1);
-       if (fit) {
-           den = num2 * den1;
-           if (nop == NOP_ADD) {
-               if ((fit = !fi_fi_add_overflow(num, den)) != 0)
-                   num += den;
-           }
-           else if ((fit = !fi_fi_sub_overflow(num, den)) != 0)
-               num -= den;
-           if (fit) {
-               fit = !fi_fi_mul_overflow(den1, den2);
-               if (fit)
-                   den = den1 * den2;
-           }
-       }
-    }
-    if (fit) {
-       RFRN(real) = num;
-       RFRD(real) = den;
-       rfr_canonicalize(real);
-    }
-    else {
-       mpi iop;
-       mpr *bigr = XALLOC(mpr);
-
-       mpr_init(bigr);
-       mpr_seti(bigr, num1, den1);
-       mpi_muli(mpr_den(bigr), mpr_den(bigr), den2);
-       mpi_init(&iop);
-       mpi_seti(&iop, num2);
-       mpi_muli(&iop, &iop, den1);
-       mpi_muli(mpr_num(bigr), mpr_num(bigr), den2);
-       if (nop == NOP_ADD)
-           mpi_add(mpr_num(bigr), mpr_num(bigr), &iop);
-       else
-           mpi_sub(mpr_num(bigr), mpr_num(bigr), &iop);
-       mpi_clear(&iop);
-       RBR(real) = bigr;
-       RTYPE(real) = N_BIGRATIO;
-       rbr_canonicalize(real);
-    }
-}
-
-static void
-rop_fr_fr_md_xr(n_real *real, long num2, long den2, int nop)
-{
-    int fit;
-    long num1 = RFRN(real), den1 = RFRD(real), num = 0, den = 0;
-
-    if (nop == NOP_MUL) {
-       fit = !fi_fi_mul_overflow(num1, num2) && !fi_fi_mul_overflow(den1, den2);
-       if (fit) {
-           num = num1 * num2;
-           den = den1 * den2;
-       }
-    }
-    else {
-       fit = !fi_fi_mul_overflow(num1, den2) && !fi_fi_mul_overflow(den1, num2);
-       if (fit) {
-           num = num1 * den2;
-           den = den1 * num2;
-       }
-    }
-
-    if (fit) {
-       RFRN(real) = num;
-       RFRD(real) = den;
-       rfr_canonicalize(real);
-    }
-    else {
-       mpr *bigr = XALLOC(mpr);
-
-       mpr_init(bigr);
-
-       if (nop == NOP_MUL) {
-           mpr_seti(bigr, num1, den1);
-           mpi_muli(mpr_num(bigr), mpr_num(bigr), num2);
-           mpi_muli(mpr_den(bigr), mpr_den(bigr), den2);
-       }
-       else {
-           mpr_seti(bigr, num1, num2);
-           mpi_muli(mpr_num(bigr), mpr_num(bigr), den2);
-           mpi_muli(mpr_den(bigr), mpr_den(bigr), den1);
-       }
-
-       RBR(real) = bigr;
-       RTYPE(real) = N_BIGRATIO;
-       rbr_canonicalize(real);
-    }
-}
-
-static INLINE void
-radd_fr_fr(n_real *real, long num, long den)
-{
-    rop_fr_fr_as_xr(real, num, den, NOP_ADD);
-}
-
-static INLINE void
-rsub_fr_fr(n_real *real, long num, long den)
-{
-    rop_fr_fr_as_xr(real, num, den, NOP_SUB);
-}
-
-static INLINE void
-rmul_fr_fr(n_real *real, long num, long den)
-{
-    rop_fr_fr_md_xr(real, num, den, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fr_fr(n_real *real, long num, long den)
-{
-    rop_fr_fr_md_xr(real, num, den, NOP_DIV);
-}
-
-static INLINE int
-cmp_fr_fr(long num1, long den1, long num2, long den2)
-{
-    return (cmp_flonum((double)num1 / (double)den1,
-                      (double)num2 / (double)den2));
-}
-
-
-/************************************************************************
- * FIXRATIO BIGRATIO
- ************************************************************************/
-static void
-rop_fr_br_asmd_xr(n_real *real, mpr *bigratio, int nop)
-{
-    mpr *bigr = XALLOC(mpr);
-
-    mpr_init(bigr);
-    mpr_seti(bigr, RFRN(real), RFRD(real));
-
-    switch (nop) {
-       case NOP_ADD:
-           mpr_add(bigr, bigr, bigratio);
-           break;
-       case NOP_SUB:
-           mpr_sub(bigr, bigr, bigratio);
-           break;
-       case NOP_MUL:
-           mpr_mul(bigr, bigr, bigratio);
-           break;
-       default:
-           mpr_div(bigr, bigr, bigratio);
-           break;
-    }
-
-    RBR(real) = bigr;
-    RTYPE(real) = N_BIGRATIO;
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-radd_fr_br(n_real *real, mpr *bigratio)
-{
-    rop_fr_br_asmd_xr(real, bigratio, NOP_ADD);
-}
-
-static INLINE void
-rsub_fr_br(n_real *real, mpr *bigratio)
-{
-    rop_fr_br_asmd_xr(real, bigratio, NOP_SUB);
-}
-
-static INLINE void
-rmul_fr_br(n_real *real, mpr *bigratio)
-{
-    rop_fr_br_asmd_xr(real, bigratio, NOP_MUL);
-}
-
-static INLINE void
-rdiv_fr_br(n_real *real, mpr *bigratio)
-{
-    rop_fr_br_asmd_xr(real, bigratio, NOP_DIV);
-}
-
-static int
-cmp_fr_br(long num, long den, mpr *bigratio)
-{
-    int cmp;
-    mpr cmp1;
-
-    mpr_init(&cmp1);
-    mpr_seti(&cmp1, num, den);
-
-    cmp = mpr_cmp(&cmp1, bigratio);
-    mpr_clear(&cmp1);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * BIGRATIO FIXNUM
- ************************************************************************/
-static void
-rop_br_fi_asmd_xr(n_real *real, long fixnum, int nop)
-{
-    mpr *bigratio = RBR(real);
-
-    switch (nop) {
-       case NOP_ADD:
-           mpr_addi(bigratio, bigratio, fixnum);
-           break;
-       case NOP_SUB:
-           mpr_subi(bigratio, bigratio, fixnum);
-           break;
-       case NOP_MUL:
-           mpr_muli(bigratio, bigratio, fixnum);
-           break;
-       default:
-           if (fixnum == 0)
-               fatal_error(DIVIDE_BY_ZERO);
-           mpr_divi(bigratio, bigratio, fixnum);
-           break;
-    }
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-radd_br_fi(n_real *real, long fixnum)
-{
-    rop_br_fi_asmd_xr(real, fixnum, NOP_ADD);
-}
-
-static INLINE void
-rsub_br_fi(n_real *real, long fixnum)
-{
-    rop_br_fi_asmd_xr(real, fixnum, NOP_SUB);
-}
-
-static INLINE void
-rmul_br_fi(n_real *real, long fixnum)
-{
-    rop_br_fi_asmd_xr(real, fixnum, NOP_MUL);
-}
-
-static INLINE void
-rdiv_br_fi(n_real *real, long fixnum)
-{
-    rop_br_fi_asmd_xr(real, fixnum, NOP_DIV);
-}
-
-static int
-cmp_br_fi(mpr *bigratio, long fixnum)
-{
-    int cmp;
-    mpr cmp2;
-
-    mpr_init(&cmp2);
-    mpr_seti(&cmp2, fixnum, 1);
-    cmp = mpr_cmp(bigratio, &cmp2);
-    mpr_clear(&cmp2);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * BIGRATIO BIGNUM
- ************************************************************************/
-static void
-rop_br_bi_as_xr(n_real *real, mpi *bignum, int nop)
-{
-    mpi iop;
-
-    mpi_init(&iop);
-    mpi_set(&iop, bignum);
-
-    mpi_mul(&iop, &iop, RBRD(real));
-    if (nop == NOP_ADD)
-       mpi_add(RBRN(real), RBRN(real), &iop);
-    else
-       mpi_sub(RBRN(real), RBRN(real), &iop);
-    mpi_clear(&iop);
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-radd_br_bi(n_real *real, mpi *bignum)
-{
-    rop_br_bi_as_xr(real, bignum, NOP_ADD);
-}
-
-static INLINE void
-rsub_br_bi(n_real *real, mpi *bignum)
-{
-    rop_br_bi_as_xr(real, bignum, NOP_SUB);
-}
-
-static INLINE void
-rmul_br_bi(n_real *real, mpi *bignum)
-{
-    mpi_mul(RBRN(real), RBRN(real), bignum);
-    rbr_canonicalize(real);
-}
-
-static INLINE void
-rdiv_br_bi(n_real *real, mpi *bignum)
-{
-    mpi_mul(RBRD(real), RBRD(real), bignum);
-    rbr_canonicalize(real);
-}
-
-static int
-cmp_br_bi(mpr *bigratio, mpi *bignum)
-{
-    int cmp;
-    mpr cmp1;
-
-    mpr_init(&cmp1);
-    mpi_set(mpr_num(&cmp1), bignum);
-    mpi_seti(mpr_den(&cmp1), 1);
-
-    cmp = mpr_cmp(bigratio, &cmp1);
-    mpr_clear(&cmp1);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * BIGRATIO FIXRATIO
- ************************************************************************/
-static void
-rop_br_fr_asmd_xr(n_real *real, long num, long den, int nop)
-{
-    mpr *bigratio = RBR(real), rop;
-
-    mpr_init(&rop);
-    mpr_seti(&rop, num, den);
-    switch (nop) {
-       case NOP_ADD:
-           mpr_add(bigratio, bigratio, &rop);
-           break;
-       case NOP_SUB:
-           mpr_sub(bigratio, bigratio, &rop);
-           break;
-       case NOP_MUL:
-           mpr_mul(bigratio, bigratio, &rop);
-           break;
-       default:
-           mpr_div(bigratio, bigratio, &rop);
-           break;
-    }
-    mpr_clear(&rop);
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-radd_br_fr(n_real *real, long num, long den)
-{
-    rop_br_fr_asmd_xr(real, num, den, NOP_ADD);
-}
-
-static INLINE void
-rsub_br_fr(n_real *real, long num, long den)
-{
-    rop_br_fr_asmd_xr(real, num, den, NOP_SUB);
-}
-
-static INLINE void
-rmul_br_fr(n_real *real, long num, long den)
-{
-    rop_br_fr_asmd_xr(real, num, den, NOP_MUL);
-}
-
-static INLINE void
-rdiv_br_fr(n_real *real, long num, long den)
-{
-    rop_br_fr_asmd_xr(real, num, den, NOP_DIV);
-}
-
-static int
-cmp_br_fr(mpr *bigratio, long num, long den)
-{
-    int cmp;
-    mpr cmp2;
-
-    mpr_init(&cmp2);
-    mpr_seti(&cmp2, num, den);
-    cmp = mpr_cmp(bigratio, &cmp2);
-    mpr_clear(&cmp2);
-
-    return (cmp);
-}
-
-
-/************************************************************************
- * BIGRATIO BIGRATIO
- ************************************************************************/
-static INLINE void
-radd_br_br(n_real *real, mpr *bigratio)
-{
-    mpr_add(RBR(real), RBR(real), bigratio);
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-rsub_br_br(n_real *real, mpr *bigratio)
-{
-    mpr_sub(RBR(real), RBR(real), bigratio);
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-rmul_br_br(n_real *real, mpr *bigratio)
-{
-    mpr_mul(RBR(real), RBR(real), bigratio);
-    rbr_canonicalize(real); 
-}
-
-static INLINE void
-rdiv_br_br(n_real *real, mpr *bigratio)
-{
-    mpr_div(RBR(real), RBR(real), bigratio);
-    rbr_canonicalize(real); 
-}
-
-static INLINE int
-cmp_br_br(mpr *op1, mpr *op2)
-{
-    return (mpr_cmp(op1, op2));
-}
diff --git a/xedit/lisp/modules/indent.lsp b/xedit/lisp/modules/indent.lsp
deleted file mode 100644 (file)
index 1ba8b72..0000000
+++ /dev/null
@@ -1,1426 +0,0 @@
-;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/indent.lsp,v 1.6 2003/01/16 03:50:46 paulo Exp $
-;;
-
-(provide "indent")
-(require "xedit")
-(in-package "XEDIT")
-
-(defconstant indent-spaces '(#\Tab #\Space))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; The final indentation function.
-;; Parameters:
-;;     indent
-;;             Number of spaces to insert
-;;     offset
-;;             Offset to where indentation should be added
-;;     no-tabs
-;;             If set, tabs aren't inserted
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun indent-text (indent offset &optional no-tabs
-                   &aux start line length index current tabs spaces string
-                        barrier base result (point (point))
-                  )
-
-    ;; Initialize
-    (setq
-       start   (scan offset :eol :left)
-       line    (read-text start (- offset start))
-       length  (length line)
-       index   (1- length)
-       current 0
-       base    0
-    )
-
-    (and (minusp indent) (setq indent 0))
-
-    ;; Skip any spaces after offset, "paranoia check"
-    (while (member (char-after offset) indent-spaces)
-       (incf offset)
-    )
-
-    ;; Check if there are only spaces before `offset' and the line `start'
-    (while (and (>= index 0) (member (char line index) indent-spaces))
-       (decf index)
-    )
-
-    ;; `index' will be zero if there are only spaces in the `line'
-    (setq barrier (+ start (incf index)))
-
-    ;; Calculate `base' unmodifiable indentation, if any
-    (dotimes (i index)
-       (if (char= (char line i) #\Tab)
-           (incf base (- 8 (rem base 8)))
-           (incf base)
-       )
-    )
-
-    ;; If any non blank character would need to be deleted
-    (and (> base indent) (return-from indent-text nil))
-
-    ;; Calculate `current' indentation
-    (setq current base)
-    (while (< index length)
-       (if (char= (char line index) #\Tab)
-           (incf current (- 8 (rem current 8)))
-           (incf current)
-       )
-       (incf index)
-    )
-
-    ;; Maybe could also "optimize" the indentation even if it is already
-    ;; correct, removing spaces "inside" tabs.
-    (when (/= indent current)
-       (if no-tabs
-           (setq
-               length  (- indent base)
-               result  (+ barrier length)
-               string  (make-string length :initial-element #\Space)
-           )
-           (progn
-               (multiple-value-setq (tabs spaces) (floor (- indent base) 8))
-               (setq
-                   length      (+ tabs spaces)
-                   result      (+ barrier length)
-                   string      (make-string length :initial-element #\Tab)
-               )
-               (fill string #\Space :start tabs)
-           )
-       )
-
-       (replace-text barrier offset string)
-       (and (>= offset point) (>= point barrier) (goto-char result))
-    )
-)
-(compile 'indent-text)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Helper function, returns indentation of a given offset
-;; If `align' is set, stop once a non blank character is seen, that
-;; is, use `offset' only as a line identifier
-;; If `resolve' is set, it means that the offset is just a hint, it
-;; maybe anywhere in the line
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun offset-indentation (offset &key resolve align
-                          &aux
-                          char
-                          line
-                          (start (scan offset :eol :left))
-                          (indent 0))
-    (if resolve
-       (loop
-           (if (characterp (setq char (char-after start)))
-               (if (char= char #\Tab)
-                   (incf indent (- 8 (rem indent 8)))
-                   ;; Not a tab, check if is a space
-                   (if (char= char #\Space)
-                       (incf indent)
-                       ;; Not a tab neither a space
-                       (return indent)
-                   )
-               )
-               ;; EOF found
-               (return indent)
-           )
-           ;; Increment offset to check next character
-           (incf start)
-       )
-       (progn
-           (setq line (read-text start (- offset start)))
-           (dotimes (i (length line) indent)
-               (if (char= (setq char (char line i)) #\Tab)
-                   (incf indent (- 8 (rem indent 8)))
-                   (progn
-                       (or align (member char indent-spaces)
-                           (return indent)
-                       )
-                       (incf indent)
-                   )
-               )
-           )
-       )
-    )
-)
-(compile 'offset-indentation)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  A default/fallback indentation function, just copy indentation
-;; of previous line.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun default-indent (syntax syntable)
-    (let
-       (
-       (offset (scan (point) :eol :left))
-       start
-       left
-       right
-       )
-
-       syntable        ;; XXX hack to not generate warning about unused
-                       ;; variable, should be temporary (until unused
-                       ;; variables can be declared as such)
-
-       (if
-           (or
-               ;; if indentation is disabled
-               (and
-                   (hash-table-p (syntax-options syntax))
-                   (gethash :disable-indent (syntax-options syntax))
-               )
-               ;; or if not at the start of a new line
-               (> (scan offset :eol :right) offset)
-           )
-           (return-from default-indent)
-       )
-
-       (setq left offset)
-       (loop
-           (setq
-               start left
-               left (scan start :eol :left :count 2)
-               right (scan left :eol :right)
-           )
-           ;; if start of file reached
-           (and (>= left start) (return))
-           (when
-               (setq
-                   start
-                   (position-if-not
-                       #'(lambda (char) (member char indent-spaces))
-                       (read-text left (- right left))
-                   )
-               )
-
-               ;; indent the current line
-               (indent-text (offset-indentation (+ left start) :align t) offset)
-               (return)
-           )
-       )
-    )
-)
-(compile 'default-indent)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Helper function
-;;   Clear line before cursor if it is empty
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun indent-clear-empty-line (&aux left offset right line index)
-    (setq
-       offset  (scan (point) :eol :left)
-       left    (scan offset :eol :left :count 2)
-       right   (scan left :eol :right)
-    )
-
-    ;; If not at the first line in the file and line is not already empty
-    (when (and (/= offset left) (/= left right))
-       (setq
-           line        (read-text left (- right left))
-           index       (1- (length line))
-       )
-       (while (and (>= index 0) (member (char line index) indent-spaces))
-           (decf index)
-       )
-       ;; If line was only spaces
-       (and (minusp index) (replace-text left right ""))
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Macro to be called whenever an indentation rule decides that
-;; the parser is done.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indent-macro-terminate (&optional result)
-    `(return-from ind-terminate-block ,result)
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Like indent-terminate, but "rejects" the input for the current line
-;; and terminates the loop.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indent-macro-reject (&optional result)
-   `(progn
-       (setq ind-state ind-prev-state)
-       (return-from ind-terminate-block ,result)
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Like indent-reject, but "rejects" anything before the current token
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indent-macro-reject-left (&optional result)
-   `(progn
-       (setq ind-state ind-matches)
-       (return-from ind-terminate-block ,result)
-    )
-)
-
-
-(defstruct indtoken
-    regex                      ;; a string, character or regex
-    token                      ;; the resulting token, nil or a keyword
-    begin                      ;; begin a new table
-    switch                     ;; switch to another table
-    ;; begin and switch fields are used like the ones for the syntax highlight
-    ;; syntoken structure.
-    label                      ;; filed at compile time
-    code                       ;; code to execute when it matches
-)
-
-(defstruct indtable
-    label                      ;; a keyword, name of the table
-    tokens                     ;; list of indtoken structures
-    tables                     ;; list of indtable structures
-    augments                   ;; augment list
-)
-
-(defstruct indaugment
-    labels                     ;; list of keywords labeling tables
-)
-
-(defstruct indinit
-    variables                  ;; list of variables and optional initialization
-    ;; Format of variables must be suitable to LET*, example of call:
-    ;; (indinit
-    ;;     var1                ;; initialized to NIL
-    ;;     (var2 (afun))       ;; initialized to the value returned by AFUN
-    ;; )
-)
-
-(defstruct indreduce
-    token                      ;; reduced token
-    rules                      ;; list of rules
-    label                      ;; unique label associated with rule, this
-                               ;; field is automatically filled in the
-                               ;; compilation process. this field exists
-                               ;; to allow several indreduce definitions
-                               ;; that result in the same token
-    check                      ;; FORM evaluated, if T apply reduce rule
-    code                       ;; PROGN to be called when a rule matches
-)
-
-;; NOTE, unlike "reduce" rules, "resolve" rules cannot be duplicated
-(defstruct indresolve
-    match                      ;; the matched token (or a list of tokens)
-    code                       ;; PROGN to apply for this token
-)
-
-(defstruct indent
-    reduces                    ;; list of indreduce structures
-    tables                     ;; list of indtable structures
-    inits                      ;; initialization list
-    resolves                   ;; list of indresolve structures
-    token-code                 ;; code to execute when a token matches
-    check-code                 ;; code to execute before applying a reduce rule
-    reduce-code                        ;; code to execute after reduce rule
-    resolve-code               ;; code to execute when matching a token
-)
-
-(defmacro defindent (variable label &rest lists)
-   `(if (boundp ',variable)
-       ,variable
-       (progn
-           (proclaim '(special ,variable))
-           (setq ,variable (compile-indent-table ,label ,@lists))
-       )
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Create an indent token.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indtoken (pattern token
-                   &key icase nospec begin switch code (nosub t))
-    (setq pattern (re-comp (eval pattern) :icase icase :nospec nospec :nosub nosub))
-    (when (consp (re-exec pattern "" :notbol t :noteol t))
-       (error "INDTOKEN: regex ~A matches empty string" pattern)
-    )
-
-    ;; result of macro, return token structure
-    (make-indtoken
-       :regex  pattern
-       :token  token
-       :begin  begin
-       :switch switch
-       :code   code
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Create an indentation table. Basically a list of indentation tokens.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun indtable (label &rest definitions)
-    ;; check for simple errors
-    (unless (keywordp label)
-       (error "INDTABLE: ~A is not a keyword" label)
-    )
-    (dolist (item definitions)
-       (unless
-           (or
-               (atom item)
-               (indtoken-p item)
-               (indtable-p item)
-               (indaugment-p item)
-           )
-           (error "INDTABLE: invalid indent table argument ~A" item)
-       )
-    )
-
-    ;; return indent table structure
-    (make-indtable
-       :label          label
-       :tokens         (remove-if-not #'indtoken-p definitions)
-       :tables         (remove-if-not #'indtable-p definitions)
-       :augments       (remove-if-not #'indaugment-p definitions)
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Add identifier to list of augment tables.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun indaugment (&rest keywords)
-    (dolist (keyword keywords)
-       (unless (keywordp keyword)
-           (error "INDAUGMENT: bad indent table label ~A" keyword)
-       )
-    )
-
-    ;; return augment list structure
-    (make-indaugment :labels keywords)
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Add variables to initialization list
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indinit (&rest variables)
-    (make-indinit :variables variables)
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Create a "reduction rule"
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indreduce (token check rules &rest code &aux nullp consp)
-    ;; check for simple errors
-    (unless (or (keywordp token) (null token))
-       (error "INDREDUCE: ~A is not a keyword" token)
-    )
-    (dolist (rule rules)
-       (or (listp rule) (error "INDREDUCE: invalid indent rule ~A" rule))
-       ;; XXX This test is not enough, maybe should add some sort of
-       ;; runtime check to avoid circularity.
-       (and (eq token (car rule)) (null (cdr rule))
-           (error "INDREDUCE: ~A reduces to ~A" token)
-       )
-       (dolist (item rule)
-           (and (or nullp consp) (not (keywordp item))
-               (error "INDREDUCE: a keyword must special pattern")
-           )
-           (if (consp item)
-               (progn
-                   (unless
-                       (or
-                           (and
-                               (eq (car item) 'not)
-                               (keywordp (cadr item))
-                               (null (cddr item))
-                           )
-                           (and
-                               (eq (car item) 'or)
-                               (null (member-if-not #'keywordp (cdr item)))
-                           )
-                       )
-                       (error "INDREDUCE: syntax error parsing ~A" item)
-                   )
-                   (setq consp t)
-               )
-               (progn
-                   (setq nullp (null item) consp nil)
-                   (unless (or (keywordp item) nullp (eq item t))
-                       (error "INDREDUCE: ~A is not a keyword" item)
-                   )
-               )
-           )
-       )
-;      (and consp
-;          (error "INDREDUCE: pattern must be followed by keyword")
-;      )
-    )
-
-    ;; result of macro, return indent reduce structure
-    (make-indreduce
-       :token  token
-       :check  check
-       :rules  (remove-if #'null rules)
-       :code   code
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Create a "resolve rule"
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indresolve (match &rest code)
-    ;; check for simple errors
-    (if (consp match)
-       (dolist (token match)
-           (or (keywordp token) (error "INDRESOLVE: ~A is not a keyword" token))
-       )
-       (or (keywordp match) (error "INDRESOLVE: ~A is not a keyword" match))
-    )
-
-    ;; result of macro, return indent resolve structure
-    (make-indresolve
-       :match  match
-       :code   code
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Helper function for compile-indent-table. Returns a list of all
-;; tables and tokens for a given table, including tokens and tables
-;; of children.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun list-indtable-elements (table &aux result sub-result)
-    (setq result (cons (indtable-tokens table) (indtable-tables table)))
-    (dolist (child (indtable-tables table))
-       (setq sub-result (list-indtable-elements child))
-       (rplaca result (append (car result) (car sub-result)))
-       (rplacd result (append (cdr result) (cdr sub-result)))
-    )
-    ;; Return pair of all nested tokens and tables
-    result
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; First pass adding augumented tokens to a table, done in two passes
-;; to respect inheritance order.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-indent-augment-list (table table-list &aux labels augment tokens)
-
-    ;; Create a list of all augment tables.
-    (dolist (augment (indtable-augments table))
-       (setq labels (append labels (indaugment-labels augment)))
-    )
-
-    ;;  Remove duplicates and references to "itself", without warnings?
-    (setq
-       labels
-       (remove (indtable-label table) (remove-duplicates labels :from-end t))
-    )
-
-    ;; Check if the specified indent tables exists!
-    (dolist (label labels)
-       (unless
-           (setq augment (car (member label table-list :key #'indtable-label)))
-           (error "COMPILE-INDENT-AUGMENT-LIST: Cannot augment ~A in ~A"
-               label
-               (indtable-label table)
-           )
-       )
-
-       ;; Increase list of tokens.
-       (setq tokens (append tokens (indtable-tokens augment)))
-    )
-
-    ;;  Store the tokens in the augment list. They will be added
-    ;; to the indent table in the second pass.
-    (setf (indtable-augments table) tokens)
-
-    ;;  Recurse on every child table.
-    (dolist (child (indtable-tables table))
-       (compile-indent-augment-list child table-list)
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Last pass adding augmented tokens to a table.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun link-indent-augment-list (table)
-    (setf
-       (indtable-tokens table)
-       (remove-duplicates
-           (nconc (indtable-tokens table) (indtable-augments table))
-           :key        #'indtoken-regex
-           :test       #'equal
-           :from-end   t
-       )
-
-       ;;  Don't need to keep this list anymore.
-       (indtable-augments table)
-       ()
-    )
-
-    (dolist (child (indtable-tables table))
-       (link-indent-augment-list child)
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Compile the indent reduction rules
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-indent-reduces (reduces
-                              &aux need label check rules reduce
-                                   check-code reduce-code)
-    (dolist (item reduces)
-       (setq
-           label       (indreduce-label item)
-           check       (indreduce-check item)
-           rules       (indreduce-rules item)
-           reduce      (indreduce-code  item)
-           need        (and
-                           rules
-                           (not label)
-                           (or
-                               reduce
-                               (null check)
-                               (not (constantp check))
-                           )
-                       )
-       )
-       (when need
-           (and (null label) (setq label (intern (string (gensym)) 'keyword)))
-
-           (setf (indreduce-label item) label)
-
-           (and
-               (or (null check)
-                   (not (constantp check))
-               )
-               (setq
-                   check       (list (list 'eq '*ind-label* label) check)
-                   check-code  (nconc check-code (list check))
-               )
-           )
-
-           (and reduce
-               (setq
-                   reduce      (cons (list 'eq '*ind-label* label) reduce)
-                   reduce-code (nconc reduce-code (list reduce))
-               )
-           )
-       )
-    )
-
-    ;; XXX Instead of using COND, could/should use CASE
-    ;; TODO Implement a smart CASE in the bytecode compiler, if
-    ;;     possible, should generate a hashtable, or a table
-    ;;     of indexes (for example when all elements in the cases
-    ;;     are characters) and then jump directly to the code.
-    (if check-code
-       (setq check-code (cons 'cond (nconc check-code '((t t)))))
-       (setq check-code t)
-    )
-    (and reduce-code (setq reduce-code (cons 'cond reduce-code)))
-
-    (values check-code reduce-code)
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Compile the indent resolve code
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-indent-resolves (resolves &aux match resolve resolve-code)
-    (and
-       (/=
-           (length resolves)
-           (length (remove-duplicates resolves :key #'indresolve-match))
-       )
-       ;; XXX Could do a more complete job and tell what is wrong...
-       (error "COMPILE-INDENT-RESOLVES: duplicated labels")
-    )
-
-    (dolist (item resolves)
-       (when (setq resolve (indresolve-code item))
-           (setq
-               match
-               (indresolve-match item)
-
-               resolve
-               (cons
-                   (if (listp match)
-                       (list 'member '*ind-token* `',match :test `#'eq)
-                       (list 'eq '*ind-token* match)
-                   )
-                   resolve
-               )
-
-               resolve-code
-               (nconc resolve-code (list resolve))
-           )
-       )
-    )
-
-    (and resolve-code (cons 'cond resolve-code))
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Create an indentation table
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-indent-table (name &rest lists
-                            &aux main elements switches begins tables symbols
-                                 label code token-code check-code reduce-code
-                                 (inits (remove-if-not #'indinit-p lists))
-                                 (reduces (remove-if-not #'indreduce-p lists))
-                                 (resolves (remove-if-not #'indresolve-p lists))
-                           )
-    (setq
-       lists    (delete-if
-                   #'(lambda (object)
-                       (or
-                           (indinit-p object)
-                           (indreduce-p object)
-                           (indresolve-p object)
-                       )
-                   )
-                   lists)
-       main     (apply #'indtable name lists)
-       elements (list-indtable-elements main)
-       switches (remove-if #'null (car elements) :key #'indtoken-switch)
-       begins   (remove-if #'null (car elements) :key #'indtoken-begin)
-       tables   (cons main (cdr elements))
-    )
-
-    ;; Check for typos in the keywords, or for not defined indent tables.
-    (dolist (item (mapcar #'indtoken-switch switches))
-       (unless
-           (or (and (integerp item) (minusp item))
-               (member item tables :key #'indtable-label)
-           )
-           (error "COMPILE-INDENT-TABLE: SWITCH ~A cannot be matched" item)
-       )
-    )
-    (dolist (item (mapcar #'indtoken-begin begins))
-       (unless (member item tables :key #'indtable-label)
-           (error "COMPILE-INDENT-TABLE: BEGIN ~A cannot be matched" item)
-       )
-    )
-
-    ;; Build augment list.
-    (compile-indent-augment-list main tables)
-    (link-indent-augment-list main)
-
-    ;; Change switch and begin fields to point to the indent table
-    (dolist (item switches)
-       (if (keywordp (indtoken-switch item))
-           (setf
-               (indtoken-switch item)
-               (car (member (indtoken-switch item) tables :key #'indtable-label))
-           )
-       )
-    )
-    (dolist (item begins)
-       (setf
-           (indtoken-begin item)
-           (car (member (indtoken-begin item) tables :key #'indtable-label))
-       )
-    )
-
-    ;; Build initialization list
-    (dolist (init inits)
-       (setq symbols (nconc symbols (indinit-variables init)))
-    )
-
-    ;; Build token code
-    (dolist (item (car elements))
-       (when (setq code (indtoken-code item))
-           (setf
-               label
-               (intern (string (gensym)) 'keyword)
-
-               (indtoken-label item)
-               label
-
-               code
-               (list (list 'eq '*ind-label* label) code)
-
-               token-code
-               (nconc token-code (list code))
-           )
-       )
-    )
-
-    (multiple-value-setq
-       (check-code reduce-code)
-       (compile-indent-reduces reduces)
-    )
-
-    (make-indent
-       :tables         tables
-       :inits          symbols
-       :reduces        reduces
-       :resolves       resolves
-       :token-code     (and token-code (cons 'cond token-code))
-       :check-code     check-code
-       :reduce-code    reduce-code
-       :resolve-code   (compile-indent-resolves resolves)
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Search rule-pattern in match-pattern
-;; Returns offset of match, and it's length, if any
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun indent-search-rule (rule-pattern match-pattern
-                          &aux start rule rulep matchp test offset length)
-    (if (member-if-not #'keywordp rule-pattern)
-       ;; rule has wildcards
-       (progn
-           (setq
-               rulep   rule-pattern
-               matchp  match-pattern
-               start   match-pattern
-           )
-           (loop
-               (setq rule (car rulep))
-               (cond
-                   ;; Special pattern
-                   ((consp rule)
-                       (if (eq (car rule) 'not)
-                           (progn
-                               (setq
-                                   test        (cadr rule)
-                                   rulep       (cdr rulep)
-                                   rule        (car rulep)
-                               )
-                               (while
-                                   (and
-                                       ;; something to match
-                                       matchp
-                                       ;; NOT match is true
-                                       (not (eq (car matchp) test))
-                                       ;; next match is not true
-                                       (not (eq (car matchp) rule))
-                                   )
-                                   (setq matchp (cdr matchp))
-                               )
-                               (if (eq (car matchp) rule)
-                                   ;; rule matched
-                                   (setq
-                                       matchp  (cdr matchp)
-                                       rulep   (cdr rulep)
-                                   )
-                                   ;; failed
-                                   (setq
-                                       rulep   rule-pattern
-                                       matchp  (cdr start)
-                                       start   matchp
-                                   )
-                               )
-                           )
-                           ;; (eq (car rule) 'or)
-                           (progn
-                               (if (member (car matchp) (cdr rule) :test #'eq)
-                                   (setq rulep (cdr rulep) matchp (cdr matchp))
-                                   ;; failed
-                                   (progn
-                                       ;; end of match found!
-                                       (and (null matchp) (return))
-                                       ;; reset search
-                                       (setq
-                                           rulep       rule-pattern
-                                           matchp      (cdr start)
-                                           start       matchp
-                                       )
-                                   )
-                               )
-                           )
-                       )
-                   )
-
-                   ;; Skip until end of match-pattern or rule is found
-                   ((null rule)
-                       (setq rulep (cdr rulep))
-                       ;; If matches everything
-                       (if (null rulep)
-                           (progn (setq matchp nil) (return))
-                           ;; If next token cannot be matched
-                           (unless
-                               (setq
-                                   matchp
-                                   (member (car rulep) matchp :test #'eq)
-                               )
-                               (setq rulep rule-pattern)
-                               (return)
-                           )
-                       )
-                       (setq rulep (cdr rulep) matchp (cdr matchp))
-                   )
-
-                   ;; Matched
-                   ((eq rule t)
-                       ;; If there isn't a rule to skip
-                       (and (null matchp) (return))
-                       (setq rulep (cdr rulep) matchp (cdr matchp))
-                   )
-
-                   ;; Matched
-                   ((eq rule (car matchp))
-                       (setq rulep (cdr rulep) matchp (cdr matchp))
-                   )
-
-                   ;; No match
-                   (t
-                       ;; end of match found!
-                       (and (null matchp) (return))
-                       ;; reset search
-                       (setq
-                           rulep       rule-pattern
-                           matchp      (cdr start)
-                           start       matchp
-                       )
-                   )
-               )
-
-               ;; if everything matched
-               (or rulep (return))
-           )
-
-           ;; All rules matched
-           (unless rulep
-               ;; Calculate offset and length of match
-               (setq offset 0 length 0)
-               (until (eq match-pattern start)
-                   (setq
-                       offset          (1+ offset)
-                       match-pattern   (cdr match-pattern)
-                   )
-               )
-               (until (eq match-pattern matchp)
-                   (setq
-                       length          (1+ length)
-                       match-pattern   (cdr match-pattern)
-                   )
-               )
-           )
-       )
-       ;; no wildcards
-       (and (setq offset (search rule-pattern match-pattern :test #'eq))
-            (setq length (length rule-pattern))
-       )
-    )
-
-    (values offset length)
-)
-(compile 'indent-search-rule)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Indentation parser
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro indent-macro (ind-definition ind-offset &optional ind-no-tabs)
-   `(prog*
-       (
-       ;; Current indentation table
-       (ind-table (car (indent-tables ,ind-definition)))
-
-       ;; The parser rules
-       (ind-reduces (indent-reduces ,ind-definition))
-
-       ;; Token list for the table
-       (ind-tokens (indtable-tokens ind-table))
-
-       ;; Stack of nested tables/states
-       ind-stack
-
-       ;; indentation to be used
-       (*indent* 0)
-
-       ;; offset to apply indentation
-       *offset*
-
-       ;; Number of lines read
-       (*ind-lines* 1)
-
-       ;; Matched token
-       *ind-token*
-
-       ;; list of tokens after current match, should not be changed
-       *ind-token-list*
-
-       ;; label associated with rule
-       *ind-label*
-
-       ;; offset of match
-       *ind-offset*
-
-       ;; length of match
-       *ind-length*
-
-       ;; insert position
-       (*ind-point* (point))
-
-       (ind-from (scan ,ind-offset :eol :left))
-       (ind-to ,ind-offset)
-       (ind-line (read-text ind-from (- ind-to ind-from)))
-
-       ;; start of current line
-       (*ind-start* ind-from)
-
-       ;; State information
-       ind-state
-
-       ;; For use with (indent-macro-reject)
-       ind-prev-state
-
-       ;; Matches for the current line
-       ind-matches
-
-       ;; Matched tokens not yet used
-       ind-cache
-
-       ;; Pattern being tested
-       ind-token
-
-       ;; Used when searching for a regex
-       ind-match
-
-       ;; Table to change
-       ind-change
-
-       ;; Length of ind-line
-       (ind-length (length ind-line))
-
-       ;; Don't parse after this offset
-       (ind-end ind-length)
-
-       ;; Temporary variables used during loops
-       ind-left
-       ind-right
-       ind-tleft
-       ind-tright
-
-       ;; Set  when start of file is found
-       ind-startp
-
-       ;; Flag for regex search
-       (ind-noteol (< ind-to (scan ind-from :eol :right)))
-
-       ;; Initialization variables expanded here
-       ,@(indent-inits (eval ind-definition))
-       )
-
-       ;; Initial input already read
-       (go :ind-loop)
-
-       ;; Just to avoid a warning about unused variable, as this
-       ;; variable is somewhat redundant as code should already
-       ;; know before entering indent parser, but useful inside
-       ;; indent macros.
-       *ind-point*
-
-;------------------------------------------------------------------------
-; Read a text line
-:ind-read
-       (setq
-           ind-to      ind-from
-           ind-from    (scan ind-from :eol :left :count 2)
-       )
-       ;; If start of file reached
-       (and (= ind-to ind-from) (setq ind-startp t) (go :ind-process))
-
-       (setq
-           *ind-lines*         (1+ *ind-lines*)
-           ind-to              (scan ind-from :eol :right)
-           ind-line            (read-text ind-from (- ind-to ind-from))
-           ind-length          (length ind-line)
-           ind-end             ind-length
-           ind-noteol          nil
-           ind-cache           nil
-           ind-prev-state      ind-state
-       )
-
-;------------------------------------------------------------------------
-; Loop parsing backwards
-:ind-loop
-       (setq ind-matches nil)
-       (dolist (token ind-tokens)
-           ;; Prepare to loop
-           (setq
-               ind-token       (indtoken-regex token)
-               ind-left        0
-           )
-           ;; While the pattern matches
-           (loop
-               (setq ind-right ind-left)
-               (if
-                   (consp
-                       (setq
-                           ind-match
-                           (re-exec
-                               ind-token
-                               ind-line
-                               :start  ind-left
-                               :end    ind-end
-                               :notbol (> ind-left 0)
-                               :noteol ind-noteol
-                           )
-                       )
-                   )
-
-                   ;; Remember about match
-                   (setq
-                       ind-match   (car ind-match)
-                       ind-left    (cdr ind-match)
-                       ind-matches (cons (cons token ind-match) ind-matches)
-                   )
-
-                   ;; No match
-                   (return)
-               )
-               ;; matched an empty string
-               (and (= ind-left ind-right) (incf ind-left))
-
-               ;; matched a single eol or bol
-               (and (>= ind-left ind-end) (return))
-           )
-       )
-
-       ;; Add new matches to cache
-       (when ind-matches
-           (setq
-               ind-cache
-               (stable-sort
-                   (nconc (nreverse ind-matches) ind-cache) #'< :key #'cadr
-               )
-           )
-       )
-
-       ;; If nothing in the cache
-       (or ind-cache (go :ind-process))
-
-       (setq
-           ind-left    (cadar ind-cache)
-           ind-right   (cddar ind-cache)
-           ind-matches (cdr ind-cache)
-       )
-
-       ;; If only one element in the cache
-       (or ind-matches (go :ind-parse))
-
-       (setq
-           ind-tleft   (cadar ind-matches)
-           ind-tright  (cddar ind-matches)
-       )
-
-       ;; Remove overlaps
-       (loop
-           (if (or (>= ind-tleft ind-right) (<= ind-tright ind-left))
-               ;; No overlap
-               (progn
-                   (setq
-                       ind-left    ind-tleft
-                       ind-right   ind-tright
-                       ind-matches (cdr ind-matches)
-                   )
-                   ;; If everything checked
-                   (or ind-matches (return))
-               )
-               ;; Overlap found
-               (progn
-                   (if (consp (cdr ind-matches))
-                       ;; There are yet items to be checked
-                       (progn
-                           (rplaca ind-matches (cadr ind-matches))
-                           (rplacd ind-matches (cddr ind-matches))
-                       )
-                       ;; Last item
-                       (progn
-                           (rplacd (last ind-cache 2) nil)
-                           (return)
-                       )
-                   )
-               )
-           )
-
-           ;; Prepare for next check
-           (setq
-               ind-tleft   (cadar ind-matches)
-               ind-tright  (cddar ind-matches)
-           )
-       )
-
-;------------------------------------------------------------------------
-; Process the matched tokens
-:ind-parse
-       (setq ind-cache (nreverse ind-cache))
-
-:ind-parse-loop
-       (or (setq ind-match (car ind-cache)) (go :ind-process))
-
-       (setq
-           ind-cache (cdr ind-cache)
-           ind-token (car ind-match)
-       )
-
-       (or (member ind-token ind-tokens :test #'eq)
-           (go :ind-parse-loop)
-       )
-
-       ;; If a state should be added
-       (when (setq ind-change (indtoken-token ind-token))
-           (setq
-               ind-left    (cadr ind-match)
-               ind-right   (cddr ind-match)
-
-               *ind-offset*
-               (+ ind-from ind-left)
-
-               *ind-length*
-               (- ind-right ind-left)
-
-               ind-state
-               (cons
-                   (cons ind-change (cons *ind-offset* *ind-length*))
-                   ind-state
-               )
-
-               *ind-label*
-               (indtoken-label ind-token)
-           )
-
-           ;; Expand token code
-           ,(indent-token-code (eval ind-definition))
-       )
-
-       ;; Check if needs to switch to another table
-       (when (setq ind-change (indtoken-switch ind-token))
-           ;; Need to switch to a previous table
-           (if (integerp ind-change)
-               ;; Relative switch
-               (while (and ind-stack (minusp ind-change))
-                   (setq
-                       ind-table       (pop ind-stack)
-                       ind-change      (1+ ind-change)
-                   )
-               )
-               ;; Search table in the stack
-               (until
-                   (or
-                       (null ind-stack)
-                       (eq
-                           (setq ind-table (pop ind-stack))
-                           ind-change
-                       )
-                   )
-               )
-           )
-
-           ;; If no match or stack became empty
-           (and (null ind-table)
-               (setq
-                   ind-table
-                   (car (indent-tables ,ind-definition))
-               )
-           )
-       )
-
-       ;; Check if needs to start a new table
-       ;; XXX use ind-tleft to reduce number of local variables
-       (when (setq ind-tleft (indtoken-begin ind-token))
-           (setq
-               ind-change  ind-tleft
-               ind-stack   (cons ind-table ind-stack)
-               ind-table   ind-change
-           )
-       )
-
-       ;; If current "indent pattern table" changed
-       (when ind-change
-           (setq
-               ind-tokens  (indtable-tokens ind-table)
-               ind-cache   (nreverse ind-cache)
-               ind-end     (cadr ind-match)
-               ind-noteol  (> ind-length ind-end)
-           )
-           (go :ind-loop)
-       )
-
-       (and ind-cache (go :ind-parse-loop))
-
-;------------------------------------------------------------------------
-; Everything checked, process result
-:ind-process
-
-       ;; If stack is not empty, don't apply rules
-       (and ind-stack (not ind-startp) (go :ind-read))
-
-       (block ind-terminate-block
-           (setq ind-cache nil ind-tleft 0 ind-change (mapcar #'car ind-state))
-           (dolist (entry ind-reduces)
-               (setq
-                   *ind-token* (indreduce-token entry)
-                   *ind-label* (indreduce-label entry)
-               )
-               (dolist (rule (indreduce-rules entry))
-                   (loop
-                       ;; Check if reduction can be applied
-                       (or
-                           (multiple-value-setq
-                               (ind-match ind-length)
-                               (indent-search-rule rule ind-change)
-                           )
-                           (return)
-                       )
-
-                       (setq
-                           ;; First element matched
-                           ind-matches         (nthcdr ind-match ind-state)
-
-                           ;; Offset of match
-                           *ind-offset*        (cadar ind-matches)
-
-                           *ind-token-list*    (nthcdr ind-match ind-change)
-
-                           ;; Length of match, note that *ind-length*
-                           ;; Will be transformed to zero bellow if
-                           ;; the rule is deleting entries.
-                           *ind-length*
-                           (if (> ind-length 1)
-                               (progn
-                                   (setq
-                                       ;; XXX using ind-tright, to reduce
-                                       ;; number of local variables...
-                                       ind-tright
-                                       (nth (1- ind-length) ind-matches)
-
-                                       ind-right
-                                       (+  (cadr ind-tright)
-                                           (cddr ind-tright)
-                                       )
-                                   )
-                                   (- ind-right *ind-offset*)
-                               )
-                               (cddar ind-matches)
-                           )
-                       )
-
-                       ;; XXX using ind-tleft as a counter, to reduce
-                       ;; number of used variables...
-                       (and (>= (incf ind-tleft) 1000)
-                           ;; Should never apply so many reduce rules on
-                           ;; every iteration, if needs to, something is
-                           ;; wrong in the indentation definition...
-                           (error "~D INDREDUCE iterations, ~
-                                  now checking (~A ~A)"
-                               ind-tleft *ind-token* rule
-                           )
-                       )
-
-                       ;; Check if should apply the reduction
-                       (or
-                           ;; Expand check code
-                           ,(indent-check-code (eval ind-definition))
-                           (return)
-                       )
-
-                       (if (null *ind-token*)
-                           ;; Remove match
-                           (progn
-                               (setq *ind-length* 0)
-                               (if (= ind-match 0)
-                                   ;; Matched the first entry
-                                   (setq
-                                       ind-state
-                                       (nthcdr ind-length ind-matches)
-                                   )
-                                   (progn
-                                       (setq
-                                           ind-matches
-                                           (nthcdr (1- ind-match) ind-state)
-                                       )
-                                       (rplacd
-                                           ind-matches
-                                           (nthcdr (1+ ind-length) ind-matches)
-                                       )
-                                   )
-                               )
-                           )
-
-                           ;; Substitute/simplify
-                           (progn
-                               (rplaca (car ind-matches) *ind-token*)
-                               (when (> ind-length 1)
-                                   (rplacd (cdar ind-matches) *ind-length*)
-                                   (rplacd
-                                       ind-matches
-                                       (nthcdr ind-length ind-matches)
-                                   )
-                               )
-                           )
-                       )
-                       (setq
-                           ind-cache       t
-                           ind-change      (mapcar #'car ind-state)
-                       )
-
-                       ;; Expand reduce code
-                       ,(indent-reduce-code (eval ind-definition))
-                   )
-               )
-           )
-
-           ;; ind-cache will be T if at least one change was done
-           (and ind-cache (go :ind-process))
-
-           ;; Start of file reached
-           (or ind-startp (go :ind-read))
-
-       )    ;; end of ind-terminate-block
-
-
-       (block ind-terminate-block
-           (setq *ind-token-list* (mapcar #'car ind-state))
-           (dolist (item ind-state)
-               (setq
-                   *ind-token*         (car item)
-                   *ind-offset*        (cadr item)
-                   *ind-length*        (cddr item)
-               )
-               ;; Expand resolve code
-               ,(indent-resolve-code (eval ind-definition))
-               (setq *ind-token-list* (cdr *ind-token-list*))
-           )
-       )
-
-       (and (integerp *indent*)
-            (integerp *offset*)
-           (indent-text *indent* *offset* ,ind-no-tabs)
-       )
-    )
-)
diff --git a/xedit/lisp/modules/lisp.lsp b/xedit/lisp/modules/lisp.lsp
deleted file mode 100644 (file)
index b65a067..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-;;
-;; Copyright (c) 2001 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;  
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/lisp.lsp,v 1.9 2002/12/04 05:28:01 paulo Exp $
-;;
-(provide "lisp")
-
-(in-package "LISP")
-
-(export '(
-    second third fourth fifth sixth seventh eighth ninth tenth
-    pathname merge-pathnames
-    logtest signum
-    alphanumericp copy-seq push pop prog prog*
-    with-open-file with-output-to-string
-))
-
-(defun second (a)      (nth 1 a))
-(defun third (a)       (nth 2 a))
-(defun fourth (a)      (nth 3 a))
-(defun fifth (a)       (nth 4 a))
-(defun sixth (a)       (nth 5 a))
-(defun seventh (a)     (nth 6 a))
-(defun eighth (a)      (nth 7 a))
-(defun ninth (a)       (nth 8 a))
-(defun tenth (a)       (nth 9 a))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; pathnames
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun pathname (filename)
-    (values (parse-namestring filename)))
-
-(defun merge-pathnames (pathname &optional defaults default-version)
-    (if (null default-version)
-       (parse-namestring pathname nil defaults)
-       (parse-namestring pathname nil
-           (make-pathname :defaults defaults :version default-version))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; math
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun logtest (integer1 integer2)
-    (not (zerop (logand integer1 integer2))))
-
-(defun signum (number)
-    (if (zerop number) number (/ number (abs number))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; misc functions/macros
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun alphanumericp (char)
-    (or (alpha-char-p char) (not (null (digit-char-p char)))))
-
-(defun copy-seq (sequence)
-    (subseq sequence 0))
-
-(defmacro prog (init &rest body)
-    `(block nil (let ,init (tagbody ,@body))))
-
-(defmacro prog* (init &rest body)
-    `(block nil (let* ,init (tagbody ,@body))))
-
-(defmacro with-open-file (file &rest body)
-    `(let ((,(car file) (open ,@(cdr file))))
-       (unwind-protect
-           (progn ,@body)
-           (if ,(car file) (close ,(car file))))))
-
-(defmacro with-output-to-string (stream &rest body)
-    `(let ((,(car stream) (make-string-output-stream)))
-       (unwind-protect
-           (progn ,@body (get-output-stream-string ,(car stream)))
-           (and ,(car stream) (close ,(car stream))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; setf
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defsetf car (list) (value)    `(progn (rplaca ,list ,value) ,value))
-(defsetf cdr (list) (value)    `(progn (rplacd ,list ,value) ,value))
-
-(defsetf caar (list) (value)   `(progn (rplaca (car ,list) ,value) ,value))
-(defsetf cadr (list) (value)   `(progn (rplaca (cdr ,list) ,value) ,value))
-(defsetf cdar (list) (value)   `(progn (rplacd (car ,list) ,value) ,value))
-(defsetf cddr (list) (value)   `(progn (rplacd (cdr ,list) ,value) ,value))
-(defsetf caaar (list) (value)  `(progn (rplaca (caar ,list) ,value) ,value))
-(defsetf caadr (list) (value)  `(progn (rplaca (cadr ,list) ,value) ,value))
-(defsetf cadar (list) (value)  `(progn (rplaca (cdar ,list) ,value) ,value))
-(defsetf caddr (list) (value)  `(progn (rplaca (cddr ,list) ,value) ,value))
-(defsetf cdaar (list) (value)  `(progn (rplacd (caar ,list) ,value) ,value))
-(defsetf cdadr (list) (value)  `(progn (rplacd (cadr ,list) ,value) ,value))
-(defsetf cddar (list) (value)  `(progn (rplacd (cdar ,list) ,value) ,value))
-(defsetf cdddr (list) (value)  `(progn (rplacd (cddr ,list) ,value) ,value))
-(defsetf caaaar (list) (value) `(progn (rplaca (caaar ,list) ,value) ,value))
-(defsetf caaadr (list) (value) `(progn (rplaca (caadr ,list) ,value) ,value))
-(defsetf caadar (list) (value) `(progn (rplaca (cadar ,list) ,value) ,value))
-(defsetf caaddr (list) (value) `(progn (rplaca (caddr ,list) ,value) ,value))
-(defsetf cadaar (list) (value) `(progn (rplaca (cdaar ,list) ,value) ,value))
-(defsetf cadadr (list) (value) `(progn (rplaca (cdadr ,list) ,value) ,value))
-(defsetf caddar (list) (value) `(progn (rplaca (cddar ,list) ,value) ,value))
-(defsetf cadddr (list) (value) `(progn (rplaca (cdddr ,list) ,value) ,value))
-(defsetf cdaaar (list) (value) `(progn (rplacd (caaar ,list) ,value) ,value))
-(defsetf cdaadr (list) (value) `(progn (rplacd (caadr ,list) ,value) ,value))
-(defsetf cdadar (list) (value) `(progn (rplacd (cadar ,list) ,value) ,value))
-(defsetf cdaddr (list) (value) `(progn (rplacd (caddr ,list) ,value) ,value))
-(defsetf cddaar (list) (value) `(progn (rplacd (cdaar ,list) ,value) ,value))
-(defsetf cddadr (list) (value) `(progn (rplacd (cdadr ,list) ,value) ,value))
-(defsetf cdddar (list) (value) `(progn (rplacd (cddar ,list) ,value) ,value))
-(defsetf cddddr (list) (value) `(progn (rplacd (cdddr ,list) ,value) ,value))
-
-(defsetf first (list) (value)  `(progn (rplaca ,list ,value) ,value))
-(defsetf second (list) (value) `(progn (rplaca (nthcdr 1 ,list) ,value) ,value))
-(defsetf third (list) (value)  `(progn (rplaca (nthcdr 2 ,list) ,value) ,value))
-(defsetf fourth (list) (value) `(progn (rplaca (nthcdr 3 ,list) ,value) ,value))
-(defsetf fifth (list) (value)  `(progn (rplaca (nthcdr 4 ,list) ,value) ,value))
-(defsetf sixth (list) (value)  `(progn (rplaca (nthcdr 5 ,list) ,value) ,value))
-(defsetf seventh (list) (value)        `(progn (rplaca (nthcdr 6 ,list) ,value) ,value))
-(defsetf eighth (list) (value) `(progn (rplaca (nthcdr 7 ,list) ,value) ,value))
-(defsetf ninth (list) (value)  `(progn (rplaca (nthcdr 8 ,list) ,value) ,value))
-(defsetf tenth (list) (value)  `(progn (rplaca (nthcdr 9 ,list) ,value) ,value))
-
-(defsetf rest (list) (value)   `(progn (rplacd ,list ,value) ,value))
-
-(defun lisp::nth-store (index list value)
-    (rplaca (nthcdr index list) value) value)
-(defsetf nth lisp::nth-store)
-
-(defsetf aref (array &rest indices) (value)
-    `(lisp::vector-store ,array ,@indices ,value))
-
-(defsetf get (symbol key &optional default) (value)
-    `(lisp::put ,symbol ,key ,value))
-
-(defsetf symbol-plist lisp::set-symbol-plist)
-
-(defsetf gethash (key hash-table &optional default) (value)
-    `(lisp::puthash ,key ,hash-table ,value))
-
-(defsetf char lisp::char-store)
-(defsetf schar lisp::char-store)
-(defsetf elt lisp::elt-store)
-(defsetf svref lisp::elt-store)
-(defsetf documentation lisp::documentation-store)
-
-(defsetf symbol-value set)
-
-(defsetf subseq (sequence start &optional end) (value)
-    `(progn (replace ,sequence ,value :start1 ,start :end1 ,end) ,value))
diff --git a/xedit/lisp/modules/progmodes/auto.lsp b/xedit/lisp/modules/progmodes/auto.lsp
deleted file mode 100644 (file)
index aa4543e..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-;; Copyright (c) 2007,2008 Paulo Cesar Pereira de Andrade
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice (including the next
-;; paragraph) shall be included in all copies or substantial portions of the
-;; Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-;; DEALINGS IN THE SOFTWARE.
-;;
-;; Author: Paulo Cesar Pereira de Andrade
-;;
-
-;; Mode for editing autoconf/automake m4 files
-
-(require "syntax")
-(in-package "XEDIT")
-
-(defsynprop *prop-macro*
-    "macro"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "green4")
-
-(defsynprop *prop-separator*
-  "separator"
-  :font                "*courier-bold-r*-12-*"
-  :foreground  "Red3")
-
-(defsynprop *prop-variable*
-  "variable"
-  :font                "*lucidatypewriter-medium-r*-12-*"
-  :foreground  "Gold4")
-
-(defsynprop *prop-escape*
-  "escape"
-  :font                "*lucidatypewriter-medium-r*-12-*"
-  :foreground  "Red3")
-
-(defsyntax *auto-mode* :main nil nil nil
-  ;; dont consider dnl a macro call at top level
-  (syntoken "(#.*|\\<dnl($|\\>.*))" :property *prop-comment*)
-
-  ;; shell keywords
-  (syntoken
-    (string-concat
-      "\\<("
-      "if|then|else|elif|else|fi|case|in|esac|do|done"
-      ")\\>") :property *prop-keyword*)
-
-  ;; toplevel no arguments macro
-  (syntoken "^[a-zA-Z0-9_]+$" :property *prop-macro*)
-
-  (syntable :string *prop-string* nil
-    ;; ignore escaped characters
-    (syntoken "\\\\.")
-    (syntoken "\"" :nospec t :switch -1)
-    (synaugment :variables))
-  (syntable :constant *prop-constant* nil
-    (syntoken "\\\\.")
-    (syntoken "'" :nospec t :switch -1)
-    (synaugment :variables))
-  (syntable :escape *prop-escape* nil
-    (syntoken "\\\\.")
-    (syntoken "`" :nospec t :switch -1)
-    (synaugment :variables))
-
-  (syntable :quoted-string *prop-string* nil
-    (syntoken "\\\"" :nospec t :switch -1))
-
-  (syntable :macro *prop-default* nil
-    (syntoken "," :property *prop-separator*)
-    (syntoken "[" :nospec t :property *prop-separator* :begin :quoted)
-    (syntable :quoted *prop-default* nil
-      ;; allow nesting
-      (syntoken "[" :nospec t :property *prop-separator* :begin :quoted)
-      (syntoken "]" :nospec t :property *prop-separator* :switch -1)
-      (synaugment :shared :variables))
-    (syntoken ")" :nospec t :property *prop-macro* :switch -1)
-    (synaugment :shared :variables :comments))
-
-  (syntable :shared nil nil
-    (syntoken "[a-zA-Z0-9_]+\\(" :property *prop-macro* :begin :macro)
-    ;; variable assignment
-    (syntoken "[a-zA-Z0-9_-]+=" :property *prop-keyword*)
-    (syntoken "\"" :nospec t :begin :string :contained t)
-    (syntoken "'" :nospec t :begin :constant :contained t)
-    (syntoken "`" :nospec t :begin :escape :contained t)
-    (syntoken "\\\"" :nospec t :begin :quoted-string :contained t)
-  )
-
-  (syntable :variables nil nil
-    (syntoken "\\$[a-zA-Z0-9_-]+" :property *prop-variable*)
-    (syntoken "\\$\\{[a-zA-Z0-9_-]+\\}" :property *prop-variable*)
-    (syntoken "\\$\\([a-zA-Z0-9_-]+\\)" :property *prop-variable*))
-
-  (syntable :comments nil nil
-    (syntoken "(#.*|\\<dnl($|\\>.*))" :property *prop-comment*))
-
-  (synaugment :shared :variables))
diff --git a/xedit/lisp/modules/progmodes/c.lsp b/xedit/lisp/modules/progmodes/c.lsp
deleted file mode 100644 (file)
index fba6b99..0000000
+++ /dev/null
@@ -1,1140 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/c.lsp,v 1.27 2004/01/12 17:53:20 paulo Exp $
-;;
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-(defsynprop *prop-format*
-    "format"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "RoyalBlue2"
-    :underline t
-)
-
-(defsynoptions *c-DEFAULT-style*
-    ;; Positive number. Basic indentation.
-    (:indentation              .       4)
-
-    ;; Boolean. Support for GNU style indentation.
-    (:brace-indent             .       nil)
-
-    ;; Boolean. Add one indentation level to case and default?
-    (:case-indent              .       t)
-
-    ;; Boolean. Remove one indentation level for labels?
-    (:label-dedent             .       t)
-
-    ;; Boolean. Add one indentation level to continuations?
-    (:cont-indent              .       t)
-
-    ;; Boolean. Move cursor to the indent column after pressing <Enter>?
-    (:newline-indent           .       t)
-
-    ;; Boolean. Set to T if tabs shouldn't be used to fill indentation.
-    (:emulate-tabs             .       nil)
-
-    ;; Boolean. Force a newline before braces?
-    (:newline-before-brace     .       nil)
-
-    ;; Boolean. Force a newline after braces?
-    (:newline-after-brace      .       nil)
-
-    ;; Boolean. Force a newline after semicolons?
-    (:newline-after-semi       .       nil)
-
-    ;; Boolean. Only calculate indentation after pressing <Enter>?
-    ;;         This may be useful if the parser does not always
-    ;;         do what the user expects...
-    (:only-newline-indent      .       nil)
-
-    ;; Boolean. Remove extra spaces from previous line.
-    ;;         This should default to T when newline-indent is not NIL.
-    (:trim-blank-lines         .       t)
-
-    ;; Boolean. If this hash-table entry is set, no indentation is done.
-    ;;         Useful to temporarily disable indentation.
-    (:disable-indent           .       nil)
-)
-
-;; BSD like style
-(defsynoptions *c-BSD-style*
-    (:indentation              .       8)
-    (:brace-indent             .       nil)
-    (:case-indent              .       nil)
-    (:label-dedent             .       t)
-    (:cont-indent              .       t)
-    (:newline-indent           .       t)
-    (:emulate-tabs             .       nil)
-    (:newline-before-brace     .       nil)
-    (:newline-after-brace      .       t)
-    (:newline-after-semi       .       t)
-    (:trim-blank-lines         .       t)
-)
-
-;; GNU like style
-(defsynoptions *c-GNU-style*
-    (:indentation              .       2)
-    (:brace-indent             .       t)
-    (:case-indent              .       nil)
-    (:label-dedent             .       t)
-    (:cont-indent              .       t)
-    (:newline-indent           .       nil)
-    (:emulate-tabs             .       nil)
-    (:newline-before-brace     .       t)
-    (:newline-after-brace      .       t)
-    (:newline-after-semi       .       t)
-    (:trim-blank-lines         .       nil)
-)
-
-;; K&R like style
-(defsynoptions *c-K&R-style*
-    (:indentation              .       5)
-    (:brace-indent             .       nil)
-    (:case-indent              .       nil)
-    (:label-dedent             .       t)
-    (:cont-indent              .       t)
-    (:newline-indent           .       t)
-    (:emulate-tabs             .       t)
-    (:newline-before-brace     .       t)
-    (:newline-after-brace      .       t)
-    (:newline-after-semi       .       t)
-    (:trim-blank-lines         .       t)
-)
-
-(defvar *c-styles* '(
-    ("xedit"   .       *c-DEFAULT-style*)
-    ("BSD"     .       *c-BSD-style*)
-    ("GNU"     .       *c-GNU-style*)
-    ("K&R"     .       *c-K&R-style*)
-))
-
-(defvar *c-mode-options* *c-DEFAULT-style*)
-; (setq *c-mode-options* *c-gnu-style*)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; This is a very lazy "pattern matcher" for the C language.
-;; If the syntax in the code is not correct, it may get confused, and
-;; because it is "lazy" some wrong constructs will be recognized as
-;; correct when reducing patterns.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defindent *c-mode-indent* :main
-    ;; this must be the first token
-    (indtoken "^\\s*"          :start-of-line)
-    (indtoken "\\<case\\>"     :c-case)
-    (indtoken "\\<default\\>"  :c-default)
-    (indtoken "\\<do\\>"       :do)
-    (indtoken "\\<if\\>"       :c-if)
-    (indtoken "\\<else\\>"     :c-else)
-    (indtoken "\\<for\\>"      :c-for)
-    (indtoken "\\<switch\\>"   :c-switch)
-    (indtoken "\\<while\\>"    :c-while)
-    ;; Match identifiers and numbers as an expression
-    (indtoken "\\w+"           :expression)
-    (indtoken ";"              :semi           :nospec t)
-    (indtoken ","              :comma          :nospec t)
-    (indtoken ":"              :collon         :nospec t)
-    ;;  Ignore spaces before collon, this avoids dedenting ternary
-    ;; and bitfield definitions as the parser does not distinguish
-    ;; labels from those, another option would be to use the pattern
-    ;; "\\w+:", but this way should properly handle labels generated
-    ;; by macros, example: `MACRO_LABEL(value):'
-    (indtoken "\\s+:"          nil)
-
-    (indinit                   (c-braces 0))
-    (indtoken "{"
-       :obrace
-       :nospec t
-       :code   (decf c-braces)
-    )
-    (indtoken "}"
-       :cbrace
-       :nospec t
-       :begin  :braces
-       :code   (incf c-braces)
-    )
-    (indtable :braces
-       (indtoken "{"
-           :obrace
-           :nospec t
-           :switch -1
-           :code   (decf c-braces)
-       )
-       (indtoken "}"
-           :cbrace
-           :nospec t
-           :begin  :braces
-           :code   (incf c-braces)
-       )
-    )
-
-    (indinit                   (c-bra 0))
-    (indtoken ")"              :cparen         :nospec t :code (incf c-bra))
-    (indtoken "("              :oparen         :nospec t :code (decf c-bra))
-    (indtoken "]"              :cbrack         :nospec t :code (incf c-bra))
-    (indtoken "["              :obrack         :nospec t :code (decf c-bra))
-    (indtoken "\\\\$"          :continuation)
-
-    ;; C++ style comment, disallow other tokens to match inside comment
-    (indtoken "//.*$"          nil)
-
-    (indtoken "#"              :hash           :nospec t)
-
-    ;; if in the same line, reduce now, this must be done because the
-    ;; delimiters are identical
-    (indtoken "'([^\\']|\\\\.)*'"      :expression)
-    (indtoken "\"([^\\\"]|\\\\.)*\""   :expression)
-
-    (indtoken "\""             :cstring        :nospec t       :begin :string)
-
-    (indtoken "'"              :cconstant      :nospec t       :begin :constant)
-
-    (indtoken "*/"             :ccomment       :nospec t       :begin :comment)
-    ;; this must be the last token
-    (indtoken "$"              :end-of-line)
-
-    (indtable :string
-       ;; Ignore escaped characters
-       (indtoken "\\."         nil)
-       ;; Return to the toplevel when the start of the string is found
-       (indtoken "\""          :ostring        :nospec t       :switch -1)
-    )
-    (indtable :constant
-       ;; Ignore escaped characters
-       (indtoken "\\."         nil)
-       ;; Return to the toplevel when the start of the character is found
-       (indtoken "'"           :oconstant      :nospec t       :switch -1)
-    )
-    (indtable :comment
-       (indtoken "/*"          :ocomment       :nospec t       :switch -1)
-    )
-
-    ;; "Complex" statements
-    (indinit           (c-complex 0) (c-cases 0))
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Order of reduce rules here is important, process comment,
-    ;; continuations, preprocessor and set states when an eol is found.
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-    (indinit   (c-offset (point-max))
-               (c-prev-offset c-offset)
-    )
-    (indreduce :indent
-       t
-       ((:start-of-line))
-       (and (= *ind-start* *ind-offset*)
-           (setq
-               *offset* (+ *ind-offset* *ind-length*)
-           )
-       )
-       (setq
-           c-prev-offset   c-offset
-           c-offset        *ind-offset*
-       )
-    )
-
-    ;; Delete comments
-    (indreduce nil
-       t
-       ((:ocomment nil :ccomment))
-    )
-
-    ;; Join in a single token to simplify removal of possible multiline
-    ;; preprocessor directives
-    (indinit                   c-continuation)
-    (indreduce :continuation
-       t
-       ((:continuation :end-of-line))
-       (setq c-continuation t)
-    )
-
-    (indreduce :eol
-       t
-       ((:end-of-line))
-       ;; Anything after the eol offset is safe to parse now
-       (setq c-continuation nil)
-    )
-
-    ;; Delete blank lines
-    (indreduce nil
-       t
-       ((:indent :eol))
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Preprocessor
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indreduce nil
-       (>= *ind-offset* *ind-start*)
-       ((:indent :hash))
-       (setq *indent* 0)
-       (indent-macro-reject-left)
-    )
-    (indreduce nil
-       t
-       ((:indent :hash nil :eol))
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Expressions
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indreduce :expression
-       t
-       ;; Reduce to a single expression
-       ((:expression :parens)
-        (:expression :bracks)
-        (:expression :expression)
-       ;; These may be multiline
-        (:ostring (not :ostring) :cstring)
-        (:oconstant (not :oconstant) :cconstant)
-       )
-    )
-
-    (indreduce :expression
-       t
-       ((:expression :eol :indent :expression)
-        (:expression :eol :expression)
-       )
-    )
-
-    (indreduce :exp-comma
-       t
-       ((:expression :comma)
-       )
-    )
-
-    ;; A semicollon, start a statement
-    (indreduce :stat
-       t
-       ((:semi))
-    )
-
-    ;; Expression following (possibly empty) statement
-    (indreduce :stat
-       t
-       (((or :expression :exp-comma) :stat))
-    )
-
-    ;; Multiline statements
-    (indreduce :stat
-       t
-       (((or :expression :exp-comma) :eol :indent :stat)
-        ;; rule below may have removed the :indent
-        ((or :expression :exp-comma) :eol :stat)
-       )
-    )
-
-    (indinit   c-exp-indent)
-    ;; XXX This rule avoids parsing large amounts of code
-    (indreduce :stat
-       t
-       ;; Eat eol if following expression
-       ((:indent :stat :eol)
-        (:indent :stat)
-       )
-       (if
-           (or
-               (null c-exp-indent)
-               (/= (cdar c-exp-indent) (+ *ind-offset* *ind-length*))
-           )
-           ;; A new statement, i.e. not just joining a multiline one
-           (push
-               (cons
-                   (offset-indentation *ind-offset* :resolve t)
-                   (+ *ind-offset* *ind-length*)
-               )
-               c-exp-indent
-           )
-           ;; Update start of statement
-           (rplaca
-               (car c-exp-indent)
-               (offset-indentation *ind-offset* :resolve t)
-           )
-       )
-       (when (consp (cdr c-exp-indent))
-           (if (and
-                   (zerop c-complex)
-                   (zerop c-cases)
-                   (zerop c-bra)
-                   (= (caar c-exp-indent) (caadr c-exp-indent))
-               )
-               ;; Two statements with the same indentation
-               (progn
-                   (setq *indent* (caar c-exp-indent))
-                   (indent-macro-reject-left)
-               )
-               ;; Different indentation or complex state
-               (progn
-                   (rplacd c-exp-indent nil)
-                   (setq c-complex 0)
-               )
-           )
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Handle braces
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indreduce :stat
-       ;; If block finishes before current line, group as a statement
-       (< (+ *ind-offset* *ind-length*) *ind-start*)
-       ((:obrace (not :obrace) :cbrace))
-    )
-    (indreduce :obrace
-       ;; If not in the first line
-       (< *ind-offset* *ind-start*)
-       ;; If the opening { is the first non blank char in the line
-       ((:indent :obrace))
-       (setq *indent* (offset-indentation (+ *ind-offset* *ind-length*)))
-
-       ;; XXX This may be the starting brace of a switch
-       (setq c-case-flag nil)
-       (indent-macro-reject-left)
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Labels
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; XXX this frequently doesn't do what is expected, should redefine
-    ;; some rules, as it frequently will dedent while typing something
-    ;; like  test ? exp1 : exp2
-    ;;                   ^ dedents here because it reduces everything
-    ;;                    before ':' to a single :expression token.
-    (indreduce :label
-       t
-       ((:indent :expression :collon :eol))
-       (when (and *label-dedent* (>= *ind-offset* *ind-start*))
-           (setq
-               *indent*
-               (- (offset-indentation *ind-offset* :resolve t) *base-indent*)
-           )
-           (indent-macro-reject-left)
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Handle if
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indreduce :if
-       t
-       ((:c-if :parens)
-       )
-       (incf c-complex)
-    )
-
-    (indreduce :else
-       t
-       ((:c-else))
-       (incf c-complex)
-    )
-
-    ;; Join
-    (indreduce :else-if
-       t
-       ((:else :if)
-        (:else :eol :indent :if)
-       )
-       (incf c-complex)
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Handle for
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Join with the parentheses
-    (indreduce :for
-       t
-       ((:c-for :parens)
-       )
-       (incf c-complex)
-    )
-    ;; Before current line, simplify
-    (indreduce :stat
-       (< (+ *ind-offset* *ind-length*) *ind-point*)
-       ((:for :stat)
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Handle while and do
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indreduce :while
-       t
-       ((:c-while :parens)
-       )
-       (incf c-complex)
-    )
-    (indreduce :stat
-       t
-       ((:do :stat :while)
-        (:while :stat)
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Handle switch
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indinit                   c-case-flag)
-
-    (indreduce :switch
-       t
-       ((:c-switch :parens)
-       )
-    )
-    ;; Transform in a statement
-    (indreduce :stat
-       (< (+ *ind-offset* *ind-length*) *ind-start*)
-       ((:switch :stat)
-        ;; Do it now or some rule may stop parsing, and calculate
-        ;; a wrong indentation for nested switches
-        (:switch :eol :indent :stat)
-       )
-    )
-    ;; An open switch
-    (indreduce :obrace
-       (and
-           (<= c-braces 0)
-           (> *ind-start* *ind-offset*)
-       )
-       ((:indent :switch :obrace)
-       )
-       (setq
-           *indent* (offset-indentation *ind-offset* :resolve t)
-           c-case-flag nil
-       )
-       (indent-macro-reject-left)
-    )
-    (indreduce :obrace
-       (and
-           (<= c-braces 0)
-           (> *ind-start* *ind-offset*)
-       )
-       ((:indent :switch :eol :indent :obrace)
-       )
-       (setq
-           *indent* (- (offset-indentation *ind-offset* :resolve t) *base-indent*)
-           c-case-flag nil
-       )
-       (and *brace-indent* (incf *indent* *base-indent*))
-       (indent-macro-reject-left)
-    )
-    ;; Before current line
-    (indreduce :case
-       (and
-           (or
-               (not *case-indent*)
-               (prog1 c-case-flag (setq c-case-flag t))
-           )
-           (<= c-braces 0)
-           (< *ind-offset* *ind-start*)
-       )
-       ((:indent :case)
-       )
-       (setq
-           *indent* (offset-indentation *ind-offset* :resolve t)
-           c-case-flag nil
-       )
-       (indent-macro-reject-left)
-    )
-    (indreduce :case
-       t
-       ((:c-case :expression :collon)
-        (:c-default :collon)
-        ;; Assume that it is yet being edited, or adjusting indentation
-        (:c-case)
-        (:c-default)
-       )
-       (and (>= *ind-offset* *ind-start*)
-           (incf c-cases)
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Handle parentheses and brackets
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Reduce matches
-    (indreduce :parens
-       t
-       ((:oparen (not :oparen) :cparen))
-       (when
-           (and
-               (< *ind-offset* *ind-start*)
-               (> (+ *ind-offset* *ind-length*) *ind-start*)
-           )
-           (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
-           (indent-macro-reject-left)
-       )
-    )
-    (indreduce :bracks
-       t
-       ((:obrack (not :obrack) :cbrack))
-       (when
-           (and
-               (< *ind-offset* *ind-start*)
-               (> (+ *ind-offset* *ind-length*) *ind-start*)
-           )
-           (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
-           (indent-macro-reject-left)
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Assuming previous lines have correct indentation, this allows
-    ;; resolving the indentation fastly
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Line ended with an open brace
-    (indreduce :obrace
-       (< *ind-offset* *ind-start*)
-       ((:indent (or :for :while :if :else-if :else :do) :obrace)
-       )
-       (setq *indent* (offset-indentation *ind-offset* :resolve t))
-       (indent-macro-reject-left)
-    )
-    ;; Adjust indentation level if current line starts with an open brace
-    (indreduce nil
-       (< *ind-offset* *ind-start* (+ *ind-offset* *ind-length*))
-        ;; Just set initial indentation
-       ((:indent (or :for :while :if :else-if :else :do) :eol :indent :obrace)
-       )
-       (setq
-           *indent*
-           (- (offset-indentation *ind-offset* :resolve t) *base-indent*)
-       )
-       (and *brace-indent* (incf *indent* *base-indent*))
-       (indent-macro-reject-left)
-    )
-    ;; Previous rule failed, current line does not start with an open brace
-    (indreduce :flow
-       ;; first statement is in current line
-       (and
-           (<= c-braces 0)
-           (> (+ *ind-offset* *ind-length*) *ind-start* *ind-offset*)
-       )
-       ((:indent (or :for :while :if :else-if :else :do) :eol :indent)
-       )
-       (setq *indent* (offset-indentation *ind-offset* :resolve t))
-       (indent-macro-reject-left)
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Simplify, remove old (:eol :indent)
-    ;; This must be the last rule, to avoid not matching the
-    ;; rules for fast calculation of indentation above
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indreduce nil
-       (> *ind-offset* c-prev-offset)
-       ((:eol :indent))
-    )
-
-
-    (indinit                   (c-flow 0))
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; If
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indinit                   c-if-flow)
-    (indresolve :if
-       (and (< *ind-offset* *ind-start*)
-           (push c-flow c-if-flow)
-           (incf *indent* *base-indent*)
-           (incf c-flow)
-       )
-    )
-    (indresolve (:else-if :else)
-       (when c-if-flow
-           (while (< c-flow (car c-if-flow))
-               (incf *indent* *base-indent*)
-               (incf c-flow)
-           )
-           (or (eq *ind-token* :else-if) (pop c-if-flow))
-       )
-       (and (< *ind-offset* *ind-start*)
-           (incf *indent* *base-indent*)
-           (incf c-flow)
-       )
-    )
-
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; For/while/do
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indinit                   c-do-flow)
-    (indresolve (:for :while :do)
-       (if (eq *ind-token* :do)
-           (and (< *ind-offset* *ind-start*) (push c-flow c-do-flow))
-           (when (and c-do-flow (eq *ind-token* :while))
-               (while (< c-flow (car c-do-flow))
-                   (incf *indent* *base-indent*)
-                   (incf c-flow)
-               )
-               (pop c-do-flow)
-           )
-       )
-       (and (< *ind-offset* *ind-start*)
-           (incf *indent* *base-indent*)
-           (incf c-flow)
-       )
-    )
-
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Switch
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indresolve :switch
-       (setq c-case-flag nil)
-    )
-    (indresolve (:case :c-case)
-       (if (< *ind-offset* *ind-start*)
-           (or c-case-flag
-               (setq
-                   *indent*
-                   (+ (offset-indentation *ind-offset* :resolve t)
-                       *base-indent*
-                   )
-               )
-           )
-           (if c-case-flag
-               (and (= (decf c-cases) 0)
-                   (decf *indent* *base-indent*)
-               )
-               (or *case-indent*
-                   (decf *indent* *base-indent*)
-               )
-           )
-       )
-       (setq c-case-flag t)
-    )
-
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Braces/flow control
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indresolve :flow
-       (incf *indent* *base-indent*)
-    )
-    (indresolve :obrace
-       (and (< *ind-offset* *ind-start*)
-           (incf *indent* *base-indent*)
-       )
-    )
-    (indresolve :cbrace
-       (decf *indent* *base-indent*)
-       (and *case-indent* c-case-flag
-           (decf *indent* *base-indent*)
-           (setq c-case-flag nil)
-       )
-       (and (not *offset*) (>= *ind-offset* *ind-start*)
-           (setq *offset* *ind-offset*)
-       )
-    )
-
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Statements
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indresolve :stat
-       (when (< *ind-offset* *ind-start*)
-           (while (> c-flow 0)
-               (setq
-                   *indent*    (- *indent* *base-indent*)
-                   c-flow      (1- c-flow)
-               )
-           )
-       )
-       (and
-           *cont-indent*
-           (< *ind-offset* *ind-start*)
-           (> (+ *ind-offset* *ind-length*) *ind-start*)
-           (incf *indent* *base-indent*)
-       )
-    )
-
-    (indresolve :expression
-       (and
-           *cont-indent*
-           (zerop c-bra)
-           (> *indent* 0)
-           (< *ind-offset* *ind-start*)
-           (> (+ *ind-offset* *ind-length*) *ind-start*)
-           (incf *indent* *base-indent*)
-       )
-    )
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Open
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (indresolve (:oparen :obrack)
-       (and (< *ind-offset* *ind-start*)
-           (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
-       )
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Find a "good" offset to start parsing backwards, so that it should
-;; always generate the same results.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun c-offset-indent (&aux char (point (point)))
-    ;; Skip spaces forward
-    (while (member (setq char (char-after point)) indent-spaces)
-       (incf point)
-    )
-    (or (characterp char) (return-from c-offset-indent point))
-
-    ;; Skip word chars
-    (when (alphanumericp char)
-       (while (and (setq char (char-after point)) (alphanumericp char))
-           (incf point)
-       )
-       (or (characterp char) (return-from c-offset-indent point))
-
-       ;; Skip spaces forward
-       (while (member (setq char (char-after point)) indent-spaces)
-           (incf point)
-       )
-       (or (characterp char) (return-from c-offset-indent point))
-    )
-
-    ;; don't include " or ' to avoid parsing strings "inverted"
-    (if (member char '(#\Newline #\" #\')) point (1+ point))
-)
-(compile 'c-offset-indent)
-
-(defun c-should-indent (options)
-    (when (hash-table-p options)
-       ;; check if previous line has extra spaces
-       (and (gethash :trim-blank-lines options)
-           (indent-clear-empty-line)
-       )
-
-       ;; indentation disabled?
-       (and (gethash :disable-indent options)
-           (return-from c-should-indent)
-       )
-
-       (let*
-           (
-           (point (point))
-           (start (scan point :eol :left))
-           (char (char-before point))
-           offset
-           match
-           text
-           )
-
-           ;; at the start of an empty file
-           (or (characterp char)
-               (return-from c-should-indent)
-           )
-
-           ;; if at bol and should indent only when starting a line
-           (and (gethash :only-newline-indent options)
-               (return-from c-should-indent (= point start))
-           )
-
-           (and
-               (char= char #\;)
-               (gethash :newline-after-semi options)
-               (return-from c-should-indent t)
-           )
-
-           ;; if one of these was typed, must check indentation
-           (and (member char '(#\{ #\} #\: #\] #\) #\#))
-               (return-from c-should-indent t)
-           )
-
-           ;; at the start of a line
-           (and (= point start)
-               (return-from c-should-indent (gethash :newline-indent options))
-           )
-
-           ;; if first character
-           (and (= point (1+ start))
-               (return-from c-should-indent t)
-           )
-
-           ;; check if is the first non-blank character in a new line
-           (when
-               (and
-                   (gethash :cont-indent options)
-                   (= point (scan point :eol :right))
-                   (alphanumericp char)
-               )
-               (setq offset (1- point))
-               (while
-                   (and
-                       (> offset start)
-                       (member (char-before offset) indent-spaces)
-                   )
-                   (decf offset)
-               )
-               ;; line has only one character with possible spaces before it
-               (and (<= offset start)
-                   (return-from c-should-indent t)
-               )
-           )
-
-           ;; check for keywords that change indentation
-           (when (alphanumericp char)
-               (setq offset (1- point))
-               (while
-                   (and
-                       (alphanumericp (char-before offset))
-                       (> offset start)
-                   )
-                   (decf offset)
-               )
-               (setq
-                   text        (read-text offset (- point offset))
-                   match       (re-exec #.(re-comp "(case|else|while)\\w?\\>")
-                                   text)
-               )
-               (and
-                   (consp match)
-                   (return-from c-should-indent (<= (- (caar match) offset) 2))
-               )
-           )
-       )
-    )
-    ;; Should not indent
-    nil
-)
-(compile 'c-should-indent)
-
-
-(defun c-indent-check (syntax syntable options
-                      &aux start point char left brace change)
-    (setq
-       point   (point)
-       char    (char-before point)
-       left    point
-       brace   (member char '(#\{ #\}))
-    )
-
-    (when
-       (and brace (gethash :newline-before-brace options))
-       (setq start (scan point :eol :left))
-       (while
-           (and
-               (> (decf left) start)
-               (member (char-before left) indent-spaces)
-           )
-           ;; skip blanks
-       )
-       (when (> left start)
-           (replace-text left left (string #\Newline))
-           (c-indent syntax syntable)
-           (setq change t)
-       )
-    )
-
-    (when
-       (or
-           (and brace (not change) (gethash :newline-after-brace options))
-           (and (char= char #\;) (gethash :newline-after-semi options))
-       )
-       (setq left (point))
-       (replace-text left left (string #\Newline))
-       (goto-char (1+ left))
-       (c-indent syntax syntable)
-    )
-)
-
-(defun c-indent (syntax syntable)
-    (let*
-       (
-       (options (syntax-options syntax))
-       *base-indent*
-       *brace-indent*
-       *case-indent*
-       *label-dedent*
-       *cont-indent*
-       )
-
-       (or (c-should-indent options) (return-from c-indent))
-
-       (setq
-           *base-indent*       (gethash :indentation options 4)
-           *brace-indent*      (gethash :brace-indent options nil)
-           *case-indent*       (gethash :case-indent options t)
-           *label-dedent*      (gethash :label-dedent options t)
-           *cont-indent*       (gethash :cont-indent options t)
-       )
-
-       (indent-macro
-           *c-mode-indent*
-           (c-offset-indent)
-           (gethash :emulate-tabs options)
-       )
-
-       (c-indent-check syntax syntable options)
-    )
-)
-(compile 'c-indent)
-
-(defsyntax *c-mode* :main nil #'c-indent *c-mode-options*
-    ;;  All recognized C keywords.
-    (syntoken
-       (string-concat
-           "\\<("
-           "asm|auto|break|case|catch|char|class|const|continue|default|"
-           "delete|do|double|else|enum|extern|float|for|friend|goto|if|"
-           "inline|int|long|new|operator|private|protected|public|register|"
-           "return|short|signed|sizeof|static|struct|switch|template|this|"
-           "throw|try|typedef|union|unsigned|virtual|void|volatile|while"
-           ")\\>")
-       :property *prop-keyword*)
-
-    ;; Numbers, this is optional, comment this rule if xedit is
-    ;; too slow to load c files.
-    (syntoken
-       (string-concat
-           "\\<("
-           ;; Integers
-           "(\\d+|0x\\x+)(u|ul|ull|l|ll|lu|llu)?|"
-           ;; Floats
-           "\\d+\\.?\\d*(e[+-]?\\d+)?[lf]?"
-           ")\\>")
-       :icase t
-       :property *prop-number*
-    )
-
-    ;; String start rule.
-    (syntoken "\"" :nospec t :begin :string :contained t)
-
-    ;; Character start rule.
-    (syntoken "'" :nospec t :begin :character :contained t)
-
-    ;; Preprocessor start rule.
-    (syntoken "^\\s*#\\s*\\w+" :begin :preprocessor :contained t)
-
-    ;; Comment start rule.
-    (syntoken "/*" :nospec t :begin :comment :contained t)
-
-    ;; C++ style comments.
-    (syntoken "//.*" :property *prop-comment*)
-
-    ;; Punctuation, this is also optional, comment this rule if xedit is
-    ;; too slow to load c files.
-    (syntoken "[][(){}/*+:;=<>,&.!%|^~?-][][(){}*+:;=<>,&.!%|^~?-]?"
-       :property *prop-punctuation*)
-
-
-    ;; Rules for comments.
-    (syntable :comment *prop-comment* #'default-indent
-       ;; Match nested comments as an error.
-       (syntoken "/*" :nospec t :property *prop-error*)
-
-       (syntoken "XXX|TODO|FIXME" :property *prop-annotation*)
-
-       ;;  Rule to finish a comment.
-       (syntoken "*/" :nospec t :switch -1)
-    )
-
-    ;; Rules for strings.
-    (syntable :string *prop-string* #'default-indent
-       ;; Ignore escaped characters, this includes \".
-       (syntoken "\\\\.")
-
-       ;; Match, most, printf arguments.
-       (syntoken "%%|%([+-]?\\d+)?(l?[deEfgiouxX]|[cdeEfgiopsuxX])"
-           :property *prop-format*)
-
-       ;; Ignore continuation in the next line.
-       (syntoken "\\\\$")
-
-       ;; Rule to finish a string.
-       (syntoken "\"" :nospec t :switch -1)
-
-       ;; Don't allow strings continuing in the next line.
-       (syntoken ".?$" :begin :error)
-    )
-
-    ;; Rules for characters.
-    (syntable :character *prop-constant* nil
-       ;; Ignore escaped characters, this includes \'.
-       (syntoken "\\\\.")
-
-       ;; Ignore continuation in the next line.
-       (syntoken "\\\\$")
-
-       ;; Rule to finish a character constant.
-       (syntoken "'" :nospec t :switch -1)
-
-       ;; Don't allow constants continuing in the next line.
-       (syntoken ".?$" :begin :error)
-    )
-
-    ;;  Rules for preprocessor.
-    (syntable :preprocessor *prop-preprocessor* #'default-indent
-       ;;  Preprocessor includes comments.
-       (syntoken "/*" :nospec t :begin :comment :contained t)
-
-       ;;  Ignore strings and constants in the same line and finishes table
-       ;; This is kind hackish, but must be done because the current parser
-       ;; will not flag eol. Maybe it could be extended to properly handle
-       ;; and have an internal flag to tell it to pass again if there
-       ;; is a regex that can match eol on an empty string.
-       ;;  A test is already done (but at compile time) to not allow patterns
-       ;; that match an empty string (but allow patterns matching
-       ;; bol, eol or both on an empty string).
-       (syntoken "\"([^\\\"]|\\\\.)*\"$" :property *prop-string* :switch -1)
-       (syntoken "'([^']|\\\\.)*'$" :property *prop-constant* :switch -1)
-
-       ;;  Ignore strings and constants in the same line
-       (syntoken "\"([^\\\"]|\\\\.)*\"" :property *prop-string*)
-       (syntoken "'([^']|\\\\.)*'" :property *prop-constant*)
-
-       ;;  Ignore lines finishing with a backslash.
-       (syntoken "\\\\$")
-
-       ;; multiline strings
-       (syntoken "\"" :nospec t :begin :string)
-
-       ;; multiline constants
-       (syntoken "'" :nospec t :begin :character)
-
-       ;;  C++ style comments
-       (syntoken "//.*$" :property *prop-comment* :switch -1)
-
-       ;; Return to previous state if end of line found.
-       (syntoken ".?$" :switch -1)
-    )
-
-    (syntable :error *prop-error* nil
-       (syntoken "^.*$" :switch -2)
-    )
-
-    ;;  You may also want to comment this rule if the parsing is
-    ;; noticeably slow.
-    (syntoken "\\c" :property *prop-control*)
-)
diff --git a/xedit/lisp/modules/progmodes/html.lsp b/xedit/lisp/modules/progmodes/html.lsp
deleted file mode 100644 (file)
index 562739e..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/html.lsp,v 1.2 2002/09/22 18:41:27 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-#|
-  This is not a validation tool for html.
-
-  It is possible to, using macros generate all combinations of text attributes,
-  to properly handle <b>...<i>...</i>...</b> etc, as well as generating macros
-  to automatically closing tags, but for now this file was built to work as an
-  experience with the syntax highlight code.
-|#
-
-(defsynprop *prop-html-default*
-    "default"
-    :font      "-*-lucida-medium-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Gray10")
-
-(defsynprop *prop-html-bold*
-    "bold"
-    :font      "-*-lucida-bold-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Gray15")
-
-(defsynprop *prop-html-italic*
-    "italic"
-    :font      "-*-lucida-medium-i-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Gray10")
-
-(defsynprop *prop-html-pre*
-    "pre"
-    :font      "-*-courier-medium-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Gray10")
-
-(defsynprop *prop-html-link*
-    "link"
-    :font      "-*-lucida-medium-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Blue"
-    :underline "t")
-
-(defsynprop *prop-html-small*
-    "small"
-    :font      "-*-lucida-medium-r-*-*-10-*-*-*-*-*-*-1"
-    :foreground        "Gray10")
-
-(defsynprop *prop-html-big*
-    "big"
-    :font      "-*-lucida-medium-r-*-*-20-*-*-*-*-*-*-1"
-    :foreground        "Gray15")
-
-(defsynprop *prop-html-name*
-    "name"
-    :font      "-*-lucida-bold-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Black"
-    :background "rgb:e/f/e")
-
-(defsynprop *prop-html-h1*
-    "h1"
-    :font      "-*-lucida-bold-r-*-*-20-*-*-*-*-*-*-1"
-    :foreground        "Gray15")
-
-(defsynprop *prop-html-h2*
-    "h2"
-    :font      "-*-lucida-bold-r-*-*-17-*-*-*-*-*-*-1"
-    :foreground        "Gray15")
-
-(defsynprop *prop-html-h4*
-    "h4"
-    :font      "-*-lucida-bold-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Gray15")
-
-(defsynprop *prop-html-h5*
-    "h5"
-    :font      "-*-lucida-bold-r-*-*-10-*-*-*-*-*-*-1"
-    :foreground        "Gray15")
-
-(defsynprop *prop-html-li*
-    "li"
-    :font      "-*-lucida-bold-r-*-*-8-*-*-*-*-*-*-1"
-    :foreground        "rgb:0/5/0"
-    :underline t)
-
-(defsynprop *prop-html-hr*
-    "hr"
-    :font      "-*-courier-bold-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "rgb:0/5/0"
-    :overstrike        t)
-
-(defsynprop *prop-html-title*
-    "title"
-    :font      "-*-lucida-medium-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "Red3"
-    :underline "t")
-
-(defsynprop *prop-html-tag*
-    "tag"
-    :font      "-*-courier-medium-r-*-*-10-*-*-*-*-*-*-1"
-    :foreground        "green4")
-
-(defsynprop *prop-html-string*
-    "string"
-    :font      "-*-lucida-medium-r-*-*-10-*-*-*-*-*-*-1"
-    :foreground        "RoyalBlue2")
-
-(defsynprop *prop-html-comment*
-    "comment"
-    :font      "-*-courier-medium-o-*-*-10-*-*-*-*-*-*-1"
-    :foreground        "SlateBlue3")
-
-(defsynprop *prop-html-entity*
-    "entity"
-    :font      "-*-lucida-medium-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Red4")
-
-(defsynprop *prop-html-unknown*
-    "unknown"
-    :font      "-*-courier-bold-r-*-*-10-*-*-*-*-*-*-1"
-    :foreground        "yellow"
-    :background "red")
-
-(defmacro html-syntoken (name)
-    `(syntoken (string-concat "<" ,name "\\>")
-       :icase t :contained t
-       :begin (intern (string-concat ,name "$") 'keyword)))
-(defmacro html-syntable (name property)
-    `(let
-       ((label (intern (string-concat ,name "$") 'keyword))
-        (nested-label (intern (string (gensym)) 'keyword)))
-       (syntable label *prop-html-tag* nil
-           (synaugment :generic-tag)
-           (syntoken ">" :nospec t :property *prop-html-tag* :begin nested-label)
-           (syntable nested-label ,property nil
-               (syntoken (string-concat "</" ,name ">")
-                   :icase t :nospec t :property *prop-html-tag* :switch -2)
-               (syntoken (string-concat "</" ,name "\\s*$")
-                   :icase t :contained t :begin :continued-end-tag)
-               (synaugment :main)))))
-
-
-(defsyntax *html-mode* :main *prop-html-default* nil nil
-    (syntoken "<!--" :nospec t :contained t :begin :comment)
-    (syntable :comment *prop-html-comment* nil
-       (syntoken "-->" :nospec t :switch -1))
-    (syntoken "&([a-zA-Z0-9_.-]+|#\\x\\x?);?" :property *prop-html-entity*)
-    (syntoken "<li>" :nospec t :icase t :property *prop-html-li*)
-    (syntoken "<hr>" :nospec t :icase t :property *prop-html-hr*)
-
-    (syntoken "<img\\>" :icase t :contained t :begin :tag)
-    (syntoken "<(p|br)>" :icase t :property *prop-html-tag*)
-
-    ;; If in the toplevel, unbalanced!
-    ;; XXX When adding new nested tables, don't forget to update this pattern.
-    (syntoken
-       (string-concat
-           "</("
-           "b|strong|i|em|address|pre|code|tt|small|big|a|span|div|"
-           "h1|h2|h3|h4|h5|title|font|ol|ul|dl|dt|dd|menu"
-           ")\\>")
-       :icase t :property *prop-html-unknown* :begin :unbalanced)
-    (syntable :unbalanced *prop-html-unknown* nil
-       (syntoken ">" :nospec t :switch :main)
-       (synaugment :generic-tag)
-    )
-
-    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-    ;; XXX ONLY add a rule for "html", "head" and "body" if you want to do a
-    ;; more complete check for common errors. If you add those rules, it will
-    ;; reparse the entire file at every character typed (unless there are
-    ;; errors in which case the parser resets the state).
-    ;; For visualization only that would be OK...
-    ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#
-
-    (html-syntoken "b")
-    (html-syntable "b" *prop-html-bold*)
-    (html-syntoken "strong")
-    (html-syntable "strong" *prop-html-bold*)
-
-    (html-syntoken "i")
-    (html-syntable "i" *prop-html-italic*)
-    (html-syntoken "em")
-    (html-syntable "em" *prop-html-italic*)
-    (html-syntoken "address")
-    (html-syntable "address" *prop-html-italic*)
-
-    (html-syntoken "pre")
-    (html-syntable "pre" *prop-html-pre*)
-    (html-syntoken "code")
-    (html-syntable "code" *prop-html-pre*)
-    (html-syntoken "tt")
-    (html-syntable "tt" *prop-html-pre*)
-
-    (html-syntoken "small")
-    (html-syntable "small" *prop-html-small*)
-
-    (html-syntoken "big")
-    (html-syntable "big" *prop-html-big*)
-
-    ;; Cannot hack html-syntoken and html-syntable to handle this,
-    ;; as the option to <a may be in the next line.
-    (syntoken "<a\\>" :icase t :contained t :begin :a)
-    (syntable :a *prop-html-tag* nil
-       ;; Tag is open
-       (syntoken "\\<href\\>" :icase t :begin :a-href)
-       (syntoken "\\<name\\>" :icase t :begin :a-name)
-       (syntoken "<" :nospec t :property *prop-html-unknown* :switch -2)
-       (synaugment :generic-tag)
-       (syntoken ">" :nospec t :begin :a-generic-text)
-       (syntable :a-href *prop-html-tag* nil
-           (syntoken ">" :nospec t :begin :a-href-text)
-           (synaugment :generic-tag)
-           (syntable :a-href-text *prop-html-link* nil
-               (syntoken "</a>"
-                   :icase t :nospec t :property *prop-html-tag* :switch -3)
-               (syntoken "</a\\s*$" :icase t :begin :continued-nested-end-tag)
-               (synaugment :main)
-           )
-       )
-       (syntable :a-name *prop-html-tag* nil
-           (syntoken ">" :nospec t :begin :a-name-text)
-           (synaugment :generic-tag)
-           (syntable :a-name-text *prop-html-name* nil
-               (syntoken "</a>"
-                   :icase t :nospec t :property *prop-html-tag* :switch -3)
-               (syntoken "</a\\s*$" :icase t :begin :continued-nested-end-tag)
-               (synaugment :main)
-           )
-       )
-       (syntable :a-generic-text nil nil
-           (syntoken "</a>"
-               :icase t :nospec t :property *prop-html-tag* :switch -2)
-           (syntoken "<a/\\s$" :icase t :begin :continued-end-tag)
-           (synaugment :main)
-       )
-    )
-
-    ;; Do nothing, just check start/end tags
-    (html-syntoken "ol")
-    (html-syntable "ol" nil)
-    (html-syntoken "ul")
-    (html-syntable "ul" nil)
-    (html-syntoken "dl")
-    (html-syntable "dl" nil)
-    ;; Maybe <dt> and <dd> should be in a special table, to not require
-    ;; and ending tag.
-    ;; XXX Maybe should also add a table for <p>.
-    (html-syntoken "dt")
-    (html-syntable "dt" nil)
-    (html-syntoken "dd")
-    (html-syntable "dd" nil)
-
-    (html-syntoken "span")
-    (html-syntable "span" nil)
-    (html-syntoken "div")
-    (html-syntable "div" nil)
-    (html-syntoken "menu")
-    (html-syntable "menu" nil)
-
-    (html-syntoken "h1")
-    (html-syntable "h1" *prop-html-h1*)
-    (html-syntoken "h2")
-    (html-syntable "h2" *prop-html-h2*)
-    (html-syntoken "h3")
-    (html-syntable "h3" *prop-html-bold*)
-    (html-syntoken "h4")
-    (html-syntable "h4" *prop-html-h4*)
-    (html-syntoken "h5")
-    (html-syntable "h5" *prop-html-h5*)
-    (html-syntoken "title")
-    (html-syntable "title" *prop-html-title*)
-
-    (html-syntoken "font")
-    (html-syntable "font" *prop-control*)
-
-    (syntoken "<" :nospec t :contained t :begin :tag)
-    (syntable :generic-tag *prop-html-tag* nil
-       (syntoken "\"" :nospec t :contained t :begin :string)
-       (syntoken "<" :nospec t :property *prop-html-unknown*)
-    )
-    (syntable :tag *prop-html-tag* nil
-       (syntoken ">" :nospec t :switch -1)
-       (synaugment :generic-tag)
-    )
-       ;; Tag ended in a newline, common practice...
-    (syntable :continued-end-tag *prop-html-tag* nil
-       (syntoken ">" :nospec t :switch -3)
-       (synaugment :generic-tag)
-    )
-    (syntable :continued-nested-end-tag *prop-html-tag* nil
-       (syntoken ">" :nospec t :switch -4)
-       (synaugment :generic-tag)
-    )
-
-    (syntable :string *prop-html-string* nil
-       (syntoken "\\\\.")
-       (syntoken "\"" :nospec t :switch -1)
-    )
-)
diff --git a/xedit/lisp/modules/progmodes/imake.lsp b/xedit/lisp/modules/progmodes/imake.lsp
deleted file mode 100644 (file)
index c34860d..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/imake.lsp,v 1.2 2002/10/06 17:11:48 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-(defsynprop *prop-shell*
-    "shell"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "Red4"
-)
-
-(defsynprop *prop-variable*
-    "variable"
-    :font      "*courier-medium-r*-12-*"
-    :foreground        "Red3"
-)
-
-;;  The syntax-highlight definition does not try to flag errors, just show
-;; tabs in the start of lines for better visualization.
-(defsynprop *prop-tabulation*
-    "tabulation"
-    :font      "*courier-medium-r*-12-*"
-    :background        "Gray90"
-)
-
-(defsynprop *prop-xcomm*
-    "xcomm"
-    :font      "*courier-medium-o*-12-*"
-    :foreground        "SkyBlue4"
-)
-
-
-(defsyntax *imake-mode* :main nil nil nil
-    (syntoken "^\\s*XCOMM\\W?.*$"
-       :property *prop-xcomm*)
-
-    (syntoken "^\\t+"
-       :property *prop-tabulation*)
-
-    (syntoken "$("
-       :nospec t
-       :begin :shell
-       :property *prop-shell*)
-
-    (syntoken "[][(){};$<=>&@/\\,.:~!|*?'`+-]"
-       :property *prop-shell*)
-
-    ;;  Preprocessor start rule.
-    (syntoken "^\\s*#\\s*\\w+"
-       :begin :preprocessor
-       :contained t)
-
-    ;;  Comment start rule.
-    (syntoken "/*"
-       :nospec t
-       :begin :comment
-       :contained t)
-
-    ;;  String start rule.
-    (syntoken "\""
-       :begin :string
-       :nospec t
-       :contained t)
-
-    ;;  Quoted string start rule.
-    (syntoken "\\\""
-       :begin :quoted-string
-       :nospec t
-       :contained t)
-
-    (syntable :shell *prop-variable* nil
-       (syntoken ")"
-           :nospec t
-           :property *prop-shell*
-           :switch -1)
-    )
-
-    ;;  Rules for comments.
-    (syntable :comment *prop-comment* nil
-
-       ;;  Match nested comments as an error.
-       (syntoken "/*"
-           :nospec t
-           :property *prop-error*)
-
-       (syntoken "XXX|TODO|FIXME"
-           :property *prop-annotation*)
-
-       ;;  Rule to finish a comment.
-       (syntoken "*/"
-           :nospec t
-           :switch -1)
-    )
-
-    ;;  Rules for preprocessor.
-    (syntable :preprocessor *prop-preprocessor* nil
-
-       ;;  Preprocessor includes comments.
-       (syntoken "/*"
-           :nospec t
-           :begin :comment
-           :contained t)
-
-       ;;  Visualization help, show tabs in the start of lines.
-       (syntoken "^\\t+"
-           :property *prop-tabulation*)
-
-       ;;  Ignore lines finishing with a backslash.
-       (syntoken "\\\\$")
-
-       ;;  Return to previous state if end of line found.
-       (syntoken ".?$"
-           :switch -1)
-    )
-
-    ;;  Rules for strings.
-    (syntable :string *prop-string* nil
-
-       ;;  Ignore escaped characters, this includes \".
-       (syntoken "\\\\.")
-
-       ;;  Ignore continuation in the next line.
-       (syntoken "\\\\$")
-
-       ;;  Rule to finish a string.
-       (syntoken "\""
-           :nospec t
-           :switch -1)
-
-       ;;  Don't allow strings continuing in the next line.
-       (syntoken ".?$"
-           :begin :error)
-    )
-
-    ;;  Rules for quoted strings.
-    (syntable :quoted-string *prop-constant* nil
-
-       ;;  Rule to finish the quoted string.
-       (syntoken "\\\""
-           :nospec t
-           :switch -1)
-
-       ;;  Ignore escaped characters
-       (syntoken "\\\\.")
-
-       ;;  Ignore continuation in the next line.
-       (syntoken "\\\\$")
-
-       ;;  Don't allow strings continuing in the next line.
-       (syntoken ".?$"
-           :begin :error)
-    )
-
-    (syntable :error *prop-error* nil
-       (syntoken "^.*$"
-           :switch -2)
-    )
-)
diff --git a/xedit/lisp/modules/progmodes/lisp.lsp b/xedit/lisp/modules/progmodes/lisp.lsp
deleted file mode 100644 (file)
index 2472b72..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/lisp.lsp,v 1.9 2003/01/30 02:46:26 paulo Exp $
-;;
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-(defsynprop *prop-special*
-  "special"
-  :font                "*courier-bold-r*-12-*"
-  :foreground  "NavyBlue"
-)
-
-(defsynprop *prop-quote*
-  "quote"
-  :font                "*courier-bold-r*-12-*"
-  :foreground  "Red4"
-)
-
-(defsynprop *prop-package*
-  "package"
-  :font                "*lucidatypewriter-medium-r*-12-*"
-  :foreground  "Gold4"
-)
-
-(defsynprop *prop-unreadable*
-  "unreadable"
-  :font                "*courier-medium-r*-12-*"
-  :foreground  "Gray25"
-  :underline   t
-)
-
-(defsynoptions *lisp-DEFAULT-style*
-  ;; Positive number. Basic indentation.
-  (:indentation                        .       2)
-
-  ;; Boolean. Move cursor to the indent column after pressing <Enter>?
-  (:newline-indent             .       t)
-
-  ;; Boolean. Use spaces instead of tabs to fill indentation?
-  (:emulate-tabs               .       nil)
-
-  ;; Boolean. Remove extra spaces from previous line.
-  ;;           This should default to T when newline-indent is not NIL.
-  (:trim-blank-lines           .       t)
-
-  ;; Boolean. If this hash-table entry is set, no indentation is done.
-  ;;           Useful to temporarily disable indentation.
-  (:disable-indent             .       nil)
-)
-
-(defvar *lisp-mode-options* *lisp-DEFAULT-style*)
-
-(defindent *lisp-mode-indent* :main
-  ;; this must be the first token
-  (indtoken "^\\s*"            :indent
-    :code (or *offset* (setq *offset* (+ *ind-offset* *ind-length*))))
-  ;; ignore single line comments
-  (indtoken ";.*$"             nil)
-  ;; multiline comments
-  (indtoken "|#"               :comment        :nospec t       :begin :comment)
-  ;; characters
-  (indtoken "#\\\\(\\W|\\w+(-\\w+)?)"          :character)
-  ;; numbers
-  (indtoken
-    (string-concat
-      "(\\<|[+-])\\d+("
-      ;; integers
-      "(\\>|\\.(\\s|$))|"
-      ;; ratios
-      "/\\d+\\>|"
-      ;;floats
-      "\\.?\\d*([SsFfDdLlEe][+-]?\\d+)?\\>"
-      ")")
-    :number)
-  ;; symbols, with optional package
-  (indtoken
-    (string-concat
-      ;; optional package name and ending ':'
-      "([A-Za-z_0-9%-]+:)?"
-      ;; internal symbol if after package name, or keyword
-      ":?"
-      ;; symbol name
-      "[][{}A-Za-z_0-9!$%&/<=>^~*+-]+")
-    :symbol)
-  ;; strings in the same line
-  (indtoken "\"([^\\\"]|\\\\.)*\""             :string)
-  ;; multiline strings
-  (indtoken "\""               :cstring        :nospec t       :begin :string)
-  ;; "quoted" symbols in the same line
-  (indtoken "\\|([^\\|]|\\\\.)*\\|"            :symbol)
-  ;; multiline
-  (indtoken "|"                        :csymbol        :nospec t       :begin :symbol)
-  (indtoken "#"                        :hash           :nospec t)
-
-  (indinit     (parens 0))
-  (indtoken "("                        :oparen         :nospec t :code (incf parens))
-  (indtoken ")"                        :cparen         :nospec t :code (decf parens))
-
-  (indtable :comment
-    ;; multiline comments can nest
-    (indtoken "|#"             nil             :nospec t       :begin :comment)
-    (indtoken "#|"             nil             :nospec t       :switch -1))
-
-  (indtable :string
-    ;; Ignore escaped characters
-    (indtoken "\\."            nil)
-    ;; Return to the toplevel when the start of the string is found
-    (indtoken "\""             :ostring        :nospec t       :switch -1))
-
-  (indtable :symbol
-    ;; Ignore escaped characters
-    (indtoken "\\."            nil)
-    ;; Return to the toplevel when the start of the symbol is found
-    (indtoken "|"              :osymbol        :nospec t       :switch -1))
-
-  ;; ignore comments
-  (indreduce nil
-    t
-    ((:comment)))
-
-  ;; reduce multiline strings
-  (indreduce :string
-    t
-    ((:ostring (not :ostring) :cstring)))
-
-  ;; reduce multiline symbols
-  (indreduce :symbol
-    t
-    ((:osymbol (not :osymbol) :csymbol)))
-
-  ;; reduce basic types, don't care if inside list or not
-  (indreduce :element
-    t
-    ((:number)
-      (:string)
-      (:character)
-      (:element :element)
-      (:indent :element)))
-
-  (indreduce :symbol
-    t
-    ((:symbol :symbol)
-      (:symbol :element)
-      (:indent :symbol)))
-
-  ;; the "real" indentation value, to make easier parsing code like:
-  ;;  (foo (bar (baz (blah
-  ;;        ^         ^
-  ;;        |         |
-  ;;        indent    |
-  ;;                  effective indentation to be used
-  (indinit     (indent 0))
-
-  ;; indentation values of opening parenthesis.
-  (indinit     stack)
-
-  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-  ;; if before current line and open parenthesis >= 0, use indentation
-  ;; of current line to calculate relative indentation.
-  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-  (indreduce :oparen   ;; simple list?
-    (and (>= parens 0) (< *ind-offset* *ind-start*))
-    ((:indent :oparen))
-    (setq
-      *indent* (offset-indentation (+ *ind-offset* *ind-length*) :resolve t)
-      indent   *indent*)
-    (indent-macro-reject-left))
-
-  ;; reduce list if there isn't indentation change
-  (indreduce :element
-    t
-    ((:oparen (not :oparen) :cparen)))
-
-  (indresolve :oparen
-    (setq
-      *indent*
-      (offset-indentation
-       (+ *ind-offset* *ind-length* -1 *base-indent*) :align t))
-    (push *indent* stack)
-    (incf indent *base-indent*)
-    (if (< *indent* indent) (setq *indent* indent)))
-
-  (indresolve :cparen
-    (decf indent *base-indent*)
-    (setq *indent* (pop stack))
-    (if (null stack)
-      (setq *indent* indent)
-      (setq *indent* (car stack))))
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Find a "good" offset to start parsing backwards, so that it should
-;; always generate the same results.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun lisp-offset-indent (&aux char (point (scan (point) :eol :left)))
-  ;; skip spaces
-  (while (member (setq char (char-after point)) indent-spaces)
-    (incf point))
-  (if (member char '(#\))) (1+ point) point))
-
-(defun lisp-should-indent (options &aux char point start)
-  (when (hash-table-p options)
-    ;; check if previous line has extra spaces
-    (and (gethash :trim-blank-lines options)
-      (indent-clear-empty-line))
-
-    ;; indentation disabled?
-    (and (gethash :disable-indent options)
-      (return-from lisp-should-indent))
-
-    (setq
-      point    (point)
-      char     (char-before (point))
-      start    (scan point :eol :left))
-
-    ;; at the start of a line
-    (and (= point start)
-      (return-from lisp-should-indent (gethash :newline-indent options)))
-
-    ;; if first character
-    (and (= point (1+ start)) (return-from lisp-should-indent t))
-
-    ;; if closing parenthesis and first nonblank char
-    (when (and (characterp char) (char= char #\)))
-      (decf point)
-      (while
-       (and (> point start) (member (char-before point) indent-spaces))
-       (decf point))
-      (return-from lisp-should-indent (<= point start)))
-  )
-  ;; should not indent
-  nil)
-
-(defun lisp-indent (syntax syntable)
-  (let*
-    ((options (syntax-options syntax))
-      *base-indent*)
-
-    (or (lisp-should-indent options) (return-from lisp-indent))
-
-    (setq *base-indent* (gethash :indentation options 2))
-
-    (indent-macro
-      *lisp-mode-indent*
-      (lisp-offset-indent)
-      (gethash :emulate-tabs options))))
-
-(compile 'lisp-indent)
-
-(defsyntax *lisp-mode* :main nil #'lisp-indent *lisp-mode-options*
-  ;; highlight car and parenthesis
-  (syntoken "\\(+\\s*[][{}A-Za-z_0-9!$%&/<=>?^~*:+-]*\\)*"
-    :property *prop-keyword*)
-  (syntoken "\\)+" :property *prop-keyword*)
-
-  ;; nil and t
-  (syntoken "\\<(nil|t)\\>" :icase t :property *prop-special*)
-
-  (syntoken "|" :nospec t :begin :unreadable :contained t)
-
-  ;; keywords
-  (syntoken ":[][{}A-Za-z_0-9!$%&/<=>^~+-]+" :property *prop-constant*)
-
-  ;; special symbol.
-  (syntoken "\\*[][{}A-Za-z_0-9!$%&7=?^~+-]+\\*"
-    :property *prop-special*)
-
-  ;; special identifiers
-  (syntoken "&(aux|key|optional|rest)\\>" :icase t :property *prop-constant*)
-
-  ;; numbers
-  (syntoken
-    ;; since lisp is very liberal in what can be a symbol, this pattern
-    ;; will not always work as expected, since \< and \> will not properly
-    ;; work for all characters that may be in a symbol name
-    (string-concat
-      "(\\<|[+-])\\d+("
-      ;; integers
-      "(\\>|\\.(\\s|$))|"
-      ;; ratios
-      "/\\d+\\>|"
-      ;;floats
-      "\\.?\\d*([SsFfDdLlEe][+-]?\\d+)?\\>"
-      ")")
-    :property *prop-number*)
-
-  ;; characters
-  (syntoken "#\\\\(\\W|\\w+(-\\w+)?)" :property *prop-constant*)
-
-  ;; quotes
-  (syntoken "[`'.]|,@?" :property *prop-quote*)
-
-  ;; package names
-  (syntoken "[A-Za-z_0-9%-]+::?" :property *prop-package*)
-
-  ;; read time evaluation
-  (syntoken "#\\d+#" :property *prop-preprocessor*)
-  (syntoken "#([+'cCsS-]|\\d+[aA=])?" :begin :preprocessor :contained t)
-
-  (syntoken "\\c" :property *prop-control*)
-
-  ;; symbols, do nothing, just resolve conflicting matches
-  (syntoken "[][{}A-Za-z_0-9!$%&/<=>^~*+-]+")
-
-  (syntable :simple-comment *prop-comment* nil
-    (syntoken "$" :switch -1)
-    (syntoken "XXX|FIXME|TODO" :property *prop-annotation*))
-
-  (syntable :comment *prop-comment* nil
-    ;; comments can nest
-    (syntoken "#|" :nospec t :begin :comment)
-    ;;  return to previous state
-    (syntoken "|#" :nospec t :switch -1)
-    (syntoken "XXX|FIXME|TODO" :property *prop-annotation*))
-
-  (syntable :unreadable *prop-unreadable* nil
-    ;; ignore escaped characters
-    (syntoken "\\\\.")
-    (syntoken "|" :nospec t :switch -1))
-
-  (syntable :string *prop-string* nil
-    ;; ignore escaped characters
-    (syntoken "\\\\.")
-    (syntoken "\"" :nospec t :switch -1))
-
-  (syntable :preprocessor *prop-preprocessor* nil
-    ;; a symbol
-    (syntoken "[][{}A-Za-z_0-9!$%&/<=>^~:*+-]+" :switch -1)
-
-    ;; conditional expression
-    (syntoken "(" :nospec t :begin :preprocessor-expression :contained t)
-
-    (syntable :preprocessor-expression *prop-preprocessor* nil
-      ;; recursive
-      (syntoken "(" :nospec t :begin :preprocessor-recursive :contained t)
-      (syntoken ")" :nospec t :switch -2)
-
-      (syntable :preprocessor-recursive *prop-preprocessor* nil
-       (syntoken "(" :nospec t
-         :begin :preprocessor-recursive
-         :contained t)
-       (syntoken ")" :nospec t :switch -1)
-       (synaugment :comments-and-strings))
-      (synaugment :comments-and-strings))
-    (synaugment :comments-and-strings))
-
-  (syntable :comments-and-strings nil nil
-    (syntoken "\"" :nospec t :begin :string :contained t)
-    (syntoken "#|" :nospec t :begin :comment :contained t)
-    (syntoken ";" :begin :simple-comment :contained t))
-
-  (synaugment :comments-and-strings)
-)
diff --git a/xedit/lisp/modules/progmodes/make.lsp b/xedit/lisp/modules/progmodes/make.lsp
deleted file mode 100644 (file)
index d40b18f..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/make.lsp,v 1.2 2002/10/06 17:11:48 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-(defsynprop *prop-shell*
-    "shell"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "Red4"
-)
-
-(defsynprop *prop-variable*
-    "variable"
-    :font      "*courier-medium-r*-12-*"
-    :foreground        "Red3"
-)
-
-;;  The syntax-highlight definition does not try to flag errors, just show
-;; tabs in the start of lines for better visualization.
-(defsynprop *prop-tabulation*
-    "tabulation"
-    :font      "*courier-medium-r*-12-*"
-    :background        "Gray90"
-)
-
-
-(defsyntax *make-mode* :main nil nil nil
-    (syntoken "^\\t+" :property *prop-tabulation*)
-
-    (syntoken "^\\.\\w+" :property *prop-keyword*)
-
-    (syntoken "$("
-       :nospec t
-       :begin :shell
-       :property *prop-shell*)
-
-    (syntoken "[][(){};$<=>&@/\\,.:~!|*?'`+-]"
-       :property *prop-shell*)
-
-    ;;  Preprocessor start rule.
-    (syntoken "#.*"
-       :property *prop-comment*)
-
-    ;;  String start rule.
-    (syntoken "\""
-       :begin :string
-       :nospec t
-       :contained t)
-
-    ;;  Quoted string start rule.
-    (syntoken "\\\""
-       :begin :quoted-string
-       :nospec t
-       :contained t)
-
-    (syntable :shell *prop-variable* nil
-       (syntoken ")"
-           :nospec t
-           :property *prop-shell*
-           :switch -1)
-    )
-
-    ;;  Rules for strings.
-    (syntable :string *prop-string* nil
-
-       ;;  Ignore escaped characters, this includes \".
-       (syntoken "\\\\.")
-
-       ;;  Ignore continuation in the next line.
-       (syntoken "\\\\$")
-
-       ;;  Rule to finish a string.
-       (syntoken "\""
-           :nospec t
-           :switch -1)
-
-       ;;  Don't allow strings continuing in the next line.
-       (syntoken ".?$"
-           :begin :error)
-    )
-
-    ;;  Rules for quoted strings.
-    (syntable :quoted-string *prop-constant* nil
-
-       ;;  Rule to finish the quoted string.
-       (syntoken "\\\""
-           :nospec t
-           :switch -1)
-
-       ;;  Ignore escaped characters
-       (syntoken "\\\\.")
-
-       ;;  Ignore continuation in the next line.
-       (syntoken "\\\\$")
-
-       ;;  Don't allow strings continuing in the next line.
-       (syntoken ".?$"
-           :begin :error)
-    )
-
-    (syntable :error *prop-error* nil
-       (syntoken "^.*$"
-           :switch -2)
-    )
-)
diff --git a/xedit/lisp/modules/progmodes/man.lsp b/xedit/lisp/modules/progmodes/man.lsp
deleted file mode 100644 (file)
index 45c6590..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/man.lsp,v 1.2 2002/10/06 17:11:48 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-(defsynprop *prop-man-b*
-    "b"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "gray12"
-)
-
-(defsynprop *prop-man-i*
-    "i"
-    :font      "*courier-medium-o*-12-*"
-    :foreground        "black"
-)
-
-(defsynprop *prop-man-bi*
-    "bi"
-    :font      "*courier-bold-o*-12-*"
-    :foreground        "gray20"
-)
-
-(defsynprop *prop-man-th*
-    "th"
-    :font      "-*-courier-*-*-*-*-18-*-*-*-*-*-*-1"
-    :foreground        "Red3"
-)
-
-(defsynprop *prop-man-sh*
-    "sh"
-    :font      "-*-courier-*-*-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "OrangeRed3"
-)
-
-(defsynprop *prop-man-ss*
-    "ss"
-    :font      "-*-courier-*-*-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Gold4"
-)
-
-(defsynprop *prop-man-escape*
-    "escape"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "RoyalBlue4"
-)
-
-(defsynprop *prop-man-string*
-    "string"
-    :font      "*lucidatypewriter-bold-r*-12-*"
-    :foreground        "RoyalBlue3"
-;    :underline        t
-)
-
-(defmacro man-syntoken (pattern)
-    `(syntoken (string-concat "^\\.(" ,pattern ")(\\s+|$)")
-       :icase t
-;      :contained t
-       :property *prop-preprocessor*
-       :begin (intern (string ,pattern) 'keyword)))
-
-(defmacro man-syntable (pattern property)
-    `(syntable (intern (string ,pattern) 'keyword) ,property nil
-       (syntoken "$" :switch -1)
-       (synaugment :extras)))
-
-
-(defsyntax *man-mode* :main nil nil nil
-    (syntoken "^\\.\\\\\".*"
-       :property *prop-comment*)
-
-    (man-syntoken "b|br|nm")
-    (man-syntable "b|br|nm" *prop-man-b*)
-
-    (man-syntoken "i|ir|ri|ip")
-    (man-syntable "i|ir|ri|ip" *prop-man-i*)
-
-    (man-syntoken "th|dt")
-    (man-syntable "th|dt" *prop-man-th*)
-
-    (man-syntoken "sh")
-    (man-syntable "sh" *prop-man-sh*)
-
-    (man-syntoken "ss")
-    (man-syntable "ss" *prop-man-ss*)
-
-    (man-syntoken "bi")
-    (man-syntable "bi" *prop-man-bi*)
-
-    ;; Anything not matched...
-    (syntoken "^\\.[a-z][a-z](\\s+|$)"
-       :icase t
-       :property *prop-preprocessor*)
-
-    (syntable :extras nil nil
-       (syntoken "\\<__\\l+__\\>"
-           :property *prop-constant*)
-       (syntoken "\\\\fB"
-           :property *prop-preprocessor*
-           :begin :b)
-       (syntoken "\\\\fI"
-           :property *prop-preprocessor*
-           :begin :i)
-       (syntoken "\\\\f\\u"
-           :property *prop-preprocessor*)
-
-       (syntoken "\\\\\\*?."
-           :property *prop-man-escape*)
-
-       (syntoken "\""
-           :property *prop-man-string*)
-
-       (syntable :i *prop-man-i* nil
-           (syntoken "$"
-               :switch :main)
-           (syntoken "\\\\f\\u"
-               :property *prop-preprocessor*
-               :switch -1)
-       )
-       (syntable :b *prop-man-b* nil
-           (syntoken "$"
-               :switch :main)
-           (syntoken "\\\\f\\u"
-               :property *prop-preprocessor*
-               :switch -1)
-       )
-    )
-
-    (synaugment :extras)
-)
diff --git a/xedit/lisp/modules/progmodes/patch.lsp b/xedit/lisp/modules/progmodes/patch.lsp
deleted file mode 100644 (file)
index d89bc39..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-;;
-;; Copyright (c) 2003 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86$
-;;
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-(defsyntax *patch-mode* :main nil #'default-indent nil
-  ;; "normal" diff
-  (syntoken "^(\\d+d\\d+|\\d+a\\d+,\\d+)$" :property *prop-keyword*)
-  (syntoken "^<.*" :property *prop-constant*)
-  (syntoken "^>.*" :property *prop-preprocessor*)
-  
-  ;; context diff
-  (syntoken "^\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*"
-    :property *prop-string*)
-  (syntoken "^\\*\\*\\* \\d+,\\d+ \\*\\*\\*\\*" :property *prop-comment*)
-  (syntoken "^--- \\d+,\\d+ ----" :property *prop-comment*)
-
-  ;; headers
-  (syntoken "^(---|\\+\\+\\+|\\*\\*\\*).*" :property *prop-keyword*)
-
-  (syntoken "^@@ .*" :property *prop-comment*)
-  (syntoken "^-.*" :property *prop-constant*)
-  (syntoken "^\\+.*" :property *prop-preprocessor*)
-)
diff --git a/xedit/lisp/modules/progmodes/perl.lsp b/xedit/lisp/modules/progmodes/perl.lsp
deleted file mode 100644 (file)
index 25a62c5..0000000
+++ /dev/null
@@ -1,507 +0,0 @@
-;; Copyright (c) 2007,2008 Paulo Cesar Pereira de Andrade
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice (including the next
-;; paragraph) shall be included in all copies or substantial portions of the
-;; Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-;; DEALINGS IN THE SOFTWARE.
-;;
-;; Author: Paulo Cesar Pereira de Andrade
-;;
-
-;;   Perl syntax and indentation mode
-;;   Based on the C/C++ and Lisp modes. Attempting to make simple
-;; syntax/indentation rules, that should work correctly with most
-;; perl code.
-
-;;  *cont-indent* is somewhat buggy, that if pressing C-A,Tab, will
-;; not generate the same output as when normally typing the expression.
-;;  This is because the parser doesn't search for a matching ';', '{',
-;; '[' or '(' to know where the expression starts. The C mode has the
-;; same problem. Example:
-;;     a +
-;;         b;  <-- if pressing C-A,Tab will align "b;" with "a +"
-
-;;  Maybe most of the code here, and some code in the C mode could be
-;; merged to have a single "default mode" parser for languages that
-;; basically only depend on { and } for indentation.
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defsynprop *prop-string-escape*
-  "string-escape"
-  :font                "*lucidatypewriter-bold-r*-12-*"
-  :foreground  "RoyalBlue2"
-  :underline   t)
-
-(defsynprop *prop-string-keyword-bold*
-  "string-variable-bold"
-  :font                "*lucidatypewriter-bold-r*-12-*"
-  :foreground  "RoyalBlue4")
-
-(defsynprop *prop-string-keyword*
-  "string-variable"
-  :font                "*lucidatypewriter-medium-r*-12-*"
-  :foreground  "RoyalBlue4")
-
-(defsynprop *prop-constant-escape*
-  "constant-escape"
-  :font                "*lucidatypewriter-medium-r*-12-*"
-  :foreground  "VioletRed3"
-  :underline   t)
-
-(defsynprop *prop-regex*
-  "regex"
-  :font                "*courier-medium-o*-12-*"
-  :foreground  "black")
-
-(defsynprop *prop-shell*
-  "shell"
-  :font                "*lucidatypewriter-medium-r*-12-*"
-  :foreground  "red3")
-
-(defsynprop *prop-shell-escape*
-  "shell-escape"
-  :font                "*lucidatypewriter-bold-r*-12-*"
-  :foreground  "red3"
-  :underline   t)
-
-(defsynprop *prop-documentation*
-  "documentation"
-  :font                "fixed"
-  :foreground  "black"
-  :background  "rgb:e/e/e"
-)
-
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defsynoptions *perl-DEFAULT-style*
-  ;; Positive number. Basic indentation
-  (:indentation                .       4)
-
-  ;; Boolean. Add one indentation level to continuations?
-  (:cont-indent                .       t)
-
-  ;; Boolean. Move cursor to the indent column after pressing <Enter>?
-  (:newline-indent     .       t)
-
-  ;; Boolean. Set to T if tabs shouldn't be used to fill indentation.
-  (:emulate-tabs       .       nil)
-
-  ;; Boolean. Only calculate indentation after pressing <Enter>?
-  ;;           This may be useful if the parser does not always
-  ;;           do what the user expects...
-  (:only-newline-indent        .       nil)
-
-  ;; Boolean. Remove extra spaces from previous line.
-  ;;           This should default to T when newline-indent is not NIL.
-  (:trim-blank-lines   .       t)
-
-  ;; Boolean. If this hash-table entry is set, no indentation is done.
-  ;;           Useful to temporarily disable indentation.
-  (:disable-indent     .       nil))
-
-
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defvar *perl-mode-options* *perl-DEFAULT-style*)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-;; Parenthesis are usually not required, just distinguish as:
-;; expression: code without an ending ';'
-;; statement:  code ending in a ';'
-;; block:      code enclosed in '{' and '}'
-;; In Perl a simpler logic can be used, unlikely the C mode, as in
-;; perl braces are mandatory
-(defindent *perl-mode-indent* :main
-  ;; this must be the first token
-  (indtoken "^\\s*" :indent
-    :code (or *offset* (setq *offset* (+ *ind-offset* *ind-length*))))
-  ;; this may cause some other patterns to fail, due to matching single \'
-  (indtoken "(&?(\\w+)|&(\\w+)?)'\\w+" :expression)
-  ;; special variables
-  (indtoken "\\$(\\d|^\\u|[][0-9!#$*()_@<>?/|,\"'])" :expression)
-  ;; ignore comments
-  (indtoken "#.*$" nil)
-  ;; treat regex as expressions to avoid confusing parser
-  (indtoken "m?/([^/]|\\\\/)+/\\w*" :expression)
-  (indtoken "m\\{[^}]+\\}\\w*" :expression)
-  (indtoken "m<[^>]+>\\w*" :expression)
-  (indtoken "(s|tr)/[^/]+/([^/]|\\\\/)*/\\w*" :expression)
-  (indtoken "//" :expression :nospec t)
-  ;; fast resolve deferences to expressions
-  (indtoken "[$@%&*]?\\{\\$?\\S+\\}" :expression)
-
-  (indtoken "($%@*)?\\w+" :expression)
-  (indtoken ";" :semi :nospec t)
-  (indinit (braces 0))
-  (indtoken "{" :obrace :nospec t
-    :code (decf braces))
-  (indtoken "}" :cbrace :nospec t
-    :code (incf braces))
-  (indinit (parens&bracks 0))
-  (indtoken ")" :cparen :nospec t :code (incf parens&bracks))
-  (indtoken "(" :oparen        :nospec t :code (decf parens&bracks))
-  (indtoken "]" :cbrack        :nospec t :code (incf parens&bracks))
-  (indtoken "[" :obrack        :nospec t :code (decf parens&bracks))
-  ;; if in the same line, reduce now, this must be done because the
-  ;; delimiters are identical
-  (indtoken "'([^\\']|\\\\.)*'" :expression)
-  (indtoken "\"([^\\\"]|\\\\.)*\"" :expression)
-  (indtoken "\"" :cstring1 :nospec t :begin :string1)
-  (indtoken "'" :cstring2 :nospec t :begin :string2)
-  ;; This must be the last rule
-  (indtoken "\\s*$"            :eol)
-
-  (indtable :string1
-    ;; Ignore escaped characters
-    (indtoken "\\." nil)
-    ;; Return to the toplevel when the start of the string is found
-    (indtoken "\"" :ostring1 :nospec t :switch -1))
-  (indtable :string2
-    (indtoken "\\." nil)
-    (indtoken "'" :ostring2 :nospec t :switch -1))
-
-  ;; This avoids some problems with *cont-indent* adding an indentation
-  ;; level to an expression after an empty line
-  (indreduce nil
-    t
-    ((:indent :eol)))
-
-  ;; Reduce to a single expression token
-  (indreduce :expression
-    t
-    ((:indent :expression)
-      (:expression :eol)
-      (:expression :parens)
-      (:expression :bracks)
-      (:expression :expression)
-      ;; multiline strings
-      (:ostring1 (not :ostring1) :cstring1)
-      (:ostring2 (not :ostring2) :cstring2)
-      ;; parenthesis and brackets
-      (:oparen (not :oparen) :cparen)
-      (:obrack (not :obrack) :cbrack)))
-
-  ;; Statements end in a semicollon
-  (indreduce :statement
-    t
-    ((:semi)
-      (:indent :semi)
-      (:expression :statement)
-      (:statement :eol)
-      ;; Doesn't necessarily end in a semicollon
-      (:expression :block)))
-
-  (indreduce :block
-    t
-    ((:obrace (not :obrace) :cbrace)
-      (:block :eol)))
-  (indreduce :obrace
-    (< *ind-offset* *ind-start*)
-    ((:indent :obrace))
-    (setq *indent* (offset-indentation (+ *ind-offset* *ind-length*) :resolve t))
-    (indent-macro-reject-left))
-
-  ;; Try to do an smart indentation on open parenthesis and brackets
-  (indreduce :parens
-    t
-    ((:oparen (not :oparen) :cparen))
-    (when (and
-           (< *ind-offset* *ind-start*)
-           (> (+ *ind-offset* *ind-length*) *ind-start*))
-      (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
-      (indent-macro-reject-left)))
-  (indreduce :bracks
-    t
-    ((:obrack (not :obrack) :cbrack))
-    (when (and
-           (< *ind-offset* *ind-start*)
-           (> (+ *ind-offset* *ind-length*) *ind-start*))
-      (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))
-      (indent-macro-reject-left)))
-
-  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-  ;; Assuming previous lines have correct indentation, try to
-  ;; fast resolve brace indentation
-  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-  ;; Line ended with an open brace
-  (indreduce :obrace
-    (< *ind-offset* *ind-start*)
-    ((:expression :obrace))
-    (setq *indent* (offset-indentation *ind-offset* :resolve t))
-    (indent-macro-reject-left))
-  ;; Line starts with an open brace
-  (indreduce nil
-    (< *ind-offset* *ind-start* (+ *ind-offset* *ind-length*))
-    ;; Just set initial indentation
-    ((:indent :obrace))
-    (setq
-      *indent* (- (offset-indentation *ind-offset* :resolve t) *base-indent*))
-    (indent-macro-reject-left))
-
-  (indresolve :statement
-    (when (< *ind-offset* *ind-start*)
-      (while (> braces 0)
-       (setq
-         *indent*      (- *indent* *base-indent*)
-         braces        (1- braces)))))
-
-  (indresolve :obrace
-    (and (< *ind-offset* *ind-start*)
-      (incf *indent* *base-indent*)))
-  (indresolve :cbrace
-    (decf *indent* *base-indent*))
-  (indresolve :expression
-    (and
-      *cont-indent*
-      (> *indent* 0)
-      (zerop parens&bracks)
-      (< *ind-offset* *ind-start*)
-      (> (+ *ind-offset* *ind-length*) *ind-start*)
-      (incf *indent* *base-indent*)))
-
-  (indresolve (:oparen :obrack)
-    (and (< *ind-offset* *ind-start*)
-      (setq *indent* (1+ (offset-indentation *ind-offset* :align t)))))
-)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defun perl-offset-indent (&aux char (point (point)))
-  ;; Skip spaces forward
-  (while (member (setq char (char-after point)) indent-spaces)
-    (incf point))
-  (if (member char '(#\})) (1+ point) point))
-
-(compile 'perl-offset-indent)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defun perl-should-indent (options &aux char point start offset)
-  (when (hash-table-p options)
-    ;; check if previous line has extra spaces
-    (and (gethash :trim-blank-lines options)
-      (indent-clear-empty-line))
-
-    ;; indentation disabled?
-    (and (gethash :disable-indent options)
-      (return-from perl-should-indent))
-
-    (setq
-      point    (point)
-      char     (char-before point)
-      start    (scan point :eol :left))
-
-    ;; if at bol and should indent only when starting a line
-    (and (gethash :only-newline-indent options)
-      (return-from perl-should-indent (= point start)))
-
-    ;; at the start of a line
-    (and (= point start)
-      (return-from perl-should-indent (gethash :newline-indent options)))
-
-    ;; if first character
-    (and (= point (1+ start))
-      (return-from perl-should-indent t))
-
-    ;; check if is the first non-blank character in a new line
-    (when (and
-           (gethash :cont-indent options)
-           (= point (scan point :eol :right))
-           (alphanumericp char))
-      (setq offset (1- point))
-      (while (and
-              (> offset start)
-              (member (char-before offset) indent-spaces))
-       (decf offset))
-      ;; line has only one character with possible spaces before it
-      (and (<= offset start)
-       (return-from perl-should-indent t)))
-
-    ;; if one of these was typed, should check indentation
-    (if (member char '(#\})) (return-from perl-should-indent t))
-  )
-  ;; Should not indent
-  nil)
-
-(compile 'perl-should-indent)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defun perl-indent (syntax syntable)
-  (let*
-    ((options (syntax-options syntax))
-      *base-indent*
-      *cont-indent*)
-
-    (or (perl-should-indent options) (return-from perl-indent))
-    (setq
-      *base-indent* (gethash :indentation options 4)
-      *cont-indent* (gethash :cont-indent options t))
-
-    (indent-macro
-      *perl-mode-indent*
-      (perl-offset-indent)
-      (gethash :emulate-tabs options))))
-
-(compile 'perl-indent)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-;; some example macros to easily add new patterns for strings and possibly
-;; regex or other patterns
-(defmacro perl-q-string-token (token)
-  `(syntoken (string-concat "\\<q(q|w)?\\s*\\" ,token)
-     :icase t :contained t :begin
-     (intern (string-concat "string" ,token) 'keyword)))
-(defmacro perl-q-string-table (start end)
-  `(syntable (intern (string-concat "string" ,start) 'keyword)
-     *prop-string* #'default-indent
-     (syntoken ,end :nospec t :switch -1)
-     (synaugment :inside-string)))
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defsyntax *perl-mode* :main nil #'perl-indent *perl-mode-options*
-  ;; keywords
-  (syntoken
-    (string-concat
-      "\\<("
-      "and|for|foreach|gt|if|else|elsif|eq|goto|le|lt|last|ne|"
-      "neg|next|not|or|return|shift|sub|unless|unshift|until|while"
-      ")\\>")
-    :property *prop-keyword*)
-
-  ;; pseudo keywords
-  (syntoken
-    (string-concat
-      "\\<("
-      "BEGIN|END|bless|blessed|defined|delete|eval|local|my|our|"
-      "package|require|undef|use"
-      ")\\>")
-    :property *prop-preprocessor*)
-  ;; this may cause some other patterns to fail, due to matching single \'
-  (syntoken "(&?(\\w+)|&(\\w+)?)'\\w+" :property *prop-preprocessor*)
-
-  ;; numbers
-  (syntoken
-    (string-concat
-      "\\<("
-      ;; Integers
-      "(\\d+|0x\\x+)|"
-      ;; Floats
-      "\\d+\\.?\\d*(e[+-]?\\d+)?"
-      ")\\>")
-    :icase t
-    :property *prop-number*)
-
-  ;; special variables
-  (syntoken "\\$(\\d|^\\u|[][0-9!#$*()_@<>?/|,\"'])" :property *prop-keyword*)
-
-  ;; also match variables
-  (syntable :inside-string nil nil
-    ;; escaped characters
-
-    ;; XXX This pattern was matching the empty string and entering an
-    ;; infinite loop in code like:
-#|
----%<---
-"              <-- *** if an backslash is added it fails. Inverting
-a";                 *** the pattern fixed the problem, but was the wrong
----%<---           *** solution. Note that C-G stops the interpreter, and
-                   *** special care must be taken with patterns matching
-                   *** empty strings.
-|#
-
-    (syntoken "\\\\\\d{3}|\\\\." :property *prop-string-escape*)
-    (syntoken "(\\{\\$|\\$\\{)" :property *prop-string-keyword-bold* :begin :string-varbrace)
-    (syntoken "[$@]" :property *prop-string-keyword-bold* :begin :string-variable)
-    (syntoken "\\$(\\d|^\\u|[][0-9!#$*()_@<>?/|,\"'])" :property *prop-string-keyword-bold*))
-
-  ;; variables insided strings
-  (syntable :string-variable *prop-string-keyword* nil
-    (syntoken "\\w+" :switch -1))
-  (syntable :string-varbrace *prop-string-keyword* nil
-    (syntoken          "}"
-      :nospec          t
-      :property        *prop-string-keyword-bold*
-      :switch          -1)
-    (synaugment :inside-string))
-
-  ;; comments
-  (syntoken "#.*$" :property *prop-comment*)
-
-  ;; regex
-  (syntoken "(\\<m)?/([^/]|\\\\/)+/\\w*"       :property *prop-regex*)
-  (syntoken "\\<m\\{[^}]+\\}\\w*"              :property *prop-regex*)
-  (syntoken "\\<m<[^>]+>\\w*"                  :property *prop-regex*)
-  (syntoken "\\<(s|tr)/[^/]+/([^/]|\\\\/)*/\\w*":property *prop-regex*)
-  ;; just to avoid confusing the parser on something like split //, ...
-  (syntoken "//" :nospec t                     :property *prop-regex*)
-
-  ;; strings
-  (syntoken "\"" :nospec t :contained t :begin :string)
-  (syntable :string *prop-string* #'default-indent
-    (syntoken "\"" :nospec t :switch -1)
-    (synaugment :inside-string))
-
-  ;; more strings
-  (perl-q-string-token "{")
-  (perl-q-string-table "{" "}")
-  (perl-q-string-token "[")
-  (perl-q-string-table "[" "]")
-  (perl-q-string-token "(")
-  (perl-q-string-table "(" ")")
-  (perl-q-string-token "/")
-  (perl-q-string-table "/" "/")
-
-  ;; yet more strings
-  (syntoken "'" :nospec t :contained t :begin :constant)
-  (syntable :constant *prop-constant* #'default-indent
-    (syntoken "'"      :nospec t :switch -1)
-    (syntoken "\\\\." :property *prop-string-escape*))
-
-  ;; shell commands
-  (syntoken "`" :nospec t :contained t :begin :shell)
-  (syntable :shell *prop-shell* #'default-indent
-    (syntoken "`"      :nospec t :switch -1)
-    (synaugment :inside-string))
-
-  ;; punctuation
-  (syntoken "[][$@%(){}/*+:;=<>,&!|^~\\.?-]" :property *prop-punctuation*)
-  (syntoken "\\<x\\>" :property *prop-punctuation*)
-
-  ;; primitive faked heredoc support, doesn't match the proper string, just
-  ;; expects an uppercase identifier in a single line
-  (syntoken "<<\"[A-Z][A-Z0-9_]+\"" :property *prop-string* :begin :heredoc)
-  (syntoken "<<'[A-Z][A-Z0-9_]+'" :property *prop-constant* :begin :heredoc)
-  (syntoken "<<[A-Z][A-Z0-9_]+" :property *prop-preprocessor* :begin :heredoc)
-  (syntable :heredoc *prop-documentation* #'default-indent
-    (syntoken "^[A-Z][A-Z0-9_]+$" :switch -1))
-
-  (syntoken "^=(pod|item|over|head\\d)\\>.*$" :property *prop-documentation* :begin :info)
-  (syntable :info *prop-documentation* nil
-    (syntoken "^=cut\\>.*$"    :switch -1)
-    (syntoken "^.*$"))
-
-  (syntoken "^(__END__|__DATA__)$" :property *prop-documentation*
-    :begin :documentation)
-
-  (syntoken "__\\u+__" :property *prop-preprocessor*)
-
-  (syntable :documentation *prop-documentation* nil
-    (syntoken "^.*$"))
-
-)
diff --git a/xedit/lisp/modules/progmodes/python.lsp b/xedit/lisp/modules/progmodes/python.lsp
deleted file mode 100644 (file)
index ff70856..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-;; Copyright (c) 2008 Paulo Cesar Pereira de Andrade
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice (including the next
-;; paragraph) shall be included in all copies or substantial portions of the
-;; Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-;; DEALINGS IN THE SOFTWARE.
-;;
-;; Author: Paulo Cesar Pereira de Andrade
-;;
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defsynprop *prop-indent*
-  "indent"
-  :font                "*courier-medium-r*-12-*"
-  :background  "Gray92")
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defsynoptions *python-DEFAULT-options*
-  ;; Positive number. Basic indentation
-  (:indentation                .       4)
-
-  ;; Boolean. Move cursor to the indent column after pressing <Enter>?
-  (:newline-indent     .       t)
-
-  ;; Boolean. Set to T if tabs shouldn't be used to fill indentation.
-  (:emulate-tabs       .       t)
-
-  ;; Boolean. Only calculate indentation after pressing <Enter>?
-  ;;           This may be useful if the parser does not always
-  ;;           do what the user expects...
-  (:only-newline-indent        .       nil)
-
-  ;; Boolean. Remove extra spaces from previous line.
-  ;;           This should default to T when newline-indent is not NIL.
-  (:trim-blank-lines   .       nil)
-
-  ;; Boolean. If this hash-table entry is set, no indentation is done.
-  ;;           Useful to temporarily disable indentation.
-  (:disable-indent     .       nil))
-
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-;;   Not doing "special" indentation of multiline ( because it is attempting
-;; to do a "smart" indentation and usually don't read more then one line
-;; back to resolve indentation.
-;;   Code for multiline { and [, usually declaring vector/hash like variables
-;; should be working properly.
-;;   Note that the indent lisp hook is only run on character additions, so
-;; it doesn't do a "smart" tabbing when pressing backspace, but it will
-;; properly align to the "closest tab stop" when typping a character.
-(defindent *python-mode-indent* :main
-  ;; this must be the first token
-  (indtoken "^\\s*" :indent
-    :code (or *offset* (setq *offset* (+ *ind-offset* *ind-length*))))
-
-  ;; ignore comments
-  (indtoken "#.*$" nil)
-
-  (indtoken ":" :collon :nospec t)
-
-  ;; don't directly match {}, [], () strings, and :
-  (indtoken "[a-zA-Z0-9+*/%^&<>=.,|!~-]+" :expression)
-
-  ;; if in the same line, reduce now, as delimiters are identical
-  (indtoken "'([^\\']|\\\\.)*'" :expression)
-  (indtoken "\"([^\\\"]|\\\\.)*\"" :expression)
-  ;; otherwise, use a table
-  (indtoken "\"" :cstring :nospec t :begin :string)
-  (indtoken "'" :cconstant :nospec t :begin :constant)
-  (indtoken "\"\"\"" :cstring3 :nospec t :begin :string3)
-  (indtoken "'''" :cconstant :nospec t :begin :constant3)
-
-  (indinit (braces 0))
-  (indtoken "}" :cbrace :nospec t :code (incf braces))
-  (indtoken "{" :obrace        :nospec t :code (decf braces))
-  (indtoken ")" :cparen :nospec t :code (incf braces))
-  (indtoken "(" :oparen        :nospec t :code (decf braces))
-  (indtoken "]" :cbrack        :nospec t :code (incf braces))
-  (indtoken "[" :obrack        :nospec t :code (decf braces))
-
-  ;; This must be the last token
-  (indtoken "$"                :eol)
-
-  (indtable :string
-    ;; Ignore escaped characters
-    (indtoken "\\." nil)
-    ;; Return to the toplevel when the start of the string is found
-    (indtoken "\"" :ostring :nospec t :switch -1))
-  (indtable :constant
-    (indtoken "\\." nil)
-    (indtoken "'" :oconstant :nospec t :switch -1))
-
-  (indtable :string3
-    (indtoken "\"\"\"" :ostring3 :nospec t :switch -1))
-  (indtable :constant3
-    (indtoken "'''" :oconstant3 :nospec t :switch -1))
-
-  ;; Reduce what isn't reduced in regex pattern match
-  (indreduce :expression
-    t
-    ((:expression :expression)
-      ;; multiline strings
-      (:ostring (not :ostring) :cstring)
-      (:oconstant (not :oconstant) :cconstant)
-      (:ostring3 (not :ostring3) :cstring3)
-      (:oconstant3 (not :oconstant3) :cconstant3)
-      ;; braces, parenthesis and brackets
-      (:obrace (not :obrace) :cbrace)
-      (:oparen (not :oparen) :cparen)
-      (:obrack (not :obrack) :cbrack)))
-
-  ;; This should be the most common exit point;
-  ;; just copy previous line indentation.
-  (indreduce :align
-    (< *ind-offset* *ind-start*)
-    ((:indent :eol)
-      (:indent :expression :eol))
-    (setq *indent* (offset-indentation *offset* :resolve t))
-
-    ;; If cursor is not in an indentation tab, assume user is trying to align
-    ;; to another block, and just use the resolve code to round it down
-    (unless (/= (mod *indent* *base-indent*) 0)
-      ;; else use "previous-line" indentation.
-      (setq *indent* (offset-indentation *ind-offset* :resolve t)))
-    (indent-macro-reject-left))
-
-  ;; This should be second most common exit point;
-  ;; add one indentation level.
-  (indreduce :align
-    (< *ind-offset* *ind-start*)
-    ((:indent :expression :collon :eol))
-    (setq *indent* (+ *base-indent* (offset-indentation *ind-offset* :resolve t)))
-    (indent-macro-reject-left))
-
-  (indresolve :align
-    (setq *indent* (- *indent* (mod *indent* *base-indent*))))
-
-  ;; Calculate special indentation for [ and {
-  (indresolve (:obrack :obrace)
-    (and
-      (< *ind-offset* *ind-start*)
-      (setq *indent* (+ *base-indent*
-                      (offset-indentation *ind-offset* :resolve t)))))
-  (indresolve (:cbrack :cbrace)
-    (setq *indent* (- (offset-indentation *ind-offset* :resolve t)
-                    (if (>= *ind-offset* *ind-start*)
-                      *base-indent* 0))))
-)
-
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defun python-offset-indent (&aux char (point (point)))
-  ;; Skip spaces forward
-  (while (member (setq char (char-after point)) indent-spaces)
-    (incf point))
-  point)
-
-(compile 'python-offset-indent)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defun python-should-indent (options &aux point start end offset)
-  (when (hash-table-p options)
-    ;; check if previous line has extra spaces
-    (and (gethash :trim-blank-lines options)
-      (indent-clear-empty-line))
-
-    ;; indentation disabled?
-    (and (gethash :disable-indent options)
-      (return-from python-should-indent))
-
-    (setq
-      point    (point)
-      start    (scan point :eol :left)
-      end      (scan point :eol :right))
-
-    ;; if at bol and should indent only when starting a line
-    (and (gethash :only-newline-indent options)
-      (return-from python-should-indent (= point start)))
-
-    ;; at the start of a line
-    (and (= point start)
-      (return-from python-should-indent (gethash :newline-indent options)))
-
-    ;; if first character
-    (and (= point (1+ start))
-      (return-from python-should-indent t))
-
-    (setq offset start)
-    (while (and
-            (< offset end)
-            (member (char-after offset) indent-spaces))
-      (incf offset))
-
-    ;; cursor is at first character in line, with possible spaces before it
-    (return-from python-should-indent (or (= offset end) (= offset (1- point))))
-  )
-  ;; Should not indent
-  nil)
-
-(compile 'python-should-indent)
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defun python-indent (syntax syntable)
-  (let*
-    ((options (syntax-options syntax))
-      *base-indent*)
-
-    (or (python-should-indent options) (return-from python-indent))
-    (setq
-      *base-indent* (gethash :indentation options 4))
-
-    (indent-macro
-      *python-mode-indent*
-      (python-offset-indent)
-      (gethash :emulate-tabs options))))
-
-(compile 'python-indent)
-
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defvar *python-mode-options* *python-DEFAULT-options*)
-
-
-;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-(defsyntax *python-mode* :main nil #'python-indent *python-mode-options*
-  ;; keywords
-  (syntoken
-    (string-concat
-      "\\<("
-      "and|break|class|continue|def|del|enumerate|except|False|for|"
-      "elif|else|if|in|is|len|None|not|or|pass|print|raise|range|"
-      "return|self|True|try|type|while|yield"
-      ")\\>")
-    :property *prop-keyword*)
-
-  (syntoken "^\\s+" :property *prop-indent*)
-
-  ;; preprocessor like
-  (syntoken
-    (string-concat
-      "\\<("
-      "from|import"
-      ")\\>")
-    :property *prop-preprocessor*)
-
-  ;; namespaces/accessors
-  (syntoken "(\\w+\\.)+" :property *prop-preprocessor*)
-
-  ;; more preprocessor like
-  (syntoken "\\<__[a-zA-Z0-9]+__\\>" :property *prop-keyword*)
-
-  ;; numbers
-  (syntoken
-    (string-concat
-      "\\<("
-      ;; Integers
-      "(\\d+|0x\\x+)L?|"
-      ;; Floats
-      "\\d+\\.?\\d*(e[+-]?\\d+)?"
-      ")\\>")
-    :icase t
-    :property *prop-number*)
-
-  ;; comments
-  (syntoken "#.*" :property *prop-comment*)
-
-  ;; punctuation
-  (syntoken "[][(){}+*/%^&<>=.,|!~:-]+" :property *prop-punctuation*)
-
-  ;; constant or constant like
-  (syntoken "'" :nospec t :property *prop-constant* :begin :constant)
-  (syntoken "'''" :nospec t :property *prop-constant* :begin :constant3)
-
-  ;; strings
-  (syntoken "\"" :nospec t :property *prop-string* :begin :string)
-  (syntoken "\"\"\"" :nospec t :property *prop-string* :begin :string3)
-
-  (syntable :constant *prop-constant* nil
-    (syntoken "\\\\.")
-    (syntoken "'" :nospec t :switch -1))
-  (syntable :constant3 *prop-constant* nil
-    (syntoken "'''" :nospec t :switch -1))
-  (syntable :string *prop-string* nil
-    (syntoken "\\\\.")
-    (syntoken "\"" :nospec t :switch -1))
-  (syntable :string3 *prop-string* nil
-    (syntoken "\"\"\"" :nospec t :switch -1))
-)
diff --git a/xedit/lisp/modules/progmodes/rpm.lsp b/xedit/lisp/modules/progmodes/rpm.lsp
deleted file mode 100644 (file)
index a00ecc0..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-;;
-;; Copyright (c) 2003 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/rpm.lsp,v 1.1 2003/01/16 03:50:46 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-;; Only for testing, unifinished, good for viewing but too slow for real use...
-#|
-(defsynprop *prop-rpm-special*
-    "rpm-special"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "NavyBlue"
-)
-
-(defsynprop *prop-rpm-escape*
-    "rpm-escape"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "Red3")
-
-;; main package is implicit
-(defsyntax *rpm-mode* :package nil nil nil
-    (syntable :sections nil nil
-       (syntoken "^%package"
-           :icase t
-           :switch :package
-           ;; XXX :begin :package was added just to test finishing and
-           ;; starting a new syntax-table, unfortunately if using it
-           ;; this way, frequently the entire file will be reparsed
-           ;; at every character typed.
-           ;; TODO study these cases and implement code to avoid it,
-           ;; the easiest way is limiting the number of backtracked lines,
-           ;; the screen contents sometimes could not correctly reflect
-           ;; file contents in this case...
-           :begin :package
-           :property *prop-rpm-special*)
-       (syntoken "^%(build|setup|install|pre|preun|post|postun)\\>"
-           :icase t
-           :property *prop-rpm-special*
-           :switch :package
-           :begin :shell)
-       ;; %changelog, XXX no rules to return to the toplevel
-       (syntoken "^%changelog\\>"
-           :icase t
-           :switch :package
-           :begin :changelog
-           :property *prop-rpm-special*)
-       (syntable :changelog nil nil
-           ;; ignore if escaped
-           (syntoken "%%")
-           ;; "warn" if not escaped
-           (syntoken "%" :property *prop-control*)
-           ;; emails
-           (syntoken "<[a-z0-9_-]+@[a-z0-9_-]+\\.\\w+(\\.\\w+)?>"
-               :icase t
-               :property *prop-string*)
-       )
-       ;; comments
-       (syntoken "#" :contained t :nospec t :begin :comment)
-       (syntable :comment *prop-comment* nil
-           ;; some macros are expanded even when inside comments, and may
-           ;; cause surprises, "warn" about it
-           (syntoken "%\\{?\\w+\\}?" :property *prop-rpm-special*)
-           (syntoken "$" :switch -1)
-       )
-       (synaugment :global)
-    )
-
-    ;; may appear anywhere
-    (syntable :global nil nil
-       ;; preprocessor like commands
-       (syntoken "^%(define|if|ifarch|else|endif)\\>"
-           :icase t
-           :property *prop-preprocessor*)
-       ;; variables
-       (syntoken "%\\{.*\\}" :property *prop-constant*)
-    )
-
-    ;; example: "Group: ..." or "Group(pt_BR): ..."
-    (syntoken "^\\w+(\\(\\w+\\))?:" :property *prop-keyword*)
-
-    ;; for sections with shell commands
-    (syntable :shell nil nil
-       (syntoken "\\<(if|then|elif|else|fi|for|do|done|case|esac|while|until)\\>"
-           :property *prop-keyword*)
-       (syntable :strings nil nil
-           (syntoken "\"" :nospec t :begin :string :contained t)
-           (syntable :string *prop-string* nil
-               (syntoken "\\$\\(?\\w+\\)?" :property *prop-constant*)
-               (syntoken "\\\\.")
-               (syntoken "\"" :nospec t :switch -1)
-           )
-           (syntoken "\'" :nospec t :begin :constant :contained t)
-           (syntable :constant *prop-constant* nil
-               (syntoken "\\\\.")
-               (syntoken "\'" :nospec t :switch -1)
-           )
-           (syntoken "\`" :nospec t :begin :escape :contained t)
-           (syntable :escape *prop-rpm-escape* nil
-               (syntoken "\\$\\(?\\w+\\)?" :property *prop-constant*)
-               (syntoken "\\\\.")
-               (syntoken "\`" :nospec t :switch -1)
-           )
-       )
-       (synaugment :strings :sections)
-    )
-    (synaugment :sections)
-)
-|#
-
-
-(defsyntax *rpm-mode* :package nil nil nil
-    ;; commands, macro definitions, etc
-    (syntoken "^\\s*%\\s*\\w+" :property *prop-keyword*)
-
-    ;; rpm "variables"
-    (syntoken "%\\{.*\\}" :property *prop-constant*)
-
-    ;; package info, example: "Group: ...", "Group(pt_BR): ...", etc.
-    (syntoken "^\\w+(\\(\\w+\\))?:" :property *prop-preprocessor*)
-
-    ;; comments
-    (syntoken "#" :contained t :nospec t :begin :comment)
-    (syntable :comment *prop-comment* nil
-       ;; some macros are expanded even when inside comments, and may
-       ;; cause surprises, "warn" about it
-       (syntoken "%define\\>" :property *prop-control*)
-       (syntoken "%\\{?\\w+\\}?" :property *prop-string*)
-       (syntoken "$" :switch -1)
-    )
-
-    ;; emails
-    (syntoken "<?[a-z0-9_-]+@[a-z0-9_-]+\\.\\w+(\\.\\w+)*>?"
-       :icase t
-       :property *prop-string*)
-    ;; links
-    (syntoken "\\<(http|ftp)://\\S+" :property *prop-string*)
-)
diff --git a/xedit/lisp/modules/progmodes/sgml.lsp b/xedit/lisp/modules/progmodes/sgml.lsp
deleted file mode 100644 (file)
index 76b537c..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/sgml.lsp,v 1.2 2002/10/06 17:11:48 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-;; Default property the text is shown.
-(defsynprop *prop-sgml-default*
-    "default"
-    :font      "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Gray10"
-)
-
-(defsynprop *prop-sgml-default-short*
-    "default-short"
-    :font      "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Gray10"
-    :underline t
-)
-
-;; Large font.
-(defsynprop *prop-sgml-sect*
-    "sect"
-    :font      "-*-helvetica-bold-r-*-*-17-*-*-*-*-*-*-1"
-    :foreground        "Gray20"
-)
-
-;; Monospaced property.
-(defsynprop *prop-sgml-tt*
-    "tt"
-    :font      "-*-courier-medium-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Black"
-)
-
-;; Italic property.
-(defsynprop *prop-sgml-it*
-    "it"
-    :font      "-*-helvetica-medium-o-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Black"
-)
-
-;; Bold font property.
-(defsynprop *prop-sgml-bf*
-    "bf"
-    :font      "-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "Gray10"
-)
-
-;; Looks like a link...
-(defsynprop *prop-sgml-link*
-    "link"
-    :font      "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "blue"
-    :underline t
-)
-
-;; Monospaced, also looks like a link...
-(defsynprop *prop-sgml-email*
-    "email"
-    :font      "-*-courier-medium-r-*-*-12-*-*-*-*-*-*-1"
-    :foreground        "blue"
-    :underline t
-)
-
-;; Another monospaced property,
-(defsynprop *prop-sgml-screen*
-    "screen"
-    :font      "-*-fixed-*-*-*-*-*-*-*-*-*-*-*-1"
-    :foreground        "Gray10"
-)
-
-(defsynprop *prop-sgml-maybe-entity*
-    "maybe-entity"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "VioletRed4"
-    :background        "LightYellow"
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  The macros sgml-syntoken and sgml-syntable allows creating rules for
-;; matching text inside tags in the format:
-;;     <tag> or <tag arg=value> or <tag arg1=value ... argn=value>
-;;             any-text
-;;     </tag>
-;;  The generated rules don't allow things like: < tag> or </tag >
-;;
-;;  This could also be done as a normal definition, with a starting rule like:
-;;     "<(tag1|tag2|tag3)\\>"
-;; and an ending rule like:
-;;     "</(tag1|tag2|tag3)>"
-;;  But is implemented in way that will fail on purpose for things like:
-;;     <tag1>any text</tag3></tag1>
-;;
-;; NOTE: These definitions aren't cheap in the time required to process the
-;;     file, and are just adaptations/tests with the syntax-highlight code,
-;;     probably it is better to avoid using it in other syntax definitions.
-;; NOTE2: It cannot be defined as a single macro because it is required to
-;;       generate 2 entries in the main SGML syntax highlight definition,
-;;       or, should generate the entire definition from a macro; you will
-;;       need to type the tag name twice, but shouldn't be a problem if
-;;       you are using sgml :-)
-;; XXX: Maybe the syntax-highlight code could save the starting match and
-;;     apply a regex generated at run-time to check for the ending tag,
-;;     but this probably would make the parser too slow, better to have
-;;     a specialized parser if that is required...
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro sgml-syntoken (name)
-    `(syntoken (string-concat "<" ,name "\\>")
-       :icase t
-       :contained t
-       :begin (intern (string-concat ,name "$") 'keyword))
-)
-(defmacro sgml-syntable (name property)
-    `(let
-       (
-       (label (intern (string-concat ,name "$") 'keyword))
-       (nested-label (intern (string (gensym)) 'keyword))
-       )
-       (syntable label *prop-preprocessor* nil
-           ;; tag is still open, process any options
-           (synaugment :generic-tag)
-           (syntoken ">"
-               :nospec t
-               :property *prop-preprocessor*
-               :begin nested-label)
-           ;;  Generate a nested table that includes everything, and only
-           ;; returns when the closing tag is found.
-           (syntable nested-label ,property nil
-               (syntoken (string-concat "</" ,name ">")
-                   :icase t
-                   :nospec t
-                   :property *prop-preprocessor*
-                   :switch -2)
-               (synaugment :main)
-           )
-       )
-    )
-)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Generate tokens for tags that don't require and ending tag.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro sgml-syntable-simple (name property)
-    `(let
-       (
-       (label (intern (string-concat ,name "$") 'keyword))
-       (nested-label (intern (string (gensym)) 'keyword))
-       )
-       (syntable label *prop-preprocessor* nil
-           ;; tag is still open, process any options
-           (synaugment :generic-tag)
-           (syntoken ">"
-               :nospec t
-               :property *prop-preprocessor*
-               :begin nested-label)
-           ;;  Generate a nested table that finishes whenever an unmatched
-           ;; start or end tag is found.
-           (syntable nested-label ,property nil
-               (syntoken "</"
-                   :icase t
-                   :nospec t
-                   :contained t
-                   :begin :simple-nested-tag)
-               ;;  These will take precedence over other rules
-               (syntoken "<"
-                   :icase t
-                   :nospec t
-                   :contained t
-                   :begin :simple-nested-tag)
-               (syntoken "<p>"
-                   :icase t
-                   :nospec t
-                   :property *prop-preprocessor*
-                   :switch :main)
-               (synaugment :main)
-           )
-       )
-    )
-)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Define some macros to generate tokens for tags in the format:
-;;     <tag/  ... /
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro sgml-syntoken-short (name)
-    `(syntoken (string-concat "<" ,name "/")
-       :icase t
-       :property *prop-preprocessor*
-       :begin (intern (string-concat ,name "/") 'keyword))
-)
-(defmacro sgml-syntable-short (name property)
-    `(syntable (intern (string-concat ,name "/") 'keyword) ,property nil
-       (syntoken "/"
-           :nospec t
-           :property *prop-preprocessor*
-           :switch -1)
-       (syntoken "</?\\w+>"
-           :property *prop-control*
-           :switch :main)
-    )
-)
-
-
-;; The main SGML syntax table
-(defsyntax *sgml-mode* :main *prop-sgml-default* nil nil
-    ;; Comments
-    (syntoken "<!--"
-       :nospec t
-       :contained t
-       :begin :comment)
-    (syntable :comment *prop-comment* nil
-       ;; Only one rule, to finish the comment.
-       (syntoken "-->"
-           :nospec t
-           :switch -1)
-    )
-
-    ;; Entities
-    (syntoken "&[a-zA-Z0-9_.-]+;"
-       :property *prop-constant*)
-    ;; Probably an entity, missing ending `;'
-    (syntoken "&[a-zA-Z0-9_.-]+"
-       :property *prop-sgml-maybe-entity*)
-
-    ;; Strings
-    (syntable :string *prop-string* nil
-       ;;  Ignore escaped characters.
-       (syntoken "\\\\.")
-       ;;  Rule to finish the string.
-       (syntoken "\""
-           :nospec t
-           :switch -1)
-    )
-
-    ;; Links
-    (syntable :link *prop-preprocessor* nil
-       ;; No link string following "url="
-       (syntoken ">"
-           :nospec t
-           :property *prop-control*
-           :switch -1)
-       (syntoken "\""
-           :nospec t
-           :contained t
-           :begin :link-string)
-       (syntable :link-string *prop-sgml-link* nil
-           ;; Ignore escaped characters.
-           (syntoken "\\\\.")
-           ;; Rule to finish the link, note that returns two levels.
-           (syntoken "\""
-               :nospec t
-               :switch -2)
-       )
-    )
-
-    ;; "Special" tag
-    (syntoken "<!"
-       :nospec t
-       :contained t
-       :begin :special-tag)
-    ;;  Rules for "special" tags
-    (syntable :special-tag *prop-preprocessor* nil
-       (syntoken "["
-           :nospec t
-           :property *prop-preprocessor*
-           :begin :brackets)
-       ;; Finish the "special" tag
-       (syntoken ">"
-           :nospec t
-           :switch -1)
-       (syntable :brackets *prop-sgml-default* nil
-           (syntoken "]"
-               :nospec t
-               :property *prop-preprocessor*
-               :switch -1)
-           ;; Allow nesting.
-           (syntoken "["
-               :nospec t
-               :property *prop-preprocessor*
-               :begin :brackets)
-           ;; Entities.
-           (syntoken "%[a-zA-Z0-9_.-]+;?"
-               :property *prop-annotation*)
-           ;;  Allow everything inside the brackets
-           (synaugment :main)
-       )
-       ;; Don't use generic tag tokens, only create a rule for strings
-       (syntoken "\""
-           :nospec t
-           :begin :string
-           :contained t)
-       ;; Allow everything inside the "special" tag
-       (synaugment :main)
-    )
-
-    ;; Some "short" tags
-    (sgml-syntoken-short "tt")
-    (sgml-syntable-short "tt" *prop-sgml-tt*)
-    (sgml-syntoken-short "it")
-    (sgml-syntable-short "it" *prop-sgml-it*)
-    (sgml-syntoken-short "bf")
-    (sgml-syntable-short "bf" *prop-sgml-bf*)
-    (sgml-syntoken-short "em")
-    (sgml-syntable-short "em" *prop-sgml-bf*)
-
-    ;; Short tag
-    (syntoken "<\\w+/"
-       :property *prop-preprocessor*
-       :begin :short-tag)
-    (syntable :short-tag *prop-sgml-default-short* nil
-       (syntoken "/"
-           :nospec t
-           :property *prop-preprocessor*
-           :switch -1)
-       (syntoken "</?\\w+>"
-           :property *prop-control*
-           :switch -1)
-    )
-
-    ;;  Don't allow spaces, this may and may not be the start of a tag,
-    ;; but the syntax-highlight definition is not specialized...
-    (syntoken "<([^/a-zA-Z]|$)"
-       :property *prop-control*)
-
-    ;; Some tags that require an end tag
-    (sgml-syntoken "tt")
-    (sgml-syntable "tt" *prop-sgml-tt*)
-    (sgml-syntoken "code")
-    (sgml-syntable "code" *prop-sgml-tt*)
-    (sgml-syntoken "tag")
-    (sgml-syntable "tag" *prop-sgml-tt*)
-    (sgml-syntoken "verb")
-    (sgml-syntable "verb" *prop-sgml-tt*)
-    (sgml-syntoken "programlisting")
-    (sgml-syntable "programlisting" *prop-sgml-tt*)
-    (sgml-syntoken "it")
-    (sgml-syntable "it" *prop-sgml-it*)
-    (sgml-syntoken "bf")
-    (sgml-syntable "bf" *prop-sgml-bf*)
-    (sgml-syntoken "em")
-    (sgml-syntable "em" *prop-sgml-bf*)
-    (sgml-syntoken "mail")
-    (sgml-syntable "mail" *prop-sgml-email*)
-    (sgml-syntoken "email")
-    (sgml-syntable "email" *prop-sgml-email*)
-    (sgml-syntoken "screen")
-    (sgml-syntable "screen" *prop-sgml-screen*)
-    (sgml-syntoken "tscreen")
-    (sgml-syntable "tscreen" *prop-sgml-screen*)
-
-
-    ;;  Helper for tags that don't need an ending one.
-    ;;  NOTE: Since the parser is not specialized, if the tag is
-    ;;       folowed by one that has a special property defined here,
-    ;;       it may not be detected, i.e. put a <p> after the <sect>
-    ;;       and it will work.
-    (syntable :simple-nested-tag *prop-preprocessor* nil
-       ;; tag is still open, process any options
-       (synaugment :generic-tag)
-       (syntoken ">"
-           :nospec t
-           :property *prop-preprocessor*
-           :switch -3)
-    )
-    (sgml-syntoken "sect")
-    (sgml-syntable-simple "sect" *prop-sgml-sect*)
-    (sgml-syntoken "sect1")
-    (sgml-syntable-simple "sect1" *prop-sgml-sect*)
-    (sgml-syntoken "sect2")
-    (sgml-syntable-simple "sect2" *prop-sgml-sect*)
-
-    ;; Generic tags
-    (syntoken "<"
-       :nospec t
-       :contained t
-       :begin :tag)
-    ;; Table :generic-tag is defined to be augmented, no rule to finish it.
-    (syntable :generic-tag *prop-preprocessor* nil
-       ;; Start string
-       (syntoken "\""
-           :nospec t
-           :begin :string
-           :contained t)
-       ;; Start url link
-       (syntoken "url="
-           :nospec t
-           :begin :link)
-       ;; Cannot nest
-       (syntoken "<"
-           :nospec t
-           :property *prop-control*)
-    )
-    (syntable :tag *prop-preprocessor* nil
-       ;; Finish the tag
-       (syntoken ">"
-           :nospec t
-           :switch -1)
-       ;; Import generic definitions
-       (synaugment :generic-tag)
-    )
-)
diff --git a/xedit/lisp/modules/progmodes/sh.lsp b/xedit/lisp/modules/progmodes/sh.lsp
deleted file mode 100644 (file)
index b202039..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-;;
-;; Copyright (c) 2003 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/sh.lsp,v 1.1 2003/01/16 03:50:46 paulo Exp $
-;;
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-(defsynprop *prop-escape*
-    "escape"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "Red3")
-
-(defsynprop *prop-variable*
-    "variable"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "Gold4")
-
-(defsynprop *prop-backslash*
-    "backslash"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "green4")
-
-;; XXX it would be interesting if "here-documents" could be parsed
-;; just searching for "<<\s*EOF\\>" and then for "^EOF\\>" should
-;; handle most cases, but would be a hack...
-(defsyntax *sh-mode* :main nil #'default-indent nil
-    ;; keywords and common commands/builtins
-    (syntoken "\\<(if|then|elif|else|fi|case|in|esac|for|do|done|while|until|break|continue|eval|exit|exec|test|echo|cd|shift|local|return)\\>"
-       :property *prop-keyword*)
-
-    ; comments
-    (syntoken "#.*$" :property *prop-comment*)
-
-    ;; punctuation
-    (syntoken "[][;:*?(){}<>&!|$#]+" :property *prop-punctuation*)
-
-    ;; variable declaration
-    (syntoken "\\w+=" :property *prop-preprocessor*)
-
-    ;; numbers
-    (syntoken "\\<\\d+\\>" :property *prop-number*)
-
-    ;; escaped characters at toplevel
-    (syntoken "\\\\." :property *prop-backslash*)
-
-    ;; single quote
-    (syntoken "'" :nospec t :contained t :begin :single)
-    (syntable :single *prop-constant* nil
-       ;; do nothing, escaped characters
-       (syntoken "\\\\.")
-       (syntoken "'" :nospec t :switch -1)
-    )
-
-    ;; double quote
-    (syntoken "\"" :nospec t :contained t :begin :double)
-    (syntable :double *prop-string* #'default-indent
-       ;; escaped characters
-       (syntoken "\\\\." :property *prop-backslash*)
-       (syntoken "\"" :nospec t :switch -1)
-       ;; rule to start escape
-       (syntoken "`" :nospec t :contained t :begin :escape)
-       ;; ignore single quote, required because escape is augmented
-       (syntoken "'" :nospec t)
-       (synaugment :escape :variable)
-    )
-
-    ;; escaped commands
-    (syntoken "`" :nospec t :contained t :begin :escape)
-    (syntable :escape *prop-escape* #'default-indent
-       ;; escaped characters
-       (syntoken "\\\\." :property *prop-backslash*)
-       (syntoken "`" :nospec t :switch -1)
-       ;; rule to start double quote inside escape
-       (syntoken "\"" :nospec t :contained t :begin :double)
-       ;; rule to start single quote
-       (syntoken "'" :nospec t :contained t :begin :single)
-       (synaugment :double :variable)
-    )
-
-    (syntable :variable nil nil
-       (syntoken "\\$\\w+" :property *prop-variable*)
-    )
-    (synaugment :variable)
-)
diff --git a/xedit/lisp/modules/progmodes/xconf.lsp b/xedit/lisp/modules/progmodes/xconf.lsp
deleted file mode 100644 (file)
index 506f44b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-;;
-;; Copyright (c) 2003 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86$
-;;
-
-(require "syntax")
-(require "indent")
-(in-package "XEDIT")
-
-(defsyntax *xconf-mode* :main nil #'default-indent nil
-    ;; section start
-    (syntoken "\\<(Section|SubSection)\\>"
-       :property *prop-keyword* :icase t :begin :section)
-    ;; just for fun, highlight the section name differently
-    (syntable :section *prop-constant* #'default-indent
-       (syntoken "\"" :nospec t :begin :name)
-       (syntable :name *prop-constant* nil
-           ;; ignore escaped characters
-           (syntoken "\\\\.")
-           (syntoken "\"" :nospec t :switch -2)
-       )
-    )
-
-    ;; section end
-    (syntoken "\\<(EndSection|EndSubSection)\\>"
-       :property *prop-keyword* :icase t)
-
-    ;; numeric options
-    (syntoken "\\<\\d+(\\.\\d+)?\\>" :property *prop-number*)
-
-    ;; comments
-    (syntoken "#.*$" :property *prop-comment*)
-
-    ;; strings
-    (syntoken "\"" :nospec t :begin :string :contained t)
-    (syntable :string *prop-string* #'default-indent
-       ;; ignore escaped characters
-       (syntoken "\\\\.")
-       (syntoken "\"" :nospec t :switch -1)
-    )
-)
diff --git a/xedit/lisp/modules/progmodes/xlog.lsp b/xedit/lisp/modules/progmodes/xlog.lsp
deleted file mode 100644 (file)
index 3b57201..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-;;
-;; Copyright (c) 2003 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/xlog.lsp,v 1.1 2003/01/16 06:25:51 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-(defsynprop *prop-xlog-probe*
-    "xlog-probe"
-    :font      "*courier-medium-r*-12-*"
-    :background        "rgb:c/f/c")
-
-(defsynprop *prop-xlog-config*
-    "xlog-config"
-    :font      "*courier-medium-r*-12-*"
-    :background        "rgb:c/e/f")
-
-(defsynprop *prop-xlog-default*
-    "xlog-default"
-    :font      "*courier-medium-r*-12-*"
-    :background        "rgb:e/c/f")
-
-(defsynprop *prop-xlog-warning*
-    "xlog-warning"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "Red4"
-    :background        "Yellow1"
-)
-
-(defsynprop *prop-xlog-error*
-    "xlog-error"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "Yellow2"
-    :background        "Red3"
-)
-
-(defsyntax *xlog-mode* :main nil nil nil
-    ;; highlight version
-    (syntoken "^XFree86 Version \\S+" :property *prop-annotation*)
-
-    ;; release date
-    (syntoken "^Release Date: " :property *prop-keyword* :begin :note)
-
-    ;; highlight operating system description
-    (syntoken "^Build Operating System: " :property *prop-keyword* :begin :note)
-
-    (syntable :note *prop-annotation* nil (syntoken "$" :switch -1))
-
-    ;; don't highlight info lines
-    (syntoken "^\\(II\\) " :property *prop-keyword*)
-
-    ;; default lines
-    (syntoken "^\\(==\\) " :property *prop-keyword* :begin :default)
-    (syntable :default *prop-xlog-default* nil (syntoken "$" :switch -1))
-
-    ;; probe lines
-    (syntoken "^\\(--\\) " :property *prop-keyword* :begin :probe)
-    (syntable :probe *prop-xlog-probe* nil (syntoken "$" :switch -1))
-
-    ;; config lines
-    (syntoken "^\\(\\*\\*\\) " :property *prop-keyword* :begin :config)
-    (syntable :config *prop-xlog-config* nil (syntoken "$" :switch -1))
-
-    ;; warnings
-    (syntoken "^\\(WW\\) " :property *prop-keyword* :begin :warning)
-    (syntable :warning *prop-xlog-warning* nil (syntoken "$" :switch -1))
-
-    ;; errors
-    (syntoken "^\\(EE\\) " :property *prop-keyword* :begin :error)
-    (syntable :error *prop-xlog-error* nil (syntoken "$" :switch -1))
-
-    ;; command line and "uncommon" messages
-    (syntoken "^\\(..\\) " :property *prop-control* :begin :warning)
-)
diff --git a/xedit/lisp/modules/progmodes/xrdb.lsp b/xedit/lisp/modules/progmodes/xrdb.lsp
deleted file mode 100644 (file)
index a1cabac..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/progmodes/xrdb.lsp,v 1.2 2002/10/06 17:11:48 paulo Exp $
-;;
-
-(require "syntax")
-(in-package "XEDIT")
-
-(defsynprop *prop-xrdb-comment*
-    "xrdb-comment"
-    :font      "*courier-medium-o*-12-*"
-    :foreground        "sienna"
-)
-
-(defsynprop *prop-xrdb-special*
-    "format"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "RoyalBlue4"
-)
-
-(defsynprop *prop-xrdb-punctuation*
-    "punctuation"
-    :font      "-*-courier-bold-r-*-*-14-*-*-*-*-*-*-1"
-    :foreground        "OrangeRed4"
-)
-
-(defsyntax *xrdb-mode* :main nil nil nil
-    (syntoken "^\\s*!.*"
-       :property *prop-xrdb-comment*)
-    (syntoken "^\\s*#.*"
-       :property *prop-preprocessor*)
-    (syntoken "\\*|\\.|\\?"
-       :property *prop-xrdb-punctuation*
-       :begin :resource)
-    (syntoken "."
-       :nospec t
-       :begin :resource)
-
-    ;; Extra comments
-    (syntoken "/*" :nospec t :begin :comment :contained t)
-    (syntable :comment *prop-comment* nil
-       (syntoken "/*" :nospec t :property *prop-error*)
-       ;;  Rule to finish a comment.
-       (syntoken "*/" :nospec t :switch -1)
-    )
-
-    (syntable :resource nil nil
-       (syntoken "\\*|\\.|\\?" :property *prop-xrdb-punctuation*)
-       (syntoken ":\\s*" :property *prop-xrdb-punctuation* :begin :value)
-    )
-
-    (syntable :value *prop-string* nil
-       (syntoken "\\\\$" :property *prop-constant*)
-
-
-       ;; If the pattern ends at a newline, must switch to the previous state.
-       ;; Not sure yet how to better handle this. The parser does not detect
-       ;; eol because it is a match to the empty string. A possible hack
-       ;; would be to check if the pattern string ends in a "$", but probably
-       ;; better in this case to have a syntoken option, to tell the parser
-       ;; an eol may exist.
-       (syntoken
-           (string-concat
-               "("
-               "\\d+|"                         ;; numbers
-               "(#\\x+|rgb:\\x+/\\x+/\\x+)|"   ;; color spec
-               "#\\w+"                         ;; translation table
-               ")$")
-           :property *prop-xrdb-special* :switch -2)
-       (syntoken "(\\\\n?|\")$"
-           :property *prop-constant* :switch -2)
-
-       ;; XXX Cut&paste of the above, only without the match to eol
-       (syntoken
-           (string-concat
-               "("
-               "\\d+|"
-               "(#\\x+|rgb:\\x+/\\x+/\\x+)|"
-               "#\\w+"
-               ")")
-           :property *prop-xrdb-special*)
-       (syntoken "(\\\\n?|\")"
-           :property *prop-constant*)
-
-       (syntoken "/*" :nospec t :begin :comment :contained t)
-       (syntoken ".?$" :switch -2)
-    )
-)
diff --git a/xedit/lisp/modules/psql.c b/xedit/lisp/modules/psql.c
deleted file mode 100644 (file)
index 76d8d16..0000000
+++ /dev/null
@@ -1,983 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/modules/psql.c,v 1.12tsi Exp $ */
-
-#include <stdlib.h>
-#include <libpq-fe.h>
-#undef USE_SSL         /* cannot get it to compile... */
-#include <postgres.h>
-#include <utils/geo_decls.h>
-#include "lisp/internal.h"
-#include "lisp/private.h"
-
-/*
- * Prototypes
- */
-int psqlLoadModule(void);
-
-LispObj *Lisp_PQbackendPID(LispBuiltin*);
-LispObj *Lisp_PQclear(LispBuiltin*);
-LispObj *Lisp_PQconsumeInput(LispBuiltin*);
-LispObj *Lisp_PQdb(LispBuiltin*);
-LispObj *Lisp_PQerrorMessage(LispBuiltin*);
-LispObj *Lisp_PQexec(LispBuiltin*);
-LispObj *Lisp_PQfinish(LispBuiltin*);
-LispObj *Lisp_PQfname(LispBuiltin*);
-LispObj *Lisp_PQfnumber(LispBuiltin*);
-LispObj *Lisp_PQfsize(LispBuiltin*);
-LispObj *Lisp_PQftype(LispBuiltin*);
-LispObj *Lisp_PQgetlength(LispBuiltin*);
-LispObj *Lisp_PQgetvalue(LispBuiltin*);
-LispObj *Lisp_PQhost(LispBuiltin*);
-LispObj *Lisp_PQnfields(LispBuiltin*);
-LispObj *Lisp_PQnotifies(LispBuiltin*);
-LispObj *Lisp_PQntuples(LispBuiltin*);
-LispObj *Lisp_PQoptions(LispBuiltin*);
-LispObj *Lisp_PQpass(LispBuiltin*);
-LispObj *Lisp_PQport(LispBuiltin*);
-LispObj *Lisp_PQresultStatus(LispBuiltin*);
-LispObj *Lisp_PQsetdb(LispBuiltin*);
-LispObj *Lisp_PQsetdbLogin(LispBuiltin*);
-LispObj *Lisp_PQsocket(LispBuiltin*);
-LispObj *Lisp_PQstatus(LispBuiltin*);
-LispObj *Lisp_PQtty(LispBuiltin*);
-LispObj *Lisp_PQuser(LispBuiltin*);
-
-/*
- * Initialization
- */
-static LispBuiltin lispbuiltins[] = {
-    {LispFunction, Lisp_PQbackendPID, "pq-backend-pid connection"},
-    {LispFunction, Lisp_PQclear, "pq-clear result"},
-    {LispFunction, Lisp_PQconsumeInput, "pq-consume-input connection"},
-    {LispFunction, Lisp_PQdb, "pq-db connection"},
-    {LispFunction, Lisp_PQerrorMessage, "pq-error-message connection"},
-    {LispFunction, Lisp_PQexec, "pq-exec connection query"},
-    {LispFunction, Lisp_PQfinish, "pq-finish connection"},
-    {LispFunction, Lisp_PQfname, "pq-fname result field-number"},
-    {LispFunction, Lisp_PQfnumber, "pq-fnumber result field-name"},
-    {LispFunction, Lisp_PQfsize, "pq-fsize result field-number"},
-    {LispFunction, Lisp_PQftype, "pq-ftype result field-number"},
-    {LispFunction, Lisp_PQgetlength, "pq-getlength result tupple field-number"},
-    {LispFunction, Lisp_PQgetvalue, "pq-getvalue result tupple field-number &optional type"},
-    {LispFunction, Lisp_PQhost, "pq-host connection"},
-    {LispFunction, Lisp_PQnfields, "pq-nfields result"},
-    {LispFunction, Lisp_PQnotifies, "pq-notifies connection"},
-    {LispFunction, Lisp_PQntuples, "pq-ntuples result"},
-    {LispFunction, Lisp_PQoptions, "pq-options connection"},
-    {LispFunction, Lisp_PQpass, "pq-pass connection"},
-    {LispFunction, Lisp_PQport, "pq-port connection"},
-    {LispFunction, Lisp_PQresultStatus, "pq-result-status result"},
-    {LispFunction, Lisp_PQsetdb, "pq-setdb host port options tty dbname"},
-    {LispFunction, Lisp_PQsetdbLogin, "pq-setdb-login host port options tty dbname login password"},
-    {LispFunction, Lisp_PQsocket, "pq-socket connection"},
-    {LispFunction, Lisp_PQstatus, "pq-status connection"},
-    {LispFunction, Lisp_PQtty, "pq-tty connection"},
-    {LispFunction, Lisp_PQuser, "pq-user connection"},
-};
-
-LispModuleData psqlLispModuleData = {
-    LISP_MODULE_VERSION,
-    psqlLoadModule
-};
-
-static int PGconn_t, PGresult_t;
-
-/*
- * Implementation
- */
-int
-psqlLoadModule(void)
-{
-    int i;
-    char *fname = "PSQL-LOAD-MODULE";
-
-    PGconn_t = LispRegisterOpaqueType("PGconn*");
-    PGresult_t = LispRegisterOpaqueType("PGresult*");
-
-    GCDisable();
-    /* NOTE: Implemented just enough to make programming examples
-     * (and my needs) work.
-     * Completing this is an exercise to the reader, or may be implemented
-     * when/if required.
-     */
-    LispExecute("(DEFSTRUCT PG-NOTIFY RELNAME BE-PID)\n"
-               "(DEFSTRUCT PG-POINT X Y)\n"
-               "(DEFSTRUCT PG-BOX HIGH LOW)\n"
-               "(DEFSTRUCT PG-POLYGON SIZE NUM-POINTS BOUNDBOX POINTS)\n");
-
-    /* enum ConnStatusType */
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-OK"),
-                         REAL(CONNECTION_OK), fname, 0);
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-BAD"),
-                         REAL(CONNECTION_BAD), fname, 0);
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-STARTED"),
-                         REAL(CONNECTION_STARTED), fname, 0);
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-MADE"),
-                         REAL(CONNECTION_MADE), fname, 0);
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-AWAITING-RESPONSE"),
-                         REAL(CONNECTION_AWAITING_RESPONSE), fname, 0);
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-AUTH-OK"),
-                         REAL(CONNECTION_AUTH_OK), fname, 0);
-    (void)LispSetVariable(ATOM2("PG-CONNECTION-SETENV"),
-                         REAL(CONNECTION_SETENV), fname, 0);
-
-
-    /* enum ExecStatusType */
-    (void)LispSetVariable(ATOM2("PGRES-EMPTY-QUERY"),
-                         REAL(PGRES_EMPTY_QUERY), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-COMMAND-OK"),
-                         REAL(PGRES_COMMAND_OK), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-TUPLES-OK"),
-                         REAL(PGRES_TUPLES_OK), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-COPY-OUT"),
-                         REAL(PGRES_COPY_OUT), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-COPY-IN"),
-                         REAL(PGRES_COPY_IN), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-BAD-RESPONSE"),
-                         REAL(PGRES_BAD_RESPONSE), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-NONFATAL-ERROR"),
-                         REAL(PGRES_NONFATAL_ERROR), fname, 0);
-    (void)LispSetVariable(ATOM2("PGRES-FATAL-ERROR"),
-                         REAL(PGRES_FATAL_ERROR), fname, 0);
-    GCEnable();
-
-    for (i = 0; i < sizeof(lispbuiltins) / sizeof(lispbuiltins[0]); i++)
-       LispAddBuiltinFunction(&lispbuiltins[i]);
-
-    return (1);
-}
-
-LispObj *
-Lisp_PQbackendPID(LispBuiltin *builtin)
-/*
- pq-backend-pid connection
- */
-{
-    int pid;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    pid = PQbackendPID(conn);
-
-    return (INTEGER(pid));
-}
-
-LispObj *
-Lisp_PQclear(LispBuiltin *builtin)
-/*
- pq-clear result
- */
-{
-    PGresult *res;
-
-    LispObj *result;
-
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    PQclear(res);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_PQconsumeInput(LispBuiltin *builtin)
-/*
- pq-consume-input connection
- */
-{
-    int result;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    result = PQconsumeInput(conn);
-
-    return (INTEGER(result));
-}
-
-LispObj *
-Lisp_PQdb(LispBuiltin *builtin)
-/*
- pq-db connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQdb(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQerrorMessage(LispBuiltin *builtin)
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQerrorMessage(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQexec(LispBuiltin *builtin)
-/*
- pq-exec connection query
- */
-{
-    PGconn *conn;
-    PGresult *res;
-
-    LispObj *connection, *query;
-
-    query = ARGUMENT(1);
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    CHECK_STRING(query);
-    res = PQexec(conn, THESTR(query));
-
-    return (res ? OPAQUE(res, PGresult_t) : NIL);
-}
-
-LispObj *
-Lisp_PQfinish(LispBuiltin *builtin)
-/*
- pq-finish connection
- */
-{
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    PQfinish(conn);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_PQfname(LispBuiltin *builtin)
-/*
- pq-fname result field-number
- */
-{
-    char *string;
-    int field;
-    PGresult *res;
-
-    LispObj *result, *field_number;
-
-    field_number = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    CHECK_INDEX(field_number);
-    field = FIXNUM_VALUE(field_number);
-
-    string = PQfname(res, field);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQfnumber(LispBuiltin *builtin)
-/*
- pq-fnumber result field-name
- */
-{
-    int number;
-    int field;
-    PGresult *res;
-
-    LispObj *result, *field_name;
-
-    field_name = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    CHECK_STRING(field_name);
-    number = PQfnumber(res, THESTR(field_name));
-
-    return (INTEGER(number));
-}
-
-LispObj *
-Lisp_PQfsize(LispBuiltin *builtin)
-/*
- pq-fsize result field-number
- */
-{
-    int size, field;
-    PGresult *res;
-
-    LispObj *result, *field_number;
-
-    field_number = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    CHECK_INDEX(field_number);
-    field = FIXNUM_VALUE(field_number);
-
-    size = PQfsize(res, field);
-
-    return (INTEGER(size));
-}
-
-LispObj *
-Lisp_PQftype(LispBuiltin *builtin)
-{
-    Oid oid;
-    int field;
-    PGresult *res;
-
-    LispObj *result, *field_number;
-
-    field_number = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    CHECK_INDEX(field_number);
-    field = FIXNUM_VALUE(field_number);
-
-    oid = PQftype(res, field);
-
-    return (INTEGER(oid));
-}
-
-LispObj *
-Lisp_PQgetlength(LispBuiltin *builtin)
-/*
- pq-getlength result tupple field-number
- */
-{
-    PGresult *res;
-    int tuple, field, length;
-
-    LispObj *result, *otupple, *field_number;
-
-    field_number = ARGUMENT(2);
-    otupple = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    CHECK_INDEX(otupple);
-    tuple = FIXNUM_VALUE(otupple);
-
-    CHECK_INDEX(field_number);
-    field = FIXNUM_VALUE(field_number);
-
-    length = PQgetlength(res, tuple, field);
-
-    return (INTEGER(length));
-}
-
-LispObj *
-Lisp_PQgetvalue(LispBuiltin *builtin)
-/*
- pq-getvalue result tuple field &optional type-specifier
- */
-{
-    char *string;
-    double real = 0.0;
-    PGresult *res;
-    int tuple, field, isint = 0, isreal = 0, integer;
-
-    LispObj *result, *otupple, *field_number, *type;
-
-    type = ARGUMENT(3);
-    field_number = ARGUMENT(2);
-    otupple = ARGUMENT(1);
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    CHECK_INDEX(otupple);
-    tuple = FIXNUM_VALUE(otupple);
-
-    CHECK_INDEX(field_number);
-    field = FIXNUM_VALUE(field_number);
-
-    string = PQgetvalue(res, tuple, field);
-
-    if (type != UNSPEC) {
-       char *typestring;
-
-       CHECK_SYMBOL(type);
-       typestring = ATOMID(type);
-
-       if (strcmp(typestring, "INT16") == 0) {
-           integer = *(short*)string;
-           isint = 1;
-           goto simple_type;
-       }
-       else if (strcmp(typestring, "INT32") == 0) {
-           integer = *(int*)string;
-           isint = 1;
-           goto simple_type;
-       }
-       else if (strcmp(typestring, "FLOAT") == 0) {
-           real = *(float*)string;
-           isreal = 1;
-           goto simple_type;
-       }
-       else if (strcmp(typestring, "REAL") == 0) {
-           real = *(double*)string;
-           isreal = 1;
-           goto simple_type;
-       }
-       else if (strcmp(typestring, "PG-POLYGON") == 0)
-           goto polygon_type;
-       else if (strcmp(typestring, "STRING") != 0)
-           LispDestroy("%s: unknown type %s",
-                       STRFUN(builtin), typestring);
-    }
-
-simple_type:
-    return (isint ? INTEGER(integer) : isreal ? DFLOAT(real) :
-           (string ? STRING(string) : NIL));
-
-polygon_type:
-  {
-    LispObj *poly, *box, *p = NIL, *cdr, *obj;
-    POLYGON *polygon;
-    int i, size;
-
-    size = PQgetlength(res, tuple, field);
-    polygon = (POLYGON*)(string - sizeof(int));
-
-    GCDisable();
-    /* get polygon->boundbox */
-    cdr = EVAL(CONS(ATOM("MAKE-PG-POINT"),
-                   CONS(KEYWORD("X"),
-                        CONS(REAL(polygon->boundbox.high.x),
-                             CONS(KEYWORD("Y"),
-                                  CONS(REAL(polygon->boundbox.high.y), NIL))))));
-    obj = EVAL(CONS(ATOM("MAKE-PG-POINT"),
-                   CONS(KEYWORD("X"),
-                        CONS(REAL(polygon->boundbox.low.x),
-                             CONS(KEYWORD("Y"),
-                                  CONS(REAL(polygon->boundbox.low.y), NIL))))));
-    box = EVAL(CONS(ATOM("MAKE-PG-BOX"),
-                   CONS(KEYWORD("HIGH"),
-                        CONS(cdr,
-                             CONS(KEYWORD("LOW"),
-                                  CONS(obj, NIL))))));
-    /* get polygon->p values */
-    for (i = 0; i < polygon->npts; i++) {
-       obj = EVAL(CONS(ATOM("MAKE-PG-POINT"),
-                       CONS(KEYWORD("X"),
-                            CONS(REAL(polygon->p[i].x),
-                             CONS(KEYWORD("Y"),
-                                  CONS(REAL(polygon->p[i].y), NIL))))));
-       if (i == 0)
-           p = cdr = CONS(obj, NIL);
-       else {
-           RPLACD(cdr, CONS(obj, NIL));
-           cdr = CDR(cdr);
-       }
-    }
-
-    /* make result */
-    poly = EVAL(CONS(ATOM("MAKE-PG-POLYGON"),
-                    CONS(KEYWORD("SIZE"),
-                         CONS(REAL(size),
-                              CONS(KEYWORD("NUM-POINTS"),
-                                   CONS(REAL(polygon->npts),
-                                        CONS(KEYWORD("BOUNDBOX"),
-                                             CONS(box,
-                                                  CONS(KEYWORD("POINTS"),
-                                                       CONS(QUOTE(p), NIL))))))))));
-    GCEnable();
-
-    return (poly);
-  }
-}
-
-LispObj *
-Lisp_PQhost(LispBuiltin *builtin)
-/*
- pq-host connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQhost(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQnfields(LispBuiltin *builtin)
-/*
- pq-nfields result
- */
-{
-    int nfields;
-    PGresult *res;
-
-    LispObj *result;
-
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    nfields = PQnfields(res);
-
-    return (INTEGER(nfields));
-}
-
-LispObj *
-Lisp_PQnotifies(LispBuiltin *builtin)
-/*
- pq-notifies connection
- */
-{
-    LispObj *result, *code, *cod = COD;
-    PGconn *conn;
-    PGnotify *notifies;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    if ((notifies = PQnotifies(conn)) == NULL)
-       return (NIL);
-
-    GCDisable();
-    code = CONS(ATOM("MAKE-PG-NOTIFY"),
-                 CONS(KEYWORD("RELNAME"),
-                      CONS(STRING(notifies->relname),
-                           CONS(KEYWORD("BE-PID"),
-                                CONS(REAL(notifies->be_pid), NIL)))));
-    COD = CONS(code, COD);
-    GCEnable();
-    result = EVAL(code);
-    COD = cod;
-
-    free(notifies);
-
-    return (result);
-}
-
-LispObj *
-Lisp_PQntuples(LispBuiltin *builtin)
-/*
- pq-ntuples result
- */
-{
-    int ntuples;
-    PGresult *res;
-
-    LispObj *result;
-
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    ntuples = PQntuples(res);
-
-    return (INTEGER(ntuples));
-}
-
-LispObj *
-Lisp_PQoptions(LispBuiltin *builtin)
-/*
- pq-options connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQoptions(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQpass(LispBuiltin *builtin)
-/*
- pq-pass connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQpass(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQport(LispBuiltin *builtin)
-/*
- pq-port connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQport(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQresultStatus(LispBuiltin *builtin)
-/*
- pq-result-status result
- */
-{
-    int status;
-    PGresult *res;
-
-    LispObj *result;
-
-    result = ARGUMENT(0);
-
-    if (!CHECKO(result, PGresult_t))
-       LispDestroy("%s: cannot convert %s to PGresult*",
-                   STRFUN(builtin), STROBJ(result));
-    res = (PGresult*)(result->data.opaque.data);
-
-    status = PQresultStatus(res);
-
-    return (INTEGER(status));
-}
-
-LispObj *
-LispPQsetdb(LispBuiltin *builtin, int loginp)
-/*
- pq-setdb host port options tty dbname
- pq-setdb-login host port options tty dbname login password
- */
-{
-    PGconn *conn;
-    char *host, *port, *options, *tty, *dbname, *login, *password;
-
-    LispObj *ohost, *oport, *ooptions, *otty, *odbname, *ologin, *opassword;
-
-    if (loginp) {
-       opassword = ARGUMENT(6);
-       ologin = ARGUMENT(5);
-    }
-    else
-       opassword = ologin = NIL;
-    odbname = ARGUMENT(4);
-    otty = ARGUMENT(3);
-    ooptions = ARGUMENT(2);
-    oport = ARGUMENT(1);
-    ohost = ARGUMENT(0);
-
-    if (ohost != NIL) {
-       CHECK_STRING(ohost);
-       host = THESTR(ohost);
-    }
-    else
-       host = NULL;
-
-    if (oport != NIL) {
-       CHECK_STRING(oport);
-       port = THESTR(oport);
-    }
-    else
-       port = NULL;
-
-    if (ooptions != NIL) {
-       CHECK_STRING(ooptions);
-       options = THESTR(ooptions);
-    }
-    else
-       options = NULL;
-
-    if (otty != NIL) {
-       CHECK_STRING(otty);
-       tty = THESTR(otty);
-    }
-    else
-       tty = NULL;
-
-    if (odbname != NIL) {
-       CHECK_STRING(odbname);
-       dbname = THESTR(odbname);
-    }
-    else
-       dbname = NULL;
-
-    if (ologin != NIL) {
-       CHECK_STRING(ologin);
-       login = THESTR(ologin);
-    }
-    else
-       login = NULL;
-
-    if (opassword != NIL) {
-       CHECK_STRING(opassword);
-       password = THESTR(opassword);
-    }
-    else
-       password = NULL;
-
-    conn = PQsetdbLogin(host, port, options, tty, dbname, login, password);
-
-    return (conn ? OPAQUE(conn, PGconn_t) : NIL);
-}
-
-LispObj *
-Lisp_PQsetdb(LispBuiltin *builtin)
-/*
- pq-setdb host port options tty dbname
- */
-{
-    return (LispPQsetdb(builtin, 0));
-}
-
-LispObj *
-Lisp_PQsetdbLogin(LispBuiltin *builtin)
-/*
- pq-setdb-login host port options tty dbname login password
- */
-{
-    return (LispPQsetdb(builtin, 1));
-}
-
-LispObj *
-Lisp_PQsocket(LispBuiltin *builtin)
-/*
- pq-socket connection
- */
-{
-    int sock;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    sock = PQsocket(conn);
-
-    return (INTEGER(sock));
-}
-
-LispObj *
-Lisp_PQstatus(LispBuiltin *builtin)
-/*
- pq-status connection
- */
-{
-    int status;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    status = PQstatus(conn);
-
-    return (INTEGER(status));
-}
-
-LispObj *
-Lisp_PQtty(LispBuiltin *builtin)
-/*
- pq-tty connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQtty(conn);
-
-    return (string ? STRING(string) : NIL);
-}
-
-LispObj *
-Lisp_PQuser(LispBuiltin *builtin)
-/*
- pq-user connection
- */
-{
-    char *string;
-    PGconn *conn;
-
-    LispObj *connection;
-
-    connection = ARGUMENT(0);
-
-    if (!CHECKO(connection, PGconn_t))
-       LispDestroy("%s: cannot convert %s to PGconn*",
-                   STRFUN(builtin), STROBJ(connection));
-    conn = (PGconn*)(connection->data.opaque.data);
-
-    string = PQuser(conn);
-
-    return (string ? STRING(string) : NIL);
-}
diff --git a/xedit/lisp/modules/syntax.lsp b/xedit/lisp/modules/syntax.lsp
deleted file mode 100644 (file)
index 7ae434c..0000000
+++ /dev/null
@@ -1,1452 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/modules/syntax.lsp,v 1.11 2003/01/16 03:50:46 paulo Exp $
-;;
-
-(provide "syntax")
-(require "xedit")
-(in-package "XEDIT")
-
-(defvar *syntax-symbols* '(
-    syntax-highlight defsyntax defsynprop synprop-p syntax-p
-    syntable syntoken synaugment
-    *prop-default* *prop-keyword* *prop-number* *prop-string*
-    *prop-constant* *prop-comment* *prop-preprocessor*
-    *prop-punctuation* *prop-error* *prop-annotation*
-))
-(export *syntax-symbols*)
-(in-package "USER")
-(dolist (symbol xedit::*syntax-symbols*)
-    (import symbol)
-)
-(in-package "XEDIT")
-(makunbound '*syntax-symbols*)
-
-#|
-TODO:
-o Add a command to match without increment the offset in the input, this
-  may be useful for example in a case like:
-       some-table
-           match "<"
-               switch -1
-       match "<"       <- the table already eated this, so it won't be matched.
-  This must be carefully checked at compile time, such instruction should
-  be in a token that returns or starts a new one, and even then, may need
-  runtime check to make sure it won't enter an infinite loop.
-o Allow combining properties, this is supported in Xaw, and could allow some
-  very interesting effects for complex documents.
-o Maybe have an separated function/loop for tables that don't have tokens
-  that start/switch to another table, and/or have the contained attribute set.
-  This could allow running considerably faster.
-o Do a better handling of interactive edition for tokens that start and end
-  with the same pattern, as an example strings, if the user types '"', it
-  will parse up to the end of the file, "inverting" all strings.
-o Allow generic code to be run once a match is found, such code could handle
-  some defined variables and take decisions based on the parser state. This
-  should be detected at compile time, to maybe run a different parser for
-  such syntax tables, due to the extra time building the environment to
-  call the code. This would be useful to "really" parse documents with
-  complex syntax, for example, a man page source file.
-o Add command to change current default property without initializing a new
-  state.
-o Fix problems matching EOL. Since EOL is an empty string match, if there
-  is a rule to match only EOL, but some other rule matches up to the end
-  of the input, the match to EOL will not be recognized. Currently the only
-  way to handle this is to have a nested table that always returns once a
-  match is found, so that it will restart the match loop code even if the
-  input is at EOL.
-  One possible solution would be to add the ending newline to the input,
-  and then instead of matching "$", should match "\\n".
-o XXX Usage of the variable newline-property must be reviewed in function
-  syntax-highlight, if the text property has a background attribute,
-  visual effect will look "strange", will paint a square with the
-  background attribute at the end of every line in the matched text.
-|#
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Some annotations to later write documentation for the module...
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-#|
-    The current interface logic should be easy to understand for people
-that have written lex scanners before. It has some extended semantics,
-that could be translated to stacked BEGIN() statements in lex, but
-currently does not have rules for matches in the format RE/TRAILING, as
-well as code attached to rules (the biggest difference) and/or things
-like REJECT and unput(). Also, at least currently, it is *really* quite
-slower than lex.
-
-       MATCHING RULES
-       --------------
-    When two tokens are matched at the same input offset, the longest
-token is used, if the length is the same, the first definition is
-used. For example:
-       token1  =>      int
-       token2  =>      [A-Za-z]+
-       input   =>      integer
-    Token1 matches "int" and token2 matches "integer", but since token2 is
-longer, it is used. But in the case:
-       token1  =>      int
-       token2  =>      [A-Za-z]+
-       input   =>      int
-    Both, token1 and token2 match "int", since token1 is defined first, it
-is used.
-|#
-
-
-;;  Initialize some default properties that may be shared in syntax
-;; highlight definitions. Use of these default properties is encouraged,
-;; so that "tokens" will be shown identically when editing program
-;; sources in different programming languages.
-(defsynprop *prop-default*
-    "default"
-    :font      "*courier-medium-r*-12-*"
-    :foreground        "black")
-
-(defsynprop *prop-keyword*
-    "keyword"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "gray12")
-
-(defsynprop *prop-number*
-    "number"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "OrangeRed3")
-
-(defsynprop *prop-string*
-    "string"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "RoyalBlue2")
-
-(defsynprop *prop-constant*
-    "constant"
-    :font      "*lucidatypewriter-medium-r*-12-*"
-    :foreground        "VioletRed3")
-
-(defsynprop *prop-comment*
-    "comment"
-    :font      "*courier-medium-o*-12-*"
-    :foreground        "SlateBlue3")
-
-(defsynprop *prop-preprocessor*
-    "preprocessor"
-    :font      "*courier-medium-r*-12-*"
-    :foreground        "green4")
-
-(defsynprop *prop-punctuation*
-    "punctuation"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "gray12")
-
-;; Control characters, not always errors...
-(defsynprop *prop-control*
-    "control"
-    :font      "*courier-bold-r*-12-*"
-    :foreground        "yellow2"
-    :background        "red3")
-
-(defsynprop *prop-error*
-    "error"
-    :font      "*new century schoolbook-bold*-24-*"
-    :foreground        "yellow"
-    :background        "red")
-
-(defsynprop *prop-annotation*
-    "annotation"
-    :font      "*courier-medium-r*-12-*"
-    :foreground        "black"
-    :background        "PaleGreen")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  The "main" definition of the syntax highlight coding interface.
-;;  Creates a "special" variable with the given name, associating to
-;; it an already compiled syntax table.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro defsyntax (variable label property indent options &rest lists)
-    `(if (boundp ',variable)
-       ,variable
-       (progn
-           (proclaim '(special ,variable))
-           (setq ,variable
-               (compile-syntax-table
-                   (string ',variable) ,options
-                   (syntable ,label ,property ,indent ,@lists)
-               )
-           )
-       )
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Just a wrapper to create a hash-table and bound it to a symbol.
-;;  Example of call:
-;;     (defsynoptions *my-syntax-options*
-;;         (:indent            .       8)
-;;         (:indent-option-1   .       1)
-;;         (:indent-option-2   .       2)
-;;     )
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro defsynoptions (variable &rest options)
-    `(if (boundp ',variable)
-       ,variable
-       (progn
-           (proclaim '(special ,variable))
-           (setq ,variable (make-hash-table :initial-contents ',options))
-       )
-    )
-)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; These definitions should be "private".
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defstruct syntoken
-    regex              ;; A compiled regexp.
-    property           ;; NIL for default, or a synprop structure.
-    contained          ;; Only used when switch/begin is not NIL. Values:
-                       ;;      NIL       -> just switch to or begin new
-                       ;;                   syntax table.
-                       ;;      (not NIL) -> apply syntoken property
-                       ;;                   (or default one) to matched
-                       ;;                   text *after* switching to or
-                       ;;                   beginning a new syntax table.
-    switch             ;; Values for switch are:
-                       ;;      NIL       -> do nothing
-                       ;;      A keyword -> switch to the syntax table
-                       ;;                   identified by the keyword.
-                       ;;      A negative integer -> Pop the stack
-                       ;;                            -<swich-value> times.
-                       ;;                            A common value is -1,
-                       ;;                           to switch to the previous
-                       ;;                           state, but some times
-                       ;;                           it is desired to return
-                       ;;                           two or more times in
-                       ;;                           in the stack.
-                       ;;  NOTE: This is actually a jump, the stack is
-                       ;; popped until the named syntax table is found,
-                       ;; if the stack becomes empty, a new state is
-                       ;; implicitly created.
-    begin              ;;  NIL or a keyword (like switch), but instead of
-                       ;; popping the stack, it pushes the current syntax
-                       ;; table to the stack and sets a new current one.
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Just a wrapper to make-syntoken.
-;;     TODO: Add support for structure constructors.
-;;     XXX: Note that the NOSUB only works with the xedit regex, it
-;; will still return the match offsets, but will ignore subexpressions,
-;; that is, parenthesis are used only for grouping.
-;;     TODO: Create a new version of the re-exec call that returns
-;; offsets in the format (<from> . <to>) and not
-;; ((<from0> . <to0>) ... (<fromN> . <toN>)). Only the global result
-;; is expected/used, so there is no reason to allocate more than one
-;; cons cell per call.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun syntoken (pattern
-                &key icase nospec property contained switch begin (nosub t)
-                &aux
-                (regex
-                   (re-comp pattern :icase icase :nospec nospec :nosub nosub)
-                )
-                check)
-
-    ;;  Don't allow a regex that matches the null string enter the
-    ;; syntax table list.
-    (if (consp (setq check (re-exec regex "" :noteol t :notbol t)))
-#+xedit        (error "SYNTOKEN: regex matches empty string ~S" regex)
-#-xedit        ()
-    )
-
-    (make-syntoken
-       :regex          regex
-       :property       property
-       :contained      contained
-       :switch         switch
-       :begin          begin
-    )
-)
-
-
-;;  This structure is defined only to do some type checking, it just
-;; holds a list of keywords.
-(defstruct synaugment
-    labels             ;; List of keywords labeling syntax tables.
-)
-
-(defstruct syntable
-    label              ;; A keyword naming this syntax table.
-    property           ;; NIL or a default synprop structure.
-    indent             ;; Indentation function for the syntax table.
-    tokens             ;; A list of syntoken structures.
-    tables             ;; A list of syntable structures.
-    augments           ;;  A list of synaugment structures, used only
-                       ;; at "compile time", so that a table can be
-                       ;; used before it's definition.
-    bol                        ;;  One of the tokens match the empty string at
-                       ;; the start of a line (loop optimization hint).
-                       ;; Field filled at "link" time.
-    eol                        ;;  Same comments as bol, but in this case, for
-                       ;; the empty string at the end of a line.
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Just call make-syntable, but sorts the elements by type, allowing
-;; a cleaner code when defining the syntax highlight rules.
-;; XXX Same comments as for syntoken about the use of a constructor for
-;; structures. TODO: when/if clos is implemented in the interpreter.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun syntable (label default-property indent &rest definitions)
-
-    ;; Check for possible errors in the arguments.
-    (unless (keywordp label)
-       (error "SYNTABLE: ~A is not a keyword" label)
-    )
-    (unless
-       (or
-           (null default-property)
-           (synprop-p default-property)
-       )
-       (error "SYNTABLE: ~A is an invalid text property"
-           default-property
-       )
-    )
-
-    ;; Don't allow unknown data in the definition list.
-    ;; XXX typecase should be added to the interpreter, and since
-    ;;     the code is traversing the entire list, it could build
-    ;;     now the arguments to make-syntable.
-    (dolist (item definitions)
-       (unless
-           (or
-
-               ;;  Allow NIL in the definition list, so that one
-               ;; can put conditionals in the syntax definition,
-               ;; and if the conditional is false, fill the slot
-               ;; with a NIL value.
-               (atom item)
-               (syntoken-p item)
-               (syntable-p item)
-               (synaugment-p item)
-           )
-           (error "SYNTABLE: invalid syntax table argument ~A" item)
-       )
-    )
-
-    ;; Build the syntax table.
-    (make-syntable
-       :label          label
-       :property       default-property
-       :indent         indent
-       :tokens         (remove-if-not #'syntoken-p definitions)
-       :tables         (remove-if-not #'syntable-p definitions)
-       :augments       (remove-if-not #'synaugment-p definitions)
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Just to do a "preliminary" error checking, every element must be a
-;; a keyword, and also check for reserved names.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun synaugment (&rest keywords)
-    (dolist (keyword keywords)
-       (unless (keywordp keyword)
-           (error "SYNAUGMENT: bad syntax table label ~A" keyword)
-       )
-    )
-    (make-synaugment :labels keywords)
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Recursive compile utility function.
-;; Returns a cons in the format:
-;;     car     =>      List of all syntoken structures
-;;                     (including child tables).
-;;     cdr     =>      List of all child syntable structures.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun list-syntable-elements (table &aux result sub-result)
-    (setq
-       result
-       (cons
-           (syntable-tokens table)
-           (syntable-tables table))
-    )
-
-    ;; For every child syntax table.
-    (dolist (child (syntable-tables table))
-
-       ;; Recursively call list-syntable-elements.
-       (setq sub-result (list-syntable-elements child))
-
-       (rplaca result (append (car result) (car sub-result)))
-       (rplacd result (append (cdr result) (cdr sub-result)))
-    )
-
-    ;; Return the pair of nested tokens and tables.
-    result
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Append tokens of the augment list to the tokens of the specified
-;; syntax table.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-syntax-augment-list (table table-list
-                                   &aux labels augment tokens)
-
-    ;; Create a list of all augment tables.
-    (dolist (augment (syntable-augments table))
-       (setq labels (append labels (synaugment-labels augment)))
-    )
-
-    ;;  Remove duplicates and references to "itself",
-    ;; without warnings?
-    (setq
-       labels
-       (remove
-           (syntable-label table)
-           (remove-duplicates labels :from-end t)
-       )
-    )
-
-    ;; Check if the specified syntax tables exists!
-    (dolist (label labels)
-       (unless
-           (setq
-               augment
-               (car (member label table-list :key #'syntable-label))
-           )
-           (error "COMPILE-SYNTAX-AUGMENT-LIST: Cannot augment ~A in ~A"
-               label
-               (syntable-label table)
-           )
-       )
-
-       ;; Increase list of tokens.
-       (setq tokens (append tokens (syntable-tokens augment)))
-    )
-
-    ;;  Store the tokens in the augment list. They will be added
-    ;; to the syntax table in the second pass.
-    (setf (syntable-augments table) tokens)
-
-    ;;  Recurse on every child table.
-    (dolist (child (syntable-tables table))
-       (compile-syntax-augment-list child table-list)
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Just add the augmented tokens to the token list, recursing on
-;; every child syntax table.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun link-syntax-augment-table (table)
-    (setf
-       (syntable-tokens table)
-       ;;  When augmenting a table, duplicated tokens or different tokens
-       ;; that use the same regex pattern should be common.
-       (remove-duplicates
-           (nconc (syntable-tokens table) (syntable-augments table))
-           :key        #'syntoken-regex
-           :test       #'equal
-           :from-end   t
-       )
-
-       ;;  Don't need to keep this list anymore.
-       (syntable-augments table)
-       ()
-    )
-
-    ;;  Check if one of the tokens match the empty string at the
-    ;; start or end of a text line. XXX The fields bol and eol
-    ;; are expected to be initialized to NIL.
-    (dolist (token (syntable-tokens table))
-       (when (consp (re-exec (syntoken-regex token) "" :noteol t))
-           (setf (syntable-bol table) t)
-           (return)
-       )
-    )
-    (dolist (token (syntable-tokens table))
-       (when (consp (re-exec (syntoken-regex token) "" :notbol t))
-           (setf (syntable-eol table) t)
-           (return)
-       )
-    )
-
-    (dolist (child (syntable-tables table))
-       (link-syntax-augment-table child)
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; "Compile" the main structure of the syntax highlight code.
-;; Variables "switches" and "begins" are used only for error checking.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-syntax-table (name options main-table &aux syntax elements
-                            switches begins tables properties)
-    (unless (stringp name)
-       (error "COMPILE-SYNTAX-TABLE: ~A is not a string" name)
-    )
-
-    (setq
-       elements
-       (list-syntable-elements main-table)
-
-       switches
-       (remove-if
-           #'null
-           (car elements)
-           :key #'syntoken-switch
-       )
-
-       begins
-       (remove-if-not
-           #'keywordp
-           (car elements)
-           :key #'syntoken-begin
-       )
-
-       ;;  The "main-table" isn't in the list, because
-       ;; list-syntable-elements includes only the child tables;
-       ;; this is done to avoid the need of removing duplicates here.
-       tables
-       (cons main-table (cdr elements))
-    )
-
-    ;; Check for typos in the keywords, or for not defined syntax tables.
-    (dolist (item (mapcar #'syntoken-switch switches))
-       (unless
-           (or
-               (and
-                   (integerp item)
-                   (minusp item)
-               )
-               (member item tables :key #'syntable-label)
-           )
-           (error "COMPILE-SYNTAX-TABLE: SWITCH ~A cannot be matched"
-               item
-           )
-       )
-    )
-    (dolist (item (mapcar #'syntoken-begin begins))
-       (unless (member item tables :key #'syntable-label)
-           (error "COMPILE-SYNTAX-TABLE: BEGIN ~A cannot be matched"
-               item
-           )
-       )
-    )
-
-    ;; Create a list of all properties used by the syntax.
-    (setq
-       properties
-       (delete-duplicates
-
-           ;; Remove explicitly set to "default" properties.
-           (remove nil
-
-               (append
-
-                   ;; List all properties in the syntoken list.
-                   (mapcar
-                       #'syntoken-property
-                       (car elements)
-                   )
-
-                   ;; List all properties in the syntable list.
-                   (mapcar
-                       #'syntable-property
-                       tables
-                   )
-               )
-           )
-           :test #'string=
-           :key  #'synprop-name
-       )
-    )
-
-    ;;  Provide a default property if none specified.
-    (unless
-       (member
-           "default"
-           properties
-           :test #'string=
-           :key #'synprop-name
-       )
-       (setq properties (append (list *prop-default*) properties))
-    )
-
-
-    ;;  Now that a list of all nested syntax tables is known, compile the
-    ;; augment list. Note that even the main-table can be augmented to
-    ;; include tokens of one of it's children.
-
-    ;;  Adding the tokens of the augment tables must be done in
-    ;; two passes, or it may cause surprises due to "inherited"
-    ;; tokens, as the augment table was processed first, and
-    ;; increased it's token list.
-    (compile-syntax-augment-list main-table tables)
-
-    ;;  Now just append the augmented tokens to the table's token list.
-    (link-syntax-augment-table main-table)
-
-    ;;  Change all syntoken switch and begin fields to point to the
-    ;; syntable.
-    (dolist (item switches)
-       (if (keywordp (syntoken-switch item))
-           ;;  A switch may be relative, check if a keyword
-           ;; was specified.
-           (setf
-               (syntoken-switch item)
-               (car
-                   (member
-                       (syntoken-switch item)
-                       tables
-                       :key #'syntable-label
-                   )
-               )
-           )
-       )
-    )
-    (dolist (item begins)
-       (setf
-           (syntoken-begin item)
-           (car
-               (member
-                   (syntoken-begin item)
-                   tables
-                   :key #'syntable-label
-               )
-           )
-       )
-    )
-
-    ;;  Don't need to add a entity for default properties
-    (dolist (item (car elements))
-       (and
-           (syntoken-property item)
-           (string= (synprop-name (syntoken-property item)) "default")
-           (setf (syntoken-property item) ())
-       )
-    )
-    (dolist (item tables)
-       (and
-           (syntable-property item)
-           (string= (synprop-name (syntable-property item)) "default")
-           (setf (syntable-property item) ())
-       )
-    )
-
-    (setq syntax
-       (make-syntax
-           :name       name
-           :options    options
-           :labels     tables
-           :quark
-               (compile-syntax-property-list
-                   name
-                   properties
-               )
-           :token-count
-               (length (car elements))
-       )
-    )
-
-    ;; Ready to run!
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Loop applying the specifed syntax table to the text.
-;;  XXX This function needs a review. Should compile the regex patterns
-;; with newline sensitive match (and scan the entire file), and keep a
-;; cache of matched tokens (that may be at a very longer offset), and,
-;; when the match is removed from the cache, readd the token to the
-;; token-list; if the token does not match, it will not be in the cache,
-;; but should be removed from the token-list. If properly implemented, it
-;; should be somewhat like 4 times faster, but I would not be surprised
-;; if it becames even faster.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun syntax-highlight (*syntax*
-                        &optional
-                        (*from* (point-min))
-                        (*to* (point-max))
-                        interactive
-                        &aux
-#+debug                         (*line-number* 0)
-                        stream
-                        indent-table
-                       )
-
-    ;;  Make sure the property list is in use.
-    ;;  The interactive flag is only set after loading the file.
-    (or interactive
-       (property-list (syntax-quark *syntax*))
-    )
-
-#+debug
-    (setq *from* 0 *to* 0)
-
-#-debug
-    (and (>= *from* *to*) (return-from syntax-highlight (values *from* nil)))
-
-    ;;  Remove any existing properties from the text.
-    (clear-entities *from* (1+ *to*))
-
-    (setq stream
-#-debug        (make-string-input-stream (read-text *from* (- *to* *from*)))
-#+debug        *standard-input*
-    )
-
-    (prog*
-       (
-       ;;  Used to check if end of file found but syntax stack did
-       ;; not finish.
-       (point-max (point-max))
-
-       ;;  Used in interactive mode, to return the syntax table
-       ;; where the cursor is located.
-       (point (point))
-
-       ;;  The current stack of states.
-       stack
-
-       ;;  The current syntable.
-       (syntax-table (car (syntax-labels *syntax*)))
-
-       ;;  The current syntable's default property.
-       (default-property (syntable-property syntax-table))
-
-       ;;  Add this property to newlines as a hint to the interactive
-       ;; callback, so that it knows from where to restart parsing.
-       newline-property
-
-       ;;  The tokens in the current syntax table that may match,
-       ;; i.e. the items in this list are not in nomatch.
-       token-list
-
-       ;;  A pointer to the syntable token list, if token-list is
-       ;; eq to this value, cannot change it inplace.
-       current-token-list
-
-       ;;  Help to avoid allocating too many new object cells, and
-       ;; optmizes a bit time in [n]?set-difference.
-       ;;  This optimizes only the processing of one line of text
-       ;; as nomatch must be rebuilt when reading a new line of text.
-       token-list-stack
-
-       ;;  Matches for the current list of tokens.
-       matches
-
-       ;;  Line of text.
-       line
-
-       ;;  Length of the text line.
-       length
-
-       ;;  A inverse cache, don't call re-exec when the regex is
-       ;; already known to not match.
-       nomatch
-
-       ;;  Use cache as a list of matches to avoid repetitive
-       ;; unnecessary calls to re-exec.
-       ;;  cache is a list in which every element has the format:
-       ;;      (token . (start . end))
-       ;;  Line of text.
-       cache
-
-       ;;  Used just to avoid a function call at every re-exec call.
-       notbol
-
-       match
-
-       start
-       left
-       right
-       result
-       property
-
-       ;;  Beginig a new syntax table?
-       begin
-
-       ;;  Switching to another syntax table?
-       switch
-
-       ;;  Property flag when changing the current syntax table.
-       contained
-
-       ;;  Flag to know if syntax table has changed.
-       change
-
-       ;;  Variables used when removing invalid elements from the
-       ;; the cache.
-       item
-       from
-       to
-       )
-
-;-----------------------------------------------------------------------
-:read
-#+debug-verbose
-       (format t "** Entering :READ stack length is ~D~%" (length stack))
-#+debug        (format t "~%[~D]> " (incf *line-number*))
-
-       ;;  If input has finished, return.
-       (unless (setq line (read-line stream nil nil))
-           (when
-               (and
-                   ;; If a nested syntax table wasn't finished
-                   (consp stack)
-                   (<
-                       (setq *to* (scan *from* :eol :right))
-                       point-max
-                   )
-               )
-               (setq line (read-text *from* (- *to* *from*)))
-               (clear-entities *from* (1+ *to*))
-               (go :again)
-           )
-#-debug            (close stream)
-           (return)
-       )
-
-;------------------------------------------------------------------------
-:again
-       (setq
-           start               0
-           length              (length line)
-           token-list          (syntable-tokens syntax-table)
-           current-token-list  token-list
-           token-list-stack    ()
-           nomatch             ()
-           cache               ()
-       )
-
-
-       ;;  If empty line, and current table does not have matches for
-       ;; the empty string at start or end of a text line.
-       (when
-           (and
-               (= length 0)
-               (not (syntable-eol syntax-table))
-               (not (syntable-bol syntax-table)))
-#+debug-verbose
-           (format t "Empty line and table has no match to bol or eol~%")
-
-           (and newline-property
-               (add-entity *from* 1 (synprop-quark newline-property)))
-           (go :update)
-       )
-
-;------------------------------------------------------------------------
-:loop
-#+debug-verbose
-       (format t "** Entering :LOOP at offset ~D in table ~A, cache has ~D items~%"
-           start
-           (syntable-label syntax-table)
-           (length cache))
-
-       (setq notbol (> start 0))
-
-       ;;  For every token that may match.
-       (dolist
-           (token
-               (setq
-                   token-list
-                   (if (eq token-list current-token-list)
-                       (set-difference token-list nomatch :test #'eq)
-                       (nset-difference token-list nomatch :test #'eq)
-                   )
-               )
-           )
-
-           ;;  Try to fetch match from cache.
-           (if (setq match (member token cache :test #'eq :key #'car))
-               ;;  Match is in the cache.
-
-               (progn
-                   ;;  Match must be moved to the beginning of the
-                   ;; matches list, as a match from another syntax
-                   ;; table may be also in the cache, but before
-                   ;; the match for the current token.
-#+debug-verbose            (format t "cached: {~A:~S} ~A~%"
-                       (cdar match)
-                       (subseq line (cadar match) (cddar match))
-                       (syntoken-regex token))
-
-                   ;;  Remove the match from the cache.
-                   (if (eq match cache)
-
-                       ;;  This could be changed to only set "matches"
-                       ;; if it is not the first element of cache,
-                       ;; but is unsafe, because other tokens may
-                       ;; be added to "matches", and will end up
-                       ;; before when joining "matches" and "cache".
-                       (progn
-                           (setq cache (cdr cache))
-                           (rplacd match matches)
-                           (setq matches match))
-
-                       (progn
-                           (if (= (length match) 1)
-                               (progn
-                                   (rplacd (last cache 2) nil)
-                                   (rplacd match matches)
-                                   (setq matches match))
-                               (progn
-                                   (setq matches (cons (car match) matches))
-                                   (rplaca match (cadr match))
-                                   (rplacd match (cddr match)))
-                           )
-                       )
-                   )
-
-                   ;;  Exit loop if the all the remaining
-                   ;; input was matched.
-                   (when
-                       (and
-                           (= start (cadar match))
-                           (= length (cddar match))
-                       )
-#+debug-verbose        (format t "Rest of line match~%")
-                       (return)
-                   )
-               )
-
-               ;;  Not in the cache, call re-exec.
-               (if
-                   (consp
-                       (setq
-                           match
-                           (re-exec
-                               (syntoken-regex token)
-                               line
-                               :start  start
-                               :notbol notbol)))
-
-                   ;;  Match found.
-                   (progn
-#+debug-verbose                (format t "Adding to cache: {~A:~S} ~A~%"
-                           (car match)
-                           (subseq line (caar match) (cdar match))
-                           (syntoken-regex token))
-
-                       ;; Only the first pair is used.
-                       (setq match (car match))
-
-                       (cond
-                           (
-                               (or
-                                   (null matches)
-                                   ;;  No overlap and after most
-                                   ;; recent match.
-                                   (>= (car match) (cddar matches))
-                                   ;; No overlap and before most
-                                   ;; recent match.
-                                   (<= (cdr match) (cadar matches))
-                               )
-                               (setq
-                                   matches
-                                   (cons (cons token match) matches)
-                               )
-                           )
-                           (
-                               (or
-                                   ;;  Overlap, but start before most
-                                   ;; recent match.
-                                   (< (car match) (cadar matches))
-                                   (and
-                                       ;;  Same offset as most recent
-                                       ;; match, but is longer.
-                                       (= (car match) (cadar matches))
-                                       (> (cdr match) (cddar matches))
-                                   )
-                               )
-                               (rplaca (car matches) token)
-                               (rplacd (car matches) match)
-#+debug-verbose                (format t "Replaced most recent match~%")
-                           )
-                           (t
-#+debug-verbose                (format t "Ignored~%")
-                               ;; XXX The interpreter does not yet implement
-                               ;; implicit tagbody in dolist, just comment
-                               ;; the go call in that case. (Will just do
-                               ;; an unecessary test...)
-                               (go :ignored)
-                           )
-                       )
-
-                       ;;  Exit loop if the all the remaining
-                       ;; input was matched.
-                       (when
-                           (and
-                               (= start (car match))
-                               (= length (cdr match)))
-#+debug-verbose            (format t "Rest of line match~%")
-                           (return))
-                   )
-
-                   ;;  Match not found.
-                   (progn
-#+debug-verbose        (format t "Adding to nomatch: ~A~%"
-                           (syntoken-regex token))
-                       (setq nomatch (cons token nomatch)))
-               )
-           )
-:ignored
-       )
-
-       ;;  Add matches to the beginning of the cache list.
-       (setq
-           ;;  Put matches with smaller offset first.
-           cache
-           (stable-sort (nconc (nreverse matches) cache) #'< :key #'cadr)
-
-           ;;  Make sure that when the match loop is reentered, this
-           ;; variable is NIL.
-           matches
-           ()
-       )
-
-       ;;  While the first entry in the cache is not from the current table.
-       (until (or (null cache) (member (caar cache) token-list :test #'eq))
-
-#+debug-verbose
-           (format t "Not in the current table, removing {~A:~S} ~A~%"
-               (cdar cache)
-               (subseq line (cadar cache) (cddar cache))
-               (syntoken-regex (caar cache)))
-
-           (setq cache (cdr cache))
-       )
-
-
-       ;;  If nothing was matched in the entire/remaining line.
-       (unless cache
-           (when default-property
-               (if
-                   (or
-                       (null result)
-                       (> start (cadar result))
-                       (not (eq (cddar result) default-property)))
-                   (setq
-                       result
-                       (cons
-                           (cons start (cons length default-property))
-                           result
-                       )
-                   )
-                   (rplaca (cdar result) length)
-               )
-           )
-
-#+debug-verbose
-           (format t "No match until end of line~%")
-
-           ;;  Result already known, and there is no syntax table
-           ;; change, bypass :PARSE.
-           (and interactive
-               (null indent-table)
-               (<= 0 (- point *from*) length)
-               (setq indent-table syntax-table))
-           (go :process)
-       )
-
-#+debug-verbose
-       (format t "Removing first candidate from cache {~A:~S} ~A~%"
-           (cdar cache)
-           (subseq line (cadar cache) (cddar cache))
-           (syntoken-regex (caar cache))
-       )
-
-       ;;  Prepare to choose best match.
-       (setq
-           match       (car cache)
-           left        (cadr match)
-           right       (cddr match)
-           cache       (cdr cache)
-       )
-
-       ;;  First element can be safely removed now.
-       ;;  If there is only one, skip loop below.
-       (or cache (go :parse))
-
-       ;;  Remove elements of cache that must be discarded.
-       (setq
-           item   (car cache)
-           from   (cadr item)
-           to     (cddr item)
-       )
-
-       (loop
-           (if
-               (or
-
-                   ;;  If everything removed from the cache.
-                   (null item)
-
-                   ;;  Or next item is at a longer offset than the
-                   ;; end of current match.
-                   (>= from right)
-               )
-               (return)
-           )
-
-           (and
-               ;;  If another match at the same offset.
-               (= left from)
-
-               ;;  And if this match is longer than the current one.
-               (> to right)
-
-               (member (car item) token-list :test #'eq)
-
-               (setq
-                   match   item
-                   right   to
-               )
-           )
-
-#+debug-verbose
-           (format t "Removing from cache {~A:~S} ~A~%"
-               (cdar cache)
-               (subseq line from to)
-               (syntoken-regex (caar cache)))
-
-           (setq
-               cache       (cdr cache)
-               item        (car cache)
-               from        (cadr item)
-               to          (cddr item)
-           )
-       )
-
-
-;-----------------------------------------------------------------------
-:parse
-#+debug-verbose
-       (format t "** Entering :PARSE~%")
-
-       (setq
-
-           ;;  Change match value to the syntoken.
-           match       (car match)
-
-           begin       (syntoken-begin match)
-           switch      (syntoken-switch match)
-           contained   (syntoken-contained match)
-           change      (or begin switch)
-       )
-
-       ;;  Check for unmatched leading text.
-       (when (and default-property (> left start))
-#+debug-verbose (format t "No match in {(~D . ~D):~S}~%"
-               start
-               left
-               (subseq line start left)
-           )
-           (if
-               (or
-                   (null result)
-                   (> start (cadar result))
-                   (not (eq (cddar result) default-property)))
-               (setq
-                   result
-                   (cons
-                       (cons start (cons left default-property))
-                       result
-                   )
-               )
-               (rplaca (cdar result) left)
-           )
-       )
-
-       ;;  If the syntax table is not changed,
-       ;; or if the new table requires that the
-       ;; current default property be used.
-       (unless (and change contained)
-
-           (and
-               (> right left)
-               (setq
-                   property
-                   (or
-                       ;;  If token specifies the property.
-                       (syntoken-property match)
-                       default-property
-                   )
-               )
-
-               ;;  Add matched text.
-               (if
-                   (or
-                       (null result)
-                       (> left (cadar result))
-                       (not (eq (cddar result) property))
-                   )
-                   (setq
-                       result
-                       (cons
-                           (cons left (cons right property))
-                           result
-                       )
-                   )
-                   (rplaca (cdar result) right)
-               )
-           )
-
-#+debug-verbose
-           (format t "(0)Match found for {(~D . ~D):~S}~%"
-               left
-               right
-               (subseq line left right)
-           )
-       )
-
-
-       ;;  Update start offset in the input now!
-       (and interactive
-           (null indent-table)
-           (<= start (- point *from*) right)
-           (setq indent-table syntax-table))
-       (setq start right)
-
-
-       ;;  When changing the current syntax table.
-       (when change
-           (when switch
-               (if (numberp switch)
-
-                   ;;  If returning to a previous state.
-                   ;;  Don't generate an error if the stack
-                   ;; becomes empty?
-                   (while
-                       (< switch 0)
-
-                       (setq
-                           syntax-table        (pop stack)
-                           token-list          (pop token-list-stack)
-                           switch              (1+ switch)
-                       )
-                   )
-
-                   ;;  Else, not to a previous state, but
-                   ;; returning to a named syntax table,
-                   ;; search for it in the stack.
-                   (while
-                       (and
-
-                           (setq
-                               token-list      (pop token-list-stack)
-                               syntax-table    (pop stack)
-                           )
-
-                           (not (eq switch syntax-table))
-                       )
-                       ;;  Empty loop.
-                   )
-               )
-
-               ;;  If no match found while popping
-               ;; the stack.
-               (unless syntax-table
-
-                   ;;  Return to the topmost syntax table.
-                   (setq
-                       syntax-table
-                       (car (syntax-labels *syntax*))
-                   )
-               )
-
-#+debug-verbose        (format t "switching to ~A offset: ~D~%"
-                   (syntable-label syntax-table)
-                   start
-               )
-
-               (if (null token-list)
-                   (setq token-list (syntable-tokens syntax-table))
-               )
-           )
-
-           (when begin
-               ;;  Save state for a possible
-               ;; :SWITCH later.
-               (setq
-                   stack            (cons syntax-table stack)
-                   token-list-stack (cons token-list token-list-stack)
-                   token-list       (syntable-tokens begin)
-                   syntax-table     begin
-               )
-#+debug-verbose        (format t "begining ~A offset: ~D~%"
-                   (syntable-label syntax-table)
-                   start
-               )
-           )
-
-           ;;  Change current syntax table.
-           (setq
-               default-property    (syntable-property syntax-table)
-               current-token-list  (syntable-tokens syntax-table)
-           )
-
-           ;;  Set newline property, to help interactive callback
-           ;;  Only need to have a defined value, for now don't care
-           ;; about wich value is being used, neither if there is
-           ;; a value to be set.
-           (if (null stack)
-               (setq newline-property nil)
-               (or newline-property
-                   (setq newline-property default-property)
-                   (setq newline-property (syntoken-property match))
-               )
-           )
-
-           ;; If processing of text was deferred.
-           (when contained
-
-               (and
-                   (> right left)
-                   (setq
-                       property
-                       (or
-                           (syntoken-property match)
-                           default-property
-                       )
-                   )
-                   ;;  Add matched text with the updated property.
-                   (if
-                       (or
-                           (null result)
-                           (> left (cadar result))
-                           (not (eq (cddar result) property))
-                       )
-                       (setq
-                           result
-                           (cons
-                               (cons left (cons right property))
-                               result
-                           )
-                       )
-                       (rplaca (cdar result) right)
-                   )
-               )
-
-#+debug-verbose (format t "(1)Match found for {(~D . ~D):~S}~%"
-                   left
-                   right
-                   (subseq line left right)
-               )
-           )
-
-           (go :loop)
-       )
-
-
-;-----------------------------------------------------------------------
-       ;;  Wait for the end of the line to process, so that
-       ;; it is possible to join sequential matches with the
-       ;; same text property.
-       (and (or cache (< start length)) (go :loop))
-:process
-
-#+debug-verbose
-       (format t "** Entering :PROCESS~%")
-
-       (if result
-           (progn
-               ;;  If the last property was at the end of the line,
-               ;; there are nested syntax tables, and there is a
-               ;; default property, include the newline in the property,
-               ;; as a hint to the interactive callback.
-               (and
-                   newline-property
-                   (if
-                       (and
-                           (eq (cddar result) newline-property)
-                           (= length (cadar result))
-                       )
-                       (rplaca (cdar result) (1+ length))
-                       (setq
-                           result
-                           (cons
-                               (cons length (cons (1+ length) newline-property))
-                               result
-                           )
-                       )
-                   )
-               )
-
-               ;;  Result was created in reversed order.
-               (nreverse result)
-               (dolist (item result)
-                   (setq
-                       left            (car item)
-                       right           (cadr item)
-                       property        (cddr item))
-
-                   ;; Use the information.
-                   (add-entity
-                       (+ *from* left)
-                       (- right left)
-                       (synprop-quark property))
-               )
-           )
-
-           (and newline-property
-               (add-entity
-                   (+ *from* length)
-                   1
-                   (synprop-quark newline-property))
-           )
-       )
-
-;------------------------------------------------------------------------
-:update
-       ;; Prepare for new matches.
-       (setq
-           result      nil
-
-           ;;  Update offset to read text.
-           ;;  Add 1 for the skipped newline.
-           *from*      (+ *from* length 1)
-       )
-
-       (go :read)
-    )
-
-#+debug (terpri)
-    (values *to* indent-table)
-)
-
-(compile 'syntax-highlight)
diff --git a/xedit/lisp/modules/x11.c b/xedit/lisp/modules/x11.c
deleted file mode 100644 (file)
index e3d8886..0000000
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/modules/x11.c,v 1.11tsi Exp $ */
-
-#include <stdlib.h>
-#include <string.h>
-#include "lisp/internal.h"
-#include "lisp/private.h"
-#include <X11/Xlib.h>
-
-/*
- * Prototypes
- */
-int x11LoadModule(void);
-
-LispObj *Lisp_XOpenDisplay(LispBuiltin *builtin);
-LispObj *Lisp_XCloseDisplay(LispBuiltin *builtin);
-LispObj *Lisp_XDefaultRootWindow(LispBuiltin *builtin);
-LispObj *Lisp_XDefaultScreen(LispBuiltin *builtin);
-LispObj *Lisp_XDefaultScreenOfDisplay(LispBuiltin *builtin);
-LispObj *Lisp_XBlackPixel(LispBuiltin *builtin);
-LispObj *Lisp_XBlackPixelOfScreen(LispBuiltin *builtin);
-LispObj *Lisp_XWidthOfScreen(LispBuiltin *builtin);
-LispObj *Lisp_XHeightOfScreen(LispBuiltin *builtin);
-LispObj *Lisp_XWhitePixel(LispBuiltin *builtin);
-LispObj *Lisp_XWhitePixelOfScreen(LispBuiltin *builtin);
-LispObj *Lisp_XDefaultGC(LispBuiltin *builtin);
-LispObj *Lisp_XDefaultGCOfScreen(LispBuiltin *builtin);
-LispObj *Lisp_XCreateSimpleWindow(LispBuiltin *builtin);
-LispObj *Lisp_XMapWindow(LispBuiltin *builtin);
-LispObj *Lisp_XDestroyWindow(LispBuiltin *builtin);
-LispObj *Lisp_XFlush(LispBuiltin *builtin);
-LispObj *Lisp_XRaiseWindow(LispBuiltin *builtin);
-LispObj *Lisp_XBell(LispBuiltin *builtin);
-
-LispObj *Lisp_XDrawLine(LispBuiltin *builtin);
-
-/*
- * Initialization
- */
-static LispBuiltin lispbuiltins[] = {
-    {LispFunction, Lisp_XOpenDisplay, "x-open-display &optional display-name"},
-    {LispFunction, Lisp_XCloseDisplay, "x-close-display display"},
-    {LispFunction, Lisp_XDefaultRootWindow, "x-default-root-window display"},
-    {LispFunction, Lisp_XDefaultScreen, "x-default-screen display"},
-    {LispFunction, Lisp_XDefaultScreenOfDisplay, "x-default-screen-of-display display"},
-    {LispFunction, Lisp_XBlackPixel, "x-black-pixel display &optional screen"},
-    {LispFunction, Lisp_XBlackPixelOfScreen, "x-black-pixel-of-screen screen"},
-    {LispFunction, Lisp_XWhitePixel, "x-white-pixel display &optional screen"},
-    {LispFunction, Lisp_XWhitePixelOfScreen, "x-white-pixel-of-screen screen"},
-    {LispFunction, Lisp_XDefaultGC, "x-default-gc display &optional screen"},
-    {LispFunction, Lisp_XDefaultGCOfScreen, "x-default-gc-of-screen screen"},
-    {LispFunction, Lisp_XCreateSimpleWindow, "x-create-simple-window display parent x y width height &optional border-width border background"},
-    {LispFunction, Lisp_XMapWindow, "x-map-window display window"},
-    {LispFunction, Lisp_XDestroyWindow, "X-DESTROY-WINDOW"},
-    {LispFunction, Lisp_XFlush, "x-flush display"},
-    {LispFunction, Lisp_XDrawLine, "x-draw-line display drawable gc x1 y1 x2 y2"},
-    {LispFunction, Lisp_XBell, "x-bell display &optional percent"},
-    {LispFunction, Lisp_XRaiseWindow, "x-raise-window display window"},
-    {LispFunction, Lisp_XWidthOfScreen, "x-width-of-screen screen"},
-    {LispFunction, Lisp_XHeightOfScreen, "x-height-of-screen screen"},
-};
-
-LispModuleData x11LispModuleData = {
-    LISP_MODULE_VERSION,
-    x11LoadModule
-};
-
-static int x11Display_t, x11Screen_t, x11Window_t, x11GC_t;
-
-/*
- * Implementation
- */
-int
-x11LoadModule(void)
-{
-    int i;
-
-    x11Display_t = LispRegisterOpaqueType("Display*");
-    x11Screen_t = LispRegisterOpaqueType("Screen*");
-    x11Window_t = LispRegisterOpaqueType("Window");
-    x11GC_t = LispRegisterOpaqueType("GC");
-
-    for (i = 0; i < sizeof(lispbuiltins) / sizeof(lispbuiltins[0]); i++)
-       LispAddBuiltinFunction(&lispbuiltins[i]);
-
-    return (1);
-}
-
-LispObj *
-Lisp_XOpenDisplay(LispBuiltin *builtin)
-/*
-x-open-display &optional display-name
- */
-{
-    LispObj *display_name;
-    char *dname;
-
-    display_name = ARGUMENT(0);
-
-    if (display_name == UNSPEC)
-       dname = NULL;
-    else {
-       CHECK_STRING(display_name);
-       dname = THESTR(display_name);
-    }
-
-    return (OPAQUE(XOpenDisplay(dname), x11Display_t));
-}
-
-LispObj *
-Lisp_XCloseDisplay(LispBuiltin *builtin)
-/*
- x-close-display display
- */
-{
-    LispObj *display;
-
-    display = ARGUMENT(0);
-
-    if (!CHECKO(display, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(display));
-
-    XCloseDisplay((Display*)(display->data.opaque.data));
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XDefaultRootWindow(LispBuiltin *builtin)
-/*
- x-default-root-window display
- */
-{
-    LispObj *display;
-
-    display = ARGUMENT(0);
-
-    if (!CHECKO(display, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(display));
-
-    return (OPAQUE(DefaultRootWindow((Display*)(display->data.opaque.data)),
-                  x11Window_t));
-}
-
-LispObj *
-Lisp_XDefaultScreen(LispBuiltin *builtin)
-/*
- x-default-screen display
- */
-{
-    LispObj *display;
-
-    display = ARGUMENT(0);
-
-    if (!CHECKO(display, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(display));
-
-    return (INTEGER(DefaultScreen((Display*)(display->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XDefaultScreenOfDisplay(LispBuiltin *builtin)
-/*
- x-default-screen-of-display display
- */
-{
-    LispObj *display;
-
-    display = ARGUMENT(0);
-
-    if (!CHECKO(display, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(display));
-
-    return (OPAQUE(DefaultScreenOfDisplay((Display*)(display->data.opaque.data)),
-                  x11Screen_t));
-}
-
-LispObj *
-Lisp_XBlackPixel(LispBuiltin *builtin)
-/*
- x-black-pixel display &optional screen
- */
-{
-    Display *display;
-    int screen;
-
-    LispObj *odisplay, *oscreen;
-
-    oscreen = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (oscreen == UNSPEC)
-       screen = DefaultScreen(display);
-    else {
-       CHECK_INDEX(oscreen);
-       screen = FIXNUM_VALUE(oscreen);
-    }
-
-    if (screen >= ScreenCount(display))
-       LispDestroy("%s: screen index %d too large, %d screens available",
-                   STRFUN(builtin), screen, ScreenCount(display));
-
-    return (INTEGER(BlackPixel(display, screen)));
-}
-
-LispObj *
-Lisp_XBlackPixelOfScreen(LispBuiltin *builtin)
-/*
- x-black-pixel-of-screen screen
- */
-{
-    LispObj *screen;
-
-    screen = ARGUMENT(0);
-
-    if (!CHECKO(screen, x11Screen_t))
-       LispDestroy("%s: cannot convert %s to Screen*",
-                   STRFUN(builtin), STROBJ(screen));
-
-    return (INTEGER(XBlackPixelOfScreen((Screen*)(screen->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XWhitePixel(LispBuiltin *builtin)
-/*
- x-white-pixel display &optional screen
- */
-{
-    Display *display;
-    int screen;
-
-    LispObj *odisplay, *oscreen;
-
-    oscreen = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (oscreen == UNSPEC)
-       screen = DefaultScreen(display);
-    else {
-       CHECK_FIXNUM(oscreen);
-       screen = FIXNUM_VALUE(oscreen);
-    }
-
-    if (screen >= ScreenCount(display))
-       LispDestroy("%s: screen index %d too large, %d screens available",
-                   STRFUN(builtin), screen, ScreenCount(display));
-
-    return (INTEGER(WhitePixel(display, screen)));
-}
-
-LispObj *
-Lisp_XWhitePixelOfScreen(LispBuiltin *builtin)
-/*
- x-white-pixel-of-screen screen
- */
-{
-    LispObj *screen;
-
-    screen = ARGUMENT(0);
-
-    if (!CHECKO(screen, x11Screen_t))
-       LispDestroy("%s: cannot convert %s to Screen*",
-                   STRFUN(builtin), STROBJ(screen));
-
-    return (INTEGER(WhitePixelOfScreen((Screen*)(screen->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XDefaultGC(LispBuiltin *builtin)
-/*
- x-default-gc display &optional screen
- */
-{
-    Display *display;
-    int screen;
-
-    LispObj *odisplay, *oscreen;
-
-    oscreen = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (oscreen == UNSPEC)
-       screen = DefaultScreen(display);
-    else {
-       CHECK_FIXNUM(oscreen);
-       screen = FIXNUM_VALUE(oscreen);
-    }
-
-    if (screen >= ScreenCount(display))
-       LispDestroy("%s: screen index %d too large, %d screens available",
-                   STRFUN(builtin), screen, ScreenCount(display));
-
-    return (OPAQUE(DefaultGC(display, screen), x11GC_t));
-}
-
-LispObj *
-Lisp_XDefaultGCOfScreen(LispBuiltin *builtin)
-/*
- x-default-gc-of-screen screen
- */
-{
-    LispObj *screen;
-
-    screen = ARGUMENT(0);
-
-    if (!CHECKO(screen, x11Screen_t))
-       LispDestroy("%s: cannot convert %s to Screen*",
-                   STRFUN(builtin), STROBJ(screen));
-
-    return (OPAQUE(DefaultGCOfScreen((Screen*)(screen->data.opaque.data)),
-                  x11GC_t));
-}
-
-LispObj *
-Lisp_XCreateSimpleWindow(LispBuiltin *builtin)
-/*
- x-create-simple-window display parent x y width height &optional border-width border background
- */
-{
-    Display *display;
-    Window parent;
-    int x, y;
-    unsigned int width, height, border_width;
-    unsigned long border, background;
-
-    LispObj *odisplay, *oparent, *ox, *oy, *owidth, *oheight,
-           *oborder_width, *oborder, *obackground;
-
-    obackground = ARGUMENT(8);
-    oborder = ARGUMENT(7);
-    oborder_width = ARGUMENT(6);
-    oheight = ARGUMENT(5);
-    owidth = ARGUMENT(4);
-    oy = ARGUMENT(3);
-    ox = ARGUMENT(2);
-    oparent = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (!CHECKO(oparent, x11Window_t))
-       LispDestroy("%s: cannot convert %s to Window",
-                   STRFUN(builtin), STROBJ(oparent));
-    parent = (Window)(oparent->data.opaque.data);
-
-    CHECK_FIXNUM(ox);
-    x = FIXNUM_VALUE(ox);
-
-    CHECK_FIXNUM(oy);
-    y = FIXNUM_VALUE(oy);
-
-    CHECK_INDEX(owidth);
-    width = FIXNUM_VALUE(owidth);
-
-    CHECK_INDEX(oheight);
-    height = FIXNUM_VALUE(oheight);
-
-    /* check &OPTIONAL parameters */
-    if (oborder_width == UNSPEC)
-       border_width = 1;
-    else {
-       CHECK_INDEX(oborder_width);
-       border_width = FIXNUM_VALUE(oborder_width);
-    }
-
-    if (oborder == UNSPEC)
-       border = BlackPixel(display, DefaultScreen(display));
-    else {
-       CHECK_LONGINT(oborder);
-       border = LONGINT_VALUE(oborder);
-    }
-
-    if (obackground == UNSPEC)
-       background = WhitePixel(display, DefaultScreen(display));
-    else {
-       CHECK_LONGINT(obackground);
-       background = LONGINT_VALUE(obackground);
-    }
-
-    return (OPAQUE(
-           XCreateSimpleWindow(display, parent, x, y, width, height,
-                               border_width, border, background),
-           x11Window_t));
-}
-
-LispObj *
-Lisp_XMapWindow(LispBuiltin *builtin)
-/*
- x-map-window display window
- */
-{
-    Display *display;
-    Window window;
-
-    LispObj *odisplay, *owindow;
-
-    owindow = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (!CHECKO(owindow, x11Window_t))
-       LispDestroy("%s: cannot convert %s to Window",
-                   STRFUN(builtin), STROBJ(owindow));
-    window = (Window)(owindow->data.opaque.data);
-
-    XMapWindow(display, window);
-
-    return (owindow);
-}
-
-LispObj *
-Lisp_XDestroyWindow(LispBuiltin *builtin)
-/*
- x-destroy-window display window
- */
-{
-    Display *display;
-    Window window;
-
-    LispObj *odisplay, *owindow;
-
-    owindow = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (!CHECKO(owindow, x11Window_t))
-       LispDestroy("%s: cannot convert %s to Window",
-                   STRFUN(builtin), STROBJ(owindow));
-    window = (Window)(owindow->data.opaque.data);
-
-    XDestroyWindow(display, window);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XFlush(LispBuiltin *builtin)
-/*
- x-flush display
- */
-{
-    Display *display;
-
-    LispObj *odisplay;
-
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    XFlush(display);
-
-    return (odisplay);
-}
-
-LispObj *
-Lisp_XDrawLine(LispBuiltin *builtin)
-/*
- x-draw-line display drawable gc x1 y1 x2 y2
- */
-{
-    Display *display;
-    Drawable drawable;
-    GC gc;
-    int x1, y1, x2, y2;
-
-    LispObj *odisplay, *odrawable, *ogc, *ox1, *oy1, *ox2, *oy2;
-
-    oy2 = ARGUMENT(6);
-    ox2 = ARGUMENT(5);
-    oy1 = ARGUMENT(4);
-    ox1 = ARGUMENT(3);
-    ogc = ARGUMENT(2);
-    odrawable = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    /* XXX correct check when drawing to pixmaps implemented */
-    if (!CHECKO(odrawable, x11Window_t))
-       LispDestroy("%s: cannot convert %s to Drawable",
-                   STRFUN(builtin), STROBJ(odrawable));
-    drawable = (Drawable)(odrawable->data.opaque.data);
-
-    if (!CHECKO(ogc, x11GC_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(ogc));
-    gc = (GC)(ogc->data.opaque.data);
-
-    CHECK_FIXNUM(ox1);
-    x1 = FIXNUM_VALUE(ox1);
-
-    CHECK_FIXNUM(oy1);
-    y1 = FIXNUM_VALUE(oy1);
-
-    CHECK_FIXNUM(ox2);
-    x2 = FIXNUM_VALUE(ox2);
-
-    CHECK_FIXNUM(oy2);
-    y2 = FIXNUM_VALUE(oy2);
-
-    XDrawLine(display, drawable, gc, x1, y1, x2, y2);
-
-    return (odrawable);
-}
-
-LispObj *
-Lisp_XBell(LispBuiltin *builtin)
-/*
- x-bell &optional percent
- */
-{
-    Display *display;
-    int percent;
-
-    LispObj *odisplay, *opercent;
-
-    opercent = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (opercent == UNSPEC)
-       percent = 0;
-    else {
-       CHECK_FIXNUM(opercent);
-       percent = FIXNUM_VALUE(opercent);
-    }
-
-    if (percent < -100 || percent > 100)
-       LispDestroy("%s: percent value %d out of range -100 to 100",
-                   STRFUN(builtin), percent);
-
-    XBell(display, percent);
-
-    return (odisplay);
-}
-
-LispObj *
-Lisp_XRaiseWindow(LispBuiltin *builtin)
-/*
- x-raise-window display window
- */
-{
-    Display *display;
-    Window window;
-
-    LispObj *odisplay, *owindow;
-
-    owindow = ARGUMENT(1);
-    odisplay = ARGUMENT(0);
-
-    if (!CHECKO(odisplay, x11Display_t))
-       LispDestroy("%s: cannot convert %s to Display*",
-                   STRFUN(builtin), STROBJ(odisplay));
-    display = (Display*)(odisplay->data.opaque.data);
-
-    if (!CHECKO(owindow, x11Window_t))
-       LispDestroy("%s: cannot convert %s to Window",
-                   STRFUN(builtin), STROBJ(owindow));
-    window = (Window)(owindow->data.opaque.data);
-
-    XRaiseWindow(display, window);
-
-    return (owindow);
-}
-
-LispObj *
-Lisp_XWidthOfScreen(LispBuiltin *builtin)
-/*
- x-width-of-screen screen
- */
-{
-    LispObj *screen;
-
-    screen = ARGUMENT(0);
-
-    if (!CHECKO(screen, x11Screen_t))
-       LispDestroy("%s: cannot convert %s to Screen*",
-                   STRFUN(builtin), STROBJ(screen));
-
-    return (FIXNUM(WidthOfScreen((Screen*)(screen->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XHeightOfScreen(LispBuiltin *builtin)
-/*
- x-height-of-screen screen
- */
-{
-    LispObj *screen;
-
-    screen = ARGUMENT(0);
-
-    if (!CHECKO(screen, x11Screen_t))
-       LispDestroy("%s: cannot convert %s to Screen*",
-                   STRFUN(builtin), STROBJ(screen));
-
-    return (FIXNUM(HeightOfScreen((Screen*)(screen->data.opaque.data))));
-}
diff --git a/xedit/lisp/modules/xaw.c b/xedit/lisp/modules/xaw.c
deleted file mode 100644 (file)
index 70f8424..0000000
+++ /dev/null
@@ -1,664 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/modules/xaw.c,v 1.15tsi Exp $ */
-
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/AsciiSink.h>
-#include <X11/Xaw/AsciiSrc.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Grip.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/MenuButton.h>
-#include <X11/Xaw/MultiSink.h>
-#include <X11/Xaw/MultiSrc.h>
-#include <X11/Xaw/Paned.h>
-#include <X11/Xaw/Panner.h>
-#include <X11/Xaw/Porthole.h>
-#include <X11/Xaw/Repeater.h>
-#include <X11/Xaw/Scrollbar.h>
-#include <X11/Xaw/Simple.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/Sme.h>
-#include <X11/Xaw/SmeLine.h>
-#include <X11/Xaw/StripChart.h>
-#include <X11/Xaw/Text.h>
-#include <X11/Xaw/TextSink.h>
-#include <X11/Xaw/TextSrc.h>
-#include <X11/Xaw/Tip.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/Tree.h>
-#include <X11/Xaw/Viewport.h>
-#include <X11/Vendor.h>
-#include "lisp/internal.h"
-#include "lisp/private.h"
-
-/*
- * Types
- */
-typedef struct {
-    LispObj *object;
-    void *data;
-} WidgetData;
-
-/*
- * Prototypes
- */
-int xawLoadModule(void);
-void LispXawCleanupCallback(Widget, XtPointer, XtPointer);
-
-/* until a better/smarter interface be written... */
-LispObj *Lisp_XawCoerceToListReturnStruct(LispBuiltin*);
-LispObj *Lisp_XawScrollbarCoerceToReal(LispBuiltin*);
-
-LispObj *Lisp_XawFormDoLayout(LispBuiltin*);
-LispObj *Lisp_XawListChange(LispBuiltin*);
-LispObj *Lisp_XawListHighlight(LispBuiltin*);
-LispObj *Lisp_XawListUnhighlight(LispBuiltin*);
-LispObj *Lisp_XawTextGetSource(LispBuiltin*);
-LispObj *Lisp_XawTextLastPosition(LispBuiltin*);
-LispObj *Lisp_XawTextReplace(LispBuiltin*);
-LispObj *Lisp_XawTextSearch(LispBuiltin*);
-LispObj *Lisp_XawTextGetInsertionPoint(LispBuiltin*);
-LispObj *Lisp_XawTextSetInsertionPoint(LispBuiltin*);
-LispObj *Lisp_XawScrollbarSetThumb(LispBuiltin*);
-
-/*
- * Initialization
- */
-
-static LispBuiltin lispbuiltins[] = {
-    {LispFunction, Lisp_XawCoerceToListReturnStruct, "xaw-coerce-to-list-return-struct opaque"},
-    {LispFunction, Lisp_XawScrollbarCoerceToReal, "xaw-scrollbar-coerce-to-real opaque"},
-
-    {LispFunction, Lisp_XawScrollbarSetThumb, "xaw-scrollbar-set-thumb widget top &optional shown"},
-    {LispFunction, Lisp_XawFormDoLayout, "xaw-form-do-layout widget force"},
-    {LispFunction, Lisp_XawListChange, "xaw-list-change widget list &optional longest resize"},
-    {LispFunction, Lisp_XawListHighlight, "xaw-list-highlight widget index"},
-    {LispFunction, Lisp_XawListUnhighlight, "xaw-list-unhighlight widget"},
-    {LispFunction, Lisp_XawTextGetSource, "xaw-text-get-source widget"},
-    {LispFunction, Lisp_XawTextLastPosition, "xaw-text-last-position widget"},
-    {LispFunction, Lisp_XawTextReplace, "xaw-text-replace widget left right text"},
-    {LispFunction, Lisp_XawTextSearch, "xaw-text-search widget direction text"},
-    {LispFunction, Lisp_XawTextGetInsertionPoint, "xaw-text-get-insertion-point widget"},
-    {LispFunction, Lisp_XawTextSetInsertionPoint, "xaw-text-set-insertion-point widget position"},
-};
-
-LispModuleData xawLispModuleData = {
-    LISP_MODULE_VERSION,
-    xawLoadModule
-};
-
-static int xawWidget_t, xawWidgetClass_t, xawListReturnStruct_t, xawFloatp_t;
-static WidgetData **list_data;
-static int num_list_data;
-
-/*
- * Implementation
- */
-int
-xawLoadModule(void)
-{
-    int i;
-    char *fname = "XAW-LOAD-MODULE";
-
-    xawWidget_t = LispRegisterOpaqueType("Widget");
-    xawWidgetClass_t = LispRegisterOpaqueType("WidgetClass");
-    xawListReturnStruct_t = LispRegisterOpaqueType("XawListReturnStruct");
-    xawFloatp_t = LispRegisterOpaqueType("float*");
-
-    LispExecute("(DEFSTRUCT XAW-LIST-RETURN-STRUCT STRING INDEX)\n");
-
-    GCDisable();
-    (void)LispSetVariable(ATOM2("ASCII-SINK-OBJECT-CLASS"),
-                         OPAQUE(asciiSinkObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("ASCII-SRC-OBJECT-CLASS"),
-                         OPAQUE(asciiSinkObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("ASCII-TEXT-WIDGET-CLASS"),
-                         OPAQUE(asciiTextWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("BOX-WIDGET-CLASS"),
-                         OPAQUE(boxWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("COMMAND-WIDGET-CLASS"),
-                         OPAQUE(commandWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("DIALOG-WIDGET-CLASS"),
-                         OPAQUE(dialogWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("FORM-WIDGET-CLASS"),
-                         OPAQUE(formWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("GRIP-WIDGET-CLASS"),
-                         OPAQUE(gripWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("LABEL-WIDGET-CLASS"),
-                         OPAQUE(labelWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("LIST-WIDGET-CLASS"),
-                         OPAQUE(listWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("MENU-BUTTON-WIDGET-CLASS"),
-                         OPAQUE(menuButtonWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("MULTI-SINK-OBJEC-TCLASS"),
-                         OPAQUE(multiSinkObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("MULTI-SRC-OBJECT-CLASS"),
-                         OPAQUE(multiSrcObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("PANED-WIDGET-CLASS"),
-                         OPAQUE(panedWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("PANNER-WIDGET-CLASS"),
-                         OPAQUE(pannerWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("PORTHOLE-WIDGET-CLASS"),
-                         OPAQUE(portholeWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("REPEATER-WIDGET-CLASS"),
-                         OPAQUE(repeaterWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("SCROLLBAR-WIDGET-CLASS"),
-                         OPAQUE(scrollbarWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("SIMPLE-MENU-WIDGET-CLASS"),
-                         OPAQUE(simpleMenuWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("SIMPLE-WIDGET-CLASS"),
-                         OPAQUE(simpleWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("SME-BSB-OBJECT-CLASS"),
-                         OPAQUE(smeBSBObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("SME-LINE-OBJECT-CLASS"),
-                         OPAQUE(smeLineObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("SME-OBJECT-CLASS"),
-                         OPAQUE(smeObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("STRIP-CHART-WIDGET-CLASS"),
-                         OPAQUE(stripChartWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TEXT-WIDGET-CLASS"),
-                         OPAQUE(textWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TEXT-SINKOBJECT-CLASS"),
-                         OPAQUE(textSinkObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TEXT-SRC-OBJECT-CLASS"),
-                         OPAQUE(textSrcObjectClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TIP-WIDGET-CLASS"),
-                         OPAQUE(tipWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TOGGLE-WIDGET-CLASS"),
-                         OPAQUE(toggleWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TREE-WIDGET-CLASS"),
-                         OPAQUE(treeWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("VIEWPORT-WIDGET-CLASS"),
-                         OPAQUE(viewportWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("VENDOR-SHELL-WIDGET-CLASS"),
-                         OPAQUE(vendorShellWidgetClass, xawWidgetClass_t),
-                         fname, 0);
-
-    /* return codes of XawTextReplace */
-    (void)LispSetVariable(ATOM2("XAW-REPLACE-ERROR"),
-                         INTEGER(XawReplaceError), fname, 0);
-    (void)LispSetVariable(ATOM2("XAW-EDIT-DONE"),
-                         INTEGER(XawEditDone), fname, 0);
-    (void)LispSetVariable(ATOM2("XAW-EDIT-ERROR"),
-                         INTEGER(XawEditError), fname, 0);
-    (void)LispSetVariable(ATOM2("XAW-POSITION-ERROR"),
-                         INTEGER(XawPositionError), fname, 0);
-
-    /* return code of XawTextSearch */
-    (void)LispSetVariable(ATOM2("XAW-TEXT-SEARCH-ERROR"),
-                         INTEGER(XawTextSearchError), fname, 0);
-
-    /* enum XawTextScanDirection */
-    (void)LispSetVariable(ATOM2("XAWSD-LEFT"),
-                         INTEGER(XawsdLeft), fname, 0);
-    (void)LispSetVariable(ATOM2("XAWSD-RIGHT"),
-                         INTEGER(XawsdRight), fname, 0);
-    GCEnable();
-
-    for (i = 0; i < sizeof(lispbuiltins) / sizeof(lispbuiltins[0]); i++)
-       LispAddBuiltinFunction(&lispbuiltins[i]);
-
-    return (1);
-}
-
-void
-LispXawCleanupCallback(Widget w, XtPointer user_data, XtPointer call_data)
-{
-    WidgetData *data = (WidgetData*)user_data;
-
-    UPROTECT(CAR(data->object), data->object);
-    XtFree((XtPointer)data->data);
-    XtFree((XtPointer)data);
-}
-
-LispObj *
-Lisp_XawCoerceToListReturnStruct(LispBuiltin *builtin)
-/*
- xaw-coerce-to-list-return-struct opaque
- */
-{
-    LispObj *result, *code, *ocod = COD;
-    XawListReturnStruct *retlist;
-
-    LispObj *opaque;
-
-    opaque = ARGUMENT(0);
-
-    if (!CHECKO(opaque, xawListReturnStruct_t))
-       LispDestroy("%s: cannot convert %s to XawListReturnStruct",
-                   STRFUN(builtin), STROBJ(opaque));
-
-    retlist = (XawListReturnStruct*)(opaque->data.opaque.data);
-
-    GCDisable();
-    code = CONS(ATOM("MAKE-XAW-LIST-RETURN-STRUCT"),
-               CONS(KEYWORD("STRING"),
-                      CONS(STRING(retlist->string),
-                           CONS(KEYWORD("INDEX"),
-                                CONS(INTEGER(retlist->list_index), NIL)))));
-    COD = CONS(code, COD);
-    GCEnable();
-
-    result = EVAL(code);
-    COD = ocod;
-
-    return (result);
-}
-
-LispObj *
-Lisp_XawScrollbarCoerceToReal(LispBuiltin *builtin)
-/*
- xaw-scrollbar-coerce-to-real opaque
- */
-{
-    float *floatp;
-    double real;
-
-    LispObj *opaque;
-
-    opaque = ARGUMENT(0);
-
-    if (!CHECKO(opaque, xawFloatp_t))
-       LispDestroy("%s: cannot convert %s to float*",
-                   STRFUN(builtin), STROBJ(opaque));
-
-    floatp = (float*)(opaque->data.opaque.data);
-    real = *floatp;
-
-    return (DFLOAT(real));
-}
-
-LispObj *
-Lisp_XawFormDoLayout(LispBuiltin *builtin)
-/*
- xaw-form-do-layout widget force
- */
-{
-    int force;
-
-    LispObj *owidget, *oforce;
-
-    oforce = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-
-    force = oforce != NIL;
-    XawFormDoLayout((Widget)(owidget->data.opaque.data), force);
-
-    return (oforce);
-}
-
-LispObj *
-Lisp_XawTextGetSource(LispBuiltin *builtin)
-/*
- xaw-text-get-source widget
- */
-{
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-
-    return (OPAQUE(XawTextGetSource((Widget)(owidget->data.opaque.data)),
-                  xawWidget_t));
-}
-
-LispObj *
-Lisp_XawTextLastPosition(LispBuiltin *builtin)
-/*
- xaw-text-last-position widget
- */
-{
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-
-    return (FIXNUM(XawTextLastPosition((Widget)(owidget->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XawTextGetInsertionPoint(LispBuiltin *builtin)
-/*
- xaw-text-get-insertion-point widget
- */
-{
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-
-    return (FIXNUM(XawTextGetInsertionPoint((Widget)(owidget->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XawTextSetInsertionPoint(LispBuiltin *builtin)
-/*
- xaw-text-set-insertion-point widget position
- */
-{
-    Widget widget;
-    XawTextPosition position;
-
-    LispObj *owidget, *oposition;
-
-    oposition = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-
-    CHECK_INDEX(oposition);
-    position = (XawTextPosition)FIXNUM_VALUE(oposition);
-
-    XawTextSetInsertionPoint(widget, position);
-
-    return (oposition);
-}
-
-LispObj *
-Lisp_XawTextReplace(LispBuiltin *builtin)
-/*
- xaw-text-replace widget left right text
- */
-{
-    Widget widget;
-    XawTextPosition left, right;
-    XawTextBlock block;
-
-    LispObj *owidget, *oleft, *oright, *otext;
-
-    otext = ARGUMENT(3);
-    oright = ARGUMENT(2);
-    oleft = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-
-    CHECK_INDEX(oleft);
-    left = (XawTextPosition)FIXNUM_VALUE(oleft);
-
-    CHECK_INDEX(oright);
-    right = (XawTextPosition)FIXNUM_VALUE(oright);
-
-    CHECK_STRING(otext);
-    block.firstPos = 0;
-    block.ptr = THESTR(otext);
-    block.length = strlen(block.ptr);
-    block.format = FMT8BIT;
-
-    return (FIXNUM(XawTextReplace(widget, left, right, &block)));
-}
-
-LispObj *
-Lisp_XawTextSearch(LispBuiltin *builtin)
-/*
- xaw-text-search widget direction text
- */
-{
-    Widget widget;
-    XawTextScanDirection direction;
-    XawTextBlock block;
-
-    LispObj *owidget, *odirection, *otext;
-
-    otext = ARGUMENT(2);
-    odirection = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-
-    CHECK_INDEX(odirection);
-    direction = (XawTextPosition)FIXNUM_VALUE(odirection);
-    if (direction != XawsdLeft && direction != XawsdRight)
-       LispDestroy("%s: %d does not fit in XawTextScanDirection",
-                   STRFUN(builtin), direction);
-
-    CHECK_STRING(otext);
-    block.firstPos = 0;
-    block.ptr = THESTR(otext);
-    block.length = strlen(block.ptr);
-    block.format = FMT8BIT;
-
-    return (FIXNUM(XawTextSearch(widget, direction, &block)));
-}
-
-LispObj *
-Lisp_XawListChange(LispBuiltin *builtin)
-/*
- xaw-list-change widget list &optional longest resize
- */
-{
-    Widget widget;
-    String *list;
-    int i, nitems;
-    int longest;
-    Boolean resize;
-    LispObj *object;
-    WidgetData *data;
-
-    LispObj *owidget, *olist, *olongest, *oresize;
-
-    oresize = ARGUMENT(3);
-    olongest = ARGUMENT(2);
-    olist = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-
-    CHECK_LIST(olist);
-    for (nitems = 0, object = olist; CONSP(object);
-        ++nitems, object = CDR(object))
-       CHECK_STRING(CAR(object));
-
-    if (olongest != UNSPEC) {
-       CHECK_INDEX(olongest);
-       longest = FIXNUM_VALUE(olongest);
-    }
-    else
-       XtVaGetValues(widget, XtNlongest, &longest, NULL, 0);
-    resize = oresize != UNSPEC && oresize != NIL;
-
-    /* No errors in arguments, build string list */
-    list = (String*)XtMalloc(sizeof(String) * nitems);
-    for (i = 0, object = olist; CONSP(object); i++, object = CDR(object))
-       list[i] = THESTR(CAR(object));
-
-    /* Check if xaw-list-change was already called
-      * for this widget and free previous data */
-    for (i = 0; i < num_list_data; i++)
-       if ((Widget)CAR(list_data[i]->object)->data.opaque.data == widget) {
-           XtRemoveCallback(widget, XtNdestroyCallback,
-                            LispXawCleanupCallback, list_data[i]);
-           LispXawCleanupCallback(widget, list_data[i], NULL);
-           break;
-       }
-
-    if (i >= num_list_data) {
-       ++num_list_data;
-       list_data = (WidgetData**)XtRealloc((XtPointer)list_data,
-                                           sizeof(WidgetData*) * num_list_data);
-    }
-
-    data = (WidgetData*)XtMalloc(sizeof(WidgetData));
-    data->data = list;
-    list_data[i] = data;
-    data->object = CONS(owidget, olist);
-    PROTECT(owidget, data->object);
-    XtAddCallback(widget, XtNdestroyCallback, LispXawCleanupCallback, data);
-
-    XawListChange(widget, list, nitems, longest, resize);
-
-    return (olist);
-}
-
-LispObj *
-Lisp_XawListHighlight(LispBuiltin *builtin)
-/*
- xaw-list-highlight widget index
- */
-{
-    Widget widget;
-    int position;
-
-    LispObj *owidget, *oindex;
-
-    oindex = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-
-    CHECK_INDEX(oindex);
-    position = FIXNUM_VALUE(oindex);
-
-    XawListHighlight(widget, position);
-
-    return (oindex);
-}
-
-LispObj *
-Lisp_XawListUnhighlight(LispBuiltin *builtin)
-/*
- xaw-list-unhighlight widget
- */
-{
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-
-    XawListUnhighlight((Widget)(owidget->data.opaque.data));
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XawScrollbarSetThumb(LispBuiltin *builtin)
-/*
- xaw-scrollbar-set-thumb widget top &optional shown
- */
-{
-    Widget widget;
-    double top, shown;
-
-    LispObj *owidget, *otop, *oshown;
-
-    oshown = ARGUMENT(2);
-    otop = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xawWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-
-    CHECK_DFLOAT(otop);
-    top = DFLOAT_VALUE(otop);
-
-    if (oshown == UNSPEC)
-       shown = 1.0;
-    else {
-       CHECK_DFLOAT(oshown);
-       shown = DFLOAT_VALUE(oshown);
-    }
-
-    XawScrollbarSetThumb(widget, top, shown);
-
-    return (oshown == UNSPEC ? DFLOAT(shown) : oshown);
-}
diff --git a/xedit/lisp/modules/xedit.lsp b/xedit/lisp/modules/xedit.lsp
deleted file mode 100644 (file)
index 9b916d5..0000000
+++ /dev/null
@@ -1,569 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XdotOrg: xc/programs/xedit/lisp/modules/xedit.lsp,v 1.2 2004/04/23 19:54:45 eich Exp $
-;; $XFree86: xc/programs/xedit/lisp/modules/xedit.lsp,v 1.9 2003/01/16 03:50:46 paulo Exp $
-;;
-
-(provide "xedit")
-
-#+debug        (make-package "XEDIT" :use '("LISP" "EXT"))
-(in-package "XEDIT")
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  TODO The user should be able to define *auto-modes* prior to the
-;; initialization here in a configuration file, since defvar only binds
-;; the variable if it is unbound or doesn't have a value defined.
-;;  *auto-modes* is a list of conses where every car is compiled
-;; to a regexp to match the name of the file being loaded. The caddr is
-;; either a string, a pathname, or a syntax-p.
-;;  When loading a file, if the regexp in the car matches, it will check
-;; the caddr value, and if it is a:
-;;     string:         executes (load "progmodes/<the-string>.lsp")
-;;     pathname:       executes (load <the-pathhame>)
-;;     syntax-p:       does nothing, already loaded
-;;
-;;  If it fails to load the file, or the returned value is not a
-;; syntax-p, the entry is removed.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar *auto-modes* '(
-    ("\\.(c|cc|C|cxx|cpp|h|hpp|bm|xbm|xpm|y|h\\.in)$"
-       "C/C++"         "c"     . *c-mode*)
-    ("\\.(l|li?sp|scm)$"
-       "Lisp/Scheme"   "lisp"  . *lisp-mode*)
-    ("\\.sh$"
-       "Unix shell"    "sh"    . *sh-mode*)
-    ("\\.(diff|patch)"
-       "Patch file"    "patch" . *patch-mode*)
-    ("/[Mm]akefile.*|\\.mk$"
-       "Makefile"      "make"  . *make-mode*)
-    ("\\.(ac|in|m4)$"
-       "Autotools"     "auto"  . *auto-mode*)
-    ("\\.spec$"
-       "RPM spec"      "rpm"   . *rpm-mode*)
-    ("\\.(pl|pm|ph)$"
-       "Perl"          "perl"  . *perl-mode*)
-    ("\\.(py)$"
-       "Python"        "python". *python-mode*)
-    ("\\.(sgml?|dtd)$"
-       "SGML"          "sgml"  . *sgml-mode*)
-    ("\\.html?$"
-       "HTML"          "html"  . *html-mode*)
-    ("\\.(man|\\d)$"
-       "Man page"      "man"   . *man-mode*)
-    ("app-defaults/\\w+|\\u[A-Za-z0-9_-]+\\.ad"
-       "X resource"    "xrdb"  . *xrdb-mode*)
-    ("\\<(XF86Config|xorg.conf)[^/]*"
-       "XF86Config"    "xconf" . *xconf-mode*)
-    ("\\<(XFree86|Xorg)\\.\\d+\\.log(\\..*|$)"
-       "XFree86 log"   "xlog"  . *xlog-mode*)
-    ("Imakefile|(\\.(cf|rules|tmpl|def)$)"
-       "X imake"       "imake" . *imake-mode*)
-))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Compile the regexps in the *auto-modes* list.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(dolist (mode *auto-modes*)
-    (rplaca mode (re-comp (car mode) :nosub t))
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Find the progmode associated with the given filename.
-;; Returns nil if nothing matches.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun auto-mode (filename &optional symbol &aux syntax)
-    (if (and symbol (symbolp symbol))
-       (if (boundp symbol)
-           (return-from auto-mode (symbol-value symbol))
-           (setq syntax (cddr (find symbol *auto-modes* :key #'cdddr)))
-       )
-       ;; symbol optional argument is not a symbol
-       (do*
-           (
-           (mode   *auto-modes*    (cdr mode))
-           (regex  (caar mode)     (caar mode))
-           )
-           ((endp mode))
-
-           ;; only wants to know if the regex match.
-           (when (listp (re-exec regex filename :count 0))
-               (setq syntax (cddar mode) symbol (cdr syntax))
-               (return)
-           )
-       )
-    )
-
-    ;; if file was already loaded
-    (if (and symbol (boundp symbol))
-       (return-from auto-mode (symbol-value symbol))
-    )
-
-    (when (consp syntax)
-       ;; point to the syntax file specification
-       (setq syntax (car syntax))
-
-       ;; try to load the syntax definition file
-       (if (stringp syntax)
-           (load
-               (string-concat
-                   (namestring *default-pathname-defaults*)
-                   "progmodes/"
-                   syntax
-                   ".lsp"
-               )
-           )
-           (load syntax)
-       )
-
-       (and symbol (boundp symbol) (symbol-value symbol))
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Data types.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  The main syntax structure, normally, only one should exist per
-;; syntax highlight module.
-;;  The structure is defined here so it is not required to load all
-;; the extra data associated with syntax-highlight at initialization
-;; time, and will never be loaded if no syntax-highlight mode is
-;; defined to the files being edited.
-(defstruct syntax
-    name               ;;  A unique string to identify the syntax mode.
-                       ;; Should be the name of the language/file type.
-    options            ;;  A hash table of options specified for the
-                       ;; language.
-
-    ;; Field(s) defined at "compile time"
-    labels             ;;  Not exactly a list of labels, but all syntax
-                       ;; tables for the module.
-    quark              ;;  A XrmQuark associated with the XawTextPropertyList
-                       ;; used by this syntax mode.
-    token-count                ;;  Number of distinct syntoken structures in
-                       ;; the syntax table.
-)
-
-;;  Xlfd description, used when combining properties.
-;;  Field names are self descriptive.
-;;     XXX Fields should be initialized as strings, but fields
-;;         that have an integer value should be allowed to
-;;         be initialized as such.
-;;  Combining properties in supported in Xaw, but not yet in the
-;; syntax highlight code interface. Combining properties allow easier
-;; implementation for markup languages, for example:
-;;     <b>bold<i>italic</i></b>
-;;     would render "bold" using a bold version of the default font,
-;;     and "italic" using a bold and italic version of the default font
-(defstruct xlfd
-    foundry
-    family
-    weight
-    slant
-    setwidth
-    addstyle
-    pixel-size
-    point-size
-    res-x
-    res-y
-    spacing
-    avgwidth
-    registry
-    encoding
-)
-
-
-;;   At some time this structure should also hold information for at least:
-;;     o fontset
-;;     o foreground pixmap
-;;     o background pixmap
-;;   XXX This is also a TODO in Xaw.
-(defstruct synprop
-    quark      ;;   XrmQuark identifier of the XawTextProperty
-               ;; structure. This field is filled when "compiling"
-               ;; the syntax-table.
-
-    name       ;;   String name of property, must be unique per
-               ;; property list.
-    font       ;; Optional font string name of property.
-    foreground ;; Optional string representation of foreground color.
-    background ;; Optional string representation of background color.
-    xlfd       ;;   Optional xlfd structure, when combining properties.
-               ;; Currently combining properties logic not implemented,
-               ;; but fonts may be specified using the xlfd definition.
-
-    ;; Boolean properties.
-    underline  ;; Draw a line below the text.
-    overstrike ;; Draw a line over the text.
-
-    ;; XXX Are these working in Xaw?
-    subscript  ;; Align text to the bottom of the line.
-    superscript        ;; Align text to the top of the line.
-    ;;  Note: subscript and superscript only have effect when the text
-    ;; line has different height fonts displayed.
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Utility macro, to create a "special" variable holding
-;; a synprop structure.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defmacro defsynprop (variable name
-                     &key font foreground background xlfd underline
-                          overstrike subscript superscript)
-    `(progn
-       (proclaim '(special ,variable))
-       (setq ,variable
-           (make-synprop
-               :name           ,name
-               :font           ,font
-               :foreground     ,foreground
-               :background     ,background
-               :xlfd           ,xlfd
-               :underline      ,underline
-               :overstrike     ,overstrike
-               :subscript      ,subscript
-               :superscript    ,superscript
-           )
-       )
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Convert a synprop structure  to a string in the format
-;; expected by Xaw.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun synprop-to-string (synprop &aux values booleans xlfd)
-    (if (setq xlfd (synprop-xlfd synprop))
-       (dolist
-           (element
-              `(
-               ("foundry"          ,(xlfd-foundry xlfd))
-               ("family"           ,(xlfd-family xlfd))
-               ("weight"           ,(xlfd-weight xlfd))
-               ("slant"            ,(xlfd-slant xlfd))
-               ("setwidth"         ,(xlfd-setwidth xlfd))
-               ("addstyle"         ,(xlfd-addstyle xlfd))
-               ("pixelsize"        ,(xlfd-pixel-size xlfd))
-               ("pointsize"        ,(xlfd-point-size xlfd))
-               ("resx"             ,(xlfd-res-x xlfd))
-               ("resy"             ,(xlfd-res-y xlfd))
-               ("spacing"          ,(xlfd-spacing xlfd))
-               ("avgwidth"         ,(xlfd-avgwidth xlfd))
-               ("registry"         ,(xlfd-registry xlfd))
-               ("encoding"         ,(xlfd-encoding xlfd))
-               )
-           )
-           (if (cadr element)
-               (setq values (append values element))
-           )
-       )
-    )
-    (dolist
-       (element
-          `(
-           ("font"             ,(synprop-font synprop))
-           ("foreground"       ,(synprop-foreground synprop))
-           ("background"       ,(synprop-background synprop))
-           )
-       )
-       (if (cadr element)
-           (setq values (append values element))
-       )
-    )
-
-    ;;  Boolean attributes. These can be specified in the format
-    ;; <name>=<anything>, but do a nicer output as the format
-    ;; <name> is accepted.
-    (dolist
-       (element
-           `(
-           ("underline"        ,(synprop-underline synprop))
-           ("overstrike"       ,(synprop-overstrike synprop))
-           ("subscript"        ,(synprop-subscript synprop))
-           ("superscript"      ,(synprop-superscript synprop))
-           )
-       )
-       (if (cadr element)
-           (setq booleans (append booleans element))
-       )
-    )
-
-    ;;  Play with format conditionals, list iteration, and goto, to
-    ;; make resulting string.
-    (format
-       nil
-       "~A~:[~;?~]~:[~3*~;~A=~A~{&~A=~A~}~]~:[~;&~]~:[~2*~;~A~{&~A~*~}~]"
-
-       (synprop-name synprop)                          ;; ~A
-       (or values booleans)                            ;; ~:[~;?~]
-       values                                          ;; ~:[
-           (car values) (cadr values) (cddr values)    ;; ~A=~A~{&~A=~A~}
-       (and values booleans)                           ;; ~:[~;&~]
-       booleans                                        ;; ~:[
-           (car booleans) (cddr booleans)              ;; ~A~{&~A~*~}
-    )
-)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  Use xedit protocol to create a XawTextPropertyList with the
-;; given arguments.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun compile-syntax-property-list (name properties
-                                    &aux string-properties quark)
-
-    ;; Create a string representation of the properties.
-    (dolist (property properties)
-       (setq
-           string-properties
-           (append
-               string-properties
-               (list (synprop-to-string property))
-           )
-       )
-    )
-
-    (setq
-       string-properties
-       (case (length string-properties)
-           (0  "")
-           (1  (car string-properties))
-           (t  (format nil "~A~{,~A~}"
-                   (car string-properties)
-                   (cdr string-properties)
-               )
-           )
-       )
-    )
-
-#+debug
-    (format *output* "~Cconvert-property-list ~S ~S~%"
-       *escape*
-       name
-       string-properties
-    )
-    (setq quark #-debug (convert-property-list name string-properties)
-               #+debug 0)
-
-    ;; Store the quark for properties not yet "initialized".
-    ;; XXX This is just a call to Xrm{Perm,}StringToQuark, and should
-    ;;     be made available if there were a wrapper/interface to
-    ;;     that Xlib function.
-    (dolist (property properties)
-       (unless (integerp (synprop-quark property))
-#+debug
-           (format *output* "~Cxrm-string-to-quark ~S~%"
-               *escape*
-               (synprop-name property)
-           )
-           (setf
-               (synprop-quark property)
-#-debug                (xrm-string-to-quark (synprop-name property))
-#+debug                0
-           )
-       )
-    )
-
-    quark
-)
-
-
-
-
-#+debug
-(progn
-    (defconstant *escape* #\$)
-
-    (defconstant *output* *standard-output*)
-
-    ;; Recognized identifiers for wrap mode.
-    (defconstant *wrap-modes* '(:never :line :word))
-
-    ;; Recognized identifiers for justification.
-    (defconstant *justifications* '(:left :right :center :full))
-
-    ;; XawTextScanType
-    (defconstant *scan-type*
-       '(:positions :white-space :eol :paragraph :all :alpha-numeric))
-
-    ;; XawTextScanDirection
-    (defconstant *scan-direction* '(:left :right))
-
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    ;; Debugging version of xedit functions.
-    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-    (defun clear-entities (left right)
-       (format *output* "~Cclear-entities ~D ~D~%"
-           *escape* left right))
-
-    (defun add-entity (offset length identifier)
-       (format *output* "~Cadd-entity ~D ~D ~D~%"
-           *escape* offset length identifier))
-
-    (defun background (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-background ~S~%" *escape* value)
-           (format *output* "~Cget-background~%" *escape*)))
-
-    (defun foreground (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-foreground ~S~%" *escape* value)
-           (format *output* "~Cget-foreground~%" *escape*)))
-
-    (defun font (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-font ~S~%" *escape* value)
-           (format *output* "~Cget-font~%" *escape*)))
-
-    (defun point (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-point ~D~%" *escape* value)
-           (format *output* "~Cget-point~%" *escape*)))
-
-    (defun point-min ()
-       (format *output* "~Cpoint-min~%" *escape*))
-
-    (defun point-max ()
-       (format *output* "~Cpoint-max~%" *escape*))
-
-    (defun property-list (&optional (quark nil specified))
-       (format *output* "~property-list ~D~%" *escape* quark))
-
-    (defun insert (string)
-       (format *output* "~Cinsert ~S~%" *escape* string))
-
-    (defun read-text (offset length)
-       (format *output* "~Cread-text ~D ~D~%"
-           *escape* offset length))
-
-    (defun replace-text (left right string)
-       (format *output* "~Creplace-text ~D ~D ~S~%"
-           *escape* left right string))
-
-    (defun scan (offset type direction &key (count 1) include)
-       (unless (setq type (position type *scan-type*))
-           (error "SCAN: type must be one of ~A, not ~A"
-               *scan-type* type))
-       (unless (setq direction (position direction *scan-direction*))
-           (error "SCAN: direction must be one of ~A, not ~A"
-               *scan-direction* direction))
-       (format *output* "~Cscan ~D ~D ~D ~D ~D~%"
-           *escape* offset type direction count (if include 1 0)))
-
-    (defun search-forward (string &optional case-sensitive)
-       (format *output* "~Csearch-forward ~S ~D~%"
-           *escape* string (if case-sensitive 1 0)))
-
-    (defun search-backward (string &optional case-sensitive)
-       (format *output* "~Csearch-backward ~S ~D~%"
-           *escape* string (if case-sensitive 1 0)))
-
-    (defun wrap-mode (&optional (value nil specified))
-       (if specified
-           (progn
-               (unless (member value *wrap-modes*)
-                   (error "WRAP-MODE: argument must be one of ~A, not ~A"
-                       *wrap-modes* value))
-               (format *output* "~Cset-wrap-mode ~S~%"
-                   *escape* (string value)))
-           (format *output* "~Cget-wrap-mode~%" *escape*)))
-
-    (defun auto-fill (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-auto-fill ~S~%"
-               *escape* (if value "true" "false"))
-           (format *output* "~Cget-auto-fill~%" *escape*)))
-
-    (defun justification (&optional (value nil specified))
-       (if specified
-           (progn
-               (unless (member value *justifications*)
-                   (error "JUSTIFICATION: argument must be one of ~A, not ~A"
-                       *justifications* value))
-               (format *output* "~Cset-justification ~S~%"
-                   *escape* (string value)))
-           (format *output* "~Cget-justification~%" *escape*)))
-
-    (defun left-column (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-left-column ~D~%" *escape* value)
-           (format *output* "~Cget-left-column~%" *escape*)))
-
-    (defun right-column (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-right-column ~D~%" *escape* value)
-           (format *output* "~Cget-right-column~%" *escape*)))
-
-    (defun vertical-scrollbar (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-vert-scrollbar ~S~%"
-               *escape* (if value "always" "never"))
-           (format *output* "~Cget-vert-scrollbar~%" *escape*)))
-
-    (defun horizontal-scrollbar (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-horiz-scrollbar ~S~%"
-               *escape* (if value "always" "never"))
-           (format *output* "~Cget-horiz-scrollbar~%" *escape*)))
-
-    #|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-    (defun create-buffer (name)
-       (format *output* "~Ccreate-buffer ~S~%" *escape* name))
-
-    (defun remove-buffer (name)
-       (format *output* "~Cremove-buffer ~S~%" *escape* name))
-
-    (defun buffer-name (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-buffer-name ~S~%" *escape* value)
-           (format *output* "~Cget-buffer-name~%" *escape*)))
-
-    (defun buffer-filename (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-buffer-filename ~S~%"
-               *escape* (namestring value))
-           (format *output* "~Cget-buffer-filename~%" *escape*)))
-
-    (defun current-buffer (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-current-buffer ~S~%" *escape* value)
-           (format *output* "~Cget-current-buffer~%" *escape*)))
-
-    (defun other-buffer (&optional (value nil specified))
-       (if specified
-           (format *output* "~Cset-other-buffer ~S~%" *escape* value)
-           (format *output* "~Cget-other-buffer~%" *escape*)))
-    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#
-)
diff --git a/xedit/lisp/modules/xt.c b/xedit/lisp/modules/xt.c
deleted file mode 100644 (file)
index 5ea51b2..0000000
+++ /dev/null
@@ -1,1799 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/modules/xt.c,v 1.20tsi Exp $ */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include "lisp/internal.h"
-#include "lisp/private.h"
-
-/*
- * Types
- */
-typedef struct {
-    XrmQuark qname;
-    XrmQuark qtype;
-    Cardinal size;
-} ResourceInfo;
-
-typedef struct {
-    WidgetClass widget_class;
-    ResourceInfo **resources;
-    Cardinal num_resources;
-    Cardinal num_cons_resources;
-} ResourceList;
-
-typedef struct {
-    Arg *args;
-    Cardinal num_args;
-} Resources;
-
-typedef struct {
-    LispObj *data;
-    /* data is => (list* widget callback argument) */
-} CallbackArgs;
-
-/*
- * Prototypes
- */
-int xtLoadModule(void);
-void LispXtCleanupCallback(Widget, XtPointer, XtPointer);
-
-void LispXtCallback(Widget, XtPointer, XtPointer);
-void LispXtInputCallback(XtPointer, int*, XtInputId*);
-
-/* a hack... */
-LispObj *Lisp_XtCoerceToWidgetList(LispBuiltin*);
-
-LispObj *Lisp_XtAddCallback(LispBuiltin*);
-LispObj *Lisp_XtAppInitialize(LispBuiltin*);
-LispObj *Lisp_XtAppMainLoop(LispBuiltin*);
-LispObj *Lisp_XtAppAddInput(LispBuiltin*);
-LispObj *Lisp_XtAppPending(LispBuiltin*);
-LispObj *Lisp_XtAppProcessEvent(LispBuiltin*);
-LispObj *Lisp_XtCreateWidget(LispBuiltin*);
-LispObj *Lisp_XtCreateManagedWidget(LispBuiltin*);
-LispObj *Lisp_XtCreatePopupShell(LispBuiltin*);
-LispObj *Lisp_XtDestroyWidget(LispBuiltin*);
-LispObj *Lisp_XtGetKeyboardFocusWidget(LispBuiltin*);
-LispObj *Lisp_XtGetValues(LispBuiltin*);
-LispObj *Lisp_XtManageChild(LispBuiltin*);
-LispObj *Lisp_XtUnmanageChild(LispBuiltin*);
-LispObj *Lisp_XtSetMappedWhenManaged(LispBuiltin*);
-LispObj *Lisp_XtMapWidget(LispBuiltin*);
-LispObj *Lisp_XtName(LispBuiltin*);
-LispObj *Lisp_XtParent(LispBuiltin*);
-LispObj *Lisp_XtUnmapWidget(LispBuiltin*);
-LispObj *Lisp_XtPopup(LispBuiltin*);
-LispObj *Lisp_XtPopdown(LispBuiltin*);
-LispObj *Lisp_XtIsRealized(LispBuiltin*);
-LispObj *Lisp_XtRealizeWidget(LispBuiltin*);
-LispObj *Lisp_XtUnrealizeWidget(LispBuiltin*);
-LispObj *Lisp_XtRemoveInput(LispBuiltin*);
-LispObj *Lisp_XtSetSensitive(LispBuiltin*);
-LispObj *Lisp_XtSetValues(LispBuiltin*);
-LispObj *Lisp_XtWidgetToApplicationContext(LispBuiltin*);
-LispObj *Lisp_XtDisplay(LispBuiltin*);
-LispObj *Lisp_XtDisplayOfObject(LispBuiltin*);
-LispObj *Lisp_XtScreen(LispBuiltin*);
-LispObj *Lisp_XtScreenOfObject(LispBuiltin*);
-LispObj *Lisp_XtSetKeyboardFocus(LispBuiltin*);
-LispObj *Lisp_XtWindow(LispBuiltin*);
-LispObj *Lisp_XtWindowOfObject(LispBuiltin*);
-LispObj *Lisp_XtAddGrab(LispBuiltin*);
-LispObj *Lisp_XtRemoveGrab(LispBuiltin*);
-LispObj *Lisp_XtAppGetExitFlag(LispBuiltin*);
-LispObj *Lisp_XtAppSetExitFlag(LispBuiltin*);
-
-LispObj *LispXtCreateWidget(LispBuiltin*, int);
-
-static Resources *LispConvertResources(LispObj*, Widget,
-                                      ResourceList*, ResourceList*);
-static void LispFreeResources(Resources*);
-
-static int bcmp_action_resource(_Xconst void*, _Xconst void*);
-static ResourceInfo *GetResourceInfo(char*, ResourceList*, ResourceList*);
-static ResourceList *GetResourceList(WidgetClass);
-static int bcmp_action_resource_list(_Xconst void*, _Xconst void*);
-static ResourceList *FindResourceList(WidgetClass);
-static int qcmp_action_resource_list(_Xconst void*, _Xconst void*);
-static ResourceList *CreateResourceList(WidgetClass);
-static int qcmp_action_resource(_Xconst void*, _Xconst void*);
-static void BindResourceList(ResourceList*);
-
-static void PopdownAction(Widget, XEvent*, String*, Cardinal*);
-static void QuitAction(Widget, XEvent*, String*, Cardinal*);
-
-/*
- * Initialization
- */
-static LispBuiltin lispbuiltins[] = {
-    {LispFunction, Lisp_XtCoerceToWidgetList, "xt-coerce-to-widget-list number opaque"},
-
-    {LispFunction, Lisp_XtAddGrab, "xt-add-grab widget exclusive spring-loaded"},
-    {LispFunction, Lisp_XtAddCallback, "xt-add-callback widget callback-name callback &optional client-data"},
-    {LispFunction, Lisp_XtAppAddInput, "xt-app-add-input app-context fileno condition function &optional client-data"},
-    {LispFunction, Lisp_XtAppInitialize, "xt-app-initialize app-context-return application-class &optional options fallback-resources"},
-    {LispFunction, Lisp_XtAppPending, "xt-app-pending app-context"},
-    {LispFunction, Lisp_XtAppMainLoop, "xt-app-main-loop app-context"},
-    {LispFunction, Lisp_XtAppProcessEvent, "xt-app-process-event app-context &optional mask"},
-    {LispFunction, Lisp_XtAppGetExitFlag, "xt-app-get-exit-flag app-context"},
-    {LispFunction, Lisp_XtAppSetExitFlag, "xt-app-set-exit-flag app-context"},
-    {LispFunction, Lisp_XtCreateManagedWidget, "xt-create-managed-widget name widget-class parent &optional arguments"},
-    {LispFunction, Lisp_XtCreateWidget, "xt-create-widget name widget-class parent &optional arguments"},
-    {LispFunction, Lisp_XtCreatePopupShell, "xt-create-popup-shell name widget-class parent &optional arguments"},
-    {LispFunction, Lisp_XtDestroyWidget, "xt-destroy-widget widget"},
-    {LispFunction, Lisp_XtGetKeyboardFocusWidget, "xt-get-keyboard-focus-widget widget"},
-    {LispFunction, Lisp_XtGetValues, "xt-get-values widget arguments"},
-    {LispFunction, Lisp_XtManageChild, "xt-manage-child widget"},
-    {LispFunction, Lisp_XtName, "xt-name widget"},
-    {LispFunction, Lisp_XtUnmanageChild, "xt-unmanage-child widget"},
-    {LispFunction, Lisp_XtMapWidget, "xt-map-widget widget"},
-    {LispFunction, Lisp_XtUnmapWidget, "xt-unmap-widget widget"},
-    {LispFunction, Lisp_XtSetMappedWhenManaged, "xt-set-mapped-when-managed widget map-when-managed"},
-    {LispFunction, Lisp_XtParent, "xt-parent widget"},
-    {LispFunction, Lisp_XtPopup, "xt-popup widget grab-kind"},
-    {LispFunction, Lisp_XtPopdown, "xt-popdown widget"},
-    {LispFunction, Lisp_XtIsRealized, "xt-is-realized widget"},
-    {LispFunction, Lisp_XtRealizeWidget, "xt-realize-widget widget"},
-    {LispFunction, Lisp_XtUnrealizeWidget, "xt-unrealize-widget widget"},
-    {LispFunction, Lisp_XtRemoveInput, "xt-remove-input input"},
-    {LispFunction, Lisp_XtRemoveGrab, "xt-remove-grab widget"},
-    {LispFunction, Lisp_XtSetKeyboardFocus, "xt-set-keyboard-focus widget descendant"},
-    {LispFunction, Lisp_XtSetSensitive, "xt-set-sensitive widget sensitive"},
-    {LispFunction, Lisp_XtSetValues, "xt-set-values widget arguments"},
-    {LispFunction, Lisp_XtWidgetToApplicationContext, "xt-widget-to-application-context widget"},
-    {LispFunction, Lisp_XtDisplay, "xt-display widget"},
-    {LispFunction, Lisp_XtDisplayOfObject, "xt-display-of-object object"},
-    {LispFunction, Lisp_XtScreen, "xt-screen widget"},
-    {LispFunction, Lisp_XtScreenOfObject, "xt-screen-of-object object"},
-    {LispFunction, Lisp_XtWindow, "xt-window widget"},
-    {LispFunction, Lisp_XtWindowOfObject, "xt-window-of-object object"},
-};
-
-LispModuleData xtLispModuleData = {
-    LISP_MODULE_VERSION,
-    xtLoadModule,
-};
-
-static ResourceList **resource_list;
-static Cardinal num_resource_list;
-
-static Atom delete_window;
-static int xtAppContext_t, xtWidget_t, xtWidgetClass_t, xtWidgetList_t,
-          xtInputId_t, xtDisplay_t, xtScreen_t, xtWindow_t;
-
-static XtActionsRec actions[] = {
-    {"xt-popdown",     PopdownAction},
-    {"xt-quit",                QuitAction},
-};
-
-static XrmQuark qCardinal, qInt, qString, qWidget, qFloat;
-
-static CallbackArgs **input_list;
-static Cardinal num_input_list, size_input_list;
-
-/*
- * Implementation
- */
-int
-xtLoadModule(void)
-{
-    int i;
-    char *fname = "XT-LOAD-MODULE";
-
-    xtAppContext_t = LispRegisterOpaqueType("XtAppContext");
-    xtWidget_t = LispRegisterOpaqueType("Widget");
-    xtWidgetClass_t = LispRegisterOpaqueType("WidgetClass");
-    xtWidgetList_t = LispRegisterOpaqueType("WidgetList");
-    xtInputId_t = LispRegisterOpaqueType("XtInputId");
-    xtDisplay_t = LispRegisterOpaqueType("Display*");
-    xtScreen_t = LispRegisterOpaqueType("Screen*");
-    xtWindow_t = LispRegisterOpaqueType("Window");
-
-    LispExecute("(DEFSTRUCT XT-WIDGET-LIST NUM-CHILDREN CHILDREN)\n");
-
-    GCDisable();
-    (void)LispSetVariable(ATOM2("CORE-WIDGET-CLASS"),
-                         OPAQUE(coreWidgetClass, xtWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("COMPOSITE-WIDGET-CLASS"),
-                         OPAQUE(compositeWidgetClass, xtWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("CONSTRAINT-WIDGET-CLASS"),
-                         OPAQUE(constraintWidgetClass, xtWidgetClass_t),
-                         fname, 0);
-    (void)LispSetVariable(ATOM2("TRANSIENT-SHELL-WIDGET-CLASS"),
-                         OPAQUE(transientShellWidgetClass, xtWidgetClass_t),
-                         fname, 0);
-
-    /* parameters for XtPopup */
-    (void)LispSetVariable(ATOM2("XT-GRAB-EXCLUSIVE"),
-                         INTEGER(XtGrabExclusive), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-GRAB-NONE"),
-                         INTEGER(XtGrabNone), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-GRAB-NONE-EXCLUSIVE"),
-                         INTEGER(XtGrabNonexclusive), fname, 0);
-
-    /* parameters for XtAppProcessEvent */
-    (void)LispSetVariable(ATOM2("XT-IM-XEVENT"),
-                         INTEGER(XtIMXEvent), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-IM-TIMER"),
-                         INTEGER(XtIMTimer), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-IM-ALTERNATE-INPUT"),
-                         INTEGER(XtIMAlternateInput), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-IM-SIGNAL"),
-                         INTEGER(XtIMSignal), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-IM-ALL"),
-                         INTEGER(XtIMAll), fname, 0);
-
-    /* parameters for XtAppAddInput */
-    (void)LispSetVariable(ATOM2("XT-INPUT-READ-MASK"),
-                         INTEGER(XtInputReadMask), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-INPUT-WRITE-MASK"),
-                         INTEGER(XtInputWriteMask), fname, 0);
-    (void)LispSetVariable(ATOM2("XT-INPUT-EXCEPT-MASK"),
-                         INTEGER(XtInputExceptMask), fname, 0);
-    GCEnable();
-
-    qCardinal = XrmPermStringToQuark(XtRCardinal);
-    qInt = XrmPermStringToQuark(XtRInt);
-    qString = XrmPermStringToQuark(XtRString);
-    qWidget = XrmPermStringToQuark(XtRWidget);
-    qFloat = XrmPermStringToQuark(XtRFloat);
-
-    for (i = 0; i < sizeof(lispbuiltins) / sizeof(lispbuiltins[0]); i++)
-       LispAddBuiltinFunction(&lispbuiltins[i]);
-
-    return (1);
-}
-
-void
-LispXtCallback(Widget w, XtPointer user_data, XtPointer call_data)
-{
-    CallbackArgs *args = (CallbackArgs*)user_data;
-    LispObj *code, *ocod = COD;
-
-    GCDisable();
-               /* callback name */        /* reall caller */
-    code = CONS(CDR(CDR(args->data)), CONS(OPAQUE(w, xtWidget_t),
-               CONS(CAR(CDR(args->data)), CONS(OPAQUE(call_data, 0), NIL))));
-                    /* user arguments */
-    COD = CONS(code, COD);
-    GCEnable();
-
-    (void)EVAL(code);
-    COD = ocod;
-}
-
-
-void
-LispXtCleanupCallback(Widget w, XtPointer user_data, XtPointer call_data)
-{
-    CallbackArgs *args = (CallbackArgs*)user_data;
-
-    UPROTECT(CAR(args->data), args->data);
-    XtFree((XtPointer)args);
-}
-
-void
-LispXtInputCallback(XtPointer closure, int *source, XtInputId *id)
-{
-    CallbackArgs *args = (CallbackArgs*)closure;
-    LispObj *code, *ocod = COD;
-
-    GCDisable();
-               /* callback name */       /* user arguments */
-    code = CONS(CDR(CDR(args->data)), CONS(CAR(CDR(args->data)),
-               CONS(INTEGER(*source), CONS(CAR(args->data), NIL))));
-                    /* input source */    /* input id */
-    COD = CONS(code, COD);
-    GCEnable();
-
-    (void)EVAL(code);
-    COD = ocod;
-}
-
-LispObj *
-Lisp_XtCoerceToWidgetList(LispBuiltin *builtin)
-/*
- xt-coerce-to-widget-list number opaque
- */
-{
-    int i;
-    WidgetList children;
-    Cardinal num_children;
-    LispObj *cons, *widget_list, *result;
-
-    LispObj *onumber, *opaque;
-
-    opaque = ARGUMENT(1);
-    onumber = ARGUMENT(0);
-
-    CHECK_INDEX(onumber);
-    num_children = FIXNUM_VALUE(onumber);
-
-    if (!CHECKO(opaque, xtWidgetList_t))
-       LispDestroy("%s: cannot convert %s to WidgetList",
-                   STRFUN(builtin), STROBJ(opaque));
-    children = (WidgetList)(opaque->data.opaque.data);
-
-    GCDisable();
-    widget_list = cons = NIL;
-    for (i = 0; i < num_children; i++) {
-       result = CONS(OPAQUE(children[i], xtWidget_t), NIL);
-       if (widget_list == NIL)
-           widget_list = cons = result;
-       else {
-           RPLACD(cons, result);
-           cons = CDR(cons);
-       }
-    }
-
-    result = APPLY(ATOM("MAKE-XT-WIDGET-LIST"),
-                  CONS(KEYWORD("NUM-CHILDREN"),
-                       CONS(INTEGER(num_children),
-                            CONS(KEYWORD("CHILDREN"),
-                                 CONS(widget_list, NIL)))));
-    GCEnable();
-
-    return (result);
-}
-
-LispObj *
-Lisp_XtAddCallback(LispBuiltin *builtin)
-/*
- xt-add-callback widget callback-name callback &optional client-data
- */
-{
-    CallbackArgs *arguments;
-    LispObj *data;
-
-    LispObj *widget, *callback_name, *callback, *client_data;
-
-    client_data = ARGUMENT(3);
-    callback = ARGUMENT(2);
-    callback_name = ARGUMENT(1);
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    CHECK_STRING(callback_name);
-    if (!SYMBOLP(callback) && callback->type != LispLambda_t)
-       LispDestroy("%s: %s cannot be used as a callback",
-                   STRFUN(builtin), STROBJ(callback));
-
-    if (client_data == UNSPEC)
-       client_data = NIL;
-
-    data = CONS(widget, CONS(client_data, callback));
-    PROTECT(widget, data);
-
-    arguments = XtNew(CallbackArgs);
-    arguments->data = data;
-
-    XtAddCallback((Widget)(widget->data.opaque.data), THESTR(callback_name),
-                 LispXtCallback, (XtPointer)arguments);
-    XtAddCallback((Widget)(widget->data.opaque.data), XtNdestroyCallback,
-                 LispXtCleanupCallback, (XtPointer)arguments);
-
-    return (client_data);
-}
-
-LispObj *
-Lisp_XtAppAddInput(LispBuiltin *builtin)
-/*
-  xt-app-add-input app-context fileno condition function &optional client-data
- */
-{
-    LispObj *data, *input;
-    XtAppContext appcon;
-    int source, condition;
-    CallbackArgs *arguments;
-    XtInputId id;
-
-    LispObj *app_context, *fileno, *ocondition, *function, *client_data;
-
-    client_data = ARGUMENT(4);
-    function = ARGUMENT(3);
-    ocondition = ARGUMENT(2);
-    fileno = ARGUMENT(1);
-    app_context = ARGUMENT(0);
-
-    if (!CHECKO(app_context, xtAppContext_t))
-       LispDestroy("%s: cannot convert %s to XtAppContext",
-                   STRFUN(builtin), STROBJ(app_context));
-    appcon = (XtAppContext)(app_context->data.opaque.data);
-
-    CHECK_LONGINT(fileno);
-    source = LONGINT_VALUE(fileno);
-
-    CHECK_FIXNUM(ocondition);
-    condition = FIXNUM_VALUE(ocondition);
-
-    if (!SYMBOLP(function) && function->type != LispLambda_t)
-       LispDestroy("%s: %s cannot be used as a callback",
-                   STRFUN(builtin), STROBJ(function));
-
-    /* client data optional */
-    if (client_data == UNSPEC)
-       client_data = NIL;
-
-    data = CONS(NIL, CONS(client_data, function));
-
-    arguments = XtNew(CallbackArgs);
-    arguments->data = data;
-
-    id = XtAppAddInput(appcon, source, (XtPointer)condition,
-                      LispXtInputCallback, (XtPointer)arguments);
-    GCDisable();
-    input = OPAQUE(id, xtInputId_t);
-    GCEnable();
-    RPLACA(data, input);
-    PROTECT(input, data);
-
-    if (num_input_list + 1 >= size_input_list) {
-       ++size_input_list;
-       input_list = (CallbackArgs**)
-           XtRealloc((XtPointer)input_list,
-                     sizeof(CallbackArgs*) * size_input_list);
-    }
-    input_list[num_input_list++] = arguments;
-
-    return (input);
-}
-
-LispObj *
-Lisp_XtRemoveInput(LispBuiltin *builtin)
-/*
- xt-remove-input input
- */
-{
-    int i;
-    XtInputId id;
-    CallbackArgs *args;
-
-    LispObj *input;
-
-    input = ARGUMENT(0);
-
-    if (!CHECKO(input, xtInputId_t))
-       LispDestroy("%s: cannot convert %s to XtInputId",
-                   STRFUN(builtin), STROBJ(input));
-
-    id = (XtInputId)(input->data.opaque.data);
-    for (i = 0; i < num_input_list; i++) {
-       args = input_list[i];
-       if (id == (XtInputId)(CAR(args->data)->data.opaque.data)) {
-           UPROTECT(CAR(args->data), args->data);
-           XtFree((XtPointer)args);
-
-           if (i + 1 < num_input_list)
-               memmove(input_list + i, input_list + i + 1,
-                       sizeof(CallbackArgs*) * (num_input_list - i - 1));
-           --num_input_list;
-
-           XtRemoveInput(id);
-
-           return (T);
-       }
-    }
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XtAppInitialize(LispBuiltin *builtin)
-/*
- xt-app-initialize app-context-return application-class &optional options fallback-resources
- */
-{
-    XtAppContext appcon;
-    Widget shell;
-    int zero = 0;
-    Resources *resources = NULL;
-    String *fallback = NULL;
-
-    LispObj *app_context_return, *application_class,
-           *options, *fallback_resources;
-
-    fallback_resources = ARGUMENT(3);
-    options = ARGUMENT(2);
-    application_class = ARGUMENT(1);
-    app_context_return = ARGUMENT(0);
-
-    CHECK_SYMBOL(app_context_return);
-    CHECK_STRING(application_class);
-    CHECK_LIST(options);
-
-    /* check fallback resources, if given */
-    if (fallback_resources != UNSPEC) {
-       LispObj *string;
-       int count;
-
-       CHECK_CONS(fallback_resources);
-       for (string = fallback_resources, count = 0; CONSP(string);
-            string = CDR(string), count++)
-           CHECK_STRING(CAR(string));
-
-       /* fallback resources was correctly specified */
-       fallback = LispMalloc(sizeof(String) * (count + 1));
-       for (string = fallback_resources, count = 0; CONSP(string);
-            string = CDR(string), count++)
-           fallback[count] = THESTR(CAR(string));
-       fallback[count] = NULL;
-    }
-
-    shell = XtAppInitialize(&appcon, THESTR(application_class), NULL,
-                           0, &zero, NULL, fallback, NULL, 0);
-    if (fallback)
-       LispFree(fallback);
-    (void)LispSetVariable(app_context_return,
-                         OPAQUE(appcon, xtAppContext_t),
-                         STRFUN(builtin), 0);
-
-    XtAppAddActions(appcon, actions, XtNumber(actions));
-
-    if (options != UNSPEC) {
-       resources = LispConvertResources(options, shell,
-                                        GetResourceList(XtClass(shell)),
-                                        NULL);
-       if (resources) {
-           XtSetValues(shell, resources->args, resources->num_args);
-           LispFreeResources(resources);
-       }
-    }
-
-    return (OPAQUE(shell, xtWidget_t));
-}
-
-LispObj *
-Lisp_XtAppMainLoop(LispBuiltin *builtin)
-/*
- xt-app-main-loop app-context
- */
-{
-    LispObj *app_context;
-
-    app_context = ARGUMENT(0);
-
-    if (!CHECKO(app_context, xtAppContext_t))
-       LispDestroy("%s: cannot convert %s to XtAppContext",
-                   STRFUN(builtin), STROBJ(app_context));
-
-    XtAppMainLoop((XtAppContext)(app_context->data.opaque.data));
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XtAppPending(LispBuiltin *builtin)
-/*
- xt-app-pending app-context
- */
-{
-    LispObj *app_context;
-
-    app_context = ARGUMENT(0);
-
-    if (!CHECKO(app_context, xtAppContext_t))
-       LispDestroy("%s: cannot convert %s to XtAppContext",
-                   STRFUN(builtin), STROBJ(app_context));
-
-    return (INTEGER(
-           XtAppPending((XtAppContext)(app_context->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XtAppProcessEvent(LispBuiltin *builtin)
-/*
- xt-app-process-event app-context &optional mask
- */
-{
-    XtInputMask mask;
-    XtAppContext appcon;
-
-    LispObj *app_context, *omask;
-
-    omask = ARGUMENT(1);
-    app_context = ARGUMENT(0);
-
-    if (!CHECKO(app_context, xtAppContext_t))
-       LispDestroy("%s: cannot convert %s to XtAppContext",
-                   STRFUN(builtin), STROBJ(app_context));
-
-    appcon = (XtAppContext)(app_context->data.opaque.data);
-    if (omask == UNSPEC)
-       mask = XtIMAll;
-    else {
-       CHECK_FIXNUM(omask);
-       mask = FIXNUM_VALUE(omask);
-    }
-
-    if (mask != (mask & XtIMAll))
-       LispDestroy("%s: %ld does not fit in XtInputMask %ld",
-                   STRFUN(builtin), (long)mask, (long)XtIMAll);
-
-    if (mask)
-       XtAppProcessEvent(appcon, mask);
-
-    return (omask == NIL ? FIXNUM(mask) : omask);
-}
-
-LispObj *
-Lisp_XtRealizeWidget(LispBuiltin *builtin)
-/*
- xt-realize-widget widget
- */
-{
-    Widget widget;
-
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    XtRealizeWidget(widget);
-
-    if (XtIsSubclass(widget, shellWidgetClass)) {
-       if (!delete_window)
-           delete_window = XInternAtom(XtDisplay(widget),
-                                       "WM_DELETE_WINDOW", False);
-       (void)XSetWMProtocols(XtDisplay(widget), XtWindow(widget),
-                             &delete_window, 1);
-    }
-
-    return (owidget);
-}
-
-LispObj *
-Lisp_XtUnrealizeWidget(LispBuiltin *builtin)
-/*
- xt-unrealize-widget widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    XtUnrealizeWidget((Widget)(widget->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtIsRealized(LispBuiltin *builtin)
-/*
- xt-is-realized widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    return (XtIsRealized((Widget)(widget->data.opaque.data)) ? T : NIL);
-}
-
-LispObj *
-Lisp_XtDestroyWidget(LispBuiltin *builtin)
-/*
- xt-destroy-widget widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    XtDestroyWidget((Widget)(widget->data.opaque.data));
-
-    return (NIL);
-}
-
-#define UNMANAGED      0
-#define MANAGED                1
-#define SHELL          2
-LispObj *
-Lisp_XtCreateWidget(LispBuiltin *builtin)
-/*
- xt-create-widget name widget-class parent &optional arguments
- */
-{
-    return (LispXtCreateWidget(builtin, UNMANAGED));
-}
-
-LispObj *
-Lisp_XtCreateManagedWidget(LispBuiltin *builtin)
-/*
- xt-create-managed-widget name widget-class parent &optional arguments
- */
-{
-    return (LispXtCreateWidget(builtin, MANAGED));
-}
-
-LispObj *
-Lisp_XtCreatePopupShell(LispBuiltin *builtin)
-/*
- xt-create-popup-shell name widget-class parent &optional arguments
- */
-{
-    return (LispXtCreateWidget(builtin, SHELL));
-}
-
-LispObj *
-LispXtCreateWidget(LispBuiltin *builtin, int options)
-/*
- xt-create-widget name widget-class parent &optional arguments
- xt-create-managed-widget name widget-class parent &optional arguments
- xt-create-popup-shell name widget-class parent &optional arguments
- */
-{
-    char *name;
-    WidgetClass widget_class;
-    Widget widget, parent;
-    Resources *resources = NULL;
-
-    LispObj *oname, *owidget_class, *oparent, *arguments;
-
-    arguments = ARGUMENT(3);
-    oparent = ARGUMENT(2);
-    owidget_class = ARGUMENT(1);
-    oname = ARGUMENT(0);
-
-    CHECK_STRING(oname);
-    name = THESTR(oname);
-
-    if (!CHECKO(owidget_class, xtWidgetClass_t))
-       LispDestroy("%s: cannot convert %s to WidgetClass",
-                   STRFUN(builtin), STROBJ(owidget_class));
-    widget_class = (WidgetClass)(owidget_class->data.opaque.data);
-
-    if (!CHECKO(oparent, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(oparent));
-    parent = (Widget)(oparent->data.opaque.data);
-
-    if (arguments == UNSPEC)
-       arguments = NIL;
-    CHECK_LIST(arguments);
-
-    if (options == SHELL)
-       widget = XtCreatePopupShell(name, widget_class, parent, NULL, 0);
-    else
-       widget = XtCreateWidget(name, widget_class, parent, NULL, 0);
-
-    if (arguments == NIL)
-       resources = NULL;
-    else {
-       resources = LispConvertResources(arguments, widget,
-                                        GetResourceList(widget_class),
-                                        GetResourceList(XtClass(parent)));
-       XtSetValues(widget, resources->args, resources->num_args);
-    }
-    if (options == MANAGED)
-       XtManageChild(widget);
-    if (resources)
-       LispFreeResources(resources);
-
-    return (OPAQUE(widget, xtWidget_t));
-}
-
-LispObj *
-Lisp_XtGetKeyboardFocusWidget(LispBuiltin *builtin)
-/*
- xt-get-keyboard-focus-widget widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    return (OPAQUE(XtGetKeyboardFocusWidget((Widget)(widget->data.opaque.data)),
-                  xtWidget_t));
-}
-
-LispObj *
-Lisp_XtGetValues(LispBuiltin *builtin)
-/*
- xt-get-values widget arguments
- */
-{
-    Arg args[1];
-    Widget widget;
-    ResourceList *rlist, *plist;
-    ResourceInfo *resource;
-    LispObj *list, *object = NIL, *result, *cons = NIL;
-    char c1;
-    short c2;
-    int c4;
-#ifdef LONG64
-    long c8;
-#endif
-
-    LispObj *owidget, *arguments;
-
-    arguments = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (arguments == NIL)
-       return (NIL);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    CHECK_CONS(arguments);
-
-    rlist = GetResourceList(XtClass(widget));
-    plist =  XtParent(widget) ?
-            GetResourceList(XtClass(XtParent(widget))) : NULL;
-
-    GCDisable();
-    result = NIL;
-    for (list = arguments; CONSP(list); list = CDR(list)) {
-       CHECK_STRING(CAR(list));
-       if ((resource = GetResourceInfo(THESTR(CAR(list)), rlist, plist))
-            == NULL) {
-           int i;
-           Widget child;
-
-           for (i = 0; i < rlist->num_resources; i++) {
-               if (rlist->resources[i]->qtype == qWidget) {
-                   XtSetArg(args[0],
-                            XrmQuarkToString(rlist->resources[i]->qname),
-                            &child);
-                   XtGetValues(widget, args, 1);
-                   if (child && XtParent(child) == widget) {
-                       resource =
-                           GetResourceInfo(THESTR(CAR(list)),
-                                           GetResourceList(XtClass(child)),
-                                           NULL);
-                       if (resource)
-                           break;
-                   }
-               }
-           }
-           if (resource == NULL) {
-               LispMessage("%s: resource %s not available",
-                           STRFUN(builtin), THESTR(CAR(list)));
-               continue;
-           }
-       }
-       switch (resource->size) {
-           case 1:
-               XtSetArg(args[0], THESTR(CAR(list)), &c1);
-               break;
-           case 2:
-               XtSetArg(args[0], THESTR(CAR(list)), &c2);
-               break;
-           case 4:
-               XtSetArg(args[0], THESTR(CAR(list)), &c4);
-               break;
-#ifdef LONG64
-           case 1:
-               XtSetArg(args[0], THESTR(CAR(list)), &c8);
-               break;
-#endif
-       }
-       XtGetValues(widget, args, 1);
-
-       /* special resources */
-       if (resource->qtype == qString) {
-#ifdef LONG64
-           object = CONS(CAR(list), STRING((char*)c8));
-#else
-           object = CONS(CAR(list), STRING((char*)c4));
-#endif
-       }
-       else if (resource->qtype == qCardinal || resource->qtype == qInt) {
-#ifdef LONG64
-           if (sizeof(int) == 8)
-               object = CONS(CAR(list), INTEGER(c8));
-           else
-#endif
-           object = CONS(CAR(list), INTEGER(c4));
-       }
-       else {
-           switch (resource->size) {
-               case 1:
-                   object = CONS(CAR(list), OPAQUE(c1, 0));
-                   break;
-               case 2:
-                   object = CONS(CAR(list), OPAQUE(c2, 0));
-                   break;
-               case 4:
-                   object = CONS(CAR(list), OPAQUE(c4, 0));
-                   break;
-#ifdef LONG64
-               case 8:
-                   object = CONS(CAR(list), OPAQUE(c8, 0));
-                   break;
-#endif
-           }
-       }
-
-       if (result == NIL)
-           result = cons = CONS(object, NIL);
-       else {
-           RPLACD(cons, CONS(object, NIL));
-           cons = CDR(cons);
-       }
-    }
-    GCEnable();
-
-    return (result);
-}
-
-LispObj *
-Lisp_XtManageChild(LispBuiltin *builtin)
-/*
- xt-manage-child widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    XtManageChild((Widget)(widget->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtUnmanageChild(LispBuiltin *builtin)
-/*
- xt-unmanage-child widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    XtUnmanageChild((Widget)(widget->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtMapWidget(LispBuiltin *builtin)
-/*
- xt-map-widget widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    XtMapWidget((Widget)(widget->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtUnmapWidget(LispBuiltin *builtin)
-/*
- xt-unmap-widget widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    XtUnmapWidget((Widget)(widget->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtSetMappedWhenManaged(LispBuiltin *builtin)
-/*
- xt-set-mapped-when-managed widget map-when-managed
- */
-{
-    LispObj *widget, *map_when_managed;
-
-    map_when_managed = ARGUMENT(1);
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    XtSetMappedWhenManaged((Widget)(widget->data.opaque.data),
-                          map_when_managed != NIL);
-
-    return (map_when_managed);
-}
-
-LispObj *
-Lisp_XtPopup(LispBuiltin *builtin)
-/*
- xt-popup widget grab-kind
- */
-{
-    XtGrabKind kind;
-
-    LispObj *widget, *grab_kind;
-
-    grab_kind = ARGUMENT(1);
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    CHECK_INDEX(grab_kind);
-    kind = (XtGrabKind)FIXNUM_VALUE(grab_kind);
-    if (kind != XtGrabExclusive && kind != XtGrabNone &&
-       kind != XtGrabNonexclusive)
-       LispDestroy("%s: %d does not fit in XtGrabKind",
-                   STRFUN(builtin), kind);
-    XtPopup((Widget)(widget->data.opaque.data), kind);
-
-    return (grab_kind);
-}
-
-LispObj *
-Lisp_XtPopdown(LispBuiltin *builtin)
-/*
- xt-popdown widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    XtPopdown((Widget)(widget->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtSetKeyboardFocus(LispBuiltin *builtin)
-/*
- xt-set-keyboard-focus widget descendant
- */
-{
-    LispObj *widget, *descendant;
-
-    descendant = ARGUMENT(1);
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    if (!CHECKO(descendant, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(descendant));
-    XtSetKeyboardFocus((Widget)(widget->data.opaque.data),
-                      (Widget)(descendant->data.opaque.data));
-
-    return (widget);
-}
-
-LispObj *
-Lisp_XtSetSensitive(LispBuiltin *builtin)
-/*
- xt-set-sensitive widget sensitive
- */
-{
-    LispObj *widget, *sensitive;
-
-    sensitive = ARGUMENT(1);
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-    XtSetSensitive((Widget)(widget->data.opaque.data), sensitive != NIL);
-
-    return (sensitive);
-}
-
-LispObj *
-Lisp_XtSetValues(LispBuiltin *builtin)
-/*
- xt-set-values widget arguments
- */
-{
-    Widget widget;
-    Resources *resources;
-
-    LispObj *owidget, *arguments;
-
-    arguments = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (arguments == NIL)
-       return (owidget);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    CHECK_CONS(arguments);
-    resources = LispConvertResources(arguments, widget,
-                                    GetResourceList(XtClass(widget)),
-                                    XtParent(widget) ?
-                                       GetResourceList(XtClass(XtParent(widget))) :
-                                       NULL);
-    XtSetValues(widget, resources->args, resources->num_args);
-    LispFreeResources(resources);
-
-    return (owidget);
-}
-
-LispObj *
-Lisp_XtWidgetToApplicationContext(LispBuiltin *builtin)
-/*
- xt-widget-to-application-context widget
- */
-{
-    Widget widget;
-    XtAppContext appcon;
-
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    appcon = XtWidgetToApplicationContext(widget);
-
-    return (OPAQUE(appcon, xtAppContext_t));
-}
-
-LispObj *
-Lisp_XtDisplay(LispBuiltin *builtin)
-/*
- xt-display widget
- */
-{
-    Widget widget;
-    Display *display;
-
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    display = XtDisplay(widget);
-
-    return (OPAQUE(display, xtDisplay_t));
-}
-
-LispObj *
-Lisp_XtDisplayOfObject(LispBuiltin *builtin)
-/*
- xt-display-of-object object
- */
-{
-    Widget widget;
-    Display *display;
-
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    if (!CHECKO(object, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(object));
-    widget = (Widget)(object->data.opaque.data);
-    display = XtDisplayOfObject(widget);
-
-    return (OPAQUE(display, xtDisplay_t));
-}
-
-LispObj *
-Lisp_XtScreen(LispBuiltin *builtin)
-/*
- xt-screen widget
- */
-{
-    Widget widget;
-    Screen *screen;
-
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    screen = XtScreen(widget);
-
-    return (OPAQUE(screen, xtScreen_t));
-}
-
-LispObj *
-Lisp_XtScreenOfObject(LispBuiltin *builtin)
-/*
- xt-screen-of-object object
- */
-{
-    Widget widget;
-    Screen *screen;
-
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    if (!CHECKO(object, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(object));
-    widget = (Widget)(object->data.opaque.data);
-    screen = XtScreenOfObject(widget);
-
-    return (OPAQUE(screen, xtScreen_t));
-}
-
-LispObj *
-Lisp_XtWindow(LispBuiltin *builtin)
-/*
- xt-window widget
- */
-{
-    Widget widget;
-    Window window;
-
-    LispObj *owidget;
-
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    window = XtWindow(widget);
-
-    return (OPAQUE(window, xtWindow_t));
-}
-
-LispObj *
-Lisp_XtWindowOfObject(LispBuiltin *builtin)
-/*
- xt-window-of-object widget
- */
-{
-    Widget widget;
-    Window window;
-
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    if (!CHECKO(object, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(object));
-    widget = (Widget)(object->data.opaque.data);
-    window = XtWindowOfObject(widget);
-
-    return (OPAQUE(window, xtWindow_t));
-}
-
-LispObj *
-Lisp_XtAddGrab(LispBuiltin *builtin)
-/*
- xt-add-grab widget exclusive spring-loaded
- */
-{
-    Widget widget;
-    Bool exclusive, spring_loaded;
-
-    LispObj *owidget, *oexclusive, *ospring_loaded;
-
-    ospring_loaded = ARGUMENT(2);
-    oexclusive = ARGUMENT(1);
-    owidget = ARGUMENT(0);
-
-    if (!CHECKO(owidget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(owidget));
-    widget = (Widget)(owidget->data.opaque.data);
-    exclusive = oexclusive != NIL;
-    spring_loaded = ospring_loaded != NIL;
-
-    XtAddGrab(widget, exclusive, spring_loaded);
-
-    return (T);
-}
-
-LispObj *
-Lisp_XtRemoveGrab(LispBuiltin *builtin)
-/*
- xt-remove-grab widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    XtRemoveGrab((Widget)(widget->data.opaque.data));
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_XtName(LispBuiltin *builtin)
-/*
- xt-name widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    return (STRING(XtName((Widget)(widget->data.opaque.data))));
-}
-
-LispObj *
-Lisp_XtParent(LispBuiltin *builtin)
-/*
- xt-parent widget
- */
-{
-    LispObj *widget;
-
-    widget = ARGUMENT(0);
-
-    if (!CHECKO(widget, xtWidget_t))
-       LispDestroy("%s: cannot convert %s to Widget",
-                   STRFUN(builtin), STROBJ(widget));
-
-    return (OPAQUE(XtParent((Widget)widget->data.opaque.data), xtWidget_t));
-}
-
-LispObj *
-Lisp_XtAppGetExitFlag(LispBuiltin *builtin)
-/*
- xt-app-get-exit-flag app-context
- */
-{
-    LispObj *app_context;
-
-    app_context = ARGUMENT(0);
-
-    if (!CHECKO(app_context, xtAppContext_t))
-       LispDestroy("%s: cannot convert %s to XtAppContext",
-                   STRFUN(builtin), STROBJ(app_context));
-
-    return (XtAppGetExitFlag((XtAppContext)(app_context->data.opaque.data)) ?
-           T : NIL);
-}
-
-LispObj *
-Lisp_XtAppSetExitFlag(LispBuiltin *builtin)
-/*
- xt-app-get-exit-flag app-context
- */
-{
-    LispObj *app_context;
-
-    app_context = ARGUMENT(0);
-
-    if (!CHECKO(app_context, xtAppContext_t))
-       LispDestroy("%s: cannot convert %s to XtAppContext",
-                   STRFUN(builtin), STROBJ(app_context));
-
-    XtAppSetExitFlag((XtAppContext)(app_context->data.opaque.data));
-
-    return (T);
-}
-
-static Resources *
-LispConvertResources(LispObj *list, Widget widget,
-                    ResourceList *rlist, ResourceList *plist)
-{
-    char c1;
-    short c2;
-    int c4;   
-#ifdef LONG64
-    long c8;
-#endif
-    XrmValue from, to;
-    LispObj *arg, *val;
-    ResourceInfo *resource;
-    char *fname = "XT-CONVERT-RESOURCES";
-    Resources *resources = (Resources*)XtCalloc(1, sizeof(Resources));
-
-    for (; CONSP(list); list = CDR(list)) {
-       if (!CONSP(CAR(list))) {
-           XtFree((XtPointer)resources);
-           LispDestroy("%s: %s is not a cons", fname, STROBJ(CAR(list)));
-       }
-       arg = CAR(CAR(list));
-       val = CDR(CAR(list));
-
-       if (!STRINGP(arg)) {
-           XtFree((XtPointer)resources);
-           LispDestroy("%s: %s is not a string", fname, STROBJ(arg));
-       }
-
-       if ((resource = GetResourceInfo(THESTR(arg), rlist, plist)) == NULL) {
-           int i;
-           Arg args[1];
-           Widget child;
-
-           for (i = 0; i < rlist->num_resources; i++) {
-               if (rlist->resources[i]->qtype == qWidget) {
-                   XtSetArg(args[0],
-                            XrmQuarkToString(rlist->resources[i]->qname),
-                            &child);
-                   XtGetValues(widget, args, 1);
-                   if (child && XtParent(child) == widget) {
-                       resource =
-                           GetResourceInfo(THESTR(arg),
-                                           GetResourceList(XtClass(child)),
-                                           NULL);
-                       if (resource)
-                           break;
-                   }
-               }
-           }
-           if (resource == NULL) {
-               LispMessage("%s: resource %s not available",
-                           fname, THESTR(arg));
-               continue;
-           }
-       }
-
-       if (LONGINTP(val) || DFLOATP(val) || OPAQUEP(val)) {
-           resources->args = (Arg*)
-               XtRealloc((XtPointer)resources->args,
-                         sizeof(Arg) * (resources->num_args + 1));
-           if (!OPAQUEP(val)) {
-               float fvalue;
-
-               if (DFLOATP(val))
-                   fvalue = DFLOAT_VALUE(val);
-               else
-                   fvalue = LONGINT_VALUE(val);
-               if (resource->qtype == qFloat) {
-                   XtSetArg(resources->args[resources->num_args],
-                            XrmQuarkToString(resource->qname), fvalue);
-               }
-               else
-                   XtSetArg(resources->args[resources->num_args],
-                            XrmQuarkToString(resource->qname),
-                            (int)fvalue);
-           }
-           else
-               XtSetArg(resources->args[resources->num_args],
-                        XrmQuarkToString(resource->qname), val->data.opaque.data);
-           ++resources->num_args;
-           continue;
-       }
-       else if (val == NIL) {
-           /* XXX assume it is a pointer or a boolean */
-#ifdef DEBUG
-           LispWarning("%s: assuming %s is a pointer or boolean",
-                       fname, XrmQuarkToString(resource->qname));
-#endif
-           resources->args = (Arg*)
-               XtRealloc((XtPointer)resources->args,
-                         sizeof(Arg) * (resources->num_args + 1));
-           XtSetArg(resources->args[resources->num_args],
-                    XrmQuarkToString(resource->qname), NULL);
-           ++resources->num_args;
-           continue;
-       }
-       else if (val == T) {
-           /* XXX assume it is a boolean */
-#ifdef DEBUG
-           LispWarning("%s: assuming %s is a boolean",
-                       fname, XrmQuarkToString(resource->qname));
-#endif
-           resources->args = (Arg*)
-               XtRealloc((XtPointer)resources->args,
-                         sizeof(Arg) * (resources->num_args + 1));
-           XtSetArg(resources->args[resources->num_args],
-                    XrmQuarkToString(resource->qname), True);
-           ++resources->num_args;
-           continue;
-       }
-       else if (!STRINGP(val)) {
-           XtFree((XtPointer)resources);
-           LispDestroy("%s: resource value must be string, number or opaque, not %s",
-                       fname, STROBJ(val));
-       }
-
-       from.size = val == NIL ? 1 : strlen(THESTR(val)) + 1;
-       from.addr = val == NIL ? "" : THESTR(val);
-       switch (to.size = resource->size) {
-           case 1:
-               to.addr = (XtPointer)&c1;
-               break;
-           case 2:
-               to.addr = (XtPointer)&c2;
-               break;
-           case 4:
-               to.addr = (XtPointer)&c4;
-               break;
-#ifdef LONG64
-           case 8:
-               to.addr = (XtPointer)&c8;
-               break;
-#endif
-           default:
-               LispWarning("%s: bad resource size %d for %s",
-                           fname, to.size, THESTR(arg));
-               continue;
-       }
-
-       if (qString == resource->qtype)
-#ifdef LONG64
-           c8 = (long)from.addr;
-#else
-           c4 = (long)from.addr;
-#endif
-       else if (!XtConvertAndStore(widget, XtRString, &from,
-                                   XrmQuarkToString(resource->qtype), &to))
-           /* The type converter already have printed an error message */
-           continue;
-
-       resources->args = (Arg*)
-           XtRealloc((XtPointer)resources->args,
-                     sizeof(Arg) * (resources->num_args + 1));
-       switch (to.size) {
-           case 1:
-               XtSetArg(resources->args[resources->num_args],
-                        XrmQuarkToString(resource->qname), c1);
-               break;
-           case 2:
-               XtSetArg(resources->args[resources->num_args],
-                        XrmQuarkToString(resource->qname), c2);
-               break;
-           case 4:
-               XtSetArg(resources->args[resources->num_args],
-                        XrmQuarkToString(resource->qname), c4);
-               break;
-#ifdef LONG64
-           case 8:
-               XtSetArg(resources->args[resources->num_args],
-                        XrmQuarkToString(resource->qname), c8);
-               break;
-#endif
-       }
-       ++resources->num_args;
-    }
-
-    return (resources);
-}
-
-static void
-LispFreeResources(Resources *resources)
-{
-    if (resources) {
-       XtFree((XtPointer)resources->args);
-       XtFree((XtPointer)resources);
-    }
-}
-
-static int
-bcmp_action_resource(_Xconst void *string, _Xconst void *resource)
-{
-    return (strcmp((String)string,
-                  XrmQuarkToString((*(ResourceInfo**)resource)->qname)));
-}   
-
-static ResourceInfo *
-GetResourceInfo(char *name, ResourceList *rlist, ResourceList *plist)
-{
-    ResourceInfo **resource = NULL;
-
-    if (rlist->resources)
-       resource = (ResourceInfo**)
-           bsearch(name, rlist->resources, rlist->num_resources,
-                   sizeof(ResourceInfo*), bcmp_action_resource);
-
-    if (resource == NULL && plist) {
-       resource = (ResourceInfo**)
-         bsearch(name, &plist->resources[plist->num_resources],
-                 plist->num_cons_resources, sizeof(ResourceInfo*),
-                 bcmp_action_resource);
-    }
-
-    return (resource ? *resource : NULL);
-}
-
-static ResourceList *
-GetResourceList(WidgetClass wc)
-{
-    ResourceList *list;
-
-    if ((list = FindResourceList(wc)) == NULL)
-       list = CreateResourceList(wc);
-
-    return (list);
-}
-
-static int
-bcmp_action_resource_list(_Xconst void *wc, _Xconst void *list)
-{
-    return ((char*)wc - (char*)((*(ResourceList**)list)->widget_class));
-}
-
-static ResourceList *
-FindResourceList(WidgetClass wc)
-{  
-    ResourceList **list;
-
-    if (!resource_list)
-       return (NULL);
-
-    list = (ResourceList**)
-       bsearch(wc, resource_list, num_resource_list,
-               sizeof(ResourceList*),  bcmp_action_resource_list);
-
-    return (list ? *list : NULL);
-}
-
-static int
-qcmp_action_resource_list(_Xconst void *left, _Xconst void *right)
-{
-    return ((char*)((*(ResourceList**)left)->widget_class) -
-           (char*)((*(ResourceList**)right)->widget_class));
-}
-
-static ResourceList *
-CreateResourceList(WidgetClass wc)
-{
-    ResourceList *list;
-
-    list = (ResourceList*)XtMalloc(sizeof(ResourceList));
-    list->widget_class = wc;
-    list->num_resources = list->num_cons_resources = 0;
-    list->resources = NULL;
-
-    resource_list = (ResourceList**)
-       XtRealloc((XtPointer)resource_list, sizeof(ResourceList*) *
-                 (num_resource_list + 1));
-    resource_list[num_resource_list++] = list;
-    qsort(resource_list, num_resource_list, sizeof(ResourceList*),
-         qcmp_action_resource_list);
-    BindResourceList(list);
-
-    return (list);
-}
-
-static int
-qcmp_action_resource(_Xconst void *left, _Xconst void *right)
-{
-    return (strcmp(XrmQuarkToString((*(ResourceInfo**)left)->qname),
-                  XrmQuarkToString((*(ResourceInfo**)right)->qname)));
-}
-
-static void
-BindResourceList(ResourceList *list)
-{
-    XtResourceList xt_list, cons_list;
-    Cardinal i, num_xt, num_cons;
-
-    XtGetResourceList(list->widget_class, &xt_list, &num_xt);
-    XtGetConstraintResourceList(list->widget_class, &cons_list, &num_cons);
-    list->num_resources = num_xt;
-    list->num_cons_resources = num_cons;
-
-    list->resources = (ResourceInfo**)
-       XtMalloc(sizeof(ResourceInfo*) * (num_xt + num_cons));
-
-    for (i = 0; i < num_xt; i++) {
-       list->resources[i] = (ResourceInfo*)XtMalloc(sizeof(ResourceInfo));
-       list->resources[i]->qname =
-           XrmPermStringToQuark(xt_list[i].resource_name);
-       list->resources[i]->qtype =
-           XrmPermStringToQuark(xt_list[i].resource_type);
-       list->resources[i]->size = xt_list[i].resource_size;
-    }
-
-    for (; i < num_xt + num_cons; i++) {
-       list->resources[i] = (ResourceInfo*)XtMalloc(sizeof(ResourceInfo));
-       list->resources[i]->qname =
-           XrmPermStringToQuark(cons_list[i - num_xt].resource_name);
-       list->resources[i]->qtype =
-           XrmPermStringToQuark(cons_list[i - num_xt].resource_type);
-       list->resources[i]->size = cons_list[i - num_xt].resource_size;
-    }
-
-    XtFree((XtPointer)xt_list);
-    if (cons_list)
-       XtFree((XtPointer)cons_list);
-
-    qsort(list->resources, list->num_resources, sizeof(ResourceInfo*),
-         qcmp_action_resource);
-    if (num_cons)
-       qsort(&list->resources[num_xt], list->num_cons_resources,
-             sizeof(ResourceInfo*), qcmp_action_resource);
-}
-
-/*ARGSUSED*/
-static void
-PopdownAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    XtPopdown(w);
-}
-
-/*ARGSUSED*/
-static void
-QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    XtAppSetExitFlag(XtWidgetToApplicationContext(w));
-}
diff --git a/xedit/lisp/mp/mp.c b/xedit/lisp/mp/mp.c
deleted file mode 100644 (file)
index 2afb343..0000000
+++ /dev/null
@@ -1,822 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/mp/mp.c,v 1.2 2002/11/08 08:01:00 paulo Exp $ */
-
-#include "mp.h"
-
-/*
- * TODO:
- *     o Optimize squaring
- *     o Write better division code and move from mpi.c to here
- *     o Make multiplication code don't required memory to be zeroed
- *             + The first step is easy, just multiply the low word,
- *             then the high word, that may overlap with the result
- *             of the first multiply (in case of carry), and then
- *             just make sure carry is properly propagated in the
- *             subsequent multiplications.
- *             + Some code needs also to be rewritten because some
- *             intermediate addition code in mp_mul, mp_karatsuba_mul,
- *             and mp_toom_mul is assuming the memory is zeroed.
- */
-
-/*
- * Prototypes
- */
-       /* out of memory handler */
-static void mp_outmem(void);
-
-       /* memory allocation fallback functions */
-static void *_mp_malloc(size_t);
-static void *_mp_calloc(size_t, size_t);
-static void *_mp_realloc(void*, size_t);
-static void _mp_free(void*);
-
-/*
- * Initialization
- */
-static mp_malloc_fun __mp_malloc = _mp_malloc;
-static mp_calloc_fun __mp_calloc = _mp_calloc;
-static mp_realloc_fun __mp_realloc = _mp_realloc;
-static mp_free_fun __mp_free = _mp_free;
-
-/*
- * Implementation
- */
-static void
-mp_outmem(void)
-{
-    fprintf(stderr, "out of memory in MP library.\n");
-    exit(1);
-}
-
-static void *
-_mp_malloc(size_t size)
-{
-    return (malloc(size));
-}
-
-void *
-mp_malloc(size_t size)
-{
-    void *pointer = (*__mp_malloc)(size);
-
-    if (pointer == NULL)
-       mp_outmem();
-
-    return (pointer);
-}
-
-mp_malloc_fun
-mp_set_malloc(mp_malloc_fun fun)
-{
-    mp_malloc_fun old = __mp_malloc;
-
-    __mp_malloc = fun;
-
-    return (old);
-}
-
-static void *
-_mp_calloc(size_t nmemb, size_t size)
-{
-    return (calloc(nmemb, size));
-}
-
-void *
-mp_calloc(size_t nmemb, size_t size)
-{
-    void *pointer = (*__mp_calloc)(nmemb, size);
-
-    if (pointer == NULL)
-       mp_outmem();
-
-    return (pointer);
-}
-
-mp_calloc_fun
-mp_set_calloc(mp_calloc_fun fun)
-{
-    mp_calloc_fun old = __mp_calloc;
-
-    __mp_calloc = fun;
-
-    return (old);
-}
-
-static void *
-_mp_realloc(void *old, size_t size)
-{
-    return (realloc(old, size));
-}
-
-void *
-mp_realloc(void *old, size_t size)
-{
-    void *pointer = (*__mp_realloc)(old, size);
-
-    if (pointer == NULL)
-       mp_outmem();
-
-    return (pointer);
-}
-
-mp_realloc_fun
-mp_set_realloc(mp_realloc_fun fun)
-{
-    mp_realloc_fun old = __mp_realloc;
-
-    __mp_realloc = fun;
-
-    return (old);
-}
-
-static void
-_mp_free(void *pointer)
-{
-    free(pointer);
-}
-
-void
-mp_free(void *pointer)
-{
-    (*__mp_free)(pointer);
-}
-
-mp_free_fun
-mp_set_free(mp_free_fun fun)
-{
-    mp_free_fun old = __mp_free;
-
-    __mp_free = fun;
-
-    return (old);
-}
-
-long
-mp_add(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2)
-{
-    BNI value;                 /* intermediate result */
-    BNS carry;                 /* carry flag */
-    long size;                 /* result size */
-
-    if (len1 < len2)
-       MP_SWAP(op1, op2, len1, len2);
-
-    /* unroll start of loop */
-    value = op1[0] + op2[0];
-    rop[0] = value;
-    carry = value >> BNSBITS;
-
-    /* add op1 and op2 */
-    for (size = 1; size < len2; size++) {
-       value = op1[size] + op2[size] + carry;
-       rop[size] = value;
-       carry = value >> BNSBITS;
-    }
-    if (rop != op1) {
-       for (; size < len1; size++) {
-           value = op1[size] + carry;
-           rop[size] = value;
-           carry = value >> BNSBITS;
-       }
-    }
-    else {
-       /* if rop == op1, than just adjust carry */
-       for (; carry && size < len1; size++) {
-           value = op1[size] + carry;
-           rop[size] = value;
-           carry = value >> BNSBITS;
-       }
-       size = len1;
-    }
-    if (carry)
-       rop[size++] = carry;
-
-    return (size);
-}
-
-long
-mp_sub(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2)
-{
-    long svalue;               /* intermediate result */
-    BNS carry;                 /* carry flag */
-    long size;                 /* result size */
-
-    /* special case */
-    if (op1 == op2) {
-       rop[0] = 0;
-
-       return (1);
-    }
-
-    /* unroll start of loop */
-    svalue = op1[0] - op2[0];
-    rop[0] = svalue;
-    carry = svalue < 0;
-
-    /* subtracts op2 from op1 */
-    for (size = 1; size < len2; size++) {
-       svalue = (long)(op1[size]) - op2[size] - carry;
-       rop[size] = svalue;
-       carry = svalue < 0;
-    }
-    if (rop != op1) {
-       for (; size < len1; size++) {
-           svalue = op1[size] - carry;
-           rop[size] = svalue;
-           carry = svalue < 0;
-       }
-    }
-    else {
-       /* if rop == op1, than just adjust carry */
-       for (; carry && size < len1; size++) {
-           svalue = op1[size] - carry;
-           rop[size] = svalue;
-           carry = svalue < 0;
-       }
-       size = len1;
-    }
-
-    /* calculate result size */
-    while (size > 1 && rop[size - 1] == 0)
-       --size;
-
-    return (size);
-}
-
-long
-mp_lshift(BNS *rop, BNS *op, BNI len, long shift)
-{
-    long i, size;
-    BNI words, bits;           /* how many word and bit shifts */
-
-    words = shift / BNSBITS;
-    bits = shift % BNSBITS;
-    size = len + words;
-
-    if (bits) {
-       BNS hi, lo;
-       BNI carry;
-       int adj;
-
-       for (i = 1, carry = CARRY >> 1; carry; i++, carry >>= 1)
-           if (op[len - 1] & carry)
-               break;
-       adj = (bits + (BNSBITS - i)) / BNSBITS;
-       size += adj;
-
-       lo = hi = op[0];
-       rop[words] = lo << bits;
-       for (i = 1; i < len; i++) {
-           hi = op[i];
-           rop[words + i] = hi << bits | (lo >> (BNSBITS - bits));
-           lo = hi;
-       }
-       if (adj)
-           rop[size - 1] = hi >> (BNSBITS - bits);
-    }
-    else
-       memmove(rop + size - len, op, sizeof(BNS) * len);
-
-    if (words)
-       memset(rop, '\0', sizeof(BNS) * words);
-
-    return (size);
-}
-
-long
-mp_rshift(BNS *rop, BNS *op, BNI len, long shift)
-{
-    int adj = 0;
-    long i, size;
-    BNI words, bits;           /* how many word and bit shifts */
-
-    words = shift / BNSBITS;
-    bits = shift % BNSBITS;
-    size = len - words;
-
-    if (bits) {
-       BNS hi, lo;
-       BNI carry;
-
-       for (i = 0, carry = CARRY >> 1; carry; i++, carry >>= 1)
-           if (op[len - 1] & carry)
-               break;
-       adj = (bits + i) / BNSBITS;
-       if (size - adj == 0) {
-           rop[0] = 0;
-
-           return (1);
-       }
-
-       hi = lo = op[words + size - 1];
-       rop[size - 1] = hi >> bits;
-       for (i = size - 2; i >= 0; i--) {
-           lo = op[words + i];
-           rop[i] = (lo >> bits) | (hi << (BNSBITS - bits));
-           hi = lo;
-       }
-       if (adj)
-           rop[0] |= lo << (BNSBITS - bits);
-    }
-    else
-       memmove(rop, op + len - size, size * sizeof(BNS));
-
-    return (size - adj);
-}
-
-       /* rop must be a pointer to len1 + len2 elements
-        * rop cannot be either op1 or op2
-        * rop must be all zeros */
-long
-mp_base_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2)
-{
-    long i, j;                 /* counters */
-    BNI value;                 /* intermediate result */
-    BNS carry;                 /* carry value */
-    long size = len1 + len2;
-
-    /* simple optimization: first pass does not need to deference rop[i+j] */
-    if (op1[0]) {
-       value = (BNI)(op1[0]) * op2[0];
-       rop[0] = value;
-       carry = (BNS)(value >> BNSBITS);
-       for (j = 1; j < len2; j++) {
-           value = (BNI)(op1[0]) * op2[j] + carry;
-           rop[j] = value;
-           carry = (BNS)(value >> BNSBITS);
-       }
-       rop[j] = carry;
-    }
-
-    /* do the multiplication */
-    for (i = 1; i < len1; i++) {
-       if (op1[i]) {
-           /* unrool loop initialization */
-           value = (BNI)(op1[i]) * op2[0] + rop[i];
-           rop[i] = value;
-           carry = (BNS)(value >> BNSBITS);
-           /* multiply */
-           for (j = 1; j < len2; j++) {
-               value = (BNI)(op1[i]) * op2[j] + rop[i + j] + carry;
-               rop[i + j] = value;
-               carry = (BNS)(value >> BNSBITS);
-           }
-           rop[i + j] = carry;
-       }
-    }
-
-    if (size > 1 && rop[size - 1] == 0)
-       --size;
-
-    return (size);
-}
-
-       /* Karatsuba method
-        * t + ((a0 + a1) (b0 + b1) - t - u) x + ux²
-        * where t = a0b0 and u = a1b1
-        *
-        * Karatsuba method reduces the number of multiplications. Example:
-        *      Square a 40 length number
-        *      instead of a plain 40*40 = 1600 multiplies/adds, it does:
-        *      20*20+20*20+20*20 = 1200
-        *      but since it is recursive, every 20*20=400 is reduced to
-        *      10*10+10*10+10*10=300
-        *      and so on.
-        * The multiplication by x and x² is a just a shift, as it is a
-        * power of two, and is implemented below by just writting at the
-        * correct offset */
-long
-mp_karatsuba_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2)
-{
-    BNI x;                             /* shift count */
-    BNI la0, la1, lb0, lb1;            /* length of a0, a1, b0, and b1 */
-    BNS *t;                            /* temporary memory for t product */
-    BNS *u;                            /* temporary memory for u product */
-    BNS *r;                            /* pointer to rop */
-    long xlen, tlen, ulen;
-
-    /* calculate value of x, that is 2^(BNSBITS*x) */
-    if (len1 >= len2)
-       x = (len1 + 1) >> 1;
-    else
-       x = (len2 + 1) >> 1;
-
-    /* calculate length of operands */
-    la0 = x;
-    la1 = len1 - x;
-    lb0 = x;
-    lb1 = len2 - x;
-
-    /* allocate buffer for t and (a0 + a1) */
-    tlen = la0 + lb0;
-    t = mp_malloc(sizeof(BNS) * tlen);
-
-    /* allocate buffer for u and (b0 + b1) */
-    if (la1 + lb1 < lb0 + lb1 + 1)
-       ulen = lb0 + lb1 + 1;
-    else
-       ulen = la1 + lb1;
-    u = mp_malloc(sizeof(BNS) * ulen);
-
-    /* calculate a0 + a1, store result in t */
-    tlen = mp_add(t, op1, op1 + x, la0, la1);
-
-    /* calculate b0 + b1, store result in u */
-    ulen = mp_add(u, op2, op2 + x, lb0, lb1);
-
-    /* store (a0 + a1) * (b0 + b1) in rop */
-
-    r = rop + x;               /* multiplied by 2^(BNSBITS*x) */
-    xlen = mp_mul(r, t, u, tlen, ulen);
-
-    /* must zero t and u memory, this is required for mp_mul */
-
-    /* calculate t = a0 * b0 */
-    tlen = la0 + lb0;
-    memset(t, '\0', sizeof(BNS) * tlen);
-    tlen = mp_mul(t, op1, op2, la0, lb0);
-
-    /* calculate u = a1 * b1 */
-    ulen = la1 + lb1;
-    memset(u, '\0', sizeof(BNS) * ulen);
-    ulen = mp_mul(u, op1 + x, op2 + x, la1, lb1);
-
-    /* subtract t from partial result */
-    xlen = mp_sub(r, r, t, xlen, tlen);
-
-    /* subtract u form partial result */
-    xlen = mp_sub(r, r, u, xlen, ulen);
-
-    /* add ux^2 to partial result */
-
-    r = rop + (x << 1);                /* multiplied by x^2 = 2^(BNSBITS*x*2) */
-    xlen = len1 + len2;
-    xlen = mp_add(r, r, u, xlen, ulen);
-
-    /* now add t to final result */
-    xlen = mp_add(rop, rop, t, xlen, tlen);
-
-    mp_free(t);
-    mp_free(u);
-
-    if (xlen > 1 && rop[xlen - 1] == 0)
-       --xlen;
-
-    return (xlen);
-}
-
-       /* Toom method  (partially based on GMP documentation)
-        * Evaluation at k = [ 0 1/2 1 2 oo ]
-        * U(x) = (U2k + U1)k + U0
-        * V(x) = (V2k + V1)k + V0
-        * W(x) = U(x)V(x)
-        *
-        * Sample:
-        *      123 * 456
-        *
-        *      EVALUATION:
-        * U(0) = (1*0+2)*0+3   => 3
-        * U(1) = 1+(2+3*2)*2   => 17
-        * U(2) = 1+2+3         => 6
-        * U(3) = (1*2+2)*2+3   => 11
-        * U(4) = 1+(2+3*0)*0   => 1
-        *
-        * V(0) = (4*0+5)*0+6   => 6
-        * V(1) = 4+(5+6*2)*2   => 38
-        * V(2) = 4+5+6         => 15
-        * V(3) = (4*2+5)*2+6   => 32
-        * V(4) = 4+(5+6*0)*0   => 4
-        *
-        *      U = [ 3   17  6  11 1 ]
-        *      V = [ 6   38 15  32 4 ]
-        *      W = [ 18 646 90 352 4 ]
-        *
-        * After that, we have:
-        *      a = 18                                  (w0 already known)
-        *      b = 16w0 + 8w1 + 4w2 + 2w3 +   w4
-        *      c =   w0 +  w1 +  w2 +  w3 +   w4
-        *      d =   w0 + 2w1 + 4w2 + 8w3 + 16w4
-        *      e = 4                                   (w4 already known)
-        *
-        *      INTERPOLATION:
-        *      b = b -16a - e          (354)
-        *      c = c - a - e           (68)
-        *      d = d - a - 16e         (270)
-        *
-        *      w = (b + d) - 8c = (10w1+8w2+10w3) - (8w1+8w2+8w3) = 2w1+2w3
-        *      w = 2c - w              (56)
-        *      b = b/2 = 4w1+w+w3
-        *      b = b-c = 4w1+w+w3 - w1+w2+w3 = 3w1+w2
-        *      c = w/2                 (w2 = 28)
-        *      b = b-c = 3w1+c - c = 3w1
-        *      b = b/3                 (w1 = 27)
-        *      d = d/2
-        *      d = d-b-w = b+w+4w3 - b-w = 4w3
-        *      d = d/4                 (w3 = 13)
-        *
-        *      RESULT:
-        *      w4*10^4 + w3*10³ + w2*10² + w1*10 + w0
-        *      40000   + 13000   + 2800   + 270    + 18
-        *      10 is the base where the calculation was done
-        *
-        *      This sample uses small numbers, so it does not show the
-        * advantage of the method. But for example (in base 10), when squaring
-        *      123456789012345678901234567890
-        *      The normal method would do 30*30=900 multiplications
-        *      Karatsuba method would do 15*15*3=675 multiplications
-        *      Toom method would do 10*10*5=500 multiplications
-        * Toom method has a larger overhead if compared with Karatsuba method,
-        * due to evaluation and interpolation, so it should be used for larger
-        * numbers, so that the computation time of evaluation/interpolation
-        * would be smaller than the time spent using other methods.
-        *
-        *      Note that Karatsuba method can be seen as a special case of
-        * Toom method, i.e:
-        *      U1U0 * V1V0
-        *      with k = [ 0 1 oo ]
-        *      U = [ U0 U1+U0 U1 ]
-        *      V = [ V0 V1+V0 V1 ]
-        *      W = [ U0*V0 (U1+U0)*(V1+V0) (U1+V1) ]
-        *
-        *      w0 = U0*V0
-        *      w = (U1+U0)*(V1+V0)
-        *      w2 = (U1*V1)
-        *
-        *      w1 = w - w0 - w2
-        * w2x² + w1x + w0
-        *
-        *      See Knuth's Seminumerical Algorithms for a sample implemention
-        * using 4 stacks and k = [ 0 1 2 3 ... ], based on the size of the
-        * input.
-        */
-long
-mp_toom_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2)
-{
-    long size, xsize, i;
-    BNI value;                         /* used in division */
-    BNS carry;
-    BNI x;                             /* shift count */
-    BNI l1, l2;
-    BNI al, bl, cl, dl, el, Ul[3], Vl[3];
-    BNS *a, *b, *c, *d, *e, *U[3], *V[3];
-
-    /* x is the base i.e. 2^(BNSBITS*x) */
-    x = (len1 + len2 + 4) / 6;
-    l1 = len1 - (x << 1);      /* length of remaining piece of op1 */
-    l2 = len2 - (x << 1);      /* length of remaining piece of op2 */
-
-    /* allocate memory for storing U and V */
-    U[0] = mp_malloc(sizeof(BNS) * (x + 2));
-    V[0] = mp_malloc(sizeof(BNS) * (x + 2));
-    U[1] = mp_malloc(sizeof(BNS) * (x + 1));
-    V[1] = mp_malloc(sizeof(BNS) * (x + 1));
-    U[2] = mp_malloc(sizeof(BNS) * (x + 2));
-    V[2] = mp_malloc(sizeof(BNS) * (x + 2));
-
-       /* EVALUATE U AND V */
-
-    /* Numbers are in the format U2x²+U1x+U0 and V2x²+V1x+V0 */
-
-       /* U[0] = U2+U1*2+U0*4 */
-
-    /* store U1*2 in U[1], this value is used twice */
-    Ul[1] = mp_lshift(U[1], op1 + x, x, 1);
-
-    /* store U0*4 in U[0] */
-    Ul[0] = mp_lshift(U[0], op1, x, 2);
-    /* add U1*2 to U[0] */
-    Ul[0] = mp_add(U[0], U[0], U[1], Ul[0], Ul[1]);
-    /* add U2 to U[0] */
-    Ul[0] = mp_add(U[0], U[0], op1 + x + x, Ul[0], l1);
-
-       /* U[2] = U2*4+U1*2+U0 */
-
-    /* store U2*4 in U[2] */
-    Ul[2] = mp_lshift(U[2], op1 + x + x, l1, 2);
-    /* add U1*2 to U[2] */
-    Ul[2] = mp_add(U[2], U[2], U[1], Ul[2], Ul[1]);
-    /* add U0 to U[2] */
-    Ul[2] = mp_add(U[2], U[2], op1, Ul[2], x);
-
-       /* U[1] = U2+U1+U0 */
-
-    Ul[1] = mp_add(U[1], op1, op1 + x, x, x);
-    Ul[1] = mp_add(U[1], U[1], op1 + x + x, Ul[1], l1);
-
-
-       /* Evaluate V[x], same code as U[x] */
-    Vl[1] = mp_lshift(V[1], op2 + x, x, 1);
-    Vl[0] = mp_lshift(V[0], op2, x, 2);
-    Vl[0] = mp_add(V[0], V[0], V[1], Vl[0], Vl[1]);
-    Vl[0] = mp_add(V[0], V[0], op2 + x + x, Vl[0], l2);
-    Vl[2] = mp_lshift(V[2], op2 + x + x, l2, 2);
-    Vl[2] = mp_add(V[2], V[2], V[1], Vl[2], Vl[1]);
-    Vl[2] = mp_add(V[2], V[2], op2, Vl[2], x);
-    Vl[1] = mp_add(V[1], op2, op2 + x, x, x);
-    Vl[1] = mp_add(V[1], V[1], op2 + x + x, Vl[1], l2);
-
-
-       /* MULTIPLY U[] AND V[] */
-
-       /* calculate (U2+U1*2+U0*4) * (V2+V1*2+V0*4) */
-    b = mp_calloc(1, sizeof(BNS) * (Ul[0] * Vl[0]));
-    bl = mp_mul(b, U[0], V[0], Ul[0], Vl[0]);
-    mp_free(U[0]);
-    mp_free(V[0]);
-
-       /* calculate (U2+U1+U0) * (V2+V1+V0) */
-    c = mp_calloc(1, sizeof(BNS) * (Ul[1] * Vl[1]));
-    cl = mp_mul(c, U[1], V[1], Ul[1], Vl[1]);
-    mp_free(U[1]);
-    mp_free(V[1]);
-
-       /* calculate (U2*4+U1*2+U0) * (V2*4+V1*2+V0) */
-    d = mp_calloc(1, sizeof(BNS) * (Ul[2] * Vl[2]));
-    dl = mp_mul(d, U[2], V[2], Ul[2], Vl[2]);
-    mp_free(U[2]);
-    mp_free(V[2]);
-
-       /* calculate U0 * V0 */
-    a = mp_calloc(1, sizeof(BNS) * (x + x));
-    al = mp_mul(a, op1, op2, x, x);
-
-       /* calculate U2 * V2 */
-    e = mp_calloc(1, sizeof(BNS) * (l1 + l2));
-    el = mp_mul(e, op1 + x + x, op2 + x + x, l1, l2);
-
-
-       /* INTERPOLATE COEFFICIENTS */
-
-    /* b = b - 16a - e */
-    size = mp_lshift(rop, a, al, 4);
-    bl = mp_sub(b, b, rop, bl, size);
-    bl = mp_sub(b, b, e, bl, el);
-
-    /* c = c - a - e*/
-    cl = mp_sub(c, c, a, cl, al);
-    cl = mp_sub(c, c, e, cl, el);
-
-    /* d = d - a - 16e */
-    dl = mp_sub(d, d, a, dl, al);
-    size = mp_lshift(rop, e, el, 4);
-    dl = mp_sub(d, d, rop, dl, size);
-
-    /* w = (b + d) - 8c */
-    size = mp_add(rop, b, d, bl, dl);
-    xsize = mp_lshift(rop + size, c, cl, 3);   /* rop has enough storage */
-    size = mp_sub(rop, rop, rop + size, size, xsize);
-
-    /* w = 2c - w*/
-    xsize = mp_lshift(rop + size, c, cl, 1);
-    size = mp_sub(rop, rop + size, rop, xsize, size);
-
-    /* b = b/2 */
-    bl = mp_rshift(b, b, bl, 1);
-
-    /* b = b - c */
-    bl = mp_sub(b, b, c, bl, cl);
-
-    /* c = w / 2 */
-    cl = mp_rshift(c, rop, size, 1);
-
-    /* b = b - c */
-    bl = mp_sub(b, b, c, bl, cl);
-
-    /* b = b/3 */
-       /* maybe the most expensive calculation */
-    i = bl - 1;
-    value = b[i];
-    b[i] = value / 3;
-    for (--i; i >= 0; i--) {
-       carry = value % 3;
-       value = ((BNI)carry << BNSBITS) + b[i];
-       b[i] = (BNS)(value / 3);
-    }
-
-    /* d = d/2 */
-    dl = mp_rshift(d, d, dl, 1);
-
-    /* d = d - b - w */
-    dl = mp_sub(d, d, b, dl, bl);
-    dl = mp_sub(d, d, rop, dl, size);
-
-    /* d = d/4 */
-    dl = mp_rshift(d, d, dl, 2);
-
-
-       /* STORE RESULT IN ROP */
-    /* first clear memory used as temporary variable w and 8c */
-    memset(rop, '\0', sizeof(BNS) * (len1 + len2));
-
-    i = x * 4;
-    xsize = (len1 + len2) - i;
-    size = mp_add(rop + i, rop + i, e, xsize, el) + i;
-    i = x * 3;
-    xsize = size - i;
-    size = mp_add(rop + i, rop + i, d, xsize, dl) + i;
-    i = x * 2;
-    xsize = size - i;
-    size = mp_add(rop + i, rop + i, c, xsize, cl) + i;
-    i = x;
-    xsize = size - i;
-    size = mp_add(rop + i, rop + i, b, xsize, bl) + i;
-    size = mp_add(rop, rop, a, size, al);
-
-    mp_free(e);
-    mp_free(d);
-    mp_free(c);
-    mp_free(b);
-    mp_free(a);
-
-    if (size > 1 && rop[size - 1] == 0)
-       --size;
-
-    return (size);
-}
-
-long
-mp_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2)
-{
-    if (len1 < len2)
-       MP_SWAP(op1, op2, len1, len2);
-
-    if (len1 < KARATSUBA || len2 < KARATSUBA)
-       return (mp_base_mul(rop, op1, op2, len1, len2));
-    else if (len1 < TOOM && len2 < TOOM && len2 > ((len1 + 1) >> 1))
-       return (mp_karatsuba_mul(rop, op1, op2, len1, len2));
-    else if (len1 >= TOOM && len2 >= TOOM && (len2 + 2) / 3 == (len1 + 2) / 3)
-       return (mp_toom_mul(rop, op1, op2, len1, len2));
-    else {
-       long xsize, psize, isize;
-       BNS *ptr;
-
-       /* adjust index pointer and estimated size of result */
-       isize = 0;
-       xsize = len1 + len2;
-       mp_mul(rop, op1, op2, len2, len2);
-       /* adjust pointers */
-       len1 -= len2;
-       op1 += len2;
-
-       /* allocate buffer for intermediate multiplications */
-       if (len1 > len2)
-           ptr = mp_calloc(1, sizeof(BNS) * (len2 + len2));
-       else
-           ptr = mp_calloc(1, sizeof(BNS) * (len1 + len2));
-
-       /* loop multiplying len2 size operands at a time */
-       while (len1 >= len2) {
-           isize += len2;
-           psize = mp_mul(ptr, op1, op2, len2, len2);
-           mp_add(rop + isize, rop + isize, ptr, xsize - isize, psize);
-           len1 -= len2;
-           op1 += len2;
-
-           /* multiplication routines require zeroed memory */
-           memset(ptr, '\0', sizeof(BNS) * (MIN(len1, len2) + len2));
-       }
-
-       /* len1 was not a multiple of len2 */
-       if (len1) {
-           isize += len2;
-           psize = mp_mul(ptr, op2, op1, len2, len1);
-           mp_add(rop + isize, rop + isize, ptr, xsize, psize);
-       }
-
-       /* adjust result size */
-       if (rop[xsize - 1] == 0)
-           --xsize;
-
-       mp_free(ptr);
-
-       return (xsize);
-    }
-}
diff --git a/xedit/lisp/mp/mp.h b/xedit/lisp/mp/mp.h
deleted file mode 100644 (file)
index 8bcb127..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/mp/mp.h,v 1.5tsi Exp $ */
-
-#include <stdio.h>
-#include <math.h>
-#ifdef sun
-#include <ieeefp.h>
-#endif
-#include <float.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <ctype.h>
-#include <string.h>
-
-#ifndef __mp_h_
-#define __mp_h_
-
-#ifdef __GNUC__
-#define INLINE __inline__
-#else
-#define INLINE /**/
-#endif
-
-/* this normally is better for multiplication and also
- * simplify addition loops putting the larger value first */
-#define MP_SWAP(op1, op2, len1, len2) {        \
-    BNS *top = op1;                    \
-    BNI tlen = len1;                   \
-                                       \
-    op1 = op2;                         \
-    len1 = len2;                       \
-    op2 = top;                         \
-    len2 = tlen;                       \
-}
-
-/*
- * At least this length to use Karatsuba multiplication method
- */
-#define KARATSUBA              32
-
-/*
- * At least this length to use Toom multiplication method
- */
-#define TOOM                   128
-
-#if ULONG_MAX > 4294967295UL
-  /* sizeof(long) == 8 and sizeof(int) == 4 */
-# define BNI           unsigned long
-# define BNS           unsigned int
-# define MINSLONG      0x8000000000000000UL
-# define CARRY         0x100000000
-# define LMASK         0xffffffff00000000UL
-# define SMASK         0x00000000ffffffffUL
-# define BNIBITS       64
-# define BNSBITS       32
-# ifndef LONG64
-#  define LONG64
-# endif
-#else
-  /* sizeof(long) == 4 and sizeof(short) == 2 */
-# define BNI           unsigned long
-# define BNS           unsigned short
-# define MINSLONG      0x80000000UL
-# define CARRY         0x10000
-# define LMASK         0xffff0000UL
-# define SMASK         0x0000ffffUL
-# define BNIBITS       32
-# define BNSBITS       16
-#endif
-
-#ifdef MAX
-#undef MAX
-#endif
-#define MAX(a, b)      ((a) > (b) ? (a) : (b))
-
-#ifdef MIN
-#undef MIN
-#endif
-#define MIN(a, b)      ((a) < (b) ? (a) : (b))
-
-/*
- * Types
- */
-typedef struct _mpi {
-    unsigned int size : 31;
-    unsigned int sign : 1;
-    BNI alloc;
-    BNS *digs;         /* LSF format */
-} mpi;
-
-typedef struct _mpr {
-    mpi num;
-    mpi den;
-} mpr;
-
-typedef void *(*mp_malloc_fun)(size_t);
-typedef void *(*mp_calloc_fun)(size_t, size_t);
-typedef void *(*mp_realloc_fun)(void*, size_t);
-typedef void (*mp_free_fun)(void*);
-
-/*
- * Prototypes
- */
-/* GENERIC FUNCTIONS */
-       /* memory allocation wrappers */
-void *mp_malloc(size_t size);
-void *mp_calloc(size_t nmemb, size_t size);
-void *mp_realloc(void *pointer, size_t size);
-void mp_free(void *pointer);
-mp_malloc_fun mp_set_malloc(mp_malloc_fun);
-mp_calloc_fun mp_set_calloc(mp_calloc_fun);
-mp_realloc_fun mp_set_realloc(mp_realloc_fun);
-mp_free_fun mp_set_free(mp_free_fun);
-
-       /* adds op1 and op2, stores result in rop
-        * rop must pointer to at least len1 + len2 + 1 elements
-        * rop can be either op1 or op2 */
-long mp_add(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2);
-
-       /* subtracts op2 from op1, stores result in rop
-        * rop must pointer to at least len1 + len2 elements
-        * op1 must be >= op2
-        * rop can be either op1 or op2 */
-long mp_sub(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2);
-
-       /* shift op to the left shift bits
-        * rop must have enough storage for result
-        * rop can be op */
-long mp_lshift(BNS *rop, BNS *op, BNI len, long shift);
-
-       /* shift op to the right shift bits
-        * shift must be positive
-        * rop can be op */
-long mp_rshift(BNS *rop, BNS *op, BNI len, long shift);
-
-       /* use simple generic multiplication method
-        * rop cannot be the same as op1 or op2
-        * rop must be zeroed
-        * op1 can be op2 */
-long mp_base_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2);
-
-       /* use Karatsuba method
-        * MIN(len1, len2) must be larger than (MAX(len1, len2) + 1) >> 1
-        * MAX(len1, len2) should be at least 2
-        * rop cannot be the same as op1 or op2
-        * rop must be zeroed
-        * op1 can be op2 */
-long mp_karatsuba_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2);
-
-       /* use Toom method
-        * len1 / 3 should be equal to len2 / 3
-        * len1 / 3 should be at least 1
-        * rop cannot be the same as op1 or op2
-        * rop must be zeroed
-        * op1 can be op2 */
-long mp_toom_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2);
-
-       /* chooses the available multiplication methods based on it's input
-        * rop must be a pointer to len1 + len2 elements
-        * rop cannot be the same as op1 or op2
-        * rop must be zeroed
-        * op1 can be op2 */
-long mp_mul(BNS *rop, BNS *op1, BNS *op2, BNI len1, BNI len2);
-
-/* INTEGER FUNCTIONS */
-       /* initialize op and set it to 0 */
-void mpi_init(mpi *op);
-
-       /* clear memory associated to op */
-void mpi_clear(mpi *op);
-
-       /* set rop to the value of op */
-void mpi_set(mpi *rop, mpi *op);
-
-       /* set rop to the value of si */
-void mpi_seti(mpi *rop, long si);
-
-       /* set rop to the floor(fabs(d)) */
-void mpi_setd(mpi *rop, double d);
-
-       /* initialize rop to number representation in str in the given base.
-        * leading zeros are skipped.
-        * if sign present, it is processed.
-        * base must be in the range 2 to 36. */
-void mpi_setstr(mpi *rop, char *str, int base);
-
-       /* adds two mp integers */
-void mpi_add(mpi *rop, mpi *op1, mpi *op2);
-
-       /* adds op1 and op2 */
-void mpi_addi(mpi *rop, mpi *op1, long op2);
-
-       /* subtracts two mp integers */
-void mpi_sub(mpi *rop, mpi *op1, mpi *op2);
-
-       /* subtracts op2 from op1 */
-void mpi_subi(mpi *rop, mpi *op1, long op2);
-
-       /* multiply two mp integers */
-void mpi_mul(mpi *rop, mpi *op1, mpi *op2);
-
-       /* multiply op1 by op2 */
-void mpi_muli(mpi *rop, mpi *op1, long op2);
-
-       /* divides num by den and sets rop to result */
-void mpi_div(mpi *rop, mpi *num, mpi *den);
-
-       /* divides num by den and sets rop to the remainder */
-void mpi_rem(mpi *rop, mpi *num, mpi *den);
-
-       /* divides num by den, sets quotient to qrop and remainder to rrop
-        * qrop is truncated towards zero.
-        * qrop and rrop are optional
-        * qrop and rrop cannot be the same variable */
-void mpi_divqr(mpi *qrop, mpi *rrop, mpi *num, mpi *den);
-
-       /* divides num by then and stores result in rop */
-void mpi_divi(mpi *rop, mpi *num, long den);
-
-       /* divides num by den and returns remainder */
-long mpi_remi(mpi *num, long den);
-
-       /* divides num by den
-        * stores quotient in qrop and returns remainder */
-long mpi_divqri(mpi *qrop, mpi *num, long den);
-
-       /* sets rop to num modulo den */
-void mpi_mod(mpi *rop, mpi *num, mpi *den);
-
-       /* returns num modulo den */
-long mpi_modi(mpi *num, long den);
-
-       /* sets rop to the greatest common divisor of num and den
-        * result is always positive */
-void mpi_gcd(mpi *rop, mpi *num, mpi *den);
-
-       /* sets rop to the least common multiple of num and den
-        * result is always positive */
-void mpi_lcm(mpi *rop, mpi *num, mpi *den);
-
-       /* sets rop to op raised to exp */
-void mpi_pow(mpi *rop, mpi *op, unsigned long exp);
-
-       /* sets rop to the integer part of the nth root of op.
-        * returns 1 if result is exact, 0 otherwise */
-int mpi_root(mpi *rop, mpi *op, unsigned long nth);
-
-       /* sets rop to the integer part of the square root of op.
-        * returns 1 if result is exact, 0 otherwise */
-int mpi_sqrt(mpi *rop, mpi *op);
-
-       /* bit shift, left if shift positive, right if negative
-        * a fast way to multiply and divide by powers of two */
-void mpi_ash(mpi *rop, mpi *op, long shift);
-
-       /* sets rop to op1 logand op2 */
-void mpi_and(mpi *rop, mpi *op1, mpi *op2);
-
-       /* sets rop to op1 logior op2 */
-void mpi_ior(mpi *rop, mpi *op1, mpi *op2);
-
-       /* sets rop to op1 logxor op2 */
-void mpi_xor(mpi *rop, mpi *op1, mpi *op2);
-
-       /* sets rop to one's complement of op */
-void mpi_com(mpi *rop, mpi *op);
-
-       /* sets rop to -op */
-void mpi_neg(mpi *rop, mpi *op);
-
-       /* sets rop to the absolute value of op */
-void mpi_abs(mpi *rop, mpi *op);
-
-       /* compares op1 and op2
-        * returns >0 if op1 > op2, 0 if op1 = op2, and  <0 if op1 < op2 */
-int mpi_cmp(mpi *op1, mpi *op2);
-
-       /* mpi_cmp with a long integer operand */
-int mpi_cmpi(mpi *op1, long op2);
-
-       /* compares absolute value of op1 and op2
-        * returns >0 if abs(op1) > abs(op2), 0 if abs(op1) = abs(op2),
-        * and  <0 if abs(op1) < abs(op2) */
-int mpi_cmpabs(mpi *op1, mpi *op2);
-
-       /* mpi_cmpabs with a long integer operand */
-int mpi_cmpabsi(mpi *op1, long op2);
-
-       /* returns 1 if op1 > 0, 0 if op1 = 0, and  -1 if op1 < 0 */
-int mpi_sgn(mpi *op);
-
-       /* fastly swaps contents of op1 and op2 */
-void mpi_swap(mpi *op1, mpi *op2);
-
-       /* returns 1 if op fits in a signed long int, 0 otherwise */
-int mpi_fiti(mpi *op);
-
-       /* converts mp integer to long int
-        * to know if the value will fit, call mpi_fiti */
-long mpi_geti(mpi *op);
-
-       /* convert mp integer to double */
-double mpi_getd(mpi *op);
-
-       /* returns exact number of characters to represent mp integer
-        * in given base, excluding sign and ending null character.
-        * base must be in the range 2 to 36 */
-unsigned long mpi_getsize(mpi *op, int base);
-
-       /* returns pointer to string with representation of mp integer
-        * if str is not NULL, it must have enough space to store integer
-        * representation, if NULL a newly allocated string is returned.
-        * base must be in the range 2 to 36 */
-char *mpi_getstr(char *str, mpi *op, int base);
-
-/* RATIO FUNCTIONS */
-#define mpr_num(op)    (&((op)->num))
-#define mpr_den(op)    (&((op)->den))
-
-       /* initialize op and set it to 0/1 */
-void mpr_init(mpr *op);
-
-       /* clear memory associated to op */
-void mpr_clear(mpr *op);
-
-       /* set rop to the value of op */
-void mpr_set(mpr *rop, mpr *op);
-
-       /* set rop to num/den */
-void mpr_seti(mpr *rop, long num, long den);
-
-       /* set rop to the value of d */
-void mpr_setd(mpr *rop, double d);
-
-       /* initialize rop to number representation in str in the given base.
-        * leading zeros are skipped.
-        * if sign present, it is processed.
-        * base must be in the range 2 to 36. */
-void mpr_setstr(mpr *rop, char *str, int base);
-
-       /* remove common factors of op */
-void mpr_canonicalize(mpr *op);
-
-       /* adds two mp rationals */
-void mpr_add(mpr *rop, mpr *op1, mpr *op2);
-
-       /* adds op1 and op2 */
-void mpr_addi(mpr *rop, mpr *op1, long op2);
-
-       /* subtracts two mp rationals */
-void mpr_sub(mpr *rop, mpr *op1, mpr *op2);
-
-       /* subtracts op2 from op1 */
-void mpr_subi(mpr *rop, mpr *op1, long op2);
-
-       /* multiply two mp rationals */
-void mpr_mul(mpr *rop, mpr *op1, mpr *op2);
-
-       /* multiply op1 by op2 */
-void mpr_muli(mpr *rop, mpr *op1, long op2);
-
-       /* divide two mp rationals */
-void mpr_div(mpr *rop, mpr *op1, mpr *op2);
-
-       /* divides op1 by op2 */
-void mpr_divi(mpr *rop, mpr *op1, long op2);
-
-       /* sets rop to 1/op */
-void mpr_inv(mpr *rop, mpr *op);
-
-       /* sets rop to -op */
-void mpr_neg(mpr *rop, mpr *op);
-
-       /* sets rop to the absolute value of op */
-void mpr_abs(mpr *rop, mpr *op);
-
-       /* compares op1 and op2
-        * returns >0 if op1 > op2, 0 if op1 = op2, and  <0 if op1 < op2 */
-int mpr_cmp(mpr *op1, mpr *op2);
-
-       /* mpr_cmp with a long integer operand */
-int mpr_cmpi(mpr *op1, long op2);
-
-       /* compares absolute value of op1 and op2
-        * returns >0 if abs(op1) > abs(op2), 0 if abs(op1) = abs(op2),
-        * and  <0 if abs(op1) < abs(op2) */
-int mpr_cmpabs(mpr *op1, mpr *op2);
-
-       /* mpr_cmpabs with a long integer operand */
-int mpr_cmpabsi(mpr *op1, long op2);
-
-       /* fastly swaps contents of op1 and op2 */
-void mpr_swap(mpr *op1, mpr *op2);
-
-       /* returns 1 if op fits in a signed long int, 0 otherwise */
-int mpr_fiti(mpr *op);
-
-       /* convert mp rational to double */
-double mpr_getd(mpr *op);
-
-       /* returns pointer to string with representation of mp rational
-        * if str is not NULL, it must have enough space to store rational
-        * representation, if NULL a newly allocated string is returned.
-        * base must be in the range 2 to 36 */
-char *mpr_getstr(char *str, mpr *op, int base);
-
-#endif /* __mp_h_ */
diff --git a/xedit/lisp/mp/mpi.c b/xedit/lisp/mp/mpi.c
deleted file mode 100644 (file)
index fabe366..0000000
+++ /dev/null
@@ -1,1660 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/mp/mpi.c,v 1.12 2002/11/20 07:44:43 paulo Exp $ */
-
-#include "mp.h"
-
-#ifdef __UNIXOS2__
-# define finite(x) isfinite(x)
-#endif
-
-/*
- * Prototypes
- */
-       /* do the hard work of mpi_add and mpi_sub */
-static void mpi_addsub(mpi *rop, mpi *op1, mpi *op2, int sub);
-
-       /* logical functions implementation */
-static INLINE BNS mpi_logic(BNS op1, BNS op2, BNS op);
-static void mpi_log(mpi *rop, mpi *op1, mpi *op2,  BNS op);
-
-       /* internal mpi_seti, whithout memory allocation */
-static void _mpi_seti(mpi *rop, long si);
-
-/*
- * Initialization
- */
-static BNS onedig[1] = { 1 };
-static mpi mpone = { 1, 1, 0, (BNS*)&onedig };
-
-/*
- * Implementation
- */
-void
-mpi_init(mpi *op)
-{
-    op->sign = 0;
-    op->size = op->alloc = 1;
-    op->digs = mp_malloc(sizeof(BNS));
-    op->digs[0] = 0;
-}
-
-void
-mpi_clear(mpi *op)
-{
-    op->sign = 0;
-    op->size = op->alloc = 0;
-    mp_free(op->digs);
-}
-
-void
-mpi_set(mpi *rop, mpi *op)
-{
-    if (rop != op) {
-       if (rop->alloc < op->size) {
-           rop->digs = mp_realloc(rop->digs, sizeof(BNS) * op->size);
-           rop->alloc = op->size;
-       }
-       rop->size = op->size;
-       memcpy(rop->digs, op->digs, sizeof(BNS) * op->size);
-       rop->sign = op->sign;
-    }
-}
-
-void
-mpi_seti(mpi *rop, long si)
-{
-    unsigned long ui;
-    int sign = si < 0;
-    int size;
-
-    if (si == MINSLONG) {
-       ui = MINSLONG;
-       size = 2;
-    }
-    else {
-       if (sign)
-           ui = -si;
-       else
-           ui = si;
-       if (ui < CARRY)
-           size = 1;
-       else
-           size = 2;
-    }
-
-    if (rop->alloc < size) {
-       rop->digs = mp_realloc(rop->digs, sizeof(BNS) * size);
-       rop->alloc = size;
-    }
-    rop->size = size;
-
-    /* store data in small mp integer */
-    rop->digs[0] = (BNS)ui;
-    if (size > 1)
-       rop->digs[1] = (BNS)(ui >> BNSBITS);
-    rop->size = size;
-
-    /* adjust result sign */
-    rop->sign = sign;
-}
-
-static void
-_mpi_seti(mpi *rop, long si)
-{
-    unsigned long ui;
-    int sign = si < 0;
-    int size;
-
-    if (si == MINSLONG) {
-       ui = MINSLONG;
-       size = 2;
-    }
-    else {
-       if (sign)
-           ui = -si;
-       else
-           ui = si;
-       if (ui < CARRY)
-           size = 1;
-       else
-           size = 2;
-    }
-
-    rop->digs[0] = (BNS)ui;
-    if (size > 1)
-       rop->digs[1] = (BNS)(ui >> BNSBITS);
-    rop->size = size;
-
-    rop->sign = sign;
-}
-
-void
-mpi_setd(mpi *rop, double d)
-{
-    long i;
-    double mantissa;
-    int shift, exponent;
-    BNI size;
-
-    if (isnan(d))
-       d = 0.0;
-    else if (!finite(d))
-       d = copysign(1.0, d) * DBL_MAX;
-
-    /* check if number is larger than 1 */
-    if (fabs(d) < 1.0) {
-       rop->digs[0] = 0;
-       rop->size = 1;
-       rop->sign = d < 0.0;
-
-       return;
-    }
-
-    mantissa = frexp(d, &exponent);
-    if (mantissa < 0)
-       mantissa = -mantissa;
-
-    size = (exponent + (BNSBITS - 1)) / BNSBITS;
-    shift = BNSBITS - (exponent & (BNSBITS - 1));
-
-    /* adjust amount of memory */
-    if (rop->alloc < size) {
-       rop->digs = mp_realloc(rop->digs, sizeof(BNS) * size);
-       rop->alloc = size;
-    }
-    rop->size = size;
-
-    /* adjust the exponent */
-    if (shift < BNSBITS)
-       mantissa = ldexp(mantissa, -shift);
-
-    /* convert double */
-    for (i = size - 1; i >= 0 && mantissa != 0.0; i--) {
-       mantissa = ldexp(mantissa, BNSBITS);
-       rop->digs[i] = (BNS)mantissa;
-       mantissa -= rop->digs[i];
-    }
-    for (; i >= 0; i--)
-       rop->digs[i] = 0;
-
-    /* normalize */
-    if (size > 1 && rop->digs[size - 1] == 0)
-       --rop->size;
-
-    rop->sign = d < 0.0;
-}
-
-/* how many BNS in the given base, log(base) / log(CARRY) */
-#ifdef LONG64
-static double str_bases[37] = {
-    0.0000000000000000, 0.0000000000000000, 0.0312500000000000,
-    0.0495300781475362, 0.0625000000000000, 0.0725602529652301,
-    0.0807800781475362, 0.0877298413143002, 0.0937500000000000,
-    0.0990601562950723, 0.1038102529652301, 0.1081072380824156,
-    0.1120300781475362, 0.1156387411919092, 0.1189798413143002,
-    0.1220903311127662, 0.1250000000000000, 0.1277332137890731,
-    0.1303101562950723, 0.1327477347951120, 0.1350602529652300,
-    0.1372599194618363, 0.1393572380824156, 0.1413613111267817,
-    0.1432800781475362, 0.1451205059304602, 0.1468887411919092,
-    0.1485902344426084, 0.1502298413143002, 0.1518119060977367,
-    0.1533403311127662, 0.1548186346995899, 0.1562500000000000,
-    0.1576373162299517, 0.1589832137890731, 0.1602900942795302,
-    0.1615601562950723,
-};
-#else
-static double str_bases[37] = {
-    0.0000000000000000, 0.0000000000000000, 0.0625000000000000,
-    0.0990601562950723, 0.1250000000000000, 0.1451205059304602,
-    0.1615601562950723, 0.1754596826286003, 0.1875000000000000,
-    0.1981203125901446, 0.2076205059304602, 0.2162144761648311,
-    0.2240601562950723, 0.2312774823838183, 0.2379596826286003,
-    0.2441806622255325, 0.2500000000000000, 0.2554664275781462,
-    0.2606203125901445, 0.2654954695902241, 0.2701205059304602,
-    0.2745198389236725, 0.2787144761648311, 0.2827226222535633,
-    0.2865601562950723, 0.2902410118609203, 0.2937774823838183,
-    0.2971804688852168, 0.3004596826286003, 0.3036238121954733,
-    0.3066806622255324, 0.3096372693991797, 0.3125000000000000,
-    0.3152746324599034, 0.3179664275781462, 0.3205801885590604,
-    0.3231203125901446,
-};
-#endif
-
-void
-mpi_setstr(mpi *rop, char *str, int base)
-{
-    long i;                    /* counter */
-    int sign;                  /* result sign */
-    BNI carry;                 /* carry value */
-    BNI value;                 /* temporary value */
-    BNI size;                  /* size of result */
-    char *ptr;                 /* end of valid input */
-
-    /* initialization */
-    sign = 0;
-    carry = 0;
-
-    /* skip leading spaces */
-    while (isspace(*str))
-       ++str;
-
-    /* check if sign supplied */
-    if (*str == '-') {
-       sign = 1;
-       ++str;
-    }
-    else if (*str == '+')
-       ++str;
-
-    /* skip leading zeros */
-    while (*str == '0')
-       ++str;
-
-    ptr = str;
-    while (*ptr) {
-       if (*ptr >= '0' && *ptr <= '9') {
-           if (*ptr - '0' >= base)
-               break;
-       }
-       else if (*ptr >= 'A' && *ptr <= 'Z') {
-           if (*ptr - 'A' + 10 >= base)
-               break;
-       }
-       else if (*ptr >= 'a' && *ptr <= 'z') {
-           if (*ptr - 'a' + 10 >= base)
-               break;
-       }
-       else
-           break;
-       ++ptr;
-    }
-
-    /* resulting size */
-    size = (ptr - str) * str_bases[base] + 1;
-
-    /* make sure rop has enough storage */
-    if (rop->alloc < size) {
-       rop->digs = mp_realloc(rop->digs, size * sizeof(BNS));
-       rop->alloc = size;
-    }
-    rop->size = size;
-
-    /* initialize rop to zero */
-    memset(rop->digs, '\0', size * sizeof(BNS));
-
-    /* set result sign */
-    rop->sign = sign;
-
-    /* convert string */
-    for (; str < ptr; str++) {
-       value = *str;
-       if (islower(value))
-           value = toupper(value);
-       value = value > '9' ? value - 'A' + 10 : value - '0';
-       value += rop->digs[0] * base;
-       carry = value >> BNSBITS;
-       rop->digs[0] = (BNS)value;
-       for (i = 1; i < size; i++) {
-           value = (BNI)rop->digs[i] * base + carry;
-           carry = value >> BNSBITS;
-           rop->digs[i] = (BNS)value;
-       }
-    }
-
-    /* normalize */
-    if (rop->size > 1 && rop->digs[rop->size - 1] == 0)
-       --rop->size;
-}
-
-void
-mpi_add(mpi *rop, mpi *op1, mpi *op2)
-{
-    mpi_addsub(rop, op1, op2, 0);
-}
-
-void
-mpi_addi(mpi *rop, mpi *op1, long op2)
-{
-    BNS digs[2];
-    mpi op;
-
-    op.digs = (BNS*)digs;
-    _mpi_seti(&op, op2);
-
-    mpi_addsub(rop, op1, &op, 0);
-}
-
-void
-mpi_sub(mpi *rop, mpi *op1, mpi *op2)
-{
-    mpi_addsub(rop, op1, op2, 1);
-}
-
-void
-mpi_subi(mpi *rop, mpi *op1, long op2)
-{
-    BNS digs[2];
-    mpi op;
-
-    op.digs = (BNS*)digs;
-    _mpi_seti(&op, op2);
-
-    mpi_addsub(rop, op1, &op, 1);
-}
-
-static void
-mpi_addsub(mpi *rop, mpi *op1, mpi *op2, int sub)
-{
-    long xlen;                         /* maximum result size */
-
-    if (sub ^ (op1->sign == op2->sign)) {
-       /* plus one for possible carry */
-       xlen = MAX(op1->size, op2->size) + 1;
-       if (rop->alloc < xlen) {
-           rop->digs = mp_realloc(rop->digs, sizeof(BNS) * xlen);
-           rop->alloc = xlen;
-       }
-       rop->size = mp_add(rop->digs, op1->digs, op2->digs,
-                          op1->size, op2->size);
-       rop->sign = op1->sign;
-    }
-    else {
-       long cmp;                       /* check for larger operator */
-
-       cmp = mpi_cmpabs(op1, op2);
-       if (cmp == 0) {
-           rop->digs[0] = 0;
-           rop->size = 1;
-           rop->sign = 0;
-       }
-       else {
-           xlen = MAX(op1->size, op2->size);
-           if (rop->alloc < xlen) {
-               rop->digs = mp_realloc(rop->digs, sizeof(BNS) * xlen);
-               rop->alloc = xlen;
-           }
-           if (cmp > 0) {
-               rop->size = mp_sub(rop->digs, op1->digs, op2->digs,
-                                  op1->size, op2->size);
-               rop->sign = op1->sign;
-           }
-           else {
-               rop->size = mp_sub(rop->digs, op2->digs, op1->digs,
-                                  op2->size, op1->size);
-               rop->sign = sub ^ op2->sign;
-           }
-       }
-    }
-}
-
-void
-mpi_mul(mpi *rop, mpi *op1, mpi *op2)
-{
-    int sign;                          /* sign flag */
-    BNS *digs;                         /* result data */
-    long xsize;                                /* result size */
-
-    /* get result sign */
-    sign = op1->sign ^ op2->sign;
-
-    /* check for special cases */
-    if (op1->size == 1) {
-       if (*op1->digs == 0) {
-           /* multiply by 0 */
-           mpi_seti(rop, 0);
-           return;
-       }
-       else if (*op1->digs == 1) {
-           /* multiply by +-1 */
-           if (rop->alloc < op2->size) {
-               rop->digs = mp_realloc(rop->digs, sizeof(BNS) * op2->size);
-               rop->alloc = op2->size;
-           }
-           rop->size = op2->size;
-           memmove(rop->digs, op2->digs, sizeof(BNS) * op2->size);
-           rop->sign = op2->size > 1 || *op2->digs ? sign : 0;
-
-           return;
-       }
-    }
-    else if (op2->size == 1) {
-       if (*op2->digs == 0) {
-           /* multiply by 0 */
-           mpi_seti(rop, 0);
-           return;
-       }
-       else if (*op2->digs == 1) {
-           /* multiply by +-1 */
-           if (rop->alloc < op1->size) {
-               rop->digs = mp_realloc(rop->digs, sizeof(BNS) * op1->size);
-               rop->alloc = op1->size;
-           }
-           rop->size = op1->size;
-           memmove(rop->digs, op1->digs, sizeof(BNS) * op1->size);
-           rop->sign = op1->size > 1 || *op1->digs ? sign : 0;
-
-           return;
-       }
-    }
-
-    /* allocate result data and set it to zero */
-    xsize = op1->size + op2->size;
-    if (rop->digs == op1->digs || rop->digs == op2->digs)
-       /* rop is also an operand */
-       digs = mp_calloc(1, sizeof(BNS) * xsize);
-    else {
-       if (rop->alloc < xsize) {
-           rop->digs = mp_realloc(rop->digs, sizeof(BNS) * xsize);
-           rop->alloc = xsize;
-       }
-       digs = rop->digs;
-       memset(digs, '\0', sizeof(BNS) * xsize);
-    }
-
-    /* multiply operands */
-    xsize = mp_mul(digs, op1->digs, op2->digs, op1->size, op2->size);
-
-    /* store result in rop */
-    if (digs != rop->digs) {
-       /* if rop was an operand, free old data */
-       mp_free(rop->digs);
-       rop->digs = digs;
-    }
-    rop->size = xsize;
-
-    /* set result sign */
-    rop->sign = sign;
-}
-
-void
-mpi_muli(mpi *rop, mpi *op1, long op2)
-{
-    BNS digs[2];
-    mpi op;
-
-    op.digs = (BNS*)digs;
-    _mpi_seti(&op, op2);
-
-    mpi_mul(rop, op1, &op);
-}
-
-void
-mpi_div(mpi *rop, mpi *num, mpi *den)
-{
-    mpi_divqr(rop, NULL, num, den);
-}
-
-void
-mpi_rem(mpi *rop, mpi *num, mpi *den)
-{
-    mpi_divqr(NULL, rop, num, den);
-}
-
-/*
- * Could/should be changed to not allocate qdigs if qrop is NULL
- * Performance wouldn't suffer too much with a test on every loop iteration.
- */
-void
-mpi_divqr(mpi *qrop, mpi *rrop, mpi *num, mpi *den)
-{
-    long i, j;                 /* counters */
-    int qsign;                 /* sign of quotient */
-    int rsign;                 /* sign of remainder */
-    BNI qsize;                 /* size of quotient */
-    BNI rsize;                 /* size of remainder */
-    BNS qest;                  /* estimative of quotient value */
-    BNS *qdigs, *rdigs;                /* work copy or result */
-    BNS *ndigs, *ddigs;                /* work copy or divisor and dividend */
-    BNI value;                 /* temporary result */
-    long svalue;               /* signed temporary result (2's complement) */
-    BNS carry, scarry, denorm; /* carry and normalization */
-    BNI dpos, npos;            /* offsets in data */
-
-    /* get signs */
-    rsign = num->sign;
-    qsign = rsign ^ den->sign;
-
-    /* check for special case */
-    if (num->size < den->size) {
-       /* quotient is zero and remainder is numerator */
-       if (rrop && rrop->digs != num->digs) {
-           if (rrop->alloc < num->size) {
-               rrop->digs = mp_realloc(rrop->digs, sizeof(BNS) * num->size);
-               rrop->alloc = num->size;
-           }
-           rrop->size = num->size;
-           memcpy(rrop->digs, num->digs, sizeof(BNS) * num->size);
-           rrop->sign = rsign;
-       }
-       if (qrop)
-           mpi_seti(qrop, 0);
-
-       return;
-    }
-
-    /* estimate result sizes */
-    rsize = den->size;
-    qsize = num->size - den->size + 1;
-
-    /* offsets */
-    npos = num->size - 1;
-    dpos = den->size - 1;
-
-    /* allocate space for quotient and remainder */
-    if (qrop == NULL || qrop->digs == num->digs || qrop->digs == den->digs)
-       qdigs = mp_calloc(1, sizeof(BNS) * qsize);
-    else {
-       if (qrop->alloc < qsize) {
-           qrop->digs = mp_realloc(qrop->digs, sizeof(BNS) * qsize);
-           qrop->alloc = qsize;
-       }
-       memset(qrop->digs, '\0', sizeof(BNS) * qsize);
-       qdigs = qrop->digs;
-    }
-    if (rrop) {
-       if (rrop->digs == num->digs || rrop->digs == den->digs)
-           rdigs = mp_calloc(1, sizeof(BNS) * rsize);
-       else {
-           if (rrop->alloc < rsize) {
-               rrop->digs = mp_realloc(rrop->digs, sizeof(BNS) * rsize);
-               rrop->alloc = rsize;
-           }
-           memset(rrop->digs, '\0', sizeof(BNS) * rsize);
-           rdigs = rrop->digs;
-       }
-    }
-    else
-       rdigs = NULL;   /* fix gcc warning */
-
-    /* special case, only one word in divisor */
-    if (dpos == 0) {
-       for (carry = 0, i = npos; i >= 0; i--) {
-           value = ((BNI)carry << BNSBITS) + num->digs[i];
-           qdigs[i] = (BNS)(value / den->digs[0]);
-           carry = (BNS)(value % den->digs[0]);
-       }
-       if (rrop)
-           rdigs[0] = carry;
-
-       goto mpi_divqr_done;
-    }
-
-    /* make work copy of numerator */
-    ndigs = mp_malloc(sizeof(BNS) * (num->size + 1));
-    /* allocate one extra word an update offset */
-    memcpy(ndigs, num->digs, sizeof(BNS) * num->size);
-    ndigs[num->size] = 0;
-    ++npos;
-
-    /* normalize */
-    denorm = (BNS)((BNI)CARRY / ((BNI)(den->digs[dpos]) + 1));
-
-    if (denorm > 1) {
-       /* i <= num->size because ndigs has an extra word */
-       for (carry = 0, i = 0; i <= num->size; i++) {
-           value = ndigs[i] * (BNI)denorm + carry;
-           ndigs[i] = (BNS)value;
-           carry = (BNS)(value >> BNSBITS);
-       }
-       /* make work copy of denominator */
-       ddigs = mp_malloc(sizeof(BNS) * den->size);
-       memcpy(ddigs, den->digs, sizeof(BNS) * den->size);
-       for (carry = 0, i = 0; i < den->size; i++) {
-           value = ddigs[i] * (BNI)denorm + carry;
-           ddigs[i] = (BNS)value;
-           carry = (BNS)(value >> BNSBITS);
-       }
-    }
-    else
-       /* only allocate copy of denominator if going to change it */
-       ddigs = den->digs;
-
-    /* divide mp integers */
-    for (j = qsize - 1; j >= 0; j--, npos--) {
-       /* estimate quotient */
-       if (ndigs[npos] == ddigs[dpos])
-           qest = (BNS)SMASK;
-       else
-           qest = (BNS)((((BNI)(ndigs[npos]) << 16) + ndigs[npos - 1]) /
-                        ddigs[dpos]);
-
-       while ((value = ((BNI)(ndigs[npos]) << 16) + ndigs[npos - 1] -
-               qest * (BNI)(ddigs[dpos])) < CARRY &&
-               ddigs[dpos - 1] * (BNI)qest >
-               (value << BNSBITS) + ndigs[npos - 2])
-              --qest;
-
-       /* multiply and subtract */
-       carry = scarry = 0;
-       for (i = 0; i < den->size; i++) {
-           value = qest * (BNI)ddigs[i] + carry;
-           carry = (BNS)(value >> BNSBITS);
-           svalue = (long)ndigs[npos - dpos + i - 1] - (long)(value & SMASK) -
-                    (long)scarry;
-           ndigs[npos - dpos + i - 1] = (BNS)svalue;
-           scarry = svalue < 0;
-       }
-
-       svalue = (long)ndigs[npos] - (long)(carry & SMASK) - (long)scarry;
-       ndigs[npos] = (BNS)svalue;
-
-       if (svalue & LMASK) {
-           /* quotient too big */
-           --qest;
-           carry = 0;
-           for (i = 0; i < den->size; i++) {
-               value = ndigs[npos - dpos + i - 1] + (BNI)carry + (BNI)ddigs[i];
-               ndigs[npos - dpos + i - 1] = (BNS)value;
-               carry = (BNS)(value >> BNSBITS);
-           }
-           ndigs[npos] += carry;
-       }
-
-       qdigs[j] = qest;
-    }
-
-    /* calculate remainder */
-    if (rrop) {
-       for (carry = 0, j = dpos; j >= 0; j--) {
-           value = ((BNI)carry << BNSBITS) + ndigs[j];
-           rdigs[j] = (BNS)(value / denorm);
-           carry = (BNS)(value % denorm);
-       }
-    }
-
-    mp_free(ndigs);
-    if (ddigs != den->digs)
-       mp_free(ddigs);
-
-mpi_divqr_done:
-    if (rrop) {
-       if (rrop->digs != rdigs)
-           mp_free(rrop->digs);
-       /* normalize remainder */
-       for (i = rsize - 1; i >= 0; i--)
-           if (rdigs[i] != 0)
-               break;
-       if (i != rsize - 1) {
-           if (i < 0) {
-               rsign = 0;
-               rsize = 1;
-           }
-           else
-               rsize = i + 1;
-       }
-       rrop->digs = rdigs;
-       rrop->sign = rsign;
-       rrop->size = rsize;
-    }
-
-    /* normalize quotient */
-    if (qrop) {
-       if (qrop->digs != qdigs)
-           mp_free(qrop->digs);
-       for (i = qsize - 1; i >= 0; i--)
-           if (qdigs[i] != 0)
-               break;
-       if (i != qsize - 1) {
-           if (i < 0) {
-               qsign = 0;
-               qsize = 1;
-           }
-           else
-               qsize = i + 1;
-       }
-       qrop->digs = qdigs;
-       qrop->sign = qsign;
-       qrop->size = qsize;
-    }
-    else
-       mp_free(qdigs);
-}
-
-long
-mpi_divqri(mpi *qrop, mpi *num, long den)
-{
-    BNS ddigs[2];
-    mpi dop, rrop;
-    long remainder;
-
-    dop.digs = (BNS*)ddigs;
-    _mpi_seti(&dop, den);
-
-    memset(&rrop, '\0', sizeof(mpi));
-    mpi_init(&rrop);
-    mpi_divqr(qrop, &rrop, num, &dop);
-    remainder = rrop.digs[0];
-    if (rrop.size > 1)
-       remainder |= (BNI)(rrop.digs[1]) << BNSBITS;
-    if (rrop.sign)
-       remainder = -remainder;
-    mpi_clear(&rrop);
-
-    return (remainder);
-}
-
-void
-mpi_divi(mpi *rop, mpi *num, long den)
-{
-    BNS ddigs[2];
-    mpi dop;
-
-    dop.digs = (BNS*)ddigs;
-    _mpi_seti(&dop, den);
-
-    mpi_divqr(rop, NULL, num, &dop);
-}
-
-long
-mpi_remi(mpi *num, long den)
-{
-    return (mpi_divqri(NULL, num, den));
-}
-
-void
-mpi_mod(mpi *rop, mpi *num, mpi *den)
-{
-    mpi_rem(rop, num, den);
-    if (num->sign ^ den->sign)
-       mpi_add(rop, rop, den);
-}
-
-long
-mpi_modi(mpi *num, long den)
-{
-    long remainder;
-
-    remainder = mpi_remi(num, den);
-    if (num->sign ^ (den < 0))
-       remainder += den;
-
-    return (remainder);
-}
-
-void
-mpi_gcd(mpi *rop, mpi *num, mpi *den)
-{
-    long cmp;
-    mpi rem;
-
-    /* check if result already given */
-    cmp = mpi_cmpabs(num, den);
-
-    /* check if num is equal to den or if num is zero */
-    if (cmp == 0 || (num->size == 1 && num->digs[0] == 0)) {
-       mpi_set(rop, den);
-       rop->sign = 0;
-       return;
-    }
-    /* check if den is not zero */
-    if (den->size == 1 && den->digs[0] == 0) {
-       mpi_set(rop, num);
-       rop->sign = 0;
-       return;
-    }
-
-    /* don't call mpi_init, relies on realloc(0, size) == malloc(size) */
-    memset(&rem, '\0', sizeof(mpi));
-
-    /* if num larger than den */
-    if (cmp > 0) {
-       mpi_rem(&rem, num, den);
-       if (rem.size == 1 && rem.digs[0] == 0) {
-           /* exact division */
-           mpi_set(rop, den);
-           rop->sign = 0;
-           mpi_clear(&rem);
-           return;
-       }
-       mpi_set(rop, den);
-    }
-    else {
-       mpi_rem(&rem, den, num);
-       if (rem.size == 1 && rem.digs[0] == 0) {
-           /* exact division */
-           mpi_set(rop, num);
-           rop->sign = 0;
-           mpi_clear(&rem);
-           return;
-       }
-       mpi_set(rop, num);
-    }
-
-    /* loop using positive values */
-    rop->sign = rem.sign = 0;
-
-    /* cannot optimize this inverting rem/rop assignment earlier
-     * because rop mais be an operand */
-    mpi_swap(rop, &rem);
-
-    /* Euclides algorithm */
-    for (;;) {
-       mpi_rem(&rem, &rem, rop);
-       if (rem.size == 1 && rem.digs[0] == 0)
-           break;
-       mpi_swap(rop, &rem);
-    }
-    mpi_clear(&rem);
-}
-
-void
-mpi_lcm(mpi *rop, mpi *num, mpi *den)
-{
-    mpi gcd;
-
-    /* check for zero operand */
-    if ((num->size == 1 && num->digs[0] == 0) ||
-       (den->size == 1 && den->digs[0] == 0)) {
-       rop->digs[0] = 0;
-       rop->sign = 0;
-       return;
-    }
-
-    /* don't call mpi_init, relies on realloc(0, size) == malloc(size) */
-    memset(&gcd, '\0', sizeof(mpi));
-
-    mpi_gcd(&gcd, num, den);
-    mpi_div(&gcd, den, &gcd);
-    mpi_mul(rop, &gcd, num);
-    rop->sign = 0;
-
-    mpi_clear(&gcd);
-}
-
-void
-mpi_pow(mpi *rop, mpi *op, unsigned long exp)
-{
-    mpi zop, top;
-
-    if (exp == 2) {
-       mpi_mul(rop, op, op);
-       return;
-    }
-    /* check for op**0 */
-    else if (exp == 0) {
-       rop->digs[0] = 1;
-       rop->size = 1;
-       rop->sign = 0;
-       return;
-    }
-    else if (exp == 1) {
-       mpi_set(rop, op);
-       return;
-    }
-    else if (op->size == 1) {
-       if (op->digs[0] == 0) {
-           mpi_seti(rop, 0);
-           return;
-       }
-       else if (op->digs[0] == 1) {
-           mpi_seti(rop, op->sign && (exp & 1) ? -1 : 1);
-           return;
-       }
-    }
-
-    memset(&zop, '\0', sizeof(mpi));
-    memset(&top, '\0', sizeof(mpi));
-    mpi_set(&zop, op);
-    mpi_set(&top, op);
-    for (--exp; exp; exp >>= 1) {
-       if (exp & 1)
-           mpi_mul(&zop, &top, &zop);
-       mpi_mul(&top, &top, &top);
-    }
-
-    mpi_clear(&top);
-    rop->sign = zop.sign;
-    mp_free(rop->digs);
-    rop->digs = zop.digs;
-    rop->size = zop.size;
-}
-
-/* Find integer root of given number using the iteration
- *     x{n+1} = ((K-1) * x{n} + N / x{n}^(K-1)) / K
- */
-int
-mpi_root(mpi *rop, mpi *op, unsigned long nth)
-{
-    long bits, cmp;
-    int exact;
-    int sign;
-    mpi *r, t, temp, quot, old, rem;
-
-    sign = op->sign;
-
-    /* divide by zero op**1/0 */
-    if (nth == 0) {
-       int one = 1, zero = 0;
-       one = one / zero;
-    }
-    /* result is complex */
-    if (sign && !(nth & 1)) {
-       int one = 1, zero = 0;
-       one = one / zero;
-    }
-
-    /* special case op**1/1 = op */
-    if (nth == 1) {
-       mpi_set(rop, op);
-       return (1);
-    }
-
-    bits = mpi_getsize(op, 2) - 2;
-
-    if (bits < 0 || bits / nth == 0) {
-       /* integral root is surely less than 2 */
-       exact = op->size == 1 && (op->digs[0] == 1 || op->digs[0] == 0);
-       mpi_seti(rop, sign ? -1 : op->digs[0] == 0 ? 0 : 1);
-
-       return (exact == 1);
-    }
-
-    /* initialize */
-    if (rop != op)
-       r = rop;
-    else {
-       r = &t;
-       memset(r, '\0', sizeof(mpi));
-    }
-    memset(&temp, '\0', sizeof(mpi));
-    memset(&quot, '\0', sizeof(mpi));
-    memset(&old, '\0', sizeof(mpi));
-    memset(&rem, '\0', sizeof(mpi));
-
-    if (sign)
-       r->sign = 0;
-
-    /* root aproximation */
-    mpi_ash(r, op, -(bits - (bits / nth)));
-
-    for (;;) {
-       mpi_pow(&temp, r, nth - 1);
-       mpi_divqr(&quot, &rem, op, &temp);
-       cmp = mpi_cmpabs(r, &quot);
-       if (cmp == 0) {
-           exact = mpi_cmpi(&rem, 0) == 0;
-           break;
-       }
-       else if (cmp < 0) {
-           if (mpi_cmpabs(r, &old) == 0) {
-               exact = 0;
-               break;
-           }
-           mpi_set(&old, r);
-       }
-       mpi_muli(&temp, r, nth - 1);
-       mpi_add(&quot, &quot, &temp);
-       mpi_divi(r, &quot, nth);
-    }
-
-    mpi_clear(&temp);
-    mpi_clear(&quot);
-    mpi_clear(&old);
-    mpi_clear(&rem);
-    if (r != rop) {
-       mpi_set(rop, r);
-       mpi_clear(r);
-    }
-    rop->sign = sign;
-
-    return (exact);
-}
-
-/*
- * Find square root using the iteration:
- *     x{n+1} = (x{n}+N/x{n})/2
- */
-int
-mpi_sqrt(mpi *rop, mpi *op)
-{
-    long bits, cmp;
-    int exact;
-    mpi *r, t, quot, rem, old;
-
-    /* result is complex */
-    if (op->sign) {
-       int one = 1, zero = 0;
-       one = one / zero;
-    }
-
-    bits = mpi_getsize(op, 2) - 2;
-
-    if (bits < 2) {
-       /* integral root is surely less than 2 */
-       exact = op->size == 1 && (op->digs[0] == 1 || op->digs[0] == 0);
-       mpi_seti(rop, op->digs[0] == 0 ? 0 : 1);
-
-       return (exact == 1);
-    }
-
-    /* initialize */
-    if (rop != op)
-       r = rop;
-    else {
-       r = &t;
-       memset(r, '\0', sizeof(mpi));
-    }
-    memset(&quot, '\0', sizeof(mpi));
-    memset(&rem, '\0', sizeof(mpi));
-    memset(&old, '\0', sizeof(mpi));
-
-    /* root aproximation */
-    mpi_ash(r, op, -(bits - (bits / 2)));
-
-    for (;;) {
-       if (mpi_cmpabs(r, &old) == 0) {
-           exact = 0;
-           break;
-       }
-       mpi_divqr(&quot, &rem, op, r);
-       cmp = mpi_cmpabs(&quot, r);
-       if (cmp == 0) {
-           exact = mpi_cmpi(&rem, 0) == 0;
-           break;
-       }
-       else if (cmp > 0 && rem.size == 1 && rem.digs[0] == 0)
-           mpi_subi(&quot, &quot, 1);
-       mpi_set(&old, r);
-       mpi_add(r, r, &quot);
-       mpi_ash(r, r, -1);
-    }
-    mpi_clear(&quot);
-    mpi_clear(&rem);
-    mpi_clear(&old);
-    if (r != rop) {
-       mpi_set(rop, r);
-       mpi_clear(r);
-    }
-
-    return (exact);
-}
-
-void
-mpi_ash(mpi *rop, mpi *op, long shift)
-{
-    long i;                    /* counter */
-    long xsize;                        /* maximum result size */
-    BNS *digs;
-
-    /* check for 0 shift, multiply/divide by 1 */
-    if (shift == 0) {
-       if (rop != op) {
-           if (rop->alloc < op->size) {
-               rop->digs = mp_realloc(rop->digs, sizeof(BNS) * op->size);
-               rop->alloc = op->size;
-           }
-           rop->size = op->size;
-           memcpy(rop->digs, op->digs, sizeof(BNS) * op->size);
-       }
-
-       return;
-    }
-    else if (op->size == 1 && op->digs[0] == 0) {
-       rop->sign = 0;
-       rop->size = 1;
-       rop->digs[0] = 0;
-
-       return;
-    }
-
-    /* check shift and initialize */
-    if (shift > 0)
-       xsize = op->size + (shift / BNSBITS) + 1;
-    else {
-       xsize = op->size - ((-shift) / BNSBITS);
-       if (xsize <= 0) {
-           rop->size = 1;
-           rop->sign = op->sign;
-           rop->digs[0] = op->sign ? 1 : 0;
-
-           return;
-       }
-    }
-
-    /* allocate/adjust memory for result */
-    if (rop == op)
-       digs = mp_malloc(sizeof(BNS) * xsize);
-    else {
-       if (rop->alloc < xsize) {
-           rop->digs = mp_realloc(rop->digs, sizeof(BNS) * xsize);
-           rop->alloc = xsize;
-       }
-       digs = rop->digs;
-    }
-
-    /* left shift, multiply by power of two */
-    if (shift > 0)
-       rop->size = mp_lshift(digs, op->digs, op->size, shift);
-    /* right shift, divide by power of two */
-    else {
-       long carry = 0;
-
-       if (op->sign) {
-           BNI words, bits;
-
-           words = -shift / BNSBITS;
-           bits = -shift % BNSBITS;
-           for (i = 0; i < words; i++)
-               carry |= op->digs[xsize + i];
-           if (!carry) {
-               for (i = 0; i < bits; i++)
-                   if (op->digs[op->size - xsize] & (1 << i)) {
-                       carry = 1;
-                       break;
-                   }
-           }
-       }
-       rop->size = mp_rshift(digs, op->digs, op->size, -shift);
-
-       if (carry)
-           /* emulates two's complement subtracting 1 from the result */
-           rop->size = mp_add(digs, digs, mpone.digs, rop->size, 1);
-    }
-
-    if (rop->digs != digs) {
-       mp_free(rop->digs);
-       rop->alloc = rop->size;
-       rop->digs = digs;
-    }
-    rop->sign = op->sign;
-}
-
-static INLINE BNS
-mpi_logic(BNS op1, BNS op2, BNS op)
-{
-    switch (op) {
-       case '&':
-           return (op1 & op2);
-       case '|':
-           return (op1 | op2);
-       case '^':
-           return (op1 ^ op2);
-    }
-
-    return (SMASK);
-}
-
-static void
-mpi_log(mpi *rop, mpi *op1, mpi *op2, BNS op)
-{
-    long i;                    /* counter */
-    long c, c1, c2;            /* carry */
-    BNS *digs, *digs1, *digs2; /* pointers to mp data */
-    BNI size, size1, size2;
-    BNS sign, sign1, sign2;
-    BNS n, n1, n2;             /* logical operands */
-    BNI sum;
-
-    /* initialize */
-    size1 = op1->size;
-    size2 = op2->size;
-
-    sign1 = op1->sign ? SMASK : 0;
-    sign2 = op2->sign ? SMASK : 0;
-
-    sign = mpi_logic(sign1, sign2, op);
-
-    size = MAX(size1, size2);
-    if (sign)
-       ++size;
-    if (rop->alloc < size) {
-       rop->digs = mp_realloc(rop->digs, sizeof(BNS) * size);
-       rop->alloc = size;
-    }
-
-    digs = rop->digs;
-    digs1 = op1->digs;
-    digs2 = op2->digs;
-
-    c = c1 = c2 = 1;
-
-    /* apply logical operation */
-    for (i = 0; i < size; i++) {
-       if (i >= size1)
-           n1 = sign1;
-       else if (sign1) {
-           sum = (BNI)(BNS)(~digs1[i]) + c1;
-           c1 = (long)(sum >> BNSBITS);
-           n1 = (BNS)sum;
-       }
-       else
-           n1 = digs1[i];
-
-       if (i >= size2)
-           n2 = sign2;
-       else if (sign2) {
-           sum = (BNI)(BNS)(~digs2[i]) + c2;
-           c2 = (long)(sum >> BNSBITS);
-           n2 = (BNS)sum;
-       }
-       else
-           n2 = digs2[i];
-
-       n = mpi_logic(n1, n2, op);
-       if (sign) {
-           sum = (BNI)(BNS)(~n) + c;
-           c = (long)(sum >> BNSBITS);
-           digs[i] = (BNS)sum;
-       }
-       else
-           digs[i] = n;
-    }
-
-    /* normalize */
-    for (i = size - 1; i >= 0; i--)
-       if (digs[i] != 0)
-           break;
-    if (i != size - 1) {
-       if (i < 0) {
-           sign = 0;
-           size = 1;
-       }
-       else
-           size = i + 1;
-    }
-
-    rop->sign = sign != 0;
-    rop->size = size;
-}
-
-void
-mpi_and(mpi *rop, mpi *op1, mpi *op2)
-{
-    mpi_log(rop, op1, op2, '&');
-}
-
-void
-mpi_ior(mpi *rop, mpi *op1, mpi *op2)
-{
-    mpi_log(rop, op1, op2, '|');
-}
-
-void
-mpi_xor(mpi *rop, mpi *op1, mpi *op2)
-{
-    mpi_log(rop, op1, op2, '^');
-}
-
-void
-mpi_com(mpi *rop, mpi *op)
-{
-    static BNS digs[1] = { 1 };
-    static mpi one = { 0, 1, 1, (BNS*)&digs };
-
-    mpi_log(rop, rop, &one, '^');
-}
-
-void
-mpi_neg(mpi *rop, mpi *op)
-{
-    int sign = op->sign ^ 1;
-
-    if (rop->digs != op->digs) {
-       if (rop->alloc < op->size) {
-           rop->digs = mp_realloc(rop->digs, sizeof(BNS) * rop->size);
-           rop->alloc = op->size;
-       }
-       rop->size = op->size;
-       memcpy(rop->digs, op->digs, sizeof(BNS) * rop->size);
-    }
-
-    rop->sign = sign;
-}
-
-void
-mpi_abs(mpi *rop, mpi *op)
-{
-    if (rop->digs != op->digs) {
-       if (rop->alloc < op->size) {
-           rop->digs = mp_realloc(rop->digs, sizeof(BNS) * rop->size);
-           rop->alloc = op->size;
-       }
-       rop->size = op->size;
-       memcpy(rop->digs, op->digs, sizeof(BNS) * rop->size);
-    }
-
-    rop->sign = 0;
-}
-
-int
-mpi_cmp(mpi *op1, mpi *op2)
-{
-    if (op1->sign ^ op2->sign)
-       return (op1->sign ? -1 : 1);
-
-    if (op1->size == op2->size) {
-       long i, cmp = 0;
-
-       for (i = op1->size - 1; i >= 0; i--)
-           if ((cmp = (long)op1->digs[i] - (long)op2->digs[i]) != 0)
-               break;
-
-       return (cmp == 0 ? 0 : (cmp < 0) ^ op1->sign ? -1 : 1);
-    }
-
-    return ((op1->size < op2->size) ^ op1->sign ? -1 : 1);
-}
-
-int
-mpi_cmpi(mpi *op1, long op2)
-{
-    long cmp;
-
-    if (op1->size > 2)
-       return (op1->sign ? -1 : 1);
-
-    cmp = op1->digs[0];
-    if (op1->size == 2) {
-       cmp |= (long)op1->digs[1] << BNSBITS;
-       if (cmp == MINSLONG)
-           return (op2 == cmp && op1->sign ? 0 : op1->sign ? -1 : 1);
-    }
-    if (op1->sign)
-       cmp = -cmp;
-
-    return (cmp - op2);
-}
-
-int
-mpi_cmpabs(mpi *op1, mpi *op2)
-{
-    if (op1->size == op2->size) {
-       long i, cmp = 0;
-
-       for (i = op1->size - 1; i >= 0; i--)
-           if ((cmp = (long)op1->digs[i] - (long)op2->digs[i]) != 0)
-               break;
-
-       return (cmp);
-    }
-
-    return ((op1->size < op2->size) ? -1 : 1);
-}
-
-int
-mpi_cmpabsi(mpi *op1, long op2)
-{
-    unsigned long cmp;
-
-    if (op1->size > 2)
-       return (1);
-
-    cmp = op1->digs[0];
-    if (op1->size == 2)
-       cmp |= (unsigned long)op1->digs[1] << BNSBITS;
-
-    return (cmp > op2 ? 1 : cmp == op2 ? 0 : -1);
-}
-
-int
-mpi_sgn(mpi *op)
-{
-    return (op->sign ? -1 : op->size > 1 || op->digs[0] ? 1 : 0);
-}
-
-void
-mpi_swap(mpi *op1, mpi *op2)
-{
-    if (op1 != op2) {
-       mpi swap;
-
-       memcpy(&swap, op1, sizeof(mpi));
-       memcpy(op1, op2, sizeof(mpi));
-       memcpy(op2, &swap, sizeof(mpi));
-    }
-}
-
-int
-mpi_fiti(mpi *op)
-{
-    if (op->size == 1)
-       return (1);
-    else if (op->size == 2) {
-       unsigned long value = ((BNI)(op->digs[1]) << BNSBITS) | op->digs[0];
-
-       if (value & MINSLONG)
-           return (op->sign && value == MINSLONG) ? 1 : 0;
-
-       return (1);
-    }
-
-    return (0);
-}
-
-long
-mpi_geti(mpi *op)
-{
-    long value;
-
-    value = op->digs[0];
-    if (op->size > 1)
-       value |= (BNI)(op->digs[1]) << BNSBITS;
-
-    return (op->sign && value != MINSLONG ? -value : value);
-}
-
-double
-mpi_getd(mpi *op)
-{
-    long i, len;
-    double d = 0.0;
-    int exponent;
-
-#define FLOATDIGS      sizeof(double) / sizeof(BNS)
-
-    switch (op->size) {
-       case 2:
-           d = (BNI)(op->digs[1]) << BNSBITS;
-       case 1:
-           d += op->digs[0];
-           return (op->sign ? -d : d);
-       default:
-           break;
-    }
-
-    for (i = 0, len = op->size; len > 0 && i < FLOATDIGS; i++)
-       d = ldexp(d, BNSBITS) + op->digs[--len];
-    d = frexp(d, &exponent);
-    if (len > 0)
-       exponent += len * BNSBITS;
-
-    if (d == 0.0)
-       return (d);
-
-    d = ldexp(d, exponent);
-
-    return (op->sign ? -d : d);
-}
-
-/* how many digits in a given base, floor(log(CARRY) / log(base)) */
-#ifdef LONG64
-static char dig_bases[37] = {
-     0,  0, 32, 20, 16, 13, 12, 11, 10, 10,  9,  9,  8,  8,  8,  8,
-     8,  7,  7,  7,  7,  7,  7,  7,  6,  6,  6,  6,  6,  6,  6,  6,
-     6,  6,  6,  6,  6,
-};
-#else
-static char dig_bases[37] = {
-     0,  0, 16, 10,  8,  6,  6,  5,  5,  5,  4,  4,  4,  4,  4,  4,
-     4,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,
-     3,  3,  3,  3,  3,
-};
-#endif
-
-/* how many digits per bit in a given base, log(2) / log(base) */
-static double bit_bases[37] = {
-    0.0000000000000000, 0.0000000000000000, 1.0000000000000000,
-    0.6309297535714575, 0.5000000000000000, 0.4306765580733931,
-    0.3868528072345416, 0.3562071871080222, 0.3333333333333334,
-    0.3154648767857287, 0.3010299956639811, 0.2890648263178878,
-    0.2789429456511298, 0.2702381544273197, 0.2626495350371936,
-    0.2559580248098155, 0.2500000000000000, 0.2446505421182260,
-    0.2398124665681315, 0.2354089133666382, 0.2313782131597592,
-    0.2276702486969530, 0.2242438242175754, 0.2210647294575037,
-    0.2181042919855316, 0.2153382790366965, 0.2127460535533632,
-    0.2103099178571525, 0.2080145976765095, 0.2058468324604344,
-    0.2037950470905062, 0.2018490865820999, 0.2000000000000000,
-    0.1982398631705605, 0.1965616322328226, 0.1949590218937863,
-    0.1934264036172708,
-};
-
-/* normalization base for string conversion, pow(base, dig_bases[base]) & ~CARRY */
-#ifdef LONG64
-static BNS big_bases[37] = {
-    0x00000001, 0x00000001, 0x00000000, 0xCFD41B91, 0x00000000, 0x48C27395,
-    0x81BF1000, 0x75DB9C97, 0x40000000, 0xCFD41B91, 0x3B9ACA00, 0x8C8B6D2B,
-    0x19A10000, 0x309F1021, 0x57F6C100, 0x98C29B81, 0x00000000, 0x18754571,
-    0x247DBC80, 0x3547667B, 0x4C4B4000, 0x6B5A6E1D, 0x94ACE180, 0xCAF18367,
-    0x0B640000, 0x0E8D4A51, 0x1269AE40, 0x17179149, 0x1CB91000, 0x23744899,
-    0x2B73A840, 0x34E63B41, 0x40000000, 0x4CFA3CC1, 0x5C13D840, 0x6D91B519,
-    0x81BF1000,
-};
-#else
-static BNS big_bases[37] = {
-    0x0001, 0x0001, 0x0000, 0xE6A9, 0x0000, 0x3D09, 0xB640, 0x41A7, 0x8000,
-    0xE6A9, 0x2710, 0x3931, 0x5100, 0x6F91, 0x9610, 0xC5C1, 0x0000, 0x1331,
-    0x16C8, 0x1ACB, 0x1F40, 0x242D, 0x2998, 0x2F87, 0x3600, 0x3D09, 0x44A8,
-    0x4CE3, 0x55C0, 0x5F45, 0x6978, 0x745F, 0x8000, 0x8C61, 0x9988, 0xA77B,
-    0xb640,
-};
-#endif
-
-unsigned long
-mpi_getsize(mpi *op, int base)
-{
-    unsigned long value, bits;
-
-    value = op->digs[op->size - 1];
-
-    /* count leading bits */
-    if (value) {
-       unsigned long count, carry;
-
-       for (count = 0, carry = CARRY >> 1; carry; count++, carry >>= 1)
-           if (value & carry)
-               break;
-
-       bits = BNSBITS - count;
-    }
-    else
-       bits = 0;
-
-    return ((bits + (op->size - 1) * BNSBITS) * bit_bases[base] + 1);
-}
-
-char *
-mpi_getstr(char *str, mpi *op, int base)
-{
-    long i;                    /* counter */
-    BNS *digs, *xdigs;         /* copy of op data */
-    BNI size;                  /* size of op */
-    BNI digits;                        /* digits per word in given base */
-    BNI bigbase;               /* big base of given base */
-    BNI strsize;               /* size of resulting string */
-    char *cp;                  /* pointer in str for conversion */
-
-    /* initialize */
-    size = op->size;
-    strsize = mpi_getsize(op, base) + op->sign + 1;
-
-    if (str == NULL)
-       str = mp_malloc(strsize);
-
-    /* check for zero */
-    if (size == 1 && op->digs[0] == 0) {
-       str[0] = '0';
-       str[1] = '\0';
-
-       return (str);
-    }
-
-    digits = dig_bases[base];
-    bigbase = big_bases[base];
-
-    cp = str + strsize;
-    *--cp = '\0';
-
-    /* make copy of op data and adjust digs */
-    xdigs = mp_malloc(size * sizeof(BNS));
-    memcpy(xdigs, op->digs, size * sizeof(unsigned short));
-    digs = xdigs + size - 1;
-
-    /* convert to string */
-    for (;;) {
-       long count = -1;
-       BNI value;
-       BNS quotient, remainder = 0;
-
-       /* if power of two base */
-       if ((base & (base - 1)) == 0) {
-           for (i = 0; i < size; i++) {
-               quotient = remainder;
-               remainder = digs[-i];
-               digs[-i] = quotient;
-               if (count < 0 && quotient)
-                   count = i;
-           }
-       }
-       else {
-           for (i = 0; i < size; i++) {
-               value = digs[-i] + ((BNI)remainder << BNSBITS);
-               quotient = (BNS)(value / bigbase);
-               remainder = (BNS)(value % bigbase);
-               digs[-i] = quotient;
-               if (count < 0 && quotient)
-                   count = i;
-           }
-       }
-       quotient = remainder;
-       for (i = 0; i < digits; i++) {
-           if (quotient == 0 && count < 0)
-               break;
-           remainder = quotient % base;
-           quotient /= base;
-           *--cp = remainder < 10 ? remainder + '0' : remainder - 10 + 'A';
-       }
-       if (count < 0)
-           break;
-       digs -= count;
-       size -= count;
-    }
-
-    /* adjust sign */
-    if (op->sign)
-       *--cp = '-';
-
-    /* remove any extra characters */
-    if (cp > str)
-       strcpy(str, cp);
-
-    mp_free(xdigs);
-
-    return (str);
-}
diff --git a/xedit/lisp/mp/mpr.c b/xedit/lisp/mp/mpr.c
deleted file mode 100644 (file)
index 3310a07..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86$ */
-
-#include "mp.h"
-
-/*
- * TODO:
- *  Implement a fast gcd and divexact for integers, so that this code
- * could be changed to do intermediary calculations faster using smaller
- * numbers.
- */
-
-/*
- * Prototypes
- */
-       /* do the hard work of mpr_add and mpr_sub */
-static void mpr_addsub(mpr *rop, mpr *op1, mpr *op2, int sub);
-
-       /* do the hard work of mpr_cmp and mpr_cmpabs */
-static int mpr_docmp(mpr *op1, mpr *op2, int sign);
-
-/*
- * Implementation
- */
-void
-mpr_init(mpr *op)
-{
-    op->num.digs = mp_malloc(sizeof(BNS));
-    op->num.sign = 0;
-    op->num.size = op->num.alloc = 1;
-    op->num.digs[0] = 0;
-
-    op->den.digs = mp_malloc(sizeof(BNS));
-    op->den.sign = 0;
-    op->den.size = op->den.alloc = 1;
-    op->den.digs[0] = 1;
-}
-
-void
-mpr_clear(mpr *op)
-{
-    op->num.sign = 0;
-    op->num.size = op->num.alloc = 0;
-    mp_free(op->num.digs);
-
-    op->den.sign = 0;
-    op->den.size = op->den.alloc = 0;
-    mp_free(op->den.digs);
-}
-
-void
-mpr_set(mpr *rop, mpr *op)
-{
-    if (rop != op) {
-       mpi_set(mpr_num(rop), mpr_num(op));
-       mpi_set(mpr_den(rop), mpr_den(op));
-    }
-}
-
-void
-mpr_seti(mpr *rop, long num, long den)
-{
-    mpi_seti(mpr_num(rop), num);
-    mpi_seti(mpr_den(rop), den);
-}
-
-void
-mpr_setd(mpr *rop, double d)
-{
-    double val, num;
-    int e, sign;
-
-    /* initialize */
-    if (d < 0) {
-       sign = 1;
-       val = -d;
-    }
-    else {
-       sign = 0;
-       val = d;
-    }
-
-    val = frexp(val, &e);
-    while (modf(val, &num) != 0.0 && val <= DBL_MAX / 2.0) {
-       --e;
-       val *= 2.0;
-    }
-    if (e >= 0) {
-       mpi_setd(mpr_num(rop), d);
-       mpi_seti(mpr_den(rop), 1);
-    }
-    else {
-       mpi_setd(mpr_num(rop), sign ? -num : num);
-       mpi_setd(mpr_den(rop), ldexp(1.0, -e));
-    }
-}
-
-void
-mpr_setstr(mpr *rop, char *str, int base)
-{
-    char *slash = strchr(str, '/');
-
-    mpi_setstr(mpr_num(rop), str, base);
-    if (slash != NULL)
-       mpi_setstr(mpr_den(rop), slash + 1, base);
-    else
-       mpi_seti(mpr_den(rop), 1);
-}
-
-void
-mpr_canonicalize(mpr *op)
-{
-    mpi gcd;
-
-    memset(&gcd, '\0', sizeof(mpi));
-
-    mpi_gcd(&gcd, mpr_num(op), mpr_den(op));
-    if (mpi_cmpabsi(&gcd, 1)) {
-       mpi_div(mpr_num(op), mpr_num(op), &gcd);
-       mpi_div(mpr_den(op), mpr_den(op), &gcd);
-    }
-
-    if (op->den.sign) {
-       op->num.sign = !op->num.sign;
-       op->den.sign = 0;
-    }
-
-    mpi_clear(&gcd);
-}
-
-void
-mpr_add(mpr *rop, mpr *op1, mpr *op2)
-{
-    mpr_addsub(rop, op1, op2, 0);
-}
-
-void
-mpr_addi(mpr *rop, mpr *op1, long op2)
-{
-    mpi prod;
-
-    memset(&prod, '\0', sizeof(mpi));
-
-    mpi_muli(&prod, mpr_den(op1), op2);
-    mpi_add(mpr_num(rop), mpr_num(op1), &prod);
-    mpi_clear(&prod);
-}
-
-void
-mpr_sub(mpr *rop, mpr *op1, mpr *op2)
-{
-    mpr_addsub(rop, op1, op2, 1);
-}
-
-void
-mpr_subi(mpr *rop, mpr *op1, long op2)
-{
-    mpi prod;
-
-    memset(&prod, '\0', sizeof(mpi));
-
-    mpi_muli(&prod, mpr_den(op1), op2);
-    mpi_sub(mpr_num(rop), mpr_num(op1), &prod);
-    mpi_clear(&prod);
-}
-
-static void
-mpr_addsub(mpr *rop, mpr *op1, mpr *op2, int sub)
-{
-    mpi prod1, prod2;
-
-    memset(&prod1, '\0', sizeof(mpi));
-    memset(&prod2, '\0', sizeof(mpi));
-
-    mpi_mul(&prod1, mpr_num(op1), mpr_den(op2));
-    mpi_mul(&prod2, mpr_num(op2), mpr_den(op1));
-
-    if (sub)
-       mpi_sub(mpr_num(rop), &prod1, &prod2);
-    else
-       mpi_add(mpr_num(rop), &prod1, &prod2);
-
-    mpi_clear(&prod1);
-    mpi_clear(&prod2);
-
-    mpi_mul(mpr_den(rop), mpr_den(op1), mpr_den(op2));
-}
-
-void
-mpr_mul(mpr *rop, mpr *op1, mpr *op2)
-{
-    /* check if temporary storage is required */
-    if (op1 == op2 && rop == op1) {
-       mpi prod;
-
-       memset(&prod, '\0', sizeof(mpi));
-
-       mpi_mul(&prod, mpr_num(op1), mpr_num(op2));
-       mpi_mul(mpr_den(rop), mpr_den(op1), mpr_den(op2));
-       mpi_set(mpr_num(rop), &prod);
-
-       mpi_clear(&prod);
-    }
-    else {
-       mpi_mul(mpr_num(rop), mpr_num(op1), mpr_num(op2));
-       mpi_mul(mpr_den(rop), mpr_den(op1), mpr_den(op2));
-    }
-}
-
-void
-mpr_muli(mpr *rop, mpr *op1, long op2)
-{
-    mpi_muli(mpr_num(rop), mpr_num(op1), op2);
-}
-
-void
-mpr_div(mpr *rop, mpr *op1, mpr *op2)
-{
-    /* check if temporary storage is required */
-    if (op1 == op2 && rop == op1) {
-       mpi prod;
-
-       memset(&prod, '\0', sizeof(mpi));
-
-       mpi_mul(&prod, mpr_num(op1), mpr_den(op2));
-       mpi_mul(mpr_den(rop), mpr_num(op2), mpr_den(op1));
-       mpi_set(mpr_num(rop), &prod);
-
-       mpi_clear(&prod);
-    }
-    else {
-       mpi_mul(mpr_num(rop), mpr_num(op1), mpr_den(op2));
-       mpi_mul(mpr_den(rop), mpr_num(op2), mpr_den(op1));
-    }
-}
-
-void
-mpr_divi(mpr *rop, mpr *op1, long op2)
-{
-    mpi_muli(mpr_den(rop), mpr_den(op1), op2);
-}
-
-void
-mpr_inv(mpr *rop, mpr *op)
-{
-    if (rop == op)
-       mpi_swap(mpr_num(op), mpr_den(op));
-    else {
-       mpi_set(mpr_num(rop), mpr_den(op));
-       mpi_set(mpr_den(rop), mpr_num(op));
-    }
-}
-
-void
-mpr_neg(mpr *rop, mpr *op)
-{
-    mpi_neg(mpr_num(rop), mpr_num(op));
-    mpi_set(mpr_den(rop), mpr_den(op));
-}
-
-void
-mpr_abs(mpr *rop, mpr *op)
-{
-    if (mpr_num(op)->sign)
-       mpi_neg(mpr_num(rop), mpr_num(op));
-    else
-       mpi_set(mpr_num(rop), mpr_num(op));
-
-    /* op may not be canonicalized */
-    if (mpr_den(op)->sign)
-       mpi_neg(mpr_den(rop), mpr_den(op));
-    else
-       mpi_set(mpr_den(rop), mpr_den(op));
-}
-
-int
-mpr_cmp(mpr *op1, mpr *op2)
-{
-    return (mpr_docmp(op1, op2, 1));
-}
-
-int
-mpr_cmpi(mpr *op1, long op2)
-{
-    int cmp;
-    mpr rat;
-
-    mpr_init(&rat);
-    mpi_seti(mpr_num(&rat), op2);
-    cmp = mpr_docmp(op1, &rat, 1);
-    mpr_clear(&rat);
-
-    return (cmp);
-}
-
-int
-mpr_cmpabs(mpr *op1, mpr *op2)
-{
-    return (mpr_docmp(op1, op2, 0));
-}
-
-int
-mpr_cmpabsi(mpr *op1, long op2)
-{
-    int cmp;
-    mpr rat;
-
-    mpr_init(&rat);
-    mpi_seti(mpr_num(&rat), op2);
-    cmp = mpr_docmp(op1, &rat, 0);
-    mpr_clear(&rat);
-
-    return (cmp);
-}
-
-static int
-mpr_docmp(mpr *op1, mpr *op2, int sign)
-{
-    int cmp, neg;
-    mpi prod1, prod2;
-
-    neg = 0;
-    if (sign) {
-       /* if op1 is negative */
-       if (mpr_num(op1)->sign ^ mpr_den(op1)->sign) {
-           /* if op2 is positive */
-           if (!(mpr_num(op2)->sign ^ mpr_den(op2)->sign))
-               return (-1);
-           else
-               neg = 1;
-       }
-       /* if op2 is negative */
-       else if (mpr_num(op2)->sign ^ mpr_den(op2)->sign)
-           return (1);
-       /* else same sign */
-    }
-
-    /* if denominators are equal, compare numerators */
-    if (mpi_cmpabs(mpr_den(op1), mpr_den(op2)) == 0) {
-       cmp = mpi_cmpabs(mpr_num(op1), mpr_num(op2));
-       if (cmp == 0)
-           return (0);
-       if (sign && neg)
-           return (cmp < 0 ? 1 : -1);
-       return (cmp);
-    }
-
-    memset(&prod1, '\0', sizeof(mpi));
-    memset(&prod2, '\0', sizeof(mpi));
-
-    /* "divide" op1 by op2
-     * if result is smaller than 1, op1 is smaller than op2 */
-    mpi_mul(&prod1, mpr_num(op1), mpr_den(op2));
-    mpi_mul(&prod2, mpr_num(op2), mpr_den(op1));
-
-    cmp = mpi_cmpabs(&prod1, &prod2);
-
-    mpi_clear(&prod1);
-    mpi_clear(&prod2);
-
-    if (sign && neg)
-       return (cmp < 0 ? 1 : -1);
-    return (cmp);
-}
-
-void
-mpr_swap(mpr *op1, mpr *op2)
-{
-    if (op1 != op2) {
-       mpr swap;
-
-       memcpy(&swap, op1, sizeof(mpr));
-       memcpy(op1, op2, sizeof(mpr));
-       memcpy(op2, &swap, sizeof(mpr));
-    }
-}
-
-int
-mpr_fiti(mpr *op)
-{
-    return (mpi_fiti(mpr_num(op)) && mpi_fiti(mpr_den(op)));
-}
-
-double
-mpr_getd(mpr *op)
-{
-    return (mpi_getd(mpr_num(op)) / mpi_getd(mpr_den(op)));
-}
-
-char *
-mpr_getstr(char *str, mpr *op, int base)
-{
-    int len;
-
-    if (str == NULL) {
-       len = mpi_getsize(mpr_num(op), base) + mpr_num(op)->sign + 1 +
-             mpi_getsize(mpr_den(op), base) + mpr_den(op)->sign + 1;
-
-       str = mp_malloc(len);
-    }
-
-    (void)mpi_getstr(str, mpr_num(op), base);
-    len = strlen(str);
-    str[len] = '/';
-    (void)mpi_getstr(str + len + 1, mpr_den(op), base);
-
-    return (str);
-}
diff --git a/xedit/lisp/package.c b/xedit/lisp/package.c
deleted file mode 100644 (file)
index 8b941ec..0000000
+++ /dev/null
@@ -1,849 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/package.c,v 1.20tsi Exp $ */
-
-#include "lisp/package.h"
-#include "lisp/private.h"
-
-/*
- * Prototypes
- */
-static int LispDoSymbol(LispObj*, LispAtom*, int, int);
-static LispObj *LispReallyDoSymbols(LispBuiltin*, int, int);
-static LispObj *LispDoSymbols(LispBuiltin*, int, int);
-static LispObj *LispFindSymbol(LispBuiltin*, int);
-static LispObj *LispFindPackageOrDie(LispBuiltin*, LispObj*);
-static void LispDoExport(LispBuiltin*, LispObj*, LispObj*, int);
-static void LispDoImport(LispBuiltin*, LispObj*);
-
-/*
- * Initialization
- */
-extern LispProperty *NOPROPERTY;
-static LispObj *Kinternal, *Kexternal, *Kinherited;
-
-/*
- * Implementation
- */
-void
-LispPackageInit(void)
-{
-    Kinternal  = KEYWORD("INTERNAL");
-    Kexternal  = KEYWORD("EXTERNAL");
-    Kinherited = KEYWORD("INHERITED");
-}
-
-LispObj *
-LispFindPackageFromString(char *string)
-{
-    LispObj *list, *package, *nick;
-
-    for (list = PACK; CONSP(list); list = CDR(list)) {
-       package = CAR(list);
-       if (strcmp(THESTR(package->data.package.name), string) == 0)
-           return (package);
-       for (nick = package->data.package.nicknames;
-            CONSP(nick); nick = CDR(nick))
-           if (strcmp(THESTR(CAR(nick)), string) == 0)
-               return (package);
-    }
-
-    return (NIL);
-}
-
-LispObj *
-LispFindPackage(LispObj *name)
-{
-    char *string = NULL;
-
-    if (PACKAGEP(name))
-       return (name);
-
-    if (SYMBOLP(name))
-       string = ATOMID(name)->value;
-    else if (STRINGP(name))
-       string = THESTR(name);
-    else
-       LispDestroy("FIND-PACKAGE: %s is not a string or symbol", STROBJ(name));
-
-    return (LispFindPackageFromString(string));
-}
-
-int
-LispCheckAtomString(char *string)
-{
-    char *ptr;
-
-    if (*string == '\0')
-       return (0);
-
-    for (ptr = string; *ptr; ptr++) {
-       if (islower(*ptr) || strchr("\"\\;#()`'|:", *ptr) ||
-           ((ptr == string || ptr[1] == '\0') && strchr(".,@", *ptr)))
-           return (0);
-    }
-
-    return (1);
-}
-
-/*   This function is used to avoid some namespace polution caused by the
- * way builtin functions are created, all function name arguments enter
- * the current package, but most of them do not have a property */
-static int
-LispDoSymbol(LispObj *package, LispAtom *atom, int if_extern, int all_packages)
-{
-    int dosymbol;
-
-    /* condition 1: atom package is current package */
-    dosymbol = !all_packages || atom->package == package;
-    if (dosymbol) {
-       /* condition 2: intern and extern symbols or symbol is extern */
-       dosymbol = !if_extern || atom->ext;
-       if (dosymbol) {
-           /* condition 3: atom has properties or is in
-            * the current package */
-           dosymbol = atom->property != NOPROPERTY ||
-                      package == lisp__data.keyword ||
-                      package == PACKAGE;
-       }
-    }
-
-    return (dosymbol);
-}
-
-static LispObj *
-LispFindPackageOrDie(LispBuiltin *builtin, LispObj *name)
-{
-    LispObj *package;
-
-    package = LispFindPackage(name);
-
-    if (package == NIL)
-       LispDestroy("%s: package %s is not available",
-                   STRFUN(builtin), STROBJ(name));
-
-    return (package);
-}
-
-/* package must be of type LispPackage_t, symbol type is checked
-   bypass lisp.c:LispExportSymbol() */
-static void
-LispDoExport(LispBuiltin *builtin,
-            LispObj *package, LispObj *symbol, int export)
-{
-    CHECK_SYMBOL(symbol);
-    if (!export) {
-       if (package == lisp__data.keyword ||
-           symbol->data.atom->package == lisp__data.keyword)
-           LispDestroy("%s: symbol %s cannot be unexported",
-                       STRFUN(builtin), STROBJ(symbol));
-    }
-
-    if (package == PACKAGE)
-       symbol->data.atom->ext = export ? 1 : 0;
-    else {
-       Atom_id string;
-       LispAtom *atom;
-       LispPackage *pack;
-
-       string = ATOMID(symbol);
-       pack = package->data.package.package;
-       atom = (LispAtom *)hash_check(pack->atoms,
-                                     string->value, string->length);
-
-       if (atom) {
-           atom->ext = export ? 1 : 0;
-           return;
-       }
-
-       LispDestroy("%s: the symbol %s is not available in package %s",
-                   STRFUN(builtin), STROBJ(symbol),
-                   THESTR(package->data.package.name));
-    }
-}
-
-static void
-LispDoImport(LispBuiltin *builtin, LispObj *symbol)
-{
-    CHECK_SYMBOL(symbol);
-    LispImportSymbol(symbol);
-}
-
-static LispObj *
-LispReallyDoSymbols(LispBuiltin *builtin, int only_externs, int all_symbols)
-{
-    int head = lisp__data.env.length;
-    LispPackage *pack = NULL;
-    LispAtom *atom;
-    LispObj *variable, *package = NULL, *list, *code, *result_form;
-
-    LispObj *init, *body;
-
-    body = ARGUMENT(1);
-    init = ARGUMENT(0);
-
-    /* Prepare for loop */
-    CHECK_CONS(init);
-    variable = CAR(init);
-    CHECK_SYMBOL(variable);
-
-    if (!all_symbols) {
-       /* if all_symbols, a package name is not specified in the init form */
-
-       init = CDR(init);
-       if (!CONSP(init))
-           LispDestroy("%s: missing package name", STRFUN(builtin));
-
-       /* Evaluate package specification */
-       package = EVAL(CAR(init));
-       if (!PACKAGEP(package))
-           package = LispFindPackageOrDie(builtin, package);
-
-       pack = package->data.package.package;
-    }
-
-    result_form = NIL;
-
-    init = CDR(init);
-    if (CONSP(init))
-       result_form = init;
-
-    /* Initialize iteration variable */
-    CHECK_CONSTANT(variable);
-    LispAddVar(variable, NIL);
-    ++lisp__data.env.head;
-
-    for (list = PACK; CONSP(list); list = CDR(list)) {
-       if (all_symbols) {
-           package = CAR(list);
-           pack = package->data.package.package;
-       }
-
-       /* Traverse the symbol list, executing body */
-       for (atom = (LispAtom *)hash_iter_first(pack->atoms);
-            atom;
-            atom = (LispAtom *)hash_iter_next(pack->atoms)) {
-               /* Save pointer to next atom. If variable is removed,
-                * predicatable result is only guaranteed if the bound
-                * variable is removed. */
-
-           if (LispDoSymbol(package, atom, only_externs, all_symbols)) {
-               LispSetVar(variable, atom->object);
-               for (code = body; CONSP(code); code = CDR(code))
-                   EVAL(CAR(code));
-           }
-       }
-
-       if (!all_symbols)
-           break;
-    }
-
-    /* Variable is still bound */
-    for (code = result_form; CONSP(code); code = CDR(code))
-       EVAL(CAR(code));
-
-    lisp__data.env.head = lisp__data.env.length = head;
-
-    return (NIL);
-}
-
-static LispObj *
-LispDoSymbols(LispBuiltin *builtin, int only_externs, int all_symbols)
-{
-    int did_jump, *pdid_jump = &did_jump;
-    LispObj *result, **presult = &result;
-    LispBlock *block;
-
-    *presult = NIL;
-    *pdid_jump = 1;
-    block = LispBeginBlock(NIL, LispBlockTag);
-    if (setjmp(block->jmp) == 0) {
-       *presult = LispReallyDoSymbols(builtin, only_externs, all_symbols);
-       *pdid_jump = 0;
-    }
-    LispEndBlock(block);
-    if (*pdid_jump)
-       *presult = lisp__data.block.block_ret;
-
-    return (*presult);
-}
-
-LispObj *
-LispFindSymbol(LispBuiltin *builtin, int intern)
-{
-    char *ptr;
-    LispAtom *atom;
-    LispObj *symbol;
-    LispPackage *pack;
-
-    LispObj *string, *package;
-
-    package = ARGUMENT(1);
-    string = ARGUMENT(0);
-
-    CHECK_STRING(string);
-    if (package != UNSPEC)
-       package = LispFindPackageOrDie(builtin, package);
-    else
-       package = PACKAGE;
-
-    /* If got here, package is a LispPackage_t */
-    pack = package->data.package.package;
-
-    /* Search symbol in specified package */
-    ptr = THESTR(string);
-
-    RETURN_COUNT = 1;
-
-    symbol = NULL;
-    /* Fix for current behaviour where NIL and T aren't symbols... */
-    if (STRLEN(string) == 3 && memcmp(ptr, "NIL", 3) == 0)
-       symbol = NIL;
-    else if (STRLEN(string) == 1 && ptr[0] == 'T')
-       symbol = T;
-    if (symbol) {
-       RETURN(0) = NIL;
-       return (symbol);
-    }
-
-    atom = (LispAtom *)hash_check(pack->atoms, ptr, strlen(ptr));
-    if (atom)
-       symbol = atom->object;
-
-    if (symbol == NULL || symbol->data.atom->package == NULL) {
-       RETURN(0) = NIL;
-       if (intern) {
-           /* symbol does not exist in the specified package, create a new
-            * internal symbol */
-
-           if (package == PACKAGE)
-               symbol = ATOM(ptr);
-           else {
-               LispPackage *savepack;
-               LispObj *savepackage;
-
-               /* Save package environment */
-               savepackage = PACKAGE;
-               savepack = lisp__data.pack;
-
-               /* Change package environment */
-               PACKAGE = package;
-               lisp__data.pack = package->data.package.package;
-
-               symbol = ATOM(ptr);
-
-               /* Restore package environment */
-               PACKAGE = savepackage;
-               lisp__data.pack = savepack;
-           }
-
-           symbol->data.atom->unreadable = !LispCheckAtomString(ptr);
-           /* If symbol being create in the keyword package, make it external */
-           if (package == lisp__data.keyword)
-               symbol->data.atom->ext = symbol->data.atom->constant = 1;
-       }
-       else
-           symbol = NIL;
-    }
-    else {
-       if (symbol->data.atom->package == package)
-           RETURN(0) = symbol->data.atom->ext ? Kexternal : Kinternal;
-       else
-           RETURN(0) = Kinherited;
-    }
-
-    return (symbol);
-}
-
-
-LispObj *
-Lisp_DoAllSymbols(LispBuiltin *builtin)
-/*
- do-all-symbols init &rest body
- */
-{
-    return (LispDoSymbols(builtin, 0, 1));
-}
-
-LispObj *
-Lisp_DoExternalSymbols(LispBuiltin *builtin)
-/*
- do-external-symbols init &rest body
- */
-{
-    return (LispDoSymbols(builtin, 1, 0));
-}
-
-LispObj *
-Lisp_DoSymbols(LispBuiltin *builtin)
-/*
- do-symbols init &rest body
- */
-{
-    return (LispDoSymbols(builtin, 0, 0));
-}
-
-LispObj *
-Lisp_FindAllSymbols(LispBuiltin *builtin)
-/*
- find-all-symbols string-or-symbol
- */
-{
-    GC_ENTER();
-    char *string = NULL;
-    LispAtom *atom;
-    LispPackage *pack;
-    LispObj *list, *package, *result;
-    int length = 0;
-
-    LispObj *string_or_symbol;
-
-    string_or_symbol = ARGUMENT(0);
-
-    if (STRINGP(string_or_symbol)) {
-       string = THESTR(string_or_symbol);
-       length = STRLEN(string_or_symbol);
-    }
-    else if (SYMBOLP(string_or_symbol)) {
-       string = ATOMID(string_or_symbol)->value;
-       length = ATOMID(string_or_symbol)->length;
-    }
-    else
-       LispDestroy("%s: %s is not a string or symbol",
-                   STRFUN(builtin), STROBJ(string_or_symbol));
-
-    result = NIL;
-
-    /* Traverse all packages, searching for symbols matching specified string */
-    for (list = PACK; CONSP(list); list = CDR(list)) {
-       package = CAR(list);
-       pack = package->data.package.package;
-
-       atom = (LispAtom *)hash_check(pack->atoms, string, length);
-       if (atom && LispDoSymbol(package, atom, 0, 1)) {
-           /* Return only one pointer to a matching symbol */
-
-           if (result == NIL) {
-               result = CONS(atom->object, NIL);
-               GC_PROTECT(result);
-           }
-           else {
-               /* Put symbols defined first in the
-                * beginning of the result list */
-               RPLACD(result, CONS(CAR(result), CDR(result)));
-               RPLACA(result, atom->object);
-           }
-       }
-    }
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_FindSymbol(LispBuiltin *builtin)
-/*
- find-symbol string &optional package
- */
-{
-    return (LispFindSymbol(builtin, 0));
-}
-
-LispObj *
-Lisp_FindPackage(LispBuiltin *builtin)
-/*
- find-package name
- */
-{
-    LispObj *name;
-
-    name = ARGUMENT(0);
-
-    return (LispFindPackage(name));
-}
-
-LispObj *
-Lisp_Export(LispBuiltin *builtin)
-/*
- export symbols &optional package
- */
-{
-    LispObj *list;
-
-    LispObj *symbols, *package;
-
-    package = ARGUMENT(1);
-    symbols = ARGUMENT(0);
-
-    /* If specified, make sure package is available */
-    if (package != UNSPEC)
-       package = LispFindPackageOrDie(builtin, package);
-    else
-       package = PACKAGE;
-
-    /* Export symbols */
-    if (CONSP(symbols)) {
-       for (list = symbols; CONSP(list); list = CDR(list))
-           LispDoExport(builtin, package, CAR(list), 1);
-    }
-    else
-       LispDoExport(builtin, package, symbols, 1);
-
-    return (T);
-}
-
-LispObj *
-Lisp_Import(LispBuiltin *builtin)
-/*
- import symbols &optional package
- */
-{
-    int restore_package;
-    LispPackage *savepack = NULL;
-    LispObj *list, *savepackage = NULL;
-
-    LispObj *symbols, *package;
-
-    package = ARGUMENT(1);
-    symbols = ARGUMENT(0);
-
-    /* If specified, make sure package is available */
-    if (package != UNSPEC)
-       package = LispFindPackageOrDie(builtin, package);
-    else
-       package = PACKAGE;
-
-    restore_package = package != PACKAGE;
-    if (restore_package) {
-       /* Save package environment */
-       savepackage = PACKAGE;
-       savepack = lisp__data.pack;
-
-       /* Change package environment */
-       PACKAGE = package;
-       lisp__data.pack = package->data.package.package;
-    }
-
-    /* Export symbols */
-    if (CONSP(symbols)) {
-       for (list = symbols; CONSP(list); list = CDR(list))
-           LispDoImport(builtin, CAR(list));
-    }
-    else
-       LispDoImport(builtin, symbols);
-
-    if (restore_package) {
-       /* Restore package environment */
-       PACKAGE = savepackage;
-       lisp__data.pack = savepack;
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_InPackage(LispBuiltin *builtin)
-/*
- in-package name
- */
-{
-    LispObj *package;
-
-    LispObj *name;
-
-    name = ARGUMENT(0);
-
-    package = LispFindPackageOrDie(builtin, name);
-
-    /* Update pointer to package symbol table */
-    lisp__data.pack = package->data.package.package;
-    PACKAGE = package;
-
-    return (package);
-}
-
-LispObj *
-Lisp_Intern(LispBuiltin *builtin)
-/*
- intern string &optional package
- */
-{
-    return (LispFindSymbol(builtin, 1));
-}
-
-LispObj *
-Lisp_ListAllPackages(LispBuiltin *builtin)
-/*
- list-all-packages
- */
-{
-    /*   Maybe this should be read-only or a copy of the package list.
-     *   But, if properly implemented, it should be possible to (rplaca)
-     * this variable from lisp code with no problems. Don't do it at home. */
-
-    return (PACK);
-}
-
-LispObj *
-Lisp_MakePackage(LispBuiltin *builtin)
-/*
- make-package package-name &key nicknames use
- */
-{
-    GC_ENTER();
-    LispObj *list, *package, *nicks, *cons, *savepackage;
-
-    LispObj *package_name, *nicknames, *use;
-
-    use = ARGUMENT(2);
-    nicknames = ARGUMENT(1);
-    package_name = ARGUMENT(0);
-
-    /* Check if package already exists */
-    package = LispFindPackage(package_name);
-    if (package != NIL)
-       /* FIXME: this should be a correctable error */
-       LispDestroy("%s: package %s already defined",
-                   STRFUN(builtin), STROBJ(package_name));
-
-    /* Error checks done, package_name is either a symbol or string */
-    if (!XSTRINGP(package_name))
-       package_name = STRING(ATOMID(package_name)->value);
-
-    GC_PROTECT(package_name);
-
-    /* Check nicknames */
-    nicks = cons = NIL;
-    for (list = nicknames; CONSP(list); list = CDR(list)) {
-       package = LispFindPackage(CAR(list));
-       if (package != NIL)
-           /* FIXME: this should be a correctable error */
-           LispDestroy("%s: nickname %s matches package %s",
-                       STRFUN(builtin), STROBJ(CAR(list)),
-                       THESTR(package->data.package.name));
-       /* Store all nicknames as strings */
-       package = CAR(list);
-       if (!XSTRINGP(package))
-           package = STRING(ATOMID(package)->value);
-       if (nicks == NIL) {
-           nicks = cons = CONS(package, NIL);
-           GC_PROTECT(nicks);
-       }
-       else {
-           RPLACD(cons, CONS(package, NIL));
-           cons = CDR(cons);
-       }
-    }
-
-    /* Check use list */
-    for (list = use; CONSP(list); list = CDR(list))
-       (void)LispFindPackageOrDie(builtin, CAR(list));
-
-    /* No errors, create new package */
-    package = LispNewPackage(package_name, nicks);
-
-    /* Update list of packages */
-    PACK = CONS(package, PACK);
-
-    /* No need for gc protection anymore */
-    GC_LEAVE();
-
-    /* Import symbols from use list */
-    savepackage = PACKAGE;
-
-    /* Update pointer to package symbol table */
-    lisp__data.pack = package->data.package.package;
-    PACKAGE = package;
-
-    if (use != UNSPEC) {
-       for (list = use; CONSP(list); list = CDR(list))
-           LispUsePackage(LispFindPackage(CAR(list)));
-    }
-    else
-       LispUsePackage(lisp__data.lisp);
-
-    /* Restore pointer to package symbol table */
-    lisp__data.pack = savepackage->data.package.package;
-    PACKAGE = savepackage;
-
-    return (package);
-}
-
-LispObj *
-Lisp_Packagep(LispBuiltin *builtin)
-/*
- packagep object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (PACKAGEP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_PackageName(LispBuiltin *builtin)
-/*
- package-name package
- */
-{
-    LispObj *package;
-
-    package = ARGUMENT(0);
-
-    package = LispFindPackageOrDie(builtin, package);
-
-    return (package->data.package.name);
-}
-
-LispObj *
-Lisp_PackageNicknames(LispBuiltin *builtin)
-/*
- package-nicknames package
- */
-{
-    LispObj *package;
-
-    package = ARGUMENT(0);
-
-    package = LispFindPackageOrDie(builtin, package);
-
-    return (package->data.package.nicknames);
-}
-
-LispObj *
-Lisp_PackageUseList(LispBuiltin *builtin)
-/*
- package-use-list package
- */
-{
-    /*  If the variable returned by this function is expected to be changeable,
-     * need to change the layout of the LispPackage structure. */
-
-    LispPackage *pack;
-    LispObj *package, *use, *cons;
-
-    package = ARGUMENT(0);
-
-    package = LispFindPackageOrDie(builtin, package);
-
-    use = cons = NIL;
-    pack = package->data.package.package;
-
-    if (pack->use.length) {
-       GC_ENTER();
-       int i = pack->use.length - 1;
-
-       use = cons = CONS(pack->use.pairs[i], NIL);
-       GC_PROTECT(use);
-       for (--i; i >= 0; i--) {
-           RPLACD(cons, CONS(pack->use.pairs[i], NIL));
-           cons = CDR(cons);
-       }
-       GC_LEAVE();
-    }
-
-    return (use);
-}
-
-LispObj *
-Lisp_PackageUsedByList(LispBuiltin *builtin)
-/*
- package-used-by-list package
- */
-{
-    GC_ENTER();
-    int i;
-    LispPackage *pack;
-    LispObj *package, *other, *used, *cons, *list;
-
-    package = ARGUMENT(0);
-
-    package = LispFindPackageOrDie(builtin, package);
-
-    used = cons = NIL;
-
-    for (list = PACK; CONSP(list); list = CDR(list)) {
-       other = CAR(list);
-       if (package == other)
-           /* Surely package uses itself */
-           continue;
-
-       pack = other->data.package.package;
-
-       for (i = 0; i < pack->use.length; i++) {
-           if (pack->use.pairs[i] == package) {
-               if (used == NIL) {
-                   used = cons = CONS(other, NIL);
-                   GC_PROTECT(used);
-               }
-               else {
-                   RPLACD(cons, CONS(other, NIL));
-                   cons = CDR(cons);
-               }
-           }
-       }
-    }
-
-    GC_LEAVE();
-
-    return (used);
-}
-
-LispObj *
-Lisp_Unexport(LispBuiltin *builtin)
-/*
- unexport symbols &optional package
- */
-{
-    LispObj *list;
-
-    LispObj *symbols, *package;
-
-    package = ARGUMENT(1);
-    symbols = ARGUMENT(0);
-
-    /* If specified, make sure package is available */
-    if (package != UNSPEC)
-       package = LispFindPackageOrDie(builtin, package);
-    else
-       package = PACKAGE;
-
-    /* Export symbols */
-    if (CONSP(symbols)) {
-       for (list = symbols; CONSP(list); list = CDR(list))
-           LispDoExport(builtin, package, CAR(list), 0);
-    }
-    else
-       LispDoExport(builtin, package, symbols, 0);
-
-    return (T);
-}
diff --git a/xedit/lisp/package.h b/xedit/lisp/package.h
deleted file mode 100644 (file)
index f6940c8..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/package.h,v 1.7tsi Exp $ */
-
-#ifndef Lisp_package_h
-#define Lisp_package_h
-
-#include "lisp/internal.h"
-
-void LispPackageInit(void);
-LispObj *LispFindPackage(LispObj*);
-LispObj *LispFindPackageFromString(char*);
-/* returns 1 if string can safely be read back */
-int LispCheckAtomString(char*);
-
-LispObj *Lisp_DoAllSymbols(LispBuiltin*);
-LispObj *Lisp_DoExternalSymbols(LispBuiltin*);
-LispObj *Lisp_DoSymbols(LispBuiltin*);
-LispObj *Lisp_FindAllSymbols(LispBuiltin*);
-LispObj *Lisp_FindPackage(LispBuiltin*);
-LispObj *Lisp_FindSymbol(LispBuiltin*);
-LispObj *Lisp_Export(LispBuiltin*);
-LispObj *Lisp_Import(LispBuiltin*);
-LispObj *Lisp_InPackage(LispBuiltin*);
-LispObj *Lisp_Intern(LispBuiltin*);
-LispObj *Lisp_ListAllPackages(LispBuiltin*);
-LispObj *Lisp_MakePackage(LispBuiltin*);
-LispObj *Lisp_Packagep(LispBuiltin*);
-LispObj *Lisp_PackageName(LispBuiltin*);
-LispObj *Lisp_PackageNicknames(LispBuiltin*);
-LispObj *Lisp_PackageUseList(LispBuiltin*);
-LispObj *Lisp_PackageUsedByList(LispBuiltin*);
-LispObj *Lisp_Unexport(LispBuiltin*);
-
-#endif /* Lisp_package_h */
diff --git a/xedit/lisp/pathname.c b/xedit/lisp/pathname.c
deleted file mode 100644 (file)
index 5d991fe..0000000
+++ /dev/null
@@ -1,1096 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/pathname.c,v 1.17tsi Exp $ */
-
-#include <stdio.h>     /* including dirent.h first may cause problems */
-#include <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include "lisp/pathname.h"
-#include "lisp/private.h"
-
-#define NOREAD_SKIP    0
-#define NOREAD_ERROR   1
-
-/*
- * Initialization
- */
-LispObj *Oparse_namestring, *Kerror, *Kabsolute, *Krelative, *Kskip;
-
-/*
- * Implementation
- */
-void
-LispPathnameInit(void)
-{
-    Kerror             = KEYWORD("ERROR");
-    Oparse_namestring  = STATIC_ATOM("PARSE-NAMESTRING");
-    Kabsolute          = KEYWORD("ABSOLUTE");
-    Krelative          = KEYWORD("RELATIVE");
-}
-
-static int
-glob_match(char *cmp1, char *cmp2)
-/*
- * Note: this code was written from scratch, and may generate incorrect
- * results for very complex glob masks.
- */
-{
-    for (;;) {
-       while (*cmp1 && *cmp1 == *cmp2) {
-           ++cmp1;
-           ++cmp2;
-       }
-       if (*cmp2) {
-           if (*cmp1 == '*') {
-               while (*cmp1 == '*')
-                   ++cmp1;
-               if (*cmp1) {
-                   int count = 0, settmp = 1;
-                   char *tmp = cmp2, *sav2;
-
-                   while (*cmp1 && *cmp1 == '?') {
-                       ++cmp1;
-                       ++count;
-                   }
-
-                   /* need to recurse here to make sure
-                    * all cases are tested.
-                    */
-                   while (*cmp2 && *cmp2 != *cmp1)
-                       ++cmp2;
-                   if (!*cmp1 && cmp2 - tmp < count)
-                       return (0);
-                   sav2 = cmp2;
-
-                   /* if recursive calls fails, make sure all '?'
-                    * following '*' are processed */
-                   while (*sav2 && sav2 - tmp < count)
-                       ++sav2;
-
-                   for (; *cmp2;) {
-                       if (settmp) /* repeated letters: *?o? => boot, root */
-                           tmp = cmp2;
-                       else
-                           settmp = 1;
-                       while (*cmp2 && *cmp2 != *cmp1)
-                           ++cmp2;
-                       if (cmp2 - tmp < count) {
-                           if (*cmp2)
-                               ++cmp2;
-                           settmp = 0;
-                           continue;
-                       }
-                       if (*cmp2) {
-                           if (glob_match(cmp1, cmp2))
-                               return (1);
-                           ++cmp2;
-                       }
-                   }
-                   cmp2 = sav2;
-               }
-               else {
-                   while (*cmp2)
-                       ++cmp2;
-                   break;
-               }
-           }
-           else if (*cmp1 == '?') {
-               while (*cmp1 == '?' && *cmp2) {
-                   ++cmp1;
-                   ++cmp2;
-               }
-               continue;
-           }
-           else
-               break;
-       }
-       else {
-           while (*cmp1 == '*')
-               ++cmp1;
-           break;
-       }
-    }
-
-    return (*cmp1 == '\0' && *cmp2 == '\0');
-}
-
-/*
- * Since directory is a function to be extended by the implementation,
- * current extensions are:
- *     all             => list files and directories
- *                        it is an error to call
- *                        (directory "<pathname-spec>/" :all t)
- *                        if non nil, it is like the shell command
- *                        echo <pathname-spec>, but normally, not in the
- *                        same order, as the code does not sort the result.
- *             !=nil   => list files and directories
- * (default)   nil     => list only files, or only directories if
- *                        <pathname-spec> ends with PATH_SEP char.
- *     if-cannot-read  => if opendir fails on a directory
- *             :error  => generate an error
- * (default)   :skip   => skip search in this directory
- */
-LispObj *
-Lisp_Directory(LispBuiltin *builtin)
-/*
- directory pathname &key all if-cannot-read
- */
-{
-    GC_ENTER();
-    DIR *dir;
-    struct stat st;
-    struct dirent *ent;
-    int length, listdirs, i, ndirs, nmatches;
-    char name[PATH_MAX + 1], path[PATH_MAX + 2], directory[PATH_MAX + 2];
-    char *sep, *base, *ptr, **dirs, **matches,
-         dot[] = {'.', PATH_SEP, '\0'},
-         dotdot[] = {'.', '.', PATH_SEP, '\0'};
-    int cannot_read;
-
-    LispObj *pathname, *all, *if_cannot_read, *result, *cons, *object;
-
-    if_cannot_read = ARGUMENT(2);
-    all = ARGUMENT(1);
-    pathname = ARGUMENT(0);
-    result = NIL;
-
-    cons = NIL;
-
-    if (if_cannot_read != UNSPEC) {
-       if (!KEYWORDP(if_cannot_read) ||
-           (if_cannot_read != Kskip &&
-            if_cannot_read != Kerror))
-           LispDestroy("%s: bad :IF-CANNOT-READ %s",
-                       STRFUN(builtin), STROBJ(if_cannot_read));
-       if (if_cannot_read != Kskip)
-           cannot_read = NOREAD_SKIP;
-       else
-           cannot_read = NOREAD_ERROR;
-    }
-    else
-       cannot_read = NOREAD_SKIP;
-
-    if (PATHNAMEP(pathname))
-       pathname = CAR(pathname->data.pathname);
-    else if (STREAMP(pathname) && pathname->data.stream.type == LispStreamFile)
-       pathname = CAR(pathname->data.stream.pathname->data.pathname);
-    else if (!STRINGP(pathname))
-       LispDestroy("%s: %s is not a pathname",
-                   STRFUN(builtin), STROBJ(pathname));
-
-    strncpy(name, THESTR(pathname), sizeof(name) - 1);
-    name[sizeof(name) - 1] = '\0';
-    length = strlen(name);
-    if (length < STRLEN(pathname))
-       LispDestroy("%s: pathname too long %s",
-                   STRFUN(builtin), name);
-
-    if (length == 0) {
-       if (getcwd(path, sizeof(path) - 2) == NULL)
-           LispDestroy("%s: getcwd(): %s", STRFUN(builtin), strerror(errno));
-       length = strlen(path);
-       if (!length || path[length - 1] != PATH_SEP) {
-           path[length++] = PATH_SEP;
-           path[length] = '\0';
-       }
-       result = APPLY1(Oparse_namestring, LSTRING(path, length));
-       GC_LEAVE();
-
-       return (result);
-    }
-
-    if (name[length - 1] == PATH_SEP) {
-       listdirs = 1;
-       if (length > 1) {
-           --length;
-           name[length] = '\0';
-       }
-    }
-    else
-       listdirs = 0;
-
-    if (name[0] != PATH_SEP) {
-       if (getcwd(path, sizeof(path) - 2) == NULL)
-           LispDestroy("%s: getcwd(): %s", STRFUN(builtin), strerror(errno));
-       length = strlen(path);
-       if (!length || path[length - 1] != PATH_SEP) {
-           path[length++] = PATH_SEP;
-           path[length] = '\0';
-       }
-    }
-    else
-       path[0] = '\0';
-
-    result = NIL;
-
-    /* list intermediate directories */
-    matches = NULL;
-    nmatches = 0;
-    dirs = LispMalloc(sizeof(char*));
-    ndirs = 1;
-    if (snprintf(directory, sizeof(directory), "%s%s%c",
-                path, name, PATH_SEP) > PATH_MAX)
-       LispDestroy("%s: pathname too long %s", STRFUN(builtin), directory);
-
-    /* Remove ../ */
-    sep = directory;
-    for (sep = strstr(sep, dotdot); sep; sep = strstr(sep, dotdot)) {
-       if (sep <= directory + 1)
-           strcpy(directory, sep + 2);
-       else if (sep[-1] == PATH_SEP) {
-           for (base = sep - 2; base > directory; base--)
-               if (*base == PATH_SEP)
-                   break;
-           strcpy(base, sep + 2);
-           sep = base;
-       }
-       else
-           ++sep;
-    }
-
-    /* Remove "./" */
-    sep = directory;
-    for (sep = strstr(sep, dot); sep; sep = strstr(sep, dot)) {
-       if (sep == directory || sep[-1] == PATH_SEP)
-           strcpy(sep, sep + 2);
-       else
-           ++sep;
-    }
-
-    /* This will happen when there are too many '../'  in the path */
-    if (directory[1] == '\0') {
-       directory[1] = PATH_SEP;
-       directory[2] = '\0';
-    }
-
-    base = directory;
-    sep = strchr(base + 1, PATH_SEP);
-    dirs[0] = LispMalloc(2);
-    dirs[0][0] = PATH_SEP;
-    dirs[0][1] = '\0';
-
-    for (base = directory + 1, sep = strchr(base, PATH_SEP); ;
-        base = sep + 1, sep = strchr(base, PATH_SEP)) {
-       *sep = '\0';
-       if (sep[1] == '\0')
-           sep = NULL;
-       length = strlen(base);
-       if (length == 0) {
-           if (sep)
-               *sep = PATH_SEP;
-           else
-               break;
-           continue;
-       }
-
-       for (i = 0; i < ndirs; i++) {
-           length = strlen(dirs[i]);
-           if (length > 1)
-               dirs[i][length - 1] = '\0';             /* remove trailing / */
-           if ((dir = opendir(dirs[i])) != NULL) {
-               (void)readdir(dir);     /* "." */
-               (void)readdir(dir);     /* ".." */
-               if (length > 1)
-                   dirs[i][length - 1] = PATH_SEP;     /* add trailing / again */
-
-               snprintf(path, sizeof(path), "%s", dirs[i]);
-               length = strlen(path);
-               ptr = path + length;
-
-               while ((ent = readdir(dir)) != NULL) {
-                   int isdir;
-                   unsigned d_namlen = strlen(ent->d_name);
-
-                   if (length + d_namlen + 2 < sizeof(path))
-                       strcpy(ptr, ent->d_name);
-                   else {
-                       closedir(dir);
-                       LispDestroy("%s: pathname too long %s",
-                                   STRFUN(builtin), dirs[i]);
-                   }
-
-                   if (stat(path, &st) != 0)
-                       isdir = 0;
-                   else
-                       isdir = S_ISDIR(st.st_mode);
-
-                   if (all != UNSPEC || ((isdir && (listdirs || sep)) ||
-                                         (!listdirs && !sep && !isdir))) {
-                       if (glob_match(base, ent->d_name)) {
-                           if (isdir) {
-                               length = strlen(ptr);
-                               ptr[length++] = PATH_SEP;
-                               ptr[length] = '\0';
-                           }
-                           /* XXX won't closedir on memory allocation failure! */
-                           matches = LispRealloc(matches, sizeof(char*) *
-                                                 nmatches + 1);
-                           matches[nmatches++] = LispStrdup(ptr);
-                       }
-                   }
-               }
-               closedir(dir);
-
-               if (nmatches == 0) {
-                   if (sep || !listdirs || *base) {
-                       LispFree(dirs[i]);
-                       if (i + 1 < ndirs)
-                           memmove(dirs + i, dirs + i + 1,
-                                   sizeof(char*) * (ndirs - (i + 1)));
-                       --ndirs;
-                       --i;                /* XXX playing with for loop */
-                   }
-               }
-               else {
-                   int j;
-
-                   length = strlen(dirs[i]);
-                   if (nmatches > 1) {
-                       dirs = LispRealloc(dirs, sizeof(char*) *
-                                          (ndirs + nmatches));
-                       if (i + 1 < ndirs)
-                           memmove(dirs + i + nmatches, dirs + i + 1,
-                                   sizeof(char*) * (ndirs - (i + 1)));
-                   }
-                   for (j = 1; j < nmatches; j++) {
-                       dirs[i + j] = LispMalloc(length +
-                                                strlen(matches[j]) + 1);
-                       sprintf(dirs[i + j], "%s%s", dirs[i], matches[j]);
-                   }
-                   dirs[i] = LispRealloc(dirs[i],
-                                         length + strlen(matches[0]) + 1);
-                   strcpy(dirs[i] + length, matches[0]);
-                   i += nmatches - 1;  /* XXX playing with for loop */
-                   ndirs += nmatches - 1;
-
-                   for (j = 0; j < nmatches; j++)
-                       LispFree(matches[j]);
-                   LispFree(matches);
-                   matches = NULL;
-                   nmatches = 0;
-               }
-           }
-           else {
-               if (cannot_read == NOREAD_ERROR)
-                   LispDestroy("%s: opendir(%s): %s",
-                               STRFUN(builtin), dirs[i], strerror(errno));
-               else {
-                   LispFree(dirs[i]);
-                   if (i + 1 < ndirs)
-                       memmove(dirs + i, dirs + i + 1,
-                               sizeof(char*) * (ndirs - (i + 1)));
-                   --ndirs;
-                   --i;            /* XXX playing with for loop */
-               }
-           }
-       }
-       if (sep)
-           *sep = PATH_SEP;
-       else
-           break;
-    }
-
-    for (i = 0; i < ndirs; i++) {
-       object = APPLY1(Oparse_namestring, STRING2(dirs[i]));
-       if (result == NIL) {
-           result = cons = CONS(object, NIL);
-           GC_PROTECT(result);
-       }
-       else {
-           RPLACD(cons, CONS(object, NIL));
-           cons = CDR(cons);
-       }
-    }
-    LispFree(dirs);
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_ParseNamestring(LispBuiltin *builtin)
-/*
- parse-namestring object &optional host defaults &key start end junk-allowed
- */
-{
-    GC_ENTER();
-    LispObj *result;
-
-    LispObj *object, *host, *defaults, *ostart, *oend, *junk_allowed;
-
-    junk_allowed = ARGUMENT(5);
-    oend = ARGUMENT(4);
-    ostart = ARGUMENT(3);
-    defaults = ARGUMENT(2);
-    host = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (host == UNSPEC)
-       host = NIL;
-    if (defaults == UNSPEC)
-       defaults = NIL;
-
-    RETURN_COUNT = 1;
-    if (STREAMP(object)) {
-       if (object->data.stream.type == LispStreamFile)
-           object = object->data.stream.pathname;
-       /* else just check for JUNK-ALLOWED... */
-    }
-    if (PATHNAMEP(object)) {
-       RETURN(0) = FIXNUM(0);
-       return (object);
-    }
-
-    if (host != NIL) {
-       CHECK_STRING(host);
-    }
-    if (defaults != NIL) {
-       if (!PATHNAMEP(defaults)) {
-           defaults = APPLY1(Oparse_namestring, defaults);
-           GC_PROTECT(defaults);
-       }
-    }
-
-    result = NIL;
-    if (STRINGP(object)) {
-       LispObj *cons, *cdr;
-       char *name = THESTR(object), *ptr, *str, data[PATH_MAX + 1],
-             string[PATH_MAX + 1], *namestr, *typestr, *send;
-       long start, end, length, alength, namelen, typelen;
-
-       LispCheckSequenceStartEnd(builtin, object, ostart, oend,
-                                 &start, &end, &length);
-       alength = end - start;
-
-       if (alength > sizeof(data) - 1)
-           LispDestroy("%s: string %s too large",
-                       STRFUN(builtin), STROBJ(object));
-       memcpy(data, name + start, alength);
-#ifndef KEEP_EXTRA_PATH_SEP
-       ptr = data;
-       send = ptr + alength;
-       while (ptr < send) {
-           if (*ptr++ == PATH_SEP) {
-               for (str = ptr; str < send && *str == PATH_SEP; str++)
-                   ;
-               if (str - ptr) {
-                   memmove(ptr, str, alength - (str - data));
-                   alength -= str - ptr;
-                   send -= str - ptr;
-               }
-           }
-       }
-#endif
-       data[alength] = '\0';
-       memcpy(string, data, alength + 1);
-
-       if (PATHNAMEP(defaults))
-           defaults = defaults->data.pathname;
-
-       /* string name */
-       result = cons = CONS(NIL, NIL);
-       GC_PROTECT(result);
-
-       /* host */
-       if (defaults != NIL)
-           defaults = CDR(defaults);
-       cdr = defaults == NIL ? NIL : CAR(defaults);
-       RPLACD(cons, CONS(cdr, NIL));
-       cons = CDR(cons);
-
-       /* device */
-       if (defaults != NIL)
-           defaults = CDR(defaults);
-       cdr = defaults == NIL ? NIL : CAR(defaults);
-       RPLACD(cons, CONS(cdr, NIL));
-       cons = CDR(cons);
-
-       /* directory */
-       if (defaults != NIL)
-           defaults = CDR(defaults);
-       if (*data == PATH_SEP)
-           cdr = CONS(Kabsolute, NIL);
-       else
-           cdr = CONS(Krelative, NIL);
-       RPLACD(cons, CONS(cdr, NIL));
-       cons = CDR(cons);
-       /* directory components */
-       ptr = data;
-       send = data + alength;
-       if (*ptr == PATH_SEP)
-           ++ptr;
-       for (str = ptr; str < send; str++) {
-           if (*str == PATH_SEP)
-               break;
-       }
-       while (str < send) {
-           *str++ = '\0';
-           if (str - ptr > NAME_MAX)
-               LispDestroy("%s: directory name too long %s",
-                           STRFUN(builtin), ptr);
-           RPLACD(cdr, CONS(LSTRING(ptr, str - ptr - 1), NIL));
-           cdr = CDR(cdr);
-           for (ptr = str; str < send; str++) {
-               if (*str == PATH_SEP)
-                   break;
-           }
-       }
-       if (str - ptr > NAME_MAX)
-           LispDestroy("%s: file name too long %s", STRFUN(builtin), ptr);
-       if (CAAR(cons) == Krelative &&
-           defaults != NIL && CAAR(defaults) == Kabsolute) {
-           /* defaults specify directory and pathname doesn't */
-           char *tstring;
-           long dlength, tlength;
-           LispObj *dir = CDAR(defaults);
-
-           for (dlength = 1; CONSP(dir); dir = CDR(dir))
-               dlength += STRLEN(CAR(dir)) + 1;
-           if (alength + dlength < PATH_MAX) {
-               memmove(data + dlength, data, alength + 1);
-               memmove(string + dlength, string, alength + 1);
-               alength += dlength;
-               ptr += dlength;
-               send += dlength;
-               CAAR(cons) = Kabsolute;
-               for (dir = CDAR(defaults), cdr = CAR(cons);
-                    CONSP(dir);
-                    dir = CDR(dir)) {
-                   RPLACD(cdr, CONS(CAR(dir), CDR(cdr)));
-                   cdr = CDR(cdr);
-               }
-               dir = CDAR(defaults);
-               data[0] = string[0] = PATH_SEP;
-               for (dlength = 1; CONSP(dir); dir = CDR(dir)) {
-                   tstring = THESTR(CAR(dir));
-                   tlength = STRLEN(CAR(dir));
-                   memcpy(data + dlength, tstring, tlength);
-                   memcpy(string + dlength, tstring, tlength);
-                   dlength += tlength;
-                   data[dlength] = string[dlength] = PATH_SEP;
-                   ++dlength;
-               }
-           }
-       }
-
-       /* name */
-       if (defaults != NIL)
-           defaults = CDR(defaults);
-       cdr = defaults == NIL ? NIL : CAR(defaults);
-       for (typelen = 0, str = ptr; str < send; str++) {
-           if (*str == PATH_TYPESEP) {
-               typelen = 1;
-               break;
-           }
-       }
-       if (*ptr)
-           cdr = LSTRING(ptr, str - ptr);
-       if (STRINGP(cdr)) {
-           namestr = THESTR(cdr);
-           namelen = STRLEN(cdr);
-       }
-       else {
-           namestr = "";
-           namelen = 0;
-       }
-       RPLACD(cons, CONS(cdr, NIL));
-       cons = CDR(cons);
-
-       /* type */
-       if (defaults != NIL)
-           defaults = CDR(defaults);
-       cdr = defaults == NIL ? NIL : CAR(defaults);
-       ptr = str + typelen;
-       if (*ptr)
-           cdr = LSTRING(ptr, send - ptr);
-       if (STRINGP(cdr)) {
-           typestr = THESTR(cdr);
-           typelen = STRLEN(cdr);
-       }
-       else {
-           typestr = "";
-           typelen = 0;
-       }
-       RPLACD(cons, CONS(cdr, NIL));
-       cons = CDR(cons);
-
-       /* version */
-       if (defaults != NIL)
-           defaults = CDR(defaults);
-       cdr = defaults == NIL ? NIL : CAR(defaults);
-       RPLACD(cons, CONS(cdr, NIL));
-
-       /* string representation, must be done here to use defaults */
-       for (ptr = string + alength; ptr >= string; ptr--) {
-           if (*ptr == PATH_SEP)
-               break;
-       }
-       if (ptr >= string)
-           ++ptr;
-       else
-           ptr = string;
-       *ptr = '\0';
-
-       length = ptr - string;
-
-       alength = namelen;
-       if (alength) {
-           if (length + alength + 2 > sizeof(string))
-               alength = sizeof(string) - length - 2;
-           memcpy(string + length, namestr, alength);
-           length += alength;
-       }
-
-       alength = typelen;
-       if (alength) {
-           if (length + 2 < sizeof(string))
-               string[length++] = PATH_TYPESEP;
-           if (length + alength + 2 > sizeof(string))
-               alength = sizeof(string) - length - 2;
-           memcpy(string + length, typestr, alength);
-           length += alength;
-       }
-       string[length] = '\0';
-
-       RPLACA(result,  LSTRING(string, length));
-       RETURN(0) = FIXNUM(end);
-
-       result = PATHNAME(result);
-    }
-    else if (junk_allowed == UNSPEC || junk_allowed == NIL)
-       LispDestroy("%s: bad argument %s", STRFUN(builtin), STROBJ(object));
-    else
-       RETURN(0) = NIL;
-
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_MakePathname(LispBuiltin *builtin)
-/*
- make-pathname &key host device directory name type version defaults
- */
-{
-    GC_ENTER();
-    int length, alength;
-    char *string, pathname[PATH_MAX + 1];
-    LispObj *result, *cdr, *cons;
-
-    LispObj *host, *device, *directory, *name, *type, *version, *defaults;
-
-    defaults = ARGUMENT(6);
-    version = ARGUMENT(5);
-    type = ARGUMENT(4);
-    name = ARGUMENT(3);
-    directory = ARGUMENT(2);
-    device = ARGUMENT(1);
-    host = ARGUMENT(0);
-
-    if (host != UNSPEC) {
-       CHECK_STRING(host);
-    }
-    if (device != UNSPEC) {
-       CHECK_STRING(device);
-    }
-
-    if (directory != UNSPEC) {
-       LispObj *dir;
-
-       CHECK_CONS(directory);
-       dir = CAR(directory);
-       CHECK_KEYWORD(dir);
-       if (dir != Kabsolute && dir != Krelative)
-           LispDestroy("%s: directory type %s unknown",
-                       STRFUN(builtin), STROBJ(dir));
-    }
-
-    if (name != UNSPEC) {
-       CHECK_STRING(name);
-    }
-    if (type != UNSPEC) {
-       CHECK_STRING(type);
-    }
-
-    if (version != UNSPEC && version != NIL) {
-       switch (OBJECT_TYPE(version)) {
-           case LispFixnum_t:
-               if (FIXNUM_VALUE(version) >= 0)
-                   goto version_ok;
-           case LispInteger_t:
-               if (INT_VALUE(version) >= 0)
-                   goto version_ok;
-               break;
-           case LispDFloat_t:
-               if (DFLOAT_VALUE(version) >= 0.0)
-                   goto version_ok;
-               break;
-           default:
-               break;
-       }
-       LispDestroy("%s: %s is not a positive real number",
-                   STRFUN(builtin), STROBJ(version));
-    }
-version_ok:
-
-    if (defaults != UNSPEC && !PATHNAMEP(defaults) &&
-       (host == UNSPEC || device == UNSPEC || directory == UNSPEC ||
-        name == UNSPEC || type == UNSPEC || version == UNSPEC)) {
-       defaults = APPLY1(Oparse_namestring, defaults);
-       GC_PROTECT(defaults);
-    }
-
-    if (defaults != UNSPEC) {
-       defaults = defaults->data.pathname;
-       defaults = CDR(defaults);       /* host */
-       if (host == UNSPEC)
-           host = CAR(defaults);
-       defaults = CDR(defaults);       /* device */
-       if (device == UNSPEC)
-           device = CAR(defaults);
-       defaults = CDR(defaults);       /* directory */
-       if (directory == UNSPEC)
-           directory = CAR(defaults);
-       defaults = CDR(defaults);       /* name */
-       if (name == UNSPEC)
-           name = CAR(defaults);
-       defaults = CDR(defaults);       /* type */
-       if (type == UNSPEC)
-           type = CAR(defaults);
-       defaults = CDR(defaults);       /* version */
-       if (version == UNSPEC)
-           version = CAR(defaults);
-    }
-
-    /* string representation */
-    length = 0;
-    if (CONSP(directory)) {
-       if (CAR(directory) == Kabsolute)
-           pathname[length++] = PATH_SEP;
-
-       for (cdr = CDR(directory); CONSP(cdr); cdr = CDR(cdr)) {
-           CHECK_STRING(CAR(cdr));
-           string = THESTR(CAR(cdr));
-           alength = STRLEN(CAR(cdr));
-           if (alength > NAME_MAX)
-               LispDestroy("%s: directory name too long %s",
-                           STRFUN(builtin), string);
-           if (length + alength + 2 > sizeof(pathname))
-               alength = sizeof(pathname) - length - 2;
-           memcpy(pathname + length, string, alength);
-           length += alength;
-           pathname[length++] = PATH_SEP;
-       }
-    }
-    if (STRINGP(name)) {
-       int xlength = 0;
-
-       if (STRINGP(type))
-           xlength = STRLEN(type) + 1;
-
-       string = THESTR(name);
-       alength = STRLEN(name);
-       if (alength + xlength > NAME_MAX)
-           LispDestroy("%s: file name too long %s",
-                       STRFUN(builtin), string);
-       if (length + alength + 2 > sizeof(pathname))
-           alength = sizeof(pathname) - length - 2;
-       memcpy(pathname + length, string, alength);
-       length += alength;
-    }
-    if (STRINGP(type)) {
-       if (length + 2 < sizeof(pathname))
-           pathname[length++] = PATH_TYPESEP;
-       string = THESTR(type);
-       alength = STRLEN(type);
-       if (length + alength + 2 > sizeof(pathname))
-           alength = sizeof(pathname) - length - 2;
-       memcpy(pathname + length, string, alength);
-       length += alength;
-    }
-    pathname[length] = '\0';
-    result = cons = CONS(LSTRING(pathname, length), NIL);
-    GC_PROTECT(result);
-
-    /* host */
-    RPLACD(cons, CONS(host == UNSPEC ? NIL : host, NIL));
-    cons = CDR(cons);
-
-    /* device */
-    RPLACD(cons, CONS(device == UNSPEC ? NIL : device, NIL));
-    cons = CDR(cons);
-
-    /* directory */
-    if (directory == UNSPEC)
-       cdr = CONS(Krelative, NIL);
-    else
-       cdr = directory;
-    RPLACD(cons, CONS(cdr, NIL));
-    cons = CDR(cons);
-
-    /* name */
-    RPLACD(cons, CONS(name == UNSPEC ? NIL : name, NIL));
-    cons = CDR(cons);
-
-    /* type */
-    RPLACD(cons, CONS(type == UNSPEC ? NIL : type, NIL));
-    cons = CDR(cons);
-
-    /* version */
-    RPLACD(cons, CONS(version == UNSPEC ? NIL : version, NIL));
-
-    GC_LEAVE();
-
-    return (PATHNAME(result));
-}
-
-LispObj *
-Lisp_PathnameHost(LispBuiltin *builtin)
-/*
- pathname-host pathname
- */
-{
-    return (LispPathnameField(PATH_HOST, 0));
-}
-
-LispObj *
-Lisp_PathnameDevice(LispBuiltin *builtin)
-/*
- pathname-device pathname
- */
-{
-    return (LispPathnameField(PATH_DEVICE, 0));
-}
-
-LispObj *
-Lisp_PathnameDirectory(LispBuiltin *builtin)
-/*
- pathname-device pathname
- */
-{
-    return (LispPathnameField(PATH_DIRECTORY, 0));
-}
-
-LispObj *
-Lisp_PathnameName(LispBuiltin *builtin)
-/*
- pathname-name pathname
- */
-{
-    return (LispPathnameField(PATH_NAME, 0));
-}
-
-LispObj *
-Lisp_PathnameType(LispBuiltin *builtin)
-/*
- pathname-type pathname
- */
-{
-    return (LispPathnameField(PATH_TYPE, 0));
-}
-
-LispObj *
-Lisp_PathnameVersion(LispBuiltin *builtin)
-/*
- pathname-version pathname
- */
-{
-    return (LispPathnameField(PATH_VERSION, 0));
-}
-
-LispObj *
-Lisp_FileNamestring(LispBuiltin *builtin)
-/*
- file-namestring pathname
- */
-{
-    return (LispPathnameField(PATH_NAME, 1));
-}
-
-LispObj *
-Lisp_DirectoryNamestring(LispBuiltin *builtin)
-/*
- directory-namestring pathname
- */
-{
-    return (LispPathnameField(PATH_DIRECTORY, 1));
-}
-
-LispObj *
-Lisp_EnoughNamestring(LispBuiltin *builtin)
-/*
- enough-pathname pathname &optional defaults
- */
-{
-    LispObj *pathname, *defaults;
-
-    defaults = ARGUMENT(1);
-    pathname = ARGUMENT(0);
-
-    if (defaults != UNSPEC && defaults != NIL) {
-       char *ppathname, *pdefaults, *pp, *pd;
-
-       if (!STRINGP(pathname)) {
-           if (PATHNAMEP(pathname))
-               pathname  = CAR(pathname->data.pathname);
-           else if (STREAMP(pathname) &&
-                    pathname->data.stream.type == LispStreamFile)
-               pathname  = CAR(pathname->data.stream.pathname->data.pathname);
-           else
-               LispDestroy("%s: bad PATHNAME %s",
-                           STRFUN(builtin), STROBJ(pathname));
-       }
-
-       if (!STRINGP(defaults)) {
-           if (PATHNAMEP(defaults))
-               defaults  = CAR(defaults->data.pathname);
-           else if (STREAMP(defaults) &&
-                    defaults->data.stream.type == LispStreamFile)
-               defaults  = CAR(defaults->data.stream.pathname->data.pathname);
-           else
-               LispDestroy("%s: bad DEFAULTS %s",
-                           STRFUN(builtin), STROBJ(defaults));
-       }
-
-       ppathname = pp = THESTR(pathname);
-       pdefaults = pd = THESTR(defaults);
-       while (*ppathname && *pdefaults && *ppathname == *pdefaults) {
-           ppathname++;
-           pdefaults++;
-       }
-       if (*pdefaults == '\0' && pdefaults > pd)
-           --pdefaults;
-       if (*ppathname && *pdefaults && *pdefaults != PATH_SEP) {
-           --ppathname;
-           while (*ppathname != PATH_SEP && ppathname > pp)
-               --ppathname;
-           if (*ppathname == PATH_SEP)
-               ++ppathname;
-       }
-
-       return (STRING(ppathname));
-    }
-    else {
-       if (STRINGP(pathname))
-           return (pathname);
-       else if (PATHNAMEP(pathname))
-           return (CAR(pathname->data.pathname));
-       else if (STREAMP(pathname)) {
-           if (pathname->data.stream.type == LispStreamFile)
-               return (CAR(pathname->data.stream.pathname->data.pathname));
-       }
-    }
-    LispDestroy("%s: bad PATHNAME %s", STRFUN(builtin), STROBJ(pathname));
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Namestring(LispBuiltin *builtin)
-/*
- namestring pathname
- */
-{
-    return (LispPathnameField(PATH_STRING, 1));
-}
-
-LispObj *
-Lisp_HostNamestring(LispBuiltin *builtin)
-/*
- host-namestring pathname
- */
-{
-    return (LispPathnameField(PATH_HOST, 1));
-}
-
-LispObj *
-Lisp_Pathnamep(LispBuiltin *builtin)
-/*
- pathnamep object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (PATHNAMEP(object) ? T : NIL);
-}
-
-/* XXX only checks if host is a string and only checks the HOME enviroment
- * variable */
-LispObj *
-Lisp_UserHomedirPathname(LispBuiltin *builtin)
-/*
- user-homedir-pathname &optional host
- */
-{
-    GC_ENTER();
-    int length;
-    char *home = getenv("HOME"), data[PATH_MAX + 1];
-    LispObj *result;
-
-    LispObj *host;
-
-    host = ARGUMENT(0);
-
-    if (host != UNSPEC && !STRINGP(host))
-       LispDestroy("%s: bad hostname %s", STRFUN(builtin), STROBJ(host));
-
-    length = 0;
-    if (home) {
-       length = strlen(home);
-       strncpy(data, home, length);
-       if (length && home[length - 1] != PATH_SEP)
-           data[length++] = PATH_SEP;
-    }
-    data[length] = '\0';
-
-    result = LSTRING(data, length);
-    GC_PROTECT(result);
-    result = APPLY1(Oparse_namestring, result);
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_Truename(LispBuiltin *builtin)
-{
-    return (LispProbeFile(builtin, 0));
-}
-
-LispObj *
-Lisp_ProbeFile(LispBuiltin *builtin)
-{
-    return (LispProbeFile(builtin, 1));
-}
diff --git a/xedit/lisp/pathname.h b/xedit/lisp/pathname.h
deleted file mode 100644 (file)
index 5b075f5..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/pathname.h,v 1.4tsi Exp $ */
-
-#ifndef Lisp_pathname_h
-#define Lisp_pathname_h
-
-#include "lisp/internal.h"
-
-#define        PATH_SEP        '/'
-#define        PATH_TYPESEP    '.'
-
-#ifndef PATH_MAX
-#define PATH_MAX       4096
-#endif
-
-#ifndef NAME_MAX
-#define NAME_MAX       256
-#endif
-
-
-#define PATH_STRING    0
-#define PATH_HOST      1
-#define PATH_DEVICE    2
-#define PATH_DIRECTORY 3
-#define PATH_NAME      4
-#define PATH_TYPE      5
-#define PATH_VERSION   6
-
-void LispPathnameInit(void);
-
-LispObj *Lisp_Directory(LispBuiltin*);
-LispObj *Lisp_Namestring(LispBuiltin*);
-LispObj *Lisp_FileNamestring(LispBuiltin*);
-LispObj *Lisp_DirectoryNamestring(LispBuiltin*);
-LispObj *Lisp_EnoughNamestring(LispBuiltin*);
-LispObj *Lisp_HostNamestring(LispBuiltin*);
-LispObj *Lisp_MakePathname(LispBuiltin*);
-LispObj *Lisp_Pathnamep(LispBuiltin*);
-LispObj *Lisp_ParseNamestring(LispBuiltin*);
-LispObj *Lisp_PathnameHost(LispBuiltin*);
-LispObj *Lisp_PathnameDevice(LispBuiltin*);
-LispObj *Lisp_PathnameDirectory(LispBuiltin*);
-LispObj *Lisp_PathnameName(LispBuiltin*);
-LispObj *Lisp_PathnameType(LispBuiltin*);
-LispObj *Lisp_PathnameVersion(LispBuiltin*);
-LispObj *Lisp_Truename(LispBuiltin*);
-LispObj *Lisp_ProbeFile(LispBuiltin*);
-LispObj *Lisp_UserHomedirPathname(LispBuiltin*);
-
-#endif /* Lisp_pathname_h */
diff --git a/xedit/lisp/private.h b/xedit/lisp/private.h
deleted file mode 100644 (file)
index ef44ab2..0000000
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XdotOrg: xc/programs/xedit/lisp/private.h,v 1.2 2004/04/23 19:54:44 eich Exp $ */
-/* $XFree86: xc/programs/xedit/lisp/private.h,v 1.41 2003/05/27 22:27:04 tsi Exp $ */
-
-#ifndef Lisp_private_h
-#define Lisp_private_h
-
-#include <X11/Xos.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#if defined(X_POSIX_C_SOURCE)
-#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
-#include <setjmp.h>
-#undef _POSIX_C_SOURCE
-#else
-#include <setjmp.h>
-#endif
-#include <unistd.h>
-#include <sys/time.h>
-#include "lisp/internal.h"
-
-#include "lisp/core.h"
-#ifdef DEBUGGER
-#include "lisp/debugger.h"
-#endif
-#include "lisp/helper.h"
-#include "lisp/string.h"
-#include "lisp/struct.h"
-
-/*
- * Defines
- */
-#define        STRTBLSZ                23
-#define MULTIPLE_VALUES_LIMIT  127
-#define MAX_STACK_DEPTH                16384
-
-#define FEATURES                                                       \
-    (lisp__data.features->data.atom->a_object ?                                \
-       (LispObj *)lisp__data.features->data.atom->property->value :    \
-       NIL)
-#define PACK   lisp__data.packlist
-#define PACKAGE        lisp__data.package->data.atom->property->value
-#define MOD    lisp__data.modlist
-#define COD    lisp__data.codlist
-#define RUN    lisp__data.runlist
-#define RES    lisp__data.reslist
-#define DBG    lisp__data.dbglist
-#define BRK    lisp__data.brklist
-#define PRO    lisp__data.prolist
-
-#define SINPUT lisp__data.input
-#define SOUTPUT        lisp__data.output
-#define STANDARD_INPUT                                         \
-    lisp__data.standard_input->data.atom->property->value
-#define STANDARD_OUTPUT                                                \
-    lisp__data.standard_output->data.atom->property->value
-#define STANDARDSTREAM(file, desc, flags)                      \
-       LispNewStandardStream(file, desc, flags)
-
-/*
- * Types
- */
-typedef struct _LispStream LispStream;
-typedef struct _LispBlock LispBlock;
-typedef struct _LispOpaque LispOpaque;
-typedef struct _LispModule LispModule;
-typedef struct _LispProperty LispProperty;
-typedef struct _LispObjList LispObjList;
-typedef struct _LispStringHash LispStringHash;
-typedef struct _LispCharInfo LispCharInfo;
-
-
-/* Normal function/macro arguments */
-typedef struct _LispNormalArgs {
-    int num_symbols;
-    LispObj **symbols;         /* symbol names */
-} LispNormalArgs;
-
-/* &optional function/macro arguments */
-typedef struct _LispOptionalArgs {
-    int num_symbols;
-    LispObj **symbols;         /* symbol names */
-    LispObj **defaults;                /* default values, when unspecifed */
-    LispObj **sforms;          /* T if variable specified, NIL otherwise */
-} LispOptionalArgs;
-
-/* &key function/macro arguments */
-typedef struct _LispKeyArgs {
-    int num_symbols;
-    LispObj **symbols;         /* symbol names */
-    LispObj **defaults;                /* default values */
-    LispObj **sforms;          /* T if variable specified, NIL otherwise */
-    LispObj **keys;            /* key names, for special keywords */
-} LispKeyArgs;
-
-/* &aux function/macro arguments */
-typedef struct _LispAuxArgs {
-    int num_symbols;
-    LispObj **symbols;         /* symbol names */
-    LispObj **initials;                /* initial values */
-} LispAuxArgs;
-
-/* characters in the field description have the format:
- *     '.'     normals has a list of normal arguments
- *     'o'     optionals has a list of &optional arguments
- *     'k'     keys has a list of &key arguments
- *     'r'     rest is a valid pointer to a &rest symbol
- *     'a'     auxs has a list of &aux arguments
- */
-typedef struct _LispArgList {
-    LispNormalArgs normals;
-    LispOptionalArgs optionals;
-    LispKeyArgs keys;
-    LispObj *rest;
-    LispAuxArgs auxs;
-    int num_arguments;
-    char *description;
-} LispArgList;
-
-typedef enum _LispDocType_t {
-    LispDocVariable,
-    LispDocFunction,
-    LispDocStructure,
-    LispDocType,
-    LispDocSetf
-} LispDocType_t;
-
-struct _LispProperty {
-    /* may be used by multiple packages */
-    unsigned int refcount;
-
-    /* package where the property was created */
-    LispPackage *package;
-
-    /* value of variable attached to symbol */
-    LispObj *value;
-
-    union {
-       /* function attached to symbol */
-       LispObj *function;
-       /* builtin function attached to symbol*/
-       LispBuiltin *builtin;
-    } fun;
-    /* function/macro argument list description */
-    LispArgList *alist;
-
-    /* symbol properties list */
-    LispObj *properties;
-
-    /* setf method */
-    LispObj *setf;
-    /* setf argument list description */
-    LispArgList *salist;
-
-    /* structure information */
-    struct {
-       LispObj *definition;
-#define STRUCT_NAME            -3
-#define STRUCT_CHECK           -2
-#define STRUCT_CONSTRUCTOR     -1
-       int function;           /* if >= 0, it is a structure field index */
-    } structure;
-};
-
-struct _LispAtom {
-    hash_key *key;
-    struct _LispAtom *next;
-
-    /* hint: dynamically binded variable */
-    unsigned int dyn : 1;
-
-    /* Property has useful data in value field */
-    unsigned int a_object : 1;
-    /* Property has useful data in fun.function field */
-    unsigned int a_function : 1;
-    /* Property has useful data in fun.builtin field */
-    unsigned int a_builtin : 1;
-    /* Property has useful data in fun.function field */
-    unsigned int a_compiled : 1;
-    /* Property has useful data in properties field */
-    unsigned int a_property : 1;
-    /* Property has useful data in setf field */
-    unsigned int a_defsetf : 1;
-    /* Property has useful data in defstruct field */
-    unsigned int a_defstruct : 1;
-
-    /* Symbol is extern */
-    unsigned int ext : 1;
-
-    /* Symbol must be quoted with '|' to be allow reading back */
-    unsigned int unreadable : 1;
-
-    /* Symbol value may need special handling when changed */
-    unsigned int watch : 1;
-
-    /* Symbol value is constant, cannot be changed */
-    unsigned int constant : 1;
-
-    LispObj *object;           /* backpointer to object ATOM */
-    int offset;                        /* in the environment list */
-    LispObj *package;          /* package home of symbol */
-    LispObj *function;         /* symbol function */
-    LispObj *name;             /* symbol string */
-    LispProperty *property;
-
-    LispObj *documentation[5];
-};
-
-struct _LispObjList {
-    LispObj **pairs;           /* name0 ... nameN */
-    int length;                        /* number of objects */
-    int space;                 /* space allocated in field pairs */
-};
-
-struct _LispPackage {
-    LispObjList glb;           /* global symbols in package */
-    LispObjList use;           /* inherited packages */
-    hash_table *atoms;         /* atoms in this package */
-};
-
-struct _LispOpaque {
-    hash_key *desc;
-    LispOpaque *next;
-    int type;
-};
-
-typedef enum _LispBlockType {
-    LispBlockNone,     /* no block */
-    LispBlockTag,      /* may become "invisible" */
-    LispBlockCatch,    /* can be used to jump across function calls */
-    LispBlockClosure,  /* hides blocks of type LispBlockTag bellow it */
-    LispBlockProtect,  /* used by unwind-protect */
-    LispBlockBody      /* used by tagbody and go */
-} LispBlockType;
-
-struct _LispBlock {
-    LispBlockType type;
-    LispObj *tag;
-    jmp_buf jmp;
-    int stack;
-    int protect;
-    int block_level;
-#ifdef DEBUGGER
-    int debug_level;
-    int debug_step;
-#endif
-};
-
-struct _LispModule {
-    LispModule *next;
-    void *handle;
-    LispModuleData *data;
-};
-
-typedef struct _LispUngetInfo {
-    char buffer[16];
-    int offset;
-} LispUngetInfo;
-
-struct _LispMac {
-    /* stack for builtin function arguments */
-    struct {
-       LispObj **values;
-       int base;               /* base of arguments to function */
-       int length;
-       int space;
-    } stack;
-
-    /* environment */
-    struct {
-       LispObj **values;
-       Atom_id *names;
-       int lex;                /* until where variables are visible */
-       int head;               /* top of environment */
-       int length;             /* number of used pairs */
-       int space;              /* number of objects in pairs */
-    } env;
-
-    struct {
-       LispObj **values;
-       int count;
-    } returns;
-
-    struct {
-       LispObj **objects;
-       int length;
-       int space;
-    } protect;
-
-    LispObj *package;          /* package object */
-    LispPackage *pack;         /* pointer to lisp__data.package->data.package.package */
-
-    /* fast access to the KEYWORD package */
-    LispObj *keyword;
-    LispPackage *key;
-
-    /* the LISP package */
-    LispObj *lisp;
-
-    /* only used if the package was changed, but an error generated
-     * before returning to the toplevel */
-    LispObj *savepackage;
-    LispPackage *savepack;
-
-    struct {
-       int block_level;
-       int block_size;
-       LispObj *block_ret;
-       LispBlock **block;
-    } block;
-
-    sigjmp_buf jmp;
-
-    struct {
-       unsigned int expandbits : 3;    /* code doesn't look like reusing cells
-                                        * so try to have a larger number of
-                                        * free cells */
-       unsigned int immutablebits : 1; /* need to reset immutable bits */
-       unsigned int timebits : 1;      /* update gctime counter */
-       unsigned int count;
-       long gctime;
-       int average;                    /* of cells freed after gc calls */
-    } gc;
-
-    hash_table *strings;
-    hash_table *opqs;
-    int opaque;
-
-    LispObj *standard_input, *input, *input_list;
-    LispObj *standard_output, *output, *output_list;
-    LispObj *error_stream;
-    LispUngetInfo **unget;
-    int iunget, nunget;
-    int eof;
-
-    int interactive;
-    int errexit;
-
-    struct {
-       int index;
-       int level;
-       int space;
-       void **mem;
-    } mem;             /* memory from Lisp*Alloc, to be release in error */
-    LispModule *module;
-    LispObj *modules;
-    char *prompt;
-
-    LispObj *features;
-
-    LispObj *modlist;          /* module list */
-    LispObj *packlist;         /* list of packages */
-    LispObj *codlist;          /* current code */
-    LispObj *runlist[3];       /* +, ++, and +++ */
-    LispObj *reslist[3];       /* *, **, and *** */
-#ifdef DEBUGGER
-    LispObj *dbglist;          /* debug information */
-    LispObj *brklist;          /* breakpoints information */
-#endif
-    LispObj *prolist;          /* protect objects list */
-
-#ifdef SIGNALRETURNSINT
-    int (*sigint)(int);
-    int (*sigfpe)(int);
-#else
-    void (*sigint)(int);
-    void (*sigfpe)(int);
-#endif
-
-    int destroyed;             /* reached LispDestroy, used by unwind-protect */
-    int running;               /* there is somewhere to siglongjmp */
-
-    int ignore_errors;         /* inside a ignore-errors block */
-    LispObj *error_condition;  /* actually, a string */
-
-    int debugging;             /* debugger enabled? */
-#ifdef DEBUGGER
-    int debug_level;           /* almost always the same as lisp__data.level */
-    int debug_step;            /* control for stoping and printing output */
-    int debug_break;           /* next breakpoint number */
-    LispDebugState debug;
-#endif
-};
-
-struct _LispCharInfo {
-    char **names;
-};
-
-
-/*
- * Prototypes
- */
-void LispUseArgList(LispArgList*);
-void LispFreeArgList(LispArgList*);
-LispArgList *LispCheckArguments(LispFunType, LispObj*, char*, int);
-LispObj *LispListProtectedArguments(LispArgList*);
-
-LispObj *LispGetDoc(LispObj*);
-LispObj *LispGetVar(LispObj*);
-#ifdef DEBUGGER
-void *LispGetVarAddr(LispObj*);        /* used by debugger */
-#endif
-LispObj *LispAddVar(LispObj*, LispObj*);
-LispObj *LispSetVar(LispObj*, LispObj*);
-void LispUnsetVar(LispObj*);
-
-       /* only used at initialization time */
-LispObj *LispNewStandardStream(LispFile*, LispObj*, int);
-
-       /* create a new package */
-LispObj *LispNewPackage(LispObj*, LispObj*);
-       /* add package to use-list of current, and imports all extern symbols */
-void LispUsePackage(LispObj*);
-       /* make symbol extern in the current package */
-void LispExportSymbol(LispObj*);
-       /* imports symbol to current package */
-void LispImportSymbol(LispObj*);
-
-       /* always returns the same string */
-hash_key *LispGetAtomKey(char*, int);
-char *LispGetAtomString(char*, int);
-
-/* destructive fast reverse, note that don't receive a LispMac* argument */
-LispObj *LispReverse(LispObj *list);
-
-char *LispIntToOpaqueType(int);
-
-/* (print) */
-void LispPrint(LispObj*, LispObj*, int);
-
-LispBlock *LispBeginBlock(LispObj*, LispBlockType);
-#define BLOCKJUMP(block)                               \
-    lisp__data.stack.length = (block)->stack;          \
-    lisp__data.protect.length = (block)->protect;      \
-    longjmp((block)->jmp, 1)
-void LispEndBlock(LispBlock*);
-       /* if unwind-protect active, jump to cleanup code, else do nothing */
-void LispBlockUnwind(LispBlock*);
-
-void LispUpdateResults(LispObj*, LispObj*);
-void LispTopLevel(void);
-
-LispAtom *LispDoGetAtom(char *str, int);
-       /* get value from atom's property list */
-LispObj *LispGetAtomProperty(LispAtom*, LispObj*);
-       /* put value in atom's property list */
-LispObj *LispPutAtomProperty(LispAtom*, LispObj*, LispObj*);
-       /* remove value from atom's property list */
-LispObj *LispRemAtomProperty(LispAtom*, LispObj*);
-       /* replace atom's property list */
-LispObj *LispReplaceAtomPropertyList(LispAtom*, LispObj*);
-
-       /* returns function associated with symbol */
-LispObj *LispSymbolFunction(LispObj*);
-       /* returns symbol string name */
-LispObj *LispSymbolName(LispObj*);
-
-       /* define byte compiled function, or replace definition */
-void LispSetAtomCompiledProperty(LispAtom*, LispObj*);
-       /* remove byte compiled function property */
-void LispRemAtomCompiledProperty(LispAtom*);
-       /* define function, or replace function definition */
-void LispSetAtomFunctionProperty(LispAtom*, LispObj*, LispArgList*);
-       /* remove function property */
-void LispRemAtomFunctionProperty(LispAtom*);
-       /* define builtin, or replace builtin definition */
-void LispSetAtomBuiltinProperty(LispAtom*, LispBuiltin*, LispArgList*);
-       /* remove builtin property */
-void LispRemAtomBuiltinProperty(LispAtom*);
-       /* define setf macro, or replace current definition */
-void LispSetAtomSetfProperty(LispAtom*, LispObj*, LispArgList*);
-       /* remove setf macro */
-void LispRemAtomSetfProperty(LispAtom*);
-       /* create or change structure property */
-void LispSetAtomStructProperty(LispAtom*, LispObj*, int);
-       /* remove structure property */
-void LispRemAtomStructProperty(LispAtom*);
-
-void LispProclaimSpecial(LispObj*, LispObj*, LispObj*);
-void LispDefconstant(LispObj*, LispObj*, LispObj*);
-
-void LispAddDocumentation(LispObj*, LispObj*, LispDocType_t);
-void LispRemDocumentation(LispObj*, LispDocType_t);
-LispObj *LispGetDocumentation(LispObj*, LispDocType_t);
-
-/* increases storage for functions returning multiple values */
-void LispMoreReturns(void);
-
-/* increases storage for temporarily protected data */
-void LispMoreProtects(void);
-
-/* Initialization */
-extern int LispArgList_t;
-extern LispCharInfo LispChars[256];
-
-/* This function will return if the interpreter cannot be stopped */
-extern void LispSignal(int);
-
-void LispDisableInterrupts(void);
-void LispEnableInterrupts(void);
-#define DISABLE_INTERRUPTS()   LispDisableInterrupts()
-#define ENABLE_INTERRUPTS()    LispEnableInterrupts()
-
-/* Value returned by LispBegin, used everywhere in the code.
- * Only one interpreter instance allowed. */
-extern LispMac lisp__data;
-
-#endif /* Lisp_private_h */
diff --git a/xedit/lisp/re/README b/xedit/lisp/re/README
deleted file mode 100644 (file)
index aafad89..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-$XFree86: xc/programs/xedit/lisp/re/README,v 1.3 2002/09/23 01:25:41 paulo Exp $
-
-LAST UPDATED:  $Date$
-
-  This is a small regex library for fast matching tokens in text. It was built
-to be used by xedit and it's syntax highlight code. It is not compliant with
-IEEE Std 1003.2, but is expected to be used where very fast matching is
-required, and exotic patterns will not be used.
-
-  To understand what kind of patterns this library is expected to be used with,
-see the file <XRoot>xc/programs/xedit/lisp/modules/progmodes/c.lsp and some
-samples in the file tests.txt, with comments for patterns that will not work,
-or may give incorrect results.
-
-  The library is not built upon the standard regex library by Henry Spencer,
-but is completely written from scratch, but it's syntax is heavily based on
-that library, and the only reason for it to exist is that unfortunately
-the standard version does not fit the requirements needed by xedit.
-Anyways, I would like to thanks Henry for his regex library, it is a really
-very useful tool.
-
-  Small description of understood tokens:
-
-               M A T C H I N G
-------------------------------------------------------------------------
-.              Any character (won't match newline if compiled with RE_NEWLINE)
-\w             Any word letter (shortcut to [a-zA-Z0-9_]
-\W             Not a word letter (shortcut to [^a-zA-Z0-9_]
-\d             Decimal number
-\D             Not a decimal number
-\s             A space
-\S             Not a space
-\l             A lower case letter
-\u             An upper case letter
-\c             A control character, currently the range 1-32 (minus tab)
-\C             Not a control character
-\o             Octal number
-\O             Not an octal number
-\x             Hexadecimal number
-\X             Not an hexadecimal number
-\<             Beginning of a word (matches an empty string)
-\>             End of a word (matches an empty string)
-^              Beginning of a line (matches an empty string)
-$              End of a line (matches an empty string)
-[...]          Matches one of the characters inside the brackets
-               ranges are specified separating two characters with "-".
-               If the first character is "^", matches only if the
-               character is not in this range. To add a "]" make it
-               the first character, and to add a "-" make it the last.
-\1 to \9       Backreference, matches the text that was matched by a group,
-               that is, text that was matched by the pattern inside
-               "(" and ")".
-
-
-               O P E R A T O R S
-------------------------------------------------------------------------
-()             Any pattern inside works as a backreference, and is also
-               used to group patterns.
-|              Alternation, allows choosing different possibilities, like
-               character ranges, but allows patterns of different lengths.
-
-
-               R E P E T I T I O N
-------------------------------------------------------------------------
-<re>*          <re> may occur any number of times, including zero
-<re>+          <re> must occur at least once
-<re>?          <re> is optional
-<re>{<e>}      <re> must occur exactly <e> times
-<re>{<n>,}     <re> must occur at least <n> times
-<re>{,<m>}     <re> must not occur more than <m> times
-<re>{<n>,<m>}  <re> must occur at least <n> times, but no more than <m>
-
-
-  Note that "." is a special character, and when used with a repetition
-operator it changes completely its meaning. For example, ".*" matches
-anything up to the end of the input string (unless the pattern was compiled
-with RE_NEWLINE, in that case it will match anything, but a newline).
-
-
-  Limitations:
-
-o Only minimal matches supported. The engine has only one level "backtracking",
-  so, it also only does minimal matches to allow backreferences working
-  properly, and to avoid failing to match depending on the input.
-
-o Only one level "grouping", for example, with the pattern:
-       (a(b)c)
-   If "abc" is anywhere in the input, it will be in "\1", but there will
-  not exist a "\2" for "b".
-
-o Some "special repetitions" were not implemented, these are:
-       .{<e>}
-       .{<n>,}
-       .{,<m>}
-       .{<n>,<m>}
-
-o Some patterns will never match, for example:
-       \w*\d
-    Since "\w*" already includes all possible matches of "\d", "\d" will
-  only be tested when "\w*" failed. There are no plans to make such
-  patterns work.
-
-
-  Some of these limitations may be worked on future versions of the library,
-but this is not what the library is expected to do, and, adding support for
-correct handling of these would probably make the library slower, what is
-not the reason of it to exist in the first time.
-
-  If you need "true" regex than this library is not for you, but if all
-you need is support for very quickly finding simple patterns, than this
-library can be a very powerful tool, on some patterns it can run more
-than 200 times faster than "true" regex implementations! And this is
-the reason it was written.
-
-
-
-  Send comments and code to me (paulo@XFree86.Org) or to the XFree86
-mailing/patch lists.
-
---
-Paulo
diff --git a/xedit/lisp/re/re.c b/xedit/lisp/re/re.c
deleted file mode 100644 (file)
index fca7e28..0000000
+++ /dev/null
@@ -1,2649 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/re/re.c,v 1.8 2002/11/17 07:51:30 paulo Exp $ */
-
-#include <stdio.h>
-#include "rep.h"
-#define DEBUG
-/*
- * Types
- */
-
-/*  Information used when generating the final form of the compiled re.
- */
-struct _re_inf {
-    rec_alt *alt;
-    unsigned char *cod;
-    long len;
-    long spc;
-
-    /* Start offset of special repetition instruction */
-    long sr[MAX_DEPTH];
-
-    /* Jump offset of special repetition instruction */
-    long sj[MAX_DEPTH];
-
-    /* Just a flag, to know if this nesting is for a special repetition */
-    char sp[MAX_DEPTH];
-
-    int bas;                   /* Alternatives/repetitions depth */
-    int par;                   /* Open parenthesis counter */
-    int ref;                   /* Backreference counter */
-
-    rec_pat *apat;             /*  Alternatives duplicate patterns
-                                * if a special repetition is found,
-                                * this is done to somewhat simplify
-                                * the bytecode engine and still allow
-                                * some complex (and time consuming)
-                                * patterns. */
-
-    int flags;
-    int ecode;
-};
-
-/*  This structure is not associated with re_cod as it's data only matters
- * to the current match search.
- */
-struct _re_eng {
-    unsigned char *bas;                /* Base string pointer */
-    unsigned char *str;                /* String to search for pattern */
-    unsigned char *end;                /* Where to stop searching */
-    unsigned char *cod;                /* Pointer in the re_cod structure */
-    long off;                  /* Number of used entries in so/eo etc */
-
-    /* Match offset/nesting information */
-    long so[MAX_DEPTH];                /* (s)tart of (m)atch */
-    long eo[MAX_DEPTH];                /* (e)nd of (m)atch */
-    long sv[MAX_DEPTH];                /* (s)a(v)e match end offset */
-    long re[MAX_DEPTH];                /* (re)petition count */
-    long ss[MAX_DEPTH];                /* (s)ave (s)tart of match */
-    unsigned char *rcod[MAX_DEPTH];    /* restart position in regex code */
-    unsigned char *rstr[MAX_DEPTH];    /* restart position in string */
-
-    /* Group/backreference information */
-    long goff;
-    long gso[9];
-    long geo[9];
-};
-
-/*
- * Prototypes
- */
-static void reinit(void);
-static int rec_check(re_inf*, int);
-static int rec_code(re_inf*, ReCode);
-static int rec_byte(re_inf*, int);
-static int rec_byte_byte(re_inf*, int, int);
-static int rec_code_byte(re_inf*, ReCode, int);
-static int rec_length(re_inf*, int);
-static int rec_code_byte_byte(re_inf*, ReCode, int, int);
-static int rec_build_alt(re_inf*, rec_alt*);
-static int rec_build_pat(re_inf*, rec_pat*);
-static int rec_build_rng(re_inf*, rec_rng*);
-static int rec_build_grp(re_inf*, rec_grp*);
-static int rec_build_stl(re_inf*, rec_stl*);
-static int rec_build_rep(re_inf*, rec_rep*);
-static int rec_inc_spc(re_inf*);
-static int rec_dec_spc(re_inf*);
-static int rec_add_spc(re_inf*, int);
-static int rec_off_spc(re_inf*);
-static int rec_alt_spc(re_inf*, int);
-static int rec_rep_spc(re_inf*, int);
-#ifdef DEBUG
-static void redump(re_cod*);
-#endif
-
-/*
- * Initialization
- */
-unsigned char re__alnum[256];
-unsigned char re__odigit[256];
-unsigned char re__ddigit[256];
-unsigned char re__xdigit[256];
-unsigned char re__control[256];
-
-/*
- * Implementation
- */
-int
-recomp(re_cod *preg, const char *pattern, int flags)
-{
-    int i, ecode;
-    re_inf inf;
-
-    reinit();
-
-    preg->cod = NULL;
-    inf.alt = irec_comp(pattern,
-                       flags & RE_PEND ? preg->re_endp :
-                               pattern + strlen(pattern),
-                       flags, &ecode);
-    if (ecode != 0)
-       return (ecode);
-
-    inf.cod = NULL;
-    inf.len = inf.spc = 0;
-    inf.bas = 0;
-    inf.par = 0;
-    inf.ref = 0;
-    inf.apat = NULL;
-    inf.flags = flags;
-    inf.ecode = 0;
-    for (i = 0; i < MAX_DEPTH; i++)
-       inf.sp[i] = 0;
-
-    /* First byte is runtime modifier flags */
-    if (rec_byte(&inf, flags & (RE_NEWLINE | RE_NOSUB)) == 0 &&
-       rec_byte(&inf, 0xff) == 0 &&
-       rec_build_alt(&inf, inf.alt) == 0 &&
-       rec_rep_spc(&inf, 0) == 0 &&
-       rec_code(&inf, Re_Done) == 0) {
-       /*  Number of possible references, loops will not leave this
-        * value correct, but it is cheap to read it from the second
-        * byte, instead of adding several extra checks in the bytecode. */
-       if (inf.ref)
-           inf.cod[1] = inf.ref - 1;
-       preg->cod = inf.cod;
-       /*  Public structure member */
-       preg->re_nsub = inf.ref;
-    }
-
-    irec_free_alt(inf.alt);
-    if (inf.ecode)
-       free(inf.cod);
-#ifdef DEBUG
-    else if (flags & RE_DUMP)
-       redump(preg);
-#endif
-
-    return (inf.ecode);
-}
-
-int
-reexec(const re_cod *preg, const char *string,
-       int nmatch, re_mat pmat[], int flags)
-{
-    unsigned char *ptr, *str, newline, nosub;
-    int len, si, ci, bas, i, j, k, l, m;
-    re_eng eng;
-
-    if (preg == NULL || preg->cod == NULL || nmatch < 0 ||
-       ((flags & RE_STARTEND) &&
-        (pmat == NULL || pmat[0].rm_eo < pmat[0].rm_so)))
-       return (RE_INVARG);
-
-    eng.str = (unsigned char*)string;
-    if (flags & RE_STARTEND) {
-       eng.end = eng.str + pmat[0].rm_eo;
-       eng.str += pmat[0].rm_so;
-    }
-    else
-       eng.end = eng.str + strlen(string);
-    eng.bas = eng.str;
-    nosub = preg->cod[0] & RE_NOSUB;
-    newline = preg->cod[0] & RE_NEWLINE;
-    eng.cod = preg->cod + 2;
-
-    if (!nosub && preg->cod[1] != 0xff) {
-       for (i = 0; i <= preg->cod[1]; i++) {
-           eng.gso[i] = 0;
-           eng.geo[i] = -1;
-       }
-    }
-
-    /* Setup to search for start of match from the first character */
-    eng.so[0] = 0;
-    eng.eo[0] = eng.sv[0] = -1;
-    eng.rcod[0] = eng.cod;
-    eng.rstr[0] = eng.str + 1;
-    eng.off = 0;
-    eng.goff = -1;
-    for (ci = si = 1;;) {
-reset:
-       switch (*eng.cod) {
-           /****************************************************
-            * One byte codes                                   *
-            ****************************************************/
-           case Re_Any:
-               if (eng.str == eng.end || (newline && eng.str[0] == '\n'))
-                   goto fail;
-               goto match;
-           case Re_AnyEatAnyTimes:
-               if (newline) {
-                   for (ptr = eng.str; ptr < eng.end; ptr++) {
-                       if (*ptr == '\n')
-                           break;
-                   }
-                   si = ptr - eng.str;
-               }
-               else
-                   si = eng.end - eng.str;
-               goto match;
-           case Re_AnyEatMaybe:
-               si = eng.end > eng.str;
-               if (newline && si && eng.str[0] == '\n')
-                   si = 0;
-               goto match;
-           case Re_AnyEatAtLeast:
-               if (newline) {
-                   for (ptr = eng.str; ptr < eng.end; ptr++) {
-                       if (*ptr == '\n')
-                           break;
-                   }
-                   si = ptr - eng.str;
-               }
-               else
-                   si = eng.end - eng.str;
-               if (si == 0) {
-                   si = 1;
-                   goto fail;
-               }
-               goto match;
-           case Re_Odigit:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (re__odigit[eng.str[0]])
-                   goto match;
-               goto fail;
-           case Re_OdigitNot:
-               if (eng.str >= eng.end || re__odigit[eng.str[0]])
-                   goto fail;
-               goto match;
-           case Re_Digit:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (re__ddigit[eng.str[0]])
-                   goto match;
-               goto fail;
-           case Re_DigitNot:
-               if (eng.str >= eng.end || re__ddigit[eng.str[0]])
-                   goto fail;
-               goto match;
-           case Re_Xdigit:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (re__xdigit[eng.str[0]])
-                   goto match;
-               goto fail;
-           case Re_XdigitNot:
-               if (eng.str >= eng.end || re__xdigit[eng.str[0]])
-                   goto fail;
-               goto match;
-           case Re_Space:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] == ' ' || eng.str[0] == '\t')
-                   goto match;
-               goto fail;
-           case Re_SpaceNot:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] != ' ' && eng.str[0] != '\t')
-                   goto match;
-               goto fail;
-           case Re_Tab:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] == '\t')
-                   goto match;
-               goto fail;
-           case Re_Newline:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] == '\n')
-                   goto match;
-               goto fail;
-           case Re_Lower:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] >= 'a' && eng.str[0] <= 'z')
-                   goto match;
-               goto fail;
-           case Re_Upper:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] >= 'A' && eng.str[0] <= 'Z')
-                   goto match;
-               goto fail;
-           case Re_Alnum:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (re__alnum[eng.str[0]])
-                   goto match;
-               goto fail;
-           case Re_AlnumNot:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (re__alnum[eng.str[0]])
-                   goto fail;
-               goto match;
-           case Re_Control:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (re__control[eng.str[0]])
-                   goto match;
-               goto fail;
-           case Re_ControlNot:
-               if (eng.str >= eng.end || re__control[eng.str[0]])
-                   goto fail;
-               goto match;
-
-           /****************************************************
-            * One byte codes, match special emtpy strings      *
-            ****************************************************/
-           case Re_Bol:
-               if (eng.str == eng.bas) {
-                   if ((flags & RE_NOTBOL)) {
-                       /* String does not start at the beginning of a line */
-                       if (newline)
-                           goto fail;
-                       goto wont;
-                   }
-                   si = 0;
-                   goto match;
-               }
-               if (newline && eng.str[-1] == '\n') {
-                   si = 0;
-                   goto match;
-               }
-               goto fail;
-           case Re_Eol:
-               if (eng.str == eng.end) {
-                   if (flags & RE_NOTEOL)
-                       /* String does not finish at the end of a line */
-                       goto wont;
-                   si = 0;
-                   goto match;
-               }
-               if (newline && eng.str[0] == '\n') {
-                   si = 0;
-                   goto match;
-               }
-               goto fail;
-           case Re_Bow:
-               if (eng.str >= eng.end ||
-                   (eng.str > eng.bas &&
-                    (re__alnum[eng.str[-1]])))
-                   goto fail;
-               if (re__alnum[eng.str[0]]) {
-                   si = 0;
-                   goto match;
-               }
-               goto fail;
-           case Re_Eow:
-               if (eng.str == eng.bas ||
-                   (eng.str < eng.end &&
-                    re__alnum[eng.str[0]]))
-                   goto fail;
-               if (re__alnum[eng.str[-1]]) {
-                   si = 0;
-                   goto match;
-               }
-               goto fail;
-
-           /****************************************************
-            * One byte code, one byte argument                 *
-            ****************************************************/
-           case Re_Literal:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] == eng.cod[1]) {
-                   ci = 2;
-                   goto match;
-               }
-               goto fail;
-           case Re_LiteralNot:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] != eng.cod[1]) {
-                   ci = 2;
-                   goto match;
-               }
-               goto fail;
-           case Re_SearchLiteral:
-               for (str = eng.str; str < eng.end; str++) {
-                   if (*str == eng.cod[1]) {
-                       ci = 2;
-                       eng.str = str;
-                       goto match;
-                   }
-               }
-               /* This bytecode only happens in the toplevel */
-               eng.so[0] = str - eng.bas;
-               eng.str = str;
-               goto fail;
-
-           /****************************************************
-            * One byte code, two bytes argument                *
-            ****************************************************/
-           case Re_CaseLiteral:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] == eng.cod[1] || eng.str[0] == eng.cod[2]) {
-                   ci = 3;
-                   goto match;
-               }
-               goto fail;
-           case Re_CaseLiteralNot:
-               if (eng.str >= eng.end)
-                   goto fail;
-               if (eng.str[0] != eng.cod[1] && eng.str[0] != eng.cod[2]) {
-                   ci = 3;
-                   goto match;
-               }
-               goto fail;
-           case Re_SearchCaseLiteral:
-               for (str = eng.str; str < eng.end; str++) {
-                   if (*str == eng.cod[1] || *str == eng.cod[2]) {
-                       ci = 3;
-                       eng.str = str;
-                       goto match;
-                   }
-               }
-               eng.so[0] = str - eng.bas;
-               eng.str = str;
-               goto fail;
-
-           /****************************************************
-            * One byte codes, two arguments, n bytes           *
-            ****************************************************/
-           case Re_String:
-               len = eng.cod[1];
-               if (len & 0x80) {
-                   i = 3;
-                   len = (len & 0x7f) + (eng.cod[2] << 7);
-               }
-               else
-                   i = 2;
-               if (eng.end - eng.str < len)
-                   goto fail;
-               ptr = eng.cod + i;
-               str = eng.str;
-               for (k = len; k > 0; k--) {
-                   if (*ptr++ != *str++)
-                       goto fail;
-               }
-               ci = i + len;
-               si = len;
-               goto match;
-           case Re_SearchString:
-               len = eng.cod[1];
-               if (len & 0x80) {
-                   i = 3;
-                   len = (len & 0x7f) + (eng.cod[2] << 7);
-               }
-               else
-                   i = 2;
-               for (str = eng.str; eng.end - str >= len; str = eng.str++) {
-                   for (ptr = eng.cod + i, str = eng.str, k = len; k > 0; k--)
-                       if (*ptr++ != *str++)
-                           break;
-                   if (k == 0) {
-                       /* Substring found */
-                       ci = i + len;
-                       si = str - eng.str;
-                       goto match;
-                   }
-               }
-               eng.so[0] = eng.end - eng.bas;
-               eng.str = eng.end;
-               goto fail;
-
-           case Re_CaseString:
-               len = eng.cod[1];
-               if (len & 0x80) {
-                   i = 3;
-                   len = (len & 0x7f) + (eng.cod[2] << 7);
-               }
-               else
-                   i = 2;
-
-               len >>= 1;
-               /*  Check if there are at least len/2 bytes left, string
-                * is represented as two bytes, lower and upper case */
-               if (eng.end - eng.str < len)
-                   goto fail;
-               ptr = eng.cod + i;
-               str = eng.str;
-               for (k = len; k > 0; str++, ptr += 2, k--) {
-                   if (*str != ptr[0] && *str != ptr[1])
-                       goto fail;
-               }
-               ci = i + (len << 1);
-               si = len;
-               goto match;
-           case Re_SearchCaseString:
-               len = eng.cod[1];
-               if (len & 0x80) {
-                   i = 3;
-                   len = (len & 0x7f) + (eng.cod[2] << 7);
-               }
-               else
-                   i = 2;
-               len >>= 1;
-               for (str = eng.str; eng.end - str >= len; str = eng.str++) {
-                   for (ptr = eng.cod + i, str = eng.str, k = len;
-                        k > 0; k--, ptr += 2, str++)
-                       if (ptr[0] != str[0] && ptr[1] != str[0])
-                           break;
-                   if (k == 0) {
-                       /* Substring found */
-                       ci = i + (len << 1);
-                       si = str - eng.str;
-                       goto match;
-                   }
-               }
-               eng.so[0] = eng.end - eng.bas;
-               eng.str = eng.end;
-               goto fail;
-
-           case Re_StringList:
-               /* Number of strings */
-               k = eng.cod[1];
-
-               /* Where to jump after match */
-               bas = eng.cod[2] | (eng.cod[3] << 8);
-
-               str = eng.str;
-               ptr = eng.cod + k + 4;
-               l = eng.end - eng.str;
-               for (j = 0; j < k; j++) {
-                   len = eng.cod[j + 4];
-                   if (len <= l) {
-                       for (i = 0; i < len; i++)
-                           if (ptr[i] != str[i])
-                               goto next_stl;
-                       goto stl_match;
-                   }
-next_stl:
-                   ptr += len;
-               }
-               goto fail;
-stl_match:
-               ci = bas;
-               si = len;
-               goto match;
-
-           case Re_CaseStringList:
-               /* Number of strings */
-               k = eng.cod[1];
-
-               /* Where to jump after match */
-               bas = eng.cod[2] | (eng.cod[3] << 8);
-
-               str = eng.str;
-               ptr = eng.cod + k + 4;
-               l = eng.end - eng.str;
-               for (j = 0; j < k; j++) {
-                   len = eng.cod[j + 4];
-                   if ((len >> 1) <= l) {
-                       for (i = m = 0; i < len; m++, i += 2)
-                           if (ptr[i] != str[m] && ptr[i + 1] != str[m])
-                               goto next_cstl;
-                       goto cstl_match;
-                   }
-next_cstl:
-                   ptr += len;
-               }
-               goto fail;
-cstl_match:
-               ci = bas;
-               si = len >> 1;
-               goto match;
-
-
-           case Re_LargeStringList:
-               /* Where to jump after match */
-               bas = eng.cod[1] | (eng.cod[2] << 8);
-
-               str = eng.str;
-
-               /* First entry in index map */
-               ptr = eng.cod + 3;
-               i = (int)str[0] << 1;
-               j = ptr[i] | (ptr[i + 1] << 8);
-               if (j == 0xffff)
-                   /* No entry with this byte */
-                   goto fail;
-
-               /* Bytes left in input */
-               l = eng.end - eng.str;
-
-               /* First entry matching initial byte */
-               ptr += 512 + j;
-
-               for (len = ptr[0];
-                    str[0] == ptr[1];
-                    ptr += len + 1, len = ptr[0]) {
-                   if (len <= l) {
-                       for (i = 1; i < len; i++) {
-                           if (ptr[i + 1] != str[i])
-                               goto next_lstl;
-                       }
-                       ci = bas;
-                       si = len;
-                       goto match;
-                   }
-next_lstl:;
-               }
-               goto fail;
-
-           case Re_LargeCaseStringList:
-               /* Where to jump after match */
-               bas = eng.cod[1] | (eng.cod[2] << 8);
-
-               str = eng.str;
-
-               /* First entry in index map */
-               ptr = eng.cod + 3;
-               i = (int)str[0] << 1;
-               j = ptr[i] | (ptr[i + 1] << 8);
-               if (j == 0xffff)
-                   /* No entry with this byte */
-                   goto fail;
-
-               /* Bytes left in input */
-               l = eng.end - eng.str;
-
-               /* First entry matching initial byte */
-               ptr += 512 + j;
-
-               for (len = ptr[0];
-                    str[0] == ptr[1] || str[0] == ptr[2];
-                    ptr += len + 1, len = ptr[0]) {
-                   if ((k = (len >> 1)) <= l) {
-                       for (i = 2, j = 1; i < len; i += 2, j++) {
-                           if (ptr[i + 1] != str[j] && ptr[i + 2] != str[j])
-                               goto next_lcstl;
-                       }
-                       ci = bas;
-                       si = k;
-                       goto match;
-                   }
-next_lcstl:;
-               }
-               goto fail;
-
-
-           /****************************************************
-            * Character range matching                         *
-            ****************************************************/
-           case Re_Range:
-               if (eng.str < eng.end && eng.cod[eng.str[0] + 1]) {
-                   ci = 257;
-                   goto match;
-               }
-               goto fail;
-           case Re_RangeNot:
-               if (eng.str >= eng.end || eng.cod[eng.str[0] + 1])
-                   goto fail;
-               ci = 257;
-               goto match;
-
-           /****************************************************
-            * Group handling                                   *
-            ****************************************************/
-           case Re_Open:
-               if (++eng.goff >= 9)
-                   return (RE_ASSERT);
-               eng.gso[eng.goff] = eng.str - eng.bas;
-               ++eng.cod;
-               continue;
-           case Re_Close:
-               eng.geo[eng.goff] = eng.str - eng.bas;
-               ++eng.cod;
-               continue;
-           case Re_Update:
-               bas = eng.cod[1];
-               eng.geo[eng.goff] = eng.str - eng.bas;
-               eng.cod += 2;           /* + Update + bas */
-               continue;
-
-           /****************************************************
-            * Backreference                                    *
-            ****************************************************/
-           case Re_Backref:
-               i = eng.cod[1];
-               j = eng.gso[i];
-               k = eng.geo[i];
-               len = k - j;
-               if (k < j || eng.end - eng.str < len)
-                   goto fail;
-               ptr = eng.bas + j;
-               str = eng.str;
-               for (l = len; l > 0; l--) {
-                   if (*ptr++ != *str++)
-                       goto fail;
-               }
-               ci = 2;
-               si = len;
-               goto match;
-
-           /****************************************************
-            * Alternatives handling                            *
-            ****************************************************/
-           case Re_Alt:
-               bas = eng.off;
-               if (++eng.off >= MAX_DEPTH)
-                   return (RE_ASSERT);
-
-               /* Get offset of next alternative */
-               i = eng.cod[1] | (eng.cod[2] << 8);
-
-               /* Setup for next alternative if the current fails */
-               eng.rcod[eng.off] = eng.cod + i + 1;    /* + Alt */
-
-               /* If fail, test the next alternative in the same string */
-               eng.rstr[eng.off] = eng.str;
-
-               /* Setup match offsets */
-               if (eng.so[bas] <= eng.eo[bas])
-                   eng.so[eng.off] = eng.eo[bas];
-               else
-                   eng.so[eng.off] = eng.so[bas];
-               eng.sv[eng.off] = eng.eo[eng.off] = eng.so[eng.off] - 1;
-
-               /* Save start of possible previous matches */
-               eng.ss[eng.off] = eng.so[bas];
-
-               /* Skip code */
-               eng.cod += 3;
-
-               /* Go try the first alternative */
-               continue;
-
-           case Re_AltNext:
-               bas = eng.off - 1;
-               /* Check if matched and if it is a better match */
-               if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                   eng.sv[eng.off] - eng.so[eng.off] <
-                   eng.eo[eng.off] - eng.so[eng.off])
-                   eng.sv[eng.off] = eng.eo[eng.off];
-
-               /* Get offset of next alternative */
-               i = eng.cod[1] | (eng.cod[2] << 8);
-
-               /* Setup for next alternative if the current fails */
-               eng.rcod[eng.off] = eng.cod + i + 1;    /* + AltNext */
-
-               /* Setup match offset */
-               eng.eo[eng.off] = eng.so[eng.off] - 1;
-
-               /* Reset string for next alternative */
-               eng.str = eng.rstr[eng.off];
-
-               /* Skip code */
-               eng.cod += 3;
-
-               /* Go try the next alternative */
-               continue;
-
-           case Re_AltDone:
-               bas = eng.off - 1;
-               /* Check if matched and if it is a better match */
-               if (eng.sv[eng.off] - eng.so[eng.off] <
-                   eng.eo[eng.off] - eng.so[eng.off])
-                   eng.sv[eng.off] = eng.eo[eng.off];
-
-               /* If there is a match */
-               if (eng.sv[eng.off] >= eng.so[eng.off]) {
-                   eng.so[bas] = eng.ss[eng.off];
-                   eng.eo[bas] = eng.sv[eng.off];
-                   eng.str = eng.bas + eng.eo[bas];
-
-                   /* Pop stack and skip code */
-                   --eng.off;
-                   ++eng.cod;
-
-                   /* Go try next regular expression pattern */
-                   continue;
-               }
-
-               /* Failed, reset string and pop stack */
-               eng.str = eng.rstr[eng.off];
-               --eng.off;
-               goto fail;
-
-
-           /****************************************************
-            * Repetition                                       *
-            ****************************************************/
-
-               /*  Note that the repetition counter is not
-                * updated for <re>*, <re>+ and <re>?
-                * it is easy to updated, but since it is not
-                * really useful, code to do it was removed
-                * to save a few cpu cicles. */
-
-#define REPETITION_SETUP()                                     \
-       if (++eng.off >= MAX_DEPTH)                             \
-           return (RE_ASSERT);                                 \
-                                                               \
-       /* Return here for recovery if match fail */            \
-       eng.rcod[eng.off] = eng.cod;                            \
-                                                               \
-       /* Setup match offsets */                               \
-       if (eng.so[bas] <= eng.eo[bas])                         \
-           eng.so[eng.off] = eng.eo[bas];                      \
-       else                                                    \
-           eng.so[eng.off] = eng.so[bas];                      \
-       eng.ss[eng.off] = eng.so[bas];                          \
-       eng.sv[eng.off] = eng.eo[eng.off] = eng.so[eng.off] - 1;\
-                                                               \
-       /* Skip repetition instruction */                       \
-       eng.cod += 4;
-
-
-           case Re_AnyTimes:
-               bas = eng.cod[1];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   REPETITION_SETUP();
-               }
-               else {
-                   if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                       eng.eo[eng.off] > eng.sv[eng.off]) {
-                       /* Update offset of match */
-                       eng.sv[eng.off] = eng.eo[eng.off];
-
-                       /* Skip repetition instruction */
-                       eng.cod += 4;
-                   }
-                   else {
-                       /* Match failed but it is ok */
-                       len = eng.cod[2] | (eng.cod[3] << 8);
-                       eng.so[bas] = eng.ss[eng.off];
-                       if (eng.sv[eng.off] >= eng.so[eng.off])
-                           /* Something matched earlier, update */
-                           eng.eo[bas] = eng.sv[eng.off];
-                       else if (eng.eo[bas] < eng.so[bas])
-                           /* Empty match */
-                           eng.eo[bas] = eng.so[bas];
-
-                       /* Try next pattern at correct offset */
-                       eng.str = eng.bas + eng.eo[bas];
-
-                       /* Pop stack and skip code */
-                       --eng.off;
-                       eng.cod += len;
-                   }
-               }
-               continue;
-
-           case Re_Maybe:
-               bas = eng.cod[1];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   REPETITION_SETUP();
-               }
-               else {
-                   /* Matched or first iteration is done */
-                   len = eng.cod[2] | (eng.cod[3] << 8);
-                   eng.so[bas] = eng.ss[eng.off];
-                   if (eng.eo[eng.off] > eng.so[eng.off]) {
-                       /* Something matched earlier, update */
-                       eng.eo[bas] = eng.eo[eng.off];
-                       eng.str = eng.bas + eng.eo[bas];
-                       /* Don't need to update counter */
-                   }
-                   else {
-                       /* Empty match */
-                       if (eng.eo[bas] < eng.so[bas])
-                           eng.eo[bas] = eng.so[bas];
-
-                       /* Try next pattern at correct offset */
-                       eng.str = eng.bas + eng.eo[bas];
-                   }
-
-                   /* Pop stack */
-                   --eng.off;
-
-                   /* Skip code */
-                   eng.cod += len;
-               }
-               continue;
-
-           case Re_AtLeast:
-               bas = eng.cod[1];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   REPETITION_SETUP();
-               }
-               else {
-                   if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                       eng.eo[eng.off] > eng.sv[eng.off]) {
-                       /* Update offset of match */
-                       eng.sv[eng.off] = eng.eo[eng.off];
-
-                       /* Skip repetition instruction */
-                       eng.cod += 4;
-                   }
-                   else {
-                       /* Last try failed */
-                       len = eng.cod[2] | (eng.cod[3] << 8);
-                       if (eng.sv[eng.off] >= eng.so[eng.off]) {
-                           /* Something matched earlier, update */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-                       }
-                       else {
-                           /*  Do it here, so that the fail label does
-                            * not need to do too expensive work for
-                            * simple patterns. */
-                           eng.so[bas] = eng.str - eng.bas;
-
-                           /* Zero matches, pop stack and restart */
-                           --eng.off;
-                           goto fail;
-                       }
-
-                       /* Pop stack and skip code */
-                       --eng.off;
-                       eng.cod += len;
-                   }
-               }
-               continue;
-
-
-           /****************************************************
-            * Repetition with arguments                        *
-            ****************************************************/
-           case Re_Exact:
-#define COMPLEX_REPETITION_SETUP_0()                           \
-       i = eng.cod[1];                                         \
-       bas = eng.cod[2];
-
-#define COMPLEX_REPETITION_SETUP()                             \
-       /* First iteration */                                   \
-       if (++eng.off >= MAX_DEPTH)                             \
-           return (RE_ASSERT);                                 \
-                                                               \
-       /*  Remeber number or repetitions */                    \
-       eng.re[eng.off] = 0;                                    \
-                                                               \
-       /* Return here for recovery if match fail */            \
-       eng.rcod[eng.off] = eng.cod;                            \
-                                                               \
-       /* Setup match offsets */                               \
-       if (eng.so[bas] <= eng.eo[bas])                         \
-           eng.so[eng.off] = eng.eo[bas];                      \
-       else                                                    \
-           eng.so[eng.off] = eng.so[bas];                      \
-       eng.sv[eng.off] = eng.eo[eng.off] = eng.so[eng.off] - 1;\
-       eng.ss[eng.off] = eng.so[bas];                          \
-                                                               \
-       /* Skip repetition instruction */                       \
-       eng.cod += 5;
-
-               COMPLEX_REPETITION_SETUP_0();
-               if (eng.off == bas) {
-                   /* First iteration */
-                   COMPLEX_REPETITION_SETUP();
-               }
-               else {
-                   if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                       eng.eo[eng.off] > eng.sv[eng.off]) {
-                       /* Update offset of match */
-                       eng.sv[eng.off] = eng.eo[eng.off];
-
-                       /* Update repetition counter */
-                       if (++eng.re[eng.off] == i) {
-                           /* Matched the required times */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-
-                           /* Update code */
-                           k = eng.cod[3] | (eng.cod[4] << 8);
-                           eng.cod += k;
-
-                           /* Pop stack and go for next pattern */
-                           --eng.off;
-                           continue;
-                       }
-
-                       /* Skip repetition instruction */
-                       eng.cod += 5;
-                   }
-                   else {
-                       /*  Do it here, so that the fail label does
-                        * not need to do too expensive work for
-                        * simple patterns. */
-                       eng.so[bas] = eng.str - eng.bas;
-
-                       /* Pop stack and restart */
-                       --eng.off;
-                       goto fail;
-                   }
-               }
-               continue;
-
-           case Re_Min:
-               COMPLEX_REPETITION_SETUP_0();
-               if (eng.off == bas) {
-                   /* First iteration */
-                   COMPLEX_REPETITION_SETUP();
-               }
-               else {
-                   if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                       eng.eo[eng.off] > eng.sv[eng.off]) {
-                       /* Update offset of match */
-                       eng.sv[eng.off] = eng.eo[eng.off];
-
-                       /* Update repetition counter */
-                       ++eng.re[eng.off];
-
-                       /* Skip repetition instruction and try again */
-                       eng.cod += 5;
-                   }
-                   else {
-                       /* Match failed! */
-                       if (eng.re[eng.off] < i) {
-                           /*  Do it here, so that the fail label does
-                            * not need to do too expensive work for
-                            * simple patterns. */
-                           eng.so[bas] = eng.str - eng.bas;
-
-                           /* Didn't match required number of times */
-                           --eng.off;
-                           goto fail;
-                       }
-                       else {
-                           /* Matched minimum number of times */
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-                           k = eng.cod[3] | (eng.cod[4] << 8);
-
-                           /* Update code and pop stack */
-                           eng.cod += k;
-                           --eng.off;
-                       }
-                   }
-               }
-               continue;
-
-           case Re_Max:
-               COMPLEX_REPETITION_SETUP_0();
-               if (eng.off == bas) {
-                   /* First iteration */
-                   COMPLEX_REPETITION_SETUP();
-               }
-               else {
-                   if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                       eng.eo[eng.off] > eng.sv[eng.off]) {
-                       /* Update offset of match */
-                       eng.sv[eng.off] = eng.eo[eng.off];
-
-                       /* Update repetition counter */
-                       if (++eng.re[eng.off] == i) {
-                           /* Matched the maximum times */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-
-                           k = eng.cod[3] | (eng.cod[4] << 8);
-
-                           /* Update code and pop stack */
-                           eng.cod += k;
-                           --eng.off;
-                           continue;
-                       }
-
-                       /* Skip repetition instruction and try again */
-                       eng.cod += 5;
-                   }
-                   else {
-                       /* No matches, but zero matches are ok */
-                       k = eng.cod[3] | (eng.cod[4] << 8);
-                       if (eng.sv[eng.off] >= eng.so[eng.off]) {
-                           /* Something matched earlier, update */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-                       }
-                       else {
-                           /* Empty match */
-                           if (eng.eo[bas] < eng.so[bas])
-                               eng.eo[bas] = eng.so[bas];
-
-                           /* Try next pattern at correct offset */
-                           eng.str = eng.bas + eng.eo[bas];
-                       }
-
-                       /* Pop stack and update code */
-                       --eng.off;
-                       eng.cod += k;
-                   }
-               }
-               continue;
-
-           case Re_MinMax:
-               bas = eng.cod[3];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   COMPLEX_REPETITION_SETUP();
-               }
-               else {
-                   if (eng.eo[eng.off] >= eng.so[eng.off] &&
-                       eng.eo[eng.off] > eng.sv[eng.off]) {
-                       /* Update offset of match */
-                       eng.sv[eng.off] = eng.eo[eng.off];
-
-                       /* Update repetition counter */
-                       if (++eng.re[eng.off] == eng.cod[2]) {
-                           /* Matched the maximum times */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-                           k = eng.cod[4] | (eng.cod[5] << 8);
-
-                           /* Update code and pop stack */
-                           eng.cod += k;
-                           --eng.off;
-                           continue;
-                       }
-
-                       /* Skip repetition instruction and try again */
-                       eng.cod += 6;
-                   }
-                   else {
-                       /* Match failed! */
-                       if (eng.re[eng.off] < eng.cod[1]) {
-                           /*  Do it here, so that the fail label does
-                            * not need to do too expensive work for
-                            * simple patterns. */
-                           eng.so[bas] = eng.str - eng.bas;
-
-                           /* Didn't match required number of times */
-                           --eng.off;
-                           goto fail;
-                       }
-                       else {
-                           /* Matched minimum number of times */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.sv[eng.off];
-                           eng.str = eng.bas + eng.eo[bas];
-                           k = eng.cod[4] | (eng.cod[5] << 8);
-
-                           /* Update code and pop stack */
-                           eng.cod += k;
-                           --eng.off;
-                       }
-                   }
-               }
-               continue;
-
-
-           /****************************************************
-            * Special repetition handling                      *
-            ****************************************************/
-           case Re_AnyAnyTimes:
-               /* code(1) + bas(1) + gbas(1) + jump(2) */
-               bas = eng.cod[1];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   if (++eng.off >= MAX_DEPTH)
-                       return (RE_ASSERT);
-
-                   /* Return here for recovery if match fail */
-                   eng.rcod[eng.off] = eng.cod;
-
-                   /* If fail, test the next pattern at the same point */
-                   eng.rstr[eng.off] = eng.str;
-
-                   /* Setup match offsets */
-                   eng.so[eng.off] = eng.str - eng.bas;
-                   eng.eo[eng.off] = eng.so[eng.off] - 1;
-
-                   if (newline)
-                       /*  Use the repetition counter to store start of
-                        * skipped string, to later check if skipping a
-                        * newline. */
-                       eng.re[eng.off] = eng.so[eng.off];
-
-                   /* Save start of possible previous matches */
-                   eng.ss[eng.off] = eng.so[bas];
-
-                   /* Skip repetition instruction */
-                   eng.cod += 5;
-               }
-               else {
-                   /* -1 as an unsigned char */
-                   if (eng.cod[2] != 0xff)
-                       eng.goff = eng.cod[2];
-                   else
-                       eng.goff = -1;
-
-                   if (newline) {
-                       ptr = eng.bas + eng.re[eng.off];
-                       str = eng.bas + eng.so[eng.off];
-                       for (; ptr < str; ptr++)
-                           if (*ptr == '\n') {
-                               eng.cod = eng.rcod[0];
-                               eng.so[0] = ptr - eng.bas + 1;
-                               eng.eo[0] = eng.so[0] - 1;
-                               eng.rstr[0] = eng.str = ptr + 1;
-                               eng.off = 0;
-                               goto reset;
-                           }
-                       /* If looping, don't do too many noops */
-                       eng.re[eng.off] = ptr - eng.bas;
-                   }
-
-                   if (eng.eo[eng.off] >= eng.so[eng.off]) {
-                       /* Note that this is only true if all possibly
-                        * nested special repetitions also matched. */
-
-                       if (eng.goff >= 0) {
-                           if (eng.cod[5] == Re_Update)
-                               eng.gso[eng.goff] = eng.eo[bas] +
-                                                   (eng.so[bas] > eng.eo[bas]);
-                           else if (eng.geo[eng.goff] < eng.so[eng.off])
-                               eng.geo[eng.goff] = eng.so[eng.off];
-                       }
-
-                       /* Jump relative offset */
-                       len = eng.cod[3] | (eng.cod[4] << 8);
-
-                       /* Restore offset from where started trying */
-                       eng.so[bas] = eng.ss[eng.off];
-                       eng.eo[bas] = eng.eo[eng.off];
-
-                       /* Pop stack and skip code */
-                       --eng.off;
-                       eng.cod += len;
-                   }
-                   else {
-                       /* Only give up if the entire string was scanned */
-                       if (eng.str < eng.end) {
-                           /* Update restart point for next pattern */
-                           eng.str = ++eng.rstr[eng.off];
-
-                           /* Reset start of nested match */
-                           eng.so[eng.off] = eng.str - eng.bas;
-
-                           /* Skip repetition instruction */
-                           eng.cod += 5;
-                       }
-                       else {
-                           /* Entire string scanned and failed */
-
-                           /* Jump relative offset */
-                           len = eng.cod[3] | (eng.cod[4] << 8);
-
-                           /* Restore offset from where started trying */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.ss[eng.off] - 1;
-
-                           /* Pop stack and skip code */
-                           --eng.off;
-                           eng.cod += len;
-                       }
-                   }
-               }
-               continue;
-
-           /*  This is significantly different than matching <re>.*<re>
-            * because it may need to restart several times since it is
-            * possible to find too many false positives, for example:
-            *  a.*b    => once one "a" is found, scan all
-            *             the remaining string searching for a "b"
-            *  a.?b    => the string may have too many "a"s, but the
-            *             first occurrences of "a" may not be followed
-            *             by any-character and a "b" or a single "b".
-            */
-           case Re_AnyMaybe:
-               bas = eng.cod[1];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   if (++eng.off >= MAX_DEPTH)
-                       return (RE_ASSERT);
-
-                   /* Return here for recovery if match fail */
-                   eng.rcod[eng.off] = eng.cod;
-
-                   /* First try without eating a byte */
-                   eng.rstr[eng.off] = eng.str;
-
-                   /* Remember this is the first try if match fail */
-                   eng.re[eng.off] = 0;
-
-                   /* Setup match offsets */
-                   eng.so[eng.off] = eng.str - eng.bas;
-                   eng.eo[eng.off] = eng.so[eng.off] - 1;
-
-                   /* Save start of possible previous matches */
-                   eng.ss[eng.off] = eng.so[bas];
-
-                   /* Skip repetition instruction */
-                   eng.cod += 5;
-               }
-               else {
-                   /* -1 as an unsigned char */
-                   if (eng.cod[2] != 0xff)
-                       eng.goff = eng.cod[2];
-                   else
-                       eng.goff = -1;
-
-                   if (eng.eo[eng.off] >= eng.so[eng.off]) {
-                       /* Something matched */
-
-                       if (eng.goff >= 0) {
-                           if (eng.cod[5] == Re_Update)
-                               eng.gso[eng.goff] = eng.eo[bas] +
-                                                   (eng.so[bas] > eng.eo[bas]);
-                           else if (eng.geo[eng.goff] < eng.so[eng.off])
-                               eng.geo[eng.goff] = eng.so[eng.off];
-                       }
-
-                       /* Jump relative offset */
-                       len = eng.cod[3] | (eng.cod[4] << 8);
-
-                       /* Update offset of match */
-                       eng.eo[bas] = eng.eo[eng.off];
-
-                       /* Pop stack and skip code */
-                       --eng.off;
-                       eng.cod += len;
-                   }
-                   else if (eng.re[eng.off] == 0 &&
-                            (!newline || eng.rstr[eng.off][1] != '\n')) {
-                       /* Try this time skiping a byte */
-                       ++eng.re[eng.off];
-
-                       /* Reset string, skip code and go try one time more */
-                       eng.str = ++eng.rstr[eng.off];
-                       eng.cod += 5;
-                   }
-                   else {
-                       /* Failed to match */
-
-                       /* Update offsets */
-                       eng.eo[bas] = eng.ss[eng.off];
-                       eng.so[bas] = eng.eo[bas] + 1;
-
-                       eng.str = eng.rstr[eng.off] + (eng.re[eng.off] == 0);
-
-                       /* Pop stack and return to toplevel code */
-                       --eng.off;
-                       if (eng.str >= eng.end)
-                           goto wont;
-                       eng.cod = eng.rcod[bas];
-                   }
-               }
-               continue;
-
-           /* .+ almost identical to .* but requires eating at least one byte */
-           case Re_AnyAtLeast:
-               bas = eng.cod[1];
-               if (eng.off == bas) {
-                   /* First iteration */
-                   if (++eng.off >= MAX_DEPTH)
-                       return (RE_ASSERT);
-
-                   /* Return here for recovery if match fail */
-                   eng.rcod[eng.off] = eng.cod;
-
-                   /* Skip one byte for the restart string */
-                   if (newline && eng.str[0] == '\n') {
-                       /* Cannot skip newline */
-                       eng.cod = eng.rcod[0];
-                       eng.rstr[0] = ++eng.str;
-                       eng.so[0] = eng.str - eng.bas;
-                       eng.eo[0] = eng.so[0] - 1;
-                       eng.off = 0;
-                       goto reset;
-                   }
-                   eng.rstr[eng.off] = ++eng.str;
-
-                   /* Setup match offsets */
-                   eng.so[eng.off] = eng.str - eng.bas;
-                   eng.eo[eng.off] = eng.so[eng.off] - 1;
-
-                   if (newline)
-                       /*  Use the repetition counter to store start of
-                        * skipped string, to later check if skipping a
-                        * newline. */
-                       eng.re[eng.off] = eng.so[eng.off];
-
-                   /* Save start of possible previous matches */
-                   eng.ss[eng.off] = eng.so[bas];
-
-                   /* Skip repetition instruction */
-                   eng.cod += 5;
-               }
-               else {
-                   /* -1 as an unsigned char */
-                   if (eng.cod[2] != 0xff)
-                       eng.goff = eng.cod[2];
-                   else
-                       eng.goff = -1;
-
-                   if (newline) {
-                       ptr = eng.bas + eng.re[eng.off];
-                       str = eng.bas + eng.so[eng.off];
-                       for (; ptr < str; ptr++)
-                           if (*ptr == '\n') {
-                               eng.cod = eng.rcod[0];
-                               eng.so[0] = ptr - eng.bas + 1;
-                               eng.eo[0] = eng.so[0] - 1;
-                               eng.rstr[0] = eng.str = ptr + 1;
-                               eng.off = 0;
-                               goto reset;
-                           }
-                       /* If looping, don't do too many noops */
-                       eng.re[eng.off] = ptr - eng.bas;
-                   }
-
-                   if (eng.eo[eng.off] >= eng.so[eng.off]) {
-                       /* Note that this is only true if all possibly
-                        * nested special repetitions also matched. */
-
-                       if (eng.goff >= 0) {
-                           if (eng.cod[5] == Re_Update)
-                               eng.gso[eng.goff] = eng.eo[bas] +
-                                                   (eng.so[bas] > eng.eo[bas]);
-                           else if (eng.geo[eng.goff] < eng.so[eng.off])
-                               eng.geo[eng.goff] = eng.so[eng.off];
-                       }
-
-                       /* Jump relative offset */
-                       len = eng.cod[3] | (eng.cod[4] << 8);
-
-                       /* Restore offset from where started trying */
-                       eng.so[bas] = eng.ss[eng.off];
-                       eng.eo[bas] = eng.eo[eng.off];
-
-                       /* Pop stack and skip code */
-                       --eng.off;
-                       eng.cod += len;
-                   }
-                   else {
-                       /* Only give up if the entire string was scanned */
-                       if (eng.str < eng.end) {
-                           /* Update restart point for next pattern */
-                           eng.str = ++eng.rstr[eng.off];
-
-                           /* Reset start of nested match */
-                           eng.so[eng.off] = eng.str - eng.bas;
-
-                           /* Skip repetition instruction */
-                           eng.cod += 5;
-                       }
-                       else {
-                           /* Entire string scanned and failed */
-
-                           /* Jump relative offset */
-                           len = eng.cod[3] | (eng.cod[4] << 8);
-
-                           /* Restore offset from where started trying */
-                           eng.so[bas] = eng.ss[eng.off];
-                           eng.eo[bas] = eng.ss[eng.off] - 1;
-
-                           /* Pop stack and skip code */
-                           --eng.off;
-                           eng.cod += len;
-                       }
-                   }
-               }
-               continue;
-
-
-           /****************************************************
-            * Repetition matched!                              *
-            ****************************************************/
-           case Re_RepJump:
-               /* eng.cod[1] is toplevel offset of repetition */
-               if (eng.off > eng.cod[1])
-                   /* If still needs to try matches */
-                   eng.cod -= eng.cod[2];
-               else
-                   eng.cod += 3;       /* + RepJump + bas + len-size */
-               continue;
-
-           case Re_RepLongJump:
-               /* eng.cod[1] is toplevel offset of repetition */
-               if (eng.off > eng.cod[1])
-                   /* If still needs to try matches */
-                   eng.cod -= eng.cod[2] | (eng.cod[3] << 8);
-               else
-                   eng.cod += 4;       /* + RepLongJump + bas + len-size */
-               continue;
-
-           /****************************************************
-            * Finished                                         *
-            ****************************************************/
-           case Re_DoneIf:
-               if (eng.eo[eng.off] >= eng.so[eng.off]) {
-                   eng.so[0] = eng.ss[eng.off];
-                   eng.eo[0] = eng.eo[eng.off];
-                   goto done;
-               }
-               ++eng.cod;
-               continue;
-           case Re_MaybeDone:
-               if (eng.eo[eng.off] >= eng.so[eng.off]) {
-                   eng.so[0] = eng.ss[eng.off];
-                   eng.eo[0] = eng.eo[eng.off];
-                   goto done;
-               }
-               ++eng.cod;
-               continue;
-           case Re_Done:
-               goto done;
-
-           default:
-               /* Fatal internal error */
-               return (RE_ASSERT);
-       }
-
-
-wont:
-       /* Surely won't match */
-       if (eng.off == 0) {
-           eng.eo[0] = eng.so[0] - 1;
-           break;
-       }
-
-
-fail:
-       if (eng.off == 0) {
-           /* If the entire string scanned */
-           if (++eng.str > eng.end) {
-               eng.eo[0] = eng.so[0] - 1;
-               break;
-           }
-           eng.goff = -1;
-           /* Update start of possible match after restart */
-           if (eng.eo[0] >= eng.so[0]) {
-               /* If first fail */
-               eng.str = eng.rstr[0];
-               ++eng.rstr[0];
-               eng.so[0] = eng.str - eng.bas;
-               eng.eo[0] = eng.so[eng.off] - 1;
-           }
-           else
-               /* Just trying at next byte */
-               ++eng.so[0];
-       }
-       else
-           /* Remember this match failed */
-           eng.eo[eng.off] = eng.so[eng.off] - 1;
-
-       /* Restart code */
-       eng.cod = eng.rcod[eng.off];
-       continue;
-
-
-match:
-       /* If first match */
-       if (eng.eo[eng.off] < eng.so[eng.off]) {
-           if (eng.off == 0)
-               eng.rstr[0] = eng.str + 1;
-           eng.so[eng.off] = eng.eo[eng.off] = eng.str - eng.bas;
-       }
-       eng.eo[eng.off] += si;
-       eng.cod += ci;
-       eng.str += si;
-       ci = si = 1;
-       continue;
-
-done:
-       break;
-    }
-
-    if (nmatch) {
-       if (flags & RE_STARTEND)
-           len = pmat[0].rm_so;
-       else
-           len = 0;
-       if (!nosub) {
-           if (preg->cod[1] != 0xff)
-               eng.goff = preg->cod[1];
-           pmat[0].rm_so = eng.so[0];
-           pmat[0].rm_eo = eng.eo[0];
-           for (i = 1; i < nmatch; i++) {
-               if (i - 1 <= eng.goff) {
-                   pmat[i].rm_so = eng.gso[i - 1];
-                   pmat[i].rm_eo = eng.geo[i - 1];
-               }
-               else {
-                   pmat[i].rm_so = 0;
-                   pmat[i].rm_eo = -1;
-               }
-           }
-           if (len) {
-               /* Update offsets, since the match was done in a substring */
-               j = eng.goff + 2 > nmatch ? nmatch : eng.goff + 2;
-               for (i = 0; i < j; i++) {
-                   pmat[i].rm_so += len;
-                   pmat[i].rm_eo += len;
-               }
-           }
-       }
-       else {
-           /*  Already know these values, allow compiling the regex with
-            * RE_NOSUB to use parenthesis only for grouping, but avoiding
-            * the runtime overhead of keeping track of the subexpression
-            * offsets. */
-           pmat[0].rm_so = eng.so[0] + len;
-           pmat[0].rm_eo = eng.eo[0] + len;
-       }
-    }
-
-    return (eng.so[0] <= eng.eo[0] ? 0 : RE_NOMATCH);
-}
-
-int
-reerror(int ecode, const re_cod *preg, char *ebuffer, int ebuffer_size)
-{
-    static char *errors[] = {
-       "No error",
-       "Failed to match",                      /* NOMATCH */
-
-       /* Errors not generated */
-       "Invalid regular expression",           /* BADPAT */
-       "Invalid collating element",            /* ECOLLATE */
-       "Invalid character class",              /* ECTYPE */
-
-       "`\' applied to unescapable character", /* EESCAPE */
-       "Invalid backreference number",         /* ESUBREG */
-       "Brackets `[ ]' not balanced",          /* EBRACK */
-       "Parentheses `( )' not balanced",       /* EPAREN */
-       "Braces `{ }' not balanced",            /* EBRACE */
-       "Invalid repetition count(s) in `{ }'", /* BADBR */
-       "Invalid character range in `[ ]'",     /* ERANGE */
-       "Out of memory",                        /* ESPACE */
-       "`?', `*', or `+' operand invalid",     /* BADRPT */
-       "Empty (sub)expression",                /* EMPTY */
-       "Assertion error - you found a bug",    /* ASSERT */
-       "Invalid argument"                      /* INVARG */
-    };
-    char *str;
-
-    if (ecode >= 0 && ecode < sizeof(errors) / sizeof(errors[0]))
-       str = errors[ecode];
-    else
-       str = "Unknown error";
-
-    return (snprintf(ebuffer, ebuffer_size, "%s", str));
-}
-
-void
-refree(re_cod *cod)
-{
-    free(cod->cod);
-    cod->cod = NULL;
-}
-
-static void
-reinit(void)
-{
-    int i;
-    static int first = 1;
-
-    if (!first)
-       return;
-    first = 0;
-
-    re__alnum['_'] = 1;
-
-    for (i = '0'; i <= '7'; i++)
-       re__alnum[i] = re__odigit[i] = re__ddigit[i] = re__xdigit[i] = 1;
-
-    for (; i <= '9'; i++)
-       re__alnum[i] = re__ddigit[i] = re__xdigit[i] = 1;
-
-    for (i = 'a'; i <= 'f'; i++)
-       re__alnum[i] = re__xdigit[i] = 1;
-    for (; i <= 'z'; i++)
-       re__alnum[i] = 1;
-
-    for (i = 'A'; i <= 'F'; i++)
-       re__alnum[i] = re__xdigit[i] = 1;
-    for (; i <= 'Z'; i++)
-       re__alnum[i] = 1;
-
-    for (i = 1; i < 32; i++)
-       re__control[i] = 1;
-    re__control[127] = 1;
-    /* Don't show tabs as control characters */
-    re__control['\t'] = 0;
-}
-
-static int
-rec_check(re_inf *inf, int count)
-{
-    if (inf->len + count >= inf->spc) {
-       int spc;
-       unsigned char *cod;
-
-       if ((spc = (count % 64)) != 0)
-           spc = 64 - spc;
-       spc += count + inf->spc;
-       if ((cod = realloc(inf->cod, spc)) == NULL)
-           return (inf->ecode = RE_ESPACE);
-       inf->cod = cod;
-       inf->spc = spc;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_code(re_inf *inf, ReCode code)
-{
-    if (rec_check(inf, 1) == 0)
-       inf->cod[inf->len++] = code;
-
-    return (inf->ecode);
-}
-
-static int
-rec_byte(re_inf *inf, int value)
-{
-    if (rec_check(inf, 1) == 0)
-       inf->cod[inf->len++] = value;
-
-    return (inf->ecode);
-}
-
-static int
-rec_code_byte(re_inf *inf, ReCode code, int value)
-{
-    if (rec_check(inf, 2) == 0) {
-       inf->cod[inf->len++] = code;
-       inf->cod[inf->len++] = value;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_length(re_inf *inf, int length)
-{
-    int lo, hi, two;
-
-    if (length >= 16384)
-       return (inf->ecode = RE_ESPACE);
-
-    lo = length & 0xff;
-    hi = length & 0xff00;
-    two = ((length > 0x7f) != 0) + 1;
-    if (two == 2) {
-       hi <<= 1;
-       hi |= (lo & 0x80) != 0;
-       lo |= 0x80;
-    }
-
-    if (rec_check(inf, two) == 0) {
-       inf->cod[inf->len++] = lo;
-       if (two == 2)
-           inf->cod[inf->len++] = hi >> 8;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_byte_byte(re_inf *inf, int value0, int value1)
-{
-    if (rec_check(inf, 2) == 0) {
-       inf->cod[inf->len++] = value0;
-       inf->cod[inf->len++] = value1;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_code_byte_byte(re_inf *inf, ReCode code, int value0, int value1)
-{
-    if (rec_check(inf, 3) == 0) {
-       inf->cod[inf->len++] = code;
-       inf->cod[inf->len++] = value0;
-       inf->cod[inf->len++] = value1;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_build_alt(re_inf *inf, rec_alt *alt)
-{
-    int offset, value, bas = inf->bas + 1;
-
-    if (alt) {
-       if (alt->next) {
-           if (rec_inc_spc(inf))
-               return (inf->ecode);
-
-           /* A real a list of alternatives */
-           rec_code(inf, Re_Alt);
-
-           offset = inf->len;          /* Remember current offset */
-           rec_byte_byte(inf, 0, 0);   /* Reserve two bytes for retry address */
-           while (alt && inf->ecode == 0) {
-               if (rec_build_pat(inf, alt->pat))
-                   break;
-               alt = alt->next;
-               if (alt && inf->ecode == 0) {
-                   /* Handle (hyper)complex repetitions */
-                   if (inf->bas != bas) {
-                       /* Duplicate patterns up to end of expression */
-                       rec_build_pat(inf, inf->apat);
-                       /* Restore engine state for next alternative(s) */
-                       rec_alt_spc(inf, bas - 1);
-                   }
-
-                   /* If the jump would be so long */
-                   if ((value = inf->len - offset) >= 16384) {
-                       inf->ecode = RE_ESPACE;
-                       break;
-                   }
-                   inf->cod[offset] = value & 0xff;
-                   inf->cod[offset + 1] = (value & 0xff00) >> 8;
-
-                   rec_code(inf, Re_AltNext);
-                   offset = inf->len;
-                   rec_byte_byte(inf, 0, 0);
-               }
-           }
-           if (inf->ecode == 0) {
-               /* Handle (hyper)complex repetitions */
-               if (inf->bas != bas) {
-                   /* Duplicate patterns up to end of expression */
-                   rec_build_pat(inf, inf->apat);
-                   /* Restore engine state for next alternative(s) */
-                   rec_alt_spc(inf, bas - 1);
-               }
-
-               /* If the jump would be so long */
-               if ((value = inf->len - offset) >= 16384)
-                   return (inf->ecode = RE_ESPACE);
-               inf->cod[offset] = value & 0xff;
-               inf->cod[offset + 1] = (value & 0xff00) >> 8;
-               /* Last jump is here */
-               rec_code(inf, Re_AltDone);
-           }
-           rec_dec_spc(inf);
-       }
-       else
-           /* Single alternative */
-           rec_build_pat(inf, alt->pat);
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_build_pat(re_inf *inf, rec_pat *pat)
-{
-    rec_pat *apat;
-    int length, offset = 0, distance, jump = 0, bas = 0;
-
-    while (pat && inf->ecode == 0) {
-       if (pat->rep) {
-           bas = inf->bas;
-           if (pat->type == Rep_Group && !inf->par && rec_code(inf, Re_Open))
-               return (inf->ecode);
-           if (rec_inc_spc(inf))
-               return (inf->ecode);
-           offset = inf->len;
-           if (rec_build_rep(inf, pat->rep))
-               break;
-           /* Reserve space to jump after repetition done */
-           jump = inf->len;
-           rec_byte_byte(inf, 0, 0);
-       }
-       switch (pat->type) {
-           case Rep_AnyAnyTimes:
-           case Rep_AnyMaybe:
-           case Rep_AnyAtLeast:
-               if (rec_add_spc(inf, pat->type == Rep_AnyMaybe))
-                   return (inf->ecode);
-               if (rec_code(inf, (ReCode)pat->type) == 0 &&
-                   rec_byte(inf, inf->bas - 1) == 0 &&
-                   rec_byte(inf, inf->ref - 1) == 0)
-                   rec_off_spc(inf);
-               break;
-           case Rep_Literal:
-           case Rep_LiteralNot:
-           case Rep_SearchLiteral:
-               rec_code_byte(inf, (ReCode)pat->type, pat->data.chr);
-               break;
-           case Rep_CaseLiteral:
-           case Rep_CaseLiteralNot:
-           case Rep_SearchCaseLiteral:
-               rec_code_byte_byte(inf, (ReCode)pat->type,
-                                  pat->data.cse.lower, pat->data.cse.upper);
-               break;
-           case Rep_Range:
-           case Rep_RangeNot:
-               if (rec_code(inf, (ReCode)pat->type) == 0)
-                   rec_build_rng(inf, pat->data.rng);
-               break;
-           case Rep_String:
-           case Rep_SearchString:
-           case Rep_CaseString:
-           case Rep_SearchCaseString:
-               rec_code(inf, (ReCode)pat->type);
-               length = strlen((char*)pat->data.str);
-               if (rec_length(inf, length) == 0 && rec_check(inf, length) == 0) {
-                   memcpy(inf->cod + inf->len, pat->data.str, length);
-                   inf->len += length;
-               }
-               break;
-           case Rep_Any:
-           case Rep_AnyEatAnyTimes:
-           case Rep_AnyEatMaybe:
-           case Rep_AnyEatAtLeast:
-           case Rep_Odigit:
-           case Rep_OdigitNot:
-           case Rep_Digit:
-           case Rep_DigitNot:
-           case Rep_Xdigit:
-           case Rep_XdigitNot:
-           case Rep_Space:
-           case Rep_SpaceNot:
-           case Rep_Tab:
-           case Rep_Newline:
-           case Rep_Lower:
-           case Rep_Upper:
-           case Rep_Alnum:
-           case Rep_AlnumNot:
-           case Rep_Control:
-           case Rep_ControlNot:
-           case Rep_Bol:
-           case Rep_Eol:
-           case Rep_Bow:
-           case Rep_Eow:
-               rec_code(inf, (ReCode)pat->type);
-               break;
-           case Rep_Backref:
-               rec_code_byte(inf, Re_Backref, pat->data.chr);
-               break;
-           case Rep_Group:
-               if (pat->rep == NULL && !inf->par && rec_code(inf, Re_Open))
-                   break;
-               apat = inf->apat;
-               inf->apat = pat->next;
-               rec_build_grp(inf, pat->data.grp);
-               inf->apat = apat;
-               break;
-           case Rep_StringList:
-               rec_build_stl(inf, pat->data.stl);
-               break;
-       }
-       if (pat->rep) {
-#if 0
-           if (rec_dec_spc(inf))
-               return (inf->ecode);
-#else
-           if (rec_rep_spc(inf, bas))
-               return (inf->ecode);
-#endif
-           distance = inf->len - offset;
-           if (distance > 255) {
-               if (rec_code(inf, Re_RepLongJump) ||
-                   rec_byte(inf, inf->bas) ||
-                   rec_byte(inf, distance & 0xff) ||
-                   rec_byte(inf, (distance & 0xff00) >> 8))
-               break;
-           }
-           else if (rec_code(inf, Re_RepJump) ||
-                    rec_byte(inf, inf->bas) ||
-                    rec_byte(inf, distance))
-               break;
-           distance = inf->len - offset;
-           inf->cod[jump] = distance & 0xff;
-           inf->cod[jump + 1] = (distance & 0xff00) >> 8;
-       }
-       pat = pat->next;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_build_rng(re_inf *inf, rec_rng *rng)
-{
-    if (rec_check(inf, sizeof(rng->range)) == 0) {
-       memcpy(inf->cod + inf->len, rng->range, sizeof(rng->range));
-       inf->len += sizeof(rng->range);
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_build_grp(re_inf *inf, rec_grp *grp)
-{
-    int par = inf->par;
-
-    if (!(inf->flags & RE_NOSUB)) {
-       ++inf->par;
-       if (par == 0)
-           ++inf->ref;
-       if (rec_build_alt(inf, grp->alt) == 0) {
-           if (par == 0) {
-               if (grp->comp)
-                   rec_code_byte(inf, Re_Update, inf->ref - 1);
-               else
-                   rec_code(inf, Re_Close);
-           }
-       }
-       --inf->par;
-    }
-    else
-       rec_build_alt(inf, grp->alt);
-
-    return (inf->ecode);
-}
-
-static int
-rec_build_stl(re_inf *inf, rec_stl *stl)
-{
-    int i, len, rlen;
-    ReCode code;
-
-    /* Calculate jump distance information */
-    rlen = stl->tlen + stl->nstrs + 4;
-    /* + code + nstrs + place-offset + data-length */
-
-    if (stl->nstrs >= LARGE_STL_COUNT) {
-       rlen += 511;            /* Don't write number of strings */
-       code = stl->type == Rep_StringList ?
-               Re_LargeStringList : Re_LargeCaseStringList;
-    }
-    else
-       code = (ReCode)stl->type;
-
-    if (rlen >= 16386)
-       return (inf->ecode = RE_ESPACE);
-    if (rec_check(inf, rlen) ||
-       rec_code(inf, code))
-       return (inf->ecode);
-
-    /* Space is allocated, just write the data */
-    if (stl->nstrs < LARGE_STL_COUNT)
-       inf->cod[inf->len++] = stl->nstrs;
-
-    inf->cod[inf->len++] = rlen & 0xff;
-    inf->cod[inf->len++] = (rlen & 0xff00) >> 8;
-
-    if (stl->nstrs < LARGE_STL_COUNT) {
-       for (i = 0; i < stl->nstrs; i++)
-           inf->cod[inf->len++] = stl->lens[i];
-       for (i = 0; i < stl->nstrs; i++) {
-           len = stl->lens[i];
-           if (len > 2) {
-               memcpy(inf->cod + inf->len, stl->strs[i], len);
-               inf->len += len;
-           }
-           else {
-               if (len == 1)
-                   inf->cod[inf->len++] = (long)stl->strs[i];
-               else {
-                   inf->cod[inf->len++] = (long)stl->strs[i] & 0xff;
-                   inf->cod[inf->len++] = ((long)stl->strs[i] & 0xff00) >> 8;
-               }
-           }
-       }
-    }
-    else {
-       /* The string length goes before the string itself */
-       int j, chl, chu;
-
-       /* Fill everything with an invalid jump address */
-       memset(inf->cod + inf->len, 0xff, 512);
-       for (i = len = 0, j = -1; i < stl->nstrs; i++) {
-           chl = stl->lens[i] > 2 ? stl->strs[i][0] : (long)stl->strs[i] & 0xff;
-           if (chl != j) {
-               inf->cod[inf->len + (chl << 1)] = len & 0xff;
-               inf->cod[inf->len + (chl << 1) + 1] = (len & 0xff00) >> 8;
-               if (code == Re_LargeCaseStringList) {
-                   chu = stl->lens[i] > 2 ?
-                       stl->strs[i][1] : ((long)(stl->strs[i]) & 0xff00) >> 8;
-                   inf->cod[inf->len + (chu << 1)] = len & 0xff;
-                   inf->cod[inf->len + (chu << 1) + 1] = (len & 0xff00) >> 8;
-               }
-               j = chl;
-           }
-           len += stl->lens[i] + 1;
-       }
-       inf->len += 512;
-
-       for (i = 0; i < stl->nstrs; i++) {
-           len = stl->lens[i];
-           inf->cod[inf->len++] = len;
-           if (len > 2) {
-               memcpy(inf->cod + inf->len, stl->strs[i], len);
-               inf->len += len;
-           }
-           else {
-               if (len == 1)
-                   inf->cod[inf->len++] = (long)stl->strs[i];
-               else {
-                   inf->cod[inf->len++] = (long)stl->strs[i] & 0xff;
-                   inf->cod[inf->len++] = ((long)stl->strs[i] & 0xff00) >> 8;
-               }
-           }
-       }
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_build_rep(re_inf *inf, rec_rep *rep)
-{
-    if (rep) {
-       switch (rep->type) {
-           case Rer_AnyTimes:
-           case Rer_AtLeast:
-           case Rer_Maybe:
-               rec_code(inf, (ReCode)rep->type);
-               break;
-           case Rer_Exact:
-               if (rec_code(inf, Re_Exact) == 0)
-                   rec_byte(inf, rep->mine);
-               break;
-           case Rer_Min:
-               if (rec_code(inf, Re_Min) == 0)
-                   rec_byte(inf, rep->mine);
-               break;
-           case Rer_Max:
-               if (rec_code(inf, Re_Max) == 0)
-                   rec_byte(inf, rep->maxc);
-               break;
-           case Rer_MinMax:
-               if (rec_code(inf, Re_MinMax) == 0 &&
-                   rec_byte(inf, rep->mine) == 0)
-                   rec_byte(inf, rep->maxc);
-               break;
-       }
-       /* It is incremented in rec_build_pat */
-       rec_byte(inf, inf->bas - 1);
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_inc_spc(re_inf *inf)
-{
-    if (++inf->bas >= MAX_DEPTH)
-       return (inf->ecode = RE_ESPACE);
-
-    return (inf->ecode);
-}
-
-static int
-rec_dec_spc(re_inf *inf)
-{
-    if (--inf->bas < 0)
-       return (inf->ecode = RE_ASSERT);
-
-    return (inf->ecode);
-}
-
-static int
-rec_add_spc(re_inf *inf, int maybe)
-{
-    if (++inf->bas >= MAX_DEPTH)
-       return (inf->ecode = RE_ESPACE);
-    inf->sp[inf->bas] = maybe + 1;
-
-    return (inf->ecode);
-}
-
-/* Could be joined with rec_rep_spc, code almost identical */
-static int
-rec_alt_spc(re_inf *inf, int top)
-{
-    int distance, i, bas = inf->bas;
-
-    while ((inf->bas > top) && inf->sp[inf->bas]) {
-       /* Jump to this repetition for cleanup */
-       distance = inf->len - inf->sr[inf->bas];
-
-       /* This will generate a jump to a jump decision opcode */
-       inf->sj[inf->bas] = inf->len;
-
-       if (distance > 255) {
-           if (rec_code(inf, Re_RepLongJump) ||
-               rec_byte(inf, inf->bas - 1) ||
-               rec_byte(inf, distance & 0xff) ||
-               rec_byte(inf, (distance & 0xff00) >> 8))
-           break;
-       }
-       else if (rec_code(inf, Re_RepJump) ||
-                rec_byte(inf, inf->bas - 1) ||
-                rec_byte(inf, distance))
-           break;
-
-       /* Top of stack value before repetition, or end condition value */
-       --inf->bas;
-    }
-
-    i = inf->bas + 1;
-
-    if (inf->ecode == 0 && i <= bas && inf->sp[i]) {
-       /*  Only the repetition at the bottom jump to code after testing
-        * all possibilities */
-       distance = inf->len - inf->sr[i];
-       inf->cod[inf->sr[i] + 3] = distance & 0xff;
-       inf->cod[inf->sr[i] + 4] = (distance & 0xff00) >> 8;
-
-       /* The bottom jump is here */
-       if (rec_code(inf, inf->sp[i] == 1 ? Re_DoneIf : Re_MaybeDone))
-          return (inf->ecode);
-
-       /*  Generate jumps to the previous special repetition */
-       for (++i; i <= bas; i++) {
-           if (inf->sp[i]) {
-               distance = inf->sj[i] - inf->sr[i];
-               inf->cod[inf->sr[i] + 3] = distance & 0xff;
-               inf->cod[inf->sr[i] + 4] = (distance & 0xff00) >> 8;
-           }
-       }
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_rep_spc(re_inf *inf, int top)
-{
-    int distance, i, bas = inf->bas;
-
-    while (inf->bas > top) {
-       if (inf->sp[inf->bas]) {
-           /* Jump to this repetition for cleanup */
-           distance = inf->len - inf->sr[inf->bas];
-
-           /* This will generate a jump to a jump decision opcode */
-           inf->sj[inf->bas] = inf->len;
-
-           if (distance > 255) {
-               if (rec_code(inf, Re_RepLongJump) ||
-                   rec_byte(inf, inf->bas - 1) ||
-                   rec_byte(inf, distance & 0xff) ||
-                   rec_byte(inf, (distance & 0xff00) >> 8))
-               break;
-           }
-           else if (rec_code(inf, Re_RepJump) ||
-                    rec_byte(inf, inf->bas - 1) ||
-                    rec_byte(inf, distance))
-               break;
-       }
-
-       /* Top of stack value before repetition, or end condition value */
-       --inf->bas;
-    }
-
-    /* Find first special repetition offset. XXX This should be a noop */
-    for (i = 0; i < bas; i++)
-       if (inf->sp[i])
-           break;
-
-    if (inf->ecode == 0 && i <= bas && inf->sp[i]) {
-       /*  Only the repetition at the bottom jump to code after testing
-        * all possibilities */
-       distance = inf->len - inf->sr[i];
-       inf->cod[inf->sr[i] + 3] = distance & 0xff;
-       inf->cod[inf->sr[i] + 4] = (distance & 0xff00) >> 8;
-
-       /*  Generate jumps to the previous special repetition */
-       for (++i; i <= bas; i++) {
-           if (inf->sp[i]) {
-               distance = inf->sj[i] - inf->sr[i];
-               inf->cod[inf->sr[i] + 3] = distance & 0xff;
-               inf->cod[inf->sr[i] + 4] = (distance & 0xff00) >> 8;
-           }
-       }
-    }
-
-    return (inf->ecode);
-}
-
-static int
-rec_off_spc(re_inf *inf)
-{
-    /* The jump address before the three bytes instruction */
-    inf->sr[inf->bas] = inf->len - 3;
-    /*  Don't know yet where to go after done with the special
-     * repetition, just reserve two bytes for the jump address. */
-    return (rec_byte_byte(inf, 0, 0));
-}
-
-#ifdef DEBUG
-static void
-redump(re_cod *code)
-{
-    int i, j, k;
-    unsigned char *cod = code->cod, *stl;
-
-    if (cod[0] & RE_NOSUB)
-       printf("Nosub\n");
-    if (cod[0] & RE_NEWLINE)
-       printf("Newline\n");
-    ++cod;
-    if (cod[0] != 0xff)
-       printf("%d backrefs\n", cod[0] + 1);
-    ++cod;
-    for (;;) {
-       switch (*cod++) {
-           case Re_Open:
-               printf("Open");
-               break;
-           case Re_Close:
-               printf("Close");
-               break;
-           case Re_Update:
-               printf("Update (%d)", (int)*cod++);
-               break;
-           case Re_Alt:
-               printf("Alt");
-               i = cod[0] | cod[1];
-               cod += 2;
-               printf(" %d", i);
-               break;
-           case Re_AltNext:
-               printf("Alt-next");
-               i = cod[0] | cod[1];
-               cod += 2;
-               printf(" %d", i);
-               break;
-           case Re_AltDone:
-               printf("Alt-done");
-               break;
-           case Re_AnyTimes:
-               printf("-> Anytimes %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_AnyEatAnyTimes:
-               printf("Any-eat-anytimes");
-               break;
-           case Re_AnyAnyTimes:
-               printf("-> Any-anytimes %d", (int)*cod++);
-               printf(" (%d)", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_AnyEatMaybe:
-               printf("Any-eat-maybe");
-               break;
-           case Re_AnyMaybe:
-               printf("-> Any-maybe %d", (int)*cod++);
-               printf(" (%d)", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_AnyAtLeast:
-               printf("-> Any-atleast %d", (int)*cod++);
-               printf(" (%d)", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_AnyEatAtLeast:
-               printf("Any-eat-atleast");
-               break;
-           case Re_Maybe:
-               printf("-> Maybe %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_AtLeast:
-               printf("-> Atleast %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_Exact:
-               printf("-> Exact ");
-               i = *cod++;
-               printf("%d", i);
-               printf(" %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_Min:
-               printf("-> Min ");
-               i = *cod++;
-               printf("%d", i);
-               printf(" %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_Max:
-               printf("-> Max ");
-               i = *cod++;
-               printf("%d", i);
-               printf(" %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_MinMax:
-               printf("-> Min-max ");
-               i = *cod++;
-               printf("%d ", i);
-               i = *cod++;
-               printf("%d", i);
-               printf(" %d", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               cod += 2;
-               printf(" /%d", i);
-               break;
-           case Re_RepJump:
-               printf("<- Rep-jump %d ", (int)*cod++);
-               i = *cod++;
-               printf("%d", i);
-               break;
-           case Re_RepLongJump:
-               printf("<- Rep-long-jump %d ", (int)*cod++);
-               i = cod[0] | (cod[1] << 8);
-               printf("%d", i);
-               break;
-           case Re_Any:
-               printf("Any");
-               break;
-           case Re_Odigit:
-               printf("Odigit");
-               break;
-           case Re_OdigitNot:
-               printf("Odigit-not");
-               break;
-           case Re_Digit:
-               printf("Digit");
-               break;
-           case Re_DigitNot:
-               printf("Digit-not");
-               break;
-           case Re_Xdigit:
-               printf("Xdigit");
-               break;
-           case Re_XdigitNot:
-               printf("Xdigit-not");
-               break;
-           case Re_Space:
-               printf("Space");
-               break;
-           case Re_SpaceNot:
-               printf("Space-not");
-               break;
-           case Re_Tab:
-               printf("Tab");
-               break;
-           case Re_Newline:
-               printf("Newline");
-               break;
-           case Re_Lower:
-               printf("Lower");
-               break;
-           case Re_Upper:
-               printf("Upper");
-               break;
-           case Re_Alnum:
-               printf("Alnum");
-               break;
-           case Re_AlnumNot:
-               printf("Alnum-not");
-               break;
-           case Re_Control:
-               printf("Control");
-               break;
-           case Re_ControlNot:
-               printf("Control-not");
-               break;
-           case Re_Bol:
-               printf("Bol");
-               break;
-           case Re_Eol:
-               printf("Eol");
-               break;
-           case Re_Bow:
-               printf("Bow");
-               break;
-           case Re_Eow:
-               printf("Eow");
-               break;
-           case Re_Range:
-               printf("Range ");
-               goto range;
-           case Re_RangeNot:
-               printf("Range-not ");
-range:
-               for (i = 0; i < 256; i += 32) {
-                   for (j = k = 0; j < 32; j++)
-                       k |= (*cod++ & 1) << (31 - j);
-                   printf("%x ", k);
-               }
-               break;
-           case Re_Literal:
-               printf("Literal %c", *cod++);
-               break;
-           case Re_LiteralNot:
-               printf("Literal-not %c", *cod++);
-               break;
-           case Re_SearchLiteral:
-               printf("Search-literal %c", *cod++);
-               break;
-           case Re_CaseLiteral:
-               printf("Case-literal %c", *cod++);
-               putchar(*cod++);
-               break;
-           case Re_CaseLiteralNot:
-               printf("Case-literal-not %c", *cod++);
-               putchar(*cod++);
-               break;
-           case Re_SearchCaseLiteral:
-               printf("Search-case-literal %c", *cod++);
-               putchar(*cod++);
-               break;
-           case Re_String:
-               printf("String ");
-               goto string;
-           case Re_SearchString:
-               printf("Search-string ");
-               goto string;
-           case Re_CaseString:
-               printf("Case-string ");
-               goto string;
-           case Re_SearchCaseString:
-               printf("Search-case-string ");
-string:
-               i = *cod++;
-               if (i & 0x80)
-                   i = (i & 0x7f) | (*cod++ << 7);
-               for (j = 0; j < i; j++)
-                   putchar(*cod++);
-               break;
-           case Re_StringList:
-               printf("String-list");
-               goto string_list;
-           case Re_CaseStringList:
-               printf("Case-string-list");
-string_list:
-               j = *cod++;
-               cod += 2;
-               stl = cod + j;
-               for (i = 0; i < j; i++) {
-                   k = *cod++;
-                   putchar(i ? ',' : ' ');
-                   fwrite(stl, k, 1, stdout);
-                   stl += k;
-               }
-               cod = stl;
-               break;
-           case Re_LargeStringList:
-               printf("Large-string-list");
-large_string_list:
-               i = cod[0] | (cod[1] << 8);
-               stl = cod + i - 1;
-               for (i = 0, cod += 514; cod < stl; i++) {
-                   k = *cod++;
-                   putchar(i ? ',' : ' ');
-                   fwrite(cod, k, 1, stdout);
-                   cod += k;
-               }
-               cod = stl;
-               break;
-           case Re_LargeCaseStringList:
-               printf("Large-case-string-list");
-               goto large_string_list;
-           case Re_Backref:
-               printf("Backref %d", (int)*cod++);
-               break;
-           case Re_DoneIf:
-               printf("Done-if");
-               break;
-           case Re_MaybeDone:
-               printf("Maybe-done");
-               break;
-           case Re_Done:
-               printf("Done\n");
-               return;
-       }
-       putchar('\n');
-    }
-}
-#endif
diff --git a/xedit/lisp/re/re.h b/xedit/lisp/re/re.h
deleted file mode 100644 (file)
index 209db51..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/re/re.h,v 1.1 2002/09/08 02:29:50 paulo Exp $ */
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#ifndef _re_h
-#define _re_h
-
-/*
- * Defines
- */
-
-       /* Compile flags options */
-#define REG_BASIC              0000    /* Not used */
-#define REG_EXTENDED           0001    /* Not used, only extended supported */
-
-#define RE_ICASE               0002
-#define RE_NOSUB               0004
-#define RE_NEWLINE             0010
-#define RE_NOSPEC              0020
-#define RE_PEND                        0040
-#define RE_DUMP                        0200
-
-
-
-       /* Execute flag options */
-#define RE_NOTBOL              1
-#define RE_NOTEOL              2
-#define RE_STARTEND            4
-#define RE_TRACE               00400   /* Not used/supported */
-#define RE_LARGE               01000   /* Not used/supported */
-#define RE_BACKR               02000   /* Not used/supported */
-
-       /* Value returned by reexec when match fails */
-#define RE_NOMATCH             1
-       /* Compile error values */
-#define RE_BADPAT              2
-#define RE_ECOLLATE            3
-#define RE_ECTYPE              4
-#define RE_EESCAPE             5
-#define RE_ESUBREG             6
-#define RE_EBRACK              7
-#define RE_EPAREN              8
-#define RE_EBRACE              9
-#define RE_EBADBR              10
-#define RE_ERANGE              11
-#define RE_ESPACE              12
-#define RE_BADRPT              13
-#define RE_EMPTY               14
-#define RE_ASSERT              15
-#define RE_INVARG              16
-#define RE_ATOI                        255     /* Not used/supported */
-#define RE_ITOA                        0400    /* Not used/supported */
-
-
-/*
- * Types
- */
-
-/* (re)gular expression (mat)ch result */
-typedef struct _re_mat {
-    long rm_so;
-    long rm_eo;
-} re_mat;
-
-/* (re)gular expression (cod)e */
-typedef struct _re_cod {
-    unsigned char *cod;
-    int re_nsub;               /* Public member */
-    const char *re_endp;       /* Support for RE_PEND */
-} re_cod;
-
-
-/*
- * Prototypes
- */
-       /* compile the given pattern string
-        * returns 0 on success, error code otherwise */
-int recomp(re_cod *preg, const char *pattern, int flags);
-
-       /* execute the compiled pattern on the string.
-        * returns 0 if matched, RE_NOMATCH if failed, error code otherwise */
-int reexec(const re_cod *preg, const char *string,
-          int nmat, re_mat pmat[], int flags);
-
-       /* formats an error message for the given code in ebuffer */
-int reerror(int ecode, const re_cod *preg, char *ebuffer, int ebuffer_size);
-
-       /* frees the given parameter */
-void refree(re_cod *preg);
-
-
-#endif /* _re_h */
diff --git a/xedit/lisp/re/rec.c b/xedit/lisp/re/rec.c
deleted file mode 100644 (file)
index d5f27ce..0000000
+++ /dev/null
@@ -1,1015 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/re/rec.c,v 1.3 2002/11/15 07:01:33 paulo Exp $ */
-
-#include "rep.h"
-
-/*
- * Types
- */
-
-/*  Information used while compiling the intermediate format of the re. */
-typedef struct _irec_info {
-    unsigned char *ptr;                /* Pointer in the given regex pattern */
-    unsigned char *end;                /* End of regex pattern */
-    int flags;                 /* Compile flags */
-    rec_alt *alt;              /* Toplevel first/single alternative */
-
-    rec_alt *palt;             /* Current alternative being compiled */
-    rec_grp *pgrp;             /* Current group, if any */
-    rec_pat *ppat;             /* Current pattern, if any */
-
-    /*  Number of open parenthesis, for error checking */
-    int nparens;
-
-    int ngrps;                 /* Number of groups, for backreference */
-
-    int ecode;
-} irec_info;
-
-
-/*
- * Prototypes
- */
-
-       /* (i)ntermediate (r)egular (e)xpression (c)ompile
-        *  Generates an intermediate stage compiled regex from
-        * the specified pattern argument. Basically builds an
-        * intermediate data structure to analyse and do syntax
-        * error checking.
-        */
-static void irec_simple_pattern(irec_info*, rec_pat_t);
-static void irec_literal_pattern(irec_info*, int);
-static void irec_case_literal_pattern(irec_info*, int);
-static void irec_open_group(irec_info*);
-static void irec_close_group(irec_info*);
-static void irec_range(irec_info*);
-static void irec_range_single(irec_info*, int);
-static void irec_range_complex(irec_info*, int, int);
-static void irec_escape(irec_info*);
-static void irec_simple_repetition(irec_info*, rec_rep_t);
-static void irec_complex_repetition(irec_info*);
-static void irec_add_repetition(irec_info*, rec_rep*);
-static void irec_free(irec_info*);
-static void irec_free_grp(rec_grp*);
-static void irec_free_pats(rec_pat*);
-
-
-/*
- * Implementation
- */
-rec_alt *
-irec_comp(const char *pattern, const char *endp, int flags, int *ecode)
-{
-    unsigned char *ptr;
-    rec_alt *alt;
-    irec_info inf;
-
-    if (pattern == NULL || endp < pattern) {
-       *ecode = RE_INVARG;
-       return (NULL);
-    }
-
-    if (endp == pattern) {
-       *ecode = RE_EMPTY;
-       return (NULL);
-    }
-
-    alt = calloc(1, sizeof(rec_alt));
-    if (alt == NULL) {
-       *ecode = RE_ESPACE;
-       return (NULL);
-    }
-
-    inf.ptr = (unsigned char*)pattern;
-    inf.end = (unsigned char*)endp;
-    inf.flags = flags;
-    inf.alt = inf.palt = alt;
-    inf.pgrp = NULL;
-    inf.ppat = NULL;
-    inf.nparens = inf.ngrps = 0;
-    inf.ecode = 0;
-
-    if (flags & RE_NOSPEC) {
-       /* Just searching for a character or substring */
-       for (; inf.ecode == 0 && inf.ptr < inf.end; inf.ptr++) {
-           if (!(flags & RE_ICASE) ||
-               (!isupper(*inf.ptr) && !islower(*inf.ptr)))
-               irec_literal_pattern(&inf, *inf.ptr);
-           else
-               irec_case_literal_pattern(&inf, *inf.ptr);
-       }
-    }
-    /* inf.ptr = inf.end is nul if flags & RE_NOSPEC */
-    for (; inf.ecode == 0 && inf.ptr < inf.end;) {
-       switch (*inf.ptr++) {
-           case '*':
-               irec_simple_repetition(&inf, Rer_AnyTimes);
-               break;
-           case '+':
-               irec_simple_repetition(&inf, Rer_AtLeast);
-               break;
-           case '?':
-               irec_simple_repetition(&inf, Rer_Maybe);
-               break;
-           case '.':
-               irec_simple_pattern(&inf, Rep_Any);
-               break;
-           case '^':
-               if (flags & RE_NEWLINE)
-                   /* It is up to the user decide if this can match */
-                   irec_simple_pattern(&inf, Rep_Bol);
-               else {
-                   for (ptr = inf.ptr - 1;
-                        ptr > (unsigned char*)pattern && *ptr == '('; ptr--)
-                       ;
-                   /* If at the start of a pattern */
-                   if (ptr == (unsigned char*)pattern || *ptr == '|')
-                       irec_simple_pattern(&inf, Rep_Bol);
-                   else
-                       /* In the middle of a pattern, treat as literal */
-                       irec_literal_pattern(&inf, '^');
-               }
-               break;
-           case '$':
-               if (flags & RE_NEWLINE)
-                   irec_simple_pattern(&inf, Rep_Eol);
-               else {
-                   /* Look ahead to check if is the last char of a group */
-                   for (ptr = inf.ptr; ptr < inf.end && *ptr == ')'; ptr++)
-                       ;
-                   if (*ptr == '\0' || *ptr == '|')
-                       /* Last character of pattern, an EOL match */
-                       irec_simple_pattern(&inf, Rep_Eol);
-                   else
-                       /* Normal character */
-                       irec_literal_pattern(&inf, '$');
-               }
-               break;
-           case '(':
-               irec_open_group(&inf);
-               break;
-           case ')':
-               /* Look ahead to check if need to close the group now */
-               ptr = inf.ptr;
-               if (*ptr != '*' && *ptr != '+' && *ptr != '?' && *ptr != '{')
-                   /* If a repetition does not follow */
-                   irec_close_group(&inf);
-               else if (inf.pgrp == NULL)
-                   /* A repetition follows, but current group is implicit */
-                   inf.ecode = RE_EPAREN;
-               else
-                   /* Can do this as next character is known */
-                   inf.ppat = NULL;
-               break;
-           case '[':
-               irec_range(&inf);
-               break;
-           case ']':
-               irec_literal_pattern(&inf, ']');
-               break;
-           case '{':
-               irec_complex_repetition(&inf);
-               break;
-           case '}':
-               irec_literal_pattern(&inf, '}');
-               break;
-           case '|':
-                   /* If first character in the pattern */
-               if (inf.ptr - 1 == (unsigned char*)pattern ||
-                   /* If last character in the pattern */
-                   inf.ptr >= inf.end ||
-                   /* If empty pattern */
-                   inf.ptr[0] == '|' ||
-                   inf.ptr[0] == ')')
-                   inf.ecode = RE_EMPTY;
-               else {
-                   rec_alt *alt = calloc(1, sizeof(rec_alt));
-
-                   if (alt) {
-                       alt->prev = inf.palt;
-                       inf.palt->next = alt;
-                       inf.palt = alt;
-                       inf.ppat = NULL;
-                   }
-                   else
-                       inf.ecode = RE_ESPACE;
-               }
-               break;
-           case '\\':
-               irec_escape(&inf);
-               break;
-           default:
-               if (!(flags & RE_ICASE) ||
-                   (!isupper(inf.ptr[-1]) && !islower(inf.ptr[-1])))
-                   irec_literal_pattern(&inf, inf.ptr[-1]);
-               else
-                   irec_case_literal_pattern(&inf, inf.ptr[-1]);
-               break;
-       }
-    }
-
-    /* Check if not all groups closed */
-    if (inf.ecode == 0 && inf.nparens)
-       inf.ecode = RE_EPAREN;
-
-    if (inf.ecode == 0)
-       inf.ecode = orec_comp(inf.alt, flags);
-
-    /* If an error generated */
-    if (inf.ecode) {
-       irec_free(&inf);
-       alt = NULL;
-    }
-
-    *ecode = inf.ecode;
-
-    return (alt);
-}
-
-void
-irec_free_alt(rec_alt *alt)
-{
-    rec_alt *next;
-
-    while (alt) {
-       next = alt->next;
-       irec_free_pats(alt->pat);
-       free(alt);
-       alt = next;
-    }
-}
-
-
-
-static void
-irec_simple_pattern(irec_info *inf, rec_pat_t type)
-{
-    rec_pat *pat;
-
-    /* Always add a new pattern to list */
-    if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    pat->type = type;
-    if ((pat->prev = inf->ppat) != NULL)
-       inf->ppat->next = pat;
-    else
-       inf->palt->pat = pat;
-    inf->ppat = pat;
-}
-
-static void
-irec_literal_pattern(irec_info *inf, int value)
-{
-    int length;
-    rec_pat *pat;
-    unsigned char chr, *str;
-
-       /* If there is a current pattern */
-    if (inf->ppat && inf->ppat->rep == NULL) {
-       switch (inf->ppat->type) {
-           case Rep_Literal:
-               /* Start literal string */
-               chr = inf->ppat->data.chr;
-               if ((str = malloc(16)) == NULL) {
-                   inf->ecode = RE_ESPACE;
-                   return;
-               }
-               inf->ppat->type = Rep_String;
-               inf->ppat->data.str = str;
-               str[0] = chr;
-               str[1] = value;
-               str[2] = '\0';
-               return;
-
-           case Rep_String:
-               /* Augments literal string */
-               length = strlen((char*)inf->ppat->data.str);
-               if ((length % 16) >= 14) {
-                   if ((str = realloc(inf->ppat->data.str,
-                                      length + 18)) == NULL) {
-                       inf->ecode = RE_ESPACE;
-                       return;
-                   }
-                   inf->ppat->data.str = str;
-               }
-               inf->ppat->data.str[length] = value;
-               inf->ppat->data.str[length + 1] = '\0';
-               return;
-
-           default:
-               /* Anything else is added as a new pattern list element */
-               break;
-       }
-    }
-
-    if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    pat->type = Rep_Literal;
-    pat->data.chr = value;
-    if ((pat->prev = inf->ppat) != NULL)
-       inf->ppat->next = pat;
-    else
-       inf->palt->pat = pat;
-    inf->ppat = pat;
-}
-
-static void
-irec_case_literal_pattern(irec_info *inf, int value)
-{
-    int length;
-    rec_pat *pat;
-    unsigned char plower, pupper, lower, upper, *str;
-
-    lower = tolower(value);
-    upper = toupper(value);
-
-       /* If there is a current pattern */
-    if (inf->ppat && inf->ppat->rep == NULL) {
-       switch (inf->ppat->type) {
-           case Rep_CaseLiteral:
-               /* Start case literal string */
-               plower = inf->ppat->data.cse.lower;
-               pupper = inf->ppat->data.cse.upper;
-               if ((str = malloc(32)) == NULL) {
-                   inf->ecode = RE_ESPACE;
-                   return;
-               }
-               inf->ppat->type = Rep_CaseString;
-               inf->ppat->data.str = str;
-               str[0] = plower;
-               str[1] = pupper;
-               str[2] = lower;
-               str[3] = upper;
-               str[4] = '\0';
-               return;
-
-           case Rep_CaseString:
-               /* Augments case literal string */
-               length = strlen((char*)inf->ppat->data.str);
-               if (((length) % 32) >= 28) {
-                   if ((str = realloc(inf->ppat->data.str,
-                                      length + 36)) == NULL) {
-                       inf->ecode = RE_ESPACE;
-                       return;
-                   }
-                   inf->ppat->data.str = str;
-               }
-               inf->ppat->data.str[length] = lower;
-               inf->ppat->data.str[length + 1] = upper;
-               inf->ppat->data.str[length + 2] = '\0';
-               return;
-
-           default:
-               /* Anything else is added as a new pattern list element */
-               break;
-       }
-    }
-
-    if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    pat->type = Rep_CaseLiteral;
-    pat->data.cse.lower = lower;
-    pat->data.cse.upper = upper;
-    pat->prev = inf->ppat;
-    if ((pat->prev = inf->ppat) != NULL)
-       inf->ppat->next = pat;
-    else
-       inf->palt->pat = pat;
-    inf->ppat = pat;
-}
-
-static void
-irec_open_group(irec_info *inf)
-{
-    rec_pat *pat;
-    rec_alt *alt;
-    rec_grp *grp;
-
-    if ((grp = calloc(1, sizeof(rec_grp))) == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-       free(grp);
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    if ((alt = calloc(1, sizeof(rec_alt))) == NULL) {
-       free(grp);
-       free(pat);
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    pat->type = Rep_Group;
-    pat->data.grp = grp;
-    grp->parent = pat;
-    grp->palt = inf->palt;
-    grp->pgrp = inf->pgrp;
-    grp->alt = alt;
-    grp->comp = 0;
-    if ((pat->prev = inf->ppat) != NULL)
-       inf->ppat->next = pat;
-    else
-       inf->palt->pat = pat;
-    inf->palt = alt;
-    inf->ppat = NULL;
-
-    /* Only toplevel parenthesis supported */
-    if (++inf->nparens == 1)
-       ++inf->ngrps;
-
-    inf->pgrp = grp;
-}
-
-static void
-irec_close_group(irec_info *inf)
-{
-    if (inf->pgrp == NULL) {
-       inf->ecode = RE_EPAREN;
-       return;
-    }
-
-    inf->palt = inf->pgrp->palt;
-    inf->ppat = inf->pgrp->parent;
-    inf->pgrp = inf->pgrp->pgrp;
-
-    --inf->nparens;
-}
-
-static void
-irec_range(irec_info *inf)
-{
-    int count;
-    rec_pat *pat;
-    rec_rng *rng;
-    int not = inf->ptr[0] == '^';
-
-    if (not)
-       ++inf->ptr;
-
-    pat = calloc(1, sizeof(rec_pat));
-    if (pat == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    rng = calloc(1, sizeof(rec_rng));
-    if (pat == NULL) {
-       free(pat);
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    pat->data.rng = rng;
-    pat->type = not ? Rep_RangeNot : Rep_Range;
-    if ((pat->prev = inf->ppat) != NULL)
-       inf->ppat->next = pat;
-    else
-       inf->palt->pat = pat;
-    inf->ppat = pat;
-
-    /* First pass, add everything seen */
-    for (count = 0; inf->ecode == 0; count++) {
-       /* If bracket not closed */
-       if (inf->ptr == inf->end) {
-           inf->ecode = RE_EBRACK;
-           return;
-       }
-       /* If not the first character */
-       else if (inf->ptr[0] == ']' && count)
-           break;
-       else {
-           /* If not a range of characters */
-           if (inf->ptr[1] != '-' || inf->ptr[2] == ']') {
-               irec_range_single(inf, inf->ptr[0]);
-               ++inf->ptr;
-           }
-           else {
-               if ((inf->flags & RE_NEWLINE) &&
-                   inf->ptr[0] < '\n' && inf->ptr[2] > '\n') {
-                   /*  Unless it is forced to be a delimiter, don't allow
-                    * a newline in a character range */
-                   if (inf->ptr[0] == '\n' - 1)
-                       irec_range_single(inf, inf->ptr[0]);
-                   else
-                       irec_range_complex(inf, inf->ptr[0], '\n' - 1);
-                   if (inf->ptr[2] == '\n' + 1)
-                       irec_range_single(inf, inf->ptr[2]);
-                   else
-                       irec_range_complex(inf, '\n' + 1, inf->ptr[2]);
-               }
-               else
-                   irec_range_complex(inf, inf->ptr[0], inf->ptr[2]);
-               inf->ptr += 3;
-           }
-       }
-    }
-
-    /* Skip ] */
-    ++inf->ptr;
-}
-
-static void
-irec_range_single(irec_info *inf, int value)
-{
-    if (value >= 0 && value <= 255)
-       inf->ppat->data.rng->range[value] = 1;
-
-    if (inf->flags & RE_ICASE) {
-       if (islower(value)) {
-           value = toupper(value);
-           if (value >= 0 && value <= 255)
-               inf->ppat->data.rng->range[value] = 1;
-       }
-       else if (isupper(value)) {
-           value = tolower(value);
-           if (value >= 0 && value <= 255)
-               inf->ppat->data.rng->range[value] = 1;
-       }
-    }
-}
-
-static void
-irec_range_complex(irec_info *inf, int chrf, int chrt)
-{
-    if (chrf > chrt) {
-       inf->ecode = RE_ERANGE;
-       return;
-    }
-
-    for (; chrf <= chrt; chrf++)
-       irec_range_single(inf, chrf);
-}
-
-static void
-irec_escape(irec_info *inf)
-{
-    rec_pat *pat;
-    unsigned char chr = inf->ptr[0];
-
-    if (chr == 0) {
-       inf->ecode = RE_EESCAPE;
-       return;
-    }
-    ++inf->ptr;
-    switch (chr) {
-       case 'o':
-           irec_simple_pattern(inf, Rep_Odigit);
-           break;
-       case 'O':
-           irec_simple_pattern(inf, Rep_OdigitNot);
-           break;
-       case 'd':
-           irec_simple_pattern(inf, Rep_Digit);
-           break;
-       case 'D':
-           irec_simple_pattern(inf, Rep_DigitNot);
-           break;
-       case 'x':
-           irec_simple_pattern(inf, Rep_Xdigit);
-           break;
-       case 'X':
-           irec_simple_pattern(inf, Rep_XdigitNot);
-           break;
-       case 's':
-           irec_simple_pattern(inf, Rep_Space);
-           break;
-       case 'S':
-           irec_simple_pattern(inf, Rep_SpaceNot);
-           break;
-       case 't':
-           irec_simple_pattern(inf, Rep_Tab);
-           break;
-       case 'n':
-           irec_simple_pattern(inf, Rep_Newline);
-           break;
-       case 'l':
-           irec_simple_pattern(inf, Rep_Lower);
-           break;
-       case 'u':
-           irec_simple_pattern(inf, Rep_Upper);
-           break;
-       case 'w':
-           irec_simple_pattern(inf, Rep_Alnum);
-           break;
-       case 'W':
-           irec_simple_pattern(inf, Rep_AlnumNot);
-           break;
-       case 'c':
-           irec_simple_pattern(inf, Rep_Control);
-           break;
-       case 'C':
-           irec_simple_pattern(inf, Rep_ControlNot);
-           break;
-       case '<':
-           irec_simple_pattern(inf, Rep_Bow);
-           break;
-       case '>':
-           irec_simple_pattern(inf, Rep_Eow);
-           break;
-       case '1':       case '2':       case '3':
-       case '4':       case '5':       case '6':
-       case '7':       case '8':       case '9':
-           if ((inf->flags & RE_NOSUB) || (chr -= '1') >= inf->ngrps) {
-               inf->ecode = RE_ESUBREG;
-               return;
-           }
-           if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-               inf->ecode = RE_ESPACE;
-               return;
-           }
-           pat->type = Rep_Backref;
-           pat->data.chr = chr;
-           pat->prev = inf->ppat;
-           if (inf->ppat)
-               inf->ppat->next = pat;
-           else
-               inf->palt->pat = pat;
-           inf->ppat = pat;
-           break;
-
-       /* True literals */
-       case '0':
-           irec_literal_pattern(inf, '\0');
-           break;
-       case 'a':
-           irec_literal_pattern(inf, '\a');
-           break;
-       case 'b':
-           irec_literal_pattern(inf, '\b');
-           break;
-       case 'f':
-           irec_literal_pattern(inf, '\f');
-           break;
-       case 'r':
-           irec_literal_pattern(inf, '\r');
-           break;
-       case 'v':
-           irec_literal_pattern(inf, '\v');
-           break;
-
-       default:
-           /* Don't check if case insensitive regular expression */
-           irec_literal_pattern(inf, chr);
-           break;
-    }
-}
-
-static void
-irec_simple_repetition(irec_info *inf, rec_rep_t type)
-{
-    rec_rep *rep;
-
-       /* If nowhere to add repetition */
-    if ((inf->pgrp == NULL && inf->ppat == NULL) ||
-       /* If repetition already added to last/current pattern */
-       (inf->pgrp == NULL && inf->ppat->rep != NULL) ||
-       /* If repetition already added to last/current group */
-       (inf->ppat == NULL && inf->pgrp->parent->rep != NULL)) {
-       inf->ecode = RE_BADRPT;
-       return;
-    }
-
-    if ((rep = calloc(1, sizeof(rec_rep))) == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-    rep->type = type;
-    irec_add_repetition(inf, rep);
-}
-
-static void
-irec_complex_repetition(irec_info *inf)
-{
-    int exact;
-    rec_rep *rep;
-    long mine, maxc;
-    unsigned char *end;
-
-       /* If nowhere to add repetition */
-    if ((inf->pgrp == NULL && inf->ppat == NULL) ||
-       /* If repetition already added to last/current pattern */
-       (inf->pgrp == NULL && inf->ppat->rep != NULL) ||
-       /* If repetition already added to last/current group */
-       (inf->ppat == NULL && inf->pgrp->parent->rep != NULL)) {
-       inf->ecode = RE_EBADBR;
-       return;
-    }
-
-    exact = 0;
-    mine = maxc = -1;
-    if (inf->ptr[0] == ',')
-       /* Specify max number of ocurrences only */
-       goto domax;
-    else if (!isdigit(inf->ptr[0]))
-       goto badbr;
-
-    mine = strtol((char*)inf->ptr, (char**)&end, 10);
-    inf->ptr = end;
-    if (inf->ptr[0] == '}') {
-       exact = 1;
-       ++inf->ptr;
-       goto redone;
-    }
-    else if (inf->ptr[0] != ',')
-       goto badbr;
-
-domax:
-       /* Add one to skip comma */
-    ++inf->ptr;
-    if (inf->ptr[0] == '}') {
-       ++inf->ptr;
-       goto redone;
-    }
-    else if (!isdigit(inf->ptr[0]))
-       goto badbr;
-    maxc = strtol((char*)inf->ptr, (char**)&end, 10);
-    inf->ptr = end;
-    if (inf->ptr[0] != '}')
-       goto badbr;
-    ++inf->ptr;
-
-redone:
-    if (mine == maxc) {
-       maxc = -1;
-       exact = 1;
-    }
-
-    /* Check range and if min-max parameters are valid */
-    if (mine >= 255 || maxc >= 255 ||
-       (mine >= 0 && maxc >= 0 && mine > maxc))
-       goto badbr;
-
-    /* Check for noop */
-    if (exact && mine == 1)
-       return;
-
-    if ((rep = calloc(1, sizeof(rec_rep))) == NULL) {
-       inf->ecode = RE_ESPACE;
-       return;
-    }
-
-       /* Convert {0,1} to ? */
-    if (mine == 0 && maxc == 1)
-       rep->type = Rer_Maybe;
-    else if (exact) {
-       rep->type = Rer_Exact;
-       rep->mine = mine;
-    }
-       /* Convert {0,} to * */
-    else if (mine == 0 && maxc == -1)
-       rep->type = Rer_AnyTimes;
-       /* Convert {1,} to + */
-    else if (mine == 1 && maxc == -1)
-       rep->type = Rer_AtLeast;
-    else if (maxc == -1) {
-       rep->type = Rer_Min;
-       rep->mine = mine;
-    }
-    else if (mine < 1) {
-       rep->type = Rer_Max;
-       rep->maxc = maxc;
-    }
-    else {
-       rep->type = Rer_MinMax;
-       rep->mine = mine;
-       rep->maxc = maxc;
-    }
-
-    irec_add_repetition(inf, rep);
-
-    return;
-
-badbr:
-    inf->ecode = RE_EBADBR;
-}
-
-/*  The rep argument is allocated and has no reference yet,
- * if something fails it must be freed before returning.
- */
-static void
-irec_add_repetition(irec_info *inf, rec_rep *rep)
-{
-    int length;
-    rec_pat *pat;
-    rec_grp *grp;
-    rec_rep_t rept;
-    unsigned char value, upper;
-
-    rept = rep->type;
-
-    if (inf->ppat == NULL) {
-       rec_pat *any;
-       rec_grp *grp = inf->pgrp;
-
-       if (rept == Rer_AnyTimes || rept == Rer_Maybe || rept == Re_AtLeast) {
-           /* Convert (.)* to (.*), ((.))* not handled and may not match */
-           any = NULL;
-
-           if (grp->alt && grp->alt->pat) {
-               for (any = grp->alt->pat; any->next; any = any->next)
-                   ;
-               switch (any->type) {
-                   case Rep_Any:
-                       break;
-                   case Rep_AnyAnyTimes:
-                   case Rep_AnyMaybe:
-                   case Rep_AnyAtLeast:
-                       free(rep);
-                       inf->ecode = RE_BADRPT;
-                       return;
-                   default:
-                       any = NULL;
-                       break;
-               }
-           }
-           if (any) {
-               free(rep);
-               rep = NULL;
-               any->type = (rept == Rer_AnyTimes) ? Rep_AnyAnyTimes :
-                           (rept == Rer_AtLeast) ? Rep_AnyAtLeast :
-                           Rep_AnyMaybe;
-               while (grp) {
-                   ++grp->comp;
-                   grp = grp->pgrp;
-               }
-           }
-       }
-       inf->pgrp->parent->rep = rep;
-       irec_close_group(inf);
-       return;
-    }
-
-    switch (inf->ppat->type) {
-       case Rep_Bol:
-       case Rep_Eol:
-       case Rep_Bow:
-       case Rep_Eow:
-       case Rep_AnyAnyTimes:
-       case Rep_AnyMaybe:
-       case Rep_AnyAtLeast:
-           /* Markers that cannot repeat */
-           free(rep);
-           inf->ecode = RE_BADRPT;
-           return;
-
-       case Rep_Any:
-           grp = inf->pgrp;
-           free(rep);
-           if (rept == Rer_AnyTimes ||
-               rept == Rer_Maybe ||
-               rept == Rer_AtLeast) {
-               inf->ppat->type = (rept == Rer_AnyTimes) ?
-                                  Rep_AnyAnyTimes :
-                                 (rept == Rer_Maybe) ?
-                                  Rep_AnyMaybe :
-                                  Rep_AnyAtLeast;
-               while (grp) {
-                   ++grp->comp;
-                   grp = grp->pgrp;
-               }
-           }
-           else
-               /* XXX Not (yet) implemented */
-               inf->ecode = RE_BADRPT;
-           rep = NULL;
-           break;
-
-       case Rep_String:
-           if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-               free(rep);
-               inf->ecode = RE_ESPACE;
-               return;
-           }
-
-           length = strlen((char*)inf->ppat->data.str);
-           pat->type = Rep_Literal;
-           pat->prev = inf->ppat;
-           pat->data.chr = inf->ppat->data.str[length - 1];
-           if (length == 2) {
-               /* Must convert to two Rep_Literals */
-               value = inf->ppat->data.str[0];
-               free(inf->ppat->data.str);
-               inf->ppat->data.chr = value;
-               inf->ppat->type = Rep_Literal;
-           }
-           else
-               /* Must remove last character from string */
-               inf->ppat->data.str[length - 1] = '\0';
-           inf->ppat->next = pat;
-           inf->ppat = pat;
-           break;
-
-       case Rep_CaseString:
-           if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-               free(rep);
-               inf->ecode = RE_ESPACE;
-               return;
-           }
-
-           length = strlen((char*)inf->ppat->data.str);
-           pat->type = Rep_CaseLiteral;
-           pat->prev = inf->ppat;
-           pat->data.cse.lower = inf->ppat->data.str[length - 2];
-           pat->data.cse.upper = inf->ppat->data.str[length - 1];
-           if (length == 4) {
-               /* Must convert to two Rep_CaseLiterals */
-               value = inf->ppat->data.str[0];
-               upper = inf->ppat->data.str[1];
-               free(inf->ppat->data.str);
-               inf->ppat->data.cse.lower = value;
-               inf->ppat->data.cse.upper = upper;
-               inf->ppat->next = pat;
-               inf->ppat->type = Rep_CaseLiteral;
-           }
-           else
-               /* Must remove last character pair from string */
-               inf->ppat->data.str[length - 2] = '\0';
-           inf->ppat->next = pat;
-           inf->ppat = pat;
-           break;
-
-       default:
-           /* Anything else does not need special handling */
-           break;
-    }
-
-    inf->ppat->rep = rep;
-}
-
-static void
-irec_free(irec_info *inf)
-{
-    irec_free_alt(inf->alt);
-}
-
-static void
-irec_free_grp(rec_grp *grp)
-{
-    if (grp->alt)
-       irec_free_alt(grp->alt);
-    free(grp);
-}
-
-static void
-irec_free_pats(rec_pat *pat)
-{
-    rec_pat *next;
-    rec_pat_t rect;
-
-    while (pat) {
-       next = pat->next;
-       if (pat->rep)
-           free(pat->rep);
-       rect = pat->type;
-       if (rect == Rep_Range || rect == Rep_RangeNot)
-           free(pat->data.rng);
-       else if (rect == Rep_Group)
-           irec_free_grp(pat->data.grp);
-       else if (rect == Rep_StringList)
-           orec_free_stl(pat->data.stl);
-       free(pat);
-       pat = next;
-    }
-}
diff --git a/xedit/lisp/re/reo.c b/xedit/lisp/re/reo.c
deleted file mode 100644 (file)
index af47b50..0000000
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/re/reo.c,v 1.8 2002/09/29 02:55:01 paulo Exp $ */
-
-#include "rep.h"
-
-/*
- *  This file is a placeholder to add code to analyse and optimize the
- * intermediate data structure generated in rep.c.
- *  Character ranges are optimized while being generated.
- */
-
-/*
- * Types
- */
-typedef struct _orec_inf {
-    rec_alt *alt;                      /* Main alternatives list */
-    rec_grp *grp;                      /* Current group pointer */
-    int flags;
-    int ecode;
-} orec_inf;
-
-/*
- * Prototypes
- */
-static int orec_alt(orec_inf*, rec_alt*);
-static int orec_pat(orec_inf*, rec_pat*);
-static int orec_grp(orec_inf*, rec_grp*);
-static int orec_pat_bad_rpt(orec_inf*, rec_pat*);
-static int orec_pat_bad_forward_rpt(orec_inf*, rec_pat*);
-static int orec_pat_rng(orec_inf*, rec_pat*);
-static int orec_pat_cse(orec_inf*, rec_pat*);
-static int orec_pat_cse_can(orec_inf*, rec_pat*);
-static int orec_str_list(orec_inf*, rec_alt*, int, int);
-
-/*
- * Initialization
- */
-extern unsigned char re__alnum[256];
-extern unsigned char re__odigit[256];
-extern unsigned char re__ddigit[256];
-extern unsigned char re__xdigit[256];
-extern unsigned char re__control[256];
-
-/*
- * Implementation
- */
-int
-orec_comp(rec_alt *alt, int flags)
-{
-    orec_inf inf;
-
-    inf.alt = alt;
-    inf.grp = NULL;
-    inf.flags = flags;
-    inf.ecode = 0;
-
-    orec_alt(&inf, alt);
-
-    return (inf.ecode);
-}
-
-void
-orec_free_stl(rec_stl *stl)
-{
-    int i;
-
-    for (i = 0; i < stl->nstrs; i++) {
-       if (stl->lens[i] > 2)
-           free(stl->strs[i]);
-    }
-
-    free(stl->lens);
-    free(stl->strs);
-    free(stl);
-}
-
-
-static int
-orec_alt(orec_inf *inf, rec_alt *alt)
-{
-    if (alt) {
-       rec_alt *ptr = alt;
-       int ret, count = 0, str = 1, cstr = 1, lits = 0, clits = 0;
-
-       /* Check if can build a string list */
-       if (ptr->next) {
-           /* If more than one alternative */
-           while (ptr && (str || cstr)) {
-               if (ptr->pat == NULL || ptr->pat->rep != NULL) {
-                   cstr = str = 0;
-                   break;
-               }
-               if ((inf->flags & RE_ICASE)) {
-                   if (!(ret = orec_pat_cse_can(inf, ptr->pat))) {
-                       cstr = str = 0;
-                       break;
-                   }
-                   if (ret == 1)
-                       ++lits;
-                   else if (ret == 2)
-                       ++clits;
-               }
-               else if (ptr->pat->next == NULL) {
-                   if (ptr->pat->type != Rep_String) {
-                       if (ptr->pat->type != Rep_Literal) {
-                           str = 0;
-                           if (ptr->pat->type != Rep_CaseString) {
-                               if (ptr->pat->type != Rep_CaseLiteral)
-                                   cstr = 0;
-                               else
-                                   ++clits;
-                           }
-                           else if (strlen((char*)ptr->pat->data.str) >= 255)
-                               str = cstr = 0;
-                       }
-                       else
-                           ++lits;
-                   }
-                   else if (strlen((char*)ptr->pat->data.str) >= 255)
-                       str = cstr = 0;
-               }
-               else {
-                   str = cstr = 0;
-                   break;
-               }
-               if (++count >= 255)
-                   str = cstr = 0;
-               ptr = ptr->next;
-           }
-
-           if (str || cstr) {
-               if (inf->flags & RE_ICASE) {
-                   for (ptr = alt; ptr; ptr = ptr->next) {
-                       if (orec_pat_cse(inf, ptr->pat))
-                           return (inf->ecode);
-                   }
-                   str = 0;
-               }
-               return (orec_str_list(inf, alt, str, count));
-           }
-       }
-       else if (alt == inf->alt && alt->pat && alt->pat->rep == NULL) {
-           /* If the toplevel single alternative */
-           switch (alt->pat->type) {
-               /*  One of these will always be true for RE_NOSPEC,
-                * but can also be optimized for simple patterns */
-               case Rep_Literal:
-                   alt->pat->type = Rep_SearchLiteral;
-                   break;
-               case Rep_CaseLiteral:
-                   alt->pat->type = Rep_SearchCaseLiteral;
-                   break;
-               case Rep_String:
-                   alt->pat->type = Rep_SearchString;
-                   break;
-               case Rep_CaseString:
-                   alt->pat->type = Rep_SearchCaseString;
-                   break;
-               default:
-                   break;
-           }
-       }
-
-       while (alt) {
-           orec_pat(inf, alt->pat);
-           alt = alt->next;
-       }
-    }
-
-    return (inf->ecode);
-}
-
-static int
-orec_pat(orec_inf *inf, rec_pat *pat)
-{
-    rec_pat *next;
-
-    while (pat) {
-       switch (pat->type) {
-           case Rep_AnyAnyTimes:
-               if (pat->next == NULL) {
-                   rec_grp *grp = inf->grp;
-
-                   next = NULL;
-                   while (grp) {
-                       next = grp->parent->next;
-                       /* Cannot check if is .*$ as the input
-                        * may be a substring */
-                       if (next)
-                           break;
-                       grp = grp->pgrp;
-                   }
-                   if (next == NULL) {
-                       /*    <re>.*    */
-                       pat->type = Rep_AnyEatAnyTimes;
-                       grp = inf->grp;
-                       while (grp) {
-                           --grp->comp;
-                           next = grp->parent->next;
-                           if (next)
-                               break;
-                           grp = grp->pgrp;
-                       }
-                   }
-                   else if (orec_pat_bad_rpt(inf, next))
-                       return (inf->ecode);
-               }
-               else if (orec_pat_bad_rpt(inf, pat->next))
-                   return (inf->ecode);
-               break;
-           case Rep_AnyMaybe:
-               if (pat->next == NULL) {
-                   rec_grp *grp = inf->grp;
-
-                   next = NULL;
-                   while (grp) {
-                       next = grp->parent->next;
-                       if (next)
-                           break;
-                       grp = grp->pgrp;
-                   }
-                   if (next == NULL) {
-                       /*    <re>.?    */
-                       pat->type = Rep_AnyEatMaybe;
-                       grp = inf->grp;
-                       while (grp) {
-                           --grp->comp;
-                           next = grp->parent->next;
-                           if (next)
-                               break;
-                           grp = grp->pgrp;
-                       }
-                   }
-                   else if (orec_pat_bad_rpt(inf, next))
-                       return (inf->ecode);
-               }
-               else if (orec_pat_bad_rpt(inf, pat->next))
-                   return (inf->ecode);
-               break;
-           case Rep_AnyAtLeast:
-               if (pat->next == NULL) {
-                   rec_grp *grp = inf->grp;
-
-                   next = NULL;
-                   while (grp) {
-                       next = grp->parent->next;
-                       if (next)
-                           break;
-                       grp = grp->pgrp;
-                   }
-                   if (next == NULL) {
-                       /*    <re>.+    */
-                       pat->type = Rep_AnyEatAtLeast;
-                       grp = inf->grp;
-                       while (grp) {
-                           --grp->comp;
-                           next = grp->parent->next;
-                           if (next)
-                               break;
-                           grp = grp->pgrp;
-                       }
-                   }
-                   else if (orec_pat_bad_rpt(inf, next))
-                       return (inf->ecode);
-               }
-               else if (orec_pat_bad_rpt(inf, pat->next))
-                   return (inf->ecode);
-               break;
-           case Rep_Range:
-           case Rep_RangeNot:
-               orec_pat_rng(inf, pat);
-               break;
-           case Rep_Group:
-               orec_grp(inf, pat->data.grp);
-               break;
-           default:
-               break;
-       }
-       pat = pat->next;
-    }
-
-    return (inf->ecode);
-}
-
-static int
-orec_pat_bad_rpt(orec_inf *inf, rec_pat *pat)
-{
-    switch (pat->type) {
-       /* Not really an error, but aren't supported by the library.
-        * Includes:  .*.*, .+<re>?  .*<re>*, (.*)(<re>*), etc.
-        */
-
-       /* Not a repetition, but mathes anything... */
-       case Rep_Any:
-
-       /* Zero length matches */
-       case Rep_Eol:
-           if (!(inf->flags & RE_NEWLINE))
-               break;
-       case Rep_Bol:
-       case Rep_Bow:
-       case Rep_Eow:
-
-       /* Repetitions */
-       case Rep_AnyAnyTimes:
-       case Rep_AnyMaybe:
-       case Rep_AnyAtLeast:
-           inf->ecode = RE_BADRPT;
-           break;
-
-       /* Check if the first group element is a complex pattern */
-       case Rep_Group:
-           if (pat->rep == NULL) {
-               if (pat->data.grp->alt) {
-                   for (pat = pat->data.grp->alt->pat; pat; pat = pat->next) {
-                       if (orec_pat_bad_rpt(inf, pat))
-                           break;
-                   }
-               }
-               break;
-           }
-           /*FALLTHROUGH*/
-       default:
-           if (pat->rep)
-               inf->ecode = RE_BADRPT;
-           break;
-    }
-
-    if (!inf->ecode && pat && pat->next)
-       orec_pat_bad_forward_rpt(inf, pat->next);
-
-    return (inf->ecode);
-}
-
-static int
-orec_pat_bad_forward_rpt(orec_inf *inf, rec_pat *pat)
-{
-    if (pat->rep) {
-       switch (pat->rep->type) {
-           case Rer_MinMax:
-               if (pat->rep->mine > 0)
-                   break;
-           case Rer_AnyTimes:
-           case Rer_Maybe:
-           case Rer_Max:
-               inf->ecode = RE_BADRPT;
-           default:
-               break;
-       }
-    }
-    else if (pat->type == Rep_Group &&
-            pat->data.grp->alt &&
-            pat->data.grp->alt->pat)
-       orec_pat_bad_forward_rpt(inf, pat->data.grp->alt->pat);
-
-    return (inf->ecode);
-}
-
-static int
-orec_grp(orec_inf *inf, rec_grp *grp)
-{
-    rec_grp *prev = inf->grp;
-
-    inf->grp = grp;
-    orec_alt(inf, grp->alt);
-    /* Could also just say: inf->grp = grp->gparent */
-    inf->grp = prev;
-
-    return (inf->ecode);
-}
-
-static int
-orec_pat_rng(orec_inf *inf, rec_pat *pat)
-{
-    int i, j[2], count;
-    rec_pat_t type = pat->type;
-    unsigned char *range = pat->data.rng->range;
-
-    for (i = count = j[0] = j[1] = 0; i < 256; i++) {
-       if (range[i]) {
-           if (count == 2) {
-               ++count;
-               break;
-           }
-           j[count++] = i;
-       }
-    }
-
-    if (count == 1 ||
-       (count == 2 &&
-        ((islower(j[0]) && toupper(j[0]) == j[1]) ||
-         (isupper(j[0]) && tolower(j[0]) == j[1])))) {
-       free(pat->data.rng);
-       if (count == 1) {
-           pat->data.chr = j[0];
-           pat->type = type == Rep_Range ? Rep_Literal : Rep_LiteralNot;
-       }
-       else {
-           pat->data.cse.upper = j[0];
-           pat->data.cse.lower = j[1];
-           pat->type = type == Rep_Range ? Rep_CaseLiteral : Rep_CaseLiteralNot;
-       }
-    }
-    else {
-       if (memcmp(re__alnum, range, 256) == 0)
-           type = type == Rep_Range ? Rep_Alnum : Rep_AlnumNot;
-       else if (memcmp(re__odigit, range, 256) == 0)
-           type = type == Rep_Range ? Rep_Odigit : Rep_OdigitNot;
-       else if (memcmp(re__ddigit, range, 256) == 0)
-           type = type == Rep_Range ? Rep_Digit : Rep_DigitNot;
-       else if (memcmp(re__xdigit, range, 256) == 0)
-           type = type == Rep_Range ? Rep_Xdigit : Rep_XdigitNot;
-       else if (memcmp(re__control, range, 256) == 0)
-           type = type == Rep_Range ? Rep_Control : Rep_ControlNot;
-
-       if (type != pat->type) {
-           free(pat->data.rng);
-           pat->type = type;
-       }
-    }
-
-    return (inf->ecode);
-}
-
-/*  Join patterns if required, will only fail on memory allocation failure:
- */
-static int
-orec_pat_cse(orec_inf *inf, rec_pat *pat)
-{
-    rec_pat_t type;
-    int i, len, length;
-    rec_pat *ptr, *next;
-    unsigned char *str, *tofree;
-
-    if (pat->next == NULL && pat->type == Rep_CaseString)
-       return (inf->ecode);
-
-    type = Rep_CaseString;
-
-    /* First calculate how many bytes will be required */
-    for (ptr = pat, length = 1; ptr; ptr = ptr->next) {
-       switch (ptr->type) {
-           case Rep_Literal:
-               length += 2;
-               break;
-           case Rep_String:
-               length += strlen((char*)ptr->data.str) << 1;
-               break;
-           case Rep_CaseLiteral:
-               length += 2;
-               break;
-           case Rep_CaseString:
-               length += strlen((char*)ptr->data.str);
-               break;
-           default:
-               break;
-       }
-    }
-
-    if ((str = malloc(length)) == NULL)
-       return (inf->ecode = RE_ESPACE);
-
-    for (ptr = pat, length = 0; ptr; ptr = next) {
-       tofree = NULL;
-       next = ptr->next;
-       switch (ptr->type) {
-           case Rep_Literal:
-               str[length++] = ptr->data.chr;
-               str[length++] = ptr->data.chr;
-               break;
-           case Rep_String:
-               tofree = ptr->data.str;
-               len = strlen((char*)tofree);
-               for (i = 0; i < len; i++) {
-                   str[length++] = tofree[i];
-                   str[length++] = tofree[i];
-               }
-               break;
-           case Rep_CaseLiteral:
-               str[length++] = ptr->data.cse.lower;
-               str[length++] = ptr->data.cse.upper;
-               break;
-           case Rep_CaseString:
-               tofree = ptr->data.str;
-               len = strlen((char*)tofree);
-               memcpy(str + length, tofree, len);
-               length += len;
-               break;
-           default:
-               break;
-       }
-       if (tofree)
-           free(tofree);
-       if (ptr != pat)
-           free(ptr);
-    }
-    str[length] = '\0';
-
-    pat->type = type;
-    pat->data.str = str;
-    pat->next = NULL;
-
-    return (inf->ecode);
-}
-
-/*  Return 0 if the patterns in the list cannot be merged, 1 if will
- * be a simple string, 2 if a case string.
- *  This is useful when building an alternative list that is composed
- * only of strings, but the regex is case insensitive, in wich case
- * the first pass may have splited some patterns, but if it is a member
- * of an alternatives list, the cost of using a string list is smaller */
-static int
-orec_pat_cse_can(orec_inf *inf, rec_pat *pat)
-{
-    int ret;
-
-    if (pat == NULL)
-       return (0);
-
-    for (ret = 1; pat; pat = pat->next) {
-       if (pat->rep)
-           return (0);
-       switch (pat->type) {
-           case Rep_Literal:
-           case Rep_String:
-               break;
-           case Rep_CaseLiteral:
-           case Rep_CaseString:
-               ret = 2;
-               break;
-           default:
-               return (0);
-       }
-    }
-
-    return (ret);
-}
-
-
-/*  XXX If everything is a (case) byte, the pattern should be
- * [abcde] instead of a|b|c|d|e (or [aAbBcCdDeE] instead of aA|bB|cC|dD|eE)
- * as a string list works fine, but as a character range
- * should be faster, and maybe could be converted here. But not
- * very important, if performance is required, it should have already
- * been done in the pattern.
- */
-static int
-orec_str_list(orec_inf *inf, rec_alt *alt, int str, int count)
-{
-    rec_stl *stl;
-    rec_pat *pat;
-    rec_alt *ptr, *next;
-    int i, j, tlen, len, is;
-
-    if ((stl = calloc(1, sizeof(rec_stl))) == NULL)
-       return (inf->ecode = RE_ESPACE);
-
-    if ((stl->lens = malloc(sizeof(unsigned char) * count)) == NULL) {
-       free(stl);
-       return (inf->ecode = RE_ESPACE);
-    }
-
-    if ((stl->strs = malloc(sizeof(char*) * count)) == NULL) {
-       free(stl->lens);
-       free(stl);
-       return (inf->ecode = RE_ESPACE);
-    }
-
-    if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
-       free(stl->strs);
-       free(stl->lens);
-       free(stl);
-       return (inf->ecode = RE_ESPACE);
-    }
-
-    pat->data.stl = stl;
-    pat->type = Rep_StringList;
-    stl->type = str ? Resl_StringList : Resl_CaseStringList;
-    for (i = tlen = 0, ptr = alt; i < count; i++) {
-       next = ptr->next;
-       switch (ptr->pat->type) {
-           case Rep_Literal:
-               is = len = 1;
-               break;
-           case Rep_CaseLiteral:
-               is = len = 2;
-               break;
-           default:
-               is = 0;
-               len = strlen((char*)ptr->pat->data.str);
-               break;
-       }
-       tlen += len;
-       stl->lens[i] = len;
-       if (!is) {
-           if (len > 2)
-               stl->strs[i] = ptr->pat->data.str;
-           else {
-               if (len == 1)
-                   stl->strs[i] = (void*)(long)(ptr->pat->data.str[0]);
-               else
-                   stl->strs[i] = (void*)(long)
-                                  (ptr->pat->data.str[0] |
-                                   ((int)ptr->pat->data.str[1] << 8));
-               free(ptr->pat->data.str);
-           }
-       }
-       else {
-           if (is == 1)
-               stl->strs[i] = (void*)(long)ptr->pat->data.chr;
-           else
-               stl->strs[i] = (void*)(long)
-                              (ptr->pat->data.cse.lower |
-                               (ptr->pat->data.cse.upper << 8));
-       }
-       free(ptr->pat);
-       if (i)
-           free(ptr);
-       ptr = next;
-    }
-    stl->tlen = tlen;
-    stl->nstrs = count;
-
-    alt->pat = pat;
-    alt->next = NULL;
-
-    {
-       int li, lj;
-       unsigned char ci, cj, *str;
-
-       /*  Don't need a stable sort, there shouldn't be duplicated strings,
-        * but don't check for it either. Only need to make sure that all
-        * strings that start with the same byte are together */
-       for (i = 0; i < count; i++) {
-           li = stl->lens[i];
-           ci = li > 2 ? stl->strs[i][0] : (long)stl->strs[i] & 0xff;
-           for (j = i + 1; j < count; j++) {
-               lj = stl->lens[j];
-               cj = lj > 2 ? stl->strs[j][0] : (long)stl->strs[j] & 0xff;
-               if ((count >= LARGE_STL_COUNT && cj < ci) ||
-                   (cj == ci && lj > li)) {
-                   /* If both strings start with the same byte,
-                    * put the longer first */
-                   str = stl->strs[j];
-                   stl->strs[j] = stl->strs[i];
-                   stl->strs[i] = str;
-                   stl->lens[j] = li;
-                   stl->lens[i] = lj;
-                   li ^= lj; lj ^= li; li ^= lj;
-                   ci ^= cj; cj ^= ci; ci ^= cj;
-               }
-           }
-       }
-    }
-
-    return (inf->ecode);
-}
diff --git a/xedit/lisp/re/rep.h b/xedit/lisp/re/rep.h
deleted file mode 100644 (file)
index afd13ed..0000000
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/re/rep.h,v 1.2 2002/11/15 07:01:33 paulo Exp $ */
-
-#include "re.h"
-
-#ifndef _rep_h
-#define _rep_h
-
-/*
- * Local defines
- */
-
-#ifdef MIN
-#undef MIN
-#endif
-#define MIN(a, b)      ((a) < (b) ? (a) : (b))
-
-#ifdef MAX
-#undef MAX
-#endif
-#define MAX(a, b)      ((a) > (b) ? (a) : (b))
-
-/*  This value can not be larger than 255, a depth value is the nesting of
- * repetition operations and alternatives. The number of nested parenthesis
- * does not matter, but a repetition on the pattern inside the parenthesis
- * does. Note also that you cannot have more than 9 parenthesis pairs in
- * an expression.
- *  Depth is always at least 1. So for MAX_DEPTH 8, it is only allowed
- * 7 complex repetitions. A complex repetition is a dot followed by an
- * repetition operator. It is called a complex repetition because dot
- * matches anything but the empty string, so the engine needs to test
- * all possible combinations until the end of the string is found.
- *  Repetitions like .* use one depth until the end of the string is found,
- * for example a.*b.*c.*d has depth 4, while a*b*c*d has depth 2.
- */
-#define MAX_DEPTH      8
-
-/*  Minimum number of strings to generate a "large" string list, that is,
- * sort the strings and allocate 512 extra bytes to map the first string
- * with a given initial byte. */
-#define LARGE_STL_COUNT        16
-
-/*
- * Local types
- */
-/* Intermediate compilation types declaration */
-       /* (r)egular (e)xpression (c)ompile (c)a(se) */
-typedef struct _rec_cse rec_cse;
-
-       /* (r)egular (e)xpression (c)ompile (r)a(ng)e */
-typedef struct _rec_rng rec_rng;
-
-       /* (r)egular (e)xpression (c)ompile (pat)tern */
-typedef struct _rec_pat rec_pat;
-
-       /* (r)egular (e)xpression (c)ompile (rep)etition */
-typedef struct _rec_rep rec_rep;
-
-       /* (r)egular (e)xpression (c)ompile (gr)ou(p) */
-typedef struct _rec_grp rec_grp;
-
-       /* (r)egular (e)xpression (c)ompile (alt)ernatives */
-typedef struct _rec_alt rec_alt;
-
-
-/* Optimization types */
-       /* (r)egular (e)xpression (c)ompile (st)ring (l)ist */
-typedef struct _rec_stl rec_stl;
-
-/* Final compilation and execution types */
-       /* (re)gular expression (inf)ormation */
-typedef struct _re_inf re_inf;
-
-       /* (re)gular expression (eng)ine */
-typedef struct _re_eng re_eng;
-
-
-/* Codes used by the engine */
-typedef enum {
-    /* Grouping */
-    Re_Open,                   /* ( */
-    Re_Close,                  /* ) */
-    Re_Update,                 /* Like Re_Close, but is inside a loop */
-
-    /* Alternatives */
-    Re_Alt,                    /* Start alternative list, + next offset */
-    Re_AltNext,                        /* Next alternative, + next offset */
-    Re_AltDone,                        /* Finish alternative list */
-
-    /* Repetition */
-    Re_AnyTimes,               /* * */
-    Re_Maybe,                  /* ? */
-    Re_AtLeast,                        /* +, at least one */
-
-    /* Repetition like */
-    Re_AnyAnyTimes,            /* .*<re> */
-    Re_AnyMaybe,               /* .?<re> */
-    Re_AnyAtLeast,             /* .+<re> */
-
-    Re_AnyEatAnyTimes,         /* Expression ends with .* */
-    Re_AnyEatMaybe,            /* Expression ends with .? */
-    Re_AnyEatAtLeast,          /* Expression ends with .+ */
-
-    /* Repetition with arguments */
-    Re_Exact,                  /* {e} */
-    Re_Min,                    /* {n,} */
-    Re_Max,                    /* {,m} */
-    Re_MinMax,                 /* {n,m} */
-
-    /* Repetition helper instruction */
-    Re_RepJump,                        /* Special code, go back to repetition */
-    Re_RepLongJump,            /* Jump needs two bytes */
-       /*  After the repetition data, all repetitions have an offset
-        * to the code after the repetition */
-
-    /* Matching */
-    Re_Any,                    /* . */
-    Re_Odigit,                 /* \o */
-    Re_OdigitNot,              /* \O */
-    Re_Digit,                  /* \d */
-    Re_DigitNot,               /* \D */
-    Re_Xdigit,                 /* \x */
-    Re_XdigitNot,              /* \x */
-    Re_Space,                  /* \s */
-    Re_SpaceNot,               /* \S */
-    Re_Tab,                    /* \t */
-    Re_Newline,                        /* \n */
-    Re_Lower,                  /* \l */
-    Re_Upper,                  /* \u */
-    Re_Alnum,                  /* \w */
-    Re_AlnumNot,               /* \W */
-    Re_Control,                        /* \c */
-    Re_ControlNot,             /* \C */
-    Re_Bol,                    /* ^ */
-    Re_Eol,                    /* $ */
-    Re_Bow,                    /* \< */
-    Re_Eow,                    /* \> */
-
-    /* Range matching information */
-    Re_Range,                  /* + 256 bytes */
-    Re_RangeNot,               /* + 256 bytes */
-
-    /* Matching with arguments */
-    Re_Literal,                        /* + character */
-    Re_CaseLiteral,            /* + lower + upper */
-    Re_LiteralNot,             /* + character */
-    Re_CaseLiteralNot,         /* + lower + upper */
-    Re_String,                 /* + length + string */
-    Re_CaseString,             /* + length + string in format lower-upper */
-
-    /* These are useful to start matching, or when RE_NOSPEC is used. */
-    Re_SearchLiteral,
-    Re_SearchCaseLiteral,
-    Re_SearchString,
-    Re_SearchCaseString,
-
-    Re_StringList,             /* + total-length + lengths + strings */
-    Re_CaseStringList,         /* + total-length + lengths + strings */
-
-    Re_LargeStringList,                /* + total-length + lengths + map + strings */
-    Re_LargeCaseStringList,    /* + total-length + lengths + map + strings */
-
-    /* Backreference */
-    Re_Backref,                        /* + reference number */
-
-    /* The last codes */
-    Re_DoneIf,                 /* Done if at end of input */
-    Re_MaybeDone,              /* Done */
-    Re_Done                    /* If this code found, finished execution */
-} ReCode;
-
-
-/* (r)egular (e)xpresssion (pat)rern (t)ype */
-typedef enum _rec_pat_t {
-    Rep_Literal                        = Re_Literal,
-    Rep_CaseLiteral            = Re_CaseLiteral,
-    Rep_LiteralNot             = Re_LiteralNot,
-    Rep_CaseLiteralNot         = Re_CaseLiteralNot,
-    Rep_Range                  = Re_Range,
-    Rep_RangeNot               = Re_RangeNot,
-    Rep_String                 = Re_String,
-    Rep_CaseString             = Re_CaseString,
-    Rep_SearchLiteral          = Re_SearchLiteral,
-    Rep_SearchCaseLiteral      = Re_SearchCaseLiteral,
-    Rep_SearchString           = Re_SearchString,
-    Rep_SearchCaseString       = Re_SearchCaseString,
-    Rep_Any                    = Re_Any,
-    Rep_AnyAnyTimes            = Re_AnyAnyTimes,
-    Rep_AnyEatAnyTimes         = Re_AnyEatAnyTimes,
-    Rep_AnyMaybe               = Re_AnyMaybe,
-    Rep_AnyEatMaybe            = Re_AnyEatMaybe,
-    Rep_AnyAtLeast             = Re_AnyAtLeast,
-    Rep_AnyEatAtLeast          = Re_AnyEatAtLeast,
-    Rep_Odigit                 = Re_Odigit,
-    Rep_OdigitNot              = Re_OdigitNot,
-    Rep_Digit                  = Re_Digit,
-    Rep_DigitNot               = Re_DigitNot,
-    Rep_Xdigit                 = Re_Xdigit,
-    Rep_XdigitNot              = Re_XdigitNot,
-    Rep_Space                  = Re_Space,
-    Rep_SpaceNot               = Re_SpaceNot,
-    Rep_Tab                    = Re_Tab,
-    Rep_Newline                        = Re_Newline,
-    Rep_Lower                  = Re_Lower,
-    Rep_Upper                  = Re_Upper,
-    Rep_Alnum                  = Re_Alnum,
-    Rep_AlnumNot               = Re_AlnumNot,
-    Rep_Control                        = Re_Control,
-    Rep_ControlNot             = Re_ControlNot,
-    Rep_Bol                    = Re_Bol,
-    Rep_Eol                    = Re_Eol,
-    Rep_Bow                    = Re_Bow,
-    Rep_Eow                    = Re_Eow,
-    Rep_Backref                        = Re_Backref,
-    Rep_StringList             = Re_StringList,
-    Rep_Group                  = Re_Open
-} rec_pat_t;
-
-
-/* (r)egular (e)xpression (rep)etition (t)ype */
-typedef enum _rec_rep_t {
-    Rer_AnyTimes               = Re_AnyTimes,
-    Rer_AtLeast                        = Re_AtLeast,
-    Rer_Maybe                  = Re_Maybe,
-    Rer_Exact                  = Re_Exact,
-    Rer_Min                    = Re_Min,
-    Rer_Max                    = Re_Max,
-    Rer_MinMax                 = Re_MinMax
-} rec_rep_t;
-
-
-/*  Decide at re compilation time what is lowercase and what is uppercase */
-struct _rec_cse {
-    unsigned char lower;
-    unsigned char upper;
-};
-
-
-/*  A rec_rng is used only during compilation, just a character map */
-struct _rec_rng {
-    unsigned char range[256];
-};
-
-
-/*  A rec_pat is used only during compilation, and can be viewed as
- * a regular expression element like a match to any character, a match
- * to the beginning or end of the line, etc.
- *  It is implemented as a linked list, and does not have nesting.
- *  The data field can contain:
- *     chr:    the value of a single character to match.
- *     cse:    the upper and lower case value of a character to match.
- *     rng:    a character map to match or not match.
- *     str:    a simple string or a string where every two bytes
- *             represents the character to match, in lower/upper
- *             case sequence.
- *  The rep field is not used for strings, strings are broken in the
- * last character in this case. That is, strings are just a concatenation
- * of several character matches.
- */
-struct _rec_pat {
-    rec_pat_t type;
-    rec_pat *next, *prev;      /* Linked list information */
-    union {
-       unsigned char chr;
-       rec_cse cse;
-       rec_rng *rng;
-       rec_grp *grp;
-       unsigned char *str;
-       rec_stl *stl;
-    } data;
-    rec_rep *rep;              /* Pattern repetition information */
-};
-
-
-/*  A rec_rep is used only during compilation, and can be viewed as:
- *
- *     ? or * or + or {<e>} or {<m>,} or {,<M>} or {<m>,<M>}
- *
- * where <e> is "exact", <m> is "minimum" and <M> is "maximum".
- *  In the compiled step it can also be just a NULL pointer, that
- * is actually equivalent to {1}.
- */
-struct _rec_rep {
-    rec_rep_t type;
-    short mine;                        /* minimum or exact number of matches */
-    short maxc;                        /* maximum number of matches */
-};
-
-
-/*  A rec_alt is used only during compilation, and can be viewed as:
- *
- *     <re>|<re>
- *
- * where <re> is any regular expression. The expressions are nested
- * using the grp field of the rec_pat structure.
- */
-struct _rec_alt {
-    rec_alt *next, *prev;      /* Linked list information */
-    rec_pat *pat;
-};
-
-
-/*  A rec_grp is a place holder for expressions enclosed in parenthesis
- * and is linked to the compilation data by an rec_pat structure. */
-struct _rec_grp {
-    rec_pat *parent;           /* Reference to parent pattern */
-    rec_alt *alt;              /* The pattern information */
-    rec_alt *palt;             /* Parent alternative */
-    rec_grp *pgrp;             /* Nested groups */
-    int comp;                  /* (comp)lex repetition pattern inside group */
-};
-
-
-/* Optimization compilation types definition */
-       /* (r)egular (e)xpression (c)ompile (st)ring (l)ist (t)ype */
-typedef enum {
-    Resl_StringList            = Re_StringList,
-    Resl_CaseStringList                = Re_CaseStringList
-} rec_stl_t;
-
-struct _rec_stl {
-    rec_stl_t type;
-    int nstrs;                 /* Number of strings in list */
-    int tlen;                  /* Total length of all strings */
-    unsigned char *lens;       /* Vector of string lengths */
-    unsigned char **strs;      /* The strings */
-};
-
-
-/*
- * Prototypes
- */
-       /* rep.c */
-rec_alt *irec_comp(const char*, const char*, int, int*);
-void irec_free_alt(rec_alt*);
-
-       /* reo.c */
-int orec_comp(rec_alt*, int);
-void orec_free_stl(rec_stl*);
-
-#endif /* _rep_h */
diff --git a/xedit/lisp/re/tests.c b/xedit/lisp/re/tests.c
deleted file mode 100644 (file)
index 21b1e10..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86$ */
-
-/*
- * Compile with:       cc -o tests tests.c -L. -lre
- */
-
-#include <stdio.h>
-#include <string.h>
-#include "re.h"
-
-int
-main(int argc, char *argv[])
-{
-    re_cod cod;
-    re_mat mat[10];
-    int line, ecode, i, len, group, failed;
-    long eo, so;
-    char buf[8192];
-    char str[8192];
-    FILE *fp = fopen("tests.txt", "r");
-
-    if (fp == NULL) {
-       fprintf(stderr, "failed to open tests.txt\n");
-       exit(1);
-    }
-
-    ecode = line = group = failed = 0;
-    cod.cod = NULL;
-    while (fgets(buf, sizeof(buf), fp)) {
-       ++line;
-       if (buf[0] == '#' || buf[0] == '\n')
-           continue;
-       else if (buf[0] == '/') {
-           char *ptr = strrchr(buf, '/');
-
-           if (ptr == buf) {
-               fprintf(stderr, "syntax error at line %d\n", line);
-               break;
-           }
-           else {
-               int flags = 0;
-
-               refree(&cod);
-               for (*ptr++ = '\0'; *ptr; ptr++) {
-                   if (*ptr == 'i')
-                       flags |= RE_ICASE;
-                   else if (*ptr == 'n')
-                       flags |= RE_NEWLINE;
-               }
-               ecode = recomp(&cod, buf + 1, flags);
-               failed = ecode;
-           }
-       }
-       else if (buf[0] == '>') {
-           if (cod.cod == NULL) {
-               fprintf(stderr, "no previous pattern at line %d\n", line);
-               break;
-           }
-           len = strlen(buf) - 1;
-           buf[len] = '\0';
-           strcpy(str, buf + 1);
-           for (i = 0, --len; i < len - 1; i++) {
-               if (str[i] == '\\') {
-                   memmove(str + i, str + i + 1, len);
-                   --len;
-                   switch (str[i]) {
-                       case 'a':
-                           str[i] = '\a';
-                           break;
-                       case 'b':
-                           str[i] = '\b';
-                           break;
-                       case 'f':
-                           str[i] = '\f';
-                           break;
-                       case 'n':
-                           str[i] = '\n';
-                           break;
-                       case 'r':
-                           str[i] = '\r';
-                           break;
-                       case 't':
-                           str[i] = '\t';
-                           break;
-                       case 'v':
-                           str[i] = '\v';
-                           break;
-                       default:
-                           break;
-                   }
-               }
-           }
-           group = 0;
-           ecode = reexec(&cod, str, 10, &mat[0], 0);
-           if (ecode && ecode != RE_NOMATCH) {
-               reerror(failed, &cod, buf, sizeof(buf));
-               fprintf(stderr, "%s, at line %d\n", buf, line);
-               break;
-           }
-       }
-       else if (buf[0] == ':') {
-           if (failed) {
-               len = strlen(buf) - 1;
-               buf[len] = '\0';
-               if (failed == RE_EESCAPE && strcmp(buf, ":EESCAPE") == 0)
-                   continue;
-               if (failed == RE_ESUBREG && strcmp(buf, ":ESUBREG") == 0)
-                   continue;
-               if (failed == RE_EBRACK && strcmp(buf, ":EBRACK") == 0)
-                   continue;
-               if (failed == RE_EPAREN && strcmp(buf, ":EPAREN") == 0)
-                   continue;
-               if (failed == RE_EBRACE && strcmp(buf, ":EBRACE") == 0)
-                   continue;
-               if (failed == RE_EBADBR && strcmp(buf, ":EBADBR") == 0)
-                   continue;
-               if (failed == RE_ERANGE && strcmp(buf, ":ERANGE") == 0)
-                   continue;
-               if (failed == RE_ESPACE && strcmp(buf, ":ESPACE") == 0)
-                   continue;
-               if (failed == RE_BADRPT && strcmp(buf, ":BADRPT") == 0)
-                   continue;
-               if (failed == RE_EMPTY && strcmp(buf, ":EMPTY") == 0)
-                   continue;
-               reerror(failed, &cod, buf, sizeof(buf));
-               fprintf(stderr, "Error value %d doesn't match: %s, at line %d\n",
-                       failed, buf, line);
-               break;
-           }
-           else if (!ecode) {
-               fprintf(stderr, "found match when shoudn't, at line %d\n", line);
-               break;
-           }
-       }
-       else {
-           if (failed) {
-               reerror(failed, &cod, buf, sizeof(buf));
-               fprintf(stderr, "%s, at line %d\n", buf, line);
-               break;
-           }
-           if (sscanf(buf, "%ld,%ld:", &so, &eo) != 2) {
-               fprintf(stderr, "expecting match offsets at line %d\n", line);
-               break;
-           }
-           else if (ecode) {
-               fprintf(stderr, "didn't match, at line %d\n", line);
-               break;
-           }
-           else if (group >= 10) {
-               fprintf(stderr, "syntax error at line %d (too many groups)\n",
-                       line);
-               break;
-           }
-           else if (so != mat[group].rm_so || eo != mat[group].rm_eo) {
-               fprintf(stderr, "match failed at line %d, got %ld,%ld: ",
-                       line, mat[group].rm_so, mat[group].rm_eo);
-               if (mat[group].rm_so < mat[group].rm_eo)
-                   fwrite(str + mat[group].rm_so,
-                          mat[group].rm_eo - mat[group].rm_so, 1, stderr);
-               fputc('\n', stderr);
-               break;
-           }
-           ++group;
-       }
-    }
-
-    fclose(fp);
-
-    return (ecode);
-}
diff --git a/xedit/lisp/re/tests.txt b/xedit/lisp/re/tests.txt
deleted file mode 100644 (file)
index 35fd90b..0000000
+++ /dev/null
@@ -1,470 +0,0 @@
-#
-#  Copyright (c) 2002 by The XFree86 Project, Inc.
-#
-#  Permission is hereby granted, free of charge, to any person obtaining a
-#  copy of this software and associated documentation files (the "Software"),
-#  to deal in the Software without restriction, including without limitation
-#  the rights to use, copy, modify, merge, publish, distribute, sublicense,
-#  and/or sell copies of the Software, and to permit persons to whom the
-#  Software is furnished to do so, subject to the following conditions:
-#
-#  The above copyright notice and this permission notice shall be included in
-#  all copies or substantial portions of the Software.
-#
-#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-#  THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-#  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-#  OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-#  SOFTWARE.
-#
-#  Except as contained in this notice, the name of the XFree86 Project shall
-#  not be used in advertising or otherwise to promote the sale, use or other
-#  dealings in this Software without prior written authorization from the
-#  XFree86 Project.
-#
-#  Author: Paulo César Pereira de Andrade
-#
-#
-# $XFree86: xc/programs/xedit/lisp/re/tests.txt,v 1.1 2002/09/08 02:29:50 paulo Exp $
-
-# Some tests for the library:
-#      lines starting with # are comments
-#      lines starting with / are a regular expression pattern
-#              The pattern must end with / and may be followed by:
-#                      i -> ignore case
-#                      n -> create newline sensitive regex
-#      lines starting with > are a string input to the last pattern
-#              To test newline sensitive matching, add \n to the string.
-#      lines starting with a number are the expected result
-#              If more than one line, every subsequent line is the
-#              value of an "subresult".
-#      :NOMATCH means that the string input should not match
-
-# Simple string
-/abc/
->abc
-0,3: abc
->aaaaaaaaaaaaaaabc
-14,17: abc
->xxxxxxxxxxxxxxaaaaaaaaaaaaaaaaabcxx
-30,33: abc
-
-# String list
-/abc|bcd|cde/
->abc
-0,3: abc
->aabc
-1,4: abc
->xxxbcdef
-3,6: bcd
->abdzzzcdabcde
-8,11: abc
->xxxxabdecdabdcde
-13,16: cde
-
-# Complex string
-/a?bc|ab?c|abc?/
->abc
-0,3: abc
->xxxb
-:NOMATCH
->xxxbc
-3,5: bc
->sssssab
-5,7: ab
-
-# Another complex string
-/a*bc|ab*c|abc*/
->aaaaaaabc
-0,9: aaaaaaabc
->xaaaaaaabc
-1,10: aaaaaaabc
->xyzaaaaaaabc
-3,12: aaaaaaabc
->abbc
-0,4: abbc
->xxabbbbbc
-2,9: abbbbbc
->abcccccccccc
-0,12: abcccccccccc
->abccccccccccd
-0,12: abcccccccccc
->xxxxxxxaaaaaaaaaabbbbbbbbbbbccccccccccc
-16,29: abbbbbbbbbbbc
->xxxbbbbbbbbbc
-11,13: bc
-
-# Another complex string
-/a+bc|ab+c|abc+/
->xxxbc
-:NOMATCH
->xaaabc
-1,6: aaabc
->zzzzaaaaabbc
-8,12: abbc
->zzzzaaaabbbbbbcccc
-7,15: abbbbbbc
-
-# Simple pattern
-/a.c/
->abc
-0,3: abc
->aaac
-1,4: aac
->xac
-:NOMATCH
->xaac
-1,4: aac
->xxabc
-2,5: abc
->xxxaxc
-3,6: axc
-
-# Another simple pattern
-/a*c/
->c
-0,1: c
->xxxxxxxxc
-8,9: c
->xxxxxxxcc
-7,8: c
->ac
-0,2: ac
->aaaac
-0,5: aaaac
->xac
-1,3: ac
->xxxaac
-3,6: aac
->xxac
-2,4: ac
->xxxxac
-4,6: ac
-
-# Another simple pattern
-/a+c/
->xxaac
-2,5: aac
->xxxaaaac
-3,8: aaaac
->xaaaabac
-6,8: ac
->xxxc
-:NOMATCH
->xxxxaaaaccc
-4,9: aaaac
-
-# Another simple pattern
-/a{4}b/
->xabxxaabxxxaaabxxxxaaaab
-19,24: aaaab
->aaabaaaab
-4,9: aaaab
-
-# Another simple pattern
-/a{4,}b/
->xxxaaaab
-3,8: aaaab
->zaaabzzzaaaaaaaaaaaaaaaab
-8,25: aaaaaaaaaaaaaaaab
-
-# Another simple pattern
-/a{,4}b/
->b
-0,1: b
->xxxxxxxxb
-8,9: b
->xaaaaaaaaab
-6,11: aaaab
->xxxab
-3,5: ab
->aaaaaxaaab
-6,10: aaab
-
-# Another simple pattern
-/a{2,4}b/
->xab
-:NOMATCH
->xaab
-1,4: aab
->xaaab
-1,5: aaab
->xxaaaab
-2,7: aaaab
->xxxaaaaab
-4,9: aaaab
-
-# Some simple grouping tests
-/foo(bar|baz)fee/
->feebarbazfoobarfee
-9,18: foobarfee
-12,15: bar
->foofooobazfeefoobazfee
-13,22: foobazfee
-/f(oo|ee)ba[rz]/
->barfoebaz
-:NOMATCH
->bazfoobar
-3,9: foobar
-4,6: oo
->barfeebaz
-3,9: feebaz
-4,6: ee
-/\<(int|char)\>/
->aint character int foo
-15,18: int
-15,18: int
-
-# Some complex repetitions
-/foo.*bar/
->barfoblaboofoobarfoobarfoobar
-11,17: foobar
-/foo.+bar/
->foobar
-:NOMATCH
->fobbarfooxbarfooybar
-6,13: fooxbar
-/foo.?bar/
->xfoobar
-1,7: foobar
->xxfooxxbar
-:NOMATCH
->yyyfootbar
-3,10: footbar
-
-# Some nested complex repetitions
-/a.*b.*c/
->abc
-0,3: abc
->xxxxxxxxxabbbbbbbccaaaaabbbc
-9,18: abbbbbbbc
-/a.+b.*c/
->xxxabc 
-:NOMATCH
->xxaxbbc
-2,7: axbbc
-/a.+b.?c/
->xaabc
-1,5: aabc
->xxaabbc
-2,7: aabbc
-
-# Very complex repetitions
-/(foo.*|bar)fee/
-# XXX NOTE
-# This pattern does not return the correct offset for the group.
-# Support for this may and may not be added.
-
->barfoofee
-3,9: foofee
->foobarfee
-0,9: foobarfee
->xxfobarfee
-4,10: barfee
->barfooooooobarfee
-3,17: fooooooobarfee
->xxfobarfeefoobar
-4,10: barfee
-/(foo.+|bar)fee/
->barfoofee
-:NOMATCH
->barfooxfee
-3,10: fooxfee
-/(foo.?|bar)fee/
->foobar
-:NOMATCH
->bafoofee
-2,8:foofee
->bafooofeebarfee
-2,9: fooofee
->bafoofeebarfee
-2,8: foofee
-
-# Simple backreference
-/(a|b|c)\1/
->aa
-0,2: aa
-0,1: a
-/(a|b|c)(a|b|c)\1\2/
->acac
-0,4: acac
-0,1: a
-1,2: c
->xxxxacac
-4,8: acac
-4,5: a
-5,6: c
->xxacabacbcacbbacbcaaccabcaca
-24,28: caca
-24,25: c
-25,26: a
->xyabcccc
-4,8: cccc
-4,5: c
-5,6: c
-
-# Complex backreference
-/(a*b)\1/
->xxxaaaaabaaaaab
-3,15: aaaaabaaaaab
-3,9: aaaaab
-/(ab+c)\1/
->xaaabbbcabbbc
-3,13: abbbcabbbc
-3,8: abbbc
-/(ab?c)\1/
->abcac
-:NOMATCH
->abcacabcabc
-5,11: abcabc
-5,8: abc
->abcacac
-3,7: acac
-3,5: acac
-
-# Very complex backreference
-/a(.*)b\1/
->xxxab
-3,5: ab
-4,4: 
->xxxxazzzbzzz
-4,12: azzzbzzz
-5,8: zzz
-
-# Case testing
-/abc/i
->AbC
-0,3: AbC
-/[0-9][a-z]+/i
->xxx0aaZxYT9
-3,10: 0aaZxYT
-/a.b/i
->aaaaaaaaaaaxB
-10,13: axB
-/a.*z/i
->xxxAaaaaZ
-3,9: AaaaaZ
->xxaaaZaaa
-2,6: aaaZ
-/\<(lambda|defun|defmacro)\>/i
->    (lambda
-5,11: lambda
-5,11: lambda
-/\<(nil|t)\>/i
->it Nil
-3,6: Nil
-3,6: Nil
-/\<(begin|end)\>/i
->beginning the ending EnD
-21,24: EnD
-21,24: EnD
-
-# Some newline tests
-/a.*/n
->a\naaa
-0,1:a
->xyza\naa
-3,4: a
-/a.+/n
->a\naaa
-2,5: aaa
->xyza\naa
-5,7: aa
-/a.?/n
->a\naaa
-0,1: a
->xyza\naa
-3,4: a
-
-# Newline tests envolving complex patterns
-/a.*b.*c/n
->xxaa\nzyacb\nabc
-11,14: abc
->xxxab\nabc\nc
-6,9: abc
-/a.+b.*c/n
->ab\nbc\nabbc
-6,10: abbc
-/a.?b.*c/n
->ab\ncabbc\ncc
-4,8: abbc
-/^foo$/n
->bar\nfoobar\nfoo
-11,14: foo
-
-# Not so complex test involving a newline...
-/^\s*#\s*(define|include)\s+.+/n
->#define\n#include x
-8,18: #include x
-9,16: include
-
-# Check if large strings are working
-/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
->zzzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzzz
-3,259: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~/
->String here: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~/
-13,333: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~
-
-
-# Some complex repetitions not supported
-# Listed here only to make sure the library is not crashing on these
-#  Repetitions that match an empty match, or an empty string cannot follow
-# a complex repetition. A complex repetition is:
-#      .* or .+ or .?
-#      .{...} is not supported.
-/(.*)(\d*)/
-:BADRPT
-/(.*).(\d*)/
-:BADRPT
-/(.*)\<(\d*)/
-:BADRPT
-/(.*)\s(\d*)/
-:BADRPT
-/(.*)\D(\d*)/
-:BADRPT
-
-# This is a more clear pattern and partially works
-/(.*)\D(\d+)/
->abcW12
-0,6: abcW12
-0,3: abc
-4,6: 12
->abcW12abcW12
-0,6: abcW12
-0,3: abc
-4,6: 12
-# This wasn't working in the previous version, but now with only minimal
-# matches supported, it works.
->abcW12abcW12a
-0,6: abcW12
-0,3: abc
-4,6: 12
-
-# Note the minimal match
-/.*\d/
->a1a1a1aaaaaaa
-0,2: a1
-# Check match offsets
-/(.*)\d/
->a1a1a1aaaaaaa
-0,2: a1
-0,1: a
-/.*(\d)/
->a1a1a1aaaaaaa
-0,2: a1
-1,2: 1
-
-/.*(\d+)/
-:BADRPT
-
-# Regression fix, was matching empty string
-/\\\d{3}|\\./
->\\
-:NOMATCH
-
-/\\.|\\\d{3}/
->\\
-:NOMATCH
diff --git a/xedit/lisp/read.c b/xedit/lisp/read.c
deleted file mode 100644 (file)
index 9c70b64..0000000
+++ /dev/null
@@ -1,2056 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/read.c,v 1.36tsi Exp $ */
-
-#include <errno.h>
-#include "lisp/read.h"
-#include "lisp/package.h"
-#include "lisp/write.h"
-#include <fcntl.h>
-#include <stdarg.h>
-
-/* This should be visible only in read.c, but if an error is generated,
- * the current code in write.c will print it as #<ERROR> */
-#define LABEL_BIT_COUNT                8
-#define LABEL_BIT_MASK         0xff
-#define MAX_LABEL_VALUE                ((1L << (sizeof(long) * 8 - 9)) - 1)
-#define READLABEL(label)                                               \
-    (LispObj*)(((label) << LABEL_BIT_COUNT) | READLABEL_MASK)
-#define READLABELP(object)                                             \
-    (((unsigned long)(object) & LABEL_BIT_MASK) == READLABEL_MASK)
-#define READLABEL_VALUE(object)                                                \
-    ((long)(object) >> LABEL_BIT_COUNT)
-
-#define READ_ENTER()                                                   \
-    LispObj *read__stream = SINPUT;                                    \
-    int read__line = LispGetLine(read__stream)
-#define READ_ERROR0(format)                                            \
-    LispReadError(read__stream, read__line, format)
-#define READ_ERROR1(format, arg1)                                      \
-    LispReadError(read__stream, read__line, format, arg1)
-#define READ_ERROR2(format, arg1, arg2)                                        \
-    LispReadError(read__stream, read__line, format, arg1, arg2)
-
-#define READ_ERROR_EOF()       READ_ERROR0("unexpected end of input")
-#define READ_ERROR_FIXNUM()    READ_ERROR0("number is not a fixnum")
-#define READ_ERROR_INVARG()    READ_ERROR0("invalid argument")
-
-#ifdef __UNIXOS2__
-# define finite(x) isfinite(x)
-#endif
-
-/*
- * Types
- */
-typedef struct _object_info {
-    long label;                /* the read label of this object */
-    LispObj *object;   /* the resulting object */
-    long num_circles;  /* references to object before it was completely read */
-} object_info;
-
-typedef struct _read_info {
-    int level;         /* level of open parentheses */
-
-    int nodot;         /* flag set when reading a "special" list */
-
-    int discard;       /* flag used when reading an unavailable feature */
-
-    long circle_count; /* if non zero, must resolve some labels */
-
-    /* information for #<number>= and #<number># */
-    object_info *objects;
-    long num_objects;
-
-    /* could use only the objects field as all circular data is known,
-     * but check every object so that circular/shared references generated
-     * by evaluations would not cause an infinite loop at read time */
-    LispObj **circles;
-    long num_circles;
-} read_info;
-
-/*
- * Protypes
- */
-static LispObj *LispReadChar(LispBuiltin*, int);
-
-static int LispGetLine(LispObj*);
-#ifdef __GNUC__
-#define PRINTF_FORMAT  __attribute__ ((format (printf, 3, 4)))
-#else
-#define PRINTF_FORMAT  /**/
-#endif
-static void LispReadError(LispObj*, int, char*, ...);
-#undef PRINTF_FORMAT
-static void LispReadFixCircle(LispObj*, read_info*);
-static LispObj *LispReadLabelCircle(LispObj*, read_info*);
-static int LispReadCheckCircle(LispObj*, read_info*);
-static LispObj *LispDoRead(read_info*);
-static int LispSkipWhiteSpace(void);
-static LispObj *LispReadList(read_info*);
-static LispObj *LispReadQuote(read_info*);
-static LispObj *LispReadBackquote(read_info*);
-static LispObj *LispReadCommaquote(read_info*);
-static LispObj *LispReadObject(int, read_info*);
-static LispObj *LispParseAtom(char*, char*, int, int, LispObj*, int);
-static LispObj *LispParseNumber(char*, int, LispObj*, int);
-static int StringInRadix(char*, int, int);
-static int AtomSeparator(int, int, int);
-static LispObj *LispReadVector(read_info*);
-static LispObj *LispReadMacro(read_info*);
-static LispObj *LispReadFunction(read_info*);
-static LispObj *LispReadRational(int, read_info*);
-static LispObj *LispReadCharacter(read_info*);
-static void LispSkipComment(void);
-static LispObj *LispReadEval(read_info*);
-static LispObj *LispReadComplex(read_info*);
-static LispObj *LispReadPathname(read_info*);
-static LispObj *LispReadStruct(read_info*);
-static LispObj *LispReadMacroArg(read_info*);
-static LispObj *LispReadArray(long, read_info*);
-static LispObj *LispReadFeature(int, read_info*);
-static LispObj *LispEvalFeature(LispObj*);
-
-/*
- * Initialization
- */
-static char *Char_Nul[] = {"Null", "Nul", NULL};
-static char *Char_Soh[] = {"Soh", NULL};
-static char *Char_Stx[] = {"Stx", NULL};
-static char *Char_Etx[] = {"Etx", NULL};
-static char *Char_Eot[] = {"Eot", NULL};
-static char *Char_Enq[] = {"Enq", NULL};
-static char *Char_Ack[] = {"Ack", NULL};
-static char *Char_Bel[] = {"Bell", "Bel", NULL};
-static char *Char_Bs[]  = {"Backspace", "Bs", NULL};
-static char *Char_Tab[] = {"Tab", NULL};
-static char *Char_Nl[]  = {"Newline", "Nl", "Lf", "Linefeed", NULL};
-static char *Char_Vt[]  = {"Vt", NULL};
-static char *Char_Np[]  = {"Page", "Np", NULL};
-static char *Char_Cr[]  = {"Return", "Cr", NULL};
-static char *Char_Ff[]  = {"So", "Ff", NULL};
-static char *Char_Si[]  = {"Si", NULL};
-static char *Char_Dle[] = {"Dle", NULL};
-static char *Char_Dc1[] = {"Dc1", NULL};
-static char *Char_Dc2[] = {"Dc2", NULL};
-static char *Char_Dc3[] = {"Dc3", NULL};
-static char *Char_Dc4[] = {"Dc4", NULL};
-static char *Char_Nak[] = {"Nak", NULL};
-static char *Char_Syn[] = {"Syn", NULL};
-static char *Char_Etb[] = {"Etb", NULL};
-static char *Char_Can[] = {"Can", NULL};
-static char *Char_Em[]  = {"Em", NULL};
-static char *Char_Sub[] = {"Sub", NULL};
-static char *Char_Esc[] = {"Escape", "Esc", NULL};
-static char *Char_Fs[]  = {"Fs", NULL};
-static char *Char_Gs[]  = {"Gs", NULL};
-static char *Char_Rs[]  = {"Rs", NULL};
-static char *Char_Us[]  = {"Us", NULL};
-static char *Char_Sp[]  = {"Space", "Sp", NULL};
-static char *Char_Del[] = {"Rubout", "Del", "Delete", NULL};
-
-LispCharInfo LispChars[256] = {
-    {Char_Nul},
-    {Char_Soh},
-    {Char_Stx},
-    {Char_Etx},
-    {Char_Eot},
-    {Char_Enq},
-    {Char_Ack},
-    {Char_Bel},
-    {Char_Bs},
-    {Char_Tab},
-    {Char_Nl},
-    {Char_Vt},
-    {Char_Np},
-    {Char_Cr},
-    {Char_Ff},
-    {Char_Si},
-    {Char_Dle},
-    {Char_Dc1},
-    {Char_Dc2},
-    {Char_Dc3},
-    {Char_Dc4},
-    {Char_Nak},
-    {Char_Syn},
-    {Char_Etb},
-    {Char_Can},
-    {Char_Em},
-    {Char_Sub},
-    {Char_Esc},
-    {Char_Fs},
-    {Char_Gs},
-    {Char_Rs},
-    {Char_Us},
-    {Char_Sp},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {Char_Del},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
-    {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
-    
-};
-
-Atom_id Sand, Sor, Snot;
-
-
-/*
- * Implementation
- */
-LispObj *
-Lisp_Read(LispBuiltin *builtin)
-/*
- read &optional input-stream eof-error-p eof-value recursive-p
- */
-{
-    LispObj *result;
-
-    LispObj *input_stream, *eof_error_p, *eof_value;
-
-    eof_value = ARGUMENT(2);
-    eof_error_p = ARGUMENT(1);
-    input_stream = ARGUMENT(0);
-
-    if (input_stream == UNSPEC)
-       input_stream = NIL;
-    else if (input_stream != NIL) {
-       CHECK_STREAM(input_stream);
-       else if (!input_stream->data.stream.readable)
-           LispDestroy("%s: stream %s is not readable",
-                       STRFUN(builtin), STROBJ(input_stream));
-       LispPushInput(input_stream);
-    }
-    else if (CONSP(lisp__data.input_list)) {
-       input_stream = STANDARD_INPUT;
-       LispPushInput(input_stream);
-    }
-
-    if (eof_value == UNSPEC)
-       eof_value = NIL;
-
-    result = LispRead();
-    if (input_stream != NIL)
-       LispPopInput(input_stream);
-
-    if (result == NULL) {
-       if (eof_error_p != NIL)
-           LispDestroy("%s: EOF reading stream %s",
-                       STRFUN(builtin), STROBJ(input_stream));
-       else
-           result = eof_value;
-    }
-
-    return (result);
-}
-
-static LispObj *
-LispReadChar(LispBuiltin *builtin, int nohang)
-{
-    int character;
-
-    LispObj *input_stream, *eof_error_p, *eof_value;
-
-    eof_value = ARGUMENT(2);
-    eof_error_p = ARGUMENT(1);
-    input_stream = ARGUMENT(0);
-
-    if (input_stream == UNSPEC)
-       input_stream = NIL;
-    else if (input_stream != NIL) {
-       CHECK_STREAM(input_stream);
-    }
-    else
-       input_stream = lisp__data.input;
-
-    if (eof_value == UNSPEC)
-       eof_value = NIL;
-
-    character = EOF;
-
-    if (input_stream->data.stream.readable) {
-       LispFile *file = NULL;
-
-       switch (input_stream->data.stream.type) {
-           case LispStreamStandard:
-           case LispStreamFile:
-               file = FSTREAMP(input_stream);
-               break;
-           case LispStreamPipe:
-               file = IPSTREAMP(input_stream);
-               break;
-           case LispStreamString:
-               character = LispSgetc(SSTREAMP(input_stream));
-               break;
-           default:
-               break;
-       }
-       if (file != NULL) {
-           if (file->available || file->offset < file->length)
-               character = LispFgetc(file);
-           else {
-               if (nohang && !file->nonblock) {
-                   if (fcntl(file->descriptor, F_SETFL, O_NONBLOCK) < 0)
-                       LispDestroy("%s: fcntl(%d): %s",
-                                   STRFUN(builtin), file->descriptor,
-                                   strerror(errno));
-                   file->nonblock = 1;
-               }
-               else if (!nohang && file->nonblock) {
-                   if (fcntl(file->descriptor, F_SETFL, 0) < 0)
-                       LispDestroy("%s: fcntl(%d): %s",
-                                   STRFUN(builtin), file->descriptor,
-                                   strerror(errno));
-                   file->nonblock = 0;
-               }
-               if (nohang) {
-                   unsigned char ch;
-
-                   if (read(file->descriptor, &ch, 1) == 1)
-                       character = ch;
-                   else if (errno == EAGAIN)
-                       return (NIL);   /* XXX no character available */
-                   else
-                       character = EOF;
-               }
-               else
-                   character = LispFgetc(file);
-           }
-       }
-    }
-    else
-       LispDestroy("%s: stream %s is unreadable",
-                   STRFUN(builtin), STROBJ(input_stream));
-
-    if (character == EOF) {
-       if (eof_error_p != NIL)
-           LispDestroy("%s: EOF reading stream %s",
-                       STRFUN(builtin), STROBJ(input_stream));
-
-       return (eof_value);
-    }
-
-    return (SCHAR(character));
-}
-
-LispObj *
-Lisp_ReadChar(LispBuiltin *builtin)
-/*
- read-char &optional input-stream eof-error-p eof-value recursive-p
- */
-{
-    return (LispReadChar(builtin, 0));
-}
-
-LispObj *
-Lisp_ReadCharNoHang(LispBuiltin *builtin)
-/*
- read-char-no-hang &optional input-stream eof-error-p eof-value recursive-p
- */
-{
-    return (LispReadChar(builtin, 1));
-}
-
-LispObj *
-Lisp_ReadLine(LispBuiltin *builtin)
-/*
- read-line &optional input-stream eof-error-p eof-value recursive-p
- */
-{
-    char *string;
-    int ch, length;
-    LispObj *result, *status = NIL;
-
-    LispObj *input_stream, *eof_error_p, *eof_value;
-
-    eof_value = ARGUMENT(2);
-    eof_error_p = ARGUMENT(1);
-    input_stream = ARGUMENT(0);
-
-    if (input_stream == UNSPEC)
-       input_stream = NIL;
-    else if (input_stream == NIL)
-       input_stream = STANDARD_INPUT;
-    else {
-       CHECK_STREAM(input_stream);
-    }
-
-    if (eof_value == UNSPEC)
-       eof_value = NIL;
-
-    result = NIL;
-    string = NULL;
-    length = 0;
-
-    if (!input_stream->data.stream.readable)
-       LispDestroy("%s: stream %s is unreadable",
-                   STRFUN(builtin), STROBJ(input_stream));
-    if (input_stream->data.stream.type == LispStreamString) {
-       char *start, *end, *ptr;
-
-       if (SSTREAMP(input_stream)->input >=
-           SSTREAMP(input_stream)->length) {
-           if (eof_error_p != NIL)
-               LispDestroy("%s: EOS found reading %s",
-                           STRFUN(builtin), STROBJ(input_stream));
-
-           status = T;
-           result = eof_value;
-           goto read_line_done;
-       }
-
-       start = SSTREAMP(input_stream)->string +
-               SSTREAMP(input_stream)->input;
-       end = SSTREAMP(input_stream)->string +
-             SSTREAMP(input_stream)->length;
-       /* Search for a newline */
-       for (ptr = start; *ptr != '\n' && ptr < end; ptr++)
-           ;
-       if (ptr == end)
-           status = T;
-       else if (!SSTREAMP(input_stream)->binary)
-           ++SSTREAMP(input_stream)->line;
-       length = ptr - start;
-       string = LispMalloc(length + 1);
-       memcpy(string, start, length);
-       string[length] = '\0';
-       result = LSTRING2(string, length);
-       /* macro LSTRING2 does not make a copy of it's arguments, and
-        * calls LispMused on it. */
-       SSTREAMP(input_stream)->input += length + (status == NIL);
-    }
-    else /*if (input_stream->data.stream.type == LispStreamFile ||
-            input_stream->data.stream.type == LispStreamStandard ||
-            input_stream->data.stream.type == LispStreamPipe)*/ {
-       LispFile *file;
-
-       if (input_stream->data.stream.type == LispStreamPipe)
-           file = IPSTREAMP(input_stream);
-       else
-           file = FSTREAMP(input_stream);
-
-       if (file->nonblock) {
-           if (fcntl(file->descriptor, F_SETFL, 0) < 0)
-               LispDestroy("%s: fcntl: %s",
-                           STRFUN(builtin), strerror(errno));
-           file->nonblock = 0;
-       }
-
-       while (1) {
-           ch = LispFgetc(file);
-           if (ch == EOF) {
-               if (length)
-                   break;
-               if (eof_error_p != NIL)
-                   LispDestroy("%s: EOF found reading %s",
-                               STRFUN(builtin), STROBJ(input_stream));
-               if (string)
-                   LispFree(string);
-
-               status = T;
-               result = eof_value;
-               goto read_line_done;
-           }
-           else if (ch == '\n')
-               break;
-           else if ((length % 64) == 0)
-               string = LispRealloc(string, length + 64);
-           string[length++] = ch;
-       }
-       if (string) {
-           if ((length % 64) == 0)
-               string = LispRealloc(string, length + 1);
-           string[length] = '\0';
-           result = LSTRING2(string, length);
-       }
-       else
-           result = STRING("");
-    }
-
-read_line_done:
-    RETURN(0) = status;
-    RETURN_COUNT = 1;
-
-    return (result);
-}
-
-LispObj *
-LispRead(void)
-{
-    READ_ENTER();
-    read_info info;
-    LispObj *result, *code = COD;
-
-    info.level = info.nodot = info.discard = 0;
-    info.circle_count = 0;
-    info.objects = NULL;
-    info.num_objects = 0;
-
-    result = LispDoRead(&info);
-
-    /* fix circular/shared lists, note that this is done when returning to
-     * the toplevel, so, if some circular/shared reference was evaluated,
-     * it should have generated an expected error */
-    if (info.num_objects) {
-       if (info.circle_count) {
-           info.circles = NULL;
-           info.num_circles = 0;
-           LispReadFixCircle(result, &info);
-           if (info.num_circles)
-               LispFree(info.circles);
-       }
-       LispFree(info.objects);
-    }
-
-    if (result == EOLIST)
-       READ_ERROR0("object cannot start with #\\)");
-    else if (result == DOT)
-       READ_ERROR0("dot allowed only on lists");
-
-    if (result != NULL && POINTERP(result)) {
-       if (code == NIL)
-           COD = result;
-       else
-           COD = CONS(COD, result);
-    }
-
-    return (result);
-}
-
-static int
-LispGetLine(LispObj *stream)
-{
-    int line = -1;
-
-    if (STREAMP(stream)) {
-       switch (stream->data.stream.type) {
-           case LispStreamStandard:
-           case LispStreamFile:
-               if (!FSTREAMP(stream)->binary)
-                   line = FSTREAMP(stream)->line;
-               break;
-           case LispStreamPipe:
-               if (!IPSTREAMP(stream)->binary)
-                   line = IPSTREAMP(stream)->line;
-               break;
-           case LispStreamString:
-               if (!SSTREAMP(stream)->binary)
-                   line = SSTREAMP(stream)->line;
-               break;
-           default:
-               break;
-       }
-    }
-    else if (stream == NIL && !Stdin->binary)
-       line = Stdin->line;
-
-    return (line);
-}
-
-static void
-LispReadError(LispObj *stream, int line, char *fmt, ...)
-{
-    char string[128], *buffer_string;
-    LispObj *buffer = LSTRINGSTREAM("", STREAM_READ | STREAM_WRITE, 0);
-    int length;
-    va_list ap;
-
-    va_start(ap, fmt);
-    vsnprintf(string, sizeof(string), fmt, ap);
-    va_end(ap);
-
-    LispFwrite(Stderr, "*** Reading ", 12);
-    LispWriteObject(buffer, stream);
-    buffer_string = LispGetSstring(SSTREAMP(buffer), &length);
-    LispFwrite(Stderr, buffer_string, length);
-    LispFwrite(Stderr, " at line ", 9);
-    if (line < 0)
-       LispFwrite(Stderr, "?\n", 2);
-    else {
-       char str[32];
-
-       sprintf(str, "%d\n", line);
-       LispFputs(Stderr, str);
-    }
-
-    LispDestroy("READ: %s", string);
-}
-
-static void
-LispReadFixCircle(LispObj *object, read_info *info)
-{
-    LispObj *cons;
-
-fix_again:
-    switch (OBJECT_TYPE(object)) {
-       case LispCons_t:
-           for (cons = object;
-                CONSP(object);
-                cons = object, object = CDR(object)) {
-               if (READLABELP(CAR(object)))
-                   CAR(object) = LispReadLabelCircle(CAR(object), info);
-               else if (LispReadCheckCircle(object, info))
-                   return;
-               else
-                   LispReadFixCircle(CAR(object), info);
-           }
-           if (READLABELP(object))
-               CDR(cons) = LispReadLabelCircle(object, info);
-           else
-               goto fix_again;
-           break;
-       case LispArray_t:
-           if (READLABELP(object->data.array.list))
-               object->data.array.list =
-                   LispReadLabelCircle(object->data.array.list, info);
-           else if (!LispReadCheckCircle(object, info)) {
-               object = object->data.array.list;
-               goto fix_again;
-           }
-           break;
-       case LispStruct_t:
-           if (READLABELP(object->data.struc.fields))
-               object->data.struc.fields =
-                   LispReadLabelCircle(object->data.struc.fields, info);
-           else if (!LispReadCheckCircle(object, info)) {
-               object = object->data.struc.fields;
-               goto fix_again;
-           }
-           break;
-       case LispQuote_t:
-       case LispBackquote_t:
-       case LispFunctionQuote_t:
-           if (READLABELP(object->data.quote))
-               object->data.quote =
-                   LispReadLabelCircle(object->data.quote, info);
-           else {
-               object = object->data.quote;
-               goto fix_again;
-           }
-           break;
-       case LispComma_t:
-           if (READLABELP(object->data.comma.eval))
-               object->data.comma.eval =
-                   LispReadLabelCircle(object->data.comma.eval, info);
-           else {
-               object = object->data.comma.eval;
-               goto fix_again;
-           }
-           break;
-       case LispLambda_t:
-           if (READLABELP(object->data.lambda.code))
-               object->data.lambda.code =
-                   LispReadLabelCircle(object->data.lambda.code, info);
-           else if (!LispReadCheckCircle(object, info)) {
-               object = object->data.lambda.code;
-               goto fix_again;
-           }
-           break;
-       default:
-           break;
-    }
-}
-
-static LispObj *
-LispReadLabelCircle(LispObj *label, read_info *info)
-{
-    long i, value = READLABEL_VALUE(label);
-
-    for (i = 0; i < info->num_objects; i++)
-       if (info->objects[i].label == value)
-           return (info->objects[i].object);
-
-    LispDestroy("READ: internal error");
-    /*NOTREACHED*/
-    return (label);
-}
-
-static int
-LispReadCheckCircle(LispObj *object, read_info *info)
-{
-    long i;
-
-    for (i = 0; i < info->num_circles; i++)
-       if (info->circles[i] == object)
-           return (1);
-
-    if ((info->num_circles % 16) == 0)
-       info->circles = LispRealloc(info->circles, sizeof(LispObj*) *
-                                   (info->num_circles + 16));
-    info->circles[info->num_circles++] = object;
-
-    return (0);
-}
-
-static LispObj *
-LispDoRead(read_info *info)
-{
-    LispObj *object;
-    int ch = LispSkipWhiteSpace();
-
-    switch (ch) {
-       case '(':
-           object = LispReadList(info);
-           break;
-       case ')':
-           for (ch = LispGet(); ch != EOF && ch != '\n'; ch = LispGet()) {
-               if (!isspace(ch)) {
-                   LispUnget(ch);
-                   break;
-               }
-           }
-           return (EOLIST);
-       case EOF:
-           return (NULL);
-       case '\'':
-           object = LispReadQuote(info);
-           break;
-       case '`':
-           object = LispReadBackquote(info);
-           break;
-       case ',':
-           object = LispReadCommaquote(info);
-           break;
-       case '#':
-           object = LispReadMacro(info);
-           break;
-       default:
-           LispUnget(ch);
-           object = LispReadObject(0, info);
-           break;
-    }
-
-    return (object);
-}
-
-static LispObj *
-LispReadMacro(read_info *info)
-{
-    READ_ENTER();
-    LispObj *result = NULL;
-    int ch = LispGet();
-
-    switch (ch) {
-       case '(':
-           result = LispReadVector(info);
-           break;
-       case '\'':
-          result = LispReadFunction(info);
-          break;
-       case 'b':
-       case 'B':
-           result = LispReadRational(2, info);
-           break;
-       case 'o':
-       case 'O':
-           result = LispReadRational(8, info);
-           break;
-       case 'x':
-       case 'X':
-           result = LispReadRational(16, info);
-           break;
-       case '\\':
-           result = LispReadCharacter(info);
-           break;
-       case '|':
-           LispSkipComment();
-           result = LispDoRead(info);
-           break;
-       case '.':       /* eval when compiling */
-       case ',':       /* eval when loading */
-           result = LispReadEval(info);
-           break;
-       case 'c':
-       case 'C':
-           result = LispReadComplex(info);
-           break;
-       case 'p':
-       case 'P':
-           result = LispReadPathname(info);
-           break;
-       case 's':
-       case 'S':
-           result = LispReadStruct(info);
-           break;
-       case '+':
-           result = LispReadFeature(1, info);
-           break;
-       case '-':
-           result = LispReadFeature(0, info);
-           break;
-       case ':':
-           /* Uninterned symbol */
-           result = LispReadObject(1, info);
-           break;
-       default:
-           if (isdigit(ch)) {
-               LispUnget(ch);
-               result = LispReadMacroArg(info);
-           }
-           else if (!info->discard)
-               READ_ERROR1("undefined dispatch macro character #%c", ch);
-           break;
-    }
-
-    return (result);
-}
-
-static LispObj *
-LispReadMacroArg(read_info *info)
-{
-    READ_ENTER();
-    LispObj *result = NIL;
-    long i, integer;
-    int ch;
-
-    /* skip leading zeros */
-    while (ch = LispGet(), ch != EOF && isdigit(ch) && ch == '0')
-       ;
-
-    if (ch == EOF)
-       READ_ERROR_EOF();
-
-    /* if ch is not a number the argument was zero */
-    if (isdigit(ch)) {
-       char stk[32], *str;
-       int len = 1;
-
-       stk[0] = ch;
-       for (;;) {
-           ch = LispGet();
-           if (!isdigit(ch))
-               break;
-           if (len + 1 >= sizeof(stk))
-               READ_ERROR_FIXNUM();
-           stk[len++] = ch;
-       }
-       stk[len] = '\0';
-       errno = 0;
-       integer = strtol(stk, &str, 10);
-       /* number is positive because sign is not processed here */
-       if (*str || errno == ERANGE || integer > MOST_POSITIVE_FIXNUM)
-           READ_ERROR_FIXNUM();
-    }
-    else
-       integer = 0;
-
-    switch (ch) {
-       case 'a':
-       case 'A':
-           if (integer == 1) {
-               /* LispReadArray and LispReadList expect
-                * the '(' being already read  */
-               if ((ch = LispSkipWhiteSpace()) != '(') {
-                   if (info->discard)
-                       return (ch == EOF ? NULL : NIL);
-                   READ_ERROR0("bad array specification");
-               }
-               result = LispReadVector(info);
-           }
-           else
-               result = LispReadArray(integer, info);
-           break;
-       case 'r':
-       case 'R':
-           result = LispReadRational(integer, info);
-           break;
-       case '=':
-           if (integer > MAX_LABEL_VALUE)
-               READ_ERROR_FIXNUM();
-           if (!info->discard) {
-               long num_objects = info->num_objects;
-
-               /* check for duplicated label */
-               for (i = 0; i < info->num_objects; i++) {
-                   if (info->objects[i].label == integer)
-                       READ_ERROR1("label #%ld# defined more than once",
-                                   integer);
-               }
-               info->objects = LispRealloc(info->objects,
-                                           sizeof(object_info) *
-                                           (num_objects + 1));
-               /* if this label is referenced it is a shared/circular object */
-               info->objects[num_objects].label = integer;
-               info->objects[num_objects].object = NULL;
-               info->objects[num_objects].num_circles = 0;
-               ++info->num_objects;
-               result = LispDoRead(info);
-               if (READLABELP(result) && READLABEL_VALUE(result) == integer)
-                   READ_ERROR2("incorrect syntax #%ld= #%ld#",
-                               integer, integer);
-               /* any reference to it now is not shared/circular */
-               info->objects[num_objects].object = result;
-           }
-           else
-               result = LispDoRead(info);
-           break;
-       case '#':
-           if (integer > MAX_LABEL_VALUE)
-               READ_ERROR_FIXNUM();
-           if (!info->discard) {
-               /* search object */
-               for (i = 0; i < info->num_objects; i++) {
-                   if (info->objects[i].label == integer) {
-                       result = info->objects[i].object;
-                       if (result == NULL) {
-                           ++info->objects[i].num_circles;
-                           ++info->circle_count;
-                           result = READLABEL(integer);
-                       }
-                       break;
-                   }
-               }
-               if (i == info->num_objects)
-                   READ_ERROR1("undefined label #%ld#", integer);
-           }
-           break;
-       default:
-           if (!info->discard)
-               READ_ERROR1("undefined dispatch macro character #%c", ch);
-           break;
-    }
-
-    return (result);
-}
-
-static int
-LispSkipWhiteSpace(void)
-{
-    int ch;
-
-    for (;;) {
-       while (ch = LispGet(), isspace(ch) && ch != EOF)
-           ;
-       if (ch == ';') {
-           while (ch = LispGet(), ch != '\n' && ch != EOF)
-               ;
-           if (ch == EOF)
-               return (EOF);
-       }
-       else
-           break;
-    }
-
-    return (ch);
-}
-
-/* any data in the format '(' FORM ')' is read here */
-static LispObj *
-LispReadList(read_info *info)
-{
-    READ_ENTER();
-    GC_ENTER();
-    LispObj *result, *cons, *object;
-    int dot = 0;
-
-    ++info->level;
-    /* check for () */
-    object = LispDoRead(info);
-    if (object == EOLIST) {
-       --info->level;
-
-       return (NIL);
-    }
-
-    if (object == DOT)
-       READ_ERROR0("illegal start of dotted list");
-
-    result = cons = CONS(object, NIL);
-
-    /* make sure GC will not release data being read */
-    GC_PROTECT(result);
-
-    while ((object = LispDoRead(info)) != EOLIST) {
-       if (object == NULL)
-           READ_ERROR_EOF();
-       if (object == DOT) {
-           if (info->nodot == info->level)
-               READ_ERROR0("dotted list not allowed");
-           /* this is a dotted list */
-           if (dot)
-               READ_ERROR0("more than one . in list");
-           dot = 1;
-       }
-       else {
-           if (dot) {
-               /* only one object after a dot */
-               if (++dot > 2)
-                   READ_ERROR0("more than one object after . in list");
-               RPLACD(cons, object);
-           }
-           else {
-               RPLACD(cons, CONS(object, NIL));
-               cons = CDR(cons);
-           }
-       }
-    }
-
-    /* this will happen if last list element was a dot */
-    if (dot == 1)
-       READ_ERROR0("illegal end of dotted list");
-
-    --info->level;
-    GC_LEAVE();
-
-    return (result);
-}
-
-static LispObj *
-LispReadQuote(read_info *info)
-{
-    READ_ENTER();
-    LispObj *quote = LispDoRead(info), *result;
-
-    if (INVALIDP(quote))
-       READ_ERROR_INVARG();
-
-    result = QUOTE(quote);
-
-    return (result);
-}
-
-static LispObj *
-LispReadBackquote(read_info *info)
-{
-    READ_ENTER();
-    LispObj *backquote = LispDoRead(info), *result;
-
-    if (INVALIDP(backquote))
-       READ_ERROR_INVARG();
-
-    result = BACKQUOTE(backquote);
-
-    return (result);
-}
-
-static LispObj *
-LispReadCommaquote(read_info *info)
-{
-    READ_ENTER();
-    LispObj *comma, *result;
-    int atlist = LispGet();
-
-    if (atlist == EOF)
-       READ_ERROR_EOF();
-    else if (atlist != '@' && atlist != '.')
-       LispUnget(atlist);
-
-    comma = LispDoRead(info);
-    if (comma == DOT) {
-       atlist = '@';
-       comma = LispDoRead(info);
-    }
-    if (INVALIDP(comma))
-       READ_ERROR_INVARG();
-
-    result = COMMA(comma, atlist == '@' || atlist == '.');
-
-    return (result);
-}
-
-/*
- * Read anything that is not readily identifiable by it's first character
- * and also put the code for reading atoms, numbers and strings together.
- */
-static LispObj *
-LispReadObject(int unintern, read_info *info)
-{
-    READ_ENTER();
-    LispObj *object;
-    char stk[128], *string, *package, *symbol;
-    int ch, length, backslash, size, quote, unreadable, collon;
-
-    package = symbol = string = stk;
-    size = sizeof(stk);
-    backslash = quote = unreadable = collon = 0;
-    length = 0;
-
-    ch = LispGet();
-    if (unintern && (ch == ':' || ch == '"'))
-       READ_ERROR0("syntax error after #:");
-    else if (ch == '"' || ch == '|')
-       quote = ch;
-    else if (ch == '\\') {
-       unreadable = backslash = 1;
-       string[length++] = ch;
-    }
-    else if (ch == ':') {
-       collon = 1;
-       string[length++] = ch;
-       symbol = string + 1;
-       ch = LispGet();
-       if (ch == '|') {
-           quote = ch;
-           unreadable = 1;
-       }
-       else if (ch != EOF)
-           LispUnget(ch);
-    }
-    else if (ch) {
-       if (islower(ch))
-           ch = toupper(ch);
-       string[length++] = ch;
-    }
-    else
-       unreadable = 1;
-
-    /* read remaining data */
-    for (; ch;) {
-       ch = LispGet();
-
-       if (ch == EOF) {
-           if (quote) {
-               /* if quote, file ended with an open quoted object */
-               if (string != stk)
-                   LispFree(string);
-               return (NULL);
-           }
-           break;
-       }
-       else if (ch == '\0')
-           break;
-
-       if (ch == '\\') {
-           backslash = !backslash;
-           if (quote == '"') {
-               /* only remove backslashs from strings */
-               if (backslash)
-                   continue;
-           }
-           else
-               unreadable = 1;
-       }
-       else if (backslash)
-           backslash = 0;
-       else if (ch == quote)
-           break;
-       else if (!quote && !backslash) {
-           if (islower(ch))
-               ch = toupper(ch);
-           else if (isspace(ch))
-               break;
-           else if (AtomSeparator(ch, 0, 0)) {
-               LispUnget(ch);
-               break;
-           }
-           else if (ch == ':') {
-               if (collon == 0 ||
-                   (collon == (1 - unintern) && symbol == string + length)) {
-                   ++collon;
-                   symbol = string + length + 1;
-               }
-               else
-                   READ_ERROR0("too many collons");
-           }
-       }
-
-       if (length + 2 >= size) {
-           if (string == stk) {
-               size = 1024;
-               string = LispMalloc(size);
-               strcpy(string, stk);
-           }
-           else {
-               size += 1024;
-               string = LispRealloc(string, size);
-           }
-           symbol = string + (symbol - package);
-           package = string;
-       }
-       string[length++] = ch;
-    }
-
-    if (info->discard) {
-       if (string != stk)
-           LispFree(string);
-
-       return (ch == EOF ? NULL : NIL);
-    }
-
-    string[length] = '\0';
-
-    if (unintern) {
-       if (length == 0)
-           READ_ERROR0("syntax error after #:");
-       object = UNINTERNED_ATOM(string);
-    }
-
-    else if (quote == '"')
-       object = LSTRING(string, length);
-
-    else if (collon) {
-       /* Package specified in object name */
-       symbol[-1] = '\0';
-       if (collon > 1)
-           symbol[-2] = '\0';
-       object = LispParseAtom(package, symbol,
-                              collon == 2, unreadable,
-                              read__stream, read__line);
-    }
-
-    else if (quote == '|' || (unreadable && !collon)) {
-       /* Set unreadable field, this atom needs quoting to be read back */
-       object = ATOM(string);
-       object->data.atom->unreadable = 1;
-    }
-
-    /* Check some common symbols */
-    else if (length == 1 && string[0] == 'T')
-       /* The T */
-       object = T;
-
-    else if (length == 1 && string[0] == '.')
-       /* The dot */
-       object = DOT;
-
-    else if (length == 3 &&
-            string[0] == 'N' && string[1] == 'I' && string[2] == 'L')
-       /* The NIL */
-       object = NIL;
-
-    else if (isdigit(string[0]) || string[0] == '.' ||
-            ((string[0] == '-' || string[0] == '+') && string[1]))
-       /* Looks like a number */
-       object = LispParseNumber(string, 10, read__stream, read__line);
-
-    else
-       /* A normal atom */
-       object = ATOM(string);
-
-    if (string != stk)
-       LispFree(string);
-
-    return (object);
-}
-
-static LispObj *
-LispParseAtom(char *package, char *symbol, int intern, int unreadable,
-             LispObj *read__stream, int read__line)
-{
-    LispObj *object = NULL, *thepackage = NULL;
-    LispPackage *pack = NULL;
-
-    if (!unreadable) {
-       /* Until NIL and T be treated as normal symbols */
-       if (symbol[0] == 'N' && symbol[1] == 'I' &&
-           symbol[2] == 'L' && symbol[3] == '\0')
-           return (NIL);
-       if (symbol[0] == 'T' && symbol[1] == '\0')
-           return (T);
-       unreadable = !LispCheckAtomString(symbol);
-    }
-
-    /* If package is empty, it is a keyword */
-    if (package[0] == '\0') {
-       thepackage = lisp__data.keyword;
-       pack = lisp__data.key;
-    }
-
-    else {
-       /* Else, search it in the package list */
-       thepackage = LispFindPackageFromString(package);
-
-       if (thepackage == NIL)
-           READ_ERROR1("the package %s is not available", package);
-
-       pack = thepackage->data.package.package;
-    }
-
-    if (pack == lisp__data.pack && intern) {
-       /* Redundant package specification, since requesting a
-        * intern symbol, create it if does not exist */
-
-       object = ATOM(symbol);
-       if (unreadable)
-           object->data.atom->unreadable = 1;
-    }
-
-    else if (intern || pack == lisp__data.key) {
-       /* Symbol is created, or just fetched from the specified package */
-
-       LispPackage *savepack;
-       LispObj *savepackage = PACKAGE;
-
-       /* Remember curent package */
-       savepack = lisp__data.pack;
-
-       /* Temporarily set another package */
-       lisp__data.pack = pack;
-       PACKAGE = thepackage;
-
-       /* Get the object pointer */
-       if (pack == lisp__data.key)
-           object = KEYWORD(LispDoGetAtom(symbol, 0)->key->value);
-       else
-           object = ATOM(symbol);
-       if (unreadable)
-           object->data.atom->unreadable = 1;
-
-       /* Restore current package */
-       lisp__data.pack = savepack;
-       PACKAGE = savepackage;
-    }
-
-    else {
-       /* Symbol must exist (and be extern) in the specified package */
-
-       LispAtom *atom;
-
-       atom = (LispAtom *)hash_check(pack->atoms, symbol, strlen(symbol));
-       if (atom)
-           object = atom->object;
-
-       /* No object found */
-       if (object == NULL || object->data.atom->ext == 0)
-           READ_ERROR2("no extern symbol %s in package %s", symbol, package);
-    }
-
-    return (object);
-}
-
-static LispObj *
-LispParseNumber(char *str, int radix, LispObj *read__stream, int read__line)
-{
-    int len;
-    long integer;
-    double dfloat;
-    char *ratio, *ptr;
-    LispObj *number;
-    mpi *bignum;
-    mpr *bigratio;
-
-    if (radix < 2 || radix > 36)
-       READ_ERROR1("radix %d is not in the range 2 to 36", radix);
-
-    if (*str == '\0')
-       return (NULL);
-
-    ratio = strchr(str, '/');
-    if (ratio) {
-       /* check if looks like a correctly specified ratio */
-       if (ratio[1] == '\0' || strchr(ratio + 1, '/') != NULL)
-           return (ATOM(str));
-
-       /* ratio must point to an integer in radix base */
-       *ratio++ = '\0';
-    }
-    else if (radix == 10) {
-       int dot = 0;
-       int type = 0;
-
-       /* check if it is a floating point number */
-       ptr = str;
-       if (*ptr == '-' || *ptr == '+')
-           ++ptr;
-       else if (*ptr == '.') {
-           dot = 1;
-           ++ptr;
-       }
-       while (*ptr) {
-           if (*ptr == '.') {
-               if (dot)
-                   return (ATOM(str));
-               /* ignore it if last char is a dot */
-               if (ptr[1] == '\0') {
-                   *ptr = '\0';
-                   break;
-               }
-               dot = 1;
-           }
-           else if (!isdigit(*ptr))
-               break;
-           ++ptr;
-       }
-
-       switch (*ptr) {
-           case '\0':
-               if (dot)                /* if dot, it is default float */
-                   type = 'E';
-               break;
-           case 'E': case 'S': case 'F': case 'D': case 'L':
-               type = *ptr;
-               *ptr = 'E';
-               break;
-           default:
-               return (ATOM(str));     /* syntax error */
-       }
-
-       /* if type set, it is not an integer specification */
-       if (type) {
-           if (*ptr) {
-               int itype = *ptr;
-               char *ptype = ptr;
-
-               ++ptr;
-               if (*ptr == '+' || *ptr == '-')
-                   ++ptr;
-               while (*ptr && isdigit(*ptr))
-                   ++ptr;
-               if (*ptr) {
-                   *ptype = itype;
-
-                   return (ATOM(str));
-               }
-           }
-
-           dfloat = strtod(str, NULL);
-           if (!finite(dfloat))
-               READ_ERROR0("floating point overflow");
-
-           return (DFLOAT(dfloat));
-       }
-    }
-
-    /* check if correctly specified in the given radix */
-    len = strlen(str) - 1;
-    if (!ratio && radix != 10 && str[len] == '.')
-       str[len] = '\0';
-
-    if (ratio || radix != 10) {
-       if (!StringInRadix(str, radix, 1)) {
-           if (ratio)
-               ratio[-1] = '/';
-           return (ATOM(str));
-       }
-       if (ratio && !StringInRadix(ratio, radix, 0)) {
-           ratio[-1] = '/';
-           return (ATOM(str));
-       }
-    }
-
-    bignum = NULL;
-    bigratio = NULL;
-
-    errno = 0;
-    integer = strtol(str, NULL, radix);
-
-    /* if does not fit in a long */
-    if (errno == ERANGE &&
-       ((*str == '-' && integer == LONG_MIN) ||
-        (*str != '-' && integer == LONG_MAX))) {
-       bignum = LispMalloc(sizeof(mpi));
-       mpi_init(bignum);
-       mpi_setstr(bignum, str, radix);
-    }
-
-
-    if (ratio && integer != 0) {
-       long denominator;
-
-       errno = 0;
-       denominator = strtol(ratio, NULL, radix);
-       if (denominator == 0)
-           READ_ERROR0("divide by zero");
-
-       if (bignum == NULL) {
-           if (integer == MINSLONG ||
-               (denominator == LONG_MAX && errno == ERANGE)) {
-               bigratio = LispMalloc(sizeof(mpr));
-               mpr_init(bigratio);
-               mpi_seti(mpr_num(bigratio), integer);
-               mpi_setstr(mpr_den(bigratio), ratio, radix);
-           }
-       }
-       else {
-           bigratio = LispMalloc(sizeof(mpr));
-           mpr_init(bigratio);
-           mpi_set(mpr_num(bigratio), bignum);
-           mpi_clear(bignum);
-           LispFree(bignum);
-           mpi_setstr(mpr_den(bigratio), ratio, radix);
-       }
-
-       if (bigratio) {
-           mpr_canonicalize(bigratio);
-           if (mpi_fiti(mpr_num(bigratio)) &&
-               mpi_fiti(mpr_den(bigratio))) {
-               integer = mpi_geti(mpr_num(bigratio));
-               denominator = mpi_geti(mpr_den(bigratio));
-               mpr_clear(bigratio);
-               LispFree(bigratio);
-               if (denominator == 1)
-                   number = INTEGER(integer);
-               else
-                   number = RATIO(integer, denominator);
-           }
-           else
-               number = BIGRATIO(bigratio);
-       }
-       else {
-           long num = integer, den = denominator, rest;
-
-           if (num < 0)
-               num = -num;
-           for (;;) {
-               if ((rest = den % num) == 0)
-                   break;
-               den = num;
-               num = rest;
-           }
-           if (den != 1) {
-               denominator /= num;
-               integer /= num;
-           }
-           if (denominator < 0) {
-               integer = -integer;
-               denominator = -denominator;
-           }
-           if (denominator == 1)
-               number = INTEGER(integer);
-           else
-               number = RATIO(integer, denominator);
-       }
-    }
-    else if (bignum)
-       number = BIGNUM(bignum);
-    else
-       number = INTEGER(integer);
-
-    return (number);
-}
-
-static int
-StringInRadix(char *str, int radix, int skip_sign)
-{
-    if (skip_sign && (*str == '-' || *str == '+'))
-       ++str;
-    while (*str) {
-       if (*str >= '0' && *str <= '9') {
-           if (*str - '0' >= radix)
-               return (0);
-       }
-       else if (*str >= 'A' && *str <= 'Z') {
-           if (radix <= 10 || *str - 'A' + 10 >= radix)
-               return (0);
-       }
-       else
-           return (0);
-       str++;
-    }
-
-    return (1);
-}
-
-static int
-AtomSeparator(int ch, int check_space, int check_backslash)
-{
-    if (check_space && isspace(ch))
-       return (1);
-    if (check_backslash && ch == '\\')
-       return (1);
-    return (strchr("(),\";'`#|,", ch) != NULL);
-}
-
-static LispObj *
-LispReadVector(read_info *info)
-{
-    LispObj *objects;
-    int nodot = info->nodot;
-
-    info->nodot = info->level + 1;
-    objects = LispReadList(info);
-    info->nodot = nodot;
-
-    if (info->discard)
-       return (objects);
-
-    return (VECTOR(objects));
-}
-
-static LispObj *
-LispReadFunction(read_info *info)
-{
-    READ_ENTER();
-    int nodot = info->nodot;
-    LispObj *function;
-
-    info->nodot = info->level + 1;
-    function = LispDoRead(info);
-    info->nodot = nodot;
-
-    if (info->discard)
-       return (function);
-
-    if (INVALIDP(function)) 
-       READ_ERROR_INVARG();
-    else if (CONSP(function)) {
-       if (CAR(function) != Olambda)
-           READ_ERROR_INVARG();
-
-       return (FUNCTION_QUOTE(function));
-    }
-    else if (!SYMBOLP(function))
-       READ_ERROR_INVARG();
-
-    return (FUNCTION_QUOTE(function));
-}
-
-static LispObj *
-LispReadRational(int radix, read_info *info)
-{
-    READ_ENTER();
-    LispObj *number;
-    int ch, len, size;
-    char stk[128], *str;
-
-    len = 0;
-    str = stk;
-    size = sizeof(stk);
-
-    for (;;) {
-       ch = LispGet();
-       if (ch == EOF || isspace(ch))
-           break;
-       else if (AtomSeparator(ch, 0, 1)) {
-           LispUnget(ch);
-           break;
-       }
-       else if (islower(ch))
-           ch = toupper(ch);
-       if ((ch < '0' || ch > '9') && (ch < 'A' || ch > 'Z') &&
-           ch != '+' && ch != '-' && ch != '/') {
-           if (str != stk)
-               LispFree(str);
-           if (!info->discard)
-               READ_ERROR1("bad character %c for rational number", ch);
-       }
-       if (len + 1 >= size) {
-           if (str == stk) {
-               size = 512;
-               str = LispMalloc(size);
-               strcpy(str + 1, stk + 1);
-           }
-           else {
-               size += 512;
-               str = LispRealloc(str, size);
-           }
-       }
-       str[len++] = ch;
-    }
-
-    if (info->discard) {
-       if (str != stk)
-           LispFree(str);
-
-       return (ch == EOF ? NULL : NIL);
-    }
-
-    str[len] = '\0';
-
-    number = LispParseNumber(str, radix, read__stream, read__line);
-    if (str != stk)
-       LispFree(str);
-
-    if (!RATIONALP(number))
-       READ_ERROR0("bad rational number specification");
-
-    return (number);
-}
-
-static LispObj *
-LispReadCharacter(read_info *info)
-{
-    READ_ENTER();
-    long c;
-    int ch, len;
-    char stk[64];
-
-    ch = LispGet();
-    if (ch == EOF)
-       return (NULL);
-
-    stk[0] = ch;
-    len = 1;
-
-    for (;;) {
-       ch = LispGet();
-       if (ch == EOF)
-           break;
-       else if (ch != '-' && !isalnum(ch)) {
-           LispUnget(ch);
-           break;
-       }
-       if (len + 1 < sizeof(stk))
-           stk[len++] = ch;
-    }
-    if (len > 1) {
-       char **names;
-       int found = 0;
-       stk[len] = '\0';
-
-       for (c = ch = 0; ch <= ' ' && !found; ch++) {
-           for (names = LispChars[ch].names; *names; names++)
-               if (strcasecmp(*names, stk) == 0) {
-                   c = ch;
-                   found = 1;
-                   break;
-               }
-       }
-       if (!found) {
-           for (names = LispChars[0177].names; *names; names++)
-               if (strcasecmp(*names, stk) == 0) {
-                   c = 0177;
-                   found = 1;
-                   break;
-               }
-       }
-
-       if (!found) {
-           if (info->discard)
-               return (NIL);
-           READ_ERROR1("unkwnown character %s", stk);
-       }
-    }
-    else
-       c = stk[0];
-
-    return (SCHAR(c));
-}
-
-static void
-LispSkipComment(void)
-{
-    READ_ENTER();
-    int ch, comm = 1;
-
-    for (;;) {
-       ch = LispGet();
-       if (ch == '#') {
-           ch = LispGet();
-           if (ch == '|')
-               ++comm;
-           continue;
-       }
-       while (ch == '|') {
-           ch = LispGet();
-           if (ch == '#' && --comm == 0)
-               return;
-       }
-       if (ch == EOF)
-           READ_ERROR_EOF();
-    }
-}
-
-static LispObj *
-LispReadEval(read_info *info)
-{
-    READ_ENTER();
-    int nodot = info->nodot;
-    LispObj *code;
-
-    info->nodot = info->level + 1;
-    code = LispDoRead(info);
-    info->nodot = nodot;
-
-    if (info->discard)
-       return (code);
-
-    if (INVALIDP(code))
-       READ_ERROR_INVARG();
-
-    return (EVAL(code));
-}
-
-static LispObj *
-LispReadComplex(read_info *info)
-{
-    READ_ENTER();
-    GC_ENTER();
-    int nodot = info->nodot;
-    LispObj *number, *arguments;
-
-    info->nodot = info->level + 1;
-    arguments = LispDoRead(info);
-    info->nodot = nodot;
-
-    /* form read */
-    if (info->discard)
-       return (arguments);
-
-    if (INVALIDP(arguments) || !CONSP(arguments))
-       READ_ERROR_INVARG();
-
-    GC_PROTECT(arguments);
-    number = APPLY(Ocomplex, arguments);
-    GC_LEAVE();
-
-    return (number);
-}
-
-static LispObj *
-LispReadPathname(read_info *info)
-{
-    READ_ENTER();
-    GC_ENTER();
-    int nodot = info->nodot;
-    LispObj *path, *arguments;
-
-    info->nodot = info->level + 1;
-    arguments = LispDoRead(info);
-    info->nodot = nodot;
-
-    /* form read */
-    if (info->discard)
-       return (arguments);
-
-    if (INVALIDP(arguments))
-       READ_ERROR_INVARG();
-
-    GC_PROTECT(arguments);
-    path = APPLY1(Oparse_namestring, arguments);
-    GC_LEAVE();
-
-    return (path);
-}
-
-static LispObj *
-LispReadStruct(read_info *info)
-{
-    READ_ENTER();
-    GC_ENTER();
-    int len, nodot = info->nodot;
-    char stk[128], *str;
-    LispObj *struc, *fields;
-
-    info->nodot = info->level + 1;
-    fields = LispDoRead(info);
-    info->nodot = nodot;
-
-    /* form read */
-    if (info->discard)
-       return (fields);
-
-    if (INVALIDP(fields) || !CONSP(fields) || !SYMBOLP(CAR(fields)))
-       READ_ERROR_INVARG();
-
-    GC_PROTECT(fields);
-
-    len = ATOMID(CAR(fields))->length;
-          /* MAKE- */
-    if (len + 6 > sizeof(stk))
-       str = LispMalloc(len + 6);
-    else
-       str = stk;
-    sprintf(str, "MAKE-%s", ATOMID(CAR(fields))->value);
-    RPLACA(fields, ATOM(str));
-    if (str != stk)
-       LispFree(str);
-    struc = APPLY(Omake_struct, fields);
-    GC_LEAVE();
-
-    return (struc);
-}
-
-/* XXX This is broken, needs a rewritten as soon as true vector/arrays be
- * implemented. */
-static LispObj *
-LispReadArray(long dimensions, read_info *info)
-{
-    READ_ENTER();
-    GC_ENTER();
-    long count;
-    int nodot = info->nodot;
-    LispObj *arguments, *initial, *dim, *cons, *array, *data;
-
-    info->nodot = info->level + 1;
-    data = LispDoRead(info);
-    info->nodot = nodot;
-
-    /* form read */
-    if (info->discard)
-       return (data);
-
-    if (INVALIDP(data))
-       READ_ERROR_INVARG();
-
-    initial = Kinitial_contents;
-
-    dim = cons = NIL;
-    if (dimensions) {
-       LispObj *array;
-
-       for (count = 0, array = data; count < dimensions; count++) {
-           long length;
-           LispObj *item;
-
-           if (!CONSP(array))
-               READ_ERROR0("bad array for given dimension");
-           item = array;
-           array = CAR(array);
-
-           for (length = 0; CONSP(item); item = CDR(item), length++)
-               ;
-
-           if (dim == NIL) {
-               dim = cons = CONS(FIXNUM(length), NIL);
-               GC_PROTECT(dim);
-           }
-           else {
-               RPLACD(cons, CONS(FIXNUM(length), NIL));
-               cons = CDR(cons);
-           }
-       }
-    }
-
-    arguments = CONS(dim, CONS(initial, CONS(data, NIL)));
-    GC_PROTECT(arguments);
-    array = APPLY(Omake_array, arguments);
-    GC_LEAVE();
-
-    return (array);
-}
-
-static LispObj *
-LispReadFeature(int with, read_info *info)
-{
-    READ_ENTER();
-    LispObj *status;
-    LispObj *feature = LispDoRead(info);
-
-    /* form read */
-    if (info->discard)
-       return (feature);
-
-    if (INVALIDP(feature))
-       READ_ERROR_INVARG();
-
-    /* paranoia check, features must be a list, possibly empty */
-    if (!CONSP(FEATURES) && FEATURES != NIL)
-       READ_ERROR1("%s is not a list", STROBJ(FEATURES));
-
-    status = LispEvalFeature(feature);
-
-    if (with) {
-       if (status == T)
-           return (LispDoRead(info));
-
-       /* need to use the field discard because the following expression
-        * may be #.FORM or #,FORM or any other form that may generate
-        * side effects */
-       info->discard = 1;
-       LispDoRead(info);
-       info->discard = 0;
-
-       return (LispDoRead(info));
-    }
-
-    if (status == NIL)
-       return (LispDoRead(info));
-
-    info->discard = 1;
-    LispDoRead(info);
-    info->discard = 0;
-
-    return (LispDoRead(info));
-}
-
-/*
- * A very simple eval loop with AND, NOT, and OR functions for testing
- * the available features.
- */
-static LispObj *
-LispEvalFeature(LispObj *feature)
-{
-    READ_ENTER();
-    Atom_id test;
-    LispObj *object;
-
-    if (CONSP(feature)) {
-       LispObj *function = CAR(feature), *arguments = CDR(feature);
-
-       if (!SYMBOLP(function))
-           READ_ERROR1("bad feature test function %s", STROBJ(function));
-       if (!CONSP(arguments))
-           READ_ERROR1("bad feature test arguments %s", STROBJ(arguments));
-       test = ATOMID(function);
-       if (test == Sand) {
-           for (; CONSP(arguments); arguments = CDR(arguments)) {
-               if (LispEvalFeature(CAR(arguments)) == NIL)
-                   return (NIL);
-           }
-           return (T);
-       }
-       else if (test == Sor) {
-           for (; CONSP(arguments); arguments = CDR(arguments)) {
-               if (LispEvalFeature(CAR(arguments)) == T)
-                   return (T);
-           }
-           return (NIL);
-       }
-       else if (test == Snot) {
-           if (CONSP(CDR(arguments)))
-               READ_ERROR0("too many arguments to NOT");
-
-           return (LispEvalFeature(CAR(arguments)) == NIL ? T : NIL);
-       }
-       else
-           READ_ERROR1("unimplemented feature test function %s", test);
-    }
-
-    if (KEYWORDP(feature))
-       feature = feature->data.quote;
-    else if (!SYMBOLP(feature))
-       READ_ERROR1("bad feature specification %s", STROBJ(feature));
-
-    test = ATOMID(feature);
-
-    for (object = FEATURES; CONSP(object); object = CDR(object)) {
-       /* paranoia check, elements in the feature list must ge keywords */
-       if (!KEYWORDP(CAR(object)))
-           READ_ERROR1("%s is not a keyword", STROBJ(CAR(object)));
-       if (ATOMID(CAR(object)) == test)
-           return (T);
-    }
-
-    /* unknown feature */
-    return (NIL);
-}
diff --git a/xedit/lisp/read.h b/xedit/lisp/read.h
deleted file mode 100644 (file)
index e36e153..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/read.h,v 1.3tsi Exp $ */
-
-#ifndef Lisp_read_h
-#define Lisp_read_h
-
-#include "lisp/io.h"
-
-/*
- * Prototypes
- */
-LispObj *LispRead(void);
-
-LispObj *Lisp_Read(LispBuiltin*);
-LispObj *Lisp_ReadChar(LispBuiltin*);
-LispObj *Lisp_ReadCharNoHang(LispBuiltin*);
-LispObj *Lisp_ReadLine(LispBuiltin*);
-
-#endif /* Lisp_read_h */
diff --git a/xedit/lisp/regex.c b/xedit/lisp/regex.c
deleted file mode 100644 (file)
index 5e1de6c..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/regex.c,v 1.10tsi Exp $ */
-
-#include "lisp/regex.h"
-#include "lisp/private.h"
-#include "lisp/helper.h"
-
-/*
- * Prototypes
- */
-static re_cod *LispRecomp(LispBuiltin*, char*, int);
-
-/*
- * Initialization
- */
-LispObj *Knomatch;
-
-/*
- * Implementation
- */
-static re_cod *
-LispRecomp(LispBuiltin *builtin, char *pattern, int cflags)
-{
-    int code;
-    re_cod *regex = LispMalloc(sizeof(re_cod));
-
-    if ((code = recomp(regex, pattern, cflags)) != 0) {
-       char buffer[256];
-
-       reerror(code, regex, buffer, sizeof(buffer));
-       refree(regex);
-       LispFree(regex);
-       LispDestroy("%s: recomp(\"%s\"): %s", STRFUN(builtin), pattern, buffer);
-    }
-
-    return (regex);
-}
-
-void
-LispRegexInit(void)
-{
-    Knomatch = KEYWORD("NOMATCH");
-}
-
-LispObj *
-Lisp_Recomp(LispBuiltin *builtin)
-/*
- re-comp pattern &key nospec icase nosub newline
- */
-{
-    re_cod *regex;
-    int cflags = 0;
-
-    LispObj *result;
-
-    LispObj *pattern, *nospec, *icase, *nosub, *newline;
-
-    newline = ARGUMENT(4);
-    nosub = ARGUMENT(3);
-    icase = ARGUMENT(2);
-    nospec = ARGUMENT(1);
-    pattern = ARGUMENT(0);
-
-    /* Don't generate an error if it is already a compiled regex. */
-    if (REGEXP(pattern))
-       return (pattern);
-
-    CHECK_STRING(pattern);
-
-    if (nospec != UNSPEC && nospec != NIL)
-       cflags |= RE_NOSPEC;
-    if (icase != UNSPEC && icase != NIL)
-       cflags |= RE_ICASE;
-    if (nosub != UNSPEC && nosub != NIL)
-       cflags |= RE_NOSUB;
-    if (newline != UNSPEC && newline != NIL)
-       cflags |= RE_NEWLINE;
-
-    regex = LispRecomp(builtin, THESTR(pattern), cflags);
-    result = LispNew(pattern, NIL);
-    result->type = LispRegex_t;
-    result->data.regex.regex = regex;
-    result->data.regex.pattern = pattern;
-    result->data.regex.options = cflags;
-    LispMused(regex);
-
-    return (result);
-}
-
-LispObj *
-Lisp_Reexec(LispBuiltin *builtin)
-/*
- re-exec regex string &key count start end notbol noteol
- */
-{
-    size_t nmatch;
-    re_mat match[10];
-    long start, end, length;
-    int code, cflags, eflags;
-    char *string;
-    LispObj *result;
-    re_cod *regexp;
-
-    LispObj *regex, *ostring, *count, *ostart, *oend, *notbol, *noteol;
-
-    noteol = ARGUMENT(6);
-    notbol = ARGUMENT(5);
-    oend = ARGUMENT(4);
-    ostart = ARGUMENT(3);
-    count = ARGUMENT(2);
-    ostring = ARGUMENT(1);
-    regex = ARGUMENT(0);
-
-    if (STRINGP(regex))
-       regexp = LispRecomp(builtin, THESTR(regex), cflags = 0);
-    else {
-       CHECK_REGEX(regex);
-       regexp = regex->data.regex.regex;
-       cflags = regex->data.regex.options;
-    }
-
-    CHECK_STRING(ostring);
-
-    if (count == UNSPEC)
-       nmatch = 1;
-    else {
-       CHECK_INDEX(count);
-       nmatch = FIXNUM_VALUE(count);
-       if (nmatch > 10)
-           LispDestroy("%s: COUNT cannot be larger than 10", STRFUN(builtin));
-    }
-    if (nmatch && (cflags & RE_NOSUB))
-       nmatch = 1;
-
-    eflags = RE_STARTEND;
-    if (notbol != UNSPEC && notbol != NIL)
-       eflags |= RE_NOTBOL;
-    if (noteol != UNSPEC && noteol != NIL)
-       eflags |= RE_NOTEOL;
-
-    string = THESTR(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &length);
-
-    match[0].rm_so = start;
-    match[0].rm_eo = end;
-    code = reexec(regexp, string, nmatch, &match[0], eflags);
-
-    if (code == 0) {
-       if (nmatch && match[0].rm_eo >= match[0].rm_so) {
-           result = CONS(CONS(FIXNUM(match[0].rm_so),
-                              FIXNUM(match[0].rm_eo)), NIL);
-           if (nmatch > 1 && match[1].rm_eo >= match[1].rm_so) {
-               int i;
-               GC_ENTER();
-               LispObj *cons = result;
-
-               GC_PROTECT(result);
-               for (i = 1;
-                    i < nmatch && match[i].rm_eo >= match[i].rm_so;
-                    i++) {
-                   RPLACD(cons, CONS(CONS(FIXNUM(match[i].rm_so),
-                                          FIXNUM(match[i].rm_eo)), NIL));
-                   cons = CDR(cons);
-               }
-               GC_LEAVE();
-           }
-       }
-       else
-           result = NIL;
-    }
-    else
-       result = Knomatch;
-
-    /* Maybe shoud cache compiled regex, but better the caller do it */
-    if (!XREGEXP(regex)) {
-       refree(regexp);
-       LispFree(regexp);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_Rep(LispBuiltin *builtin)
-/*
- re-p object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (REGEXP(object) ? T : NIL);
-}
diff --git a/xedit/lisp/regex.h b/xedit/lisp/regex.h
deleted file mode 100644 (file)
index 6a110c3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/regex.h,v 1.3tsi Exp $ */
-
-#ifndef Lisp_regex_h
-#define Lisp_regex_h
-
-#include "lisp/internal.h"
-
-/*
- * Prototypes
- */
-void LispRegexInit(void);
-
-LispObj *Lisp_Recomp(LispBuiltin*);
-LispObj *Lisp_Reexec(LispBuiltin*);
-LispObj *Lisp_Rep(LispBuiltin*);
-
-#endif /* Lisp_regex_h */
diff --git a/xedit/lisp/require.c b/xedit/lisp/require.c
deleted file mode 100644 (file)
index b998dc3..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/require.c,v 1.17tsi Exp $ */
-
-#include "lisp/require.h"
-
-/*
- * Implementation
- */
-LispObj *
-Lisp_Load(LispBuiltin *builtin)
-/*
- load filename &key verbose print if-does-not-exist
- */
-{
-    LispObj *filename, *verbose, *print, *if_does_not_exist;
-
-    if_does_not_exist = ARGUMENT(3);
-    print = ARGUMENT(2);
-    verbose = ARGUMENT(1);
-    filename = ARGUMENT(0);
-
-    if (PATHNAMEP(filename))
-       filename = CAR(filename->data.pathname);
-    else {
-       CHECK_STRING(filename);
-    }
-
-    return (LispLoadFile(filename,
-                        verbose != UNSPEC && verbose != NIL,
-                        print != UNSPEC && print != NIL,
-                        if_does_not_exist != UNSPEC &&
-                        if_does_not_exist != NIL));
-}
-
-LispObj *
-Lisp_Require(LispBuiltin *builtin)
-/*
- require module &optional pathname
- */
-{
-    char filename[1024], *ext;
-    int len;
-
-    LispObj *obj, *module, *pathname;
-
-    pathname = ARGUMENT(1);
-    module = ARGUMENT(0);
-
-    CHECK_STRING(module);
-    if (pathname != UNSPEC) {
-       if (PATHNAMEP(pathname))
-           pathname = CAR(pathname->data.pathname);
-       else {
-           CHECK_STRING(pathname);
-       }
-    }
-    else
-       pathname = module;
-
-    for (obj = MOD; CONSP(obj); obj = CDR(obj)) {
-       if (strcmp(THESTR(CAR(obj)), THESTR(module)) == 0)
-           return (module);
-    }
-
-    if (THESTR(pathname)[0] != '/') {
-#ifdef LISPDIR
-       snprintf(filename, sizeof(filename), "%s", LISPDIR);
-#else
-       getcwd(filename, sizeof(filename));
-#endif
-    }
-    else
-       filename[0] = '\0';
-    *(filename + sizeof(filename) - 5) = '\0'; /* make sure there is place for ext */
-    len = strlen(filename);
-    if (!len || filename[len - 1] != '/') {
-       strcat(filename, "/");
-       ++len;
-    }
-
-    snprintf(filename + len, sizeof(filename) - len - 5, "%s", THESTR(pathname));
-
-    ext = filename + strlen(filename);
-
-#ifdef SHARED_MODULES
-    strcpy(ext, ".so");
-    if (access(filename, R_OK) == 0) {
-       LispModule *lisp_module;
-       char data[64];
-       int len;
-
-       if (lisp__data.module == NULL) {
-           /* export our own symbols */
-           if (dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL) == NULL)
-               LispDestroy("%s: ", STRFUN(builtin), dlerror());
-       }
-
-       lisp_module = (LispModule*)LispMalloc(sizeof(LispModule));
-       if ((lisp_module->handle =
-            dlopen(filename, RTLD_LAZY | RTLD_GLOBAL)) == NULL)
-           LispDestroy("%s: dlopen: %s", STRFUN(builtin), dlerror());
-       snprintf(data, sizeof(data), "%sLispModuleData", THESTR(module));
-       if ((lisp_module->data =
-            (LispModuleData*)dlsym(lisp_module->handle, data)) == NULL) {
-           dlclose(lisp_module->handle);
-           LispDestroy("%s: cannot find LispModuleData for %s",
-                       STRFUN(builtin), STROBJ(module));
-       }
-       LispMused(lisp_module);
-       lisp_module->next = lisp__data.module;
-       lisp__data.module = lisp_module;
-       if (lisp_module->data->load)
-           (lisp_module->data->load)();
-
-       if (MOD == NIL)
-           MOD = CONS(module, NIL);
-       else {
-           RPLACD(MOD, CONS(CAR(MOD), CDR(MOD)));
-           RPLACA(MOD, module);
-       }
-       LispSetVar(lisp__data.modules, MOD);
-
-       return (module);
-    }
-#endif
-
-    strcpy(ext, ".lsp");
-    (void)LispLoadFile(STRING(filename), 0, 0, 0);
-
-    return (module);
-}
diff --git a/xedit/lisp/require.h b/xedit/lisp/require.h
deleted file mode 100644 (file)
index fe6858c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/require.h,v 1.4tsi Exp $ */
-
-#ifndef Lisp_require_h
-#define Lisp_require_h
-
-#include "lisp/private.h"
-#include "lisp/helper.h"
-#ifdef SHARED_MODULES
-#include <dlfcn.h>
-#endif
-
-LispObj *Lisp_Load(LispBuiltin*);
-LispObj *Lisp_Require(LispBuiltin*);
-
-#endif /* Lisp_require_h */
diff --git a/xedit/lisp/stream.c b/xedit/lisp/stream.c
deleted file mode 100644 (file)
index aad89cf..0000000
+++ /dev/null
@@ -1,866 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/stream.c,v 1.21tsi Exp $ */
-
-#include "lisp/read.h"
-#include "lisp/stream.h"
-#include "lisp/pathname.h"
-#include "lisp/write.h"
-#include "lisp/private.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <string.h>
-#include <sys/wait.h>
-
-/*
- * Initialization
- */
-#define DIR_PROBE              0
-#define DIR_INPUT              1
-#define DIR_OUTPUT             2
-#define DIR_IO                 3
-
-#define EXT_NIL                        0
-#define EXT_ERROR              1
-#define EXT_NEW_VERSION                2
-#define EXT_RENAME             3
-#define EXT_RENAME_DELETE      4
-#define EXT_OVERWRITE          5
-#define EXT_APPEND             6
-#define EXT_SUPERSEDE          7
-
-#define NOEXT_NIL              0
-#define NOEXT_ERROR            1
-#define NOEXT_CREATE           2
-#define NOEXT_NOTHING          3
-
-extern char **environ;
-
-LispObj *Oopen, *Oclose, *Otruename;
-
-LispObj *Kif_does_not_exist, *Kprobe, *Kinput, *Koutput, *Kio,
-       *Knew_version, *Krename, *Krename_and_delete, *Koverwrite,
-       *Kappend, *Ksupersede, *Kcreate;
-
-/*
- * Implementation
- */
-void
-LispStreamInit(void)
-{
-    Oopen              = STATIC_ATOM("OPEN");
-    Oclose             = STATIC_ATOM("CLOSE");
-    Otruename          = STATIC_ATOM("TRUENAME");
-
-    Kif_does_not_exist = KEYWORD("IF-DOES-NOT-EXIST");
-    Kprobe             = KEYWORD("PROBE");
-    Kinput             = KEYWORD("INPUT");
-    Koutput            = KEYWORD("OUTPUT");
-    Kio                        = KEYWORD("IO");
-    Knew_version       = KEYWORD("NEW-VERSION");
-    Krename            = KEYWORD("RENAME");
-    Krename_and_delete = KEYWORD("RENAME-AND-DELETE");
-    Koverwrite         = KEYWORD("OVERWRITE");
-    Kappend            = KEYWORD("APPEND");
-    Ksupersede         = KEYWORD("SUPERSEDE");
-    Kcreate            = KEYWORD("CREATE");
-}
-
-LispObj *
-Lisp_DeleteFile(LispBuiltin *builtin)
-/*
- delete-file filename
- */
-{
-    GC_ENTER();
-    LispObj *filename;
-
-    filename = ARGUMENT(0);
-
-    if (STRINGP(filename)) {
-       filename = APPLY1(Oparse_namestring, filename);
-       GC_PROTECT(filename);
-    }
-    else if (STREAMP(filename)) {
-       if (filename->data.stream.type != LispStreamFile)
-           LispDestroy("%s: %s is not a FILE-STREAM",
-                       STRFUN(builtin), STROBJ(filename));
-       filename = filename->data.stream.pathname;
-    }
-    else {
-       CHECK_PATHNAME(filename);
-    }
-    GC_LEAVE();
-
-    return (LispUnlink(THESTR(CAR(filename->data.pathname))) ? NIL : T);
-}
-
-LispObj *
-Lisp_RenameFile(LispBuiltin *builtin)
-/*
- rename-file filename new-name
- */
-{
-    int code;
-    GC_ENTER();
-    char *from, *to;
-    LispObj *old_truename, *new_truename;
-
-    LispObj *filename, *new_name;
-
-    new_name = ARGUMENT(1);
-    filename = ARGUMENT(0);
-
-    if (STRINGP(filename)) {
-       filename = APPLY1(Oparse_namestring, filename);
-       GC_PROTECT(filename);
-    }
-    else if (STREAMP(filename)) {
-       if (filename->data.stream.type != LispStreamFile)
-           LispDestroy("%s: %s is not a FILE-STREAM",
-                       STRFUN(builtin), STROBJ(filename));
-       filename = filename->data.stream.pathname;
-    }
-    else {
-       CHECK_PATHNAME(filename);
-    }
-    old_truename = APPLY1(Otruename, filename);
-    GC_PROTECT(old_truename);
-
-    if (STRINGP(new_name)) {
-       new_name = APPLY3(Oparse_namestring, new_name, NIL, filename);
-       GC_PROTECT(new_name);
-    }
-    else {
-       CHECK_PATHNAME(new_name);
-    }
-
-    from = THESTR(CAR(filename->data.pathname));
-    to = THESTR(CAR(new_name->data.pathname));
-    code = LispRename(from, to);
-    if (code)
-       LispDestroy("%s: rename(%s, %s): %s",
-                   STRFUN(builtin), from, to, strerror(errno));
-    GC_LEAVE();
-
-    new_truename = APPLY1(Otruename, new_name);
-    RETURN_COUNT = 2;
-    RETURN(0) = old_truename;
-    RETURN(1) = new_truename;
-
-    return (new_name);
-}
-
-LispObj *
-Lisp_Streamp(LispBuiltin *builtin)
-/*
- streamp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (STREAMP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_InputStreamP(LispBuiltin *builtin)
-/*
- input-stream-p stream
- */
-{
-    LispObj *stream;
-
-    stream = ARGUMENT(0);
-
-    CHECK_STREAM(stream);
-
-    return (stream->data.stream.readable ? T : NIL);
-}
-
-LispObj *
-Lisp_OpenStreamP(LispBuiltin *builtin)
-/*
- open-stream-p stream
- */
-{
-   LispObj *stream;
-
-    stream = ARGUMENT(0);
-
-    CHECK_STREAM(stream);
-
-    return (stream->data.stream.readable || stream->data.stream.writable ?
-           T : NIL);
-}
-
-LispObj *
-Lisp_OutputStreamP(LispBuiltin *builtin)
-/*
- output-stream-p stream
- */
-{
-    LispObj *stream;
-
-    stream = ARGUMENT(0);
-
-    CHECK_STREAM(stream);
-
-    return (stream->data.stream.writable ? T : NIL);
-}
-
-LispObj *
-Lisp_Open(LispBuiltin *builtin)
-/*
- open filename &key direction element-type if-exists if-does-not-exist external-format
- */
-{
-    GC_ENTER();
-    char *string;
-    LispObj *stream = NIL;
-    int mode, flags, direction, exist, noexist, file_exist;
-    LispFile *file;
-
-    LispObj *filename, *odirection, *element_type, *if_exists,
-           *if_does_not_exist, *external_format;
-
-    external_format = ARGUMENT(5);
-    if_does_not_exist = ARGUMENT(4);
-    if_exists = ARGUMENT(3);
-    element_type = ARGUMENT(2);
-    odirection = ARGUMENT(1);
-    filename = ARGUMENT(0);
-
-    if (STRINGP(filename)) {
-       filename = APPLY1(Oparse_namestring, filename);
-       GC_PROTECT(filename);
-    }
-    else if (STREAMP(filename)) {
-       if (filename->data.stream.type != LispStreamFile)
-           LispDestroy("%s: %s is not a FILE-STREAM",
-                       STRFUN(builtin), STROBJ(filename));
-       filename = filename->data.stream.pathname;
-    }
-    else {
-       CHECK_PATHNAME(filename);
-    }
-
-    if (odirection != UNSPEC) {
-       direction = -1;
-       if (KEYWORDP(odirection)) {
-           if (odirection == Kprobe)
-               direction = DIR_PROBE;
-           else if (odirection == Kinput)
-               direction = DIR_INPUT;
-           else if (odirection == Koutput)
-               direction = DIR_OUTPUT;
-           else if (odirection == Kio)
-               direction = DIR_IO;
-       }
-       if (direction == -1)
-           LispDestroy("%s: bad :DIRECTION %s",
-                       STRFUN(builtin), STROBJ(odirection));
-    }
-    else
-       direction = DIR_INPUT;
-
-    if (element_type != UNSPEC) {
-       /* just check argument... */
-       if (SYMBOLP(element_type) &&
-           ATOMID(element_type) == Scharacter)
-           ;   /* do nothing */
-       else if (KEYWORDP(element_type) &&
-           ATOMID(element_type) == Sdefault)
-           ;   /* do nothing */
-       else
-           LispDestroy("%s: only :%s and %s supported for :ELEMENT-TYPE, not %s",
-                       STRFUN(builtin), Sdefault->value, Scharacter->value, STROBJ(element_type));
-    }
-
-    if (if_exists != UNSPEC) {
-       exist = -1;
-       if (if_exists == NIL)
-           exist = EXT_NIL;
-       else if (KEYWORDP(if_exists)) {
-           if (if_exists == Kerror)
-               exist = EXT_ERROR;
-           else if (if_exists == Knew_version)
-               exist = EXT_NEW_VERSION;
-           else if (if_exists == Krename)
-               exist = EXT_RENAME;
-           else if (if_exists == Krename_and_delete)
-               exist = EXT_RENAME_DELETE;
-           else if (if_exists == Koverwrite)
-               exist = EXT_OVERWRITE;
-           else if (if_exists == Kappend)
-               exist = EXT_APPEND;
-           else if (if_exists == Ksupersede)
-               exist = EXT_SUPERSEDE;
-       }
-       if (exist == -1)
-           LispDestroy("%s: bad :IF-EXISTS %s",
-                       STRFUN(builtin), STROBJ(if_exists));
-    }
-    else
-       exist = EXT_ERROR;
-
-    if (if_does_not_exist != UNSPEC) {
-       noexist = -1;
-       if (if_does_not_exist == NIL)
-           noexist = NOEXT_NIL;
-       if (KEYWORDP(if_does_not_exist)) {
-           if (if_does_not_exist == Kerror)
-               noexist = NOEXT_ERROR;
-           else if (if_does_not_exist == Kcreate)
-               noexist = NOEXT_CREATE;
-       }
-       if (noexist == -1)
-           LispDestroy("%s: bad :IF-DOES-NO-EXISTS %s",
-                       STRFUN(builtin), STROBJ(if_does_not_exist));
-    }
-    else
-       noexist = direction != DIR_INPUT ? NOEXT_NOTHING : NOEXT_ERROR;
-
-    if (external_format != UNSPEC) {
-       /* just check argument... */
-       if (SYMBOLP(external_format) &&
-           ATOMID(external_format) == Scharacter)
-           ;   /* do nothing */
-       else if (KEYWORDP(external_format) &&
-           ATOMID(external_format) == Sdefault)
-           ;   /* do nothing */
-       else
-           LispDestroy("%s: only :%s and %s supported for :EXTERNAL-FORMAT, not %s",
-                       STRFUN(builtin), Sdefault->value, Scharacter->value, STROBJ(external_format));
-    }
-
-    /* string representation of pathname */
-    string = THESTR(CAR(filename->data.pathname));
-    mode = 0;
-
-    file_exist = access(string, F_OK) == 0;
-    if (file_exist) {
-       if (exist == EXT_NIL) {
-           GC_LEAVE();
-           return (NIL);
-       }
-    }
-    else {
-       if (noexist == NOEXT_NIL) {
-           GC_LEAVE();
-           return (NIL);
-       }
-       if (noexist == NOEXT_ERROR)
-           LispDestroy("%s: file %s does not exist",
-                       STRFUN(builtin), STROBJ(CAR(filename->data.quote)));
-       else if (noexist == NOEXT_CREATE) {
-           LispFile *tmp = LispFopen(string, FILE_WRITE);
-
-           if (tmp)
-               LispFclose(tmp);
-           else
-               LispDestroy("%s: cannot create file %s",
-                           STRFUN(builtin),
-                           STROBJ(CAR(filename->data.quote)));
-       }
-    }
-
-    if (direction == DIR_OUTPUT || direction == DIR_IO) {
-       if (file_exist) {
-           if (exist == EXT_ERROR)
-               LispDestroy("%s: file %s already exists",
-                           STRFUN(builtin), STROBJ(CAR(filename->data.quote)));
-           if (exist == EXT_RENAME) {
-               /* Add an ending '~' at the end of the backup file */
-               char tmp[PATH_MAX + 1];
-
-               strcpy(tmp, string);
-               if (strlen(tmp) + 1 > PATH_MAX)
-                   LispDestroy("%s: backup name for %s too long",
-                               STRFUN(builtin),
-                               STROBJ(CAR(filename->data.quote)));
-               strcat(tmp, "~");
-               if (rename(string, tmp))
-                   LispDestroy("%s: rename: %s",
-                               STRFUN(builtin), strerror(errno));
-               mode |= FILE_WRITE;
-           }
-           else if (exist == EXT_OVERWRITE)
-               mode |= FILE_WRITE;
-           else if (exist == EXT_APPEND)
-               mode |= FILE_APPEND;
-       }
-       else
-           mode |= FILE_WRITE;
-       if (direction == DIR_IO)
-           mode |= FILE_IO;
-    }
-    else
-       mode |= FILE_READ;
-
-    file = LispFopen(string, mode);
-    if (file == NULL)
-       LispDestroy("%s: open: %s", STRFUN(builtin), strerror(errno));
-
-    flags = 0;
-    if (direction == DIR_PROBE) {
-       LispFclose(file);
-       file = NULL;
-    }
-    else {
-       if (direction == DIR_INPUT || direction == DIR_IO)
-           flags |= STREAM_READ;
-       if (direction == DIR_OUTPUT || direction == DIR_IO)
-           flags |= STREAM_WRITE;
-    }
-    stream = FILESTREAM(file, filename, flags);
-    GC_LEAVE();
-
-    return (stream);
-}
-
-LispObj *
-Lisp_Close(LispBuiltin *builtin)
-/*
- close stream &key abort
- */
-{
-    LispObj *stream, *oabort;
-
-    oabort = ARGUMENT(1);
-    stream = ARGUMENT(0);
-
-    CHECK_STREAM(stream);
-
-    if (stream->data.stream.readable || stream->data.stream.writable) {
-       stream->data.stream.readable = stream->data.stream.writable = 0;
-       if (stream->data.stream.type == LispStreamFile) {
-           LispFclose(stream->data.stream.source.file);
-           stream->data.stream.source.file = NULL;
-       }
-       else if (stream->data.stream.type == LispStreamPipe) {
-           if (IPSTREAMP(stream)) {
-               LispFclose(IPSTREAMP(stream));
-               IPSTREAMP(stream) = NULL;
-           }
-           if (OPSTREAMP(stream)) {
-               LispFclose(OPSTREAMP(stream));
-               OPSTREAMP(stream) = NULL;
-           }
-           if (EPSTREAMP(stream)) {
-               LispFclose(EPSTREAMP(stream));
-               EPSTREAMP(stream) = NULL;
-           }
-           if (PIDPSTREAMP(stream) > 0) {
-               kill(PIDPSTREAMP(stream),
-                    oabort == UNSPEC || oabort == NIL ? SIGTERM : SIGKILL);
-               waitpid(PIDPSTREAMP(stream), NULL, 0);
-           }
-       }
-       return (T);
-    }
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Listen(LispBuiltin *builtin)
-/*
- listen &optional input-stream
- */
-{
-    LispFile *file = NULL;
-    LispObj *result = NIL;
-
-    LispObj *stream;
-
-    stream = ARGUMENT(0);
-
-    if (stream == UNSPEC)
-       stream = NIL;
-    else if (stream != NIL) {
-       CHECK_STREAM(stream);
-    }
-    else
-       stream = lisp__data.standard_input;
-
-    if (stream->data.stream.readable) {
-       switch (stream->data.stream.type) {
-           case LispStreamString:
-               if (SSTREAMP(stream)->input < SSTREAMP(stream)->length)
-                   result = T;
-               break;
-           case LispStreamFile:
-               file = FSTREAMP(stream);
-               break;
-           case LispStreamStandard:
-               file = FSTREAMP(stream);
-               break;
-           case LispStreamPipe:
-               file = IPSTREAMP(stream);
-               break;
-       }
-
-       if (file != NULL) {
-           if (file->available || file->offset < file->length)
-               result = T;
-           else {
-               unsigned char c;
-
-               if (!file->nonblock) {
-                   if (fcntl(file->descriptor, F_SETFL, O_NONBLOCK) < 0)
-                       LispDestroy("%s: fcntl: %s",
-                                   STRFUN(builtin), strerror(errno));
-                   file->nonblock = 1;
-               }
-               if (read(file->descriptor, &c, 1) == 1) {
-                   LispFungetc(file, c);
-                   result = T;
-               }
-           }
-       }
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_MakeStringInputStream(LispBuiltin *builtin)
-/*
- make-string-input-stream string &optional start end
- */
-{
-    char *string;
-    long start, end, length;
-
-    LispObj *ostring, *ostart, *oend, *result;
-
-    oend = ARGUMENT(2);
-    ostart = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-
-    start = end = 0;
-    CHECK_STRING(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &length);
-    string = THESTR(ostring);
-
-    if (end - start != length)
-       length = end - start;
-    result = LSTRINGSTREAM(string + start, STREAM_READ, length);
-
-    return (result);
-}
-
-LispObj *
-Lisp_MakeStringOutputStream(LispBuiltin *builtin)
-/*
- make-string-output-stream &key element-type
- */
-{
-    LispObj *element_type;
-
-    element_type = ARGUMENT(0);
-
-    if (element_type != UNSPEC) {
-       /* just check argument... */
-       if (SYMBOLP(element_type) && ATOMID(element_type) == Scharacter)
-           ;   /* do nothing */
-       else if (KEYWORDP(element_type) &&
-           ATOMID(element_type) == Sdefault)
-           ;   /* do nothing */
-       else
-           LispDestroy("%s: only :%s and %s supported for :ELEMENT-TYPE, not %s",
-                       STRFUN(builtin), Sdefault->value, Scharacter->value, STROBJ(element_type));
-    }
-
-    return (LSTRINGSTREAM("", STREAM_WRITE, 1));
-}
-
-LispObj *
-Lisp_GetOutputStreamString(LispBuiltin *builtin)
-/*
- get-output-stream-string string-output-stream
- */
-{
-    int length;
-    char *string;
-    LispObj *string_output_stream, *result;
-
-    string_output_stream = ARGUMENT(0);
-
-    if (!STREAMP(string_output_stream) ||
-       string_output_stream->data.stream.type != LispStreamString ||
-       string_output_stream->data.stream.readable ||
-       !string_output_stream->data.stream.writable)
-       LispDestroy("%s: %s is not an output string stream",
-                   STRFUN(builtin), STROBJ(string_output_stream));
-
-    string = LispGetSstring(SSTREAMP(string_output_stream), &length);
-    result = LSTRING(string, length);
-
-    /* reset string */
-    SSTREAMP(string_output_stream)->output =
-       SSTREAMP(string_output_stream)->length =
-       SSTREAMP(string_output_stream)->column = 0;
-
-    return (result);
-}
-
-
-/* XXX Non standard functions below
- */
-LispObj *
-Lisp_MakePipe(LispBuiltin *builtin)
-/*
- make-pipe command-line &key :direction :element-type :external-format
- */
-{
-    char *string;
-    LispObj *stream = NIL;
-    int flags, direction;
-    LispFile *error_file;
-    LispPipe *program;
-    int ifd[2];
-    int ofd[2];
-    int efd[2];
-    char *argv[4];
-
-    LispObj *command_line, *odirection, *element_type, *external_format;
-
-    external_format = ARGUMENT(3);
-    element_type = ARGUMENT(2);
-    odirection = ARGUMENT(1);
-    command_line = ARGUMENT(0);
-
-    if (PATHNAMEP(command_line))
-       command_line = CAR(command_line->data.quote);
-    else if (!STRINGP(command_line))
-       LispDestroy("%s: %s is a bad pathname",
-                   STRFUN(builtin), STROBJ(command_line));
-
-    if (odirection != UNSPEC) {
-       direction = -1;
-       if (KEYWORDP(odirection)) {
-           if (odirection == Kprobe)
-               direction = DIR_PROBE;
-           else if (odirection == Kinput)
-               direction = DIR_INPUT;
-           else if (odirection == Koutput)
-               direction = DIR_OUTPUT;
-           else if (odirection == Kio)
-               direction = DIR_IO;
-       }
-       if (direction == -1)
-           LispDestroy("%s: bad :DIRECTION %s",
-                       STRFUN(builtin), STROBJ(odirection));
-    }
-    else
-       direction = DIR_INPUT;
-
-    if (element_type != UNSPEC) {
-       /* just check argument... */
-       if (SYMBOLP(element_type) && ATOMID(element_type) == Scharacter)
-           ;   /* do nothing */
-       else if (KEYWORDP(element_type) && ATOMID(element_type) == Sdefault)
-           ;   /* do nothing */
-       else
-           LispDestroy("%s: only :%s and %s supported for :ELEMENT-TYPE, not %s",
-                       STRFUN(builtin), Sdefault->value, Scharacter->value, STROBJ(element_type));
-    }
-
-    if (external_format != UNSPEC) {
-       /* just check argument... */
-       if (SYMBOLP(external_format) && ATOMID(external_format) == Scharacter)
-           ;   /* do nothing */
-       else if (KEYWORDP(external_format) &&
-                ATOMID(external_format) == Sdefault)
-           ;   /* do nothing */
-       else
-           LispDestroy("%s: only :%s and %s supported for :EXTERNAL-FORMAT, not %s",
-                       STRFUN(builtin), Sdefault->value, Scharacter->value, STROBJ(external_format));
-    }
-
-    string = THESTR(command_line);
-    program = LispMalloc(sizeof(LispPipe));
-    if (direction != DIR_PROBE) {
-       argv[0] = "sh";
-       argv[1] = "-c";
-       argv[2] = string;
-       argv[3] = NULL;
-       pipe(ifd);
-       pipe(ofd);
-       pipe(efd);
-       if ((program->pid = fork()) == 0) {
-           close(0);
-           close(1);
-           close(2);
-           dup2(ofd[0], 0);
-           dup2(ifd[1], 1);
-           dup2(efd[1], 2);
-           close(ifd[0]);
-           close(ifd[1]);
-           close(ofd[0]);
-           close(ofd[1]);
-           close(efd[0]);
-           close(efd[1]);
-           execve("/bin/sh", argv, environ);
-           exit(-1);
-       }
-       else if (program->pid < 0)
-           LispDestroy("%s: fork: %s", STRFUN(builtin), strerror(errno));
-
-       program->input = LispFdopen(ifd[0], FILE_READ | FILE_UNBUFFERED);
-       close(ifd[1]);
-       program->output = LispFdopen(ofd[1], FILE_WRITE | FILE_UNBUFFERED);
-       close(ofd[0]);
-       error_file = LispFdopen(efd[0], FILE_READ | FILE_UNBUFFERED);
-       close(efd[1]);
-    }
-    else {
-       program->pid = -1;
-       program->input = program->output = error_file = NULL;
-    }
-
-    flags = direction == DIR_PROBE ? 0 : STREAM_READ;
-    program->errorp = FILESTREAM(error_file, command_line, flags);
-
-    flags = 0;
-    if (direction != DIR_PROBE) {
-       if (direction == DIR_INPUT || direction == DIR_IO)
-           flags |= STREAM_READ;
-       if (direction == DIR_OUTPUT || direction == DIR_IO)
-           flags |= STREAM_WRITE;
-    }
-    stream = PIPESTREAM(program, command_line, flags);
-    LispMused(program);
-
-    return (stream);
-}
-
-/* Helper function, primarily for use with the xt module
- */
-LispObj *
-Lisp_PipeBroken(LispBuiltin *builtin)
-/*
- pipe-broken pipe-stream
- */
-{
-    int pid, status, retval;
-    LispObj *result = NIL;
-
-    LispObj *pipe_stream;
-
-    pipe_stream = ARGUMENT(0);
-
-    if (!STREAMP(pipe_stream) ||
-       pipe_stream->data.stream.type != LispStreamPipe)
-       LispDestroy("%s: %s is not a pipe stream",
-                   STRFUN(builtin), STROBJ(pipe_stream));
-
-    if ((pid = PIDPSTREAMP(pipe_stream)) > 0) {
-       retval = waitpid(pid, &status, WNOHANG | WUNTRACED);
-       if (retval == pid || (retval == -1 && errno == ECHILD))
-           result = T;
-    }
-
-    return (result);
-}
-
-/*
- Helper function, so that it is not required to redirect error output
- */
-LispObj *
-Lisp_PipeErrorStream(LispBuiltin *builtin)
-/*
- pipe-error-stream pipe-stream
- */
-{
-    LispObj *pipe_stream;
-
-    pipe_stream = ARGUMENT(0);
-
-    if (!STREAMP(pipe_stream) ||
-       pipe_stream->data.stream.type != LispStreamPipe)
-       LispDestroy("%s: %s is not a pipe stream",
-                   STRFUN(builtin), STROBJ(pipe_stream));
-
-    return (pipe_stream->data.stream.source.program->errorp);
-}
-
-/*
- Helper function, primarily for use with the xt module
- */
-LispObj *
-Lisp_PipeInputDescriptor(LispBuiltin *builtin)
-/*
- pipe-input-descriptor pipe-stream
- */
-{
-    LispObj *pipe_stream;
-
-    pipe_stream = ARGUMENT(0);
-
-    if (!STREAMP(pipe_stream) ||
-       pipe_stream->data.stream.type != LispStreamPipe)
-       LispDestroy("%s: %s is not a pipe stream",
-                   STRFUN(builtin), STROBJ(pipe_stream));
-    if (!IPSTREAMP(pipe_stream))
-       LispDestroy("%s: pipe %s is unreadable",
-                   STRFUN(builtin), STROBJ(pipe_stream));
-
-    return (INTEGER(LispFileno(IPSTREAMP(pipe_stream))));
-}
-
-/*
- Helper function, primarily for use with the xt module
- */
-LispObj *
-Lisp_PipeErrorDescriptor(LispBuiltin *builtin)
-/*
- pipe-error-descriptor pipe-stream
- */
-{
-    LispObj *pipe_stream;
-
-    pipe_stream = ARGUMENT(0);
-
-    if (!STREAMP(pipe_stream) ||
-       pipe_stream->data.stream.type != LispStreamPipe)
-       LispDestroy("%s: %s is not a pipe stream",
-                   STRFUN(builtin), STROBJ(pipe_stream));
-    if (!EPSTREAMP(pipe_stream))
-       LispDestroy("%s: pipe %s is closed",
-                   STRFUN(builtin), STROBJ(pipe_stream));
-
-    return (INTEGER(LispFileno(EPSTREAMP(pipe_stream))));
-}
diff --git a/xedit/lisp/stream.h b/xedit/lisp/stream.h
deleted file mode 100644 (file)
index 10dda69..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/stream.h,v 1.8tsi Exp $ */
-
-#ifndef Lisp_stream_h
-#define Lisp_stream_h
-
-#include "lisp/io.h"
-#include "lisp/internal.h"
-
-void LispStreamInit(void);
-
-LispObj *Lisp_DeleteFile(LispBuiltin*);
-LispObj *Lisp_RenameFile(LispBuiltin*);
-LispObj *Lisp_InputStreamP(LispBuiltin*);
-LispObj *Lisp_OpenStreamP(LispBuiltin*);
-LispObj *Lisp_OutputStreamP(LispBuiltin*);
-LispObj *Lisp_Open(LispBuiltin*);
-LispObj *Lisp_MakePipe(LispBuiltin*);
-LispObj *Lisp_PipeBroken(LispBuiltin*);
-LispObj *Lisp_PipeErrorStream(LispBuiltin*);
-LispObj *Lisp_PipeInputDescriptor(LispBuiltin*);
-LispObj *Lisp_PipeErrorDescriptor(LispBuiltin*);
-LispObj *Lisp_Close(LispBuiltin*);
-LispObj *Lisp_Listen(LispBuiltin*);
-LispObj *Lisp_Streamp(LispBuiltin*);
-LispObj *Lisp_MakeStringInputStream(LispBuiltin*);
-LispObj *Lisp_MakeStringOutputStream(LispBuiltin*);
-LispObj *Lisp_GetOutputStreamString(LispBuiltin*);
-
-#endif /* Lisp_stream_h */
diff --git a/xedit/lisp/string.c b/xedit/lisp/string.c
deleted file mode 100644 (file)
index 604fb6c..0000000
+++ /dev/null
@@ -1,1387 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XdotOrg: xc/programs/xedit/lisp/string.c,v 1.2 2004/04/23 19:54:44 eich Exp $ */
-/* $XFree86: xc/programs/xedit/lisp/string.c,v 1.24tsi Exp $ */
-
-#include "lisp/helper.h"
-#include "lisp/read.h"
-#include "lisp/string.h"
-#include "lisp/private.h"
-#include <ctype.h>
-
-#define CHAR_LESS              1
-#define CHAR_LESS_EQUAL                2
-#define CHAR_EQUAL             3
-#define CHAR_GREATER_EQUAL     4
-#define CHAR_GREATER           5
-#define CHAR_NOT_EQUAL         6
-
-#define CHAR_ALPHAP            1
-#define CHAR_DOWNCASE          2
-#define CHAR_UPCASE            3
-#define CHAR_INT               4
-#define CHAR_BOTHP             5
-#define CHAR_UPPERP            6
-#define CHAR_LOWERP            7
-#define CHAR_GRAPHICP          8
-
-#ifndef MIN
-#define MIN(a, b)              ((a) < (b) ? (a) : (b))
-#endif
-
-/*
- * Prototypes
- */
-static LispObj *LispCharCompare(LispBuiltin*, int, int);
-static LispObj *LispStringCompare(LispBuiltin*, int, int);
-static LispObj *LispCharOp(LispBuiltin*, int);
-static LispObj *LispStringTrim(LispBuiltin*, int, int, int);
-static LispObj *LispStringUpcase(LispBuiltin*, int);
-static LispObj *LispStringDowncase(LispBuiltin*, int);
-static LispObj *LispStringCapitalize(LispBuiltin*, int);
-
-/*
- * Implementation
- */
-static LispObj *
-LispCharCompare(LispBuiltin *builtin, int operation, int ignore_case)
-{
-    LispObj *object;
-    int cmp, value, next_value;
-
-    LispObj *character, *more_characters;
-
-    more_characters = ARGUMENT(1);
-    character = ARGUMENT(0);
-
-    CHECK_SCHAR(character);
-    value = SCHAR_VALUE(character);
-    if (ignore_case && islower(value))
-       value = toupper(value);
-
-    if (!CONSP(more_characters))
-       return (T);
-
-    /* First check if all parameters are characters */
-    for (object = more_characters; CONSP(object); object = CDR(object))
-       CHECK_SCHAR(CAR(object));
-
-    /* All characters in list must be different */
-    if (operation == CHAR_NOT_EQUAL) {
-       /* Compare all characters */
-       do {
-           for (object = more_characters; CONSP(object); object = CDR(object)) {
-               character = CAR(object);
-               next_value = SCHAR_VALUE(character);
-               if (ignore_case && islower(next_value))
-                   next_value = toupper(next_value);
-               if (value == next_value)
-                   return (NIL);
-           }
-           value = SCHAR_VALUE(CAR(more_characters));
-           if (ignore_case && islower(value))
-               value = toupper(value);
-           more_characters = CDR(more_characters);
-       } while (CONSP(more_characters));
-
-       return (T);
-    }
-
-    /* Linearly compare characters */
-    for (; CONSP(more_characters); more_characters = CDR(more_characters)) {
-       character = CAR(more_characters);
-       next_value = SCHAR_VALUE(character);
-       if (ignore_case && islower(next_value))
-           next_value = toupper(next_value);
-
-       switch (operation) {
-           case CHAR_LESS:             cmp = value < next_value;       break;
-           case CHAR_LESS_EQUAL:       cmp = value <= next_value;      break;
-           case CHAR_EQUAL:            cmp = value == next_value;      break;
-           case CHAR_GREATER_EQUAL:    cmp = value >= next_value;      break;
-           case CHAR_GREATER:          cmp = value > next_value;       break;
-           default:                    cmp = 0;                        break;
-       }
-
-       if (!cmp)
-           return (NIL);
-       value = next_value;
-    }
-
-    return (T);
-}
-
-LispObj *
-Lisp_CharLess(LispBuiltin *builtin)
-/*
- char< character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_LESS, 0));
-}
-
-LispObj *
-Lisp_CharLessEqual(LispBuiltin *builtin)
-/*
- char<= character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_LESS_EQUAL, 0));
-}
-
-LispObj *
-Lisp_CharEqual_(LispBuiltin *builtin)
-/*
- char= character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_EQUAL, 0));
-}
-
-LispObj *
-Lisp_CharGreater(LispBuiltin *builtin)
-/*
- char> character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_GREATER, 0));
-}
-
-LispObj *
-Lisp_CharGreaterEqual(LispBuiltin *builtin)
-/*
- char>= character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_GREATER_EQUAL, 0));
-}
-
-LispObj *
-Lisp_CharNotEqual_(LispBuiltin *builtin)
-/*
- char/= character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_NOT_EQUAL, 0));
-}
-
-LispObj *
-Lisp_CharLessp(LispBuiltin *builtin)
-/*
- char-lessp character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_LESS, 1));
-}
-
-LispObj *
-Lisp_CharNotGreaterp(LispBuiltin *builtin)
-/*
- char-not-greaterp character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_LESS_EQUAL, 1));
-}
-
-LispObj *
-Lisp_CharEqual(LispBuiltin *builtin)
-/*
- char-equalp character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_EQUAL, 1));
-}
-
-LispObj *
-Lisp_CharGreaterp(LispBuiltin *builtin)
-/*
- char-greaterp character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_GREATER, 1));
-}
-
-LispObj *
-Lisp_CharNotLessp(LispBuiltin *builtin)
-/*
- char-not-lessp &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_GREATER_EQUAL, 1));
-}
-
-LispObj *
-Lisp_CharNotEqual(LispBuiltin *builtin)
-/*
- char-not-equal character &rest more-characters
- */
-{
-    return (LispCharCompare(builtin, CHAR_NOT_EQUAL, 1));
-}
-
-static LispObj *
-LispCharOp(LispBuiltin *builtin, int operation)
-{
-    int value;
-    LispObj *result, *character;
-
-    character = ARGUMENT(0);
-    CHECK_SCHAR(character);
-    value = (int)SCHAR_VALUE(character);
-
-    switch (operation) {
-       case CHAR_ALPHAP:
-           result = isalpha(value) ? T : NIL;
-           break;
-       case CHAR_DOWNCASE:
-           result = SCHAR(tolower(value));
-           break;
-       case CHAR_UPCASE:
-           result = SCHAR(toupper(value));
-           break;
-       case CHAR_INT:
-           result = FIXNUM(value);
-           break;
-       case CHAR_BOTHP:
-           result = isupper(value) || islower(value) ? T : NIL;
-           break;
-       case CHAR_UPPERP:
-           result = isupper(value) ? T : NIL;
-           break;
-       case CHAR_LOWERP:
-           result = islower(value) ? T : NIL;
-           break;
-       case CHAR_GRAPHICP:
-           result = value == ' ' || isgraph(value) ? T : NIL;
-           break;
-       default:
-           result = NIL;
-           break;
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_AlphaCharP(LispBuiltin *builtin)
-/*
- alpha-char-p char
- */
-{
-    return (LispCharOp(builtin, CHAR_ALPHAP));
-}
-
-LispObj *
-Lisp_CharDowncase(LispBuiltin *builtin)
-/*
- char-downcase character
- */
-{
-    return (LispCharOp(builtin, CHAR_DOWNCASE));
-}
-
-LispObj *
-Lisp_CharInt(LispBuiltin *builtin)
-/*
- char-int character
- char-code character
- */
-{
-    return (LispCharOp(builtin, CHAR_INT));
-}
-
-LispObj *
-Lisp_CharUpcase(LispBuiltin *builtin)
-/*
- char-upcase character
- */
-{
-    return (LispCharOp(builtin, CHAR_UPCASE));
-}
-
-LispObj *
-Lisp_BothCaseP(LispBuiltin *builtin)
-/*
- both-case-p character
- */
-{
-    return (LispCharOp(builtin, CHAR_BOTHP));
-}
-
-LispObj *
-Lisp_UpperCaseP(LispBuiltin *builtin)
-/*
- upper-case-p character
- */
-{
-    return (LispCharOp(builtin, CHAR_UPPERP));
-}
-
-LispObj *
-Lisp_LowerCaseP(LispBuiltin *builtin)
-/*
- upper-case-p character
- */
-{
-    return (LispCharOp(builtin, CHAR_LOWERP));
-}
-
-LispObj *
-Lisp_GraphicCharP(LispBuiltin *builtin)
-/*
- graphic-char-p char
- */
-{
-    return (LispCharOp(builtin, CHAR_GRAPHICP));
-}
-
-LispObj *
-Lisp_Char(LispBuiltin *builtin)
-/*
- char string index
- schar simple-string index
- */
-{
-    unsigned char *string;
-    long offset, length;
-
-    LispObj *ostring, *oindex;
-
-    oindex = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-
-    CHECK_STRING(ostring);
-    CHECK_INDEX(oindex);
-    offset = FIXNUM_VALUE(oindex);
-    string = (unsigned char*)THESTR(ostring);
-    length = STRLEN(ostring);
-
-    if (offset >= length)
-       LispDestroy("%s: index %ld too large for string length %ld",
-                   STRFUN(builtin), offset, length);
-
-    return (SCHAR(string[offset]));
-}
-
-/* helper function for setf
- *     DONT explicitly call. Non standard function
- */
-LispObj *
-Lisp_XeditCharStore(LispBuiltin *builtin)
-/*
- xedit::char-store string index value
- */
-{
-    int character;
-    long offset, length;
-    LispObj *ostring, *oindex, *ovalue;
-
-    ovalue = ARGUMENT(2);
-    oindex = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-
-    CHECK_STRING(ostring);
-    CHECK_INDEX(oindex);
-    length = STRLEN(ostring);
-    offset = FIXNUM_VALUE(oindex);
-    if (offset >= length)
-       LispDestroy("%s: index %ld too large for string length %ld",
-                   STRFUN(builtin), offset, length);
-    CHECK_SCHAR(ovalue);
-    CHECK_STRING_WRITABLE(ostring);
-
-    character = SCHAR_VALUE(ovalue);
-
-    if (character < 0 || character > 255)
-       LispDestroy("%s: cannot represent character %d",
-                   STRFUN(builtin), character);
-
-    THESTR(ostring)[offset] = character;
-
-    return (ovalue);
-}
-
-LispObj *
-Lisp_Character(LispBuiltin *builtin)
-/*
- character object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (LispCharacterCoerce(builtin, object));
-}
-
-LispObj *
-Lisp_Characterp(LispBuiltin *builtin)
-/*
- characterp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (SCHARP(object) ? T : NIL);
-}
-
-LispObj *
-Lisp_DigitChar(LispBuiltin *builtin)
-/*
- digit-char weight &optional radix
- */
-{
-    long radix = 10, weight;
-    LispObj *oweight, *oradix, *result = NIL;
-
-    oradix = ARGUMENT(1);
-    oweight = ARGUMENT(0);
-
-    CHECK_FIXNUM(oweight);
-    weight = FIXNUM_VALUE(oweight);
-
-    if (oradix != UNSPEC) {
-       CHECK_INDEX(oradix);
-       radix = FIXNUM_VALUE(oradix);
-    }
-    if (radix < 2 || radix > 36)
-       LispDestroy("%s: radix must be >= 2 and <= 36, not %ld",
-                   STRFUN(builtin), radix);
-
-    if (weight >= 0 && weight < radix) {
-       if (weight < 9)
-           weight += '0';
-       else
-           weight += 'A' - 10;
-       result = SCHAR(weight);
-    }
-
-    return (result);
-}
-
-LispObj *
-Lisp_DigitCharP(LispBuiltin *builtin)
-/*
- digit-char-p character &optional radix
- */
-{
-    long radix = 10, character;
-    LispObj *ochar, *oradix, *result = NIL;
-
-    oradix = ARGUMENT(1);
-    ochar = ARGUMENT(0);
-
-    CHECK_SCHAR(ochar);
-    character = SCHAR_VALUE(ochar);
-    if (oradix != UNSPEC) {
-       CHECK_INDEX(oradix);
-       radix = FIXNUM_VALUE(oradix);
-    }
-    if (radix < 2 || radix > 36)
-       LispDestroy("%s: radix must be >= 2 and <= 36, not %ld",
-                   STRFUN(builtin), radix);
-
-    if (character >= '0' && character <= '9')
-       character -= '0';
-    else if (character >= 'A' && character <= 'Z')
-       character -= 'A' - 10;
-    else if (character >= 'a' && character <= 'z')
-       character -= 'a' - 10;
-    if (character < radix)
-       result = FIXNUM(character);
-
-    return (result);
-}
-
-LispObj *
-Lisp_IntChar(LispBuiltin *builtin)
-/*
- int-char integer
- code-char integer
- */
-{
-    long character = 0;
-    LispObj *integer;
-
-    integer = ARGUMENT(0);
-
-    CHECK_FIXNUM(integer);
-    character = FIXNUM_VALUE(integer);
-
-    return (character >= 0 && character < 0xff ? SCHAR(character) : NIL);
-}
-
-/* XXX ignoring element-type */
-LispObj *
-Lisp_MakeString(LispBuiltin *builtin)
-/*
- make-string size &key initial-element element-type
- */
-{
-    long length;
-    char *string, initial;
-
-    LispObj *size, *initial_element;
-
-    initial_element = ARGUMENT(1);
-    size = ARGUMENT(0);
-
-    CHECK_INDEX(size);
-    length = FIXNUM_VALUE(size);
-    if (initial_element != UNSPEC) {
-       CHECK_SCHAR(initial_element);
-       initial = SCHAR_VALUE(initial_element);
-    }
-    else
-       initial = 0;
-
-    string = LispMalloc(length + 1);
-    memset(string, initial, length);
-    string[length] = '\0';
-
-    return (LSTRING2(string, length));
-}
-
-LispObj *
-Lisp_ParseInteger(LispBuiltin *builtin)
-/*
- parse-integer string &key start end radix junk-allowed
- */
-{
-    GC_ENTER();
-    char *ptr, *string;
-    int character, junk, sign, overflow;
-    long i, start, end, radix, length, integer, check;
-    LispObj *result;
-
-    LispObj *ostring, *ostart, *oend, *oradix, *junk_allowed;
-
-    junk_allowed = ARGUMENT(4);
-    oradix = ARGUMENT(3);
-    oend = ARGUMENT(2);
-    ostart = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-
-    start = end = radix = 0;
-    result = NIL;
-
-    CHECK_STRING(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &length);
-    string = THESTR(ostring);
-    if (oradix == UNSPEC)
-       radix = 10;
-    else {
-       CHECK_INDEX(oradix);
-       radix = FIXNUM_VALUE(oradix);
-    }
-    if (radix < 2 || radix > 36)
-       LispDestroy("%s: :RADIX %ld must be in the range 2 to 36",
-                   STRFUN(builtin), radix);
-
-    integer = check = 0;
-    ptr = string + start;
-    sign = overflow = 0;
-
-    /* Skip leading white spaces */
-    for (i = start; i < end && *ptr && isspace(*ptr); ptr++, i++)
-       ;
-
-    /* Check for sign specification */
-    if (i < end && (*ptr == '-' || *ptr == '+')) {
-       sign = *ptr == '-';
-       ++ptr;
-       ++i;
-    }
-
-    for (junk = 0; i < end; i++, ptr++) {
-       character = *ptr;
-       if (islower(character))
-           character = toupper(character);
-       if (character >= '0' && character <= '9') {
-           if (character - '0' >= radix)
-               junk = 1;
-           else {
-               check = integer;
-               integer = integer * radix + character - '0';
-           }
-       }
-       else if (character >= 'A' && character <= 'Z') {
-           if (character - 'A' + 10 >= radix)
-               junk = 1;
-           else {
-               check = integer;
-               integer = integer * radix + character - 'A' + 10;
-           }
-       }
-       else {
-           if (isspace(character))
-               break;
-           junk = 1;
-       }
-
-       if (junk)
-           break;
-
-       if (!overflow && check > integer)
-           overflow = 1;
-       /* keep looping just to count read bytes */
-    }
-
-    if (!junk)
-       /* Skip white spaces */
-       for (; i < end && *ptr && isspace(*ptr); ptr++, i++)
-           ;
-
-    if ((junk || ptr == string) &&
-       (junk_allowed == UNSPEC || junk_allowed == NIL))
-       LispDestroy("%s: %s has a bad integer representation",
-                   STRFUN(builtin), STROBJ(ostring));
-    else if (ptr == string)
-       result = NIL;
-    else if (overflow) {
-       mpi *bigi = LispMalloc(sizeof(mpi));
-       char *str;
-
-       length = end - start + sign;
-       str = LispMalloc(length + 1);
-
-       strncpy(str, string - sign, length + sign);
-       str[length + sign] = '\0';
-       mpi_init(bigi);
-       mpi_setstr(bigi, str, radix);
-       LispFree(str);
-       result = BIGNUM(bigi);
-    }
-    else
-       result = INTEGER(sign ? -integer : integer);
-
-    GC_PROTECT(result);
-    RETURN(0) = FIXNUM(i);
-    RETURN_COUNT = 1;
-    GC_LEAVE();
-
-    return (result);
-}
-
-LispObj *
-Lisp_String(LispBuiltin *builtin)
-/*
- string object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (LispStringCoerce(builtin, object));
-}
-
-LispObj *
-Lisp_Stringp(LispBuiltin *builtin)
-/*
- stringp object
- */
-{
-    LispObj *object;
-
-    object = ARGUMENT(0);
-
-    return (STRINGP(object) ? T : NIL);
-}
-
-/* XXX preserve-whitespace is being ignored */
-LispObj *
-Lisp_ReadFromString(LispBuiltin *builtin)
-/*
- read-from-string string &optional eof-error-p eof-value &key start end preserve-whitespace
- */
-{
-    GC_ENTER();
-    char *string;
-    LispObj *stream, *result;
-    long length, start, end, bytes_read;
-
-    LispObj *ostring, *eof_error_p, *eof_value, *ostart, *oend;
-
-    oend = ARGUMENT(4);
-    ostart = ARGUMENT(3);
-    eof_value = ARGUMENT(2);
-    eof_error_p = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-
-    CHECK_STRING(ostring);
-    string = THESTR(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &length);
-
-    if (start > 0 || end < length)
-       length = end - start;
-    stream = LSTRINGSTREAM(string + start, STREAM_READ, length);
-
-    if (eof_value == UNSPEC)
-       eof_value = NIL;
-
-    LispPushInput(stream);
-    result = LispRead();
-    /* stream->data.stream.source.string->input is
-     * the offset of the last byte read in string */
-    bytes_read = stream->data.stream.source.string->input;
-    LispPopInput(stream);
-
-    if (result == NULL) {
-       if (eof_error_p == NIL)
-           result = eof_value;
-       else
-           LispDestroy("%s: unexpected end of input", STRFUN(builtin));
-    }
-
-    GC_PROTECT(result);
-    RETURN(0) = FIXNUM(start + bytes_read);
-    RETURN_COUNT = 1;
-    GC_LEAVE();
-
-    return (result);
-}
-
-static LispObj *
-LispStringTrim(LispBuiltin *builtin, int left, int right, int inplace)
-/*
- string-{,left-,right-}trim character-bag string
-*/
-{
-    unsigned char *string;
-    long start, end, length;
-
-    LispObj *ochars, *ostring;
-
-    ostring = ARGUMENT(1);
-    ochars = ARGUMENT(0);
-
-    if (!POINTERP(ochars) || !(XSTRINGP(ochars) || XCONSP(ochars))) {
-       if (ARRAYP(ochars) && ochars->data.array.rank == 1)
-           ochars = ochars->data.array.list;
-       else
-           LispDestroy("%s: %s is not a sequence",
-                       STRFUN(builtin), STROBJ(ochars));
-    }
-    CHECK_STRING(ostring);
-
-    string = (unsigned char*)THESTR(ostring);
-    length = STRLEN(ostring);
-
-    start = 0;
-    end = length;
-
-    if (XSTRINGP(ochars)) {
-       unsigned char *chars = (unsigned char*)THESTR(ochars);
-       long i, clength = STRLEN(ochars);
-
-       if (left) {
-           for (; start < end; start++) {
-               for (i = 0; i < clength; i++)
-                   if (string[start] == chars[i])
-                       break;
-               if (i >= clength)
-                   break;
-           }
-       }
-       if (right) {
-           for (--end; end >= 0; end--) {
-               for (i = 0; i < clength; i++)
-                   if (string[end] == chars[i])
-                       break;
-               if (i >= clength)
-                   break;
-           }
-           ++end;
-       }
-    }
-    else {
-       LispObj *ochar, *list;
-
-       if (left) {
-           for (; start < end; start++) {
-               for (list = ochars; CONSP(list); list = CDR(list)) {
-                   ochar = CAR(list);
-                   if (SCHARP(ochar) && string[start] == SCHAR_VALUE(ochar))
-                       break;
-               }
-               if (!CONSP(list))
-                   break;
-           }
-       }
-       if (right) {
-           for (--end; end >= 0; end--) {
-               for (list = ochars; CONSP(list); list = CDR(list)) {
-                   ochar = CAR(list);
-                   if (SCHARP(ochar) && string[end] == SCHAR_VALUE(ochar))
-                       break;
-               }
-               if (!CONSP(list))
-                   break;
-           }
-           ++end;
-       }
-    }
-
-    if (start == 0 && end == length)
-       return (ostring);
-
-    length = end - start;
-
-    if (inplace) {
-       CHECK_STRING_WRITABLE(ostring);
-       memmove(string, string + start, length);
-       string[length] = '\0';
-       STRLEN(ostring) = length;
-    }
-    else {
-       string = LispMalloc(length + 1);
-       memcpy(string, THESTR(ostring) + start, length);
-       string[length] = '\0';
-       ostring = LSTRING2((char*)string, length);
-    }
-
-    return (ostring);
-}
-
-LispObj *
-Lisp_StringTrim(LispBuiltin *builtin)
-/*
- string-trim character-bag string
- */
-{
-    return (LispStringTrim(builtin, 1, 1, 0));
-}
-
-LispObj *
-Lisp_NstringTrim(LispBuiltin *builtin)
-/*
- ext::nstring-trim character-bag string
- */
-{
-    return (LispStringTrim(builtin, 1, 1, 1));
-}
-
-LispObj *
-Lisp_StringLeftTrim(LispBuiltin *builtin)
-/*
- string-left-trim character-bag string
- */
-{
-    return (LispStringTrim(builtin, 1, 0, 0));
-}
-
-LispObj *
-Lisp_NstringLeftTrim(LispBuiltin *builtin)
-/*
- ext::nstring-left-trim character-bag string
- */
-{
-    return (LispStringTrim(builtin, 1, 0, 1));
-}
-
-LispObj *
-Lisp_StringRightTrim(LispBuiltin *builtin)
-/*
- string-right-trim character-bag string
- */
-{
-    return (LispStringTrim(builtin, 0, 1, 0));
-}
-
-LispObj *
-Lisp_NstringRightTrim(LispBuiltin *builtin)
-/*
- ext::nstring-right-trim character-bag string
- */
-{
-    return (LispStringTrim(builtin, 0, 1, 1));
-}
-
-static LispObj *
-LispStringCompare(LispBuiltin *builtin, int function, int ignore_case)
-{
-    int cmp1, cmp2;
-    LispObj *fixnum;
-    unsigned char *string1, *string2;
-    long start1, end1, start2, end2, offset, length;
-
-    LispGetStringArgs(builtin, (char**)&string1, (char**)&string2,
-                     &start1, &end1, &start2, &end2);
-
-    string1 += start1;
-    string2 += start2;
-
-    if (function == CHAR_EQUAL) {
-       length = end1 - start1;
-
-       if (length != (end2 - start2))
-           return (NIL);
-
-       if (!ignore_case)
-           return (memcmp(string1, string2, length) ? NIL : T);
-
-       for (; length; length--, string1++, string2++)
-           if (toupper(*string1) != toupper(*string2))
-               return (NIL);
-       return (T);
-    }
-
-    end1 -= start1;
-    end2 -= start2;
-    length = MIN(end1, end2);
-    for (offset = 0;
-        offset < length;
-        string1++, string2++, offset++, start1++, start2++) {
-       cmp1 = *string1;
-       cmp2 = *string2;
-       if (ignore_case) {
-           cmp1 = toupper(cmp1);
-           cmp2 = toupper(cmp2);
-       }
-       if (cmp1 != cmp2) {
-           fixnum = FIXNUM(start1);
-           switch (function) {
-               case CHAR_LESS:
-                   return ((cmp1 < cmp2) ? fixnum : NIL);
-               case CHAR_LESS_EQUAL:
-                   return ((cmp1 <= cmp2) ? fixnum : NIL);
-               case CHAR_NOT_EQUAL:
-                   return (fixnum);
-               case CHAR_GREATER_EQUAL:
-                   return ((cmp1 >= cmp2) ? fixnum : NIL);
-               case CHAR_GREATER:
-                   return ((cmp1 > cmp2) ? fixnum : NIL);
-           }
-       }
-    }
-
-    fixnum = FIXNUM(start1);
-    switch (function) {
-       case CHAR_LESS:
-           return (start1 >= end1 && start2 < end2 ? fixnum : NIL);
-       case CHAR_LESS_EQUAL:
-           return (start1 >= end1 ? fixnum : NIL);
-       case CHAR_NOT_EQUAL:
-           return (start1 >= end1 && start2 >= end2 ? NIL : fixnum);
-       case CHAR_GREATER_EQUAL:
-           return (start2 >= end2 ? fixnum : NIL);
-       case CHAR_GREATER:
-           return (start2 >= end2 && start1 < end1 ? fixnum : NIL);
-    }
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_StringEqual_(LispBuiltin *builtin)
-/*
- string= string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_EQUAL, 0));
-}
-
-LispObj *
-Lisp_StringLess(LispBuiltin *builtin)
-/*
- string< string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_LESS, 0));
-}
-
-LispObj *
-Lisp_StringGreater(LispBuiltin *builtin)
-/*
- string> string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_GREATER, 0));
-}
-
-LispObj *
-Lisp_StringLessEqual(LispBuiltin *builtin)
-/*
- string<= string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_LESS_EQUAL, 0));
-}
-
-LispObj *
-Lisp_StringGreaterEqual(LispBuiltin *builtin)
-/*
- string>= string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_GREATER_EQUAL, 0));
-}
-
-LispObj *
-Lisp_StringNotEqual_(LispBuiltin *builtin)
-/*
- string/= string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_NOT_EQUAL, 0));
-}
-
-LispObj *
-Lisp_StringEqual(LispBuiltin *builtin)
-/*
- string-equal string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_EQUAL, 1));
-}
-
-LispObj *
-Lisp_StringLessp(LispBuiltin *builtin)
-/*
- string-lessp string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_LESS, 1));
-}
-
-LispObj *
-Lisp_StringGreaterp(LispBuiltin *builtin)
-/*
- string-greaterp string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_GREATER, 1));
-}
-
-LispObj *
-Lisp_StringNotGreaterp(LispBuiltin *builtin)
-/*
- string-not-greaterp string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_LESS_EQUAL, 1));
-}
-
-LispObj *
-Lisp_StringNotLessp(LispBuiltin *builtin)
-/*
- string-not-lessp string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_GREATER_EQUAL, 1));
-}
-
-LispObj *
-Lisp_StringNotEqual(LispBuiltin *builtin)
-/*
- string-not-equal string1 string2 &key start1 end1 start2 end2
- */
-{
-    return (LispStringCompare(builtin, CHAR_NOT_EQUAL, 1));
-}
-
-LispObj *
-LispStringUpcase(LispBuiltin *builtin, int inplace)
-/*
- string-upcase string &key start end
- nstring-upcase string &key start end
- */
-{
-    LispObj *result;
-    char *string, *newstring;
-    long start, end, length, offset;
-
-    LispObj *ostring, *ostart, *oend;
-
-    oend = ARGUMENT(2);
-    ostart = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-    CHECK_STRING(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &offset);
-    result = ostring;
-    string = THESTR(ostring);
-    length = STRLEN(ostring);
-
-    /* first check if something need to be done */
-    for (offset = start; offset < end; offset++)
-       if (string[offset] != toupper(string[offset]))
-           break;
-
-    if (offset >= end)
-       return (result);
-
-    if (inplace) {
-       CHECK_STRING_WRITABLE(ostring);
-       newstring = string;
-    }
-    else {
-       /* upcase a copy of argument */
-       newstring = LispMalloc(length + 1);
-       if (offset)
-           memcpy(newstring, string, offset);
-       if (length > end)
-           memcpy(newstring + end, string + end, length - end);
-       newstring[length] = '\0';
-    }
-
-    for (; offset < end; offset++)
-       newstring[offset] = toupper(string[offset]);
-
-    if (!inplace)
-       result = LSTRING2(newstring, length);
-
-    return (result);
-}
-
-LispObj *
-Lisp_StringUpcase(LispBuiltin *builtin)
-/*
- string-upcase string &key start end
- */
-{
-    return (LispStringUpcase(builtin, 0));
-}
-
-LispObj *
-Lisp_NstringUpcase(LispBuiltin *builtin)
-/*
- nstring-upcase string &key start end
- */
-{
-    return (LispStringUpcase(builtin, 1));
-}
-
-LispObj *
-LispStringDowncase(LispBuiltin *builtin, int inplace)
-/*
- string-downcase string &key start end
- nstring-downcase string &key start end
- */
-{
-    LispObj *result;
-    char *string, *newstring;
-    long start, end, length, offset;
-
-    LispObj *ostring, *ostart, *oend;
-
-    oend = ARGUMENT(2);
-    ostart = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-    CHECK_STRING(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &offset);
-    result = ostring;
-    string = THESTR(ostring);
-    length = STRLEN(ostring);
-
-    /* first check if something need to be done */
-    for (offset = start; offset < end; offset++)
-       if (string[offset] != tolower(string[offset]))
-           break;
-
-    if (offset >= end)
-       return (result);
-
-    if (inplace) {
-       CHECK_STRING_WRITABLE(ostring);
-       newstring = string;
-    }
-    else {
-       /* downcase a copy of argument */
-       newstring = LispMalloc(length + 1);
-       if (offset)
-           memcpy(newstring, string, offset);
-       if (length > end)
-           memcpy(newstring + end, string + end, length - end);
-       newstring[length] = '\0';
-    }
-    for (; offset < end; offset++)
-       newstring[offset] = tolower(string[offset]);
-
-    if (!inplace)
-       result = LSTRING2(newstring, length);
-
-    return (result);
-}
-
-LispObj *
-Lisp_StringDowncase(LispBuiltin *builtin)
-/*
- string-downcase string &key start end
- */
-{
-    return (LispStringDowncase(builtin, 0));
-}
-
-LispObj *
-Lisp_NstringDowncase(LispBuiltin *builtin)
-/*
- nstring-downcase string &key start end
- */
-{
-    return (LispStringDowncase(builtin, 1));
-}
-
-LispObj *
-LispStringCapitalize(LispBuiltin *builtin, int inplace)
-/*
- string-capitalize string &key start end
- nstring-capitalize string &key start end
- */
-{
-    LispObj *result;
-    char *string, *newstring;
-    long start, end, length, offset, upcase;
-
-    LispObj *ostring, *ostart, *oend;
-
-    oend = ARGUMENT(2);
-    ostart = ARGUMENT(1);
-    ostring = ARGUMENT(0);
-    CHECK_STRING(ostring);
-    LispCheckSequenceStartEnd(builtin, ostring, ostart, oend,
-                             &start, &end, &offset);
-    result = ostring;
-    string = THESTR(ostring);
-    length = STRLEN(ostring);
-
-    /* first check if something need to be done */
-    for (upcase = 1, offset = start; offset < end; offset++) {
-       if (upcase) {
-           if (!isalnum(string[offset]))
-               continue;
-           if (string[offset] != toupper(string[offset]))
-               break;
-           upcase = 0;
-       }
-       else {
-           if (isalnum(string[offset])) {
-               if (string[offset] != tolower(string[offset]))
-                   break;
-           }
-           else
-               upcase = 1;
-       }
-    }
-
-    if (offset >= end)
-       return (result);
-
-    if (inplace) {
-       CHECK_STRING_WRITABLE(ostring);
-       newstring = string;
-    }
-    else {
-       /* capitalize a copy of argument */
-       newstring = LispMalloc(length + 1);
-       memcpy(newstring, string, length);
-       newstring[length] = '\0';
-    }
-    for (; offset < end; offset++) {
-       if (upcase) {
-           if (!isalnum(string[offset]))
-               continue;
-           newstring[offset] = toupper(string[offset]);
-           upcase = 0;
-       }
-       else {
-           if (isalnum(newstring[offset]))
-               newstring[offset] = tolower(string[offset]);
-           else
-               upcase = 1;
-       }
-    }
-
-    if (!inplace)
-       result = LSTRING2(newstring, length);
-
-    return (result);
-}
-
-LispObj *
-Lisp_StringCapitalize(LispBuiltin *builtin)
-/*
- string-capitalize string &key start end
- */
-{
-    return (LispStringCapitalize(builtin, 0));
-}
-
-LispObj *
-Lisp_NstringCapitalize(LispBuiltin *builtin)
-/*
- nstring-capitalize string &key start end
- */
-{
-    return (LispStringCapitalize(builtin, 1));
-}
-
-LispObj *
-Lisp_StringConcat(LispBuiltin *builtin)
-/*
- string-concat &rest strings
- */
-{
-    char *buffer;
-    long size, length;
-    LispObj *object, *string;
-
-    LispObj *strings;
-
-    strings = ARGUMENT(0);
-
-    if (strings == NIL)
-       return (STRING(""));
-
-    for (length = 1, object = strings; CONSP(object); object = CDR(object)) {
-       string = CAR(object);
-       CHECK_STRING(string);
-       length += STRLEN(string);
-    }
-
-    buffer = LispMalloc(length);
-
-    for (length = 0, object = strings; CONSP(object); object = CDR(object)) {
-       string = CAR(object);
-       size = STRLEN(string);
-       memcpy(buffer + length, THESTR(string), size);
-       length += size;
-    }
-    buffer[length] = '\0';
-    object = LSTRING2(buffer, length);
-
-    return (object);
-}
diff --git a/xedit/lisp/string.h b/xedit/lisp/string.h
deleted file mode 100644 (file)
index 7615863..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/string.h,v 1.11tsi Exp $ */
-
-#ifndef Lisp_string_h
-#define Lisp_string_h
-
-#include "lisp/internal.h"
-
-LispObj *Lisp_AlphaCharP(LispBuiltin*);
-LispObj *Lisp_BothCaseP(LispBuiltin*);
-LispObj *Lisp_Char(LispBuiltin*);
-LispObj *Lisp_CharLess(LispBuiltin*);
-LispObj *Lisp_CharLessEqual(LispBuiltin*);
-LispObj *Lisp_CharEqual_(LispBuiltin*);
-LispObj *Lisp_CharGreater(LispBuiltin*);
-LispObj *Lisp_CharGreaterEqual(LispBuiltin*);
-LispObj *Lisp_CharNotEqual_(LispBuiltin*);
-LispObj *Lisp_CharLessp(LispBuiltin*);
-LispObj *Lisp_CharNotGreaterp(LispBuiltin*);
-LispObj *Lisp_CharEqual(LispBuiltin*);
-LispObj *Lisp_CharGreaterp(LispBuiltin*);
-LispObj *Lisp_CharNotLessp(LispBuiltin*);
-LispObj *Lisp_CharNotEqual(LispBuiltin*);
-LispObj *Lisp_Character(LispBuiltin*);
-LispObj *Lisp_Characterp(LispBuiltin*);
-LispObj *Lisp_CharDowncase(LispBuiltin*);
-LispObj *Lisp_CharInt(LispBuiltin*);
-LispObj *Lisp_CharUpcase(LispBuiltin*);
-LispObj *Lisp_DigitChar(LispBuiltin*);
-LispObj *Lisp_DigitCharP(LispBuiltin*);
-LispObj *Lisp_IntChar(LispBuiltin*);
-LispObj *Lisp_GraphicCharP(LispBuiltin*);
-LispObj *Lisp_LowerCaseP(LispBuiltin*);
-LispObj *Lisp_MakeString(LispBuiltin*);
-LispObj *Lisp_ParseInteger(LispBuiltin*);
-LispObj *Lisp_ReadFromString(LispBuiltin*);
-LispObj *Lisp_String(LispBuiltin*);
-LispObj *Lisp_Stringp(LispBuiltin*);
-LispObj *Lisp_StringTrim(LispBuiltin*);
-LispObj *Lisp_StringLeftTrim(LispBuiltin*);
-LispObj *Lisp_StringRightTrim(LispBuiltin*);
-LispObj *Lisp_NstringTrim(LispBuiltin*);
-LispObj *Lisp_NstringLeftTrim(LispBuiltin*);
-LispObj *Lisp_NstringRightTrim(LispBuiltin*);
-LispObj *Lisp_StringEqual_(LispBuiltin*);
-LispObj *Lisp_StringLess(LispBuiltin*);
-LispObj *Lisp_StringGreater(LispBuiltin*);
-LispObj *Lisp_StringLessEqual(LispBuiltin*);
-LispObj *Lisp_StringGreaterEqual(LispBuiltin*);
-LispObj *Lisp_StringNotEqual_(LispBuiltin*);
-LispObj *Lisp_StringEqual(LispBuiltin*);
-LispObj *Lisp_StringGreaterp(LispBuiltin*);
-LispObj *Lisp_StringLessp(LispBuiltin*);
-LispObj *Lisp_StringNotLessp(LispBuiltin*);
-LispObj *Lisp_StringNotGreaterp(LispBuiltin*);
-LispObj *Lisp_StringNotEqual(LispBuiltin*);
-LispObj *Lisp_NstringUpcase(LispBuiltin*);
-LispObj *Lisp_StringUpcase(LispBuiltin*);
-LispObj *Lisp_StringDowncase(LispBuiltin*);
-LispObj *Lisp_NstringDowncase(LispBuiltin*);
-LispObj *Lisp_StringCapitalize(LispBuiltin*);
-LispObj *Lisp_NstringCapitalize(LispBuiltin*);
-LispObj *Lisp_StringConcat(LispBuiltin*);
-LispObj *Lisp_UpperCaseP(LispBuiltin*);
-LispObj *Lisp_XeditCharStore(LispBuiltin*);
-
-#endif /* Lisp_string_h */
diff --git a/xedit/lisp/struct.c b/xedit/lisp/struct.c
deleted file mode 100644 (file)
index b6ecf14..0000000
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/struct.c,v 1.22tsi Exp $ */
-
-#include "lisp/struct.h"
-
-/*
- * Prototypes
- */
-static LispObj *LispStructAccessOrStore(LispBuiltin*, int);
-
-/*
- * Initialization
- */
-LispObj *Omake_struct, *Ostruct_access, *Ostruct_store, *Ostruct_type;
-
-Atom_id Smake_struct, Sstruct_access, Sstruct_store, Sstruct_type;
-
-/*
- * Implementation
- */
-LispObj *
-Lisp_Defstruct(LispBuiltin *builtin)
-/*
- defstruct name &rest description
- */
-{
-    int intern;
-    LispAtom *atom;
-    int i, size, length, slength;
-    char *name, *strname;
-    LispObj *list, *cons, *object, *definition, *documentation;
-
-    LispObj *oname, *description;
-
-    description = ARGUMENT(1);
-    oname = ARGUMENT(0);
-
-    CHECK_SYMBOL(oname);
-
-    strname = ATOMID(oname)->value;
-    length  = ATOMID(oname)->length;
-
-           /* MAKE- */
-    size = length + 6;
-    name = LispMalloc(size);
-
-    sprintf(name, "MAKE-%s", strname);
-    atom = (object = ATOM(name))->data.atom;
-
-    if (atom->a_builtin)
-       LispDestroy("%s: %s cannot be a structure name",
-                   STRFUN(builtin), STROBJ(oname));
-
-    intern = !atom->ext;
-
-    if (CONSP(description) && STRINGP(CAR(description))) {
-       documentation = CAR(description);
-       description = CDR(description);
-    }
-    else
-       documentation = NIL;
-
-    /* get structure fields and default values */
-    for (list = description; CONSP(list); list = CDR(list)) {
-       object = CAR(list);
-
-       cons = list;
-       if (CONSP(object)) {
-           if ((CONSP(CDR(object)) && CDR(CDR(object)) != NIL) ||
-               (!CONSP(CDR(object)) && CDR(object) != NIL))
-           LispDestroy("%s: bad initialization %s",
-                       STRFUN(builtin), STROBJ(object));
-           cons = object;
-           object = CAR(object);
-       }
-       if (!SYMBOLP(object) || strcmp(ATOMID(object)->value, "P") == 0)
-           /* p is invalid as a field name due to `type'-p */
-           LispDestroy("%s: %s cannot be a field for %s",
-                       STRFUN(builtin), STROBJ(object), ATOMID(oname)->value);
-
-       if (!KEYWORDP(object))
-           CAR(cons) = KEYWORD(ATOMID(object)->value);
-
-       /* check for repeated field names */
-       for (object = description; object != list; object = CDR(object)) {
-           LispObj *left = CAR(object), *right = CAR(list);
-
-           if (CONSP(left))
-               left = CAR(left);
-           if (CONSP(right))
-               right = CAR(right);
-
-           if (ATOMID(left) == ATOMID(right))
-               LispDestroy("%s: only one slot named %s allowed",
-                           STRFUN(builtin), STROBJ(left));
-       }
-    }
-
-    /* atom should not have been modified */
-    definition = CONS(oname, description);
-    LispSetAtomStructProperty(atom, definition, STRUCT_CONSTRUCTOR);
-    if (!intern)
-       LispExportSymbol(object);
-
-    atom = oname->data.atom;
-    if (atom->a_defstruct)
-       LispWarning("%s: structure %s is being redefined",
-                   STRFUN(builtin), strname);
-    LispSetAtomStructProperty(atom, definition, STRUCT_NAME);
-
-    sprintf(name, "%s-P", strname);
-    atom = (object = ATOM(name))->data.atom;
-    LispSetAtomStructProperty(atom, definition, STRUCT_CHECK);
-    if (!intern)
-       LispExportSymbol(object);
-
-    for (i = 0, list = description; CONSP(list); i++, list = CDR(list)) {
-       Atom_id id;
-
-       if (CONSP(CAR(list)))
-           id = ATOMID(CAR(CAR(list)));
-       else
-           id = ATOMID(CAR(list));
-       slength = id->length;
-       if (length + slength + 2 > size) {
-           size = length + slength + 2;
-           name = LispRealloc(name, size);
-       }
-       sprintf(name, "%s-%s", strname, id->value);
-       atom = (object = ATOM(name))->data.atom;
-       LispSetAtomStructProperty(atom, definition, i);
-       if (!intern)
-           LispExportSymbol(object);
-    }
-
-    LispFree(name);
-
-    if (documentation != NIL)
-       LispAddDocumentation(oname, documentation, LispDocStructure);
-
-    return (oname);
-}
-
-/* helper functions
- *     DONT explicitly call them. Non standard functions.
- */
-LispObj *
-Lisp_XeditMakeStruct(LispBuiltin *builtin)
-/*
- lisp::make-struct atom &rest init
- */
-{
-    int nfld, ncvt, length = lisp__data.protect.length;
-    LispAtom *atom = NULL;
-
-    LispObj *definition, *object, *field, *fields, *value = NIL, *cons, *list;
-    LispObj *struc, *init;
-
-    init = ARGUMENT(1);
-    struc = ARGUMENT(0);
-
-    field = cons = NIL;
-    if (!POINTERP(struc) ||
-       !(XSYMBOLP(struc) || XFUNCTIONP(struc)) ||
-       (atom = struc->data.atom)->a_defstruct == 0 ||
-        atom->property->structure.function != STRUCT_CONSTRUCTOR)
-       LispDestroy("%s: invalid constructor %s",
-                   STRFUN(builtin), STROBJ(struc));
-    definition = atom->property->structure.definition;
-
-    ncvt = nfld = 0;
-    fields = NIL;
-
-    /* check for errors in argument list */
-    for (list = init, nfld = 0; CONSP(list); list = CDR(list)) {
-       CHECK_KEYWORD(CAR(list));
-       if (!CONSP(CDR(list)))
-           LispDestroy("%s: values must be provided as pairs",
-                       ATOMID(struc)->value);
-       nfld++;
-       list = CDR(list);
-    }
-
-    /* create structure, CAR(definition) is structure name */
-    for (list = CDR(definition); CONSP(list); list = CDR(list)) {
-       Atom_id id;
-       LispObj *defvalue = NIL;
-
-       ++nfld;
-       field = CAR(list);
-       if (CONSP(field)) {
-           /* if default value provided */
-           if (CONSP(CDR(field)))
-               defvalue = CAR(CDR(field));
-           field = CAR(field);
-       }
-       id = ATOMID(field);
-
-       for (object = init; CONSP(object); object = CDR(object)) {
-           /* field is a keyword, test above checked it */
-           field = CAR(object);
-           if (id == ATOMID(field)) {
-               /* value provided */
-               value = CAR(CDR(object));
-               ncvt++;
-               break;
-           }
-           object = CDR(object);
-       }
-
-       /* if no initialization given */
-       if (!CONSP(object)) {
-           /* if default value in structure definition */
-           if (defvalue != NIL)
-               value = EVAL(defvalue);
-           else
-               value = NIL;
-       }
-
-       if (fields == NIL) {
-           fields = cons = CONS(value, NIL);
-           if (length + 1 >= lisp__data.protect.space)
-               LispMoreProtects();
-           lisp__data.protect.objects[lisp__data.protect.length++] = fields;
-       }
-       else {
-           RPLACD(cons, CONS(value, NIL));
-           cons = CDR(cons);
-       }
-    }
-
-    /* if not enough arguments were converted, need to check because
-     * it is acceptable to set a field more than once, but in that case,
-     * only the first value will be used. */
-    if (nfld > ncvt) {
-       for (list = init; CONSP(list); list = CDR(list)) {
-           Atom_id id = ATOMID(CAR(list));
-
-           for (object = CDR(definition); CONSP(object);
-                object = CDR(object)) {
-               field = CAR(object);
-               if (CONSP(field))
-                   field = CAR(field);
-               if (ATOMID(field) == id)
-                   break;
-           }
-           if (!CONSP(object))
-               LispDestroy("%s: %s is not a field for %s",
-                           ATOMID(struc)->value, STROBJ(CAR(list)),
-                           ATOMID(CAR(definition))->value);
-           list = CDR(list);
-       }
-    }
-
-    lisp__data.protect.length = length;
-
-    return (STRUCT(fields, definition));
-}
-
-static LispObj *
-LispStructAccessOrStore(LispBuiltin *builtin, int store)
-/*
- lisp::struct-access atom struct
- lisp::struct-store atom struct value
- */
-{
-    long offset;
-    LispAtom *atom;
-    LispObj *definition, *list;
-
-    LispObj *name, *struc, *value = NIL;
-
-    if (store)
-       value = ARGUMENT(2);
-    struc = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    if (!POINTERP(name) ||
-       !(XSYMBOLP(name) || XFUNCTIONP(name)) ||
-       (atom = name->data.atom)->a_defstruct == 0 ||
-       (offset = atom->property->structure.function) < 0) {
-       LispDestroy("%s: invalid argument %s",
-                   STRFUN(builtin), STROBJ(name));
-       /*NOTREACHED*/
-       offset = 0;
-       atom = NULL;
-    }
-    definition = atom->property->structure.definition;
-
-    /* check if the object is of the required type */
-    if (!STRUCTP(struc) || struc->data.struc.def != definition)
-       LispDestroy("%s: %s is not a %s",
-                   ATOMID(name)->value, STROBJ(struc), ATOMID(CAR(definition))->value);
-
-    for (list = struc->data.struc.fields; offset; list = CDR(list), offset--)
-       ;
-
-    return (store ? RPLACA(list, value) : CAR(list));
-}
-
-LispObj *
-Lisp_XeditStructAccess(LispBuiltin *builtin)
-/*
- lisp::struct-access atom struct
- */
-{
-    return (LispStructAccessOrStore(builtin, 0));
-}
-
-LispObj *
-Lisp_XeditStructStore(LispBuiltin *builtin)
-/*
- lisp::struct-store atom struct value
- */
-{
-    return (LispStructAccessOrStore(builtin, 1));
-}
-
-LispObj *
-Lisp_XeditStructType(LispBuiltin *builtin)
-/*
- lisp::struct-type atom struct
- */
-{
-    LispAtom *atom = NULL;
-
-    LispObj *definition, *struc, *name;
-
-    struc = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    if (!POINTERP(name) ||
-       !(XSYMBOLP(name) || XFUNCTIONP(name)) ||
-       (atom = name->data.atom)->a_defstruct == 0 ||
-       (atom->property->structure.function != STRUCT_CHECK))
-       LispDestroy("%s: invalid argument %s",
-                   STRFUN(builtin), STROBJ(name));
-    definition = atom->property->structure.definition;
-
-    /* check if the object is of the required type */
-    if (STRUCTP(struc) && struc->data.struc.def == definition)
-       return (T);
-
-    return (NIL);
-}
diff --git a/xedit/lisp/struct.h b/xedit/lisp/struct.h
deleted file mode 100644 (file)
index d5cca85..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/struct.h,v 1.6tsi Exp $ */
-
-#ifndef Lisp_struct_h
-#define Lisp_struct_h
-
-#include "lisp/private.h"
-
-/*
- * Defines
- */
-#define XSTRUCTP(object)       ((object)->type == LispStruct_t)
-#define STRUCTP(object)                (POINTERP(object) && XSTRUCTP(object))
-#define STRUCT(fields, def)    LispNewStruct(fields, def)
-
-/*
- * Prototypes
- */
-LispObj *Lisp_Defstruct(LispBuiltin*);
-LispObj *Lisp_XeditMakeStruct(LispBuiltin*);
-LispObj *Lisp_XeditStructAccess(LispBuiltin*);
-LispObj *Lisp_XeditStructStore(LispBuiltin*);
-LispObj *Lisp_XeditStructType(LispBuiltin*);
-
-#endif /* Lisp_struct_h */
diff --git a/xedit/lisp/test/hello.lsp b/xedit/lisp/test/hello.lsp
deleted file mode 100644 (file)
index 21ad6cf..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-;;
-;; Copyright (c) 2001 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;  
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/test/hello.lsp,v 1.1 2001/08/31 15:00:15 paulo Exp $
-;;
-(require "xaw")
-(require "xt")
-
-(defun quit-callback (widget user call) (quit))
-
-(defun fix-shell-size (shell)
-    (let ((size (xt-get-values shell '("width" "height"))))
-        (xt-set-values shell
-            (list (cons "minWidth" (cdar size))
-                  (cons "maxWidth" (cdar size))
-                  (cons "minHeight" (cdadr size))
-                  (cons "maxHeight" (cdadr size)))
-        )
-    )
-)
-
-(setq toplevel
-    (xt-app-initialize 'appcontext "Hello"
-       '(("title" . "Hello World!"))))
-
-(setq form
-    (xt-create-managed-widget "form" form-widget-class toplevel
-       '(("background" . "gray85")
-         ("displayList" . "foreground rgb:7/9/7;lines 1,-1,-1,-1,-1,1;foreground gray90;lines -1,0,0,0,0,-1")
-       )))
-
-(setq button
-    (xt-create-managed-widget "button" command-widget-class form
-       '(("label" . "Goodbye world!")
-         ("tip" . "This sample uses some customizations")
-         ("foreground" . "gray10")
-         ("background" . "gray80")
-         ("displayList" . "foreground rgb:7/9/7;lines 1,-1,-1,-1,-1,1;foreground gray90;lines -1,0,0,0,0,-1")
-       )))
-(xt-add-callback button "callback" 'quit-callback)
-
-(xt-realize-widget toplevel)
-
-(fix-shell-size toplevel)
-
-(xt-app-main-loop appcontext)
diff --git a/xedit/lisp/test/list.lsp b/xedit/lisp/test/list.lsp
deleted file mode 100644 (file)
index a06553e..0000000
+++ /dev/null
@@ -1,1895 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/test/list.lsp,v 1.5 2002/11/26 04:06:30 paulo Exp $
-;;
-
-;; basic lisp function tests
-
-;; Most of the tests are just the examples from the
-;;
-;;     Common Lisp HyperSpec (TM)
-;;     Copyright 1996-2001, Xanalys Inc. All rights reserved.
-;;
-;; Some tests are hand crafted, to test how the interpreter treats
-;; uncommon arguments or special conditions
-
-
-#|
- MAJOR PROBLEMS:
-
- o NIL and T should be always treated as symbols, actually it is
-   legal to say (defun nil (...) ...)
- o There aren't true uninterned symbols, there are only symbols that
-   did not yet establish the home package, but once one is created, an
-   interned symbol is always returned.
-|#
-
-(defun compare-test (test expect function arguments
-                    &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (apply function arguments))
-           (setq error nil)
-       )
-    )
-    (if error
-       (format t "ERROR: (~S~{ ~S~}) => ~S~%" function arguments error-value)
-       (or (funcall test result expect)
-           (format t "(~S~{ ~S~}) => should be ~S not ~S~%"
-               function arguments expect result
-           )
-       )
-    )
-)
-
-(defun compare-eval (test expect form
-                    &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (eval form))
-           (setq error nil)
-       )
-    )
-    (if error
-       (format t "ERROR: ~S => ~S~%" form error-value)
-       (or (funcall test result expect)
-           (format t "~S => should be ~S not ~S~%"
-               form expect result
-           )
-       )
-    )
-)
-
-(defun error-test (function &rest arguments &aux result (error t))
-    (ignore-errors
-       (setq result (apply function arguments))
-       (setq error nil)
-    )
-    (or error
-       (format t "ERROR: no error for (~S~{ ~S~}), result was ~S~%"
-           function arguments result)
-    )
-)
-
-(defun error-eval (form &aux result (error t))
-    (ignore-errors
-       (setq result (eval form))
-       (setq error nil)
-    )
-    (or error
-       (format t "ERROR: no error for ~S, result was ~S~%" form result)
-    )
-)
-
-(defun eq-test (expect function &rest arguments)
-    (compare-test #'eq expect function arguments))
-
-(defun eql-test (expect function &rest arguments)
-    (compare-test #'eql expect function arguments))
-
-(defun equal-test (expect function &rest arguments)
-    (compare-test #'equal expect function arguments))
-
-(defun equalp-test (expect function &rest arguments)
-    (compare-test #'equalp expect function arguments))
-
-
-(defun eq-eval (expect form)
-    (compare-eval #'eq expect form))
-
-(defun eql-eval (expect form)
-    (compare-eval #'eql expect form))
-
-(defun equal-eval (expect form)
-    (compare-eval #'equal expect form))
-
-(defun equalp-eval (expect form)
-    (compare-eval #'equalp expect form))
-
-;; clisp treats strings loaded from a file as constants
-(defun xseq (sequence)
-    #+clisp (if *load-pathname* (copy-seq sequence) sequence)
-    #-clisp sequence
-)
-
-;; apply                               - function
-(equal-test '((+ 2 3) . 4) #'apply 'cons '((+ 2 3) 4))
-(eql-test -1 #'apply #'- '(1 2))
-(eql-test 7 #'apply #'max 3 5 '(2 7 3))
-(error-test #'apply #'+ 1)
-(error-test #'apply #'+ 1 2)
-(error-test #'apply #'+ 1 . 2)
-(error-test #'apply #'+ 1 2 3)
-(error-test #'apply #'+ 1 2 . 3)
-(eql-test 6 #'apply #'+ 1 2 3 ())
-
-;; eq                                  - function
-(eq-eval t '(let* ((a #\a) (b a)) (eq a b)))
-(eq-test t #'eq 'a 'a)
-(eq-test nil #'eq 'a 'b)
-(eq-eval t '(eq #1=1 #1#))
-(eq-test nil #'eq "abc" "abc")
-(setq a '('x #c(1 2) #\z))
-(eq-test nil #'eq a (copy-seq a))
-
-;; eql                                 - function
-(eq-test t #'eql 1 1)
-(eq-test t #'eql 1.3d0 1.3d0)
-(eq-test nil #'eql 1 1d0)
-(eq-test t #'eql #c(1 -5) #c(1 -5))
-(eq-test t #'eql 'a 'a)
-(eq-test nil #'eql :a 'a)
-(eq-test t #'eql #c(5d0 0) 5d0)
-(eq-test nil #'eql #c(5d0 0d0) 5d0)
-(eq-test nil #'eql "abc" "abc")
-(equal-eval '(1 5/6 #p"test" #\#) '(setq a '(1 5/6 #p"test" #\#)))
-(eq-test nil #'eql a (copy-seq a))
-
-(setf
-    hash0 (make-hash-table)
-    hash1 (make-hash-table)
-    (gethash 1 hash0) 2
-    (gethash 1 hash1) 2
-    (gethash :foo hash0) :bar
-    (gethash :foo hash1) :bar
-)
-(defstruct test a b c)
-(setq
-    struc0 (make-test :a 1 :b 2 :c #\c)
-    struc1 (make-test :a 1 :b 2 :c #\c)
-)
-
-;; equal                               - function
-(eq-test t #'equal "abc" "abc")
-(eq-test t #'equal 1 1)
-(eq-test t #'equal #c(1 2) #c(1 2))
-(eq-test nil #'equal #c(1 2) #c(1 2d0))
-(eq-test t #'equal #\A #\A)
-(eq-test nil #'equal #\A #\a)
-(eq-test nil #'equal "abc" "Abc")
-(equal-eval '(1 2 3/5 #\a) '(setq a '(1 2 3/5 #\a)))
-(eq-test t #'equal a (copy-seq a))
-(eq-test nil #'equal hash0 hash1)
-(eq-test nil #'equal struc0 struc1)
-(eq-test nil #'equal #(1 2 3 4) #(1 2 3 4))
-
-;; equalp                              - function
-(eq-test t #'equalp hash0 hash1)
-(setf
-    (gethash 2 hash0) "FoObAr"
-    (gethash 2 hash1) "fOoBaR"
-)
-(eq-test t #'equalp hash0 hash1)
-(setf
-    (gethash 3 hash0) 3
-    (gethash 3d0 hash1) 3
-)
-(eq-test nil #'equalp hash0 hash1)
-(eq-test t #'equalp struc0 struc1)
-(setf
-    (test-a struc0) #\a
-    (test-a struc1) #\A
-)
-(eq-test t #'equalp struc0 struc1)
-(setf
-    (test-b struc0) 'test
-    (test-b struc1) :test
-)
-(eq-test nil #'equalp struc0 struc1)
-(eq-test t #'equalp #c(1/2 1d0) #c(0.5d0 1))
-(eq-test t #'equalp 1 1d0)
-(eq-test t #'equalp #(1 2 3 4) #(1 2 3 4))
-(eq-test t #'equalp #(1 #\a 3 4d0) #(1 #\A 3 4))
-
-;; acons                               - function
-(equal-test '((1 . "one")) #'acons 1 "one" nil)
-(equal-test '((2 . "two") (1 . "one")) #'acons 2 "two" '((1 . "one")))
-
-;; adjoin                              - function
-(equal-test '(nil) #'adjoin nil nil)
-(equal-test '(a) #'adjoin 'a nil)
-(equal-test '(1 2 3) #'adjoin 1 '(1 2 3))
-(equal-test '(1 2 3) #'adjoin 2 '(1 2 3))
-(equal-test '((1) (1) (2) (3)) #'adjoin '(1) '((1) (2) (3)))
-(equal-test '((1) (2) (3)) #'adjoin '(1) '((1) (2) (3)) :key #'car)
-(error-test #'adjoin nil 1)
-
-;; alpha-char-p                                - function
-(eq-test t #'alpha-char-p #\a)
-(eq-test nil #'alpha-char-p #\5)
-(error-test #'alpha-char-p 'a)
-
-;; alphanumericp                       - function
-(eq-test t #'alphanumericp #\Z)
-(eq-test t #'alphanumericp #\8)
-(eq-test nil #'alphanumericp #\#)
-
-;; and                                 - macro
-(eql-eval 1 '(setq temp1 1 temp2 1 temp3 1))
-(eql-eval 2 '(and (incf temp1) (incf temp2) (incf temp3)))
-(eq-eval t '(and (eql 2 temp1) (eql 2 temp2) (eql 2 temp3)))
-(eql-eval 1 '(decf temp3))
-(eq-eval nil '(and (decf temp1) (decf temp2) (eq temp3 'nil) (decf temp3)))
-(eq-eval t '(and (eql temp1 temp2) (eql temp2 temp3)))
-(eq-eval t '(and))
-(equal-eval '(1 2 3) '(multiple-value-list (and (values 'a) (values 1 2 3))))
-(equal-eval nil '(and (values) t))
-
-;; append                              - function
-(equal-test '(a b c d e f g) #'append '(a b c) '(d e f) '() '(g))
-(equal-test '(a b c . d) #'append '(a b c) 'd)
-(eq-test nil #'append)
-(eql-test 'a #'append nil 'a)
-(error-test #'append 1 2)
-
-;; assoc                               - function
-(equal-test '(1 . "one") #'assoc 1 '((2 . "two") (1 . "one")))
-(equal-test '(2 . "two") #'assoc 2 '((1 . "one") (2 . "two")))
-(eq-test nil #'assoc 1 nil)
-(equal-test '(2 . "two") #'assoc-if #'evenp '((1 . "one") (2 . "two")))
-(equal-test '(3 . "three") #'assoc-if-not #'(lambda(x) (< x 3))
-       '((1 . "one") (2 . "two") (3 . "three")))
-(equal-test '("two" . 2) #'assoc #\o '(("one" . 1) ("two" . 2) ("three" . 3))
-       :key #'(lambda (x) (char x 2)))
-(equal-test '(a . b) #'assoc 'a '((x . a) (y . b) (a . b) (a . c)))
-
-;; atom                                        - function
-(eq-test t #'atom 1)
-(eq-test t #'atom '())
-(eq-test nil #'atom '(1))
-(eq-test t #'atom 'a)
-
-;; block                               - special operator
-(eq-eval nil '(block empty))
-(eql-eval 2 '(let ((x 1))
-               (block stop (setq x 2) (return-from stop) (setq x 3)) x))
-(eql-eval 2 '(block twin (block twin (return-from twin 1)) 2))
-
-;; both-case-p                         - function
-(eq-test t #'both-case-p #\a)
-(eq-test nil #'both-case-p #\1)
-
-;; boundp                              - function
-(eql-eval 1 '(setq x 1))
-(eq-test t #'boundp 'x)
-(makunbound 'x)
-(eq-test nil #'boundp 'x)
-(eq-eval nil '(let ((x 1)) (boundp 'x)))
-(error-test #'boundp 1)
-
-;; butlast, nbutlast                   - function
-(setq x '(1 2 3 4 5 6 7 8 9))
-(equal-test '(1 2 3 4 5 6 7 8) #'butlast x)
-(equal-eval '(1 2 3 4 5 6 7 8 9) 'x)
-(eq-eval nil '(nbutlast x 9))
-(equal-test '(1) #'nbutlast x 8)
-(equal-eval '(1) 'x)
-(eq-test nil #'butlast nil)
-(eq-test nil #'nbutlast '())
-(error-test #'butlast 1 2)
-(error-test #'butlast -1 '(1 2))
-
-;; car, cdr, caar ...                  - function
-(eql-test 1 #'car '(1 2))
-(eql-test 2 #'cdr '(1 . 2))
-(eql-test 1 #'caar '((1 2)))
-(eql-test 2 #'cadr '(1 2))
-(eql-test 2 #'cdar '((1 . 2)))
-(eql-test 3 #'cddr '(1 2 . 3))
-(eql-test 1 #'caaar '(((1 2))))
-(eql-test 2 #'caadr '(1 (2 3)))
-(eql-test 2 #'cadar '((1 2) 2 3))
-(eql-test 3 #'caddr '(1 2 3 4))
-(eql-test 2 #'cdaar '(((1 . 2)) 3))
-(eql-test 3 #'cdadr '(1 (2 . 3) 4))
-(eql-test 3 #'cddar '((1 2 . 3) 3))
-(eql-test 4 #'cdddr '(1 2 3 . 4))
-(eql-test 1 #'caaaar '((((1 2)))))
-(eql-test 2 #'caaadr '(1 ((2))))
-(eql-test 2 #'caadar '((1 (2)) 3))
-(eql-test 3 #'caaddr '(1 2 (3 4)))
-(eql-test 2 #'cadaar '(((1 2)) 3))
-(eql-test 3 #'cadadr '(1 (2 3) 4))
-(eql-test 3 #'caddar '((1 2 3) 4))
-(eql-test 4 #'cadddr '(1 2 3 4 5))
-(eql-test 2 #'cdaaar '((((1 . 2))) 3))
-(eql-test 3 #'cdaadr '(1 ((2 . 3)) 4))
-(eql-test 3 #'cdadar '((1 (2 . 3)) 4))
-(eql-test 4 #'cdaddr '(1 2 (3 . 4) 5))
-(eql-test 3 #'cddaar '(((1 2 . 3)) 4))
-(eql-test 4 #'cddadr '(1 (2 3 . 4) 5))
-(eql-test 4 #'cdddar '((1 2 3 . 4) 5))
-(eql-test 5 #'cddddr '(1 2 3 4 . 5))
-
-;; first ... tenth, rest               - function
-(eql-test 2 #'rest '(1 . 2))
-(eql-test 1 #'first '(1 2))
-(eql-test 2 #'second '(1 2 3))
-(eql-test 2 #'second '(1 2 3))
-(eql-test 3 #'third '(1 2 3 4))
-(eql-test 4 #'fourth '(1 2 3 4 5))
-(eql-test 5 #'fifth '(1 2 3 4 5 6))
-(eql-test 6 #'sixth '(1 2 3 4 5 6 7))
-(eql-test 7 #'seventh '(1 2 3 4 5 6 7 8))
-(eql-test 8 #'eighth '(1 2 3 4 5 6 7 8 9))
-(eql-test 9 #'ninth '(1 2 3 4 5 6 7 8 9 10))
-(eql-test 10 #'tenth '(1 2 3 4 5 6 7 8 9 10 11))
-(error-test #'car 1)
-(error-test #'car #c(1 2))
-(error-test #'car #(1 2))
-
-;; case                                        - macro
-(eql-eval t '(let ((a 1)) (case a ((4 5 6) nil) ((3 2 1) t) (otherwise :error))))
-(eql-eval t '(let ((a 1)) (case a ((3 2) nil) (1 t) (t :error))))
-(error-eval '(let ((a 1)) (case a (2 :error) (t nil) (otherwise t))))
-(error-eval '(let ((a 1)) (case a (2 :error) (otherwise t) (t nil))))
-
-;; catch                               - special operator
-(eql-eval 3 '(catch 'dummy-tag 1 2 (throw 'dummy-tag 3) 4))
-(eql-eval 4 '(catch 'dummy-tag 1 2 3 4))
-(eq-eval 'throw-back '(defun throw-back (tag) (throw tag t)))
-(eq-eval t '(catch 'dummy-tag (throw-back 'dummy-tag) 2))
-
-;; char                                        - function
-(eql-test #\a #'char "abc" 0)
-(eql-test #\b #'char "abc" 1)
-(error-test #'char "abc" 3)
-
-;; char-*                              - function
-(eq-test nil #'alpha-char-p #\3)
-(eq-test t #'alpha-char-p #\y)
-(eql-test #\a #'char-downcase #\a)
-(eql-test #\a #'char-downcase #\a)
-(eql-test #\1 #'char-downcase #\1)
-(error-test #'char-downcase 1)
-(eql-test #\A #'char-upcase #\a)
-(eql-test #\A #'char-upcase #\A)
-(eql-test #\1 #'char-upcase #\1)
-(error-test #'char-upcase 1)
-(eq-test t #'lower-case-p #\a)
-(eq-test nil #'lower-case-p #\A)
-(eq-test t #'upper-case-p #\W)
-(eq-test nil #'upper-case-p #\w)
-(eq-test t #'both-case-p #\x)
-(eq-test nil #'both-case-p #\%)
-(eq-test t #'char= #\d #\d)
-(eq-test t #'char-equal #\d #\d)
-(eq-test nil #'char= #\A #\a)
-(eq-test t #'char-equal #\A #\a)
-(eq-test nil #'char= #\d #\x)
-(eq-test nil #'char-equal #\d #\x)
-(eq-test nil #'char= #\d #\D)
-(eq-test t #'char-equal #\d #\D)
-(eq-test nil #'char/= #\d #\d)
-(eq-test nil #'char-not-equal #\d #\d)
-(eq-test nil #'char/= #\d #\d)
-(eq-test nil #'char-not-equal #\d #\d)
-(eq-test t #'char/= #\d #\x)
-(eq-test t #'char-not-equal #\d #\x)
-(eq-test t #'char/= #\d #\D)
-(eq-test nil #'char-not-equal #\d #\D)
-(eq-test t #'char= #\d #\d #\d #\d)
-(eq-test t #'char-equal #\d #\d #\d #\d)
-(eq-test nil #'char= #\d #\D #\d #\d)
-(eq-test t #'char-equal #\d #\D #\d #\d)
-(eq-test nil #'char/= #\d #\d #\d #\d)
-(eq-test nil #'char-not-equal #\d #\d #\d #\d)
-(eq-test nil #'char/= #\d #\d #\D #\d)
-(eq-test nil #'char-not-equal #\d #\d #\D #\d)
-(eq-test nil #'char= #\d #\d #\x #\d)
-(eq-test nil #'char-equal #\d #\d #\x #\d)
-(eq-test nil #'char/= #\d #\d #\x #\d)
-(eq-test nil #'char-not-equal #\d #\d #\x #\d)
-(eq-test nil #'char= #\d #\y #\x #\c)
-(eq-test nil #'char-equal #\d #\y #\x #\c)
-(eq-test t #'char/= #\d #\y #\x #\c)
-(eq-test t #'char-not-equal #\d #\y #\x #\c)
-(eq-test nil #'char= #\d #\c #\d)
-(eq-test nil #'char-equal #\d #\c #\d)
-(eq-test nil #'char/= #\d #\c #\d)
-(eq-test nil #'char-not-equal #\d #\c #\d)
-(eq-test t #'char< #\d #\x)
-(eq-test t #'char-lessp #\d #\x)
-(eq-test t #'char-lessp #\d #\X)
-(eq-test t #'char-lessp #\D #\x)
-(eq-test t #'char-lessp #\D #\X)
-(eq-test t #'char<= #\d #\x)
-(eq-test t #'char-not-greaterp #\d #\x)
-(eq-test t #'char-not-greaterp #\d #\X)
-(eq-test t #'char-not-greaterp #\D #\x)
-(eq-test t #'char-not-greaterp #\D #\X)
-(eq-test nil #'char< #\d #\d)
-(eq-test nil #'char-lessp #\d #\d)
-(eq-test nil #'char-lessp #\d #\D)
-(eq-test nil #'char-lessp #\D #\d)
-(eq-test nil #'char-lessp #\D #\D)
-(eq-test t #'char<= #\d #\d)
-(eq-test t #'char-not-greaterp #\d #\d)
-(eq-test t #'char-not-greaterp #\d #\D)
-(eq-test t #'char-not-greaterp #\D #\d)
-(eq-test t #'char-not-greaterp #\D #\D)
-(eq-test t #'char< #\a #\e #\y #\z)
-(eq-test t #'char-lessp #\a #\e #\y #\z)
-(eq-test t #'char-lessp #\a #\e #\y #\Z)
-(eq-test t #'char-lessp #\a #\E #\y #\z)
-(eq-test t #'char-lessp #\A #\e #\y #\Z)
-(eq-test t #'char<= #\a #\e #\y #\z)
-(eq-test t #'char-not-greaterp #\a #\e #\y #\z)
-(eq-test t #'char-not-greaterp #\a #\e #\y #\Z)
-(eq-test t #'char-not-greaterp #\A #\e #\y #\z)
-(eq-test nil #'char< #\a #\e #\e #\y)
-(eq-test nil #'char-lessp #\a #\e #\e #\y)
-(eq-test nil #'char-lessp #\a #\e #\E #\y)
-(eq-test nil #'char-lessp #\A #\e #\E #\y)
-(eq-test t #'char<= #\a #\e #\e #\y)
-(eq-test t #'char-not-greaterp #\a #\e #\e #\y)
-(eq-test t #'char-not-greaterp #\a #\E #\e #\y)
-(eq-test t #'char> #\e #\d)
-(eq-test t #'char-greaterp #\e #\d)
-(eq-test t #'char-greaterp #\e #\D)
-(eq-test t #'char-greaterp #\E #\d)
-(eq-test t #'char-greaterp #\E #\D)
-(eq-test t #'char>= #\e #\d)
-(eq-test t #'char-not-lessp #\e #\d)
-(eq-test t #'char-not-lessp #\e #\D)
-(eq-test t #'char-not-lessp #\E #\d)
-(eq-test t #'char-not-lessp #\E #\D)
-(eq-test t #'char> #\d #\c #\b #\a)
-(eq-test t #'char-greaterp #\d #\c #\b #\a)
-(eq-test t #'char-greaterp #\d #\c #\b #\A)
-(eq-test t #'char-greaterp #\d #\c #\B #\a)
-(eq-test t #'char-greaterp #\d #\C #\b #\a)
-(eq-test t #'char-greaterp #\D #\C #\b #\a)
-(eq-test t #'char>= #\d #\c #\b #\a)
-(eq-test t #'char-not-lessp #\d #\c #\b #\a)
-(eq-test t #'char-not-lessp #\d #\c #\b #\A)
-(eq-test t #'char-not-lessp #\D #\c #\b #\a)
-(eq-test t #'char-not-lessp #\d #\C #\B #\a)
-(eq-test nil #'char> #\d #\d #\c #\a)
-(eq-test nil #'char-greaterp #\d #\d #\c #\a)
-(eq-test nil #'char-greaterp #\d #\d #\c #\A)
-(eq-test nil #'char-greaterp #\d #\D #\c #\a)
-(eq-test nil #'char-greaterp #\d #\D #\C #\a)
-(eq-test t #'char>= #\d #\d #\c #\a)
-(eq-test t #'char-not-lessp #\d #\d #\c #\a)
-(eq-test t #'char-not-lessp #\d #\D #\c #\a)
-(eq-test t #'char-not-lessp #\D #\d #\c #\a)
-(eq-test t #'char-not-lessp #\D #\D #\c #\A)
-(eq-test nil #'char> #\e #\d #\b #\c #\a)
-(eq-test nil #'char-greaterp #\e #\d #\b #\c #\a)
-(eq-test nil #'char-greaterp #\E #\d #\b #\c #\a)
-(eq-test nil #'char-greaterp #\e #\D #\b #\c #\a)
-(eq-test nil #'char-greaterp #\E #\d #\B #\c #\A)
-(eq-test nil #'char>= #\e #\d #\b #\c #\a)
-(eq-test nil #'char-not-lessp #\e #\d #\b #\c #\a)
-(eq-test nil #'char-not-lessp #\e #\d #\b #\c #\A)
-(eq-test nil #'char-not-lessp #\E #\d #\B #\c #\a)
-
-;; char-code                           - function
-;; XXX assumes ASCII
-(eql-test 49 #'char-code #\1)
-(eql-test 90 #'char-code #\Z)
-(eql-test 127 #'char-code #\Delete)
-(eql-test 27 #'char-code #\Escape)
-(eql-test 13 #'char-code #\Return)
-(eql-test 0 #'char-code #\Null)
-(eql-test 10 #'char-code #\Newline)
-(error-test #'char-code 65)
-
-;; character                           - function
-(eql-test #\a #'character #\a)
-(eql-test #\a #'character "a")
-(eql-test #\A #'character 'a)
-
-;; XXX assumes ASCII, and should be allowed to fail?
-(eql-test #\A #'character 65)
-
-(error-test #'character 1/2)
-(error-test #'character "abc")
-(error-test #'character :test)
-(eq-test #\T #'character t)
-(error-test #'character nil)
-
-;; characterp                          - function
-(eq-test t #'characterp #\a)
-(eq-test nil #'characterp 1)
-(eq-test nil #'characterp 1/2)
-(eq-test nil #'characterp 'a)
-(eq-test nil #'characterp '`a)
-
-
-
-
-;; TODO coerce
-
-
-
-
-;; cond                                        - macro
-(eql-eval 2 '(let ((a 1)) (cond ((= a 2) 1) ((= a 1) 2) ((= a 0) 1) (t nil))))
-(eql-eval nil '(let ((a 1)) (cond ((= a 2) 1) (t nil) ((= a 1) 2) ((= a 0) 1))))
-
-;; consp                               - function (predicate)
-(eq-test t #'consp '(1 2))
-(eq-test t #'consp '(1 . 2))
-(eq-test nil #'consp nil)
-(eq-test nil #'consp 1)
-
-;; constantp                           - function (predicate)
-(eq-test t #'constantp 1)
-(eq-test t #'constantp #\x)
-(eq-test t #'constantp :test)
-(eq-test nil #'constantp 'test)
-(eq-test t #'constantp ''1)
-(eq-test t #'constantp '(quote 1))
-(eq-test t #'constantp "string")
-(eq-test t #'constantp #c(1 2))
-(eq-test t #'constantp #(1 2))
-(eq-test nil #'constantp #p"test")
-(eq-test nil #'constantp '(1 2))
-(eq-test nil #'constantp (make-hash-table))
-(eq-test nil #'constantp *package*)
-(eq-test nil #'constantp *standard-input*)
-
-;; copy-list, copy-alist and copy-tree - function
-(equal-test '(1 2) #'copy-list '(1 2))
-(equal-test '(1 . 2) #'copy-list '(1 . 2))
-(eq-test nil #'copy-list nil)
-(error-test #'copy-list 1)
-(equal-eval '(1 (2 3)) '(setq x '(1 (2 3))))
-(equal-eval x '(setq y (copy-list x)))
-(equal-test '("one" (2 3)) #'rplaca x "one")
-(eql-test 1 #'car y)
-(equal-test '("two" 3) #'rplaca (cadr x) "two")
-(eq-test (caadr x) #'caadr y)
-(equal-eval '(1 (2 3) 4) '(setq a '(1 (2 3) 4) b (copy-list a)))
-(eq-eval t '(eq (cadr a) (cadr b)))
-(eq-eval t '(eq (car a) (car b)))
-(setq a '(1 (2 3) 4) b (copy-alist a))
-(eq-eval nil '(eq (cadr a) (cadr b)))
-(eq-eval t '(eq (car a) (car b)))
-(eq-test nil #'copy-alist nil)
-(eq-test nil #'copy-list nil)
-(error-test #'copy-list 1)
-(setq a '(1 (2 (3))))
-(setq as-list (copy-list a))
-(setq as-alist (copy-alist a))
-(setq as-tree (copy-tree a))
-(eq-eval t '(eq (cadadr a) (cadadr as-list)))
-(eq-eval t '(eq (cadadr a) (cadadr as-alist)))
-(eq-eval nil '(eq (cadadr a) (cadadr as-tree)))
-
-;; decf                                        - macro
-(setq n 2)
-(eql-eval 1 '(decf n))
-(eql-eval 1 'n)
-(setq n -2147483648)
-(eql-eval -2147483649 '(decf n))
-(eql-eval -2147483649 'n)
-(setq n 0)
-(eql-eval -0.5d0 '(decf n 0.5d0))
-(eql-eval -0.5d0 'n)
-(setq n 1)
-(eql-eval 1/2 '(decf n 1/2))
-(eql-eval 1/2 'n)
-
-;; delete and remove                   - function
-(setq a '(1 3 4 5 9) b a)
-(equal-test '(1 3 5 9) #'remove 4 a)
-(eq-eval t '(eq a b))
-(setq a (delete 4 a))
-(equal-eval '(1 3 5 9) 'a)
-(setq a '(1 2 4 1 3 4 5) b a)
-(equal-test '(1 2 1 3 5) #'remove 4 a)
-(eq-eval t '(eq a b))
-(equal-test '(1 2 1 3 4 5) #'remove 4 a :count 1)
-(eq-eval t '(eq a b))
-(equal-test '(1 2 4 1 3 5) #'remove 4 a :count 1 :from-end t)
-(eq-eval t '(eq a b))
-(equal-test '(4 3 4 5) #'remove 3 a :test #'>)
-(eq-eval t '(eq a b))
-(setq a (delete 4 '(1 2 4 1 3 4 5)))
-(equal-eval '(1 2 1 3 5) 'a)
-(setq a (delete 4 '(1 2 4 1 3 4 5) :count 1))
-(equal-eval '(1 2 1 3 4 5) 'a)
-(setq a (delete 4 '(1 2 4 1 3 4 5) :count 1 :from-end t))
-(equal-eval '(1 2 4 1 3 5) 'a)
-(equal-test "abc" #'delete-if #'digit-char-p "a1b2c3")
-(equal-test "123" #'delete-if-not #'digit-char-p "a1b2c3")
-(eq-test nil #'delete 1 nil)
-(eq-test nil #'remove 1 nil)
-(setq a '(1 2 3 4 :test 5 6 7 8) b a)
-(equal-test '(1 2 :test 7 8) #'remove-if #'numberp a :start 2 :end 7)
-(eq-eval t '(eq a b))
-(setq a (delete-if #'numberp a :start 2 :end 7))
-(equal-eval '(1 2 :test 7 8) 'a)
-
-;; digit-char                          - function
-(eql-test #\0 #'digit-char 0)
-(eql-test #\A #'digit-char 10 11)
-(eq-test nil #'digit-char 10 10)
-(eql-test 35 #'digit-char-p #\z 36)
-(error-test #'digit-char #\a)
-(error-test #'digit-char-p 1/2)
-
-
-
-;; TODO directory (known to have problems with parameters like "../*/../*/")
-
-
-
-;; elt                                 - function
-(eql-test #\a #'elt "xabc" 1)
-(eql-test 3 #'elt '(0 1 2 3) 3)
-(error-test #'elt nil 0)
-
-;; endp                                        - function
-(eql-test t #'endp nil)
-(error-test #'endp t)
-(eql-test nil #'endp '(1 . 2))
-(error-test #'endp #(1 2))
-
-;; every                               - function
-(eql-test t #'every 'not-used ())
-(eql-test t #'every #'characterp "abc")
-(eql-test nil #'every #'< '(1 2 3) '(4 5 6) #(7 8 -1))
-(eql-test t #'every #'< '(1 2 3) '(4 5 6) #(7 8))
-
-;; fboundp and fmakunbound             - function
-(eq-test t #'fboundp 'car)
-(eq-eval 'test '(defun test ()))
-(eq-test t #'fboundp 'test)
-(eq-test 'test #'fmakunbound 'test)
-(eq-test nil #'fboundp 'test)
-(eq-eval 'test '(defmacro test (x) x))
-(eq-test t #'fboundp 'test)
-(eq-test 'test #'fmakunbound 'test)
-
-;; fill                                        - function
-(setq x (list 1 2 3 4))
-(equal-test '((4 4 4 4) (4 4 4 4) (4 4 4 4) (4 4 4 4)) #'fill x '(4 4 4 4))
-(eq-eval t '(eq (car x) (cadr x)))
-(equalp-test '#(a z z d e) #'fill '#(a b c d e) 'z :start 1 :end 3)
-(equal-test "012ee" #'fill (xseq "01234") #\e :start 3)
-(error-test #'fill 1 #\a)
-
-;; find                                        - function
-(eql-test #\Space #'find #\d "here are some letters that can be looked at" :test #'char>)
-(eql-test 3 #'find-if #'oddp '(1 2 3 4 5) :end 3 :from-end t)
-(eq-test nil #'find-if-not #'complexp '#(3.5 2 #C(1.0 0.0) #C(0.0 1.0)) :start 2)
-(eq-test nil #'find 1 "abc")
-(error-test #'find 1 #c(1 2))
-
-;; find-symbol                         - function
-(equal-eval '(nil nil)
-    '(multiple-value-list (find-symbol "NEVER-BEFORE-USED")))
-(equal-eval '(nil nil)
-    '(multiple-value-list (find-symbol "NEVER-BEFORE-USED")))
-(setq test (multiple-value-list (intern "NEVER-BEFORE-USED")))
-(equal-eval test '(read-from-string "(never-before-used nil)"))
-(equal-eval '(never-before-used :internal)
-    '(multiple-value-list (intern "NEVER-BEFORE-USED")))
-(equal-eval '(never-before-used :internal)
-    '(multiple-value-list (find-symbol "NEVER-BEFORE-USED")))
-(equal-eval '(nil nil)
-    '(multiple-value-list (find-symbol "never-before-used")))
-(equal-eval '(car :inherited)
-    '(multiple-value-list (find-symbol "CAR" 'common-lisp-user)))
-(equal-eval '(car :external)
-   '(multiple-value-list  (find-symbol "CAR" 'common-lisp)))
-;; XXX these will generate wrong results, NIL is not really a symbol
-;; currently in the interpreter
-(equal-eval '(nil :inherited)
-    '(multiple-value-list (find-symbol "NIL" 'common-lisp-user)))
-(equal-eval '(nil :external)
-    '(multiple-value-list (find-symbol "NIL" 'common-lisp)))
-(setq test (multiple-value-list
-     (find-symbol "NIL" (prog1 (make-package "JUST-TESTING" :use '())
-                              (intern "NIL" "JUST-TESTING")))))
-(equal-eval (read-from-string "(just-testing::nil :internal)") 'test)
-(eq-eval t '(export 'just-testing::nil 'just-testing))
-(equal-eval '(just-testing:nil :external)
-    '(multiple-value-list (find-symbol "NIL" 'just-testing)))
-
-#+xedit (equal-eval '(nil nil)
-       '(multiple-value-list (find-symbol "NIL" "KEYWORD")))
-#|
-;; optional result of previous form:
-(equal-eval '(:nil :external)
-    '(multiple-value-list (find-symbol "NIL" "KEYWORD")))
-|#
-
-
-
-;; funcall                             - function
-(eql-test 6 #'funcall #'+ 1 2 3)
-(eql-test 1 #'funcall #'car '(1 2 3))
-(equal-test '(1 2 3) #'funcall #'list 1 2 3)
-
-
-
-;; TODO properly implement ``function''
-
-
-
-;; functionp                           - function (predicate)
-(eq-test nil #'functionp 'append)
-(eq-test t #'functionp #'append)
-(eq-test nil #'functionp '(lambda (x) (* x x)))
-(eq-test t #'functionp #'(lambda (x) (* x x)))
-(eq-test t #'functionp (symbol-function 'append))
-(eq-test nil #'functionp 1)
-(eq-test nil #'functionp nil)
-
-;; gensym                              - function
-(setq sym1 (gensym))
-(eq-test nil #'symbol-package sym1)
-(setq sym1 (gensym 100))
-(setq sym2 (gensym 100))
-(eq-test nil #'eq sym1 sym2)
-(eq-test nil #'equalp (gensym) (gensym))
-
-;; get                                 - accessor
-(defun make-person (first-name last-name)
-  (let ((person (gensym "PERSON")))
-    (setf (get person 'first-name) first-name)
-    (setf (get person 'last-name) last-name)
-    person))
-(eq-eval '*john* '(defvar *john* (make-person "John" "Dow")))
-(eq-eval '*sally* '(defvar *sally* (make-person "Sally" "Jones")))
-(equal-eval "John" '(get *john* 'first-name))
-(equal-eval "Jones" '(get *sally* 'last-name))
-(defun marry (man woman married-name)
-  (setf (get man 'wife) woman)
-  (setf (get woman 'husband) man)
-  (setf (get man 'last-name) married-name)
-  (setf (get woman 'last-name) married-name)
-  married-name)
-(equal-eval "Dow-Jones" '(marry *john* *sally* "Dow-Jones"))
-(equal-eval "Dow-Jones" '(get *john* 'last-name))
-(equal-eval "Sally" '(get (get *john* 'wife) 'first-name))
-(equal-eval `(wife ,*sally* last-name "Dow-Jones" first-name "John")
-    '(symbol-plist *john*))
-(eq-eval 'age
-    '(defmacro age (person &optional (default ''thirty-something))
-      `(get ,person 'age ,default)))
-(eq-eval 'thirty-something '(age *john*))
-(eql-eval 20 '(age *john* 20))
-(eql-eval 25 '(setf (age *john*) 25))
-(eql-eval 25 '(age *john*))
-(eql-eval 25 '(age *john* 20))
-
-;; graphic-char-p                      - function
-(eq-test t #'graphic-char-p #\a)
-(eq-test t #'graphic-char-p #\Space)
-(eq-test nil #'graphic-char-p #\Newline)
-(eq-test nil #'graphic-char-p #\Tab)
-(eq-test nil #'graphic-char-p #\Rubout)
-
-;; if                                  - special operator
-(eq-eval nil '(if nil t))
-(eq-eval nil '(if t nil t))
-(eq-eval nil '(if nil t nil))
-(eq-eval nil '(if nil t (if nil (if nil t) nil)))
-
-;; incf                                        - macro
-(setq n 1)
-(eql-eval 2 '(incf n))
-(eql-eval 2 'n)
-(setq n 2147483647)
-(eql-eval 2147483648 '(incf n))
-(eql-eval 2147483648 'n)
-(setq n 0)
-(eql-eval 0.5d0 '(incf n 0.5d0))
-(eql-eval 0.5d0 'n)
-(setq n 1)
-(eql-eval 3/2 '(incf n 1/2))
-(eql-eval 3/2 'n)
-
-;; intersection                                - function
-(setq list1 (list 1 1 2 3 4 'a 'b 'c "A" "B" "C" "d")
-      list2 (list 1 4 5 'b 'c 'd "a" "B" "c" "D"))
-(equal-test '(1 1 4 b c) #'intersection list1 list2)
-(equal-test '(1 1 4 b c "B") #'intersection list1 list2 :test 'equal)
-(equal-test '(1 1 4 b c "A" "B" "C" "d")
-    #'intersection list1 list2 :test #'equalp)
-(setq list1 (nintersection list1 list2))
-(equal-eval '(1 1 4 b c) 'list1)
-(setq list1 (copy-list '((1 . 2) (2 . 3) (3 . 4) (4 . 5))))
-(setq list2 (copy-list '((1 . 3) (2 . 4) (3 . 6) (4 . 8))))
-(equal-test '((2 . 3) (3 . 4)) #'nintersection list1 list2 :key #'cdr)
-
-;; keywordp                            - function (predicate)
-(eq-test t #'keywordp :test)
-(eq-test nil #'keywordp 'test)
-(eq-test nil #'keywordp '#:test)
-(eq-test nil #'keywordp 1)
-(eq-test nil #'keywordp #'keywordp)
-(eq-test nil #'keywordp nil)
-
-;; last                                        - function
-(equal-test '(3) #'last '(1 2 3))
-(equal-test '(2 . 3) #'last '(1 2 . 3))
-(eq-test nil #'last nil)
-(eql-test () #'last '(1 2 3) 0)
-(setq a '(1 . 2))
-(eql-test 2 #'last a 0)
-(eq-test a #'last a 1)
-(eq-test a #'last a 2)
-(eq-test t #'last t)
-(equal-test #c(1 2) #'last #c(1 2))
-(equalp-test #(1 2 3) #'last #(1 2 3))
-
-;; length                              - function
-(eql-test 3 #'length "abc")
-(eql-test 0 #'length nil)
-(eql-test 1 #'length '(1 . 2))
-(eql-test 2 #'length #(1 2))
-(error-test #'length #c(1 2))
-(error-test #'length t)
-
-;; let                                 - special operator
-(eql-eval 2 '(setq a 1 b 2))
-(eql-eval 2 '(let ((a 2)) a))
-(eql-eval 1 'a)
-(eql-eval 1 '(let ((a 3) (b a)) b))
-(eql-eval 2 'b)
-
-;; let*                                        - special operator
-(setq a 1 b 2)
-(eql-eval 2 '(let* ((a 2)) a))
-(eql-eval 1 'a)
-(eql-eval 3 '(let* ((a 3) (b a)) b))
-(eql-eval 2 'b)
-
-;; list                                        - function
-(equal-test '(1) #'list 1)
-(equal-test '(3 4 a b 4) #'list 3 4 'a (car '(b . c)) (+ 6 -2))
-(eq-test nil #'list)
-
-;; list-length                         - function
-(eql-test 4 #'list-length '(a b c d))
-(eql-test 3 #'list-length '(a (b c) d))
-(eql-test 0 #'list-length '())
-(eql-test 0 #'list-length nil)
-(defun circular-list (&rest elements)
-  (let ((cycle (copy-list elements))) 
-    (nconc cycle cycle)))
-(eq-test nil #'list-length (circular-list 'a 'b))
-(eq-test nil #'list-length (circular-list 'a))
-(eql-test 0 #'list-length (circular-list))
-
-;; list*                               - function
-(eql-test 1 #'list* 1)
-(equal-test '(a b c . d) #'list* 'a 'b 'c 'd)
-(error-test #'list*)
-(setq a '(1 2))
-(eq-test a #'list* a)
-
-;; listp                               - function (predicate)
-(eq-test t #'listp nil)
-(eq-test t #'listp '(1 . 2))
-(eq-test nil #'listp t)
-(eq-test nil #'listp #'listp)
-(eq-test nil #'listp #(1 2))
-(eq-test nil #'listp #c(1 2))
-
-;; lower-case-p                                - function
-(eq-test t #'lower-case-p #\a)
-(eq-test nil #'lower-case-p #\1)
-(eq-test nil #'lower-case-p #\Newline)
-(error-test #'lower-case-p 1)
-
-
-
-;; TODO make-array     (will be rewritten)
-
-
-
-;; make-list                           - function
-(equal-test '(nil nil nil) #'make-list 3)
-(equal-test '((1 2) (1 2)) #'make-list 2 :initial-element '(1 2))
-(eq-test nil #'make-list 0)
-(eq-test nil #'make-list 0 :initial-element 1)
-
-;; make-package                                - function
-(setq pack1 (make-package "PACKAGE-1" :nicknames '("PACK-1" "PACK1")))
-(setq pack2 (make-package "PACKAGE-2" :nicknames '("PACK-2" "PACK2") :use '("PACK1")))
-(equal-test (list pack2) #'package-used-by-list pack1)
-(equal-test (list pack1) #'package-use-list pack2)
-(eq-test pack1 #'symbol-package 'pack1::test)
-(eq-test pack2 #'symbol-package 'pack2::test)
-
-;; make-string                         - function
-(equal-test "55555" #'make-string 5 :initial-element #\5)
-(equal-test "" #'make-string 0)
-(error-test #'make-string 10 :initial-element t)
-(error-test #'make-string 10 :initial-element nil)
-(error-test #'make-string 10 :initial-element 1)
-(eql-test 10 #'length (make-string 10))
-
-;; make-symbol                         - function
-(setq a "TEST")
-;; This will fail
-(eq-test nil #'eq (make-symbol a) (make-symbol a))
-(equal-test a #'symbol-name (make-symbol a))
-(setq temp-string "temp")
-(setq temp-symbol (make-symbol temp-string))
-(equal-test temp-string #'symbol-name temp-symbol)
-(equal-eval '(nil nil) '(multiple-value-list (find-symbol temp-string)))
-
-;; makunbound                          - function
-(eq-eval 1 '(setf (symbol-value 'a) 1))
-(eq-test t #'boundp 'a)
-(eql-eval 1 'a)
-(eq-test 'a #'makunbound 'a)
-(eq-test nil #'boundp 'a)
-(error-test #'makunbound 1)
-
-;; mapc                                        - function
-(setq dummy nil)
-(equal-test '(1 2 3 4)
-    #'mapc #'(lambda (&rest x) (setq dummy (append dummy x)))
-   '(1 2 3 4)
-   '(a b c d e)
-   '(x y z))
-(equal-eval '(1 a x 2 b y 3 c z) 'dummy)
-
-;; mapcan                              - function
-(equal-test '(d 4 e 5)
-    #'mapcan #'(lambda (x y) (if (null x) nil (list x y)))
-    '(nil nil nil d e)
-    '(1 2 3 4 5 6))
-(equal-test '(1 3 4 5)
-    #'mapcan #'(lambda (x) (and (numberp x) (list x)))
-    '(a 1 b c 3 4 d 5))
-
-;; mapcar                              - function
-(equal-test '(1 2 3) #'mapcar #'car '((1 a) (2 b) (3 c)))
-(equal-test '(3 4 2 5 6) #'mapcar #'abs '(3 -4 2 -5 -6))
-(equal-test '((a . 1) (b . 2) (c . 3)) #'mapcar #'cons '(a b c) '(1 2 3))
-(equal-test '((1 3 5)) #'mapcar #'list* '(1 2) '(3 4) '((5)))
-(equal-test '((1 3 5) (2 4 6)) #'mapcar #'list* '(1 2) '(3 4) '((5) (6)))
-
-;; mapcon                              - function
-(equal-test '(1 a 2 b (3) c) #'mapcon #'car '((1 a) (2 b) ((3) c)))
-(equal-test '((1 2 3 4) (2 3 4) (3 4) (4)) #'mapcon #'list '(1 2 3 4))
-
-;; mapl                                        - function
-(setq dummy nil)
-(equal-test '(1 2 3 4) #'mapl #'(lambda (x) (push x dummy)) '(1 2 3 4))
-(equal-eval '((4) (3 4) (2 3 4) (1 2 3 4)) 'dummy)
-
-;; maplist                             - function
-(equal-test '((1 2 3 4 1 2 1 2 3) (2 3 4 2 2 3))
-    #'maplist #'append '(1 2 3 4) '(1 2) '(1 2 3))
-(equal-test '((foo a b c d) (foo b c d) (foo c d) (foo d))
-    #'maplist #'(lambda (x) (cons 'foo x)) '(a b c d))
-(equal-test '(0 0 1 0 1 1 1)
-    #'maplist #'(lambda (x) (if (member (car x) (cdr x)) 0 1)) '(a b a c d b c))
-
-;; member                              - function
-(setq a '(1 2 3))
-(eq-test (cdr a) #'member 2 a)
-(setq a '((1 . 2) (3 . 4)))
-(eq-test (cdr a) #'member 2 a :test-not #'= :key #'cdr)
-(eq-test nil #'member 'e '(a b c d))
-(eq-test nil #'member 1 nil)
-(error-test #'member 2 '(1 . 2))
-(setq a '(a b nil c d))
-(eq-test (cddr a) #'member-if #'listp a)
-(setq a '(a #\Space 5/3 foo))
-(eq-test (cddr a) #'member-if #'numberp a)
-(setq a '(3 6 9 11 . 12))
-(eq-test (cdddr a) #'member-if-not #'zerop a :key #'(lambda (x) (mod x 3)))
-
-;; multiple-value-bind                 - macro
-(equal-eval '(11 9) '(multiple-value-bind (f r) (floor 130 11) (list f r)))
-
-;; multiple-value-call                 - special operator
-(equal-eval '(1 / 2 3 / / 2 0.5)
-    '(multiple-value-call #'list 1 '/ (values 2 3) '/ (values) '/ (floor 2.5)))
-(eql-eval 10 '(multiple-value-call #'+ (floor 5 3) (floor 19 4)))
-
-;; multiple-value-list                 - macro
-(equal-eval '(-1 1) '(multiple-value-list (floor -3 4)))
-(eql-eval nil '(multiple-value-list (values)))
-(equal-eval '(nil) '(multiple-value-list (values nil)))
-
-;; multiple-value-prog1                        - special operator
-(setq temp '(1 2 3))
-(equal-eval temp
-    '(multiple-value-list
-       (multiple-value-prog1
-           (values-list temp)
-           (setq temp nil)
-           (values-list temp))))
-
-;; multiple-value-setq                 - macro
-(eql-eval 1 '(multiple-value-setq (quotient remainder) (truncate 3.5d0 2)))
-(eql-eval 1 quotient)
-(eql-eval 1.5d0 'remainder)
-(eql-eval 1 '(multiple-value-setq (a b c) (values 1 2)))
-(eql-eval 1 'a)
-(eql-eval 2 'b)
-(eq-eval nil 'c)
-(eql-eval 4 '(multiple-value-setq (a b) (values 4 5 6)))
-(eql-eval 4 'a)
-(eql-eval 5 'b)
-(setq a 1)
-(eql-eval nil '(multiple-value-setq (a) (values)))
-(eql-eval nil 'a)
-
-;; nconc                               - function
-(eq-test nil #'nconc)
-(setq x '(a b c))
-(setq y '(d e f))
-(equal-test '(a b c d e f) #'nconc x y)
-(equal-eval '(a b c d e f) 'x)
-(eq-test y #'cdddr x)
-(equal-test '(1 . 2) #'nconc (list 1) 2)
-(error-test #'nconc 1 2 3)
-(equal-eval '(k l m)
-   '(setq foo (list 'a 'b 'c 'd 'e)
-         bar (list 'f 'g 'h 'i 'j)
-         baz (list 'k 'l 'm)))
-(equal-test '(a b c d e f g h i j k l m) #'nconc foo bar baz)
-(equal-eval '(a b c d e f g h i j k l m) 'foo)
-(equal-eval (nthcdr 5 foo) 'bar)
-(equal-eval (nthcdr 10 foo) 'baz)
-(setq foo (list 'a 'b 'c 'd 'e)
-      bar (list 'f 'g 'h 'i 'j)
-      baz (list 'k 'l 'm))
-(equal-eval '(a b c d e f g h i j k l m) '(setq foo (nconc nil foo bar nil baz)))
-(equal-eval '(a b c d e f g h i j k l m) 'foo)
-(equal-eval (nthcdr 5 foo) 'bar)
-(equal-eval (nthcdr 10 foo) 'baz)
-
-;; notany                              - function
-(eql-test t #'notany #'> '(1 2 3 4) '(5 6 7 8) '(9 10 11 12))
-(eql-test t #'notany 'not-used ())
-(eql-test nil #'notany #'characterp #(1 2 3 4 5 #\6 7 8))
-
-;; notevery                            - function
-(eql-test nil #'notevery #'< '(1 2 3 4) '(5 6 7 8) '(9 10 11 12))
-(eql-test nil #'notevery 'not-used ())
-(eql-test t #'notevery #'numberp #(1 2 3 4 5 #\6 7 8))
-
-;; nth                                 - accessor (function)
-(eql-test 'foo #'nth 0 '(foo bar baz))
-(eql-test 'bar #'nth 1 '(foo bar baz))
-(eq-test nil #'nth 3 '(foo bar baz))
-(error-test #'nth 0 #c(1 2))
-(error-test #'nth 0 #(1 2))
-(error-test #'nth 0 "test")
-
-;; nth-value                           - macro
-(equal-eval 'a '(nth-value 0 (values 'a 'b)))
-(equal-eval 'b '(nth-value 1 (values 'a 'b)))
-(eq-eval nil '(nth-value 2 (values 'a 'b)))
-(equal-eval '(3332987528 3332987528 t)
-    '(multiple-value-list
-       (let* ((x 83927472397238947423879243432432432)
-              (y 32423489732)
-              (a (nth-value 1 (floor x y)))
-              (b (mod x y)))
-         (values a b (= a b)))))
-
-;; nthcdr                              - function
-(eq-test nil #'nthcdr 0 '())
-(eq-test nil #'nthcdr 3 '())
-(equal-test '(a b c) #'nthcdr 0 '(a b c))
-(equal-test '(c) #'nthcdr 2 '(a b c))
-(eq-test () #'nthcdr 4 '(a b c))
-(eql-test 1 #'nthcdr 1 '(0 . 1))
-(error-test #'nthcdr -1 '(1 2))
-(error-test #'nthcdr #\Null '(1 2))
-(error-test #'nthcdr 1 t)
-(error-test #'nthcdr 1 #(1 2 3))
-
-;; or                                  - macro
-(eq-eval nil '(or))
-(setq temp0 nil temp1 10 temp2 20 temp3 30)
-(eql-eval 10 '(or temp0 temp1 (setq temp2 37)))
-(eql-eval 20 'temp2)
-(eql-eval 11 '(or (incf temp1) (incf temp2) (incf temp3)))
-(eql-eval 11 'temp1)
-(eql-eval 20 temp2)
-(eql-eval 30 'temp3)
-(eql-eval 11 '(or (values) temp1))
-(eql-eval 11 '(or (values temp1 temp2) temp3))
-(equal-eval '(11 20) '(multiple-value-list (or temp0 (values temp1 temp2))))
-(equal-eval '(20 30)
-    '(multiple-value-list (or (values temp0 temp1) (values temp2 temp3))))
-
-;; packagep                            - function (predicate)
-(eq-test t #'packagep *package*)
-(eq-test nil #'packagep 10)
-(eq-test t #'packagep (make-package "TEST-PACKAGE"))
-(eq-test nil #'packagep 'keyword)
-(eq-test t #'packagep (find-package 'keyword))
-
-;; pairlis                             - function
-#+xedit        ;; order of result may vary
-(progn
-    (equal-test '((one . 1) (two . 2) (three . 3) (four . 19))
-       #'pairlis '(one two) '(1 2) '((three . 3) (four . 19)))
-    (setq keys '(1 2 3)
-         data '("one" "two" "three")
-         alist '((4 . "four")))
-    (equal-test '((1 . "one") (2 . "two") (3 . "three"))
-       #'pairlis keys data)
-    (equal-test '((1 . "one") (2 . "two") (3 . "three") (4 . "four"))
-       #'pairlis keys data alist)
-    (equal-eval '(1 2 3) 'keys)
-    (equal-eval '("one" "two" "three") 'data)
-    (equal-eval '((4 . "four")) 'alist)
-    (eq-test nil #'pairlis 1 2)
-    (error-test #'pairlis '(1 2 3) '(4 5))
-)
-
-;; pop                                 - macro
-(setq stack '(a b c) test stack)
-(eq-eval 'a '(pop stack))
-(eq-eval (cdr test) 'stack)
-(setq llst '((1 2 3 4)) test (car llst))
-(eq-eval 1 '(pop (car llst)))
-(eq-eval (cdr test) '(car llst))
-(error-eval '(pop 1))
-(error-eval '(pop nil))
-;; dotted list
-(setq stack (cons 1 2))
-(eq-eval 1 '(pop stack))
-(error-eval '(pop stack))
-;; circular list
-(setq stack '#1=(1 . #1#) *print-circle* t)
-(eql-eval 1 '(pop stack))
-(eql-eval 1 '(pop stack))
-(eql-eval 1 '(pop (cdr stack)))
-
-;; position                            - function
-(eql-test 4 #'position #\a "baobab" :from-end t)
-(eql-test 2 #'position-if #'oddp '((1) (2) (3) (4)) :start 1 :key #'car)
-(eq-test nil #'position 595 '())
-(eq-test 4 #'position-if-not #'integerp '(1 2 3 4 5.0))
-(eql-test 1 #'position (char-int #\1) "0123" :key #'char-int)
-
-;; prog                                        - macro
-(eq-eval nil '(prog () :error))
-(eq-eval 'ok
-    '(prog ((a 0))
-       l1 (if (< a 10) (go l3) (go l2))
-       (return 'failed)
-       l2 (return 'ok)
-       (return 'failed)
-       l3 (incf a) (go l1)
-       (return 'failed)
-    ))
-(setq a 1)
-(eq-eval '/= '(prog ((a 2) (b a)) (return (if (= a b) '= '/=))))
-
-;; prog*                               - macro
-(setq a 1)
-(eq-eval nil '(prog* () :error))
-(eq-eval 'ok
-    '(prog* ((a 0) (b 0))
-       l1 (if (< a 10) (go l3) (go l2))
-       (return 'failed)
-       l2 (if (< b 10) (go l4) (return 'ok))
-       (return 'failed)
-       l3 (incf a) (go l1)
-       (return 'failed)
-       l4 (incf b) (setq a 0) (go l1)
-       (return 'failed)
-    ))
-(eq-eval '= '(prog* ((a 2) (b a)) (return (if (= a b) '= '/=))))
-
-;; prog1                               - macro
-(setq temp 1)
-(eql-eval 1 '(prog1 temp (incf temp) (eql-eval 2 'temp) temp))
-(eql-eval 2 'temp)
-(eql-eval 2 '(prog1 temp (setq temp nil) (eql-eval nil 'temp) temp))
-(eq-eval nil 'temp)
-(eql-eval 1 '(prog1 (values 1 2 3) 4))
-(setq temp (list 'a 'b 'c))
-(eq-eval 'a '(prog1 (car temp) (setf (car temp) 'alpha)))
-(equal-eval '(alpha b c) 'temp)
-(equal-eval '(1)
-    '(multiple-value-list (prog1 (values 1 2) (values 4 5))))
-
-;; prog2                               - macro
-(setq temp 1)
-(eql-eval 3 '(prog2 (incf temp) (incf temp) (incf temp)))
-(eql-eval 4 'temp)
-(eql-eval 2 '(prog2 1 (values 2 3 4) 5))
-(equal-eval '(3)
-    '(multiple-value-list (prog2 (values 1 2) (values 3 4) (values 5 6))))
-
-;; progn                               - special operator
-(eq-eval nil '(progn))
-(eql-eval 3 '(progn 1 2 3))
-(equal-eval '(1 2 3) '(multiple-value-list (progn (values 1 2 3))))
-(setq a 1)
-(eq-eval 'here '(if a (progn (setq a nil) 'here) (progn (setq a t) 'there)))
-(eq-eval nil 'a)
-
-;; progv                               - special operator
-(makunbound '*x*)      ;; make sure it is not bound
-(setq *x* 1)
-(eql-eval 2 '(progv '(*x*) '(2) *x*))
-(eql-eval 1 '*x*)
-(equal-eval '(3 4)
-    '(let ((*x* 3)) (progv '(*x*) '(4) (list *x* (symbol-value '*x*)))))
-(makunbound '*x*)
-(defvar *x* 1)
-(equal-eval '(4 4)
-    '(let ((*x* 3)) (progv '(*x*) '(4) (list *x* (symbol-value '*x*)))))
-(equal-eval '(4 4)
-    '(multiple-value-list
-       (let ((*x* 3))
-            (progv '(*x*) '(4) (values-list (list *x* (symbol-value '*x*)))))))
-
-;; push                                        - macro
-(setq llst '(nil))
-(equal-eval '(1) '(push 1 (car llst)))
-(equal-eval '((1)) 'llst)
-(equal-eval '(1 1) '(push 1 (car llst)))
-(equal-eval '((1 1)) 'llst)
-(setq x '(a (b c) d))
-(equal-eval '(5 B C) '(push 5 (cadr x)))
-(equal-eval '(a (5 b c) d) 'x)
-
-;; pushnew                             - macro
-(setq x '(a (b c) d))
-(equal-eval '(5 b c) '(pushnew 5 (cadr x)))
-(equal-eval '(a (5 b c) d) 'x)
-(equal-eval '(5 b c) '(pushnew 'b (cadr x)))
-(equal-eval '(a (5 b c) d) 'x)
-(setq lst '((1) (1 2) (1 2 3)))
-(equal-eval '((2) (1) (1 2) (1 2 3)) '(pushnew '(2) lst))
-(equal-eval '((1) (2) (1) (1 2) (1 2 3)) '(pushnew '(1) lst))
-(equal-eval '((1) (2) (1) (1 2) (1 2 3)) '(pushnew '(1) lst :test 'equal))
-(equal-eval '((1) (2) (1) (1 2) (1 2 3)) '(pushnew '(1) lst :key #'car))
-
-;; remove-duplicates                   - function
-(equal-test "aBcD" #'remove-duplicates "aBcDAbCd" :test #'char-equal :from-end t)
-(equal-test '(a c b d e) #'remove-duplicates '(a b c b d d e))
-(equal-test '(a b c d e) #'remove-duplicates '(a b c b d d e) :from-end t)
-(equal-test '((bar #\%) (baz #\A))
-    #'remove-duplicates '((foo #\a) (bar #\%) (baz #\A))
-     :test #'char-equal :key #'cadr)
-(equal-test '((foo #\a) (bar #\%))
-    #'remove-duplicates '((foo #\a) (bar #\%) (baz #\A))
-     :test #'char-equal :key #'cadr :from-end t)
-(setq tester (list 0 1 2 3 4 5 6))
-(equal-test '(0 4 5 6) #'delete-duplicates tester :key #'oddp :start 1 :end 6)
-
-;; replace                             - function
-(equal-test "abcd456hij"
-    #'replace (copy-seq "abcdefghij") "0123456789" :start1 4 :end1 7 :start2 4)
-(setq lst (xseq "012345678"))
-(equal-test "010123456" #'replace lst lst :start1 2 :start2 0)
-(equal-eval "010123456" 'lst)
-
-;; rest                                        - accessor
-(equal-eval '(2) '(rest '(1 2)))
-(eql-eval 2 '(rest '(1 . 2)))
-(eq-eval nil '(rest '(1)))
-(setq *cons* '(1 . 2))
-(equal-eval "two" '(setf (rest *cons*) "two"))
-(equal-eval '(1 . "two") '*cons*)
-
-;; return                              - macro
-(eq-eval nil '(block nil (return) 1))
-(eql-eval 1 '(block nil (return 1) 2))
-(equal-eval '(1 2) '(multiple-value-list (block nil (return (values 1 2)) 3)))
-(eql-eval 1 '(block nil (block alpha (return 1) 2)))
-(eql-eval 2 '(block alpha (block nil (return 1)) 2))
-(eql-eval 1 '(block nil (block nil (return 1) 2)))
-
-;; return-from                         - special operator
-(eq-eval nil '(block alpha (return-from alpha) 1))
-(eql-eval 1 '(block alpha (return-from alpha 1) 2))
-(equal-eval '(1 2)
-    '(multiple-value-list (block alpha (return-from alpha (values 1 2)) 3)))
-(eql-eval 2
-    '(let ((a 0)) (dotimes (i 10) (incf a) (when (oddp i) (return))) a))
-(eq-eval 'temp '(defun temp (x) (if x (return-from temp ''dummy)) 44))
-(eql-eval 44 '(temp nil))
-(eq-eval 'dummy (temp t))
-(eql-eval 2 (block nil (unwind-protect (return-from nil 1) (return-from nil 2))))
-(error-eval '(funcall (block nil #'(lambda () (return-from nil)))))
-
-;; reverse                             - function
-(setq str (xseq "abc") test str)
-(equal-test "cba" #'reverse str)
-(eq-eval test 'str)
-(equal-eval "cba" '(setq test (nreverse str)))
-(equal-eval "cba" 'test)
-(setq l (list 1 2 3) test l)
-(equal-eval '(3 2 1) '(setq test (nreverse l)))
-(equal-eval '(3 2 1) 'test)
-
-;; rplac?                              - function
-(eql-eval '*some-list*
-    '(defparameter *some-list* (list* 'one 'two 'three 'four)))
-(equal-eval '(one two three . four) '*some-list*)
-(equal-test '(uno two three . four) #'rplaca *some-list* 'uno)
-(equal-eval '(uno two three . four) '*some-list*)
-(equal-test '(three iv) #'rplacd (last *some-list*) (list 'iv))
-(equal-eval '(uno two three iv) '*some-list*)
-
-;; search                              - function
-(eql-test 7 #'search "dog" "it's a dog's life")
-(eql-test 2 #'search '(0 1) '(2 4 6 1 3 5) :key #'oddp)
-(eql-test 8 #'search "foo" "foooobarfooooobarfo" :from-end t)
-(eql-test 5
-    #'search "123"
-       (mapcar #'(lambda (x) (+ x (char-code #\0)))
-       '(1 2 34 3 2 1 2 3 4 3 2 1)) :from-end t
-       :key #'(lambda (x) (if (integerp x) (code-char x) x)))
-(eql-test 0 #'search "abc" "abcd" :from-end t)
-(eql-test 3 #'search "bar" "foobar")
-
-;; set                                 - function
-(eql-eval 1 '(setf (symbol-value 'n) 1))
-(eql-test 2 #'set 'n 2)
-(eql-test 2 #'symbol-value 'n)
-(eql-eval 4
-   '(let ((n 3))
-       (setq n (+ n 1))
-       (setf (symbol-value 'n) (* n 10))
-       (set 'n (+ (symbol-value 'n) n))
-       n))
-(eql-eval 44 'n)
-(defvar *n* 2)
-(eql-eval 80
-   '(let ((*n* 3))
-       (setq *n* (+ *n* 1))
-       (setf (symbol-value '*n*) (* *n* 10))
-       (set '*n* (+ (symbol-value '*n*) *n*))
-       *n*))
-(eql-eval 2 '*n*)
-(eq-eval '*even-count* '(defvar *even-count* 0))
-(eq-eval '*odd-count* '(defvar *odd-count* 0))
-(eql-eval 'tally-list
-   '(defun tally-list (list)
-      (dolist (element list)
-       (set (if (evenp element) '*even-count* '*odd-count*)
-            (+ element (if (evenp element) *even-count* *odd-count*))))))
-(eq-eval nil '(tally-list '(1 9 4 3 2 7)))
-(eql-eval 6 '*even-count*)
-(eql-eval 20 '*odd-count*)
-
-;; set-difference                      - function
-(setq lst1 (list "A" "b" "C" "d") lst2 (list "a" "B" "C" "d"))
-(equal-test '("A" "b" "C" "d") #'set-difference lst1 lst2)
-(equal-test '("A" "b") #'set-difference lst1 lst2 :test 'equal)
-(eq-test nil #'set-difference lst1 lst2 :test #'equalp)
-(equal-test '("A" "b") #'nset-difference lst1 lst2 :test #'string=)
-(setq lst1 '(("a" . "b") ("c" . "d") ("e" . "f"))
-      lst2 '(("c" . "a") ("e" . "b") ("d" . "a")))
-(equal-test '(("c" . "d") ("e" . "f"))
-    #'nset-difference lst1 lst2 :test #'string= :key #'cdr)
-(equal-eval '(("c" . "a") ("e" . "b") ("d" . "a")) 'lst2)
-(equal-test '("banana" "lemon" "rhubarb")
-   #'set-difference
-       '("strawberry" "chocolate" "banana" "lemon" "pistachio" "rhubarb")
-       '(#\c #\w) :test #'(lambda (s c) (find c s)))
-
-;; set-exclusive-or                    - function
-(setq lst1 (list 1 "a" "b") lst2 (list 1 "A" "b"))
-(equal-test '("a" "b" "A" "b") #'set-exclusive-or lst1 lst2)
-(equal-test '("a" "A") #'set-exclusive-or lst1 lst2 :test #'equal)
-(eq-test nil #'set-exclusive-or lst1 lst2 :test 'equalp)
-(equal-test '("a" "b" "A" "b") #'nset-exclusive-or lst1 lst2)
-(setq lst1 '(("a" . "b") ("c" . "d") ("e" . "f"))
-      lst2 '(("c" . "a") ("e" . "b") ("d" . "a")))
-(equal-test '(("c" . "d") ("e" . "f") ("c" . "a") ("d" . "a"))
-    #'nset-exclusive-or lst1 lst2 :test #'string= :key #'cdr)
-
-;; setf                                        - macro
-(setq x (cons 'a 'b) y (list 1 2 3))
-(equal-eval '(1 x 3) '(setf (car x) 'x (cadr y) (car x) (cdr x) y))
-(equal-eval '(x 1 x 3) 'x)
-(equal-eval '(1 x 3) 'y)
-(setq x (cons 'a 'b) y (list 1 2 3))
-(eq-eval nil '(psetf (car x) 'x (cadr y) (car x) (cdr x) y))
-(equal-eval '(x 1 a 3) 'x)
-(equal-eval '(1 a 3) 'y)
-(error-eval '(setf x))
-(error-eval '(psetf x))
-
-;; setq                                        - special form
-(eql-eval 3 '(setq a 1 b 2 c 3))
-(eql-eval 1 'a)
-(eql-eval 2 'b)
-(eql-eval 3 'c)
-(eql-eval 7 '(setq a (1+ b) b (1+ a) c (+ a b)))
-(eql-eval 3 'a)
-(eql-eval 4 'b)
-(eql-eval 7 'c)
-(eq-eval nil '(psetq a 1 b 2 c 3))
-(eql-eval 1 'a)
-(eql-eval 2 'b)
-(eql-eval 3 'c)
-(equal-eval '(2 1)
-    '(multiple-value-list (let ((a 1) (b 2)) (psetq a b  b a) (values a b))))
-(error-eval '(setq x))
-(error-eval '(setq x 1 y))
-
-;; some                                        - function
-(eq-test t #'some #'= '(1 2 3 4 5) '(5 4 3 2 1))
-
-;; sort                                        - function
-(setq tester (copy-seq "lkjashd"))
-(equal-test "adhjkls" #'sort tester #'char-lessp)
-(setq tester (list '(1 2 3) '(4 5 6) '(7 8 9)))
-(equal-test '((7 8 9) (4 5 6) (1 2 3)) #'sort tester #'> :key #'car)
-(setq tester (list 1 2 3 4 5 6 7 8 9 0))
-(equal-test '(1 3 5 7 9 2 4 6 8 0)
-    #'stable-sort tester #'(lambda (x y) (and (oddp x) (evenp y))))
-(equalp-test
-  #((("Kathy" "Chapman") "Editorial")
-    (("Dick" "Gabriel") "Objects")
-    (("Gregor" "Kiczales") "Objects")
-    (("Sandra" "Loosemore") "Compiler")
-    (("Larry" "Masinter") "Cleanup")
-    (("David" "Moon") "Objects")
-    (("Kent" "Pitman") "Conditions")
-    (("Dick" "Waters") "Iteration")
-    (("JonL" "White") "Iteration"))
-   #'sort (setq committee-data
-           (vector (list (list "JonL" "White") "Iteration")
-                   (list (list "Dick" "Waters") "Iteration")
-                   (list (list "Dick" "Gabriel") "Objects")
-                   (list (list "Kent" "Pitman") "Conditions")
-                   (list (list "Gregor" "Kiczales") "Objects")
-                   (list (list "David" "Moon") "Objects")
-                   (list (list "Kathy" "Chapman") "Editorial")
-                   (list (list "Larry" "Masinter") "Cleanup")
-                   (list (list "Sandra" "Loosemore") "Compiler")))
-      #'string-lessp :key #'cadar)
-(equalp-eval
-  #((("Larry" "Masinter") "Cleanup")
-    (("Sandra" "Loosemore") "Compiler")
-    (("Kent" "Pitman") "Conditions")
-    (("Kathy" "Chapman") "Editorial")
-    (("Dick" "Waters") "Iteration")
-    (("JonL" "White") "Iteration")
-    (("Dick" "Gabriel") "Objects")
-    (("Gregor" "Kiczales") "Objects")
-    (("David" "Moon") "Objects"))
-    '(setq committee-data
-       (stable-sort committee-data #'string-lessp :key #'cadr)))
-(error-test #'sort #c(1 2))
-
-;; string                              - function
-(setq a "already a string")
-(eq-test a #'string a)
-(equal-test "ELM" #'string 'elm)
-(equal-test "c" #'string #\c)
-
-;; string-*                            - function
-(eq-test t #'string= "foo" "foo")
-(eq-test nil #'string= "foo" "Foo")
-(eq-test nil #'string= "foo" "bar")
-(eq-test t #'string= "together" "frog" :start1 1 :end1 3 :start2 2)
-(eq-test t #'string-equal "foo" "Foo")
-(eq-test t #'string= "abcd" "01234abcd9012" :start2 5 :end2 9)
-(eql-test 3 #'string< "aaaa" "aaab")
-(eql-test 4 #'string>= "aaaaa" "aaaa")
-(eql-test 5 #'string-not-greaterp "Abcde" "abcdE")
-(eql-test 6 #'string-lessp "012AAAA789" "01aaab6" :start1 3 :end1 7
-                                                 :start2 2 :end2 6)
-(eq-test nil #'string-not-equal "AAAA" "aaaA")
-(error-test #'string= #(1 2 3) '(1 2 3))
-(eql-test 0 #'string< "abcd" "efg")
-(eql-test 1 #'string< "abcd" "afg")
-(eql-test 0 #'string/= "foo" "baar")
-(eql-test nil #'string/= "foobar" "foobar")
-
-;; string-{upcase,downcase,capitalize} - function
-(equal-test "ABCDE" #'string-upcase "abcde")
-(equal-test "aBCDe" #'string-upcase "abcde" :start 1 :end 4)
-(equal-test "aBCDe" #'nstring-upcase (xseq "abcde") :start 1 :end 4)
-(equal-test "DR. LIVINGSTON, I PRESUME?"
-    #'string-upcase "Dr. Livingston, I presume?")
-(equal-test "Dr. LIVINGSTON, I Presume?"
-    #'string-upcase "Dr. Livingston, I presume?" :start 4 :end 19)
-(equal-test "Dr. LIVINGSTON, I Presume?"
-    #'nstring-upcase (xseq "Dr. Livingston, I presume?") :start 4 :end 19)
-(equal-test "Dr. LiVINGston, I presume?"
-    #'string-upcase "Dr. Livingston, I presume?" :start 6 :end 10)
-(equal-test "Dr. LiVINGston, I presume?"
-    #'nstring-upcase (xseq "Dr. Livingston, I presume?") :start 6 :end 10)
-(equal-test "dr. livingston, i presume?"
-    #'string-downcase "Dr. Livingston, I presume?")
-(equal-test "Dr. livingston, i Presume?"
-    #'string-downcase "Dr. Livingston, I Presume?" :start 1 :end 17)
-(equal-test "Dr. livingston, i Presume?"
-    #'nstring-downcase (xseq "Dr. Livingston, I Presume?") :start 1 :end 17)
-(equal-test "Elm 13c Arthur;Fig Don'T"
-    #'string-capitalize "elm 13c arthur;fig don't")
-(equal-test "elm 13C Arthur;Fig Don't"
-    #'string-capitalize "elm 13c arthur;fig don't" :start 6 :end 21)
-(equal-test "elm 13C Arthur;Fig Don't"
-    #'nstring-capitalize (xseq "elm 13c arthur;fig don't") :start 6 :end 21)
-(equal-test " Hello " #'string-capitalize " hello ")
-(equal-test " Hello " #'nstring-capitalize (xseq " hello "))
-(equal-test "Occluded Casements Forestall Inadvertent Defenestration"
-   #'string-capitalize "occlUDeD cASEmenTs FOreSTAll iNADVertent DEFenestraTION")
-(equal-test "Don'T!" #'string-capitalize "DON'T!")
-(equal-test "Pipe 13a, Foo16c" #'string-capitalize "pipe 13a, foo16c")
-(setq str (copy-seq "0123ABCD890a"))
-(equal-test "0123AbcD890a" #'nstring-downcase str :start 5 :end 7)
-(equal-eval "0123AbcD890a" 'str)
-(error-test #'nstring-capitalize 1)
-(error-test #'string-capitalize "foobar" :start 4 :end 2)
-(equal-test "foobar" #'string-capitalize "foobar" :start 0 :end 0)
-
-;; string-{,left-,right-}trim          - function
-(equal-test "kaaak" #'string-trim "abc" "abcaakaaakabcaaa")
-#+xedit (equal-test "kaaak" #'nstring-trim "abc" "abcaakaaakabcaaa")
-(equal-test "garbanzo beans"
-    #'string-trim '(#\Space #\Tab #\Newline) " garbanzo beans
-        ")
-#+xedit (equal-test "garbanzo beans"
-    #'nstring-trim '(#\Space #\Tab #\Newline) " garbanzo beans
-        ")
-(equal-test "three (silly) words"
-    #'string-trim " (*)" " ( *three (silly) words* ) ")
-#+xedit (equal-test "three (silly) words"
-    #'nstring-trim " (*)" " ( *three (silly) words* ) ")
-(equal-test "labcabcabc" #'string-left-trim "abc" "labcabcabc")
-#+xedit (equal-test "labcabcabc" #'nstring-left-trim "abc" "labcabcabc")
-(equal-test "three (silly) words* ) "
-    #'string-left-trim " (*)" " ( *three (silly) words* ) ")
-#+xedit (equal-test "three (silly) words* ) "
-    #'nstring-left-trim " (*)" " ( *three (silly) words* ) ")
-(equal-test " ( *three (silly) words"
-    #'string-right-trim " (*)" " ( *three (silly) words* ) ")
-#+xedit (equal-test " ( *three (silly) words"
-    #'nstring-right-trim " (*)" " ( *three (silly) words* ) ")
-(error-test #'string-trim 123 "123")
-(error-test #'string-left-trim 123 "123")
-
-;; stringp                             - function (predicate)
-(eq-test t #'stringp "abc")
-(eq-test nil #'stringp #\a)
-(eq-test nil #'stringp 1)
-(eq-test nil #'stringp #(#\a #\b #\c))
-
-;; subseq                              - accessor
-(setq str (xseq "012345"))
-(equal-test "2345" #'subseq str 2)
-(equal-test "34" #'subseq str 3 5)
-(equal-eval "abc" '(setf (subseq str 4) "abc"))
-(equal-eval "0123ab" 'str)
-(equal-eval "A" '(setf (subseq str 0 2) "A"))
-(equal-eval "A123ab" 'str)
-
-;; subsetp                             - function
-(setq cosmos '(1 "a" (1 2)))
-(eq-test t #'subsetp '(1) cosmos)
-(eq-test nil #'subsetp '((1 2)) cosmos)
-(eq-test t #'subsetp '((1 2)) cosmos :test 'equal)
-(eq-test t #'subsetp '(1 "A") cosmos :test #'equalp)
-(eq-test nil #'subsetp '((1) (2)) '((1) (2)))
-(eq-test t #'subsetp '((1) (2)) '((1) (2)) :key #'car)
-
-;; svref                               - function
-;; XXX vectors will be reimplemented, just a test for the current implementation
-(setq v (vector 1 2 'sirens))
-(eql-eval 1 '(svref v 0))
-(eql-eval 'sirens '(svref v 2))
-(eql-eval 'newcomer '(setf (svref v 1) 'newcomer))
-(equalp-eval #(1 newcomer sirens) 'v)
-
-;; symbol-name                         - function
-(equal-test "TEMP" #'symbol-name 'temp)
-(equal-test "START" #'symbol-name :start)
-(error-test #'symbol-name 1)
-
-;; symbol-package                      - function
-(eq-test (find-package "LISP") #'symbol-package 'car)
-(eql-test *package* #'symbol-package 'bus)
-(eq-test (find-package "KEYWORD") #'symbol-package :optional)
-;; Gensyms are uninterned, so have no home package.
-(eq-test nil #'symbol-package (gensym))
-(setq pk1 (make-package 'pk1))
-(intern "SAMPLE1" "PK1")
-(eq-eval t '(export (find-symbol "SAMPLE1" "PK1") "PK1"))
-(setq pk2 (make-package 'pk2 :use '(pk1)))
-(equal-eval '(pk1:sample1 :inherited)
-    '(multiple-value-list (find-symbol "SAMPLE1" "PK2")))
-(eq-test pk1 #'symbol-package 'pk1::sample1)
-(eq-test pk1 #'symbol-package 'pk2::sample1)
-(eq-test pk1 #'symbol-package 'pk1::sample2)
-(eq-test pk2 #'symbol-package 'pk2::sample2)
-;; The next several forms create a scenario in which a symbol
-;; is not really uninterned, but is "apparently uninterned",
-;; and so SYMBOL-PACKAGE still returns NIL.
-(setq s3 'pk1::sample3)
-(eq-eval t '(import s3 'pk2))
-(eq-eval t '(unintern s3 'pk1))                ;; XXX unintern not yet implemented
-(eq-test nil #'symbol-package s3)      ;; fail due to unintern not implemented
-(eq-test t #'eq s3 'pk2::sample3)
-
-;; symbol-plist                                - accessor
-(setq sym (gensym))
-(eq-eval () '(symbol-plist sym))
-(eq-eval 'val1 '(setf (get sym 'prop1) 'val1))
-(equal-eval '(prop1 val1) '(symbol-plist sym))
-(eq-eval 'val2 '(setf (get sym 'prop2) 'val2))
-(equal-eval '(prop2 val2 prop1 val1) '(symbol-plist sym))
-(setq sym-plist (list 'prop3 'val3))
-(eq-eval sym-plist '(setf (symbol-plist sym) sym-plist))
-(eq-eval sym-plist '(symbol-plist sym))
-
-;; symbol-value                                - accessor
-(eql-eval 1 '(setf (symbol-value 'a) 1))
-(eql-eval 1 '(symbol-value 'a))
-;; SYMBOL-VALUE cannot see lexical variables.
-(eql-eval 1 '(let ((a 2)) (symbol-value 'a)))
-(eql-eval 1 '(let ((a 2)) (setq a 3) (symbol-value 'a)))
-
-#+xedit        ;; incorrect...
-(progn
-    ;; SYMBOL-VALUE can see dynamic variables.
-           ;; declare not yet implemented
-           (proclaim '(special a))
-    (eql-eval 2 '(let ((a 2)) (symbol-value 'a)))
-    (eql-eval 1 'a)
-    (eql-eval 3 '(let ((a 2)) (setq a 3) (symbol-value 'a)))
-    (eql-eval 1 'a)
-           ;; declare not yet implement
-           (makunbound 'a)
-    (eql-eval 2 '(let ((a 2)) (setf (symbol-value 'a) 3) a))
-    (eql-eval 3 'a)
-    (eql-eval 3 '(symbol-value 'a))
-           ;; declare not yet implement
-           (makunbound 'a)
-    (equal-eval '(5 4)
-       '(multiple-value-list
-           (let ((a 4))
-
-                       ;; declare not yet implemented
-                       (defparameter a 3)
-
-             (let ((b (symbol-value 'a)))
-               (setf (symbol-value 'a) 5)
-               (values a b)))))
-    (eql-eval 3 'a)
-)
-(eq-eval :any-keyword '(symbol-value :any-keyword))
-;; XXX these will fail
-(eq-eval nil '(symbol-value 'nil))
-(eq-eval nil '(symbol-value '()))
-
-;; symbolp                             - function (predicate)
-(eq-test t #'symbolp 'elephant)
-(eq-test nil #'symbolp 12)
-;; XXX these will fail
-(eq-test t #'symbolp nil)
-(eq-test t #'symbolp '())
-(eq-test t #'symbolp :test)
-(eq-test nil #'symbolp "hello")
-
-;; remprop                             - function
-(setq test (make-symbol "PSEUDO-PI"))
-(eq-eval () '(symbol-plist test))
-(eq-eval t '(setf (get test 'constant) t))
-(eql-eval 3.14 '(setf (get test 'approximation) 3.14))
-(eql-eval 'noticeable '(setf (get test 'error-range) 'noticeable))
-(equal-eval '(error-range noticeable approximation 3.14 constant t)
-    '(symbol-plist test))
-(eq-eval nil '(setf (get test 'approximation) nil))
-(equal-eval '(error-range noticeable approximation nil constant t)
-    '(symbol-plist test))
-(eq-eval nil (get test 'approximation))
-(eq-test t #'remprop test 'approximation)
-(eq-eval nil '(get test 'approximation))
-(equal-eval '(error-range noticeable constant t) '(symbol-plist test))
-(eq-test nil #'remprop test 'approximation)
-(equal-eval '(error-range noticeable constant t) '(symbol-plist test))
-(eq-test t #'remprop test 'error-range)
-(eql-eval 3 '(setf (get test 'approximation) 3))
-(equal-eval '(approximation 3 constant t) '(symbol-plist test))
-
-;; throw                               - special operator
-(equal-eval '(3 9)
-    '(multiple-value-list
-       (catch 'result
-           (setq i 0 j 0)
-           (loop (incf j 3) (incf i)
-                 (if (= i 3) (throw 'result (values i j)))))))
-(eql-eval 2 '(catch nil (unwind-protect (throw nil 1) (throw nil 2))))
-
-;; XXX undefined consequences
-(eql-eval 2
-   '(catch 'a
-      (catch 'b
-       (unwind-protect (throw 'a 1)
-         (throw 'b 2)))))
-(eq-eval :outer-catch
-   '(catch 'foo
-       (setq string (format nil "The inner catch returns ~s."
-           (catch 'foo
-               (unwind-protect (throw 'foo :first-throw)
-                   (throw 'foo :second-throw)))))
-         :outer-catch))
-(equal-eval "The inner catch returns :SECOND-THROW." 'string)
-
-;; tree-equal                          - function
-(setq tree1 '(1 (1 2))
-      tree2 '(1 (1 2)))
-(eq-test t #'tree-equal tree1 tree2)
-(eq-test nil #'eql tree1 tree2)
-(setq tree1 '('a ('b 'c))
-      tree2 '('a ('b 'c)))
-(eq-test t #'tree-equal tree1 tree2 :test 'eq)
-(eq-test t #'tree-equal 1 1)
-(eq-test nil #'tree-equal (list 1 2) (cons 1 2))
-(eq-test nil #'tree-equal 1 2)
-
-;; union                               - function
-(equal-test '(b c f a d) #'union '(a b c) '(f a d))
-(equal-test '((y 6) (z 2) (x 4))
-    #'union '((x 5) (y 6)) '((z 2) (x 4)) :key #'car)
-(setq lst1 (list 1 2 '(1 2) "a" "b")
-      lst2 (list 2 3 '(2 3) "B" "C"))
-(equal-test '(1 (1 2) "a" "b" 2 3 (2 3) "B" "C") #'nunion lst1 lst2)
-
-;; unless                              - macro
-(eq-eval 'hello '(when t 'hello))
-(eq-eval nil '(unless t 'hello))
-(eq-eval nil (when nil 'hello))
-(eq-eval 'hello '(unless nil 'hello))
-(eq-eval nil (when t))
-(eql-eval nil '(unless nil))
-(setq test nil)
-(equal-eval '(3 2 1) '(when t (push 1 test) (push 2 test) (push 3 test)))
-(equal-eval '(3 2 1) 'test)
-(setq test nil)
-(eq-eval nil '(unless t (push 1 test) (push 2 test) (push 3 test)))
-(eq-eval nil 'test)
-(eq-eval nil '(when nil (push 1 test) (push 2 test) (push 3 test)))
-(eq-eval nil 'test)
-(equal-eval '(3 2 1) '(unless nil (push 1 test) (push 2 test) (push 3 test)))
-(equal-eval '(3 2 1) 'test)
-(equal-eval '((4) nil (5) nil 6 (6) 7 (7))
-   '(let ((x 3))
-      (list (when (oddp x) (incf x) (list x))
-           (when (oddp x) (incf x) (list x))
-           (unless (oddp x) (incf x) (list x))
-           (unless (oddp x) (incf x) (list x))
-           (if (oddp x) (incf x) (list x))
-           (if (oddp x) (incf x) (list x))
-           (if (not (oddp x)) (incf x) (list x))
-           (if (not (oddp x)) (incf x) (list x)))))
-
-;; unwind-protect                      - special operator
-(defun dummy-function (x)
-   (setq state 'running)
-   (unless (numberp x) (throw 'abort 'not-a-number))
-   (setq state (1+ x)))
-(eql-eval 2 '(catch 'abort (dummy-function 1)))
-(eql-eval 2 'state)
-(eq-eval 'not-a-number '(catch 'abort (dummy-function 'trash)))
-(eq-eval 'running 'state)
-(eq-eval 'not-a-number
-    '(catch 'abort (unwind-protect (dummy-function 'trash)
-                  (setq state 'aborted))))
-(eq-eval 'aborted 'state)
-(eql-eval 2 '(block nil (unwind-protect (return 1) (return 2))))
-;; XXX undefined consequences
-(eql-eval 2
-   '(block a
-       (block b
-           (unwind-protect (return-from a 1)
-                           (return-from b 2)))))
-(eql-eval 2 '(catch nil (unwind-protect (throw nil 1) (throw nil 2))))
-;; XXX undefined consequences
-(eql-eval 2
-   '(catch 'a (catch 'b (unwind-protect (throw 'a 1) (throw 'b 2)))))
-(eq-eval ':outer-catch
-   '(catch 'foo
-       (setq string
-           (format nil "The inner catch returns ~s."
-               (catch 'foo
-                   (unwind-protect (throw 'foo :first-throw)
-                   (throw 'foo :second-throw)))))
-         :outer-catch))
-(equal-eval "The inner catch returns :SECOND-THROW." 'string)
-(eql-eval 10
-   '(catch 'a
-       (catch 'b
-           (unwind-protect (1+ (catch 'a (throw 'b 1)))
-               (throw 'a 10)))))
-;; XXX undefined consequences
-(eql-eval 4
-   '(catch 'foo
-       (catch 'bar
-          (unwind-protect (throw 'foo 3)
-            (throw 'bar 4)
-            (print 'xxx)))))
-(eql-eval 4
-   '(catch 'bar
-       (catch 'foo
-          (unwind-protect (throw 'foo 3)
-            (throw 'bar 4)
-            (print 'xxx)))))
-(eql-eval 5
-   '(block nil
-       (let ((x 5))
-        (unwind-protect (return)
-          (return x)))))
-
-;; upper-case-p                                - function
-(eq-test t #'upper-case-p #\A)
-(eq-test nil #'upper-case-p #\a)
-(eq-test nil #'upper-case-p #\5)
-(error-test #'upper-case-p 1)
-
-;; values                              - accessor
-(eq-eval () '(multiple-value-list (values)))
-(equal-eval '(1) '(multiple-value-list (values 1)))
-(equal-eval '(1 2) '(multiple-value-list (values 1 2)))
-(equal-eval '(1 2 3) '(multiple-value-list (values 1 2 3)))
-(equal-eval '(1 4 5) '(multiple-value-list (values (values 1 2 3) 4 5)))
-
-;; values-list                         - function
-(eq-eval nil '(multiple-value-list (values-list nil)))
-(equal-eval '(1) '(multiple-value-list (values-list '(1))))
-(equal-eval '(1 2) '(multiple-value-list (values-list '(1 2))))
-(equal-eval '(1 2 3) '(multiple-value-list (values-list '(1 2 3))))
diff --git a/xedit/lisp/test/math.lsp b/xedit/lisp/test/math.lsp
deleted file mode 100644 (file)
index dd0f8ce..0000000
+++ /dev/null
@@ -1,982 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/test/math.lsp,v 1.4 2002/11/30 23:13:14 paulo Exp $
-;;
-
-;; basic math tests
-;; This is far from a good regression test, but in the current stage of
-;; the interpreter, this is good enough to make sure it is not "so"
-;; broken. But note that this does not test all cases where there is
-;; change in the type of a numeric object.
-
-(setq *default-float-format* 'double-float)
-
-;; floating point results may differ from implementation to implementation (?!)
-
-(defun test (expect function &rest arguments &aux result (error t))
-    (ignore-errors
-       (setq result (apply function arguments))
-       (setq error nil)
-    )
-    (if error
-       (format t "ERROR: (~A~{ ~A~})~%" function arguments)
-       ;; Use eql to make sure result and expect have the same type
-       (or (eql result expect)
-#-xedit        ;; hack...
-           (or
-               (and
-                   (floatp result)
-                   (floatp expect)
-                   (< (abs (- (abs result) (abs expect)))
-                       0.00000000000001d0)
-               )
-               (format t "(~A~{ ~A~}) => should be ~A not ~A~%"
-                   function arguments expect result
-               )
-           )
-#+xedit     (format t "(~A~{ ~A~}) => should be ~A not ~A~%"
-               function arguments expect result
-           )
-       )
-    )
-)
-
-(defun div-test (quotient remainder function &rest arguments
-                &aux quo rem  (error t))
-    (ignore-errors
-       (multiple-value-setq (quo rem) (apply function arguments))
-       (setq error nil)
-    )
-    (if error
-       (format t "ERROR: (~A~{ ~A~})~%" function arguments)
-       (or (and (eql quotient quo) (eql remainder rem))
-#-xedit        ;; hack
-           (or
-               (or
-                   (eql quotient quo)
-                   (and
-                       (floatp quotient)
-                       (floatp quo)
-                       (< (abs (- (abs quotient) (abs quo)))
-                           0.00000000000001d0)
-                   )
-               )
-               (or
-                   (eql remainder rem)
-                   (and
-                       (floatp remainder)
-                       (floatp rem)
-                       (< (abs (- (abs remainder) (abs rem)))
-                           0.00000000000001d0)
-                   )
-               )
-               (format t "(~A~{ ~A~}) => should be ~A; ~A not ~A; ~A~%"
-                   function arguments quotient remainder quo rem
-               )
-           )
-#+xedit            (format t "(~A~{ ~A~}) => should be ~A; ~A not ~A; ~A~%"
-               function arguments quotient remainder quo rem
-           )
-       )
-    )
-)
-
-(defun bool-test (expect function &rest arguments &aux result (error t))
-    (ignore-errors
-       (setq result (apply function arguments))
-       (setq error nil)
-    )
-    (if error
-       (format t "ERROR: (~A~{ ~A~})~%" function arguments)
-       (or (eq result expect)
-           (format t "(~A~{ ~A~}) => should be ~A not ~A~%"
-               function arguments expect result
-           )
-       )
-    )
-)
-
-(defun error-test (function &rest arguments &aux result (error t))
-  (ignore-errors
-    (setq result (apply function arguments))
-    (setq error nil))
-  (unless error
-    (format t "ERROR: no error for (~A~{ ~A}), result was ~A~%"
-      function arguments result)))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixnum fixnum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 0 #'+)
-(test 5 #'+ 5)
-(test -2 #'+ -2)
-(test 3 #'+ 2 1)
-(test 134217728 #'+ 134217727 1)
-(test -134217729 #'+ -134217728 -1)
-(test 2147483648 #'+ 2147483647 1)
-(test -2147483649 #'+ -2147483648 -1)
-(test -5 #'- 5)
-(test 6 #'- -6)
-(test 1 #'- 2 1)
-(test 134217728 #'- 134217727 -1)
-(test -2147483649 #'- -2147483648 1)
-(test 4294967295 #'- 2147483647 -2147483648)
-(test 1 #'*)
-(test 4 #'* 4)
-(test -5 #'* -5)
-(test 6 #'* 2 3)
-(test 2147483648 #'* 65536 32768)
-(test 2147418112 #'* 65536 32767)
-(test 134217728 #'* 65536 2048)
-(test -134217728 #'* 65536 -2048)
-(test 1/3 #'/ 3)
-(test -1/4 #'/ -4)
-(test 1/3 #'/ 10 30)
-(test -1/2 #'/ -5 10)
-(test -4 #'/ 20 -5)
-(test 431432412345/32 #'/ 431432412345 32)
-(test -2147483647/2147483648 #'/ 2147483647 -2147483648)
-(test -1 #'/ 2147483648 -2147483648)
-(test 2147483648 #'/ -2147483648 -1)
-(test -1/2147483648 #'/ 1 -2147483648)
-(test 1 #'min 2 3 4 1 5)
-(test 7 #'max 0 -2 7 6 3)
-(test -2147483648 #'min -2147483648 2147483647)
-(test 2147483647 #'max -2147483648 2147483647)
-(bool-test t #'< 1 2)
-(bool-test nil #'< 2 2)
-(bool-test nil #'< 4 3)
-(bool-test t #'< -2147483648 -1)
-(bool-test t #'< -2147483648 2147483648)
-(bool-test t #'<= 3 3)
-(bool-test nil #'<= 3 2)
-(bool-test t #'<= 3 7)
-(bool-test t #'<= -2147483648 2147483648)
-(bool-test t #'= 1 1)
-(bool-test nil #'= 1 -1)
-(bool-test t #'= -2147483648 -2147483648)
-(bool-test t #'>= 4 3)
-(bool-test t #'>= 5 5)
-(bool-test nil #'>= 4 9)
-(bool-test t #'>= 2147483647 -2147483648)
-(bool-test t #'> 7 5)
-(bool-test nil #'> 20 20)
-(bool-test nil #'> 19 31)
-(bool-test nil #'> 2147483647 2147483648)
-(bool-test nil #'> -2147483648 2147483647)
-(bool-test nil #'/= 2147483647 2147483647)
-(bool-test t #'/= 2147483647 -2147483648)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixnum bignum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 4123412341238575768576858308380 #'+
-       431412 4123412341238575768576857876968)
-(test -653653534554686349560628211 #'-
-       4231423 653653534554686349564859634)
-(test 17952112630025927929 #'* 4342423 4134123421423)
-(test 412341/766687896595678 #'/ 412341 766687896595678)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixnum flonum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 566594.4123d0 #'+ 43141 523453.4123d0)
-(test -2.106249523586876d9 #'+ -2147483647 41234123.413124d0)
-(test -6530250.653d0 #'- 4314 6534564.653d0)
-(test -358687.653d0 #'- -324123 34564.653d0)
-(test 3.26338916904d67 #'* 431234 756756d56)
-(test 5.731169192902366d-50 #'/ 3 5234534d43)
-(bool-test t #'< 423421 646454d0)
-(bool-test t #'= 43242113 43242113d0)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixnum fixratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 38654705646/17 #'+ 2147483647 2147483647/17)
-(test -2146748499/17 #'+ 43244 -2147483647/17)
-(test 17633127/4232 #'- 4321 653345/4232)
-(test 28227714415090/4323 #'* 4312442 6545645/4323)
-(test 639030/1441 #'* 42 15215/1441)
-(test 924444112/547 #'/ 3432342 1641/808)
-(bool-test t #'> 41342 42423/32)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixnum bigratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 134681902103055335/31231131234 #'+ 4312423 53453535353/31231131234)
-(test 134681795195984629/31231131234 #'- 4312423 53453535353/31231131234)
-(test 230514255287590319/31231131234 #'* 4312423 53453535353/31231131234)
-(test 134681848649519982/53453535353 #'/ 4312423 53453535353/31231131234)
-(bool-test t #'> 4312423 53453535353/31231131234)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bignum fixnum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 4123412341234124068 #'+ 4123412341234123412 656)
-(test 2147483647 #'+ 2147483648 -1)
-(test 2147483648 #'- 2147483647 -1)
-(test 3245393337480 #'* 4242344232 765)
-(test 1414114744/255 #'/ 4242344232 765)
-(bool-test nil #'< 2147483648 1)
-(bool-test t #'> 2147483648 -2147483648)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bignum flonum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 5.452523543454353d15 #'+ 5452523543454353 423d-6)
-(test -3.41423d205 #'- 54235423452345424443423 341423d200)
-(test 2.7061221650759596d89 #'* 413423412341231232 6.545643242d71)
-(test 9.744908405310087d-29 #'/ 41341234214 4242342d32)
-(bool-test t #'< 4314123412312341234123 4234242d46)
-(bool-test nil #'> 42342342142142421412341242 423423.432423d51)
-(bool-test t #'= 100000000000000000000 1d20)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bignum fixratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 3027180466416641662/7 #'+ 432454352345234523 1/7)
-(test 4294967295/2 #'- 2147483648 1/2)
-(test 14113747078041141/152263 #'* 42341241234123423 1/456789)
-(test 475355357536664/19 #'* 43214123412424 11/19)
-(test 143960192608 #'/ 4234123312 1/34)
-(test 15032385536/5 #'/ 2147483648 5/7)
-(bool-test nil #'< 4123412341234123 423424/23)
-(bool-test nil #'= 2147483648 1/3)
-(bool-test t #'> 2147483648 1/3)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bignum bigratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test -493153721444554600746963362777609/11404707804137
-       #'+ -43241241241241234234 18178448448449/11404707804137)
-(test 22573725350444837506376255369215081106984960/431241324242143434377
-       #'- 52345923457394857234895 455/431241324242143434377)
-(test 355905909219316970540364021939287762325439304380984344811607132990/14374707710807
-       #'* 45523452345234790345923405723902389345782390 23454234524234523623623/43124123132421)
-(test -853356237922877963618542794532291751029677352/21566206170617061706171
-       #'/ 4131234123412342 -43132412341234123412342/413124123412312234123412312312)
-(bool-test nil #'< 9482384762389461234892 463124869123897/43124123456678)
-(bool-test t #'/= 4689123469123846123843 4123894623894612/211)
-(bool-test t #'> 90437849234701234891203 4234123423/37)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; flonum fixnum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 4.3291328479d86 #'+ 43291328479d76 431243)
-(test 4.123123123432d58 #'- 4123123123432d46 2147483647)
-(test 4.1974800714094d109 #'* 970874791d96 43234)
-(test -1.0004838618250252d55 #'/ -432423.432d56 4322143)
-(bool-test nil #'< 4324932.342d5 4321421)
-(bool-test t #'> 2147483648d0 2147483647)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; flonum bignum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 4.3124325345d62 #'+ 4312432.5345d56 431241234901234791023479023)
-(test 4.123123443242d39 #'- 41231234.43242d32 -10947390284720389)
-(test 9.81681448753991d48 #'* 42342.89d27 231840917980324712)
-(test 6.837110051466236d49 #'/ -64832d57 -948236894126)
-(bool-test nil #'< 7589079203d56 43214124124312)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; flonum flonum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 4.12685643412d7 #'+ 34442.3412d0 41234122d0)
-(test -4.23432d84 #'- -45523453d56 423432d79)
-(test 2.0000000000000004d0 #'* 1.4142135623730951d0 1.4142135623730951d0)
-(test -1.414213562373095d0 #'/ -2d0 1.4142135623730951d0)
-(test 0.7071067811865476d0 #'/ 1.4142135623730951d0 2d0)
-(bool-test nil #'< 43124123d56 4231412d43)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; flonum fixratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 3.41412d61 #'+ 341412d56 3/652)
-(test 4.312443d72 #'- 43124.43d68 42421/5678)
-(test -4.32112300201218d73 #'* 4321123d67 -2147483648/2147483647)
-(test 3.388443859138533d58 #'/ 432412d54 13744/1077)
-(bool-test t #'> 423194237d43 4231412/23)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; flonum bigratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 4.378904431d62 #'+ 4378904.431d56 49230471923047129/32412341234126)
-(test 0d0 #'- 1.7320508075688772d0 3900231685776981/2251799813685248)
-(test 5.000000000000001d0 #'* 2.23606797749979d0 629397181890197/281474976710656)
-(test 7.000000000000001d0 #'/ 2.6457513110645907d0 1125899906842624/2978851154656373)
-(bool-test nil #'< 790412390412d45 1005712007432/10518078881)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixratio fixnum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 23502480199/57 #'+ 1/57 412324214)
-(test -1608505/39 #'- 11/39 41244) 
-(test 241844976595/3121 #'* 45245/3121 5345231)
-(test 4231/30211050 #'/ 4231/67890 445)
-(bool-test nil #'< 43123/12 -3432)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixratio bignum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 290071443963580821646/4115 #'+ -14119/4115 70491237901234711)
-(test 92654360215843653827434431256/1237 #'- 423412/1237 -74902473901247901234789012)
-(test 139081825032265225396/111 #'* 13/777 74890213478912044444)
-(test -22/19000187487170108051697772680759 #'/ -176/31 4903274190237447239147812304712)
-(bool-test t #'< 7094123/312 423412429047)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixratio flonum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 3756.777956289953d0 #'+ 41290/11 3.141592653589793d0)
-(test 3750.494770982774d0 #'- 41290/11 3.141592653589793d0)
-(test 11792.396424247505d0 #'* 41290/11 3.141592653589793d0)
-(test 1194.8195636844289d0 #'/ 41290/11 3.141592653589793d0)
-(bool-test nil #'< 41290/11 3.141592653589793d0)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixratio fixratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test -2/2147483647 #'+ 2147483646/2147483647 -2147483648/2147483647)
-(test 4611686015206162432/2305843005992468481 #'+ 2147483648/2147483646 2147483648/2147483647)
-(test 114/91 #'+ 5/7 7/13)
-(test 2 #'- 2147483646/2147483647 -2147483648/2147483647)
-(test -6442450939/4611686009837453315 #'- 2147483646/2147483647 2147483647/2147483645)
-(test 214/231 #'- 5/7 -7/33)
-(test 183092240452/408559 #'* '432421/3217 423412/127)
-(test 1057751/7345 #'* 34121/65 31/113)
-(test -93866791/102381559 #'/ 143747/107 -956837/653)
-(test 117/517 #'/ 13/33 47/27)
-(bool-test nil #'< 5/3 7/9)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; fixratio bigratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 1211321073398067249731082729214954013/1099249926163926018396018404101914
-       #'+ 23141/21 572903572390457239/52345234579234572304572304957234)
-(test -1210401943424090457832980748892408320175/1099249926163926018396018404101914
-       #'+ -23123441/21 572903572390457239/52345234579234572304572304957234)
-(test -130565585970579643613431728982140/1297324236427391
-       #'- 6/83 1573079349043128237436315709694/15630412487077)
-(test 119377824848653/98027 #'* 4123/61 28954117111/1607)
-(test -533081148/1126543487854337661125 #'/ 4132412/125 -9012347902834701289/129)
-(bool-test nil #'< 4132412/125 -9012347902834701289/129)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bigratio fixnum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 48668779872364438/8438103123 #'+ 49032749012471920/8438103123 -43134)
-(test 49396718152579402/8438103123 #'- 49032749012471920/8438103123 -43134)
-(test -704992865301321265760/2812701041 #'* 49032749012471920/8438103123 -43134)
-(test -24516374506235960/181984570053741 #'/ 49032749012471920/8438103123 -43134)
-(bool-test t #'> 49032749012471920/8438103123 -43134)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bigratio bignum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 22765322736543569109219273030163417097453878379283263605274270/46382946123894712341
-       #'+ 4692318468912374612389461278/46382946123894712341 490812348912346238794612389461238961238912)
-(test -22765322736543569109219273030163417097453878379283263605274270/46382946123894712341
-       #'- -4692318468912374612389461278/46382946123894712341 490812348912346238794612389461238961238912)
-(test -2303047849571666696101160700266058250647016644840659232609643130849536/46382946123894712341
-       #'* 4692318468912374612389461278/46382946123894712341 -490812348912346238794612389461238961238912)
-(test 2346159234456187306194730639/11382661368271784554609636515081706202567704733454325607906496
-       #'/ -4692318468912374612389461278/46382946123894712341 -490812348912346238794612389461238961238912)
-(bool-test t #'< 4692318468912374612389461278/46382946123894712341 490812348912346238794612389461238961238912)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bigratio flonum
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 63.2771680782255d0 #'+ 31.63858403911275d0 4452734852783697/140737488355328)
-(test 0d0 #'+ -31.63858403911275d0 4452734852783697/140737488355328)
-(test -1001.0000000000001d0 #'* -31.63858403911275d0 4452734852783697/140737488355328)
-(test 1d0 #'/ -31.63858403911275d0 -4452734852783697/140737488355328)
-(bool-test nil #'< -31.63858403911275d0 -4452734852783697/140737488355328)
-(bool-test nil #'> -31.63858403911275d0 -4452734852783697/140737488355328)
-(bool-test nil #'/= -31.63858403911275d0 -4452734852783697/140737488355328)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bigratio fixratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 0 #'+ 2147483648/2147483647 -2147483648/2147483647)
-(test 3230093924913437/413416372043776 #'+ 45705840067699/8796093022208 123/47)
-(test 4294967296/2147483647 #'- 2147483648/2147483647 -2147483648/2147483647)
-(test 1066255041450269/413416372043776 #'- 45705840067699/8796093022208 123/47)
-(test -5621818328326977/413416372043776 #'* -45705840067699/8796093022208 123/47)
-(test -2148174483181853/1081919441731584 #'/ 45705840067699/8796093022208 -123/47)
-(bool-test t #'> 45705840067699/8796093022208 123/47)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; bigratio bigratio
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 2679495973598190955776211861634126560767052764822779809414184089582/140710542183009389719255843429922029722593
-       #'+ 649812364891236481923461238946128/34124123 -7489023423142/4123491823746192384761238946123891)
-(test 2679495973598190955776211861634126560767052765333892522296541398514/140710542183009389719255843429922029722593
-       #'- 649812364891236481923461238946128/34124123 -7489023423142/4123491823746192384761238946123891)
-(test -4866460021317766216371472892133283923086494176/140710542183009389719255843429922029722593
-       #'* 649812364891236481923461238946128/34124123 -7489023423142/4123491823746192384761238946123891)
-(test -1339747986799095477888105930817063280383526382539168082927681372024/127778178220589327233
-       #'/ 649812364891236481923461238946128/34124123 -7489023423142/4123491823746192384761238946123891)
-(bool-test t #'> 649812364891236481923461238946128/34124123 -7489023423142/4123491823746192384761238946123891)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; complex real
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test #c(2147483648 -1) #'+ #c(1 -1) 2147483647)
-(test #c(2.147483648d9 -1) #'+ #c(2147483647 -1) 1d0)
-(test #c(129642370237029633787/3 0.25d0) #'- #c(-11/3 0.25d0) -43214123412343211266)
-(test #c(23470/21 4.333333333333334d0) #'* #c(2347/7 1.3d0) 10/3)
-(test #c(134217728/11 67108864/11) #'* #c(65536 32768) 2048/11)
-(test #c(1.3133333333333332d0 82304) #'/ #c(1.97d0 123456) 3/2)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; real complex
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test #c(80/7 7/13) #'+ 3/7 #c(11 7/13))
-(test #c(1.2345d47 -1) #'+ 12345d43 #c(-2147483648 -1))
-(test #c(-2147483649 2147483647) #'+ -2147483648 #c(-1 2147483647))
-(test #c(41/15 1.23456d68) #'- #c(7/5 1234.56d65) -4/3)
-(test #c(-41/19 2147483648) #'* #c(41/19 -2147483648) -1)
-(test #c(-88046829568/40802189293 2.147483649d41) #'* #c(41/19 -2147483648d32) -2147483648/2147483647)
-(test #c(-5.0691244239631335d0 1.3911008563333336d16)
-       #'/ #c(-11/7 4312412654633334) 0.31d0)
-(bool-test t #'= #c(1 0.0) 1)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; complex complex
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test #c(-16.0d0 -4.0d0) #'+ #c(-16.0d0 -4.0d0))
-(test #c(0d0 1d0) #'- #c(0d0 -1d0))
-(test #c(1d0 3d0) #'- #c(-1d0 -3d0))
-(test #c(-16.0d0 -4.0d0) #'* #c(-16.0d0 -4.0d0))
-(test #c(-0.058823529411764705d0 0.014705882352941176d0) #'/ #c(-16d0 -4d0))
-(test #c(1.94d0 301868863889/7) #'+ #c(3/5 5/7) #c(1.34d0 43124123412))
-(test #c(8641975242/7 -3.4596d0) #'- #c(1234567890 0.0004d0) #c(-12/7 3.46d0))
-(test #c(2944.315858312371d0 5.59002d13) #'* #c(-11/7 -1234d9) #c(-45.3d0 5/2147483647))
-(test #c(1.9635384272224412d-8 -0.33333333317811176d0)
-       #'/ #c(2147483647/3 -0.5d0) #c(128 2147483648.0d0))
-(test #c(8.154945137073864d11 2.621232365490813d12)
-       #'/ #c(-1.3d0 4312412654633) #c(3/2 7/15))
-(test #c(0.003674737027278924d0 -257.6948748113586d0)
-       #'/ #c(1.5d0 -432412) #c(1678 -567/31313))
-(bool-test t #'= #c(1 2d0) #c(1 2))
-(bool-test nil #'/= #c(1 2) #c(1d0 2d0))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; abs
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 2147483648 #'abs -2147483648)
-(test 2147483647 #'abs -2147483647)
-(test 2147483647 #'abs 2147483647)
-(test 1 #'abs 1)
-(test 5/7 #'abs -5/7)
-(test 2147483648/2147483647 #'abs -2147483648/2147483647)
-(test 3.12d0 #'abs -3.12d0)
-(test 4312412341234124124123412 #'abs 4312412341234124124123412)
-(test 4312412341234124124123412 #'abs -4312412341234124124123412)
-(test 1.0 #'abs #c(1 0.0))
-(test 11.40175425099138d0 #'abs #c(-11 3d0))
-(test 4.47213595499958d0 #'abs #c(-4 -2))
-(test 1.0 #'abs #c(0.0 -1.0))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; sqrt
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 3.4641016151377544d0 #'sqrt 12)
-(test #c(0 12) #'sqrt -144)
-(test 6.429728792199102d18 #'sqrt 41341412341234123412490123470912347210)
-(test 41341412341234123412490123470912347210
-       #'sqrt 1709112374367945085349927261774254951456404621200206927501652414831594784100)
-(test 46340.95001184158d0 #'sqrt 2147483648)
-(test 0.7071067811865476d0 #'sqrt 0.5d0)
-(test 0 #'sqrt 0)
-(test 0d0 #'sqrt 0d0)
-(test 111.1106106544285d0 #'sqrt 12345.5678d0)
-(test #c(0 11.119982014373944d0) #'sqrt -123.654d0)
-(test 3/8 #'sqrt 9/64)
-(test #c(0 1.1832159566199232d0) #'sqrt -7/5)
-(test 514.7536007118473d0 #'sqrt 821974900428408092/3102128401119)
-(test 413412341293461238946192384612893/314212341412341246128361289
-       #'sqrt 170909763933741276657131032282211169869649489782500833989461829449/98729395495825697643724477479624921705328808513741521)
-;; check for overflow
-(error-test #'sqrt 402387260077093773543702433923003985719374864210714632543799910429938512398629020592044208486969404800479988610197196058631666872994808558901323829669944590997424504087073759918823627727188732519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783647849977012476632889835955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593201928090878297308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426236131412508780208000261683151027341827977704784635868170164365024153691398281264810213092761244896359928705114964975419909342221566832572080821333186116811553615836546984046708975602900950537616475847728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178114194545257223865541461062892187960223838971476088506276862967146674697562911234082439208160153780889893964518263243671616762179168909779911903754031274622289988005195444414282012187361745992642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860788386150279465955131156552036093988180612138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470935190620929023136493273497565513958720559654228749774011413346962715422845862377387538230483865688976461927383814900140767310446640259899490222221765904339901886018566526485061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344828015051399694290153483077644569099073152433278288269864602789864321139083506217095002597389863554277196742822248757586765752344220207573630569498825087968928162753848863396909959826280956121450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970027753472000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; mod
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 5 #'mod 5 9)
-(test 4 #'mod -5 9)
-(test -4 #'mod 5 -9)
-(test -5 #'mod -5 -9)
-(test 2147483646 #'mod -2147483648 2147483647)
-(test -1 #'mod -2147483648 -2147483647)
-(test 1 #'mod 2147483648 2147483647)
-(test 0 #'mod -170909763933741276657131032282211169869649489782500833989461829449 413412341293461238946192384612893)
-(test -1709112374367945085349927261774254951415063208858972804089162291360682436890
-       #'mod 41341412341234123412490123470912347210 -1709112374367945085349927261774254951456404621200206927501652414831594784100)
-(test 9.666666666666666d0 #'mod -1/3 10d0)
-(test -9.666666666666666d0 #'mod 1/3 -10d0)
-(test -0.3333333333333333d0 #'mod -1/3 -10d0)
-(test 0.3333333333333333d0 #'mod 1/3 10d0)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; rem
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 2 #'rem 11 3)
-(test 2 #'rem 11 -3)
-(test -2 #'rem -11 3)
-(test -2 #'rem -11 -3)
-(test -1 #'rem -2147483648 2147483647)
-(test  0.1499999999999999d0 #'rem 1.35d0 1/5)
-(test  -0.1499999999999999d0 #'rem -1.35d0 1/5)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; gcd
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 11 #'gcd 33 11)
-(test 7 #'gcd 91 -49)
-(test 4 #'gcd -4)
-(test 0 #'gcd)
-(test 11 #'gcd 3333 -33 1002001)
-(test 1 #'gcd -2147483648 2147483647)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; lcm
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 1 #'lcm)
-(test 10 #'lcm 10)
-(test 5 #'lcm -5)
-(test 4611686016279904256 #'lcm -2147483648 2147483647)
-(test 0 #'lcm 0 5)
-(test 60 #'lcm 1 2 3 4 5 6)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; and
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test -1 #'logand)
-(test 0 #'logand 1 2)
-(test -2147483648 #'logand -2147483648 -1)
-(test 2147483647 #'logand 2147483647 -1)
-(test 2147479552 #'logand 8796093018112 2147483647)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; eqv
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test -1 #'logeqv)
-(test -4 #'logeqv 1 2)
-(test -2147483648 #'logeqv -2147483648 -1)
-(test 2147483647 #'logeqv 2147483647 -1)
-(test -8793945542656 #'logeqv 8796093018112 2147483647)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; or
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 0 #'logior)
-(test 3 #'logior 1 2)
-(test -1 #'logior -2147483648 -1)
-(test -1 #'logior 2147483647 -1)
-(test 8796093022207 #'logior 8796093018112 2147483647)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; xor
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test 0 #'logxor)
-(test 3 #'logxor 1 2)
-(test 2147483647 #'logxor -2147483648 -1)
-(test -2147483648 #'logxor 2147483647 -1)
-(test 8793945542655 #'logxor 8796093018112 2147483647)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; not
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test -1 #'lognot 0)
-(test 0 #'lognot -1)
-(test -2 #'lognot 1)
-(test 1 #'lognot -2)
-(test -3 #'lognot 2)
-(test 2 #'lognot -3)
-(test -2147483648 #'lognot 2147483647)
-(test 2147483647 #'lognot -2147483648)
-(test -8793945542656 #'lognot 8793945542655)
-(test -8796093018113 #'lognot 8796093018112)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; floor
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(div-test 1 1/2 #'floor 3/2)
-(div-test 1d0 1 #'ffloor 3 2)
-(div-test -2 2147483646 #'floor -2147483648 2147483647)
-(div-test 2147483648 0 #'floor -2147483648 -1)
-(div-test 17179869184 0 #'floor 18446744073709551616 1073741824)
-(div-test -17179869201 -1073741807 #'floor 18446744073709551616 -1073741823)
-(div-test 2147483648 0d0 #'floor -2147483648 -1d0)
-(div-test -2 2147483646/2147483647 #'floor -2147483648/2147483647)
-(div-test 32768 32768/2147483647 #'floor 2147483648/2147483647 65535/2147483647)
-(div-test -32769 -32767/2147483647 #'floor 2147483648/2147483647 -65535/2147483647)
-(div-test -32769 32767/2147483647 #'floor -2147483648/2147483647 65535/2147483647)
-(div-test 32768 -32768/2147483647 #'floor -2147483648/2147483647 -65535/2147483647)
-(div-test 2 0.5d0 #'floor 3d0 1.25d0)
-(div-test 2 1d0 #'floor 4d0 1.5d0)
-(div-test -3 -0.5d0 #'floor 4d0 -1.5d0)
-(div-test -3 0.5d0 #'floor -4d0 1.5d0)
-(div-test 2 -1d0 #'floor -4d0 -1.5d0)
-(div-test 1 2/91 #'floor 5/7 9/13)
-(div-test -2 -61/91 #'floor 5/7 -9/13)
-(div-test -2 61/91 #'floor -5/7 9/13)
-(div-test 1 -2/91 #'floor -5/7 -9/13)
-(div-test 1 0 #'floor 2147483648/2147483647 2147483648/2147483647)
-(div-test -1 0 #'floor 2147483648/2147483647 -2147483648/2147483647)
-(div-test -1 0 #'floor -2147483648/2147483647 2147483648/2147483647)
-(div-test 1 0 #'floor -2147483648/2147483647 -2147483648/2147483647)
-(div-test 9437 1416337955817765/144137437447079
-       #'floor 16324116304212832041/144137437447079 12)
-(div-test -9438 -313311293547183/144137437447079
-       #'floor 16324116304212832041/144137437447079 -12)
-(div-test -9438 313311293547183/144137437447079
-       #'floor -16324116304212832041/144137437447079 12)
-(div-test 9437 -1416337955817765/144137437447079
-       #'floor -16324116304212832041/144137437447079 -12)
-(div-test 8081 1138147903718848755797/4324123123412370
-       #'floor 2147483648 1148972348912638496123/4324123123412370)
-(div-test -8082 -1804074198964956721/720687187235395
-       #'floor 2147483648 -1148972348912638496123/4324123123412370)
-(div-test -8082 1804074198964956721/720687187235395
-       #'floor -2147483648 1148972348912638496123/4324123123412370)
-(div-test 8081 -1138147903718848755797/4324123123412370
-       #'floor -2147483648 -1148972348912638496123/4324123123412370)
-(div-test 0 1148972348912638496123/4324123123412370111
-       #'floor 1148972348912638496123/4324123123412370111 2147483648)
-(div-test -1 -9285982550494401861657948805/4324123123412370111
-       #'floor 1148972348912638496123/4324123123412370111 -2147483648)
-(div-test -1 9285982550494401861657948805/4324123123412370111
-       #'floor -1148972348912638496123/4324123123412370111 2147483648)
-(div-test 0 -1148972348912638496123/4324123123412370111
-       #'floor -1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 0.0d0 1.0000000004656613d0 #'ffloor 2147483648/2147483647 2147483648d0)
-(div-test -1.0d0 -2.147483647d9 #'ffloor 2147483648/2147483647 -2147483648d0)
-(div-test -1.0d0 2.147483647d9 #'ffloor -2147483648/2147483647 2147483648d0)
-(div-test 0.0d0 -1.0000000004656613d0 #'ffloor -2147483648/2147483647 -2147483648d0)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; ceiling
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(div-test 2 -1/2 #'ceiling 3/2)
-(div-test 2d0 -1 #'fceiling 3 2)
-(div-test -1 -1 #'ceiling -2147483648 2147483647)
-(div-test 2147483648 0 #'ceiling -2147483648 -1)
-(div-test 17179869184 0 #'ceiling 18446744073709551616 1073741824)
-(div-test -17179869200 16 #'ceiling 18446744073709551616 -1073741823)
-(div-test 2147483648 0d0 #'ceiling -2147483648 -1d0)
-(div-test -1 -1/2147483647 #'ceiling -2147483648/2147483647)
-(div-test 32769 -32767/2147483647 #'ceiling 2147483648/2147483647 65535/2147483647)
-(div-test -32768 32768/2147483647 #'ceiling 2147483648/2147483647 -65535/2147483647)
-(div-test -32768 -32768/2147483647 #'ceiling -2147483648/2147483647 65535/2147483647)
-(div-test 32769 32767/2147483647 #'ceiling -2147483648/2147483647 -65535/2147483647)
-(div-test 3 -0.75d0 #'ceiling 3d0 1.25d0)
-(div-test 3 -0.5d0 #'ceiling 4d0 1.5d0)
-(div-test -2 1d0 #'ceiling 4d0 -1.5d0)
-(div-test -2 -1d0 #'ceiling -4d0 1.5d0)
-(div-test 3 0.5d0 #'ceiling -4d0 -1.5d0)
-(div-test 2 -61/91 #'ceiling 5/7 9/13)
-(div-test -1 2/91 #'ceiling 5/7 -9/13)
-(div-test -1 -2/91 #'ceiling -5/7 9/13)
-(div-test 2 61/91 #'ceiling -5/7 -9/13)
-(div-test 1 0 #'ceiling 2147483648/2147483647 2147483648/2147483647)
-(div-test -1 0 #'ceiling 2147483648/2147483647 -2147483648/2147483647)
-(div-test -1 0 #'ceiling -2147483648/2147483647 2147483648/2147483647)
-(div-test 1 0 #'ceiling -2147483648/2147483647 -2147483648/2147483647)
-(div-test 9438 -313311293547183/144137437447079
-       #'ceiling 16324116304212832041/144137437447079 12)
-(div-test -9437 1416337955817765/144137437447079
-       #'ceiling 16324116304212832041/144137437447079 -12)
-(div-test -9437 -1416337955817765/144137437447079
-       #'ceiling -16324116304212832041/144137437447079 12)
-(div-test 9438 313311293547183/144137437447079
-       #'ceiling -16324116304212832041/144137437447079 -12)
-(div-test 8082 -1804074198964956721/720687187235395
-       #'ceiling 2147483648 1148972348912638496123/4324123123412370)
-(div-test -8081 1138147903718848755797/4324123123412370
-       #'ceiling 2147483648 -1148972348912638496123/4324123123412370)
-(div-test -8081 -1138147903718848755797/4324123123412370
-       #'ceiling -2147483648 1148972348912638496123/4324123123412370)
-(div-test 8082 1804074198964956721/720687187235395
-       #'ceiling -2147483648 -1148972348912638496123/4324123123412370)
-(div-test 1 -9285982550494401861657948805/4324123123412370111
-       #'ceiling 1148972348912638496123/4324123123412370111 2147483648)
-(div-test 0 1148972348912638496123/4324123123412370111
-       #'ceiling 1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 0 -1148972348912638496123/4324123123412370111
-       #'ceiling -1148972348912638496123/4324123123412370111 2147483648)
-(div-test 1 9285982550494401861657948805/4324123123412370111
-       #'ceiling -1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 1.0d0 -2.147483647d9 #'fceiling 2147483648/2147483647 2147483648d0)
-(div-test 0d0 1.0000000004656613d0 #'fceiling 2147483648/2147483647 -2147483648d0)
-(div-test 0d0 -1.0000000004656613d0 #'fceiling -2147483648/2147483647 2147483648d0)
-(div-test 1d0 2.147483647d9 #'fceiling -2147483648/2147483647 -2147483648d0)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; truncate
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(div-test 1 1/2 #'truncate 3/2)
-(div-test 1d0 1 #'ftruncate 3 2)
-(div-test -1 -1 #'truncate -2147483648 2147483647)
-(div-test 2147483648 0 #'truncate -2147483648 -1)
-(div-test 17179869184 0 #'truncate 18446744073709551616 1073741824)
-(div-test -17179869200 16 #'truncate 18446744073709551616 -1073741823)
-(div-test 2147483648 0d0 #'truncate -2147483648 -1d0)
-(div-test -1 -1/2147483647 #'truncate -2147483648/2147483647)
-(div-test 32768 32768/2147483647 #'truncate 2147483648/2147483647 65535/2147483647)
-(div-test -32768 32768/2147483647 #'truncate 2147483648/2147483647 -65535/2147483647)
-(div-test -32768 -32768/2147483647 #'truncate -2147483648/2147483647 65535/2147483647)
-(div-test 32768 -32768/2147483647 #'truncate -2147483648/2147483647 -65535/2147483647)
-(div-test 2 0.5d0 #'truncate 3d0 1.25d0)
-(div-test 2 1d0 #'truncate 4d0 1.5d0)
-(div-test -2 1d0 #'truncate 4d0 -1.5d0)
-(div-test -2 -1d0 #'truncate -4d0 1.5d0)
-(div-test 2 -1d0 #'truncate -4d0 -1.5d0)
-(div-test 1 2/91 #'truncate 5/7 9/13)
-(div-test -1 2/91 #'truncate 5/7 -9/13)
-(div-test -1 -2/91 #'truncate -5/7 9/13)
-(div-test 1 -2/91 #'truncate -5/7 -9/13)
-(div-test 1 0 #'truncate 2147483648/2147483647 2147483648/2147483647)
-(div-test -1 0 #'truncate 2147483648/2147483647 -2147483648/2147483647)
-(div-test -1 0 #'truncate -2147483648/2147483647 2147483648/2147483647)
-(div-test 1 0 #'truncate -2147483648/2147483647 -2147483648/2147483647)
-(div-test 9437 1416337955817765/144137437447079
-       #'truncate 16324116304212832041/144137437447079 12)
-(div-test -9437 1416337955817765/144137437447079
-       #'truncate 16324116304212832041/144137437447079 -12)
-(div-test -9437 -1416337955817765/144137437447079
-       #'truncate -16324116304212832041/144137437447079 12)
-(div-test 9437 -1416337955817765/144137437447079
-       #'truncate -16324116304212832041/144137437447079 -12)
-(div-test 8081 1138147903718848755797/4324123123412370
-       #'truncate 2147483648 1148972348912638496123/4324123123412370)
-(div-test -8081 1138147903718848755797/4324123123412370
-       #'truncate 2147483648 -1148972348912638496123/4324123123412370)
-(div-test -8081 -1138147903718848755797/4324123123412370
-       #'truncate -2147483648 1148972348912638496123/4324123123412370)
-(div-test 8081 -1138147903718848755797/4324123123412370
-       #'truncate -2147483648 -1148972348912638496123/4324123123412370)
-(div-test 0 1148972348912638496123/4324123123412370111
-       #'truncate 1148972348912638496123/4324123123412370111 2147483648)
-(div-test 0 1148972348912638496123/4324123123412370111
-       #'truncate 1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 0 -1148972348912638496123/4324123123412370111
-       #'truncate -1148972348912638496123/4324123123412370111 2147483648)
-(div-test 0 -1148972348912638496123/4324123123412370111
-       #'truncate -1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 0d0 1.0000000004656613d0 #'ftruncate 2147483648/2147483647 2147483648d0)
-(div-test 0d0 1.0000000004656613d0 #'ftruncate 2147483648/2147483647 -2147483648d0)
-(div-test 0d0 -1.0000000004656613d0 #'ftruncate -2147483648/2147483647 2147483648d0)
-(div-test 0d0 -1.0000000004656613d0 #'ftruncate -2147483648/2147483647 -2147483648d0)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; round
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(div-test 2 -1/2 #'round 3/2)
-(div-test 2d0 -1 #'fround 3 2)
-(div-test -1 -1 #'round -2147483648 2147483647)
-(div-test 2147483648 0 #'round -2147483648 -1)
-(div-test 17179869184 0 #'round 18446744073709551616 1073741824)
-(div-test -17179869200 16 #'round 18446744073709551616 -1073741823)
-(div-test 2147483648 0d0 #'round -2147483648 -1d0)
-(div-test -1 -1/2147483647 #'round -2147483648/2147483647)
-(div-test 32769 -32767/2147483647 #'round 2147483648/2147483647 65535/2147483647)
-(div-test -32769 -32767/2147483647 #'round 2147483648/2147483647 -65535/2147483647)
-(div-test -32769 32767/2147483647 #'round -2147483648/2147483647 65535/2147483647)
-(div-test 32769 32767/2147483647 #'round -2147483648/2147483647 -65535/2147483647)
-(div-test 2 0.5d0 #'round 3d0 1.25d0)
-(div-test 3 -0.5d0 #'round 4d0 1.5d0)
-(div-test -3 -0.5d0 #'round 4d0 -1.5d0)
-(div-test -3 0.5d0 #'round -4d0 1.5d0)
-(div-test 3 0.5d0 #'round -4d0 -1.5d0)
-(div-test 1 2/91 #'round 5/7 9/13)
-(div-test -1 2/91 #'round 5/7 -9/13)
-(div-test -1 -2/91 #'round -5/7 9/13)
-(div-test 1 -2/91 #'round -5/7 -9/13)
-(div-test 1 0 #'round 2147483648/2147483647 2147483648/2147483647)
-(div-test -1 0 #'round 2147483648/2147483647 -2147483648/2147483647)
-(div-test -1 0 #'round -2147483648/2147483647 2147483648/2147483647)
-(div-test 1 0 #'round -2147483648/2147483647 -2147483648/2147483647)
-(div-test 9438 -313311293547183/144137437447079
-       #'round 16324116304212832041/144137437447079 12)
-(div-test -9438 -313311293547183/144137437447079
-       #'round 16324116304212832041/144137437447079 -12)
-(div-test -9438 313311293547183/144137437447079
-       #'round -16324116304212832041/144137437447079 12)
-(div-test 9438 313311293547183/144137437447079
-       #'round -16324116304212832041/144137437447079 -12)
-(div-test 8082 -1804074198964956721/720687187235395
-       #'round 2147483648 1148972348912638496123/4324123123412370)
-(div-test -8082 -1804074198964956721/720687187235395
-       #'round 2147483648 -1148972348912638496123/4324123123412370)
-(div-test -8082 1804074198964956721/720687187235395
-       #'round -2147483648 1148972348912638496123/4324123123412370)
-(div-test 8082 1804074198964956721/720687187235395
-       #'round -2147483648 -1148972348912638496123/4324123123412370)
-(div-test 0 1148972348912638496123/4324123123412370111
-       #'round 1148972348912638496123/4324123123412370111 2147483648)
-(div-test 0 1148972348912638496123/4324123123412370111
-       #'round 1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 0 -1148972348912638496123/4324123123412370111
-       #'round -1148972348912638496123/4324123123412370111 2147483648)
-(div-test 0 -1148972348912638496123/4324123123412370111
-       #'round -1148972348912638496123/4324123123412370111 -2147483648)
-(div-test 0d0 1.0000000004656613d0 #'fround 2147483648/2147483647 2147483648d0)
-(div-test 0d0 1.0000000004656613d0 #'fround 2147483648/2147483647 -2147483648d0)
-(div-test 0d0 -1.0000000004656613d0 #'fround -2147483648/2147483647 2147483648d0)
-(div-test 0d0 -1.0000000004656613d0 #'fround -2147483648/2147483647 -2147483648d0)
-(div-test 2 0.5d0 #'round 2.5d0)
-(div-test -2 -0.5d0 #'round -2.5d0)
-(div-test 5 0d0 #'round 2.5d0 0.5d0)
-(div-test -5 0d0 #'round 2.5d0 -0.5d0)
-(div-test -5 0d0 #'round 2.5d0 -0.5d0)
-(div-test -5 0d0 #'round -2.5d0 0.5d0)
-(div-test 5 0d0 #'round -2.5d0 -0.5d0)
-(div-test 1 -2/7 #'round 5/7)
-(div-test -1 2/7 #'round -5/7)
-(div-test 2 -1/2 #'round 3/2)
-(div-test -2 1/2 #'round -3/2)
-(div-test 2 1 #'round 30/2 7)
-(div-test -2 1 #'round 30/2 -7)
-(div-test -2 -1 #'round -30/2 7)
-(div-test 2 -1 #'round -30/2 -7)
-(div-test 1073741824 -1/2 #'round 2147483647/2)
-(div-test -1073741824 1/2 #'round -2147483647/2)
-(div-test 1 -2147483645/2 #'round 2147483647/2 2147483646)
-(div-test -1 -2147483645/2 #'round 2147483647/2 -2147483646)
-(div-test -1 2147483645/2 #'round -2147483647/2 2147483646)
-(div-test 1 -2147483645/2 #'round 2147483647/2 2147483646)
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; misc
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(test #c(5 -5) #'conjugate #c(5 5))
-(test #c(5 5) #'conjugate #c(5 -5))
-(test #c(-5 -5) #'conjugate #c(-5 5))
-(test #c(-5 5) #'conjugate #c(-5 -5))
-
-(test 1 #'denominator 10)
-(test 3 #'denominator 10/3)
-(test 3 #'denominator 1804074198964956721/3)
-(test 4324123123412370111 #'denominator -1148972348912638496123/4324123123412370111)
-
-(bool-test nil #'evenp -1)
-(bool-test t #'evenp -2147483648)
-(bool-test t #'evenp -4294967296)
-(bool-test nil #'evenp -4294967295)
-
-(test 0.5d0 #'float 1/2)
-(test 10.0d0 #'float 10)
-(test 4.978341823462786d22 #'float 49783418234627861238926)
-(test 1.845867531346429d12 #'float 643827946123846123984/348794231)
-
-(bool-test t #'floatp 0.3d0)
-(bool-test nil #'floatp 1/3)
-
-(test 0 #'imagpart 1)
-(test -5 #'imagpart #c(1 -5))
-
-(bool-test t #'integerp 12)
-(bool-test nil #'integerp 1/2)
-(bool-test nil #'integerp :test)
-(bool-test nil #'integerp 0d0)
-(bool-test t #'integerp 49783418234627861238926)
-
-(test 3 #'isqrt 12)
-(test 46340 #'isqrt 2147483648)
-(test 46340 #'isqrt 2147483647)
-(test 25373764918 #'isqrt 643827946123846123984)
-
-(bool-test nil #'logtest 1 2)
-(bool-test t #'logtest 1 3)
-(bool-test t #'logtest 7 -1)
-
-(bool-test nil #'minusp 0)
-(bool-test nil #'minusp 2147483648)
-(bool-test t #'minusp -2147483648)
-(bool-test t #'minusp -1/4)
-(bool-test nil #'minusp 0.2d0)
-(bool-test nil #'minusp 0d0)
-(bool-test nil #'minusp 984723891462817946123897416)
-(bool-test t #'minusp -1148972348912638496123/4324123123412370111)
-
-(bool-test t #'numberp #c(1 2))
-(bool-test t #'numberp -200)
-(bool-test nil #'numberp :test)
-
-(test 10 #'numerator 10)
-(test 10 #'numerator 10/3)
-(test 1804074198964956721 #'numerator 1804074198964956721/3)
-(test -1148972348912638496123 #'numerator -1148972348912638496123/4324123123412370111)
-
-(bool-test t #'oddp -1)
-(bool-test nil #'oddp -2147483648)
-(bool-test nil #'oddp -4294967296)
-(bool-test t #'oddp -4294967295)
-
-(bool-test nil #'plusp 0)
-(bool-test t #'plusp 2147483648)
-(bool-test nil #'plusp -2147483648)
-(bool-test nil #'plusp -1/4)
-(bool-test t #'plusp 0.2d0)
-(bool-test nil #'plusp 0d0)
-(bool-test t #'plusp 984723891462817946123897416)
-(bool-test nil #'plusp -1148972348912638496123/4324123123412370111)
-
-(test 1/4 #'rational 0.25d0)
-(test 5/2 #'rational 2.5d0)
-(test 1/8 #'rational 0.125d0)
-(test -5/8 #'rational -0.625d0)
-(test 524293/8 #'rational 65536.625d0)
-(test 17179869181/8 #'rational 2147483647.625d0)
-
-(bool-test t #'rationalp -3)
-(bool-test t #'rationalp 1/2)
-(bool-test t #'rationalp 1/2412341242424122412)
-(bool-test nil #'rationalp :test)
-(bool-test nil #'rationalp 0d0)
-(bool-test t #'rationalp 49783418234627861238926)
-
-(test -1 #'realpart #c(-1 0.5d0))
-
-(test 1 #'signum 123/5)
-(test 0d0 #'signum 0d0)
-(test -1d0 #'signum -7.3d0)
-
-(bool-test nil #'zerop 1)
-(bool-test nil #'zerop 1/4312412341234123412)
-(bool-test nil #'zerop 0.000003d0)
-(bool-test t #'zerop 0)
-(bool-test t #'zerop 0d0)
-(bool-test t #'zerop #c(0 0d0))
-
-(bool-test t #'= 10 #c(10 0d0))
-
diff --git a/xedit/lisp/test/psql-1.lsp b/xedit/lisp/test/psql-1.lsp
deleted file mode 100644 (file)
index 2410fd8..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-;; Postgresql C library interface, example program 1, using the xedit
-;; lisp interface
-
-;; Test the C version of libpq, the PostgreSQL frontend library. 
-(require "psql")
-
-(defun exit-nicely (conn)
-    (pq-finish conn)
-    (quit 1)
-)
-
-;; begin, by setting the parameters for a backend connection if the
-;; parameters are null, then the system will try to use reasonable
-;; defaults by looking up environment variables or, failing that,
-;; using hardwired constants
-(setq pghost nil)              ; host name of the backend server
-(setq pgport nil)              ; port of the backend server
-(setq pgoptions nil)           ; special options to start up the backend server
-(setq pgtty nil)               ; debugging tty for the backend server
-(setq pgdbname "template1")
-
-;; make a connection to the database
-(setq conn (pq-setdb pghost pgport pgoptions pgtty pgdbname))
-
-;; check to see that the backend connection was successfully made
-(when (= (pq-status conn) pg-connection-bad)
-    (format t "Connection to database '~A' failed.~%" pgdbname)
-    (format t "~A" (pq-error-message conn))
-    (exit-nicely conn))
-
-;; start a transaction block
-(setq res (pq-exec conn "BEGIN"))
-(when (or (null res) (not (= (pq-result-status res) pgres-command-ok)))
-    (format t "BEGIN command failed~%")
-    (pq-clear res)
-    (exit-nicely conn))
-
-;; Should PQclear PGresult whenever it is no longer needed to avoid memory leaks
-(pq-clear res)
-
-;; fetch rows from the pg_database, the system catalog of databases
-(setq res (pq-exec conn "DECLARE mycursor CURSOR FOR select * from pg_database"))
-(when (or (null res) (not (= (pq-result-status res) pgres-command-ok)))
-    (format t "DECLARE CURSOR command failed~%")
-    (pq-clear res)
-    (exit-nicely conn))
-(pq-clear res)
-(setq res (pq-exec conn "FETCH ALL in mycursor"))
-(when (or (null res) (not (= (pq-result-status res) pgres-tuples-ok)))
-    (format t "FETCH ALL command didn't return tuples properly~%")
-    (pq-clear res)
-    (exit-nicely conn))
-
-;; first, print out the attribute names
-(setq nfields (pq-nfields res))
-(dotimes (i nfields)
-    (format t "~15@<~A~>" (pq-fname res i))
-)
-(format t "~%")
-
-;; next, print out the rows
-(setq ntuples (pq-ntuples res))
-(dotimes (i ntuples)
-    (dotimes (j nfields)
-       (format t "~15@<~A~>" (pq-getvalue res i j))
-    )
-    (format t "~%")
-)
-(pq-clear res)
-
-;; close the cursor
-(setq res (pq-exec conn "CLOSE mycursor"))
-(pq-clear res)
-
-;; commit the transaction
-(setq res (pq-exec conn "COMMIT"))
-(pq-clear res)
-
-;; close the connection to the database and cleanup
-(pq-finish conn)
diff --git a/xedit/lisp/test/psql-2.lsp b/xedit/lisp/test/psql-2.lsp
deleted file mode 100644 (file)
index 011512c..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-;; Postgresql C library interface, example program 2, using the xedit
-;; lisp interface
-
-;;  Test of the asynchronous notification interface
-;;
-;; Start this program, then from psql in another window do
-;;   NOTIFY TBL2;
-;;
-;; Or, if you want to get fancy, try this:
-;; Populate a database with the following:
-;;
-;;   CREATE TABLE TBL1 (i int4);
-;;
-;;   CREATE TABLE TBL2 (i int4);
-;;
-;;   CREATE RULE r1 AS ON INSERT TO TBL1 DO
-;;     (INSERT INTO TBL2 values (new.i); NOTIFY TBL2);
-;;
-;; and do
-;;
-;;   INSERT INTO TBL1 values (10);
-(require "psql")
-
-(defun exit-nicely (conn)
-    (pq-finish conn)
-    (quit 1)
-)
-
-;; begin, by setting the parameters for a backend connection if the
-;; parameters are null, then the system will try to use reasonable
-;; defaults by looking up environment variables or, failing that,
-;; using hardwired constants
-(setq pghost nil)              ; host name of the backend server
-(setq pgport nil)              ; port of the backend server
-(setq pgoptions nil)           ; special options to start up the backend server
-(setq pgtty nil)               ; debugging tty for the backend server
-(setq pgdbname "test")         ; change this to the name of your test database
-                               ;; XXX Note: getenv not yet implemented in the
-                                ; lisp interpreter
-
-;; make a connection to the database
-(setq conn (pq-setdb pghost pgport pgoptions pgtty pgdbname))
-
-;; check to see that the backend connection was successfully made
-(when (= (pq-status conn) pg-connection-bad)
-    (format t "Connection to database '~A' failed.~%" pgdbname)
-    (format t "~A" (pq-error-message conn))
-    (exit-nicely conn))
-
-(setq res (pq-exec conn "LISTEN TBL2"))
-(when (= (pq-status conn) pg-connection-bad)
-    (format t "LISTEN command failed~%")
-    (format t "~A" (pq-error-message conn))
-    (exit-nicely conn))
-
-;; Should PQclear PGresult whenever it is no longer needed to avoid memory leaks
-(pq-clear res)
-
-(loop
-    ;; wait a little bit between checks; waiting with select()
-    ;; would be more efficient.
-       ;; XXX Note: sleep not yet implemented in the lisp interpreter
-
-    ;; collect any asynchronous backend messages
-    (pq-consume-input conn)
-
-    ;; check for asynchronous notify messages
-    (when (setq notifies (pq-notifies conn))
-       (format t "ASYNC NOTIFY of '~A' from backend pid '~D' received~%"
-        (pg-notify-relname notifies) (pg-notify-be-pid notifies))
-    )
-)
-
-(pq-finish conn)
diff --git a/xedit/lisp/test/psql-3.lsp b/xedit/lisp/test/psql-3.lsp
deleted file mode 100644 (file)
index bb172c9..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-;; Postgresql C library interface, example program 3, using the xedit
-;; lisp interface
-
-;;  Test the binary cursor interface
-;;
-;; populate a database by doing the following:
-;;
-;; CREATE TABLE test1 (i int4, d real, p polygon);
-;;
-;; INSERT INTO test1 values (1, 3.567, polygon '(3.0, 4.0, 1.0, 2.0)');
-;;
-;; INSERT INTO test1 values (2, 89.05, polygon '(4.0, 3.0, 2.0, 1.0)');
-;;
-;; the expected output is:
-;;
-;; tuple 0: got i = (4 bytes) 1, d = (4 bytes) 3.567000, p = (4
-;; bytes) 2 points   boundbox = (hi=3.000000/4.000000, lo =
-;; 1.000000,2.000000) tuple 1: got i = (4 bytes) 2, d = (4 bytes)
-;; 89.050003, p = (4 bytes) 2 points   boundbox =
-;; (hi=4.000000/3.000000, lo = 2.000000,1.000000)
-
-;;  Output of the lisp code:
-;;
-;; type[0] = 23, size[0] = 4
-;; type[1] = 700, size[1] = 4
-;; type[2] = 604, size[2] = -1
-;; tuple 0: got
-;;  i = (4 bytes) 1
-;;  d = (4 bytes) 3.567
-;;  p = (4 bytes) 2 points boundbox = (hi=3.0/4.0, lo = 1.0/2.0)
-;; tuple 1: got
-;;  i = (4 bytes) 2
-;;  d = (4 bytes) 89.05
-;;  p = (4 bytes) 2 points boundbox = (hi=4.0/3.0, lo = 2.0/1.0)
-
-
-(require "psql")
-
-(defun exit-nicely (conn)
-    (pq-finish conn)
-    (quit 1)
-)
-
-;; begin, by setting the parameters for a backend connection if the
-;; parameters are null, then the system will try to use reasonable
-;; defaults by looking up environment variables or, failing that,
-;; using hardwired constants
-(setq pghost nil)              ; host name of the backend server
-(setq pgport nil)              ; port of the backend server
-(setq pgoptions nil)           ; special options to start up the backend server
-(setq pgtty nil)               ; debugging tty for the backend server
-(setq pgdbname "test")         ; change this to the name of your test database
-                               ;; XXX Note: getenv not yet implemented in the
-                                ; lisp interpreter
-
-;; make a connection to the database
-(setq conn (pq-setdb pghost pgport pgoptions pgtty pgdbname))
-
-;; check to see that the backend connection was successfully made
-(when (= (pq-status conn) pg-connection-bad)
-    (format t "Connection to database '~A' failed.~%" pgdbname)
-    (format t "~A" (pq-error-message conn))
-    (exit-nicely conn))
-
-(setq res (pq-exec conn "BEGIN"))
-(when (= (pq-status conn) pg-connection-bad)
-    (format t "BEGIN command failed~%")
-    (pq-clear res)
-    (exit-nicely conn))
-
-;; Should PQclear PGresult whenever it is no longer needed to avoid memory leaks
-(pq-clear res)
-
-(setq res (pq-exec conn "DECLARE mycursor BINARY CURSOR FOR select * from test1"))
-(when (= (pq-status conn) pg-connection-bad)
-    (format t "DECLARE CURSOR command failed~%")
-    (pq-clear res)
-    (exit-nicely conn))
-(pq-clear res)
-
-(setq res (pq-exec conn "FETCH ALL in mycursor"))
-(when (or (null res) (not (= (pq-result-status res) pgres-tuples-ok)))
-    (format t "FETCH ALL command didn't return tuples properly~%")
-    (pq-clear res)
-    (exit-nicely conn))
-
-(setq i-fnum (pq-fnumber res "i"))
-(setq d-fnum (pq-fnumber res "d"))
-(setq p-fnum (pq-fnumber res "p"))
-
-(dotimes (i 3)
-    (format t "type[~D] = ~D, size[~D] = ~D~%"
-     i (pq-ftype res i) i (pq-fsize res i))
-)
-
-(dotimes (i (pq-ntuples res))
-    (setq i-val (pq-getvalue res i i-fnum 'int32))
-    (setq d-val (pq-getvalue res i d-fnum 'float))
-    (setq p-val (pq-getvalue res i p-fnum 'pg-polygon))
-    (format t "tuple ~D: got~%" i)
-    (format t " i = (~D bytes) ~D~%" (pq-getlength res i i-fnum) i-val)
-    (format t " d = (~D bytes) ~D~%" (pq-getlength res i d-fnum) d-val)
-    (format t " p = (~D bytes) ~D points~,8@Tboundbox = (hi=~F/~F, lo = ~F/~F)~%"
-     (pq-getlength res i d-fnum) (pg-polygon-num-points p-val)
-     (pg-point-x (pg-box-high (pg-polygon-boundbox p-val)))
-     (pg-point-y (pg-box-high (pg-polygon-boundbox p-val)))
-     (pg-point-x (pg-box-low (pg-polygon-boundbox p-val)))
-     (pg-point-y (pg-box-low (pg-polygon-boundbox p-val))))
-)
-(pq-clear res)
-
-(setq res (pq-exec conn "CLOSE mycursor"))
-(pq-clear res)
-
-(setq res (pq-exec conn "COMMIT"))
-(pq-clear res)
-
-(pq-finish conn)
diff --git a/xedit/lisp/test/regex.lsp b/xedit/lisp/test/regex.lsp
deleted file mode 100644 (file)
index 9e28efa..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/test/regex.lsp,v 1.1 2002/12/10 03:59:04 paulo Exp $
-;;
-
-;; Basic regex tests. This file is only for xedit lisp and for it's regex
-;; library. Note that the regex library used by xedit lisp is not mean't
-;; to be fully compatible with most regexes, but to be as fast as possible.
-;; This means that some patterns that looks basic may never be matched,
-;; but it is expected that almost any pattern can be rewritten to be
-;; matched, or in the worst case, it may be required to search in the
-;; regions matched by a previous regex.
-
-(defun re-test (expect &rest arguments &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (apply #'re-exec arguments))
-           (setq error nil)))
-    (if error
-       (format t "ERROR: (re-exec~{ ~S~}) => ~S~%" arguments error-value)
-       (or (equal result expect)
-           (format t "(re-exec~{ ~S~}) => should be ~S not ~S~%"
-               arguments expect result))))
-
-;; errors only generated for regex compilation (or incorrect arguments)
-(defun re-error (&rest arguments &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (apply #'re-comp arguments))
-           (setq error nil)))
-    (or error
-       (format t "ERROR: no error for (re-comp~{ ~S~})" arguments)))
-
-(re-error "")
-(re-error "a**")
-(re-error "[a")
-(re-error "a{")
-(re-error "a(")
-(re-error "a||b")
-(re-error "|b|c")
-(re-error "a|b|")
-
-(setq re (re-comp "abc"))
-(re-test '((0 . 3)) re "abc")
-(re-test '((0 . 3)) re "abc" :notbol t)
-(re-test '((0 . 3)) re "abc" :noteol t)
-(re-test '((0 . 3)) re "abc" :notbol t :noteol t)
-(re-test '((14 . 17)) re "aaaaaaaaaaaaaaabc")
-(re-test '((14 . 17)) re "aaaaaaaaaaaaaaabc" :start 12 :end 17)
-(re-test '((30 . 33)) re "xxxxxxxxxxxxxxaaaaaaaaaaaaaaaaabcxx")
-(re-test '((30 . 33)) re "xxxxxxxxxxxxxxaaaaaaaaaaaaaaaaabcxx" :start 28 :end 34)
-
-(setq re (re-comp "^abc"))
-(re-test '((0 . 3)) re "abc")
-(re-test :nomatch re "xabc")
-(re-test '((1 . 4)) re "xabc" :start 1)
-(re-test :nomatch re "xabc" :start 1 :notbol t)
-
-(setq re (re-comp "abc$"))
-(re-test '((0 . 3)) re "abc")
-(re-test :nomatch re "xabcx")
-(re-test '((1 . 4)) re "xabcx" :end 4)
-(re-test :nomatch re "xabc" :end 4 :noteol t)
-
-(setq re (re-comp "^abc$"))
-(re-test '((0 . 3)) re "abc")
-(re-test :nomatch re "xabcx")
-(re-test '((1 . 4)) re "xabcx" :start 1 :end 4)
-(re-test :nomatch re "xabcx" :start 1 :end 4 :notbol t)
-(re-test :nomatch re "xabcx" :start 1 :end 4 :noteol t)
-(re-test :nomatch re "xabcx" :start 1 :end 4 :notbol t :noteol t)
-(re-test nil re "abc" :count 0)
-
-(setq re (re-comp "abc|bcd|cde"))
-(re-test '((0 . 3)) re "abc")
-(re-test '((1 . 4)) re "aabc")
-(re-test '((3 . 6)) re "xxxbcdef")
-(re-test '((8 . 11)) re "abdzzzcdabcde")
-(re-test '((13 . 16)) re "xxxxabdecdabdcde")
-
-(setq re (re-comp "^abc|bcd$|cde"))
-(re-test '((0 . 3)) re "abcde")
-(re-test '((3 . 6)) re "xabcde")
-(re-test '((1 . 4)) re "xabcde" :start 1)
-(re-test '((3 . 6)) re "xabcde" :start 1 :notbol t)
-(re-test '((2 . 5)) re "xabcd")
-(re-test :nomatch re "xabcd" :noteol t)
-(re-test nil re "xabcd" :count 0)
-(re-test :nomatch re "abcdx" :notbol t)
-
-(setq re (re-comp "a?bc|ab?c|abc?"))
-(re-test '((0 . 3)) re "abc")
-(re-test :nomatch re "xxxb")
-(re-test '((3 . 5)) re "xxxbc")
-(re-test '((5 . 7)) re "sssssab")
-(re-test '((0 . 3)) re "abcd")
-(re-test '((1 . 4)) re "aabcdef")
-(re-test '((1 . 3)) re "aabbccdef")    ;; ab matches abc?
-
-(setq re (re-comp "a?bc"))
-(re-test '((2 . 4)) re "acbcd")
-(re-test '((2 . 5)) re "acabcd")
-
-(setq re (re-comp "ab?c"))
-(re-test '((1 . 3)) re "xacc")
-(re-test '((2 . 5)) re "xxabcc")
-
-(setq re (re-comp "abc?"))
-(re-test '((1 . 3)) re "xababc")
-(re-test '((2 . 5)) re "xxabccabc")
-
-(setq re (re-comp "a*bc|ab*c|abc*"))
-(re-test '((0 . 9)) re "aaaaaaabc")
-(re-test '((1 . 10)) re "xaaaaaaabc")
-(re-test '((3 . 12)) re "xyzaaaaaaabc")
-(re-test '((0 . 4)) re "abbc")
-(re-test '((2 . 9)) re "xxabbbbbc")
-(re-test '((0 . 12)) re "abcccccccccc")
-(re-test '((0 . 12)) re "abccccccccccd")
-(re-test '((16 . 29)) re "xxxxxxxaaaaaaaaaabbbbbbbbbbbccccccccccc")
-(re-test '((11 . 13)) re "xxxbbbbbbbbbc")
-(re-test '((8 . 10)) re "aaaaazbxacd")
-
-(setq re (re-comp "a*bc"))
-(re-test '((2 . 4)) re "acbcd")
-(re-test '((2 . 5)) re "acabcd")
-(re-test '((2 . 8)) re "acaaaabcd")
-
-(setq re (re-comp "ab*c"))
-(re-test '((1 . 3)) re "xacc")
-(re-test '((2 . 5)) re "xxabcc")
-(re-test '((3 . 8)) re "xxaabbbcc")
-
-(setq re (re-comp "abc*"))
-(re-test '((1 . 3)) re "xababc")
-(re-test '((2 . 5)) re "xxabcbabccc")
-(re-test '((3 . 7)) re "axxabccabc")
-
-(setq re (re-comp "a+bc|ab+c|abc+"))
-(re-test :nomatch re "xxxbc")
-(re-test '((1 . 6)) re "xaaabc")
-(re-test '((8 . 12)) re "zzzzaaaaabbc")
-(re-test '((7 . 15)) re "zzzzaaaabbbbbbcccc")
-
-(setq re (re-comp "a.c"))
-(re-test '((0 . 3)) re "abc")
-(re-test '((1 . 4)) re "aaac")
-(re-test :nomatch re "xac")
-(re-test '((3 . 6)) re "xaxaac")
-(re-test '((2 . 5)) re "xxabc")
-(re-test '((3 . 6)) re "acxaxc")
-
-(setq re (re-comp "a*c"))
-(re-test '((0 . 1)) re "c")
-(re-test '((5 . 6)) re "xxxxxc")
-(re-test '((8 . 9)) re "xxxxxxxxc")
-(re-test '((7 . 8)) re "xxxxxxxcc")
-(re-test '((0 . 2)) re "ac")
-(re-test '((0 . 5)) re "aaaac")
-(re-test '((1 . 3)) re "xac")
-(re-test '((3 . 6)) re "xxxaac")
-(re-test '((2 . 4)) re "xxac")
-(re-test '((4 . 6)) re "xxxxac")
-
-(setq re (re-comp "a+c"))
-(re-test '((2 . 5)) re "xxaac")
-(re-test '((3 . 8)) re "xxxaaaac")
-(re-test '((6 . 8)) re "xaaaabac")
-(re-test :nomatch re "xxxc")
-(re-test '((4 . 9)) re "xxxxaaaaccc")
-
-(setq re (re-comp "a{4}b"))
-(re-test '((19 . 24)) re "xabxxaabxxxaaabxxxxaaaab")
-(re-test '((4 . 9)) re "aaabaaaab")
-
-(setq re (re-comp "a{4,}b"))
-(re-test '((3 . 8)) re "xxxaaaab")
-(re-test '((8 . 25)) re "zaaabzzzaaaaaaaaaaaaaaaab")
-
-(setq re (re-comp "a{,4}b"))
-(re-test '((0 . 1)) re "b")
-(re-test '((8 . 9)) re "xxxxxxxxb")
-(re-test '((6 . 11)) re "xaaaaaaaaab")
-(re-test '((3 . 5)) re "xxxab")
-(re-test '((6 . 10)) re "aaaaaxaaab")
-
-(setq re (re-comp "a{2,4}b"))
-(re-test :nomatch re "xab")
-(re-test '((1 . 4)) re "xaab")
-(re-test '((1 . 5)) re "xaaab")
-(re-test '((2 . 7)) re "xxaaaab")
-(re-test '((4 . 9)) re "xxxaaaaab")
-
-(setq re (re-comp "foo(bar|baz)fee"))
-(re-test '((9 . 18)) re "feebarbazfoobarfee")
-(re-test '((9 . 18) (12 . 15)) re "feebarbazfoobarfee" :count 2)
-(re-test '((13 . 22)) re "foofooobazfeefoobazfee")
-(re-test '((13 . 22) (16 . 19)) re "foofooobazfeefoobazfee" :count 3)
-
-(setq re (re-comp "foo(bar|baz)fee" :nosub t))
-(re-test '((9 . 18)) re "feebarbazfoobarfee")
-(re-test '((9 . 18)) re "feebarbazfoobarfee" :count 2)
-(re-test '((13 . 22)) re "foofooobazfeefoobazfee")
-(re-test '((13 . 22)) re "foofooobazfeefoobazfee" :count 3)
-
-(setq re (re-comp "f(oo|ee)ba[rz]"))
-(re-test :nomatch re "barfoebaz")
-(re-test '((3 . 9) (4 . 6)) re "bazfoobar" :count 2)
-(re-test '((3 . 9) (4 . 6)) re "barfeebaz" :count 2)
-
-(setq re (re-comp "f(oo|ee)ba[rz]" :nosub t))
-(re-test :nomatch re "barfoebaz")
-(re-test '((3 . 9)) re "bazfoobar" :count 2)
-(re-test '((3 . 9)) re "barfeebaz" :count 2)
-
-(setq re (re-comp "\\<(int|char)\\>"))
-(re-test '((15 . 18)) re "aint character int foo")
-(re-test '((15 . 18) (15 . 18)) re "aint character int foo" :count 2)
-
-(setq re (re-comp "\\<(int|char)\\>" :nosub t))
-(re-test '((15 . 18)) re "aint character int foo" :count 2)
-
-(setq re (re-comp "foo.*bar"))
-(re-test '((11 . 17)) re "barfoblaboofoobarfoobarfoobar")
-
-(setq re (re-comp "foo.+bar"))
-(re-test :nomatch re "foobar")
-(re-test '((6 . 13)) re "fobbarfooxbarfooybar")
-
-(setq re (re-comp "foo.?bar"))
-(re-test '((1 . 7)) re "xfoobar")
-(re-test :nomatch re "xxfooxxbar")
-(re-test '((3 . 10)) re "yyyfootbar")
-
-(setq re (re-comp "a.*b.*c"))
-(re-test '((0 . 3)) re "abc")
-(re-test '((9 . 18)) re "xxxxxxxxxabbbbbbbccaaaaabbbc")
-
-(setq re (re-comp "a.+b.*c"))
-(re-test :nomatch re "xxxabc")
-(re-test '((2 . 7)) re "xxaxbbc")
-
-(setq re (re-comp "a.+b.?c"))
-(re-test '((1 . 5)) re "xaabc")
-(re-test '((2 . 7)) re "xxaabbc")
-
-(setq re (re-comp "(foo.*|bar)fee"))
-(re-test '((3 . 9) (3 . 6)) re "barfoofee" :count 2)
-(re-test '((0 . 9) (0 . 6)) re "foobarfee" :count 2)
-(re-test '((4 . 10) (4 . 7)) re "xxfobarfee" :count 2)
-(re-test '((3 . 17) (3 . 14)) re "barfooooooobarfee" :count 2)
-(re-test '((4 . 10) (4 . 7)) re "xxfobarfeefoobar" :count 2)
-
-(setq re (re-comp "(foo.+|bar)fee"))
-(re-test :nomatch re "barfoofee" :count 2)
-(re-test '((3 . 10) (3 . 7)) re "barfooxfee" :count 2)
-
-(setq re (re-comp "(foo.?|bar)fee"))
-(re-test :nomatch re "foobar" :count 2)
-(re-test '((2 . 8) (2 . 5)) re "bafoofee" :count 2)
-(re-test '((2 . 9) (2 . 6)) re "bafooofeebarfee" :count 4)
-(re-test '((2 . 8) (2 . 5)) re "bafoofeebarfee" :count 2)
-(re-test nil re "bafoofeebarfee" :count 0)
-(re-test '((2 . 8)) re "bafoofeebarfee" :count 1)
-
-(setq re (re-comp "(a|b|c)\\1"))
-(re-test '((0 . 2) (0 . 1)) re "aa" :count 2)
-
-(setq re (re-comp "(a|b|c)(a|b|c)\\1\\2"))
-(re-test '((0 . 4) (0 . 1) (1 . 2)) re "acac" :count 5)
-(re-test '((4 . 8) (4 . 5) (5 . 6)) re "xxxxacac" :count 4)
-(re-test '((24 . 28) (24 . 25) (25 . 26)) re "xxacabacbcacbbacbcaaccabcaca" :count 3)
-(re-test '((4 . 8) (4 . 5) (5 . 6)) re "xyabcccc" :count 3)
-(re-test '((4 . 8) (4 . 5)) re "xyabcccc" :count 2)
-(re-test '((4 . 8)) re "xyabcccc" :count 1)
-(re-test nil re "xyabcccc" :count 0)
-
-(setq re (re-comp "(a*b)\\1"))
-(re-test '((3 . 15) (3 . 9)) re "xxxaaaaabaaaaab" :count 2)
-(re-test '((7 . 9) (7 . 8)) re "abaabaxbb" :count 2)
-
-(setq re (re-comp "(ab+c)\\1"))
-(re-test '((3 . 13) (3 . 8)) re "xaaabbbcabbbc" :count 3)
-
-(setq re (re-comp "(ab?c)\\1"))
-(re-test :nomatch re "abcac" :count 2)
-(re-test '((4 . 8) (4 . 6)) re "acabacac" :count 2)
-(re-test '((5 . 11) (5 . 8)) re "abcacabcabc" :count 2)
-(re-test '((3 . 7) (3 . 5)) re "abcacac" :count 2)
-
-(setq re (re-comp "a(.*)b\\1"))
-(re-test '((3 . 5) (4 . 4)) re "xxxab" :count 2)
-(re-test '((4 . 12) (5 . 8)) re "xxxxazzzbzzz" :count 2)
-
-(setq re (re-comp "abc" :icase t))
-(re-test '((0 . 3)) re "AbC")
-
-(setq re (re-comp "[0-9][a-z]+" :icase t))
-(re-test '((3 . 10)) re "xxx0aaZxYT9")
-
-(setq re (re-comp "a.b" :icase t))
-(re-test '((10 . 13)) re "aaaaaaaaaaaxB")
-
-(setq re (re-comp "a.*z" :icase t))
-(re-test '((3 . 9)) re "xxxAaaaaZ")
-(re-test '((2 . 6)) re "xxaaaZaaa")
-
-(setq re (re-comp "\\<(lambda|defun|defmacro)\\>" :icase t))
-(re-test '((5 . 11)) re "    (lambda")
-(re-test '((5 . 11) (5 . 11)) re "    (lambda" :count 2)
-(re-test :nomatch re "lamda defunn deffmacro")
-
-(setq re (re-comp "\\<(nil|t)\\>" :icase t))
-(re-test '((3 . 6)) re "it Nil")
-(re-test '((3 . 6) (3 . 6)) re "it Nil" :count 6)
-(re-test :nomatch re "nilo")
-
-(setq re (re-comp "\\<(begin|end)\\>" :icase t))
-(re-test '((21 . 24) (21 . 24)) re "beginning the ending EnD" :count 7)
-
-(setq re (re-comp "a.*" :newline t))
-(re-test '((0 . 1)) re "a
-aaa")
-(re-test '((3 . 4)) re "xyza
-aa")
-
-(setq re (re-comp "a.+" :newline t))
-(re-test '((2 . 5)) re "a
-aaa")
-(re-test '((5 . 7)) re "xyza
-aa")
-
-(setq re (re-comp "a.?" :newline t))
-(re-test '((0 . 1)) re "a
-aaa")
-(re-test '((3 . 4)) re "xyza
-aa")
-
-(setq re (re-comp "a.*b.*c" :newline t))
-(re-test '((11 . 14)) re "xxaa
-zyacb
-abc")
-(re-test '((6 . 9)) re "xxxab
-abc
-c")
-
-(setq re (re-comp "a.+b.*c" :newline t))
-(re-test '((6 . 10)) re "ab
-bc
-abbc")
-
-(setq re (re-comp "a.?b.*c" :newline t))
-(re-test '((4 . 8)) re "ab
-cabbc
-cc")
-
-(setq re (re-comp "^foo$" :newline t))
-(re-test '((11 . 14)) re "bar
-foobar
-foo")
-(re-test '((0 . 3)) re "foo
-bar
-foo
-bar")
-(re-test '((8 . 11)) re "foo
-bar
-foo
-bar" :notbol t)
-(re-test '((8 . 11)) re "foo
-bar
-foo" :notbol t)
-(re-test :nomatch re "foo
-bar
-foo" :notbol t :noteol t)
-
-(setq re (re-comp "^\\s*#\\s*(define|include)\\s+.+" :newline t))
-(re-test '((8 . 18)) re "#define
-#include x")
-(re-test '((8 . 18) (9 . 16)) re "#define
-#include x" :count 2)
-
-(setq re (re-comp "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))
-(re-test '((3 . 259)) re "zzzxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzzz")
-
-(setq re (re-comp "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~"))
-(re-test '((13 . 333)) re "String here: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890~/")
-
-(setq re (re-comp "(.*)\\D(\\d+)"))
-(re-test '((0 . 6) (0 . 3) (4 . 6)) re "abcW12" :count 3)
-(re-test '((0 . 6) (0 . 3)) re "abcW12" :count 2)
-(re-test '((0 . 6)) re "abcW12" :count 1)
-(re-test nil re "abcW12" :count 0)
-(re-test '((0 . 6) (0 . 3) (4 . 6)) re "abcW12abcW12" :count 3)
-(re-test '((0 . 6) (0 . 3) (4 . 6)) re "abcW12abcW12a" :count 3)
-
-(setq re (re-comp ".*\\d"))
-(re-test '((0 . 2)) re "a1a1a1aaaaaaa")                        ; minimal match only
-
-(setq re (re-comp "(.*)\\d"))
-(re-test '((0 . 2) (0 . 1)) re "a1a1a1aaaaaaa" :count 2); minimal match only
-
-(setq re (re-comp ".*(\\d)"))
-(re-test '((0 . 2) (1 . 2)) re "a1a1a1aaaaaaa" :count 2); minimal match only
-
-;; XXX this very simple pattern was entering an infinite loop
-;; actually, this pattern is not supported, just test if is not
-;; crashing (not supported because it is not cheap to match variations
-;; of the pattern)
-(setq re (re-comp "(.*a)?"))
-(re-test '((0 . 1)) re "aaaa")         ; expected, minimal match
-(re-test '((0 . 1) (0 . 1)) re "aaaa" :count 2)
-
-
-;; Tue Dec 11 22:22:51 BRST 2007 Fix a regression with the pattern below
-;; returning a match to an empty string.
-;; Note that inverting the order of the "alternatives" works with the
-;; versions of libre prior to this (one line) fix
-(setq re (re-comp "\\\\\\d{3}|\\\\."))
-(re-test  :nomatch re "\\")
-;; previous version should work with the pattern inverted
-(setq re (re-comp "\\\\.|\\\\\\d{3}"))
-(re-test  :nomatch re "\\")
diff --git a/xedit/lisp/test/stream.lsp b/xedit/lisp/test/stream.lsp
deleted file mode 100644 (file)
index e483643..0000000
+++ /dev/null
@@ -1,807 +0,0 @@
-;;
-;; Copyright (c) 2002 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/test/stream.lsp,v 1.3 2002/12/06 03:25:29 paulo Exp $
-;;
-
-;; most format tests from the cltl second edition samples
-
-;; basic io/format/pathname/stream tests
-
-(defun do-format-test (error-test expect arguments
-                   &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (apply #'format nil arguments))
-           (setq error nil)
-       )
-    )
-    (if error-test
-       (or error
-           (format t "ERROR: no error for (format nil~{ ~S~}), result was ~S~%"
-               arguments result))
-       (if error
-           (format t "ERROR: (format nil~{ ~S~}) => ~S~%" arguments error-value)
-           (or (string= result expect)
-               (format t "(format nil~{ ~S~}) => should be ~S not ~S~%"
-                   arguments expect result)))
-    )
-)
-
-(defun format-test (expect &rest arguments)
-    (do-format-test nil expect arguments))
-
-(defun format-error (&rest arguments)
-    (do-format-test t nil arguments))
-
-
-
-(defun compare-test (test expect function arguments
-                    &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (apply function arguments))
-           (setq error nil)
-       )
-    )
-    (if error
-       (format t "ERROR: (~S~{ ~S~}) => ~S~%" function arguments error-value)
-       (or (funcall test result expect)
-           (format t "(~S~{ ~S~}) => should be ~S not ~S~%"
-               function arguments expect result
-           )
-       )
-    )
-)
-
-(defun compare-eval (test expect form
-                    &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (eval form))
-           (setq error nil)
-       )
-    )
-    (if error
-       (format t "ERROR: ~S => ~S~%" form error-value)
-       (or (funcall test result expect)
-           (format t "~S => should be ~S not ~S~%"
-               form expect result
-           )
-       )
-    )
-)
-
-(defun error-test (function &rest arguments &aux result (error t))
-    (ignore-errors
-       (setq result (apply function arguments))
-       (setq error nil)
-    )
-    (or error
-       (format t "ERROR: no error for (~S~{ ~S~}), result was ~S~%"
-           function arguments result)
-    )
-)
-
-(defun error-eval (form &aux result (error t))
-    (ignore-errors
-       (setq result (eval form))
-       (setq error nil)
-    )
-    (or error
-       (format t "ERROR: no error for ~S, result was ~S~%" form result)
-    )
-)
-
-(defun eq-test (expect function &rest arguments)
-    (compare-test #'eq expect function arguments))
-
-(defun eql-test (expect function &rest arguments)
-    (compare-test #'eql expect function arguments))
-
-(defun equal-test (expect function &rest arguments)
-    (compare-test #'equal expect function arguments))
-
-(defun equalp-test (expect function &rest arguments)
-    (compare-test #'equalp expect function arguments))
-
-(defun eq-eval (expect form)
-    (compare-eval #'eq expect form))
-
-(defun eql-eval (expect form)
-    (compare-eval #'eql expect form))
-
-(defun equal-eval (expect form)
-    (compare-eval #'equal expect form))
-
-(defun equalp-eval (expect form)
-    (compare-eval #'equalp expect form))
-
-(defun bool-test (expect function &rest arguments
-                 &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (apply function arguments))
-           (setq error nil)
-       )
-    )
-    (if error
-       (format t "ERROR: (~S~{ ~S~}) => ~S~%" function arguments error-value)
-       (or (eq (null result) (null expect))
-           (format t "(~S~{ ~S~}) => should be ~A not ~A~%"
-               function arguments expect result
-           )
-       )
-    )
-)
-
-(defun bool-eval (expect form &aux result (error t) unused error-value)
-    (multiple-value-setq
-       (unused error-value)
-       (ignore-errors
-           (setq result (eval form))
-           (setq error nil)
-       )
-    )
-    (if error
-       (format t "ERROR: ~S => ~S~%" form error-value)
-       (or (eq (null result) (null expect))
-           (format t "~S => should be ~A not ~A~%"
-               form expect result
-           )
-       )
-    )
-)
-
-
-;; format                              - function
-
-;; ~c
-(format-test "A" "~C" #\A)
-(format-test " " "~C" #\Space)
-(format-test "A" "~:C" #\A)
-(format-test "Space" "~:C" #\Space)
-(format-test "#\\A" "~@C" #\A)
-(format-test "#\\Space" "~@C" #\Space)
-(format-test " " "~A" #\Space)
-(let ((*print-escape* t)) (format-test " " "~A" #\Space))
-(format-test "#\\Space" "~S" #\Space)
-(let ((*print-escape* nil)) (format-test "#\\Space" "~S" #\Space))
-
-;; ~%
-(format-test "
-" "~%")
-(format-test "
-
-
-" "~3%")
-
-;; ~&
-(format-test "" "~&")
-(format-test "
-" "~2&")
-
-;; ~|
-(format-test "\f" "~|")
-
-;; ~~
-(format-test "~~~" "~3~")
-
-;; radix
-(format-test "1101" "~,,' ,4:B" 13)
-(format-test "1 0001" "~,,' ,4:B" 17)
-(format-test "1101 0000 0101" "~14,,' ,4:B" 3333)
-(format-test "1 22" "~3,,,' ,2:R" 17)
-(format-test "6|55|35" "~,,'|,2:D" #xFFFF)
-(format-test "1,000,000" "~,,,3:D" 1000000)
-(format-test "one hundred and twenty-three thousand, four hundred and fifty-six"
-       "~R" 123456)
-(format-test "six hundred and fifty-four thousand, three hundred twenty-first"
-       "~:R" 654321)
-(format-test "MCCXXXIV" "~@R" 1234)
-(format-test "MCCXXXXVIIII" "~@:R" 1249)
-(format-test "3039" "~X" 12345)
-(format-test "30071" "~O" 12345)
-(format-test "9IX" "~36R" 12345)
-(format-test "11000000111001" "~B" 12345)
-(format-test "The answer is 5." "The answer is ~D." 5)
-(format-test "The answer is   5." "The answer is ~3D." 5)
-(format-test "The answer is 005." "The answer is ~3,'0D." 5)
-(format-test "1111 1010 1100 1110" "~,,' ,4:B" #xFACE)
-(format-test "1 1100 1110" "~,,' ,4:B" #x1CE)
-(format-test "1111 1010 1100 1110" "~19,,' ,4:B" #xFACE)
-(format-test "        1 1100 1110" "~19,,' ,4:B" #x1CE)
-
-;; 6.37 and 6.38 are correct
-#+xedit (format-test "6.38" "~4,2F" 6.375d0)
-(format-test "10.0" "~,1F" 9.995d0)
-;; 6.37E+2 and 6.38E+2 are correct
-#+xedit (format-test " 6.38E+2" "~8,2E" 637.5)
-(do*
-    (
-    (n '(3.14159 -3.14159 100.0 1234.0 0.006) (cdr n))
-    (r '("  3.14| 31.42|  3.14|3.1416|3.14|3.14159"
-        " -3.14|-31.42| -3.14|-3.142|-3.14|-3.14159"
-        "100.00|******|100.00| 100.0|100.00|100.0"
-        "1234.00|******|??????|1234.0|1234.00|1234.0"
-        "  0.01|  0.06|  0.01| 0.006|0.01|0.006") (cdr r))
-    (x (car n) (car n))
-    )
-    ((endp n))
-    (format-test (car r)
-       "~6,2F|~6,2,1,'*F|~6,2,,'?F|~6F|~,2F|~F" x x x x x x)
-)
-(do*
-    (
-    (n '(3.14159 -3.14159 1100.0 1.1e13 #+xedit 1.1e120) (cdr n))
-    (r '("  3.14E+0| 31.42$-01|+.003E+03|  3.14E+0"
-        " -3.14E+0|-31.42$-01|-.003E+03| -3.14E+0"
-        "  1.10E+3| 11.00$+02|+.001E+06|  1.10E+3"
-        "*********| 11.00$+12|+.001E+16| 1.10E+13"
-        #+xedit
-        "*********|??????????|%%%%%%%%%|1.10E+120") (cdr r))
-    (x (car n) (car n))
-    )
-    ((endp n))
-    (format-test (car r)
-       "~9,2,1,,'*E|~10,3,2,2,'?,,'$E|~9,3,2,-2,'%@E|~9,2E" x x x x)
-)
-(do
-    (
-    (k -5 (1+ k))
-    (r '("Scale factor -5: | 0.000003E+06|"
-        "Scale factor -4: | 0.000031E+05|"
-        "Scale factor -3: | 0.000314E+04|"
-        "Scale factor -2: | 0.003142E+03|"
-        "Scale factor -1: | 0.031416E+02|"
-        "Scale factor  0: | 0.314159E+01|"
-        "Scale factor  1: | 3.141590E+00|"
-        "Scale factor  2: | 31.41590E-01|"
-        "Scale factor  3: | 314.1590E-02|"
-        "Scale factor  4: | 3141.590E-03|"
-        "Scale factor  5: | 31415.90E-04|"
-        "Scale factor  6: | 314159.0E-05|"
-        "Scale factor  7: | 3141590.E-06|") (cdr r))
-    )
-    ((endp r))
-    (format-test (car r) "Scale factor ~2D: | ~12,6,2,VE|" k k 3.14159)
-)
-(do*
-    (
-    (n '(0.0314159 0.314159 3.14159 31.4159 314.159 3141.59 3.14E12
-        #+xedit 3.14d120) (cdr n))
-    (r '("  3.14E-2|314.2$-04|0.314E-01|  3.14E-2"
-         "  0.31   |0.314    |0.314    | 0.31    "
-         "   3.1   | 3.14    | 3.14    |  3.1    "
-         "   31.   | 31.4    | 31.4    |  31.    "
-         "  3.14E+2| 314.    | 314.    |  3.14E+2"
-         "  3.14E+3|314.2$+01|0.314E+04|  3.14E+3"
-         "*********|314.0$+10|0.314E+13| 3.14E+12"
-         #+xedit "*********|?????????|%%%%%%%%%|3.14E+120") (cdr r))
-    (x (car n) (car n))
-    )
-    ((endp n))
-    (format-test (car r) "~9,2,1,,'*G|~9,3,2,3,'?,,'$G|~9,3,2,0,'%G|~9,2G"
-       x x x x)
-)
-(format-test "  1." "~4,0f" 0.5)
-(format-test "  0." "~4,0f" 0.4)
-
-;; ~p
-(setq n 3)
-(format-test "3 items found.""~D item~:P found." n)
-(format-test "three dogs are here." "~R dog~:[s are~; is~] here." n (= n 1))
-(format-test "three dogs are here." "~R dog~:*~[s are~; is~:;s are~] here." n)
-(format-test "Here are three puppies.""Here ~[are~;is~:;are~] ~:*~R pupp~:@P." n)
-(format-test "7 tries/1 win" "~D tr~:@P/~D win~:P" 7 1)
-(format-test "1 try/0 wins" "~D tr~:@P/~D win~:P" 1 0)
-(format-test "1 try/3 wins" "~D tr~:@P/~D win~:P" 1 3)
-
-;; ~t
-(format-test "        foo" "~8Tfoo")
-#+xedit (format-test  "         foo" "~8,3Tfoo")
-(format-test "         foo" "~8,3@Tfoo")
-(format-test "   foo" "~1,3@Tfoo")
-
-;; ~*
-(format-test "2" "~*~D" 1 2 3 4)
-(format-test "4" "~3*~D" 1 2 3 4)
-(format-test "2" "~3*~2:*~D" 1 2 3 4)
-(format-test "4 3 2 1 2 3 4" "~3@*~D ~2@*~D ~1@*~D ~0@*~D ~D ~D ~D" 1 2 3 4)
-
-;; ~?
-(format-test "<Foo 5> 7" "~? ~D" "<~A ~D>" '("Foo" 5) 7)
-(format-test "<Foo 5> 7" "~? ~D" "<~A ~D>" '("Foo" 5 14) 7)
-(format-test "<Foo 5> 7" "~@? ~D" "<~A ~D>" "Foo" 5 7)
-(format-test "<Foo 5> 14" "~@? ~D" "<~A ~D>" "Foo" 5 14 7)
-
-
-(format-error "~:[abc~:@(def~;ghi~:@(jkl~]mno~)" 1)
-(format-error "~?ghi~)" "abc~@(def")
-
-
-;; ~(...~)
-(format-test "XIV xiv" "~@R ~(~@R~)" 14 14)
-(format-test "Zero errors detected." "~@(~R~) error~:P detected." 0)
-(format-test "One error detected." "~@(~R~) error~:P detected." 1)
-(format-test "Twenty-three errors detected." "~@(~R~) error~:P detected." 23)
-
-;; ~[...~]
-(format-test "Persian Cat" "~[Siamese~;Manx~;Persian~] Cat" 2)
-(format-test " Cat" "~[Siamese~;Manx~;Persian~] Cat" 3)
-(format-test "Siamese Cat" "~[Siamese~;Manx~;Persian~] Cat" 0)
-(setq *print-level* nil *print-length* 5)
-(format-test " print length = 5"
-  "~@[ print level = ~D~]~@[ print length = ~D~]" *print-level* *print-length*)
-(setq foo "Items:~#[ none~; ~S~; ~S and ~S~:;~@{ ~#[~;and ~]~S~^,~}~].")
-(format-test "Items: none." foo)
-(format-test "Items: FOO." foo 'foo)
-(format-test "Items: FOO and BAR." foo 'foo 'bar)
-(format-test "Items: FOO, BAR, and BAZ." foo 'foo 'bar 'baz)
-(format-test "Items: FOO, BAR, BAZ, and QUUX." foo 'foo 'bar 'baz 'quux)
-
-;; ~{...~}
-(format-test "The winners are: FRED HARRY JILL."
-  "The winners are:~{ ~S~}." '(fred harry jill))
-(format-test "Pairs: <A,1> <B,2> <C,3>." "Pairs:~{ <~S,~S>~}." '(a 1 b 2 c 3))
-(format-test "Pairs: <A,1> <B,2> <C,3>."
-  "Pairs:~:{ <~S,~S>~}." '((a 1) (b 2) (c 3)))
-(format-test "Pairs: <A,1> <B,2> <C,3>."
-  "Pairs:~:@{ <~S,~S>~}." '(a 1) '(b 2) '(c 3))
-
-;; ~<...~>
-(format-test "foo    bar" "~10<foo~;bar~>")
-(format-test "  foo  bar" "~10:<foo~;bar~>")
-(format-test "  foo bar " "~10:@<foo~;bar~>")
-(format-test "    foobar" "~10<foobar~>")
-(format-test "    foobar" "~10:<foobar~>")
-(format-test "foobar    " "~10@<foobar~>")
-(format-test "  foobar  " "~10:@<foobar~>")
-
-;; ~^
-(setq donestr "Done.~^  ~D warning~:P.~^  ~D error~:P.")
-(format-test "Done." donestr)
-(format-test "Done.  3 warnings." donestr 3)
-(format-test "Done.  1 warning.  5 errors." donestr 1 5)
-(format-test "/HOT .../HAMBURGER/ICE .../FRENCH ..."
-  "~:{/~S~^ ...~}" '((hot dog) (hamburger) (ice cream) (french fries)))
-(format-test "/HOT .../HAMBURGER .../ICE .../FRENCH"
-  "~:{/~S~:^ ...~}" '((hot dog) (hamburger) (ice cream) (french fries)))
-(format-test "/HOT .../HAMBURGER"
-  "~:{/~S~:#^ ...~}" '((hot dog) (hamburger) (ice cream) (french fries)))
-(setq tellstr "~@(~@[~R~]~^ ~A.~)")
-(format-test "Twenty-three" tellstr 23)
-(format-test " Losers." tellstr nil "losers")
-(format-test "Twenty-three losers." tellstr 23 "losers")
-(format-test "            FOO" "~15<~S~;~^~S~;~^~S~>" 'foo)
-(format-test "FOO         BAR" "~15<~S~;~^~S~;~^~S~>" 'foo 'bar)
-(format-test "FOO   BAR   BAZ" "~15<~S~;~^~S~;~^~S~>" 'foo 'bar 'baz)
-
-
-;; make-pathname                       - function
-(equal-test #P"/public/games/chess.db"
-    #'make-pathname :directory '(:absolute "public" "games")
-                   :name "chess" :type "db")
-(equal-test #P"/etc/passwd" #'list* #P"/etc/passwd")
-(setq path (make-pathname :directory '(:absolute "public" "games")
-                         :name "chess" :type "db"))
-(eq-test path #'pathname path)
-(eq-test nil #'pathname-host path)
-(eq-test nil #'pathname-device path)
-(equal-test '(:absolute "public" "games") #'pathname-directory path)
-(equal-test "chess" #'pathname-name path)
-(equal-test "db" #'pathname-type path)
-(eq-test nil #'pathname-version path)
-(equal-test #P"/tmp/foo.txt" #'make-pathname :defaults "/tmp/foo.txt")
-
-#+xedit (equal-test #P"/tmp/foo.txt" #'pathname "///tmp///foo.txt")
-;; XXX changed to remove extra separators
-;; (equal-test #P"///tmp///foo.txt" #'pathname "///tmp///foo.txt")
-
-
-;; merge-pathnames                     - function
-(equal-test #P"/tmp/foo.txt" #'merge-pathnames "/tmp/foo" "/tmp/foo.txt")
-(equal-test #P"/tmp/foo.txt" #'merge-pathnames "foo" "/tmp/foo.txt")
-(equal-test #P"/tmp/foo/bar.txt" #'merge-pathnames "foo/bar" "/tmp/foo.txt")
-
-;; namestring                          - function
-(setq path (merge-pathnames "foo/bar" "/tmp/foo.txt"))
-(equal-test "/tmp/foo/bar.txt" #'namestring path)
-(equal-test "" #'host-namestring path)
-(equal-test "/tmp/foo/" #'directory-namestring path)
-(equal-test "bar.txt" #'file-namestring path)
-(equal-test "/tmp/foo/bar.txt" #'enough-namestring path)
-(equal-test "foo/bar.txt" #'enough-namestring path "/tmp/")
-(equal-test "bar.txt" #'enough-namestring path "/tmp/foo/")
-(equal-test "foo/bar.txt" #'enough-namestring path "/tmp/foo")
-
-;; parse-namestring                    - function
-(equal-eval '(#P"foo" 3) '(multiple-value-list (parse-namestring "foo")))
-(equal-eval '(#P"foo" 0) '(multiple-value-list (parse-namestring #P"foo")))
-
-
-
-;; read                                        - function
-(setq is (make-string-input-stream " foo "))
-(eq-test t #'streamp is)
-(eq-test t #'input-stream-p is)
-(eq-test nil #'output-stream-p is)
-(eq-test 'foo #'read is)
-(eq-test t #'close is)
-(setq is (make-string-input-stream "xfooy" 1 4))
-(eq-test 'foo #'read is)
-(eq-test t #'close is)
-(setq is (make-string-input-stream ""))
-(eq-test nil #'read is nil)
-(eq-test 'end-of-string #'read is nil 'end-of-string)
-(close is)
-(error-test #'read is)
-(error-test #'read is nil)
-(error-test #'read is nil 'end-of-string)
-(eq-test t #'streamp is)
-(eq-test nil #'input-stream-p is)
-(eq-test nil #'streamp "test")
-(error-test #'input-stream-p "test")
-
-;; read-char                           - function
-(setq is (make-string-input-stream "0123"))
-(setq test nil)
-(equal-eval '(#\0 #\1 #\2 #\3)
-  '(do ((c (read-char is) (read-char is nil 'the-end)))
-      ((not (characterp c)) test)
-   (setq test (append test (list c)))))
-(close is)
-(setq is (make-string-input-stream "abc"))
-(eql-test #\a #'read-char is)
-(eql-test #\b #'read-char is)
-(eql-test #\c #'read-char is)
-(error-test #'read-char is)
-(eq-test nil #'read-char is nil)
-(eq-test :end-of-string #'read-char is nil :end-of-string)
-(eq-test t #'close is)
-
-;; read-char-no-hang                   - function
-(setq is (make-string-input-stream "0123"))
-(setq test nil)
-(equal-eval '(#\0 #\1 #\2 #\3)
-  '(do ((c (read-char-no-hang is) (read-char-no-hang is nil 'the-end)))
-      ((not (characterp c)) test)
-   (setq test (append test (list c)))))
-(close is)
-(setq is (make-string-input-stream "abc"))
-(eql-test #\a #'read-char-no-hang is)
-(eql-test #\b #'read-char-no-hang is)
-(eql-test #\c #'read-char-no-hang is)
-(error-test #'read-char-no-hang is)
-(eq-test nil #'read-char-no-hang is nil)
-(eq-test :end-of-string #'read-char-no-hang is nil :end-of-string)
-(eq-test t #'close is)
-#+(and xedit unix)
-(progn
-    ;; wait one second for input pooling every 0.1 seconds
-    (defun wait-for-cat ()
-       (let ((time 0.0))
-           (loop
-               (and (listen is) (return))
-               (sleep 0.1)
-               (when (>= (incf time 0.1) 1.0)
-                   (format t "Cat is sleeping~%")
-                   (return)))))
-    (setq is (make-pipe "/bin/cat" :direction :io))
-    (equal-test "dog" #'write-line "dog" is)
-    (wait-for-cat)
-    (eql-test #\d #'read-char-no-hang is)
-    (eql-test #\o #'read-char-no-hang is)
-    (eql-test #\g #'read-char-no-hang is)
-    (eql-test #\Newline #'read-char-no-hang is)
-    (eq-test nil #'read-char-no-hang is)
-    (eq-test nil #'read-char-no-hang is)
-    (equal-test "mouse" #'write-line "mouse" is)
-    (wait-for-cat)
-    (eql-test #\m #'read-char-no-hang is)
-    (eql-test #\o #'read-char-no-hang is)
-    (eql-test #\u #'read-char-no-hang is)
-    (eql-test #\s #'read-char-no-hang is)
-    (eql-test #\e #'read-char-no-hang is)
-    (eql-test #\Newline #'read-char-no-hang is)
-    (eq-test nil #'read-char-no-hang is)
-    (eq-test t #'close is)
-    (error-test #'read-char-no-hang is)
-    (error-test #'read-char-no-hang is nil)
-    (error-test #'read-char-no-hang is nil t)
-)
-
-;; read-from-string                    - function
-(equal-eval '(3 5)
-  '(multiple-value-list (read-from-string " 1 3 5" t nil :start 2)))
-(equal-eval '((a b c) 7)
-  '(multiple-value-list (read-from-string "(a b c)")))
-(error-test #'read-from-string "")
-(eq-test nil #'read-from-string "" nil)
-(eq-test 'end-of-file #'read-from-string "" nil 'end-of-file)
-
-;; read-line                           - function
-(setq is (make-string-input-stream "line 1
-line 2"))
-(equal-eval '("line 1" nil) '(multiple-value-list (read-line is)))
-(equal-eval '("line 2" t) '(multiple-value-list (read-line is)))
-(error-test #'read-line is)
-(equal-eval '(nil t) '(multiple-value-list (read-line is nil)))
-(equal-eval '(end-of-string t)
-  '(multiple-value-list (read-line is nil 'end-of-string)))
-
-
-;; write                               - function
-;; XXX several write options still missing
-(setq os (make-string-output-stream))
-(equal-test '(1 2 3 4) #'write '(1 2 3 4) :stream os)
-(equal-test "(1 2 3 4)" #'get-output-stream-string os)
-(eq-test t #'streamp os)
-(eq-test t #'output-stream-p os)
-(eq-test nil #'input-stream-p os)
-(equal-test '(:foo :bar) #'write '(:foo :bar) :case :downcase :stream os)
-(equal-test "(:foo :bar)" #'get-output-stream-string os)
-(equal-test '(:foo :bar) #'write '(:foo :bar) :case :capitalize :stream os)
-(equal-test "(:Foo :Bar)" #'get-output-stream-string os)
-(equal-test '(:foo :bar) #'write '(:foo :bar) :case :upcase :stream os)
-(equal-test "(:FOO :BAR)" #'get-output-stream-string os)
-(equal-test '(foo bar baz) #'write '(foo bar baz) :length 2 :stream os)
-(equal-test "(FOO BAR ...)" #'get-output-stream-string os)
-(equal-test '(foo (bar) baz) #'write '(foo (bar) baz) :level 1 :stream os)
-(equal-test "(FOO # BAZ)" #'get-output-stream-string os)
-(setq circle '#1=(1 #1#))
-(eq-test circle #'write circle :circle t :stream os)
-(equal-test "#1=(1 #1#)" #'get-output-stream-string os)
-(eql-test #\Space #'write #\Space :stream os)
-(equal-test "#\\Space" #'get-output-stream-string os)
-(eql-test #\Space #'write #\Space :escape nil :stream os)
-(equal-test " " #'get-output-stream-string os)
-(eq-test t #'close os)
-(eq-test nil #'output-stream-p os)
-(error-test #'output-stream-p "test")
-(error-test #'write 'foo :stream "bar")
-
-;; fresh-line                          - function
-(setq os (make-string-output-stream))
-(equal-test "some text" #'write-string "some text" os)
-(eq-test t #'fresh-line os)
-(eq-test nil #'fresh-line os)
-(equal-test "more text" #'write-string "more text" os)
-(equal-test "some text
-more text" #'get-output-stream-string os)
-(equal-test nil #'fresh-line os)
-(equal-test nil #'fresh-line os)
-(equal-test "" #'get-output-stream-string os)
-(close os)
-(error-test #'fresh-line 1)
-
-;; prin1                               - function
-;;  (prin1 object stream) ==
-;;     (write object :stream stream :escape t)
-(setq p-os (make-string-output-stream) w-os (make-string-output-stream))
-(dolist (object (list #\a 1 "string" 2.5d0 '(a . b) '(a b c) #P"foo"
-                    *package* *standard-input* #c(1 2) #(1 2 3)
-                    (make-hash-table)))
-    (eq-test object #'prin1 object p-os)
-    (eq-test object #'write object :stream w-os :escape t)
-    (equal-test (get-output-stream-string p-os)
-       #'get-output-stream-string w-os))
-(close p-os)
-(close w-os)
-(error-test #'prin1 1 1)
-
-;; princ                               - function
-;;  (princ object stream) ==
-;;     (write object :stream stream :escape nil :readably nil)
-;; XXX readably not yet implemented
-(setq p-os (make-string-output-stream) w-os (make-string-output-stream))
-(dolist (object (list #\a 1 "string" 2.5d0 '(a . b) '(a b c) #P"foo"
-                    *package* *standard-input* #c(1 2) #(1 2 3)
-                    (make-hash-table)))
-    (eq-test object #'princ object p-os)
-    (eq-test object #'write object :stream w-os :escape nil)
-    (equal-test (get-output-stream-string p-os)
-       #'get-output-stream-string w-os))
-(close p-os)
-(close w-os)
-(error-test #'princ 1 1)
-
-;; print                               - function
-;;  (print object stream) ==
-;;     (progn
-;;         (terpri stream)
-;;         (write object :stream stream :escape t)
-;;         (write-char #\Space stream))
-(setq p-os (make-string-output-stream) w-os (make-string-output-stream))
-(dolist (object (list #\a 1 "string" 2.5d0 '(a . b) '(a b c) #P"foo"
-                    *package* *standard-input* #c(1 2) #(1 2 3)
-                    (make-hash-table)))
-    (eq-test object #'print object p-os)
-    (progn
-       (eq-test nil #'terpri w-os)
-       (eq-test object #'write object :stream w-os :escape t)
-       (eql-test #\Space #'write-char #\Space w-os))
-    (equal-test (get-output-stream-string p-os)
-       #'get-output-stream-string w-os))
-(close p-os)
-(close w-os)
-(error-test #'print 1 1)
-
-;; terpri                              - function
-(setq os (make-string-output-stream))
-(equal-test "some text" #'write-string "some text" os)
-(eq-test nil #'terpri os)
-(eq-test nil #'terpri os)
-(equal-test "more text" #'write-string "more text" os)
-(equal-test "some text
-
-more text" #'get-output-stream-string os)
-(equal-test nil #'terpri os)
-(equal-test nil #'terpri os)
-(equal-test "
-
-" #'get-output-stream-string os)
-(close os)
-(error-test #'terpri 1)
-
-;; write-char                          - function
-(equal-eval "a b"
-    '(with-output-to-string (s) 
-       (write-char #\a s)
-       (write-char #\Space s)
-       (write-char #\b s)))
-(error-test #'write-char 1)
-
-;; write-line                          - function
-(setq os (make-string-output-stream))
-(equal-test "text" #'write-line "text" os)
-(equal-test "text
-" #'get-output-stream-string os)
-(eql-test #\< #'write-char #\< os)
-(equal-test "text" #'write-line "text" os :start 1 :end 3)
-(eql-test #\> #'write-char #\> os)
-(equal-test "<ex
->" #'get-output-stream-string os)
-(error-test #'write-line 1)
-(close os)
-
-;; write-string                                - function
-(setq os (make-string-output-stream))
-(equal-test "text" #'write-string "text" os)
-(equal-test "text" #'get-output-stream-string os)
-(eql-test #\< #'write-char #\< os)
-(equal-test "text" #'write-string "text" os :start 1 :end 3)
-(eql-test #\> #'write-char #\> os)
-(equal-test "<ex>" #'get-output-stream-string os)
-(error-test #'write-string #\a)
-(close os)
-
-
-;; open                                        - function
-(setq name #P"delete-me.text")
-(bool-eval t '(setq file (open name :direction :output)))
-(equal-test "some text" #'write-line "some text" file)
-(close file)
-(equal-test "delete-me.text" #'file-namestring (truename name))
-(setq file (open name :direction :output :if-exists :rename))
-(equal-test "other text" #'write-line "other text" file)
-(close file)
-(equal-test "delete-me.text" #'file-namestring (truename name))
-;; Clisp returns the pathname if the file exists
-#+xedit (eq-test t #'delete-file name)
-#+clisp (bool-test t #'delete-file name)
-(setq backup
-       #+xedit "delete-me.text~"
-       #+clisp "delete-me.text%"
-       #+cmu "delete-me.text.BAK")
-(bool-test t #'delete-file backup)
-(eq-test nil #'delete-file name)
-(eq-test nil #'directory name)
-(eq-test nil #'directory backup)
-;; test append
-(with-open-file (s name :direction :output :if-exists :error)
-    (write-line "line 1" s))
-(with-open-file (s name :direction :output :if-exists :append)
-    (write-line "line 2" s))
-(with-open-file (s name :direction :input)
-    (equal-test "line 1" #'read-line s)
-    (equal-test "line 2" #'read-line s)
-    (eq-test 'eof #'read-line s nil 'eof)
-)
-(bool-test t #'delete-file name)
-;; test overwrite
-(with-open-file (s name :direction :output :if-exists :error)
-    (write-line "overwrite-me" s))
-(with-open-file (s name :direction :output :if-exists :overwrite)
-    (write-line "some-text" s))
-(with-open-file (s name :direction :input)
-    (equal-test "some-text" #'read-line s)
-    (eq-test 'eof #'read-line s nil 'eof))
-;; test check for file existence
-(eq-test nil #'open name :direction :output :if-exists nil)
-(error-test #'open name :direction :output :if-exists :error)
-(bool-test t #'delete-file name)
-;; test check for no file existence
-(eq-test nil #'open name :direction :output :if-does-not-exist nil)
-(error-test #'open name :direction :output :if-does-not-exist :error)
-#+xedit        ;; test io -- not sure if this is the expected behaviour
-(progn
-    (with-open-file (s name :direction :io)
-       (write-line "foo" s)
-       (write-line "bar" s))
-    (with-open-file (s name :direction :io :if-exists :append)
-       (equal-test "foo" #'read-line s)
-       (equal-test "bar" #'read-line s)
-       (eq-test 'eof #'read-line s nil 'eof)
-       (write-line "baz" s))
-    (with-open-file (s name :direction :io :if-exists :append)
-       (equal-test "foo" #'read-line s)
-       (equal-test "bar" #'read-line s)
-       (equal-test "baz" #'read-line s)
-       (eq-test 'eof #'read-line s nil 'eof))
-    (bool-test t #'delete-file name)
-)
-
-;; delete-file                         - function
-(eq-eval nil
-    '(with-open-file (s "delete-me.text" :direction :output :if-exists :error)))
-(eq-test t #'pathnamep (setq p (probe-file "delete-me.text")))
-(bool-test t #'delete-file p)
-(eq-test nil #'probe-file "delete-me.text")
-(bool-eval t
-    '(with-open-file (s "delete-me.text" :direction :output :if-exists :error)
-       (delete-file s)))
-(bool-test nil #'probe-file "delete-me.text")
-
-;; rename-file                         - function
-(setq name "foo.bar")
-(bool-eval t '(setq file (open name :direction :output :if-exists :error)))
-(eq-test t #'close file)
-(setq result (multiple-value-list (rename-file name "bar.foo")))
-(eql-test 3 #'length result)
-(eq-test t #'pathnamep (first result))
-(eq-test t #'pathnamep (second result))
-(eq-test t #'pathnamep (third result))
-(equal-test (third result) #'truename "bar.foo")
-(eq-test nil #'directory name)
-(eq-test nil #'directory (second result))
-(equal-test (list (third result)) #'directory (third result))
-(error-test #'truename name)
-(error-test #'truename (second result))
-(eq-test nil #'probe-file name)
-(bool-test t #'probe-file (first result))
-(eq-test nil #'probe-file (second result))
-(bool-test t #'probe-file (third result))
-(bool-test t #'delete-file "bar.foo")
-(eq-test nil #'delete-file (third result))
-(eq-test nil #'delete-file (second result))
diff --git a/xedit/lisp/test/widgets.lsp b/xedit/lisp/test/widgets.lsp
deleted file mode 100644 (file)
index 9624720..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-;;
-;; Copyright (c) 2001 by The XFree86 Project, Inc.
-;;
-;; Permission is hereby granted, free of charge, to any person obtaining a
-;; copy of this software and associated documentation files (the "Software"),
-;; to deal in the Software without restriction, including without limitation
-;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
-;; and/or sell copies of the Software, and to permit persons to whom the
-;; Software is furnished to do so, subject to the following conditions:
-;;
-;; The above copyright notice and this permission notice shall be included in
-;; all copies or substantial portions of the Software.
-;;  
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-;; THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-;; SOFTWARE.
-;;
-;; Except as contained in this notice, the name of the XFree86 Project shall
-;; not be used in advertising or otherwise to promote the sale, use or other
-;; dealings in this Software without prior written authorization from the
-;; XFree86 Project.
-;;
-;; Author: Paulo César Pereira de Andrade
-;;
-;;
-;; $XFree86: xc/programs/xedit/lisp/test/widgets.lsp,v 1.1 2001/08/31 15:00:15 paulo Exp $
-;;
-(require "xaw")
-(require "xt")
-
-(defun quit-callback (widget user call) (quit))
-
-(setq toplevel
-    (xt-app-initialize 'appcontext "Widgets"
-       '(("title" . "Widgets (without customization)"))))
-
-(setq vpane
-    (xt-create-managed-widget "vpane" paned-widget-class toplevel))
-(setq form
-    (xt-create-managed-widget "form" form-widget-class vpane))
-(xt-create-managed-widget "command" command-widget-class form
-    '(("label" . "Command Widget")))
-(xt-create-managed-widget "label" label-widget-class form
-    '(("label" . "Label Widget") ("fromVert" . "command")))
-(xt-create-managed-widget "button" menu-button-widget-class form
-    '(("label" . "MenuButton Widget") ("fromVert" . "label")))
-
-(setq popup
-    (xt-create-managed-widget "menu" simple-menu-widget-class toplevel))
-(xt-create-managed-widget "smebsb" sme-bsb-object-class popup
-    '(("label" . "SmeBSB Object")))
-(xt-create-managed-widget "smeline" sme-line-object-class popup)
-(xt-create-managed-widget "smebsb2" sme-bsb-object-class popup
-    '(("label" . "SmeBSB Object two")))
-
-(xt-create-managed-widget "toggle" toggle-widget-class form
-    '(("label" . "Toggle Widget") ("fromVert" . "button")))
-(xt-create-managed-widget "repeater" repeater-widget-class form
-    '(("label" . "Repeater Widget") ("fromVert" . "toggle")))
-
-(setq quit
-    (xt-create-managed-widget "quit" command-widget-class vpane
-       '(("label" . "Quit"))))
-(xt-add-callback quit "callback" 'quit-callback)
-
-(xt-realize-widget toplevel)
-(xt-app-main-loop appcontext)
diff --git a/xedit/lisp/time.c b/xedit/lisp/time.c
deleted file mode 100644 (file)
index 763ca58..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/time.c,v 1.9tsi Exp $ */
-
-#include "lisp/time.h"
-#include "lisp/bytecode.h"
-
-/*
- * Implementation
-*/
-LispObj *
-Lisp_Time(LispBuiltin *builtin)
-/*
- time form
- */
-{
-#ifndef __UNIXOS2__
-    struct itimerval real, virt, prof;
-    unsigned long count;
-    long sec, usec;
-    LispObj *result;
-#define MONTH  60 * 60 * 31
-
-    LispObj *form;
-
-    form = ARGUMENT(0);
-
-    real.it_value.tv_sec =
-       virt.it_value.tv_sec =
-       prof.it_value.tv_sec =
-       real.it_interval.tv_sec =
-       virt.it_interval.tv_sec =
-       prof.it_interval.tv_sec = MONTH;
-    real.it_value.tv_usec =
-       virt.it_value.tv_usec =
-       prof.it_value.tv_usec =
-       real.it_interval.tv_usec =
-       virt.it_interval.tv_usec =
-       prof.it_interval.tv_usec = 0;
-
-    setitimer(ITIMER_REAL, &real, NULL);
-    setitimer(ITIMER_VIRTUAL, &virt, NULL);
-    setitimer(ITIMER_PROF, &prof, NULL);
-
-    getitimer(ITIMER_REAL, &real);
-    getitimer(ITIMER_VIRTUAL, &virt);
-    getitimer(ITIMER_PROF, &prof);
-
-    lisp__data.gc.gctime = 0;
-    lisp__data.gc.timebits = 1;
-
-    count = lisp__data.gc.count;
-
-#if 0
-    form = CONS(form, NIL);
-    COD = CONS(form, COD);
-    result = LispExecuteBytecode(LispCompileForm(form));
-#else
-    result = EVAL(form);
-#endif
-
-    getitimer(ITIMER_REAL, &real);
-    getitimer(ITIMER_VIRTUAL, &virt);
-    getitimer(ITIMER_PROF, &prof);
-
-    sec = real.it_interval.tv_sec - real.it_value.tv_sec;
-    usec = real.it_interval.tv_usec - real.it_value.tv_usec;
-    if (usec < 0) {
-       --sec;
-       usec += 1000000;
-    }
-    LispMessage("Real time   : %g sec", sec + usec / 1000000.0);
-
-    sec = virt.it_interval.tv_sec - virt.it_value.tv_sec;
-    usec = virt.it_interval.tv_usec - virt.it_value.tv_usec + 10000;
-    if (usec < 0) {
-       --sec;
-       usec += 1000000;
-    }
-    LispMessage("Virtual time: %g sec", sec + usec / 1000000.0);
-
-    sec = prof.it_interval.tv_sec - prof.it_value.tv_sec;
-    usec = prof.it_interval.tv_usec - prof.it_value.tv_usec + 10000;
-    if (usec < 0) {
-       --sec;
-       usec += 1000000;
-    }
-    LispMessage("Profile time: %g sec", sec + usec / 1000000.0);
-
-    real.it_value.tv_sec =
-       virt.it_value.tv_sec =
-       prof.it_value.tv_sec =
-       real.it_interval.tv_sec =
-       virt.it_interval.tv_sec =
-       prof.it_interval.tv_sec =
-       real.it_value.tv_usec =
-       virt.it_value.tv_usec =
-       prof.it_value.tv_usec =
-       real.it_interval.tv_usec =
-       virt.it_interval.tv_usec =
-       prof.it_interval.tv_usec = 0;
-
-    setitimer(ITIMER_REAL, &real, NULL);
-    setitimer(ITIMER_VIRTUAL, &virt, NULL);
-    setitimer(ITIMER_PROF, &prof, NULL);
-
-    LispMessage("GC: %ld times, %g sec",
-               lisp__data.gc.count - count, lisp__data.gc.gctime / 1000000.0);
-    lisp__data.gc.timebits = 0;
-
-    return (result);
-#else
-    LispMessage("\"Lisp_Time\" not implemented under OS/2");
-    return (NIL);
-#endif
-}
diff --git a/xedit/lisp/time.h b/xedit/lisp/time.h
deleted file mode 100644 (file)
index ab3dcd3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/time.h,v 1.3tsi Exp $ */
-
-#ifndef Lisp_time_h
-#define Lisp_time_h
-
-#include "lisp/private.h"
-
-LispObj *Lisp_Time(LispBuiltin*);
-
-#endif /* Lisp_time_h */
diff --git a/xedit/lisp/write.c b/xedit/lisp/write.c
deleted file mode 100644 (file)
index 6c7d979..0000000
+++ /dev/null
@@ -1,2406 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/write.c,v 1.31tsi Exp $ */
-
-#include "lisp/write.h"
-#include "lisp/hash.h"
-#include <math.h>
-#include <ctype.h>
-
-#define        FLOAT_PREC      17
-
-#define UPCASE         0
-#define DOWNCASE       1
-#define CAPITALIZE     2
-
-#define INCDEPTH()                                                     \
-    if (++info->depth > MAX_STACK_DEPTH / 2)                           \
-       LispDestroy("stack overflow")
-#define DECDEPTH()     --info->depth
-
-/*
- * Types
- */
-typedef struct _circle_info {
-    long circle_nth;           /* nth circular list */
-    LispObj *object;           /* the circular object */
-} circle_info;
-
-typedef struct _write_info {
-    long depth;
-    long level;                        /* current level */
-    long length;               /* current length */
-    long print_level;          /* *print-level* when started printing */
-    long print_length;         /* *print-length* when started printing */
-
-    int print_escape;
-    int print_case;
-
-    long circle_count;
-    /* used while building circle info */
-    LispObj **objects;
-    long num_objects;
-    /* the circular lists */
-    circle_info *circles;
-    long num_circles;
-} write_info;
-
-/*
- * Prototypes
- */
-static void check_stream(LispObj*, LispFile**, LispString**, int);
-static void parse_double(char*, int*, double, int);
-static int float_string_inc(char*, int);
-static void format_integer(char*, long, int);
-static int LispWriteCPointer(LispObj*, void*);
-static int LispWriteCString(LispObj*, char*, long, write_info*);
-static int LispDoFormatExponentialFloat(LispObj*, LispObj*,
-                                       int, int, int*, int, int,
-                                       int, int, int, int);
-
-static int LispWriteInteger(LispObj*, LispObj*);
-static int LispWriteCharacter(LispObj*, LispObj*, write_info*);
-static int LispWriteString(LispObj*, LispObj*, write_info*);
-static int LispWriteFloat(LispObj*, LispObj*);
-static int LispWriteAtom(LispObj*, LispObj*, write_info*);
-static int LispDoWriteAtom(LispObj*, char*, int, int);
-static int LispWriteList(LispObj*, LispObj*, write_info*, int);
-static int LispWriteArray(LispObj*, LispObj*, write_info*);
-static int LispWriteStruct(LispObj*, LispObj*, write_info*);
-static int LispDoWriteObject(LispObj*, LispObj*, write_info*, int);
-static void LispBuildCircle(LispObj*, write_info*);
-static void LispDoBuildCircle(LispObj*, write_info*);
-static long LispCheckCircle(LispObj*, write_info*);
-static int LispPrintCircle(LispObj*, LispObj*, long, int*, write_info*);
-static int LispWriteAlist(LispObj*, LispArgList*, write_info*);
-
-/*
- * Initialization
- */
-LispObj *Oprint_level, *Oprint_length, *Oprint_circle,
-       *Oprint_escape, *Oprint_case;
-LispObj *Kupcase, *Kdowncase, *Kcapitalize;
-
-/*
- * Implementation
- */
-void
-LispWriteInit(void)
-{
-    Oprint_level       = STATIC_ATOM("*PRINT-LEVEL*");
-    LispProclaimSpecial(Oprint_level, NIL, NIL);
-    LispExportSymbol(Oprint_level);
-
-    Oprint_length      = STATIC_ATOM("*PRINT-LENGTH*");
-    LispProclaimSpecial(Oprint_length, NIL, NIL);
-    LispExportSymbol(Oprint_length);
-
-    Oprint_circle      = STATIC_ATOM("*PRINT-CIRCLE*");
-    LispProclaimSpecial(Oprint_circle, T, NIL);
-    LispExportSymbol(Oprint_circle);
-
-    Oprint_escape      = STATIC_ATOM("*PRINT-ESCAPE*");
-    LispProclaimSpecial(Oprint_escape, T, NIL);
-    LispExportSymbol(Oprint_escape);
-
-    Kupcase            = KEYWORD("UPCASE");
-    Kdowncase          = KEYWORD("DOWNCASE");
-    Kcapitalize                = KEYWORD("CAPITALIZE");
-    Oprint_case                = STATIC_ATOM("*PRINT-CASE*");
-    LispProclaimSpecial(Oprint_case, Kupcase, NIL);
-    LispExportSymbol(Oprint_case);
-}
-
-LispObj *
-Lisp_FreshLine(LispBuiltin *builtin)
-/*
- fresh-line &optional output-stream
- */
-{
-    LispObj *output_stream;
-
-    output_stream = ARGUMENT(0);
-
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    else if (output_stream != NIL) {
-       CHECK_STREAM(output_stream);
-    }
-    if (LispGetColumn(output_stream)) {
-       LispWriteChar(output_stream, '\n');
-       if (output_stream == NIL ||
-           (output_stream->data.stream.type == LispStreamStandard &&
-            output_stream->data.stream.source.file == Stdout))
-           LispFflush(Stdout);
-       return (T);
-    }
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Prin1(LispBuiltin *builtin)
-/*
- prin1 object &optional output-stream
- */
-{
-    LispObj *object, *output_stream;
-
-    output_stream = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    LispPrint(object, output_stream, 0);
-
-    return (object);
-}
-
-LispObj *
-Lisp_Princ(LispBuiltin *builtin)
-/*
- princ object &optional output-stream
- */
-{
-    int head;
-    LispObj *object, *output_stream;
-
-    output_stream = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    head = lisp__data.env.length;
-    LispAddVar(Oprint_escape, NIL);
-    ++lisp__data.env.head;
-    LispPrint(object, output_stream, 0);
-    lisp__data.env.head = lisp__data.env.length = head;
-
-    return (object);
-}
-
-LispObj *
-Lisp_Print(LispBuiltin *builtin)
-/*
- print object &optional output-stream
- */
-{
-    LispObj *object, *output_stream;
-
-    output_stream = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    LispWriteChar(output_stream, '\n');
-    LispPrint(object, output_stream, 0);
-    LispWriteChar(output_stream, ' ');
-
-    return (object);
-}
-
-LispObj *
-Lisp_Terpri(LispBuiltin *builtin)
-/*
- terpri &optional output-stream
- */
-{
-    LispObj *output_stream;
-
-    output_stream = ARGUMENT(0);
-
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    else if (output_stream != NIL) {
-       CHECK_STREAM(output_stream);
-    }
-    LispWriteChar(output_stream, '\n');
-    if (output_stream == NIL ||
-       (output_stream->data.stream.type == LispStreamStandard &&
-        output_stream->data.stream.source.file == Stdout))
-       LispFflush(Stdout);
-
-    return (NIL);
-}
-
-LispObj *
-Lisp_Write(LispBuiltin *builtin)
-/*
- write object &key case circle escape length level lines pretty readably right-margin stream
- */
-{
-    int head = lisp__data.env.length;
-
-    LispObj *object, *ocase, *circle, *escape, *length, *level, *stream;
-
-    stream = ARGUMENT(10);
-    level = ARGUMENT(5);
-    length = ARGUMENT(4);
-    escape = ARGUMENT(3);
-    circle = ARGUMENT(2);
-    ocase = ARGUMENT(1);
-    object = ARGUMENT(0);
-
-    if (stream == UNSPEC)
-       stream = NIL;
-    else if (stream != NIL) {
-       CHECK_STREAM(stream);
-    }
-
-    /* prepare the printer environment */
-    if (circle != UNSPEC)
-       LispAddVar(Oprint_circle, circle);
-    if (length != UNSPEC)
-       LispAddVar(Oprint_length, length);
-    if (level != UNSPEC)
-       LispAddVar(Oprint_level, level);
-    if (ocase != UNSPEC)
-       LispAddVar(Oprint_case, ocase);
-    if (escape != UNSPEC)
-       LispAddVar(Oprint_escape, escape);
-
-    lisp__data.env.head = lisp__data.env.length;
-
-    (void)LispWriteObject(stream, object);
-
-    lisp__data.env.head = lisp__data.env.length = head;
-
-    return (object);
-}
-
-LispObj *
-Lisp_WriteChar(LispBuiltin *builtin)
-/*
- write-char character &optional output-stream
- */
-{
-    int ch;
-
-    LispObj *character, *output_stream;
-
-    output_stream = ARGUMENT(1);
-    character = ARGUMENT(0);
-
-    if (output_stream == UNSPEC)
-       output_stream = NIL;
-    CHECK_SCHAR(character);
-    ch = SCHAR_VALUE(character);
-
-    LispWriteChar(output_stream, ch);
-
-    return (character);
-}
-
-LispObj *
-Lisp_WriteLine(LispBuiltin *builtin)
-/*
- write-line string &optional output-stream &key start end
- */
-{
-    return (LispWriteString_(builtin, 1));
-}
-
-LispObj *
-Lisp_WriteString(LispBuiltin *builtin)
-/*
- write-string string &optional output-stream &key start end
- */
-{
-    return (LispWriteString_(builtin, 0));
-}
-
-
-int
-LispWriteObject(LispObj *stream, LispObj *object)
-{
-    write_info info;
-    int bytes;
-    LispObj *level, *length, *circle, *oescape, *ocase;
-
-    /* current state */
-    info.depth = info.level = info.length = 0;
-
-    /* maximum level to descend */
-    level = LispGetVar(Oprint_level);
-    if (level && INDEXP(level))
-       info.print_level = FIXNUM_VALUE(level);
-    else
-       info.print_level = -1;
-
-    /* maximum list length */
-    length = LispGetVar(Oprint_length);
-    if (length && INDEXP(length))
-       info.print_length = FIXNUM_VALUE(length);
-    else
-       info.print_length = -1;
-
-    /* detect circular/shared objects? */
-    circle = LispGetVar(Oprint_circle);
-    info.circle_count = 0;
-    info.objects = NULL;
-    info.num_objects = 0;
-    info.circles = NULL;
-    info.num_circles = 0;
-    if (circle && circle != NIL) {
-       LispBuildCircle(object, &info);
-       /* free this data now */
-       if (info.num_objects) {
-           LispFree(info.objects);
-           info.num_objects = 0;
-       }
-    }
-
-    /* escape characters and strings? */
-    oescape = LispGetVar(Oprint_escape);
-    if (oescape != NULL)
-       info.print_escape = oescape == NIL;
-    else
-       info.print_escape = -1;
-
-    /* don't use the default case printing? */
-    ocase = LispGetVar(Oprint_case);
-    if (ocase == Kdowncase)
-       info.print_case = DOWNCASE;
-    else if (ocase == Kcapitalize)
-       info.print_case = CAPITALIZE;
-    else
-       info.print_case = UPCASE;
-
-    bytes = LispDoWriteObject(stream, object, &info, 1);
-    if (circle && circle != NIL && info.num_circles)
-       LispFree(info.circles);
-
-    return (bytes);
-}
-
-static void
-LispBuildCircle(LispObj *object, write_info *info)
-{
-    LispObj *list;
-
-    switch (OBJECT_TYPE(object)) {
-       case LispCons_t:
-           LispDoBuildCircle(object, info);
-           break;
-       case LispArray_t:
-           /* Currently arrays are implemented as lists, but only
-            * the elements could/should be circular */
-           if (LispCheckCircle(object, info) >= 0)
-               return;
-           LispDoBuildCircle(object, info);
-           for (list = object->data.array.list;
-                CONSP(list); list = CDR(list))
-               LispBuildCircle(CAR(list), info);
-           break;
-       case LispStruct_t:
-           /* Like arrays, structs are currently implemented as lists,
-            * but only the elements could/should be circular */
-           if (LispCheckCircle(object, info) >= 0)
-               return;
-           LispDoBuildCircle(object, info);
-           for (list = object->data.struc.fields;
-                CONSP(list); list = CDR(list))
-               LispBuildCircle(CAR(list), info);
-           break;
-       case LispQuote_t:
-       case LispBackquote_t:
-       case LispFunctionQuote_t:
-           LispDoBuildCircle(object, info);
-           LispBuildCircle(object->data.quote, info);
-           break;
-       case LispComma_t:
-           LispDoBuildCircle(object, info);
-           LispBuildCircle(object->data.comma.eval, info);
-           break;
-       case LispLambda_t:
-           /* Circularity in a function body should fail elsewhere... */
-           if (LispCheckCircle(object, info) >= 0)
-               return;
-           LispDoBuildCircle(object, info);
-           LispBuildCircle(object->data.lambda.code, info);
-           break;
-       default:
-           break;
-    }
-}
-
-static void
-LispDoBuildCircle(LispObj *object, write_info *info)
-{
-    long i;
-
-    if (LispCheckCircle(object, info) >= 0)
-       return;
-
-    for (i = 0; i < info->num_objects; i++)
-       if (info->objects[i] == object) {
-           /* circularity found */
-           info->circles = LispRealloc(info->circles, sizeof(circle_info) *
-                                       (info->num_circles + 1));
-           info->circles[info->num_circles].circle_nth = 0;
-           info->circles[info->num_circles].object = object;
-           ++info->num_circles;
-           return;
-       }
-
-    /* object pointer not yet recorded */
-    if ((i % 16) == 0)
-       info->objects = LispRealloc(info->objects, sizeof(LispObj*) *
-                                   (info->num_objects + 16));
-    info->objects[info->num_objects++] = object;
-
-    if (CONSP(object)) {
-       if (CONSP(CAR(object)))
-           LispDoBuildCircle(CAR(object), info);
-       else
-           LispBuildCircle(CAR(object), info);
-       if (CONSP(CDR(object)))
-           LispDoBuildCircle(CDR(object), info);
-       else
-           LispBuildCircle(CDR(object), info);
-    }
-}
-
-static long
-LispCheckCircle(LispObj *object, write_info *info)
-{
-    long i;
-
-    for (i = 0; i < info->num_circles; i++)
-       if (info->circles[i].object == object)
-           return (i);
-
-    return (-1);
-}
-
-static int
-LispPrintCircle(LispObj *stream, LispObj *object, long circle,
-               int *length, write_info *info)
-{
-    char stk[32];
-
-    if (!info->circles[circle].circle_nth) {
-       sprintf(stk, "#%ld=", ++info->circle_count);
-       *length += LispWriteStr(stream, stk, strlen(stk));
-       info->circles[circle].circle_nth = info->circle_count;
-
-       return (1);
-    }
-    sprintf(stk, "#%ld#", info->circles[circle].circle_nth);
-    *length += LispWriteStr(stream, stk, strlen(stk));
-
-    return (0);
-}
-
-static int
-LispWriteAlist(LispObj *stream, LispArgList *alist, write_info *info)
-{
-    Atom_id name;
-    int i, length = 0, need_space = 0;
-
-#define WRITE_ATOM(object)                                             \
-    name = ATOMID(object);                                             \
-    length += LispDoWriteAtom(stream, name->value, name->length,       \
-                             info->print_case)
-#define WRITE_ATOMID(atomid)                                           \
-    length += LispDoWriteAtom(stream, atomid->value, atomid->length,   \
-                             info->print_case)
-#define WRITE_OBJECT(object)                                           \
-    length += LispDoWriteObject(stream, object, info, 1)
-#define WRITE_OPAREN()                                                 \
-    length += LispWriteChar(stream, '(')
-#define WRITE_SPACE()                                                  \
-    length += LispWriteChar(stream, ' ')
-#define WRITE_CPAREN()                                                 \
-    length += LispWriteChar(stream, ')')
-
-    WRITE_OPAREN();
-    for (i = 0; i < alist->normals.num_symbols; i++) {
-       WRITE_ATOM(alist->normals.symbols[i]);
-       if (i + 1 < alist->normals.num_symbols)
-           WRITE_SPACE();
-       else
-           need_space = 1;
-    }
-    if (alist->optionals.num_symbols) {
-       if (need_space)
-           WRITE_SPACE();
-       WRITE_ATOMID(Soptional);
-       WRITE_SPACE();
-       for (i = 0; i < alist->optionals.num_symbols; i++) {
-           WRITE_OPAREN();
-           WRITE_ATOM(alist->optionals.symbols[i]);
-           WRITE_SPACE();
-           WRITE_OBJECT(alist->optionals.defaults[i]);
-           if (alist->optionals.sforms[i]) {
-               WRITE_SPACE();
-               WRITE_ATOM(alist->optionals.sforms[i]);
-           }
-           WRITE_CPAREN();
-           if (i + 1 < alist->optionals.num_symbols)
-               WRITE_SPACE();
-       }
-       need_space = 1;
-    }
-    if (alist->keys.num_symbols) {
-       if (need_space)
-           WRITE_SPACE();
-       length += LispDoWriteAtom(stream, Skey->value, 4, info->print_case);
-       WRITE_SPACE();
-       for (i = 0; i < alist->keys.num_symbols; i++) {
-           WRITE_OPAREN();
-           if (alist->keys.keys[i]) {
-               WRITE_OPAREN();
-               WRITE_ATOM(alist->keys.keys[i]);
-               WRITE_SPACE();
-           }
-           WRITE_ATOM(alist->keys.symbols[i]);
-           if (alist->keys.keys[i])
-               WRITE_CPAREN();
-           WRITE_SPACE();
-           WRITE_OBJECT(alist->keys.defaults[i]);
-           if (alist->keys.sforms[i]) {
-               WRITE_SPACE();
-               WRITE_ATOM(alist->keys.sforms[i]);
-           }
-           WRITE_CPAREN();
-           if (i + 1 < alist->keys.num_symbols)
-               WRITE_SPACE();
-       }
-       need_space = 1;
-    }
-    if (alist->rest) {
-       if (need_space)
-           WRITE_SPACE();
-       WRITE_ATOMID(Srest);
-       WRITE_SPACE();
-       WRITE_ATOM(alist->rest);
-       need_space = 1;
-    }
-    if (alist->auxs.num_symbols) {
-       if (need_space)
-           WRITE_SPACE();
-       WRITE_ATOMID(Saux);
-       WRITE_SPACE();
-       for (i = 0; i < alist->auxs.num_symbols; i++) {
-           WRITE_OPAREN();
-           WRITE_ATOM(alist->auxs.symbols[i]);
-           WRITE_SPACE();
-           WRITE_OBJECT(alist->auxs.initials[i]);
-           WRITE_CPAREN();
-           if (i + 1 < alist->auxs.num_symbols)
-               WRITE_SPACE();
-       }
-    }
-    WRITE_CPAREN();
-
-#undef WRITE_ATOM
-#undef WRITE_ATOMID
-#undef WRITE_OBJECT
-#undef WRITE_OPAREN
-#undef WRITE_SPACE
-#undef WRITE_CPAREN
-
-    return (length);
-}
-
-static void
-check_stream(LispObj *stream,
-            LispFile **file, LispString **string, int check_writable)
-{
-    /* NIL is UNIX stdout, *STANDARD-OUTPUT* may not be UNIX stdout */
-    if (stream == NIL) {
-       *file = Stdout;
-       *string = NULL;
-    }
-    else {
-       if (!STREAMP(stream))
-           LispDestroy("%s is not a stream", STROBJ(stream));
-       if (check_writable && !stream->data.stream.writable)
-           LispDestroy("%s is not writable", STROBJ(stream));
-       else if (stream->data.stream.type == LispStreamString) {
-           *string = SSTREAMP(stream);
-           *file = NULL;
-       }
-       else {
-           if (stream->data.stream.type == LispStreamPipe)
-               *file = OPSTREAMP(stream);
-           else
-               *file = stream->data.stream.source.file;
-           *string = NULL;
-       }
-    }
-}
-
-/* Assumes buffer has enough storage, 64 bytes should be more than enough */
-static void
-parse_double(char *buffer, int *exponent, double value, int d)
-{
-    char stk[64], fmt[32], *ptr, *fract = NULL;
-    int positive = value >= 0.0;
-
-parse_double_again:
-    if (d >= 8) {
-       double dcheck;
-       int icheck, count;
-
-       /* this should to do the correct rounding */
-       for (count = 2;  count >= 0; count--) {
-           icheck = d <= 0 ? 0 : d > FLOAT_PREC ? FLOAT_PREC - count : d - count;
-           sprintf(fmt, "%%.%de", icheck);
-           sprintf(stk, fmt, value);
-           if (count) {
-               /* if the value read back is the same formatted */
-               sscanf(stk, "%lf", &dcheck);
-               if (dcheck == value)
-                   break;
-           }
-       }
-    }
-    else {
-       sprintf(fmt, "%%.%de", d <= 0 ? 0 : d > FLOAT_PREC ? FLOAT_PREC : d);
-       sprintf(stk, fmt, value);
-    }
-
-    /* this "should" never fail */
-    ptr = strchr(stk, 'e');
-    if (ptr) {
-       *ptr++ = '\0';
-       *exponent = atoi(ptr);
-    }
-    else
-       *exponent = 0;
-
-    /* find start of number representation */
-    for (ptr = stk; *ptr && !isdigit(*ptr); ptr++)
-       ;
-
-    /* check if did not trim any significant digit,
-     * this may happen because '%.e' puts only one digit before the '.' */
-    if (d > 0 && d < FLOAT_PREC && fabs(value) >= 10.0 &&
-       strlen(ptr) - 1 - !positive <= *exponent) {
-       d += *exponent - (strlen(ptr) - 1 - !positive) + 1;
-       goto parse_double_again;
-    }
-
-    /* this "should" never fail */
-    fract = strchr(ptr, '.');
-    if (fract)
-       *fract++ = '\0';
-
-    /* store number representation in buffer */
-    *buffer = positive ? '+' : '-';
-    strcpy(buffer + 1, ptr);
-    if (fract)
-       strcpy(buffer + strlen(buffer), fract);
-}
-
-static void
-format_integer(char *buffer, long value, int radix)
-{
-    if (radix == 10)
-       sprintf(buffer, "%ld", value);
-    else if (radix == 16)
-       sprintf(buffer, "%lx", value);
-    else if (radix == 8)
-       sprintf(buffer, "%lo", value);
-    else {
-       /* use bignum routine to convert number to string */
-       mpi integer;
-
-       mpi_init(&integer);
-       mpi_seti(&integer, value);
-       mpi_getstr(buffer, &integer, radix);
-       mpi_clear(&integer);
-    }
-}
-
-static int
-LispWriteCPointer(LispObj *stream, void *data)
-{
-    char stk[32];
-
-#ifdef LONG64
-    sprintf(stk, "0x%016lx", (long)data);
-#else
-    sprintf(stk, "0x%08lx", (long)data);
-#endif
-
-    return (LispWriteStr(stream, stk, strlen(stk)));
-}
-
-static int
-LispWriteCString(LispObj *stream, char *string, long length, write_info *info)
-{
-    int result;
-
-    if (!info->print_escape) {
-       char *base, *ptr, *end;
-
-       result = LispWriteChar(stream, '"');
-       for (base = ptr = string, end = string + length; ptr < end; ptr++) {
-           if (*ptr == '\\' || *ptr == '"') {
-               result += LispWriteStr(stream, base, ptr - base);
-               result += LispWriteChar(stream, '\\');
-               result += LispWriteChar(stream, *ptr);
-               base = ptr + 1;
-           }
-       }
-       result += LispWriteStr(stream, base, end - base);
-       result += LispWriteChar(stream, '"');
-    }
-    else
-       result = LispWriteStr(stream, string, length);
-
-    return (result);
-}
-
-static int
-LispWriteList(LispObj *stream, LispObj *object, write_info *info, int paren)
-{
-    int length = 0;
-    long circle = 0;
-
-    INCDEPTH();
-    if (info->print_level < 0 || info->level <= info->print_level) {
-       LispObj *car, *cdr;
-       long print_length = info->length;
-
-       if (info->circles && (circle = LispCheckCircle(object, info)) >= 0) {
-           if (!paren) {
-               length += LispWriteStr(stream, ". ", 2);
-               paren = 1;
-           }
-           if (LispPrintCircle(stream, object, circle, &length, info) == 0) {
-               DECDEPTH();
-
-               return (length);
-           }
-       }
-
-       car = CAR(object);
-       cdr = CDR(object);
-
-       if (cdr == NIL) {
-           if (paren)
-               length += LispWriteChar(stream, '(');
-           if (info->print_length < 0 || info->length < info->print_length) {
-               info->length = 0;
-               length += LispDoWriteObject(stream, car, info, 1);
-               info->length = print_length + 1;
-           }
-           else
-               length += LispWriteStr(stream, "...", 3);
-           if (paren)
-               length += LispWriteChar(stream, ')');
-       }
-       else {
-           if (paren)
-               length += LispWriteChar(stream, '(');
-           if (info->print_length < 0 || info->length < info->print_length) {
-               info->length = 0;
-               length += LispDoWriteObject(stream, car, info, 1);
-               info->length = print_length + 1;
-               if (!CONSP(cdr)) {
-                   length += LispWriteStr(stream, " . ", 3);
-                   info->length = 0;
-                   length += LispDoWriteObject(stream, cdr, info, 0);
-               }
-               else {
-                   length += LispWriteChar(stream, ' ');
-                   if (info->print_length < 0 ||
-                       info->length < info->print_length)
-                       length += LispWriteList(stream, cdr, info, 0);
-                   else
-                       length += LispWriteStr(stream, "...", 3);
-               }
-           }
-           else
-               length += LispWriteStr(stream, "...", 3);
-           if (paren)
-               length += LispWriteChar(stream, ')');
-       }
-       info->length = print_length;
-    }
-    else
-       length += LispWriteChar(stream, '#');
-    DECDEPTH();
-
-    return (length);
-}
-
-static int
-LispDoWriteObject(LispObj *stream, LispObj *object, write_info *info, int paren)
-{
-    long print_level;
-    int length = 0;
-    char stk[64], *string = NULL;
-
-write_again:
-    switch (OBJECT_TYPE(object)) {
-       case LispNil_t:
-           if (object == NIL)
-               string = Snil->value;
-           else if (object == T)
-               string = St->value;
-           else if (object == DOT)
-               string = "#<DOT>";
-           else if (object == UNSPEC)
-               string = "#<UNSPEC>";
-           else if (object == UNBOUND)
-               string = "#<UNBOUND>";
-           else
-               string = "#<ERROR>";
-           length += LispDoWriteAtom(stream, string, strlen(string),
-                                     info->print_case);
-           break;
-       case LispOpaque_t: {
-           char *desc = LispIntToOpaqueType(object->data.opaque.type);
-
-           length += LispWriteChar(stream, '#');
-           length += LispWriteCPointer(stream, object->data.opaque.data);
-           length += LispWriteStr(stream, desc, strlen(desc));
-       }   break;
-       case LispAtom_t:
-           length += LispWriteAtom(stream, object, info);
-           break;
-       case LispFunction_t:
-           if (object->data.atom->a_function) {
-               object = object->data.atom->property->fun.function;
-               goto write_lambda;
-           }
-           length += LispWriteStr(stream, "#<", 2);
-           if (object->data.atom->a_compiled)
-               LispDoWriteAtom(stream, "COMPILED", 8, info->print_case);
-           else if (object->data.atom->a_builtin)
-               LispDoWriteAtom(stream, "BUILTIN", 7, info->print_case);
-           /* XXX the function does not exist anymore */
-           /* FIXME not sure if I want this fixed... */
-           else
-               LispDoWriteAtom(stream, "UNBOUND", 7, info->print_case);
-           LispDoWriteAtom(stream, "-FUNCTION", 9, info->print_case);
-           length += LispWriteChar(stream, ' ');
-           length += LispWriteAtom(stream, object->data.atom->object, info);
-           length += LispWriteChar(stream, '>');
-           break;
-       case LispString_t:
-           length += LispWriteString(stream, object, info);
-           break;
-       case LispSChar_t:
-           length += LispWriteCharacter(stream, object, info);
-           break;
-       case LispDFloat_t:
-           length += LispWriteFloat(stream, object);
-           break;
-       case LispFixnum_t:
-       case LispInteger_t:
-       case LispBignum_t:
-           length += LispWriteInteger(stream, object);
-           break;
-       case LispRatio_t:
-           format_integer(stk, object->data.ratio.numerator, 10);
-           length += LispWriteStr(stream, stk, strlen(stk));
-           length += LispWriteChar(stream, '/');
-           format_integer(stk, object->data.ratio.denominator, 10);
-           length += LispWriteStr(stream, stk, strlen(stk));
-           break;
-       case LispBigratio_t: {
-           int sz;
-           char *ptr;
-
-           sz = mpi_getsize(mpr_num(object->data.mp.ratio), 10) + 1 +
-                mpi_getsize(mpr_den(object->data.mp.ratio), 10) + 1 +
-                (mpi_sgn(mpr_num(object->data.mp.ratio)) < 0);
-           if (sz > sizeof(stk))
-               ptr = LispMalloc(sz);
-           else
-               ptr = stk;
-           mpr_getstr(ptr, object->data.mp.ratio, 10);
-           length += LispWriteStr(stream, ptr, sz - 1);
-           if (ptr != stk)
-               LispFree(ptr);
-       }   break;
-       case LispComplex_t:
-           length += LispWriteStr(stream, "#C(", 3);
-           length += LispDoWriteObject(stream,
-                                       object->data.complex.real, info, 0);
-           length += LispWriteChar(stream, ' ');
-           length += LispDoWriteObject(stream,
-                                       object->data.complex.imag, info, 0);
-           length += LispWriteChar(stream, ')');
-           break;
-       case LispCons_t:
-           print_level = info->level;
-           ++info->level;
-           length += LispWriteList(stream, object, info, paren);
-           info->level = print_level;
-           break;
-       case LispQuote_t:
-           length += LispWriteChar(stream, '\'');
-           paren = 1;
-           object = object->data.quote;
-           goto write_again;
-       case LispBackquote_t:
-           length += LispWriteChar(stream, '`');
-           paren = 1;
-           object = object->data.quote;
-           goto write_again;
-       case LispComma_t:
-           if (object->data.comma.atlist)
-               length += LispWriteStr(stream, ",@", 2);
-           else
-               length += LispWriteChar(stream, ',');
-           paren = 1;
-           object = object->data.comma.eval;
-           goto write_again;
-           break;
-       case LispFunctionQuote_t:
-           length += LispWriteStr(stream, "#'", 2);
-           paren = 1;
-           object = object->data.quote;
-           goto write_again;
-       case LispArray_t:
-           length += LispWriteArray(stream, object, info);
-           break;
-       case LispStruct_t:
-           length += LispWriteStruct(stream, object, info);
-           break;
-       case LispLambda_t:
-       write_lambda:
-           switch (object->funtype) {
-               case LispLambda:
-                   string = "#<LAMBDA ";
-                   break;
-               case LispFunction:
-                   string = "#<FUNCTION ";
-                   break;
-               case LispMacro:
-                   string = "#<MACRO ";
-                   break;
-               case LispSetf:
-                   string = "#<SETF ";
-                   break;
-           }
-           length += LispDoWriteAtom(stream, string, strlen(string),
-                                     info->print_case);
-           if (object->funtype != LispLambda) {
-               length += LispWriteAtom(stream, object->data.lambda.name, info);
-               length += LispWriteChar(stream, ' ');
-               length += LispWriteAlist(stream, object->data.lambda.name
-                                        ->data.atom->property->alist, info);
-           }
-           else {
-               length += LispDoWriteAtom(stream, "NIL", 3, info->print_case);
-               length += LispWriteChar(stream, ' ');
-               length += LispWriteAlist(stream, (LispArgList*)object->
-                                        data.lambda.name->data.opaque.data,
-                                        info);
-           }
-           length += LispWriteChar(stream, ' ');
-           length += LispDoWriteObject(stream,
-                                       object->data.lambda.code, info, 0);
-           length += LispWriteChar(stream, '>');
-           break;
-       case LispStream_t:
-           length += LispWriteStr(stream, "#<", 2);
-           if (object->data.stream.type == LispStreamFile)
-               string = "FILE-STREAM ";
-           else if (object->data.stream.type == LispStreamString)
-               string = "STRING-STREAM ";
-           else if (object->data.stream.type == LispStreamStandard)
-               string = "STANDARD-STREAM ";
-           else if (object->data.stream.type == LispStreamPipe)
-               string = "PIPE-STREAM ";
-           length += LispDoWriteAtom(stream, string, strlen(string),
-                                     info->print_case);
-
-           if (!object->data.stream.readable && !object->data.stream.writable)
-               length += LispDoWriteAtom(stream, "CLOSED",
-                                         6, info->print_case);
-           else {
-               if (object->data.stream.readable)
-                   length += LispDoWriteAtom(stream, "READ",
-                                             4, info->print_case);
-               if (object->data.stream.writable) {
-                   if (object->data.stream.readable)
-                       length += LispWriteChar(stream, '-');
-                   length += LispDoWriteAtom(stream, "WRITE",
-                                             5, info->print_case);
-               }
-           }
-           if (object->data.stream.type != LispStreamString) {
-               length += LispWriteChar(stream, ' ');
-               length += LispDoWriteObject(stream,
-                                           object->data.stream.pathname,
-                                           info, 1);
-               /* same address/size for pipes */
-               length += LispWriteChar(stream, ' ');
-               length += LispWriteCPointer(stream,
-                                           object->data.stream.source.file);
-               if (object->data.stream.readable &&
-                   object->data.stream.type == LispStreamFile &&
-                   !object->data.stream.source.file->binary) {
-                   length += LispWriteStr(stream, " @", 2);
-                   format_integer(stk, object->data.stream.source.file->line, 10);
-                   length += LispWriteStr(stream, stk, strlen(stk));
-               }
-           }
-           length += LispWriteChar(stream, '>');
-           break;
-       case LispPathname_t:
-           length += LispWriteStr(stream, "#P", 2);
-           paren = 1;
-           object = CAR(object->data.quote);
-           goto write_again;
-       case LispPackage_t:
-           length += LispDoWriteAtom(stream, "#<PACKAGE ",
-                                     10, info->print_case);
-           length += LispWriteStr(stream,
-                                  THESTR(object->data.package.name),
-                                  STRLEN(object->data.package.name));
-           length += LispWriteChar(stream, '>');
-           break;
-       case LispRegex_t:
-           length += LispDoWriteAtom(stream, "#<REGEX ",
-                                     8, info->print_case);
-           length += LispDoWriteObject(stream,
-                                       object->data.regex.pattern, info, 1);
-           if (object->data.regex.options & RE_NOSPEC)
-               length += LispDoWriteAtom(stream, " :NOSPEC",
-                                         8, info->print_case);
-           if (object->data.regex.options & RE_ICASE)
-               length += LispDoWriteAtom(stream, " :ICASE",
-                                         7, info->print_case);
-           if (object->data.regex.options & RE_NOSUB)
-               length += LispDoWriteAtom(stream, " :NOSUB",
-                                         7, info->print_case);
-           if (object->data.regex.options & RE_NEWLINE)
-               length += LispDoWriteAtom(stream, " :NEWLINE",
-                                         9, info->print_case);
-           length += LispWriteChar(stream, '>');
-           break;
-       case LispBytecode_t:
-           length += LispDoWriteAtom(stream, "#<BYTECODE ",
-                                     11, info->print_case);
-           length += LispWriteCPointer(stream,
-                                       object->data.bytecode.bytecode);
-           length += LispWriteChar(stream, '>');
-           break;
-       case LispHashTable_t:
-           length += LispDoWriteAtom(stream, "#<HASH-TABLE ",
-                                     13, info->print_case);
-           length += LispWriteAtom(stream, object->data.hash.test, info);
-           snprintf(stk, sizeof(stk), " %g %g",
-                    object->data.hash.table->rehash_size,
-                    object->data.hash.table->rehash_threshold);
-           length += LispWriteStr(stream, stk, strlen(stk));
-           snprintf(stk, sizeof(stk), " %ld/%ld>",
-                    object->data.hash.table->count,
-                    object->data.hash.table->num_entries);
-           length += LispWriteStr(stream, stk, strlen(stk));
-           break;
-    }
-
-    return (length);
-}
-
-/* return current column number in stream */
-int
-LispGetColumn(LispObj *stream)
-{
-    LispFile *file;
-    LispString *string;
-
-    check_stream(stream, &file, &string, 0);
-    if (file != NULL)
-       return (file->column);
-    return (string->column);
-}
-
-/* write a character to stream */
-int
-LispWriteChar(LispObj *stream, int character)
-{
-    LispFile *file;
-    LispString *string;
-
-    check_stream(stream, &file, &string, 1);
-    if (file != NULL)
-       return (LispFputc(file, character));
-
-    return (LispSputc(string, character));
-}
-
-/* write a character count times to stream */
-int
-LispWriteChars(LispObj *stream, int character, int count)
-{
-    int length = 0;
-
-    if (count > 0) {
-       char stk[64];
-       LispFile *file;
-       LispString *string;
-
-       check_stream(stream, &file, &string, 1);
-       if (count >= sizeof(stk)) {
-           memset(stk, character, sizeof(stk));
-           for (; count >= sizeof(stk); count -= sizeof(stk)) {
-               if (file != NULL)
-                   length += LispFwrite(file, stk, sizeof(stk));
-               else
-                   length += LispSwrite(string, stk, sizeof(stk));
-           }
-       }
-       else
-           memset(stk, character, count);
-
-       if (count) {
-           if (file != NULL)
-               length += LispFwrite(file, stk, count);
-           else
-               length += LispSwrite(string, stk, count);
-       }
-    }
-
-    return (length);
-}
-
-/* write a string to stream */
-int
-LispWriteStr(LispObj *stream, char *buffer, long length)
-{
-    LispFile *file;
-    LispString *string;
-
-    check_stream(stream, &file, &string, 1);
-    if (file != NULL)
-       return (LispFwrite(file, buffer, length));
-    return (LispSwrite(string, buffer, length));
-}
-
-static int
-LispDoWriteAtom(LispObj *stream, char *string, int length, int print_case)
-{
-    int bytes = 0, cap = 0;
-    char buffer[128], *ptr;
-
-    switch (print_case) {
-       case DOWNCASE:
-           for (ptr = buffer; length > 0; length--, string++) {
-               if (isupper(*string))
-                   *ptr = tolower(*string);
-               else
-                   *ptr = *string;
-               ++ptr;
-               if (ptr - buffer >= sizeof(buffer)) {
-                   bytes += LispWriteStr(stream, buffer, ptr - buffer);
-                   ptr = buffer;
-               }
-           }
-           if (ptr > buffer)
-               bytes += LispWriteStr(stream, buffer, ptr - buffer);
-           break;
-       case CAPITALIZE:
-           for (ptr = buffer; length > 0; length--, string++) {
-               if (isalnum(*string)) {
-                   if (cap && isupper(*string))
-                       *ptr = tolower(*string);
-                   else
-                       *ptr = *string;
-                   cap = 1;
-               }
-               else {
-                   *ptr = *string;
-                   cap = 0;
-               }
-               ++ptr;
-               if (ptr - buffer >= sizeof(buffer)) {
-                   bytes += LispWriteStr(stream, buffer, ptr - buffer);
-                   ptr = buffer;
-               }
-           }
-           if (ptr > buffer)
-               bytes += LispWriteStr(stream, buffer, ptr - buffer);
-           break;
-       default:
-           /* Strings are already stored upcase/quoted */
-           bytes += LispWriteStr(stream, string, length);
-           break;
-    }
-
-    return (bytes);
-}
-
-static int
-LispWriteAtom(LispObj *stream, LispObj *object, write_info *info)
-{
-    int length = 0;
-    LispAtom *atom = object->data.atom;
-    Atom_id id = atom->key;
-
-    if (atom->package != PACKAGE) {
-       if (atom->package == lisp__data.keyword)
-           length += LispWriteChar(stream, ':');
-       else if (atom->package == NULL)
-           length += LispWriteStr(stream, "#:", 2);
-       else {
-           /* Check if the symbol is visible */
-           int i, visible = 0;
-
-           if (atom->ext) {
-               for (i = lisp__data.pack->use.length - 1; i >= 0; i--) {
-                   if (lisp__data.pack->use.pairs[i] == atom->package) {
-                       visible = 1;
-                       break;
-                   }
-               }
-           }
-
-           if (!visible) {
-               /* XXX this assumes that package names are always "readable" */
-               length +=
-                   LispDoWriteAtom(stream,
-                                   THESTR(atom->package->data.package.name),
-                                   STRLEN(atom->package->data.package.name),
-                                   info->print_case);
-               length += LispWriteChar(stream, ':');
-               if (!atom->ext)
-                   length += LispWriteChar(stream, ':');
-           }
-       }
-    }
-    if (atom->unreadable)
-       length += LispWriteChar(stream, '|');
-    length += LispDoWriteAtom(stream, id->value, id->length,
-                             atom->unreadable ? UPCASE : info->print_case);
-    if (atom->unreadable)
-       length += LispWriteChar(stream, '|');
-
-    return (length);
-}
-
-static int
-LispWriteInteger(LispObj *stream, LispObj *object)
-{
-    return (LispFormatInteger(stream, object, 10, 0, 0, 0, 0, 0, 0));
-}
-
-static int
-LispWriteCharacter(LispObj *stream, LispObj *object, write_info *info)
-{
-    return (LispFormatCharacter(stream, object, !info->print_escape, 0));
-}
-
-static int
-LispWriteString(LispObj *stream, LispObj *object, write_info *info)
-{
-    return (LispWriteCString(stream, THESTR(object), STRLEN(object), info));
-}
-
-static int
-LispWriteFloat(LispObj *stream, LispObj *object)
-{
-    double value = DFLOAT_VALUE(object);
-
-    if (value == 0.0 || (fabs(value) < 1.0E7 && fabs(value) > 1.0E-4))
-       return (LispFormatFixedFloat(stream, object, 0, 0, NULL, 0, 0, 0));
-
-    return (LispDoFormatExponentialFloat(stream, object, 0, 0, NULL,
-                                        0, 1, 0, ' ', 'E', 0));
-}
-
-static int
-LispWriteArray(LispObj *stream, LispObj *object, write_info *info)
-{
-    int length = 0;
-    long print_level = info->level, circle;
-
-    if (info->circles && (circle = LispCheckCircle(object, info)) >= 0 &&
-       LispPrintCircle(stream, object, circle, &length, info) == 0)
-       return (length);
-
-    if (object->data.array.rank == 0) {
-       length += LispWriteStr(stream, "#0A", 3);
-       length += LispDoWriteObject(stream, object->data.array.list, info, 1);
-       return (length);
-    }
-
-    INCDEPTH();
-    ++info->level;
-    if (info->print_level < 0 || info->level <= info->print_level) {
-       if (object->data.array.rank == 1)
-           length += LispWriteStr(stream, "#(", 2);
-       else {
-           char stk[32];
-
-           format_integer(stk, object->data.array.rank, 10);
-           length += LispWriteChar(stream, '#');
-           length += LispWriteStr(stream, stk, strlen(stk));
-           length += LispWriteStr(stream, "A(", 2);
-       }
-
-       if (!object->data.array.zero) {
-           long print_length = info->length, local_length = 0;
-
-           if (object->data.array.rank == 1) {
-               LispObj *ary;
-               long count;
-
-               for (ary = object->data.array.dim, count = 1;
-                    ary != NIL; ary = CDR(ary))
-                   count *= FIXNUM_VALUE(CAR(ary));
-               for (ary = object->data.array.list; count > 0;
-                    ary = CDR(ary), count--) {
-                   if (info->print_length < 0 ||
-                       ++local_length <= info->print_length) {
-                       info->length = 0;
-                       length += LispDoWriteObject(stream, CAR(ary), info, 1);
-                   }
-                   else {
-                       length += LispWriteStr(stream, "...", 3);
-                       break;
-                   }
-                   if (count - 1 > 0)
-                       length += LispWriteChar(stream, ' ');
-               }
-           }
-           else {
-               LispObj *ary;
-               int i, k, rank, *dims, *loop;
-
-               rank = object->data.array.rank;
-               dims = LispMalloc(sizeof(int) * rank);
-               loop = LispCalloc(1, sizeof(int) * (rank - 1));
-
-               /* fill dim */
-               for (i = 0, ary = object->data.array.dim; ary != NIL;
-                    i++, ary = CDR(ary))
-                   dims[i] = FIXNUM_VALUE(CAR(ary));
-
-               i = 0;
-               ary = object->data.array.list;
-               while (loop[0] < dims[0]) {
-                   if (info->print_length < 0 ||
-                       local_length < info->print_length) {
-                       for (; i < rank - 1; i++)
-                           length += LispWriteChar(stream, '(');
-                       --i;
-                       for (;;) {
-                           ++loop[i];
-                           if (i && loop[i] >= dims[i])
-                               loop[i] = 0;
-                           else
-                               break;
-                           --i;
-                       }
-                       for (k = 0; k < dims[rank - 1] - 1;
-                            k++, ary = CDR(ary)) {
-                           if (info->print_length < 0 ||
-                               k < info->print_length) {
-                               ++local_length;
-                               info->length = 0;
-                               length += LispDoWriteObject(stream,
-                                                           CAR(ary), info, 1);
-                               length += LispWriteChar(stream, ' ');
-                           }
-                       }
-                       if (info->print_length < 0 || k < info->print_length) {
-                           ++local_length;
-                           info->length = 0;
-                           length += LispDoWriteObject(stream,
-                                                       CAR(ary), info, 0);
-                       }
-                       else
-                           length += LispWriteStr(stream,  "...", 3);
-                       for (k = rank - 1; k > i; k--)
-                           length += LispWriteChar(stream, ')');
-                       if (loop[0] < dims[0])
-                           length += LispWriteChar(stream,  ' ');
-                       ary = CDR(ary);
-                   }
-                   else {
-                       ++local_length;
-                       length += LispWriteStr(stream,  "...)", 4);
-                       for (; local_length < dims[0] - 1; local_length++)
-                           length += LispWriteStr(stream,  " ...)", 5);
-                       if (local_length <= dims[0])
-                           length += LispWriteStr(stream,  " ...", 4);
-                       break;
-                   }
-               }
-               LispFree(dims);
-               LispFree(loop);
-           }
-           info->length = print_length;
-       }
-       length += LispWriteChar(stream, ')');
-    }
-    else
-       length += LispWriteChar(stream, '#');
-    info->level = print_level;
-    DECDEPTH();
-
-    return (length);
-}
-
-static int
-LispWriteStruct(LispObj *stream, LispObj *object, write_info *info)
-{
-    int length;
-    long circle;
-    LispObj *symbol;
-    LispObj *def = object->data.struc.def;
-    LispObj *field = object->data.struc.fields;
-
-    if (info->circles && (circle = LispCheckCircle(object, info)) >= 0 &&
-       LispPrintCircle(stream, object, circle, &length, info) == 0)
-       return (length);
-
-    INCDEPTH();
-    length = LispWriteStr(stream, "#S(", 3);
-    symbol = SYMBOLP(CAR(def)) ? CAR(def) : CAAR(def);
-    length += LispWriteAtom(stream, symbol, info);
-    def = CDR(def);
-    for (; def != NIL; def = CDR(def), field = CDR(field)) {
-       length += LispWriteChar(stream, ' ');
-       symbol = SYMBOLP(CAR(def)) ? CAR(def) : CAAR(def);
-       length += LispWriteAtom(stream, symbol, info);
-       length += LispWriteChar(stream, ' ');
-       length += LispDoWriteObject(stream, CAR(field), info, 1);
-    }
-    length += LispWriteChar(stream, ')');
-    DECDEPTH();
-
-    return (length);
-}
-
-int
-LispFormatInteger(LispObj *stream, LispObj *object, int radix,
-                 int atsign, int collon, int mincol,
-                 int padchar, int commachar, int commainterval)
-{
-    char stk[128], *str = stk;
-    int i, length, sign, intervals;
-
-    if (LONGINTP(object))
-       format_integer(stk, LONGINT_VALUE(object), radix);
-    else {
-       if (mpi_getsize(object->data.mp.integer, radix) >= sizeof(stk))
-           str = mpi_getstr(NULL, object->data.mp.integer, radix);
-       else
-           mpi_getstr(str, object->data.mp.integer, radix);
-    }
-
-    sign = *str == '-';
-    length = strlen(str);
-
-    /* if collon, update length for the number of commachars to be printed */
-    if (collon && commainterval > 0 && commachar) {
-       intervals = length / commainterval;
-       length += intervals;
-    }
-    else
-       intervals = 0;
-
-    /* if sign must be printed, and number is positive */
-    if (atsign && !sign)
-       ++length;
-
-    /* if need padding */
-    if (padchar && mincol > length)
-       LispWriteChars(stream, padchar, mincol - length);
-
-    /* if need to print number sign */
-    if (sign || atsign)
-       LispWriteChar(stream, sign ? '-' : '+');
-
-    /* if need to print commas to separate groups of numbers */
-    if (intervals) {
-       int j;
-       char *ptr;
-
-       i = (length - atsign) - intervals;
-       j = i % commainterval;
-       /* make the loop below easier */
-       if (j == 0)
-           j = commainterval;
-       i -= j;
-       ptr = str + sign;
-       for (; j > 0; j--, ptr++)
-           LispWriteChar(stream, *ptr);
-       for (; i > 0; i -= commainterval) {
-           LispWriteChar(stream, commachar);
-           for (j = 0; j < commainterval; j++, ptr++)
-               LispWriteChar(stream, *ptr);
-       }
-    }
-    /* else, just print the string */
-    else
-       LispWriteStr(stream, str + sign, length - sign);
-
-    /* if number required more than sizeof(stk) bytes */
-    if (str != stk)
-       LispFree(str);
-
-    return (length);
-}
-
-int
-LispFormatRomanInteger(LispObj *stream, long value, int new_roman)
-{
-    char stk[32];
-    int length;
-
-    length = 0;
-    while (value > 1000) {
-       stk[length++] = 'M';
-       value -= 1000;
-    }
-    if (new_roman) {
-       if (value >= 900) {
-           strcpy(stk + length, "CM");
-           length += 2,
-           value -= 900;
-       }
-       else if (value < 500 && value >= 400) {
-           strcpy(stk + length, "CD");
-           length += 2;
-           value -= 400;
-       }
-    }
-    if (value >= 500) {
-       stk[length++] = 'D';
-       value -= 500;
-    }
-    while (value >= 100) {
-       stk[length++] = 'C';
-       value -= 100;
-    }
-    if (new_roman) {
-       if (value >= 90) {
-           strcpy(stk + length, "XC");
-           length += 2,
-           value -= 90;
-       }
-       else if (value < 50 && value >= 40) {
-           strcpy(stk + length, "XL");
-           length += 2;
-           value -= 40;
-       }
-    }
-    if (value >= 50) {
-       stk[length++] = 'L';
-       value -= 50;
-    }
-    while (value >= 10) {
-       stk[length++] = 'X';
-       value -= 10;
-    }
-    if (new_roman) {
-       if (value == 9) {
-           strcpy(stk + length, "IX");
-           length += 2,
-           value -= 9;
-       }
-       else if (value == 4) {
-           strcpy(stk + length, "IV");
-           length += 2;
-           value -= 4;
-       }
-    }
-    if (value >= 5) {
-       stk[length++] = 'V';
-       value -= 5;
-    }
-    while (value) {
-       stk[length++] = 'I';
-       --value;
-    }
-
-    stk[length] = '\0';
-
-    return (LispWriteStr(stream, stk, length));
-}
-
-int
-LispFormatEnglishInteger(LispObj *stream, long number, int ordinal)
-{
-    static char *ds[] = {
-       "",           "one",       "two",        "three",      "four",
-       "five",       "six",       "seven",      "eight",      "nine",
-       "ten",        "eleven",    "twelve",     "thirteen",   "fourteen",
-       "fifteen",    "sixteen",   "seventeen",  "eighteen",   "nineteen"
-    };
-    static char *dsth[] = {
-       "",           "first",     "second",      "third",      "fourth",
-       "fifth",      "sixth",     "seventh",     "eighth",     "ninth",
-       "tenth",      "eleventh",  "twelfth",     "thirteenth", "fourteenth",
-        "fifteenth", "sixteenth", "seventeenth", "eighteenth", "nineteenth"
-    };
-    static char *hs[] = {
-       "",           "",          "twenty",      "thirty",     "forty",
-       "fifty",      "sixty",     "seventy",     "eighty",     "ninety"
-    };
-    static char *hsth[] = {
-       "",           "",          "twentieth",   "thirtieth",  "fortieth",
-       "fiftieth",    "sixtieth",  "seventieth",  "eightieth", "ninetieth"
-    };
-    static char *ts[] = {
-       "",           "thousand",   "million"
-    };
-    static char *tsth[] = {
-       "",          "thousandth", "millionth"
-    };
-    char stk[256];
-    int length, sign;
-
-    sign = number < 0;
-    if (sign)
-       number = -number;
-    length = 0;
-
-#define SIGNLEN                6       /* strlen("minus ") */
-    if (sign) {
-       strcpy(stk, "minus ");
-       length += SIGNLEN;
-    }
-    else if (number == 0) {
-       if (ordinal) {
-           strcpy(stk, "zeroth");
-           length += 6;        /* strlen("zeroth") */
-       }
-       else {
-           strcpy(stk, "zero");
-           length += 4;        /* strlen("zero") */
-       }
-    }
-    for (;;) {
-       int count, temp;
-       char *t, *h, *d;
-       long value = number;
-
-       for (count = 0; value >= 1000; value /= 1000, count++)
-           ;
-
-       t = ds[value / 100];
-       if (ordinal && !count && (value % 10) == 0)
-           h = hsth[(value % 100) / 10];
-       else
-           h = hs[(value % 100) / 10];
-
-       if (ordinal && !count)
-           d = *h ? dsth[value % 10] : dsth[value % 20];
-       else
-           d = *h ? ds[value % 10] : ds[value % 20];
-
-       if (((!sign && length) || length > SIGNLEN) && (*t || *h || *d)) {
-           if (!ordinal || count || *h || *t) {
-               strcpy(stk + length, ", ");
-               length += 2;
-           }
-           else {
-               strcpy(stk + length, " ");
-               ++length;
-           }
-       }
-
-       if (*t) {
-           if (ordinal && !count && (value % 100) == 0)
-               temp = sprintf(stk + length, "%s hundredth", t);
-           else
-               temp = sprintf(stk + length, "%s hundred", t);
-           length += temp;
-       }
-
-       if (*h) {
-           if (*t) {
-               if (ordinal && !count) {
-                   strcpy(stk + length, " ");
-                   ++length;
-               }
-               else {
-                   strcpy(stk + length, " and ");
-                   length += 5;        /* strlen(" and ") */
-               }
-           }
-           strcpy(stk + length, h);
-           length += strlen(h);
-       }
-
-       if (*d) {
-           if (*h) {
-               strcpy(stk + length, "-");
-               ++length;
-           }
-           else if (*t) {
-               if (ordinal && !count) {
-                   strcpy(stk + length, " ");
-                   ++length;
-               }
-               else {
-                   strcpy(stk + length, " and ");
-                   length += 5;        /* strlen(" and ") */
-               }
-           }
-           strcpy(stk + length, d);
-           length += strlen(d);
-       }
-
-       if (!count)
-           break;
-       else
-           temp = count;
-
-       if (count > 1) {
-           value *= 1000;
-           while (--count)
-               value *= 1000;
-           number -= value;
-       }
-       else
-           number %= 1000;
-
-       if (ordinal && number == 0 && !*t && !*h)
-           temp = sprintf(stk + length, " %s", tsth[temp]);
-       else
-           temp = sprintf(stk + length, " %s", ts[temp]);
-       length += temp;
-
-       if (!number)
-           break;
-    }
-
-    return (LispWriteStr(stream, stk, length));
-}
-
-int
-LispFormatCharacter(LispObj *stream, LispObj *object,
-                   int atsign, int collon)
-{
-    int length = 0;
-    int ch = SCHAR_VALUE(object);
-
-    if (atsign && !collon)
-       length += LispWriteStr(stream, "#\\", 2);
-    if ((atsign || collon) && (ch <= ' ' || ch == 0177)) {
-       char *name = LispChars[ch].names[0];
-
-       length += LispWriteStr(stream, name, strlen(name));
-    }
-    else
-       length += LispWriteChar(stream, ch);
-
-    return (length);
-}
-
-/* returns 1 if string size must grow, done inplace */
-static int
-float_string_inc(char *buffer, int offset)
-{
-    int i;
-
-    for (i = offset; i >= 0; i--) {
-       if (buffer[i] == '9')
-           buffer[i] = '0';
-       else if (buffer[i] != '.') {
-           ++buffer[i];
-           break;
-       }
-    }
-    if (i < 0) {
-       int length = strlen(buffer);
-
-       /* string size must change */
-       memmove(buffer + 1, buffer, length + 1);
-       buffer[0] = '1';
-
-       return (1);
-    }
-
-    return (0);
-}
-
-int
-LispFormatFixedFloat(LispObj *stream, LispObj *object,
-                    int atsign, int w, int *pd, int k, int overflowchar,
-                    int padchar)
-{
-    char buffer[512], stk[64];
-    int sign, exponent, length, offset, d = pd ? *pd : FLOAT_PREC, again;
-    double value = DFLOAT_VALUE(object);
-
-    if (value == 0.0) {
-       exponent = k = 0;
-       strcpy(stk, "+0");
-    }
-    else
-       /* calculate format parameters, adjusting scale factor */
-       parse_double(stk, &exponent, value, d + 1 + k);
-
-    /* make sure k won't cause overflow */
-    if (k > 128)
-       k = 128;
-    else if (k < -128)
-       k = -128;
-
-    /* make sure d won't cause overflow */
-    if (d > 128)
-       d = 128;
-    else if (d < -128)
-       d = -128;
-
-    /* adjust scale factor, exponent is used as an index in stk */
-    exponent += k + 1;
-
-    /* how many bytes in float representation */
-    length = strlen(stk) - 1;
-
-    /* need to print a sign? */
-    sign = atsign || (stk[0] == '-');
-
-    /* format number, cannot overflow, as control variables were checked */
-    offset = 0;
-    if (sign)
-       buffer[offset++] = stk[0];
-    if (exponent > 0) {
-       if (exponent > length) {
-           memcpy(buffer + offset, stk + 1, length);
-           memset(buffer + offset + length, '0', exponent - length);
-       }
-       else
-           memcpy(buffer + offset, stk + 1, exponent);
-       offset += exponent;
-       buffer[offset++] = '.';
-       if (length > exponent) {
-           memcpy(buffer + offset, stk + 1 + exponent, length - exponent);
-           offset += length - exponent;
-       }
-       else
-           buffer[offset++] = '0';
-    }
-    else {
-       buffer[offset++] = '0';
-       buffer[offset++] = '.';
-       while (exponent < 0) {
-           buffer[offset++] = '0';
-           exponent++;
-       }
-       memcpy(buffer + offset, stk + 1, length);
-       offset += length;
-    }
-    buffer[offset] = '\0';
-
-    again = 0;
-fixed_float_check_again:
-    /* make sure only d digits are printed after decimal point */
-    if (d > 0) {
-       char *dptr = strchr(buffer, '.');
-
-       length = strlen(dptr) - 1;
-       /* check if need to remove excess digits */
-       if (length > d) {
-           int digit;
-
-           offset = (dptr - buffer) + 1 + d;
-           digit = buffer[offset];
-
-           /* remove extra digits */
-           buffer[offset] = '\0';
-
-           /* check if need to round */
-           if (!again && offset > 1 && isdigit(digit) && digit >= '5' &&
-               isdigit(buffer[offset - 1]) &&
-               float_string_inc(buffer, offset - 1))
-               ++offset;
-       }
-       /* check if need to add extra zero digits to fill space */
-       else if (length < d) {
-           offset += d - length;
-           for (++length; length <= d; length++)
-               dptr[length] = '0';
-           dptr[length] = '\0';
-       }
-    }
-    else {
-       /* no digits after decimal point */
-       int digit, inc = 0;
-       char *dptr = strchr(buffer, '.') + 1;
-
-       digit = *dptr;
-       if (!again && digit >= '5' && dptr >= buffer + 2 && isdigit(dptr[-2]))
-           inc = float_string_inc(buffer, dptr - buffer - 2);
-
-       offset = (dptr - buffer) + inc;
-       buffer[offset] = '\0';
-    }
-
-    /* if d was not specified, remove any extra zeros */
-    if (pd == NULL) {
-       while (offset > 2 && buffer[offset - 2] != '.' &&
-              buffer[offset - 1] == '0')
-           --offset;
-       buffer[offset] = '\0';
-    }
-
-    if (w > 0 && offset > w) {
-       /* first check if can remove extra fractional digits */
-       if (pd == NULL) {
-           char *ptr = strchr(buffer, '.') + 1;
-
-           if (ptr - buffer < w) {
-               d = w - (ptr - buffer);
-               goto fixed_float_check_again;
-           }
-       }
-
-       /* remove leading "zero" to save space */
-       if ((!sign && buffer[0] == '0') || (sign && buffer[1] == '0')) {
-           /* ending nul also copied */
-           memmove(buffer + sign, buffer + sign + 1, offset);
-           --offset;
-       }
-       /* remove leading '+' to "save" space */
-       if (offset > w && buffer[0] == '+') {
-           /* ending nul also copied */
-           memmove(buffer, buffer + 1, offset);
-           --offset;
-       }
-    }
-
-    /* if cannot represent number in given width */
-    if (overflowchar && offset > w) {
-       again = 1;
-       goto fixed_float_overflow;
-    }
-
-    length = 0;
-    /* print padding if required */
-    if (w > offset)
-       length += LispWriteChars(stream, padchar, w - offset);
-
-    /* print float number representation */
-    return (LispWriteStr(stream, buffer, offset) + length);
-
-fixed_float_overflow:
-    return (LispWriteChars(stream, overflowchar, w));
-}
-
-int
-LispFormatExponentialFloat(LispObj *stream, LispObj *object,
-                          int atsign, int w, int *pd, int e, int k,
-                          int overflowchar, int padchar, int exponentchar)
-{
-    return (LispDoFormatExponentialFloat(stream, object, atsign, w,
-                                        pd, e, k, overflowchar, padchar,
-                                        exponentchar, 1));
-}
-
-int
-LispDoFormatExponentialFloat(LispObj *stream, LispObj *object,
-                            int atsign, int w, int *pd, int e, int k,
-                            int overflowchar, int padchar, int exponentchar,
-                            int format)
-{
-    char buffer[512], stk[64];
-    int sign, exponent, length, offset, d = pd ? *pd : FLOAT_PREC;
-    double value = DFLOAT_VALUE(object);
-
-    if (value == 0.0) {
-       exponent = 0;
-       k = 1;
-       strcpy(stk, "+0");
-    }
-    else
-       /* calculate format parameters, adjusting scale factor */
-       parse_double(stk, &exponent, value, d + k - 1);
-
-    /* set e to a value that won't overflow */
-    if (e > 16)
-       e = 16;
-
-    /* set k to a value that won't overflow */
-    if (k > 128)
-       k = 128;
-    else if (k < -128)
-       k = -128;
-
-    /* set d to a value that won't overflow */
-    if (d > 128)
-       d = 128;
-    else if (d < -128)
-       d = -128;
-
-    /* how many bytes in float representation */
-    length = strlen(stk) - 1;
-
-    /* need to print a sign? */
-    sign = atsign || (stk[0] == '-');
-
-    /* adjust number of digits after decimal point */
-    if (k > 0)
-       d -= k - 1;
-
-    /* adjust exponent, based on scale factor */
-    exponent -= k - 1;
-
-    /* format number, cannot overflow, as control variables were checked */
-    offset = 0;
-    if (sign)
-       buffer[offset++] = stk[0];
-    if (k > 0) {
-       if (k > length) {
-           memcpy(buffer + offset, stk + 1, length);
-           offset += length;
-       }
-       else {
-           memcpy(buffer + offset, stk + 1, k);
-           offset += k;
-       }
-       buffer[offset++] = '.';
-       if (length > k) {
-           memcpy(buffer + offset, stk + 1 + k, length - k);
-           offset += length - k;
-       }
-       else
-           buffer[offset++] = '0';
-    }
-    else {
-       int tmp = k;
-
-       buffer[offset++] = '0';
-       buffer[offset++] = '.';
-       while (tmp < 0) {
-           buffer[offset++] = '0';
-           tmp++;
-       }
-       memcpy(buffer + offset, stk + 1, length);
-       offset += length;
-    }
-
-    /* if format, then always add a sign to exponent */
-    buffer[offset++] = exponentchar;
-    if (format || exponent < 0)
-       buffer[offset++] = exponent < 0 ? '-' : '+';
-
-    /* XXX destroy stk contents */
-    sprintf(stk, "%%0%dd", e);
-    /* format scale factor*/
-    length = sprintf(buffer + offset, stk,
-                    exponent < 0 ? -exponent : exponent);
-    /* check for overflow in exponent */
-    if (length > e && overflowchar)
-       goto exponential_float_overflow;
-    offset += length;
-
-    /* make sure only d digits are printed after decimal point */
-    if (d > 0) {
-       int currd;
-       char *dptr = strchr(buffer, '.'),
-            *eptr = strchr(dptr, exponentchar);
-
-       currd = eptr - dptr - 1;
-       length = strlen(eptr);
-
-       /* check if need to remove excess digits */
-       if (currd > d) {
-           int digit, dpos;
-
-           dpos = offset = (dptr - buffer) + 1 + d;
-           digit = buffer[offset];
-
-           memmove(buffer + offset, eptr, length + 1);
-           /* also copy ending nul character */
-
-           /* adjust offset to length of total string */
-           offset += length;
-
-           /* check if need to round */
-           if (dpos > 1 && isdigit(digit) && digit >= '5' &&
-               isdigit(buffer[dpos - 1]) &&
-               float_string_inc(buffer, dpos - 1))
-               ++offset;
-       }
-       /* check if need to add extra zero digits to fill space */
-       else if (pd && currd < d) {
-           memmove(eptr + d - currd, eptr, length + 1);
-           /* also copy ending nul character */
-
-           offset += d - currd;
-           for (++currd; currd <= d; currd++)
-               dptr[currd] = '0';
-       }
-       /* check if need to remove zeros */
-       else if (pd == NULL) {
-           int zeros = 1;
-
-           while (eptr[-zeros] == '0')
-               ++zeros;
-           if (eptr[-zeros] == '.')
-               --zeros;
-           if (zeros > 1) {
-               memmove(eptr - zeros + 1, eptr, length + 1);
-               offset -= zeros - 1;
-           }
-       }
-    }
-    else {
-       /* no digits after decimal point */
-       int digit, inc = 0;
-       char *dptr = strchr(buffer, '.'),
-            *eptr = strchr(dptr, exponentchar);
-
-       digit = dptr[1];
-
-       offset = (dptr - buffer) + 1;
-       length = strlen(eptr);
-       memmove(buffer + offset, eptr, length + 1);
-       /* also copy ending nul character */
-
-       if (digit >= '5' && dptr >= buffer + 2 &&
-           isdigit(dptr[-2]))
-           inc = float_string_inc(buffer, dptr - buffer - 2);
-
-       /* adjust offset to length of total string */
-       offset += length + inc;
-    }
-
-    if (w > 0 && offset > w) {
-       /* remove leading "zero" to save space */
-       if ((!sign && buffer[0] == '0') || (sign && buffer[1] == '0')) {
-           /* ending nul also copied */
-           memmove(buffer + sign, buffer + sign + 1, offset);
-           --offset;
-       }
-       /* remove leading '+' to "save" space */
-       if (offset > w && buffer[0] == '+') {
-           /* ending nul also copied */
-           memmove(buffer, buffer + 1, offset);
-           --offset;
-       }
-    }
-
-    /* if cannot represent number in given width */
-    if (overflowchar && offset > w)
-       goto exponential_float_overflow;
-
-    length = 0;
-    /* print padding if required */
-    if (w > offset)
-       length += LispWriteChars(stream, padchar, w - offset);
-
-    /* print float number representation */
-    return (LispWriteStr(stream, buffer, offset) + length);
-
-exponential_float_overflow:
-    return (LispWriteChars(stream, overflowchar, w));
-}
-
-int
-LispFormatGeneralFloat(LispObj *stream, LispObj *object,
-                      int atsign, int w, int *pd, int e, int k,
-                      int overflowchar, int padchar, int exponentchar)
-{
-    char stk[64];
-    int length, exponent, n, dd, ee, ww, d = pd ? *pd : FLOAT_PREC;
-    double value = DFLOAT_VALUE(object);
-
-    if (value == 0.0) {
-       exponent = 0;
-       n = 0;
-       d = 1;
-       strcpy(stk, "+0");
-    }
-    else {
-       /* calculate format parameters, adjusting scale factor */
-       parse_double(stk, &exponent, value, d + k - 1);
-       n = exponent + 1;
-    }
-
-    /* Let ee equal e+2, or 4 if e is omitted. */
-    if (e)
-       ee = e + 2;
-    else
-       ee = 4;
-
-    /* Let ww equal w-ee, or nil if w is omitted. */
-    if (w)
-       ww = w - ee;
-    else
-       ww = 0;
-
-    dd = d - n;
-    if (d >= dd && dd >= 0) {
-       length = LispFormatFixedFloat(stream, object, atsign, ww,
-                                     &dd, 0, overflowchar, padchar);
-
-       /* ~ee@T */
-       length += LispWriteChars(stream, padchar, ee);
-    }
-    else
-       length = LispFormatExponentialFloat(stream, object, atsign,
-                                           w, pd, e, k, overflowchar,
-                                           padchar, exponentchar);
-
-    return (length);
-}
-
-int
-LispFormatDollarFloat(LispObj *stream, LispObj *object,
-                     int atsign, int collon, int d, int n, int w, int padchar)
-{
-    char buffer[512], stk[64];
-    int sign, exponent, length, offset;
-    double value = DFLOAT_VALUE(object);
-
-    if (value == 0.0) {
-       exponent = 0;
-       strcpy(stk, "+0");
-    }
-    else
-       /* calculate format parameters, adjusting scale factor */
-       parse_double(stk, &exponent, value, d == 0 ? FLOAT_PREC : d + 1);
-
-    /* set d to a "sane" value */
-    if (d > 128)
-       d = 128;
-
-    /* set n to a "sane" value */
-    if (n > 128)
-       n = 128;
-
-    /* use exponent as index in stk */
-    ++exponent;
-
-    /* don't put sign in buffer,
-     * if collon specified, must go before padding */
-    sign = atsign || (stk[0] == '-');
-
-    offset = 0;
-
-    /* pad with zeros if required */
-    if (exponent > 0)
-       n -= exponent;
-    while (n > 0) {
-       buffer[offset++] = '0';
-       n--;
-    }
-
-    /* how many bytes in float representation */
-    length = strlen(stk) - 1;
-
-    if (exponent > 0) {
-       if (exponent > length) {
-           memcpy(buffer + offset, stk + 1, length);
-           memset(buffer + offset + length, '0', exponent - length);
-       }
-       else
-           memcpy(buffer + offset, stk + 1, exponent);
-       offset += exponent;
-       buffer[offset++] = '.';
-       if (length > exponent) {
-           memcpy(buffer + offset, stk + 1 + exponent, length - exponent);
-           offset += length - exponent;
-       }
-       else
-           buffer[offset++] = '0';
-    }
-    else {
-       if (n > 0)
-           buffer[offset++] = '0';
-       buffer[offset++] = '.';
-       while (exponent < 0) {
-           buffer[offset++] = '0';
-           exponent++;
-       }
-       memcpy(buffer + offset, stk + 1, length);
-       offset += length;
-    }
-    buffer[offset] = '\0';
-
-    /* make sure only d digits are printed after decimal point */
-    if (d > 0) {
-       char *dptr = strchr(buffer, '.');
-
-       length = strlen(dptr) - 1;
-       /* check if need to remove excess digits */
-       if (length > d) {
-           int digit;
-
-           offset = (dptr - buffer) + 1 + d;
-           digit = buffer[offset];
-
-           /* remove extra digits */
-           buffer[offset] = '\0';
-
-           /* check if need to round */
-           if (offset > 1 && isdigit(digit) && digit >= '5' &&
-               isdigit(buffer[offset - 1]) &&
-               float_string_inc(buffer, offset - 1))
-               ++offset;
-       }
-       /* check if need to add extra zero digits to fill space */
-       else if (length < d) {
-           offset += d - length;
-           for (++length; length <= d; length++)
-               dptr[length] = '0';
-           dptr[length] = '\0';
-       }
-    }
-    else {
-       /* no digits after decimal point */
-       int digit, inc = 0;
-       char *dptr = strchr(buffer, '.') + 1;
-
-       digit = *dptr;
-       if (digit >= '5' && dptr >= buffer + 2 && isdigit(dptr[-2]))
-           inc = float_string_inc(buffer, dptr - buffer - 2);
-
-       offset = (dptr - buffer) + inc;
-       buffer[offset] = '\0';
-    }
-
-    length = 0;
-    if (sign) {
-       ++offset;
-       if (atsign && collon)
-           length += LispWriteChar(stream, value >= 0.0 ? '+' : '-');
-    }
-
-    /* print padding if required */
-    if (w > offset)
-       length += LispWriteChars(stream, padchar, w - offset);
-
-    if (atsign && !collon)
-       length += LispWriteChar(stream, value >= 0.0 ? '+' : '-');
-
-    /* print float number representation */
-    return (LispWriteStr(stream, buffer, offset) + length);
-}
diff --git a/xedit/lisp/write.h b/xedit/lisp/write.h
deleted file mode 100644 (file)
index b66ba6b..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/write.h,v 1.9tsi Exp $ */
-
-#ifndef Lisp_write_h
-#define Lisp_write_h
-
-#include "lisp/io.h"
-
-/*
- * Prototypes
- */
-void LispWriteInit(void);
-
-LispObj *Lisp_FreshLine(LispBuiltin*);
-LispObj *Lisp_Prin1(LispBuiltin*);
-LispObj *Lisp_Princ(LispBuiltin*);
-LispObj *Lisp_Print(LispBuiltin*);
-LispObj *Lisp_Terpri(LispBuiltin*);
-LispObj *Lisp_Write(LispBuiltin*);
-LispObj *Lisp_WriteChar(LispBuiltin*);
-LispObj *Lisp_WriteLine(LispBuiltin*);
-LispObj *Lisp_WriteString(LispBuiltin*);
-
-int LispGetColumn(LispObj*);
-
-int LispWriteChar(LispObj*, int);
-int LispWriteChars(LispObj*, int, int);
-int LispWriteStr(LispObj*, char*, long);
-
-       /* write any lisp object to stream */
-int LispWriteObject(LispObj*, LispObj*);
-
-/* formatted output */
-       /* object must be an integer */
-int LispFormatInteger(LispObj*, LispObj*, int, int, int, int, int, int, int);
-       /* must be in range 1 to 3999 for new roman, 1 to 4999 for old roman */
-int LispFormatRomanInteger(LispObj*, long, int);
-       /* must be in range -9999999 to 9999999 */
-int LispFormatEnglishInteger(LispObj*, long, int);
-       /* object must be a character */
-int LispFormatCharacter(LispObj*, LispObj*, int, int);
-       /* object must be a float */
-int LispFormatFixedFloat(LispObj*, LispObj*, int, int, int*, int, int, int);
-       /* object must be a float */
-int LispFormatExponentialFloat(LispObj*, LispObj*,
-                              int, int, int*, int, int, int, int, int);
-       /* object must be a float */
-int LispFormatGeneralFloat(LispObj*, LispObj*, int,
-                          int, int*, int, int, int, int, int);
-int LispFormatDollarFloat(LispObj*, LispObj*, int, int, int, int, int, int);
-
-#endif /* Lisp_write_h */
diff --git a/xedit/lisp/xedit.c b/xedit/lisp/xedit.c
deleted file mode 100644 (file)
index a337912..0000000
+++ /dev/null
@@ -1,1636 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/xedit.c,v 1.25 2003/04/27 18:17:35 tsi Exp $ */
-
-#include "../xedit.h"
-#include <X11/Xaw/TextSrcP.h>  /* Needs some private definitions */
-#include <X11/Xaw/TextSinkP.h> /* Also needs private definitions... */
-#include <X11/Xmu/Xmu.h>
-#define XEDIT_LISP_PRIVATE
-#include "xedit.h"
-#include <signal.h>
-
-/* Initialize to enter lisp */
-#define LISP_SETUP()                                           \
-    int lisp__running = lisp__data.running
-
-/* XXX Maybe should use ualarm or better, setitimer, but one
- *     second seens good enough to check for interrupts */
-
-#define        ENABLE_SIGALRM()                                        \
-    old_sigalrm = signal(SIGALRM, SigalrmHandler);             \
-    alarm(1)
-
-#define DISABLE_SIGALRM()                                      \
-    alarm(0);                                                  \
-    signal(SIGALRM, old_sigalrm)
-
-/* Enter lisp */
-#define LISP_ENTER()                                           \
-    if (!lisp__running) {                                      \
-       lisp__data.running = 1;                                 \
-       XFlush(XtDisplay(textwindow));                          \
-       ENABLE_SIGALRM();                                       \
-       if (sigsetjmp(lisp__data.jmp, 1) != 0) {                \
-           DISABLE_SIGALRM();                                  \
-           lisp__data.running = 0;                             \
-           return;                                             \
-       }                                                       \
-    }
-
-/* Leave lisp */
-#define LISP_LEAVE()                                           \
-    if (!lisp__running) {                                      \
-       DISABLE_SIGALRM();                                      \
-       LispTopLevel();                                         \
-       lisp__data.running = 0;                                 \
-    }
-
-/*
- * Types
- */
-typedef struct {
-    XawTextPosition left, right;
-    XrmQuark property;
-} EntityInfo;
-
-/*
- * Prototypes
- */
-static Bool ControlGPredicate(Display*, XEvent*, XPointer);
-static ssize_t WriteToStdout(int, const void*, size_t);
-static ssize_t WriteToStderr(int, const void*, size_t);
-static ssize_t WrapWrite(Widget, const void*, size_t);
-static void XeditUpdateModeInfos(void);
-static void XeditPrint(Widget, LispObj*, int);
-static void XeditInteractiveCallback(Widget, XtPointer, XtPointer);
-static void XeditIndentationCallback(Widget, XtPointer, XtPointer);
-static LispObj *XeditCharAt(LispBuiltin*, int);
-static LispObj *XeditSearch(LispBuiltin*, XawTextScanDirection);
-
-/*
- * Initialization
- */
-#ifdef SIGNALRETURNSINT
-static int (*old_sigalrm)(int);
-#else
-static void (*old_sigalrm)(int);
-#endif
-
-EditModeInfo *mode_infos;
-Cardinal num_mode_infos;
-
-static LispObj *Oauto_modes, *Oauto_mode, *Osyntax_highlight, *Osyntable_indent;
-
-/* Just to make calling interactive reparse easier */
-static LispObj interactive_arguments[4];
-
-static LispObj *justify_modes[4];
-static LispObj *wrap_modes[3];
-static LispObj *scan_types[6];
-static LispObj *scan_directions[2];
-static LispObj execute_stream;
-static LispString execute_string;
-static LispObj result_stream;
-static LispString result_string;
-static XawTextPropertyList **property_lists;
-static Cardinal num_property_lists;
-
-/* Some hacks to (at lest try to) avoid problems reentering Xlib while
- * testing for user interrupts */
-static volatile int disable_timeout, request_timeout;
-
-extern int pagesize;
-
-static LispBuiltin xeditbuiltins[] = {
-    {LispFunction, Xedit_AddEntity, "add-entity offset length identifier"},
-    {LispFunction, Xedit_AutoFill, "auto-fill &optional value"},
-    {LispFunction, Xedit_Background, "background &optional color"},
-    {LispFunction, Xedit_CharAfter, "char-after &optional offset"},
-    {LispFunction, Xedit_CharBefore, "char-before &optional offset"},
-    {LispFunction, Xedit_ClearEntities, "clear-entities left right"},
-    {LispFunction, Xedit_ConvertPropertyList, "convert-property-list name definition"},
-    {LispFunction, Xedit_Font, "font &optional font"},
-    {LispFunction, Xedit_Foreground, "foreground &optional color"},
-    {LispFunction, Xedit_GotoChar, "goto-char offset"},
-    {LispFunction, Xedit_HorizontalScrollbar, "horizontal-scrollbar &optional state"},
-    {LispFunction, Xedit_Insert, "insert text"},
-    {LispFunction, Xedit_Justification, "justification &optional value"},
-    {LispFunction, Xedit_LeftColumn, "left-column &optional left"},
-    {LispFunction, Xedit_Point, "point"},
-    {LispFunction, Xedit_PointMax, "point-max"},
-    {LispFunction, Xedit_PointMin, "point-min"},
-    {LispFunction, Xedit_PropertyList, "property-list &optional value"},
-    {LispFunction, Xedit_ReadText, "read-text offset length"},
-    {LispFunction, Xedit_ReplaceText, "replace-text left right text"},
-    {LispFunction, Xedit_RightColumn, "right-column &optional right"},
-    {LispFunction, Xedit_Scan, "scan offset type direction &key count include"},
-    {LispFunction, Xedit_SearchBackward, "search-backward string &optional offset ignore-case"},
-    {LispFunction, Xedit_SearchForward, "search-forward string &optional offset ignore-case"},
-    {LispFunction, Xedit_VerticalScrollbar, "vertical-scrollbar &optional state"},
-    {LispFunction, Xedit_WrapMode, "wrap-mode &optional value"},
-
-       /* This should be available from elsewhere at some time... */
-    {LispFunction, Xedit_XrmStringToQuark, "xrm-string-to-quark string"},
-};
-
-/*
- * Implementation
- */
-/*ARGUSED*/
-static Bool
-ControlGPredicate(Display *display, XEvent *event, XPointer arguments)
-{
-    char buffer[2];
-
-    return ((event->type == KeyPress || event->type == KeyRelease) &&
-           (event->xkey.state & ControlMask) &&
-           XLookupString(&(event->xkey), buffer, sizeof(buffer), NULL, NULL) &&
-           buffer[0] == '\a');
-}
-
-/*ARGSUSED*/
-static
-#ifdef SIGNALRETURNSINT
-int
-#else
-void
-#endif
-SigalrmHandler(int signum)
-{
-    XEvent event;
-
-    if (disable_timeout) {
-       request_timeout = 1;
-       return;
-    }
-
-    /* Check if user pressed C-g */
-    if (XCheckIfEvent(XtDisplay(textwindow), &event, ControlGPredicate, NULL)) {
-       XPutBackEvent(XtDisplay(textwindow), &event);
-       alarm(0);
-       /* Tell a signal was received, print message for SIGINT */
-       LispSignal(SIGINT);
-    }
-    else
-       alarm(1);
-#ifdef SIGNALRETURNSINT
-    return (0);
-#endif
-}
-
-static ssize_t
-WrapWrite(Widget output, const void *buffer, size_t nbytes)
-{
-    XawTextBlock block;
-    XawTextPosition position;
-
-    disable_timeout = 1;
-    position = XawTextGetInsertionPoint(output);
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.length = nbytes;
-    block.ptr = (String)buffer;
-    XawTextReplace(output, position, position, &block);
-    XawTextSetInsertionPoint(output, position + block.length);
-    disable_timeout = 0;
-
-    if (request_timeout) {
-       XFlush(XtDisplay(output));
-       request_timeout = 0;
-       SigalrmHandler(SIGALRM);
-    }
-
-    return ((ssize_t)nbytes);
-}
-
-static ssize_t
-WriteToStdout(int fd, const void *buffer, size_t nbytes)
-{
-    return (WrapWrite(textwindow, buffer, nbytes));
-}
-
-static ssize_t
-WriteToStderr(int fd, const void *buffer, size_t nbytes)
-{
-    return (WrapWrite(messwidget, buffer, nbytes));
-}
-
-void
-LispXeditInitialize(void)
-{
-    int i;
-    char *string;
-    LispObj *xedit, *list, *savepackage;
-
-    LispSetFileWrite(Stdout, WriteToStdout);
-    LispSetFileWrite(Stderr, WriteToStderr);
-
-    justify_modes[0]   = KEYWORD("LEFT");
-    justify_modes[1]   = KEYWORD("RIGHT");
-    justify_modes[2]   = KEYWORD("CENTER");
-    justify_modes[3]   = KEYWORD("FULL");
-
-    wrap_modes[0]      = KEYWORD("NEVER");
-    wrap_modes[1]      = KEYWORD("LINE");
-    wrap_modes[2]      = KEYWORD("WORD");
-
-    scan_types[0]      = KEYWORD("POSITIONS");
-    scan_types[1]      = KEYWORD("WHITE-SPACE");
-    scan_types[2]      = KEYWORD("EOL");
-    scan_types[3]      = KEYWORD("PARAGRAPH");
-    scan_types[4]      = KEYWORD("ALL");
-    scan_types[5]      = KEYWORD("ALPHA-NUMERIC");
-
-    scan_directions[0] = justify_modes[0];
-    scan_directions[1] = justify_modes[1];
-
-    /* Remember value of current package */
-    savepackage = PACKAGE;
-
-    /* Create the XEDIT package */
-    xedit = LispNewPackage(STRING("XEDIT"), NIL);
-
-    /* Update list of packages */
-    PACK = CONS(xedit, PACK);
-
-    /* Temporarily switch to the XEDIT package */
-    lisp__data.pack = lisp__data.savepack = xedit->data.package.package;
-    PACKAGE = xedit;
-
-    /* Add XEDIT builtin functions */
-    for (i = 0; i < sizeof(xeditbuiltins) / sizeof(xeditbuiltins[0]); i++)
-       LispAddBuiltinFunction(&xeditbuiltins[i]);
-
-    /* Create these objects in the xedit package */
-    Oauto_modes                = STATIC_ATOM("*AUTO-MODES*");
-    Oauto_mode         = STATIC_ATOM("AUTO-MODE");
-    Osyntax_highlight  = STATIC_ATOM("SYNTAX-HIGHLIGHT");
-    Osyntable_indent   = STATIC_ATOM("SYNTABLE-INDENT");
-
-    /*  Import symbols from the LISP and EXT packages */
-    for (list = PACK; CONSP(list); list = CDR(list)) {
-       string = THESTR(CAR(list)->data.package.name);
-       if (strcmp(string, "LISP") == 0 || strcmp(string, "EXT") == 0)
-           LispUsePackage(CAR(list));
-    }
-
-    /* Restore previous package */
-    lisp__data.pack = savepackage->data.package.package;
-    PACKAGE = savepackage;
-
-    /* Initialize helper static objects used when executing expressions */
-    execute_stream.type = LispStream_t;
-    execute_stream.data.stream.source.string = &execute_string;
-    execute_stream.data.stream.pathname = NIL;
-    execute_stream.data.stream.type = LispStreamString;
-    execute_stream.data.stream.readable = 1;
-    execute_stream.data.stream.writable = 0;
-    execute_string.output = 0;
-    result_stream.type = LispStream_t;
-    result_stream.data.stream.source.string = &result_string;
-    result_stream.data.stream.pathname = NIL;
-    result_stream.data.stream.type = LispStreamString;
-    result_stream.data.stream.readable = 0;
-    result_stream.data.stream.writable = 1;
-    result_string.string = XtMalloc(pagesize);
-    result_string.space = pagesize;
-
-    /* Initialize interactive edition function arguments */
-    /* first argument is syntax table */
-    interactive_arguments[0].type = LispCons_t;
-    interactive_arguments[0].data.cons.cdr = &interactive_arguments[1];
-    /* second argument is where to start reparsing */
-    interactive_arguments[1].type = LispCons_t;
-    interactive_arguments[1].data.cons.cdr = &interactive_arguments[2];
-    /* third argument is where to stop reparsing */
-    interactive_arguments[2].type = LispCons_t;
-    interactive_arguments[2].data.cons.cdr = &interactive_arguments[3];
-    /* fourth argument is interactive flag */
-    interactive_arguments[3].type = LispCons_t;
-    interactive_arguments[3].data.cons.car = T;
-    interactive_arguments[3].data.cons.cdr = NIL;
-
-    /* Load extra functions and data type definitions */
-    EXECUTE("(require \"xedit\")");
-
-
-    /*
-     * This assumes that the *auto-modes* variable is a list where every
-     * item has the format:
-     *     (regexp string-desc load-file-desc . symbol-name)
-     * Minimal error checking is done.
-     */
-
-    if (Oauto_modes->data.atom->a_object) {
-       LispObj *desc, *modes = Oauto_modes->data.atom->property->value;
-
-       for (; CONSP(modes); modes = CDR(modes)) {
-           list = CAR(modes);
-
-           desc = NIL;
-           for (i = 0; i < 3 && CONSP(list); i++, list = CDR(list)) {
-               if (i == 1)
-                   desc = CAR(list);
-           }
-           if (i == 3 && STRINGP(desc)) {
-               mode_infos = (EditModeInfo*)
-                   XtRealloc((XtPointer)mode_infos, sizeof(EditModeInfo) *
-                             (num_mode_infos + 1));
-               mode_infos[num_mode_infos].desc = XtNewString(THESTR(desc));
-               mode_infos[num_mode_infos].symbol = list;
-               mode_infos[num_mode_infos].syntax = NULL;
-               ++num_mode_infos;
-           }
-       }
-    }
-}
-
-static void
-XeditUpdateModeInfos(void)
-{
-    int i;
-
-    for (i = 0; i < num_mode_infos; i++) {
-       if (mode_infos[i].symbol &&
-           mode_infos[i].syntax == NULL &&
-           XSYMBOLP(mode_infos[i].symbol) &&
-           mode_infos[i].symbol->data.atom->a_object)
-           mode_infos[i].syntax =
-               mode_infos[i].symbol->data.atom->property->value;
-    }
-}
-
-void
-XeditLispExecute(Widget output, XawTextPosition left, XawTextPosition right)
-{
-    GC_ENTER();
-    LISP_SETUP();
-    int alloced, return_count;
-    XawTextBlock block;
-    XawTextPosition position;
-    char *string, *ptr;
-    LispObj *result, *code, *_cod, *returns;
-
-    LISP_ENTER();
-
-    position = left;
-    XawTextSourceRead(XawTextGetSource(textwindow), left, &block, right - left);
-    if (block.length < right - left) {
-       alloced = 1;
-       string = ptr = LispMalloc(right - left);
-       memcpy(ptr, block.ptr, block.length);
-       position = left + block.length;
-       ptr += block.length;
-       for (; position < right;) {
-           XawTextSourceRead(XawTextGetSource(textwindow),
-                             position, &block, right - position);
-           memcpy(ptr, block.ptr, block.length);
-           position += block.length;
-           ptr += block.length;
-       }
-    }
-    else {
-       alloced = 0;
-       string = block.ptr;
-    }
-
-    execute_string.string = string;
-    execute_string.length = right - left;
-    execute_string.input = 0;
-    LispPushInput(&execute_stream);
-    _cod = COD;
-    result = NIL;
-    if ((code = LispRead()) != NULL)
-       result = EVAL(code);
-    COD = _cod;
-    LispPopInput(&execute_stream);
-
-    returns = NIL;
-    if (RETURN_COUNT > 0) {
-       GC_PROTECT(result);
-       returns = _cod = CONS(RETURN(0), NIL);
-       GC_PROTECT(returns);
-       for (return_count = 1; return_count < RETURN_COUNT; return_count++) {
-           RPLACD(_cod, CONS(RETURN(return_count), NIL));
-           _cod = CDR(_cod);
-       }
-    }
-    LispFflush(Stdout);
-    LispUpdateResults(code, result);
-    if (RETURN_COUNT >= 0) {
-       XeditPrint(output, result, 1);
-       for (; CONSP(returns); returns = CDR(returns))
-           XeditPrint(output, CAR(returns), 0);
-    }
-
-    if (alloced)
-       LispFree(string);
-    GC_LEAVE();
-
-    LISP_LEAVE();
-}
-
-static void
-XeditPrint(Widget output, LispObj *object, int newline)
-{
-    XawTextBlock block;
-    XawTextPosition position;
-
-    result_string.length = result_string.output = 0;
-    if (newline) {
-       position = XawTextGetInsertionPoint(output);
-       if (position != XawTextSourceScan(XawTextGetSource(output),
-                                         position, XawstEOL,
-                                         XawsdLeft, 1, False))
-           LispSputc(&result_string, '\n');
-    }
-    LispWriteObject(&result_stream, object);
-    LispSputc(&result_string, '\n');
-
-    position = XawTextGetInsertionPoint(output);
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.length = result_string.length;
-    block.ptr = result_string.string;
-    XawTextReplace(output, position, position, &block);
-    XawTextSetInsertionPoint(output, position + block.length);
-}
-
-/*
- *  This function is defined here to avoid exporting all the lisp interfaces
- * to the core xedit code.
- */
-void
-XeditLispSetEditMode(xedit_flist_item *item, LispObj *symbol)
-{
-    GC_ENTER();
-    LISP_SETUP();
-    LispObj *syntax, *name;
-
-    item->xldata = (XeditLispData*)XtCalloc(1, sizeof(XeditLispData));
-
-    LISP_ENTER();
-
-    /* Create an object that represents the buffer filename.
-     * Note that the entire path is passed to the auto-mode
-     * function, so that directory names may be also be used
-     * when determining a file type. */
-    name = STRING(item->filename);
-    GC_PROTECT(name);
-
-    /*  Call the AUTO-MODE function to check if there is a
-     * syntax definition for the file being loaded */
-    if (symbol == NULL)
-       syntax = APPLY1(Oauto_mode, name);
-    else
-       syntax = APPLY2(Oauto_mode, name, symbol);
-
-    /* Don't need the name object anymore */
-    GC_LEAVE();
-
-    if (syntax != NIL) {
-       Arg arg[1];
-       LispObj arguments;
-       XawTextPropertyList *property_list;
-
-       item->xldata->syntax = syntax;
-
-       /* Apply the syntax highlight to the current buffer */
-       arguments.type = LispCons_t;
-       arguments.data.cons.car = syntax;
-       arguments.data.cons.cdr = NIL;
-       LispFuncall(Osyntax_highlight, &arguments, 1);
-
-       /*  The previous call added the property list to the widget,
-        * remember it when switching sources. */
-       XtSetArg(arg[0], XawNtextProperties, &property_list);
-       XtGetValues(XawTextGetSink(textwindow), arg, 1);
-       item->properties = property_list;
-
-       /* Add callback for interactive changes */
-       XtAddCallback(item->source, XtNpropertyCallback,
-                     XeditInteractiveCallback, item->xldata);
-
-       /* Update information as a new file may have been loaded */
-       XeditUpdateModeInfos();
-    }
-    else
-       item->properties = NULL;
-
-    LISP_LEAVE();
-}
-
-void
-XeditLispUnsetEditMode(xedit_flist_item *item)
-{
-    if (item->xldata) {
-       XtRemoveCallback(item->source, XtNpropertyCallback,
-                        XeditInteractiveCallback, item->xldata);
-       XtFree((XtPointer)item->xldata);
-       item->xldata = NULL;
-    }
-}
-
-#define MAX_INFOS      32
-/*
- *  This callback tries to do it's best in generating correct output while
- * also doing minimal work/redrawing of the screen. It probably will fail
- * for some syntax-definitions, or will just not properly repaint the
- * screen. In the later case, just press Ctrl+L.
- *  There isn't yet any command to force reparsing of some regions, and if
- * the parser becomes confused, you may need to go to a line, press a space
- * and undo, just to force it to reparse the line, and possibly some extra
- * lines until the parser thinks the display is in sync.
- *  Sometimes it will repaint a lot more of text than what is being requested
- * by this callback, this should be fixed at some time, as for certain cases
- * it is also required some redesign in the Xaw interface.
- */
-static void
-XeditInteractiveCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    LISP_SETUP();
-    XeditLispData *data = (XeditLispData*)client_data;
-    LispObj *syntax = data->syntax;
-    XawTextPropertyInfo *info = (XawTextPropertyInfo*)call_data;
-    LispObj *result, *syntable;
-    XawTextAnchor *anchor;
-    XawTextEntity *entity;
-    XawTextPosition first, last, left, right, begin, next, tmp, position;
-    int i, j, indent;
-    TextSrcObject src = (TextSrcObject)w;
-    EntityInfo oinfo[MAX_INFOS], ninfo[MAX_INFOS];
-    XrmQuark props[MAX_INFOS];
-    int num_oinfo, num_ninfo, num_props;
-    XmuScanline *clip, *oclip, *nclip;
-    XmuSegment segment, *seg;
-
-    if (data->disable_highlight)
-       return;
-
-    LISP_ENTER();
-
-    first = XawTextSourceScan(w, 0, XawstAll, XawsdLeft, 1, True);
-    last = XawTextSourceScan(w, 0, XawstAll, XawsdRight, 1, True);
-
-    left = info->left;
-    right = left + info->block->length;
-
-    /* For now, only call the indent hook if a single character was typed */
-    indent = (info->right == left) && (right == left + 1);
-
-    /* Always reparse full lines */
-    left = begin = XawTextSourceScan(w, left, XawstEOL, XawsdLeft, 1, False);
-    right = next = XawTextSourceScan(w, right, XawstEOL, XawsdRight, 1, False);
-
-
-    /*  Check properties in the modified text. If a complex nested syntax
-     * table was parsed, the newline has it's default property, so, while
-     * the newline has a property, backup a line to make sure everything is
-     * properly parsed.
-     *  Maybe should limit the number of backuped lines, but if the parsing
-     * becomes noticeable slow, better to rethink the syntax definition. */
-    while (left > first) {
-       position = XawTextSourceScan(w, left, XawstEOL, XawsdLeft, 1, True);
-       if (XawTextSourceAnchorAndEntity(w, position, &anchor, &entity))
-           left = XawTextSourceScan(w, left, XawstEOL, XawsdLeft, 2, False);
-       else
-           break;
-    }
-
-    /* While the newline after the right position has a "hidden" property,
-     * keep incrementing a line to be reparsed. */
-    while (right < last) {
-       if (XawTextSourceAnchorAndEntity(w, right, &anchor, &entity))
-           right = XawTextSourceScan(w, right, XawstEOL, XawsdRight, 2, False);
-       else
-           break;
-    }
-
-#ifndef MAX
-#define MAX(a, b)      ((a) > (b) ? (a) : (b))
-#endif
-
-#ifndef MIN
-#define MIN(a, b)      ((a) < (b) ? (a) : (b))
-#endif
-
-#define STORE_STATE(count, info, from, to)                             \
-    (count) = 0;                                                       \
-    if ((anchor = XawTextSourceFindAnchor(w, (from))) != NULL) {       \
-       entity = anchor->entities;                                      \
-       /* Find first entity in the region to parse */                  \
-       while (entity &&                                                \
-              anchor->position + entity->offset + entity->length <=    \
-              (from))                                                  \
-           entity = entity->next;                                      \
-       /* Loop storing information */                                  \
-       while (entity &&                                                \
-           (position = anchor->position + entity->offset) < (to)) {    \
-           (info)[(count)].left = MAX(position, (from));               \
-           position += entity->length;                                 \
-           (info)[(count)].right = MIN(position, (to));                \
-           (info)[(count)].property = entity->property;                \
-           /* If the changes are so complex, user need press Ctrl+L */ \
-           if (++(count) >= MAX_INFOS)                                 \
-               break;                                                  \
-           if ((entity = entity->next) == NULL &&                      \
-               (anchor = XawTextSourceNextAnchor(w, anchor)) != NULL)  \
-               entity = anchor->entities;                              \
-       }                                                               \
-    }
-
-    /* Remember old state */
-    STORE_STATE(num_oinfo, oinfo, begin, right);
-
-    /* Reparse the lines in the modified/edited range of text */
-    interactive_arguments[0].data.cons.car = syntax;
-    interactive_arguments[1].data.cons.car = FIXNUM(left);
-    interactive_arguments[2].data.cons.car = FIXNUM(right);
-    result = APPLY(Osyntax_highlight, &interactive_arguments[0]);
-    /* Indent table is the second return value */
-    if (RETURN_COUNT)
-       syntable = RETURN(0);
-    else
-       syntable = NIL;
-
-    /* This normally is the same value as right, but the parser may have
-     * continued when the syntax table stack did not finish. */
-    if (FIXNUMP(result))
-       right = FIXNUM_VALUE(result);
-
-    LISP_LEAVE();
-
-    /* Check what have changed */
-    STORE_STATE(num_ninfo, ninfo, begin, right);
-
-    /* Initialize to redraw everything. */
-    clip = XmuNewScanline(0, begin, right);
-
-#define CLIP_MASK(mask, from, to)                                      \
-    if ((from) < (to)) {                                               \
-       segment.x1 = (from);                                            \
-       segment.x2 = (to);                                              \
-       XmuScanlineOrSegment((mask), &segment);                         \
-    }
-
-    oclip = XmuNewScanline(0, 0, 0);
-    nclip = XmuNewScanline(0, 0, 0);
-
-#define CLIP_DEFAULT(mask, from, info, num_info)                       \
-    for (tmp = (from), i = 0; i < (num_info); i++) {                   \
-       CLIP_MASK((mask), tmp, (info)[i].left);                         \
-       tmp = (info)[i].right;                                          \
-    }
-
-    /* First generate masks of regions with the default property */
-    CLIP_DEFAULT(oclip, begin, oinfo, num_oinfo);
-    CLIP_DEFAULT(nclip, begin, ninfo, num_ninfo);
-
-    /* Store unchanged region in oclip */
-    XmuScanlineAnd(oclip, nclip);
-
-    /* Don't need to redraw the region in oclip */
-    XmuScanlineXor(clip, oclip);
-
-#define LIST_PROPERTIES(prop, num_prop, info, num_info)                        \
-    (num_prop) = 0;                                                    \
-    for (i = 0; i < (num_info); i++) {                                 \
-       for (j = 0; j < (num_prop); j++)                                \
-           if ((prop)[j] == (info)[i].property)                        \
-               break;                                                  \
-       if (j == (num_prop))                                            \
-           (prop)[(num_prop)++] = (info)[i].property;                  \
-    }
-
-    /* Prepare to generate masks of regions of text with defined properties */
-    LIST_PROPERTIES(props, num_props, oinfo, num_oinfo);
-
-#define CLIP_PROPERTY(mask, prop, info, num_info)                      \
-    for (j = 0; j < (num_info); j++) {                                 \
-       if ((info)[j].property == (prop)) {                             \
-           CLIP_MASK((mask), (info)[j].left, (info)[j].right);         \
-       }                                                               \
-    }
-
-    /* Only care about the old properties, new ones need to be redrawn */
-    for (i = 0; i < num_props; i++) {
-       XrmQuark property = props[i];
-
-       /* Reset oclip and nclip */
-       XmuScanlineXor(oclip, oclip);
-       XmuScanlineXor(nclip, nclip);
-
-       /* Generate masks */
-       CLIP_PROPERTY(oclip, property, oinfo, num_oinfo);
-       CLIP_PROPERTY(nclip, property, ninfo, num_ninfo);
-
-       /* Store unchanged region in oclip */
-       XmuScanlineAnd(oclip, nclip);
-
-       /* Don't need to redraw the region in oclip */
-       XmuScanlineXor(clip, oclip);
-       XmuOptimizeScanline(clip);
-    }
-
-    XmuDestroyScanline(oclip);
-    XmuDestroyScanline(nclip);
-
-    /* Tell Xaw that need update some regions */
-    for (seg = clip->segment; seg; seg = seg->next) {
-       for (i = 0; i < src->textSrc.num_text; i++)
-           /* This really should have an exported interface... */
-           _XawTextNeedsUpdating((TextWidget)(src->textSrc.text[i]),
-                                 seg->x1, seg->x2 + (seg->x2 > next));
-    }
-    XmuDestroyScanline(clip);
-
-    data->syntable = syntable;
-    /* XXX check lisp__running to know if at the toplevel parsing state */
-    if (indent && syntable != NIL && !lisp__running &&
-       /* Doing an undo, probably will need an exported interface for this
-        * case. Should not change the text now. */
-       (!src->textSrc.enable_undo || !src->textSrc.undo_state))
-       XtAddCallback(textwindow, XtNpositionCallback,
-                     XeditIndentationCallback, data);
-}
-
-/*
- * This callback is called if the syntax table where the cursor is located
- * defines an indentation function.
- */
-static void
-XeditIndentationCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    LISP_SETUP();
-    LispObj *indentp;
-    XeditLispData *data = (XeditLispData*)client_data;
-
-    data->disable_highlight = True;
-    XtRemoveCallback(w, XtNpositionCallback, XeditIndentationCallback, data);
-
-    LISP_ENTER();
-
-    /* Get pointer to indentation function */
-    indentp = APPLY1(Osyntable_indent, data->syntable);
-
-    /* Execute indentation function */
-    if (indentp != NIL)
-       APPLY2(indentp, data->syntax, data->syntable);
-
-    data->disable_highlight = False;
-
-    LISP_LEAVE();
-}
-
-/************************************************************************
- * Builtin functions
- ************************************************************************/
-LispObj *
-Xedit_AddEntity(LispBuiltin *builtin)
-/*
- add-entity offset length identifier
- */
-{
-    LispObj *offset, *length, *identifier;
-
-    identifier = ARGUMENT(2);
-    length = ARGUMENT(1);
-    offset = ARGUMENT(0);
-
-    CHECK_INDEX(offset);
-    CHECK_INDEX(length);
-    CHECK_LONGINT(identifier);
-
-    return (XawTextSourceAddEntity(XawTextGetSource(textwindow), 0, 0, NULL,
-                                  FIXNUM_VALUE(offset), FIXNUM_VALUE(length),
-                                  LONGINT_VALUE(identifier)) ? T : NIL);
-}
-
-LispObj *
-Xedit_AutoFill(LispBuiltin *builtin)
-/*
- auto-fill &optional value
- */
-{
-    Arg arg[1];
-    Boolean state;
-
-    LispObj *value;
-
-    value = ARGUMENT(0);
-
-    if (value != UNSPEC) {
-       XtSetArg(arg[0], XtNautoFill, value == NIL ? False : True);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNautoFill, &state);
-       XtGetValues(textwindow, arg, 1);
-       value = state ? T : NIL;
-    }
-
-    return (value);
-}
-
-LispObj *
-Xedit_Background(LispBuiltin *builtin)
-/*
- background &optional color
- */
-{
-    Pixel pixel;
-    Arg arg[1];
-    XrmValue from, to;
-
-    LispObj *color;
-
-    color = ARGUMENT(0);
-
-    if (color != UNSPEC) {
-       CHECK_STRING(color);
-
-       from.size = STRLEN(color);
-       from.addr = (XtPointer)THESTR(color);
-       to.size = sizeof(Pixel);
-       to.addr = (XtPointer)&pixel;
-
-       if (!XtConvertAndStore(XawTextGetSink(textwindow),
-                              XtRString, &from, XtRPixel, &to))
-           LispDestroy("cannot convert %s to Pixel", STROBJ(color));
-
-       XtSetArg(arg[0], XtNbackground, pixel);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       from.size = sizeof(Pixel);
-       from.addr = (XtPointer)&pixel;
-       to.size = 0;
-       to.addr = NULL;
-
-       XtSetArg(arg[0], XtNbackground, &pixel);
-       XtGetValues(XawTextGetSink(textwindow), arg, 1);
-       /* This cannot fail */
-       XtConvertAndStore(textwindow, XtRPixel, &from, XtRString, &to);
-
-       color = STRING(to.addr);
-    }
-
-    return (color);
-}
-
-static LispObj *
-XeditCharAt(LispBuiltin *builtin, int before)
-{
-    Widget source = XawTextGetSource(textwindow);
-    XawTextPosition first, point, last;
-    XawTextBlock block;
-
-    LispObj *offset;
-
-    offset = ARGUMENT(0);
-    if (offset != UNSPEC) {
-       CHECK_INDEX(offset);
-    }
-
-    first = XawTextSourceScan(source, 0, XawstAll, XawsdLeft, 1, True);
-    if (FIXNUMP(offset))
-       point = FIXNUM_VALUE(offset);
-    else
-       point = XawTextGetInsertionPoint(textwindow);
-    if (before && point > first) {
-       XawTextPosition position =
-           XawTextSourceScan(source, point, XawstPositions, XawsdLeft, 1, True);
-
-       if (position < point)
-           point = position;
-       else
-           return (NIL);
-    }
-    last = XawTextSourceScan(source, 0, XawstAll, XawsdRight, 1, True);
-
-    if (point < first || point > last)
-       return (NIL);
-
-    XawTextSourceRead(source, point, &block, 1);
-
-    return (block.length ? SCHAR(*(unsigned char*)block.ptr) : NIL);
-}
-
-LispObj *
-Xedit_CharAfter(LispBuiltin *builtin)
-/*
- char-after &optional offset
- */
-{
-    return (XeditCharAt(builtin, 0));
-}
-
-LispObj *
-Xedit_CharBefore(LispBuiltin *builtin)
-/*
- char-before &optional offset
- */
-{
-    return (XeditCharAt(builtin, 1));
-}
-
-LispObj *
-Xedit_ClearEntities(LispBuiltin *builtin)
-/*
- clear-entities left right
- */
-{
-    LispObj *left, *right;
-
-    right = ARGUMENT(1);
-    left = ARGUMENT(0);
-
-    CHECK_INDEX(left);
-    CHECK_INDEX(right);
-
-    XawTextSourceClearEntities(XawTextGetSource(textwindow),
-                              FIXNUM_VALUE(left), FIXNUM_VALUE(right));
-
-    return (T);
-}
-
-LispObj *
-Xedit_ConvertPropertyList(LispBuiltin *builtin)
-/*
- convert-property-list name definition
- */
-{
-    LispObj *result;
-    XawTextPropertyList *property_list;
-
-    LispObj *name, *definition;
-
-    definition = ARGUMENT(1);
-    name = ARGUMENT(0);
-
-    CHECK_STRING(name);
-    CHECK_STRING(definition);
-
-    result = NIL;
-    property_list = XawTextSinkConvertPropertyList(THESTR(name),
-                                                  THESTR(definition),
-                                                  topwindow->core.screen,
-                                                  topwindow->core.colormap,
-                                                  topwindow->core.depth);
-
-    if (property_list) {
-       Cardinal i;
-
-       for (i = 0; i < num_property_lists; i++)
-           /* Check if a new property list was created */
-           if (property_lists[i]->identifier == property_list->identifier)
-               break;
-
-       /* Remember this pointer when asked back for it */
-       if (i == num_property_lists) {
-           property_lists = (XawTextPropertyList**)
-               XtRealloc((XtPointer)property_lists,
-                         sizeof(XawTextPropertyList) *
-                         (num_property_lists + 1));
-           property_lists[num_property_lists++] = property_list;
-       }
-       result = INTEGER(property_list->identifier);
-    }
-
-    return (result);
-}
-
-LispObj *
-Xedit_Font(LispBuiltin *builtin)
-/*
- font &optional font
- */
-{
-    XFontStruct *font_struct;
-    Arg arg[1];
-    XrmValue from, to;
-
-    LispObj *font;
-
-    font = ARGUMENT(0);
-
-    if (font != UNSPEC) {
-       CHECK_STRING(font);
-
-       from.size = STRLEN(font);
-       from.addr = (XtPointer)THESTR(font);
-       to.size = sizeof(XFontStruct*);
-       to.addr = (XtPointer)&font_struct;
-
-       if (!XtConvertAndStore(textwindow, XtRString, &from, XtRFontStruct, &to))
-           LispDestroy("cannot convert %s to FontStruct", STROBJ(font));
-
-       XtSetArg(arg[0], XtNfont, font_struct);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       from.size = sizeof(XFontStruct*);
-       from.addr = (XtPointer)&font_struct;
-       to.size = 0;
-       to.addr = NULL;
-
-       XtSetArg(arg[0], XtNfont, &font_struct);
-       XtGetValues(XawTextGetSink(textwindow), arg, 1);
-       /* This cannot fail */
-       XtConvertAndStore(textwindow, XtRFontStruct, &from, XtRString, &to);
-
-       font = STRING(to.addr);
-    }
-
-    return (font);
-}
-
-LispObj *
-Xedit_Foreground(LispBuiltin *builtin)
-/*
- foreground &optional color
- */
-{
-    Pixel pixel;
-    Arg arg[1];
-    XrmValue from, to;
-
-    LispObj *color;
-
-    color = ARGUMENT(0);
-
-    if (color != UNSPEC) {
-       CHECK_STRING(color);
-
-       from.size = STRLEN(color);
-       from.addr = (XtPointer)THESTR(color);
-       to.size = sizeof(Pixel);
-       to.addr = (XtPointer)&pixel;
-
-       if (!XtConvertAndStore(XawTextGetSink(textwindow),
-                              XtRString, &from, XtRPixel, &to))
-           LispDestroy("cannot convert %s to Pixel", STROBJ(color));
-
-       XtSetArg(arg[0], XtNforeground, pixel);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       from.size = sizeof(Pixel);
-       from.addr = (XtPointer)&pixel;
-       to.size = 0;
-       to.addr = NULL;
-
-       XtSetArg(arg[0], XtNforeground, &pixel);
-       XtGetValues(XawTextGetSink(textwindow), arg, 1);
-       /* This cannot fail */
-       XtConvertAndStore(textwindow, XtRPixel, &from, XtRString, &to);
-
-       color = STRING(to.addr);
-    }
-
-    return (color);
-}
-
-LispObj *
-Xedit_GotoChar(LispBuiltin *builtin)
-/*
- goto-char offset
- */
-{
-    LispObj *offset;
-    XawTextPosition point;
-
-    offset = ARGUMENT(0);
-
-    CHECK_INDEX(offset);
-    XawTextSetInsertionPoint(textwindow, FIXNUM_VALUE(offset));
-    point = XawTextGetInsertionPoint(textwindow);
-    if (point != FIXNUM_VALUE(offset))
-       offset = FIXNUM(point);
-
-    return (offset);
-}
-
-LispObj *
-Xedit_HorizontalScrollbar(LispBuiltin *builtin)
-/*
- horizontal-scrollbar &optional state
- */
-{
-    Arg arg[1];
-    XawTextScrollMode scroll;
-
-    LispObj *state;
-
-    state = ARGUMENT(0);
-
-    if (state != UNSPEC) {
-       scroll = state == NIL ? XawtextScrollNever : XawtextScrollAlways;
-       XtSetArg(arg[0], XtNscrollHorizontal, scroll);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNscrollHorizontal, &scroll);
-       XtGetValues(textwindow, arg, 1);
-       state = scroll == XawtextScrollAlways ? T : NIL;
-    }
-
-    return (state);
-}
-
-LispObj *
-Xedit_Insert(LispBuiltin *builtin)
-/*
- insert text
- */
-{
-    XawTextPosition point = XawTextGetInsertionPoint(textwindow);
-    XawTextBlock block;
-
-    LispObj *text;
-
-    text = ARGUMENT(0);
-
-    CHECK_STRING(text);
-    
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.length = STRLEN(text);
-    block.ptr = THESTR(text);
-    XawTextReplace(textwindow, point, point, &block);
-    XawTextSetInsertionPoint(textwindow, point + block.length);
-
-    return (text);
-}
-
-LispObj *
-Xedit_Justification(LispBuiltin *builtin)
-/*
- justification &optional value
- */
-{
-    int i;
-    Arg arg[1];
-    XawTextJustifyMode justify;
-
-    LispObj *value;
-
-    value = ARGUMENT(0);
-
-    if (value != UNSPEC) {
-       for (i = 0; i < 4; i++)
-           if (value == justify_modes[i])
-               break;
-       if (i >= 4)
-           LispDestroy("%s: argument must be "
-                       ":LEFT, :RIGHT, :CENTER, or :FULL, not %s",
-                       STRFUN(builtin), STROBJ(value));
-       XtSetArg(arg[0], XtNjustifyMode, (XawTextJustifyMode)i);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNjustifyMode, &justify);
-       XtGetValues(textwindow, arg, 1);
-       i = (int)justify;
-       if (i <= 0 || i >= 4)
-           i = 0;
-       value = justify_modes[i];
-    }
-
-    return (value);
-}
-
-LispObj *
-Xedit_LeftColumn(LispBuiltin *builtin)
-/*
- left-column &optional left
- */
-{
-    short left;
-    Arg arg[1];
-
-    LispObj *oleft;
-
-    oleft = ARGUMENT(0);
-
-    if (oleft != UNSPEC) {
-       CHECK_INDEX(oleft);
-       if (FIXNUM_VALUE(oleft) >= 32767)
-           left = 32767;
-       else
-           left = FIXNUM_VALUE(oleft);
-
-       XtSetArg(arg[0], XtNleftColumn, left);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNleftColumn, &left);
-       XtGetValues(textwindow, arg, 1);
-
-       oleft = FIXNUM((long)left);
-    }
-
-    return (oleft);
-}
-
-LispObj *
-Xedit_Point(LispBuiltin *builtin)
-/*
- point
- */
-{
-    return (FIXNUM(XawTextGetInsertionPoint(textwindow)));
-}
-
-LispObj *
-Xedit_PointMax(LispBuiltin *builtin)
-/*
- point-max
- */
-{
-    return (FIXNUM(XawTextSourceScan(XawTextGetSource(textwindow), 0,
-                                    XawstAll, XawsdRight, 1, True)));
-}
-
-LispObj *
-Xedit_PointMin(LispBuiltin *builtin)
-/*
- point-min
- */
-{
-    return (FIXNUM(XawTextSourceScan(XawTextGetSource(textwindow), 0,
-                                    XawstAll, XawsdLeft, 1, True)));
-}
-
-LispObj *
-Xedit_PropertyList(LispBuiltin *builtin)
-/*
- property-list &optional value
- */
-{
-    Arg arg[1];
-    XawTextPropertyList *property_list;
-
-    LispObj *value;
-
-    value = ARGUMENT(0);
-
-    if (value != UNSPEC) {
-       Cardinal i;
-       XrmQuark quark;
-
-       CHECK_LONGINT(value);
-       property_list = NULL;
-       quark = LONGINT_VALUE(value);
-       for (i = 0; i < num_property_lists; i++)
-           if (property_lists[i]->identifier == quark) {
-               property_list = property_lists[i];
-               break;
-           }
-
-       if (property_list) {
-           XtSetArg(arg[0], XawNtextProperties, property_list);
-           XtSetValues(XawTextGetSink(textwindow), arg, 1);
-       }
-       else
-           /* Maybe should generate an error here */
-           value = NIL;
-    }
-    else {
-       XtSetArg(arg[0], XawNtextProperties, &property_list);
-       XtGetValues(XawTextGetSink(textwindow), arg, 1);
-       if (property_list)
-           value = INTEGER(property_list->identifier);
-    }
-
-    return (value);
-}
-
-LispObj *
-Xedit_ReadText(LispBuiltin *builtin)
-/*
- read-text offset length
- */
-{
-    XawTextPosition last = XawTextSourceScan(XawTextGetSource(textwindow), 0,
-                                            XawstAll, XawsdRight, 1, True);
-    XawTextPosition from, to, len;
-    XawTextBlock block;
-    char *string, *ptr;
-
-    LispObj *offset, *length;
-
-    length = ARGUMENT(1);
-    offset = ARGUMENT(0);
-
-    CHECK_INDEX(offset);
-    CHECK_INDEX(length);
-
-    from = FIXNUM_VALUE(offset);
-    to = from + FIXNUM_VALUE(length);
-    if (from > last)
-       from = last;
-    if (to > last)
-       to = last;
-
-    if (from == to)
-       return (STRING(""));
-
-    len = to - from;
-    string = LispMalloc(len);
-
-    for (ptr = string; from < to;) {
-       XawTextSourceRead(XawTextGetSource(textwindow), from, &block, to - from);
-       memcpy(ptr, block.ptr, block.length);
-       ptr += block.length;
-       from += block.length;
-    }
-
-    return (LSTRING2(string, len));
-}
-
-LispObj *
-Xedit_ReplaceText(LispBuiltin *builtin)
-/*
- replace-text left right text
- */
-{
-    XawTextPosition last = XawTextSourceScan(XawTextGetSource(textwindow), 0,
-                                            XawstAll, XawsdRight, 1, True);
-    XawTextPosition left, right;
-    XawTextBlock block;
-
-    LispObj *oleft, *oright, *text;
-
-    text = ARGUMENT(2);
-    oright = ARGUMENT(1);
-    oleft = ARGUMENT(0);
-
-    CHECK_INDEX(oleft);
-    CHECK_INDEX(oright);
-    CHECK_STRING(text);
-
-    left = FIXNUM_VALUE(oleft);
-    right = FIXNUM_VALUE(oright);
-    if (left > last)
-       left = last;
-    if (left > right)
-       right = left;
-    else if (right > last)
-       right = last;
-
-    block.firstPos = 0;
-    block.format = FMT8BIT;
-    block.length = STRLEN(text);
-    block.ptr = THESTR(text);
-    XawTextReplace(textwindow, left, right, &block);
-
-    return (text);
-}
-
-LispObj *
-Xedit_RightColumn(LispBuiltin *builtin)
-/*
- right-column &optional right
- */
-{
-    short right;
-    Arg arg[1];
-
-    LispObj *oright;
-
-    oright = ARGUMENT(0);
-
-    if (oright != UNSPEC) {
-       CHECK_INDEX(oright);
-       if (FIXNUM_VALUE(oright) >= 32767)
-           right = 32767;
-       else
-           right = FIXNUM_VALUE(oright);
-
-       XtSetArg(arg[0], XtNrightColumn, right);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNrightColumn, &right);
-       XtGetValues(textwindow, arg, 1);
-
-       oright = FIXNUM(right);
-    }
-
-    return (oright);
-}
-
-LispObj *
-Xedit_Scan(LispBuiltin *builtin)
-/*
- scan offset type direction &key count include
- */
-{
-    int i;
-    XawTextPosition offset;
-    XawTextScanType type;
-    XawTextScanDirection direction;
-    int count;
-
-    LispObj *ooffset, *otype, *odirection, *ocount, *include;
-
-    include = ARGUMENT(4);
-    if (include == UNSPEC)
-       include = NIL;
-    ocount = ARGUMENT(3);
-    odirection = ARGUMENT(2);
-    otype = ARGUMENT(1);
-    ooffset = ARGUMENT(0);
-
-    CHECK_INDEX(ooffset);
-    offset = FIXNUM_VALUE(ooffset);
-
-    for (i = 0; i < 2; i++)
-       if (odirection == scan_directions[i])
-           break;
-    if (i >= 2)
-       LispDestroy("%s: direction must be "
-                   ":LEFT or :RIGHT, not %s",
-                   STRFUN(builtin), STROBJ(odirection));
-    direction = (XawTextScanDirection)i;
-
-    for (i = 0; i < 6; i++)
-       if (otype == scan_types[i])
-           break;
-    if (i >= 6)
-       LispDestroy("%s: direction must be "
-                   ":POSITIONS, :WHITE-SPACE, :EOL, "
-                   ":PARAGRAPH, :ALL, or :ALPHA-NUMERIC, not %s",
-                   STRFUN(builtin), STROBJ(otype));
-    type = (XawTextScanType)i;
-
-    if (ocount == UNSPEC)
-       count = 1;
-    else {
-       CHECK_INDEX(ocount);
-       count = FIXNUM_VALUE(ocount);
-    }
-
-    offset = XawTextSourceScan(XawTextGetSource(textwindow),
-                              offset, type, direction, count,
-                              include != NIL);
-
-    return (FIXNUM(offset));
-}
-
-static LispObj *
-XeditSearch(LispBuiltin *builtin, XawTextScanDirection direction)
-{
-    XawTextBlock block;
-    XawTextPosition position;
-
-    LispObj *string, *offset, *ignore_case;
-
-    ignore_case = ARGUMENT(2);
-    offset = ARGUMENT(1);
-    string = ARGUMENT(0);
-
-    CHECK_STRING(string);
-    if (offset != UNSPEC) {
-       CHECK_INDEX(offset);
-       position = FIXNUM_VALUE(offset);
-    }
-    else
-       position = XawTextGetInsertionPoint(textwindow);
-
-    block.firstPos = (ignore_case != UNSPEC && ignore_case != NIL) ? 1 : 0;
-    block.format = FMT8BIT;
-    block.length = STRLEN(string);
-    block.ptr = THESTR(string);
-    position = XawTextSourceSearch(XawTextGetSource(textwindow),
-                                  position, direction, &block);
-
-    return (position != XawTextSearchError ? FIXNUM(position) : NIL);
-}
-
-
-LispObj *
-Xedit_SearchBackward(LispBuiltin *builtin)
-/*
- search-backward string &optional offset ignore-case
- */
-{
-    return (XeditSearch(builtin, XawsdLeft));
-}
-
-LispObj *
-Xedit_SearchForward(LispBuiltin *builtin)
-/*
- search-forward string &optional offset ignore-case
- */
-{
-    return (XeditSearch(builtin, XawsdRight));
-}
-
-LispObj *
-Xedit_VerticalScrollbar(LispBuiltin *builtin)
-/*
- vertical-scrollbar &optional state
- */
-{
-    Arg arg[1];
-    XawTextScrollMode scroll;
-
-    LispObj *state;
-
-    state = ARGUMENT(0);
-
-    if (state != UNSPEC) {
-       scroll = state == NIL ? XawtextScrollNever : XawtextScrollAlways;
-       XtSetArg(arg[0], XtNscrollVertical, scroll);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNscrollVertical, &scroll);
-       XtGetValues(textwindow, arg, 1);
-       state = scroll == XawtextScrollAlways ? T : NIL;
-    }
-
-    return (state);
-}
-
-LispObj *
-Xedit_WrapMode(LispBuiltin *builtin)
-/*
- wrap-mode &optional value
- */
-{
-    int i;
-    Arg arg[1];
-    XawTextWrapMode wrap;
-
-    LispObj *value;
-
-    value = ARGUMENT(0);
-
-    if (value != UNSPEC) {
-       for (i = 0; i < 3; i++)
-           if (value == wrap_modes[i])
-               break;
-       if (i >= 3)
-           LispDestroy("%s: argument must be "
-                       ":NEVER, :LINE, or :WORD, not %s",
-                       STRFUN(builtin), STROBJ(value));
-       XtSetArg(arg[0], XtNwrap, (XawTextWrapMode)i);
-       XtSetValues(textwindow, arg, 1);
-    }
-    else {
-       XtSetArg(arg[0], XtNwrap, &wrap);
-       XtGetValues(textwindow, arg, 1);
-       i = (int)wrap;
-       if (i <= 0 || i >= 3)
-           i = 0;
-       value = wrap_modes[i];
-    }
-
-    return (value);
-}
-
-LispObj *
-Xedit_XrmStringToQuark(LispBuiltin *builtin)
-/*
- xrm-string-to-quark string
- */
-{
-    LispObj *string;
-
-    string = ARGUMENT(0);
-
-    CHECK_STRING(string);
-
-    return (INTEGER(XrmStringToQuark(THESTR(string))));
-}
diff --git a/xedit/lisp/xedit.h b/xedit/lisp/xedit.h
deleted file mode 100644 (file)
index f3db6cb..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/lisp/xedit.h,v 1.5tsi Exp $ */
-
-#ifndef Lisp_xedit_h
-#define Lisp_xedit_h
-
-#ifdef XEDIT_LISP_PRIVATE
-#include "lisp/private.h"
-#include "lisp/io.h"
-#include "lisp/read.h"
-#include "lisp/write.h"
-
-LispObj *Xedit_AddEntity(LispBuiltin*);
-LispObj *Xedit_AutoFill(LispBuiltin*);
-LispObj *Xedit_Background(LispBuiltin*);
-LispObj *Xedit_CharAfter(LispBuiltin*);
-LispObj *Xedit_CharBefore(LispBuiltin*);
-LispObj *Xedit_ClearEntities(LispBuiltin*);
-LispObj *Xedit_ConvertPropertyList(LispBuiltin*);
-LispObj *Xedit_Font(LispBuiltin*);
-LispObj *Xedit_Foreground(LispBuiltin*);
-LispObj *Xedit_GotoChar(LispBuiltin*);
-LispObj *Xedit_HorizontalScrollbar(LispBuiltin*);
-LispObj *Xedit_Insert(LispBuiltin*);
-LispObj *Xedit_Justification(LispBuiltin*);
-LispObj *Xedit_LeftColumn(LispBuiltin*);
-LispObj *Xedit_Point(LispBuiltin*);
-LispObj *Xedit_PointMax(LispBuiltin*);
-LispObj *Xedit_PointMin(LispBuiltin*);
-LispObj *Xedit_PropertyList(LispBuiltin*);
-LispObj *Xedit_ReadText(LispBuiltin*);
-LispObj *Xedit_ReplaceText(LispBuiltin*);
-LispObj *Xedit_RightColumn(LispBuiltin*);
-LispObj *Xedit_Scan(LispBuiltin*);
-LispObj *Xedit_SearchBackward(LispBuiltin*);
-LispObj *Xedit_SearchForward(LispBuiltin*);
-LispObj *Xedit_VerticalScrollbar(LispBuiltin*);
-LispObj *Xedit_WrapMode(LispBuiltin*);
-LispObj *Xedit_XrmStringToQuark(LispBuiltin*);
-#else
-#define LispObj void
-#endif /* XEDIT_LISP_PRIVATE */
-
-typedef struct _EditModeInfo {
-    char *desc;                        /* Mode description */
-    Widget sme;                        /* Menu entry */
-    LispObj *symbol;           /* Symbol holding syntax data */
-    LispObj *syntax;           /* The syntax definition */
-} EditModeInfo;
-
-/* Typedef'ed to XeditLispData in ../xedit.h */
-struct _XeditLispData {
-    LispObj *syntax;           /* Syntax definition */
-    LispObj *syntable;         /* Syntax-table the cursor is located */
-    int disable_highlight;     /* Working in the buffer */
-};
-
-void LispXeditInitialize(void);
-void XeditLispExecute(Widget, XawTextPosition, XawTextPosition);
-void XeditLispSetEditMode(xedit_flist_item*, LispObj*);
-void XeditLispUnsetEditMode(xedit_flist_item*);
-
-extern EditModeInfo *mode_infos;
-extern Cardinal num_mode_infos;
-
-#endif /* Lisp_xedit_h */
diff --git a/xedit/options.c b/xedit/options.c
deleted file mode 100644 (file)
index 553fa94..0000000
+++ /dev/null
@@ -1,524 +0,0 @@
-/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *  
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of the XFree86 Project shall
- * not be used in advertising or otherwise to promote the sale, use or other
- * dealings in this Software without prior written authorization from the
- * XFree86 Project.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/* $XFree86: xc/programs/xedit/options.c,v 1.13 2002/09/22 07:09:05 paulo Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "xedit.h"
-
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/SimpleMenu.h>
-
-/*
- * Prototypes
- */
-static void SetColumns(Widget, XEvent*, String*, Cardinal*);
-static void ChangeField(Widget, XEvent*, String*, Cardinal*);
-static void EditCallback(Widget, XtPointer, XtPointer);
-static void PopupColumnsCallback(Widget, XtPointer, XtPointer);
-static void CreateColumnsShell(void);
-static void ProcessColumnsCallback(Widget, XtPointer, XtPointer);
-
-/*
- * Initialization
- */
-extern Widget texts[3];
-
-static Widget edit_popup, wrap_popup, justify_popup, scroll_popup,
-             columns_shell, left_text, right_text;
-
-static XFontStruct *fonts[3];
-static Pixel foregrounds[3], backgrounds[3];
-
-static XtActionsRec actions[] = {
-    {"set-columns", SetColumns},
-    {"change-field", ChangeField},
-};
-
-#define WRAP_NEVER     1
-#define WRAP_LINE      2
-#define WRAP_WORD      3
-#define        AUTO_FILL       4
-#define JUST_LEFT      5
-#define JUST_RIGHT     6
-#define JUST_CENTER    7
-#define JUST_FULL      8
-#define SCROLL_VERT    9
-#define SCROLL_HORIZ   10
-
-static Widget autoFill, wrapNever, wrapLine, wrapWord,
-             justifyLeft, justifyRight, justifyCenter, justifyFull,
-             breakColumns, scrollVert, scrollHoriz;
-
-void
-CreateEditPopup(void)
-{
-    Arg args[1];
-
-    edit_popup         = XtCreatePopupShell("editMenu", simpleMenuWidgetClass,
-                                            topwindow, NULL, 0);
-    XtRealizeWidget(edit_popup);
-
-    wrap_popup         = XtCreatePopupShell("wrapMenu", simpleMenuWidgetClass,
-                                            edit_popup, NULL, 0);
-    XtRealizeWidget(wrap_popup);
-
-    XtSetArg(args[0], XtNmenuName, "wrapMenu");
-    XtCreateManagedWidget("wrapMenuItem", smeBSBObjectClass, edit_popup, args, 1);
-
-    wrapNever          = XtCreateManagedWidget("never", smeBSBObjectClass,
-                                               wrap_popup, NULL, 0);
-    XtAddCallback(wrapNever, XtNcallback, EditCallback, (XtPointer)WRAP_NEVER);
-    wrapLine           = XtCreateManagedWidget("line", smeBSBObjectClass,
-                                               wrap_popup, NULL, 0);
-    XtAddCallback(wrapLine, XtNcallback, EditCallback, (XtPointer)WRAP_LINE);
-    wrapWord           = XtCreateManagedWidget("word", smeBSBObjectClass,
-                                               wrap_popup, NULL, 0);
-    XtAddCallback(wrapWord, XtNcallback, EditCallback, (XtPointer)WRAP_WORD);
-
-    autoFill           = XtCreateManagedWidget("autoFill", smeBSBObjectClass,
-                                               edit_popup, NULL, 0);
-    XtAddCallback(autoFill, XtNcallback, EditCallback, (XtPointer)AUTO_FILL);
-
-    justify_popup      = XtCreatePopupShell("justifyMenu", simpleMenuWidgetClass,
-                                            edit_popup, NULL, 0);
-    XtRealizeWidget(justify_popup);
-
-    XtSetArg(args[0], XtNmenuName, "justifyMenu");
-    XtCreateManagedWidget("justifyMenuItem", smeBSBObjectClass, edit_popup, args, 1);
-
-    justifyLeft                = XtCreateManagedWidget("left", smeBSBObjectClass,
-                                               justify_popup, NULL, 0);
-    XtAddCallback(justifyLeft, XtNcallback, EditCallback, (XtPointer)JUST_LEFT);
-    justifyRight       = XtCreateManagedWidget("right", smeBSBObjectClass,
-                                               justify_popup, NULL, 0);
-    XtAddCallback(justifyRight, XtNcallback, EditCallback, (XtPointer)JUST_RIGHT);
-    justifyCenter      = XtCreateManagedWidget("center", smeBSBObjectClass,
-                                               justify_popup, NULL, 0);
-    XtAddCallback(justifyCenter, XtNcallback, EditCallback, (XtPointer)JUST_CENTER);
-    justifyFull                = XtCreateManagedWidget("full", smeBSBObjectClass,
-                                               justify_popup, NULL, 0);
-    XtAddCallback(justifyFull, XtNcallback, EditCallback, (XtPointer)JUST_FULL);
-
-    breakColumns       = XtCreateManagedWidget("breakColumns", smeBSBObjectClass,
-                                               edit_popup, NULL, 0);
-    XtAddCallback(breakColumns, XtNcallback, PopupColumnsCallback, NULL);
-
-    scroll_popup       = XtCreatePopupShell("scrollMenu", simpleMenuWidgetClass,
-                                            edit_popup, NULL, 0);
-    XtRealizeWidget(scroll_popup);
-
-    XtSetArg(args[0], XtNmenuName, "scrollMenu");
-    XtCreateManagedWidget("scrollMenuItem", smeBSBObjectClass, edit_popup, args, 1);
-
-    scrollVert         = XtCreateManagedWidget("vertical", smeBSBObjectClass,
-                                               scroll_popup, NULL, 0);
-    XtAddCallback(scrollVert, XtNcallback, EditCallback, (XtPointer)SCROLL_VERT);
-    scrollHoriz                = XtCreateManagedWidget("horizontal", smeBSBObjectClass,
-                                               scroll_popup, NULL, 0);
-    XtAddCallback(scrollHoriz, XtNcallback, EditCallback, (XtPointer)SCROLL_HORIZ);
-
-    CreateEditModePopup(edit_popup);
-}
-
-void
-SetEditMenu(void)
-{
-    Arg args[7];
-    Cardinal num_args;
-    Boolean auto_fill;
-    XawTextWrapMode wrap_mode;
-    XawTextJustifyMode justify;
-    XawTextScrollMode vscroll, hscroll;
-    short left, right;
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNwrap, &wrap_mode);             ++num_args;
-    XtSetArg(args[num_args], XtNautoFill, &auto_fill);         ++num_args;
-    XtSetArg(args[num_args], XtNjustifyMode, &justify);                ++num_args;
-    XtSetArg(args[num_args], XtNleftColumn, &left);            ++num_args;
-    XtSetArg(args[num_args], XtNrightColumn, &right);          ++num_args;
-    XtSetArg(args[num_args], XtNscrollVertical, &vscroll);     ++num_args;
-    XtSetArg(args[num_args], XtNscrollHorizontal, &hscroll);   ++num_args;
-    XtGetValues(textwindow, args, num_args);
-
-    if (flist.pixmap) {
-       XtSetArg(args[0], XtNleftBitmap, None);
-       XtSetArg(args[1], XtNleftBitmap, flist.pixmap);
-       if (!auto_fill)
-           XtSetValues(autoFill, &args[0], 1);
-       else
-           XtSetValues(autoFill, &args[1], 1);
-       switch (wrap_mode) {
-           case XawtextWrapNever:
-               XtSetValues(wrapLine, &args[0], 1);
-               XtSetValues(wrapWord, &args[0], 1);
-               XtSetValues(wrapNever, &args[1], 1);
-               break;
-           case XawtextWrapLine:
-               XtSetValues(wrapNever, &args[0], 1);
-               XtSetValues(wrapWord, &args[0], 1);
-               XtSetValues(wrapLine, &args[1], 1);
-               break;
-           case XawtextWrapWord:
-               XtSetValues(wrapNever, &args[0], 1);
-               XtSetValues(wrapLine, &args[0], 1);
-               XtSetValues(wrapWord, &args[1], 1);
-               break;
-       }
-       switch (justify) {
-           case XawjustifyLeft:
-               XtSetValues(justifyRight, &args[0], 1);
-               XtSetValues(justifyCenter, &args[0], 1);
-               XtSetValues(justifyFull, &args[0], 1);
-               XtSetValues(justifyLeft, &args[1], 1);
-               break;
-           case XawjustifyRight:
-               XtSetValues(justifyLeft, &args[0], 1);
-               XtSetValues(justifyCenter, &args[0], 1);
-               XtSetValues(justifyFull, &args[0], 1);
-               XtSetValues(justifyRight, &args[1], 1);
-               break;
-           case XawjustifyCenter:
-               XtSetValues(justifyLeft, &args[0], 1);
-               XtSetValues(justifyRight, &args[0], 1);
-               XtSetValues(justifyFull, &args[0], 1);
-               XtSetValues(justifyCenter, &args[1], 1);
-               break;
-           case XawjustifyFull:
-               XtSetValues(justifyLeft, &args[0], 1);
-               XtSetValues(justifyRight, &args[0], 1);
-               XtSetValues(justifyCenter, &args[0], 1);
-               XtSetValues(justifyFull, &args[1], 1);
-               break;
-       }
-       if (!vscroll)
-           XtSetValues(scrollVert, &args[0], 1);
-       else
-           XtSetValues(scrollVert, &args[1], 1);
-       if (!hscroll)
-           XtSetValues(scrollHoriz, &args[0], 1);
-       else
-           XtSetValues(scrollHoriz, &args[1], 1);
-    }
-    if (!auto_fill) {
-       XtSetSensitive(wrapNever, True);
-       XtSetSensitive(wrapLine, True);
-       XtSetSensitive(wrapWord, True);
-
-       XtSetSensitive(justifyLeft, False);
-       XtSetSensitive(justifyRight, False);
-       XtSetSensitive(justifyCenter, False);
-       XtSetSensitive(justifyFull, False);
-       XtSetSensitive(breakColumns, False);
-    }
-    else {
-       XtSetSensitive(wrapNever, False);
-       XtSetSensitive(wrapLine, False);
-       XtSetSensitive(wrapWord, False);
-
-       XtSetSensitive(justifyLeft, left < right);
-       XtSetSensitive(justifyRight, left < right);
-       XtSetSensitive(justifyCenter, left < right);
-       XtSetSensitive(justifyFull, left < right);
-       XtSetSensitive(breakColumns, True);
-    }
-
-    SetEditModeMenu();
-}
-
-/*ARGSUSED*/
-static void
-EditCallback(Widget sme, XtPointer client_data, XtPointer call_data)
-{
-    Arg args[1];
-    Boolean auto_fill;
-    XawTextScrollMode scroll;
-    xedit_flist_item *item = FindTextSource(XawTextGetSource(textwindow), NULL);
-    Bool foreach = False;
-
-    switch ((long)client_data) {
-       case WRAP_NEVER:
-           XtSetArg(args[0], XtNwrap, XawtextWrapNever);
-           if (item) {
-               item->flags |= WRAP_BIT;
-               item->wrap = XawtextWrapNever;
-               foreach = True;
-           }
-           break;
-       case WRAP_LINE:
-           XtSetArg(args[0], XtNwrap, XawtextWrapLine);
-           if (item) {
-               item->flags |= WRAP_BIT;
-               item->wrap = XawtextWrapLine;
-               foreach = True;
-           }
-           break;
-       case WRAP_WORD:
-           XtSetArg(args[0], XtNwrap, XawtextWrapWord);
-           if (item) {
-               item->flags |= WRAP_BIT;
-               item->wrap = XawtextWrapWord;
-               foreach = True;
-           }
-           break;
-       case AUTO_FILL:
-           XtSetArg(args[0], XtNautoFill, &auto_fill);
-           XtGetValues(textwindow, args, 1);
-           XtSetArg(args[0], XtNautoFill, !auto_fill);
-           break;
-       case JUST_LEFT:
-           XtSetArg(args[0], XtNjustifyMode, XawjustifyLeft);
-           break;
-       case JUST_RIGHT:
-           XtSetArg(args[0], XtNjustifyMode, XawjustifyRight);
-           break;
-       case JUST_CENTER:
-           XtSetArg(args[0], XtNjustifyMode, XawjustifyCenter);
-           break;
-       case JUST_FULL:
-           XtSetArg(args[0], XtNjustifyMode, XawjustifyFull);
-           break;
-       case SCROLL_VERT:
-           XtSetArg(args[0], XtNscrollVertical, &scroll);
-           XtGetValues(textwindow, args, 1);
-           XtSetArg(args[0], XtNscrollVertical, scroll == XawtextScrollNever ?
-                    XawtextScrollAlways : XawtextScrollNever);
-           break;
-       case SCROLL_HORIZ:
-           XtSetArg(args[0], XtNscrollHorizontal, &scroll);
-           XtGetValues(textwindow, args, 1);
-           XtSetArg(args[0], XtNscrollHorizontal, scroll == XawtextScrollNever ?
-                    XawtextScrollAlways : XawtextScrollNever);
-           break;
-    }
-
-    if (foreach) {
-       int i;
-       for (i = 0; i < 3; i++)
-           XtSetValues(texts[i], args, 1);
-    }
-    else
-       XtSetValues(textwindow, args, 1);
-}
-
-static void
-CreateColumnsShell(void)
-{
-    Atom delete_window;
-    Widget form, ok, cancel;
-
-    if (columns_shell)
-       return;
-
-    XtAppAddActions(XtWidgetToApplicationContext(topwindow),
-                   actions, XtNumber(actions));
-
-    columns_shell      = XtCreatePopupShell("columns", transientShellWidgetClass,
-                                            topwindow, NULL, 0);
-    form               = XtCreateManagedWidget("form", formWidgetClass,
-                                               columns_shell, NULL, 0);
-    XtCreateManagedWidget("leftLabel", labelWidgetClass, form, NULL, 0);
-    left_text          = XtVaCreateManagedWidget("left", asciiTextWidgetClass,
-                                                 form, XtNeditType, XawtextEdit,
-                                                 NULL);
-    XtCreateManagedWidget("rightLabel", labelWidgetClass, form, NULL, 0);
-    right_text         = XtVaCreateManagedWidget("right", asciiTextWidgetClass,
-                                                 form, XtNeditType, XawtextEdit,
-                                                 NULL);
-    ok                 = XtCreateManagedWidget("ok", commandWidgetClass,
-                                               form, NULL, 0);
-    XtAddCallback(ok, XtNcallback, ProcessColumnsCallback, (XtPointer)True);
-    cancel             = XtCreateManagedWidget("cancel", commandWidgetClass,
-                                               form, NULL, 0);
-    XtAddCallback(cancel, XtNcallback, ProcessColumnsCallback, (XtPointer)False);
-
-    XtRealizeWidget(columns_shell);
-    delete_window = XInternAtom(XtDisplay(columns_shell), "WM_DELETE_WINDOW", False);
-    XSetWMProtocols(XtDisplay(columns_shell), XtWindow(columns_shell), &delete_window, 1);
-
-    XtSetKeyboardFocus(columns_shell, left_text);
-}
-
-/*ARGSUSED*/
-static void
-PopupColumnsCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    Arg args[3];
-    char sleft[6], sright[6];
-    short left, right;
-    Dimension width, height, b_width;
-    Window r, c;
-    int x, y, wx, wy, max_x, max_y;
-    unsigned mask;
-
-    CreateColumnsShell();
-
-    XQueryPointer(XtDisplay(columns_shell), XtWindow(columns_shell),
-                 &r, &c, &x, &y, &wx, &wy, &mask);
-
-    XtSetArg(args[0], XtNwidth, &width);
-    XtSetArg(args[1], XtNheight, &height);
-    XtSetArg(args[2], XtNborderWidth, &b_width);
-    XtGetValues(columns_shell, args, 3);
-
-    width += b_width << 1;
-    height += b_width << 1;
-
-    x -= (Position)(width >> 1);
-    if (x < 0)
-       x = 0;
-    if (x > (max_x = (Position)(XtScreen(columns_shell)->width - width)))
-       x = max_x;
-
-    y -= (Position)(height >> 1);
-    if (y < 0)
-       y = 0;
-    if (y > (max_y = (Position)(XtScreen(columns_shell)->height - height)))
-       y = max_y;
-
-    XtSetArg(args[0], XtNx, x);
-    XtSetArg(args[1], XtNy, y);
-    XtSetValues(columns_shell, args, 2);
-
-    XtSetArg(args[0], XtNleftColumn, &left);
-    XtSetArg(args[1], XtNrightColumn, &right);
-    XtGetValues(textwindow, args, 2);
-    XmuSnprintf(sleft, sizeof(sleft), "%d", left);
-    XmuSnprintf(sright, sizeof(sright), "%d", right);
-    XtSetArg(args[0], XtNstring, sleft);
-    XtSetValues(left_text, args, 1);
-    XtSetArg(args[0], XtNstring, sright);
-    XtSetValues(right_text, args, 1);
-    XtPopup(columns_shell, XtGrabExclusive);
-}
-
-/*ARGSUSED*/
-static void
-ProcessColumnsCallback(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    if (client_data) {
-       Arg args[2];
-       char *left, *right;
-       short leftc, rightc;
-
-       left = GetString(left_text);
-       right = GetString(right_text);
-
-       leftc = atoi(left);
-       rightc = atoi(right);
-       XtSetArg(args[0], XtNleftColumn, leftc);
-       XtSetArg(args[1], XtNrightColumn, rightc);
-
-       XtSetValues(textwindow, args, 2);
-    }
-
-    XtPopdown(columns_shell);
-}
-
-/*ARGSUSED*/
-static void
-SetColumns(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Bool ok = False;
-
-    if (*num_params &&
-       (params[0][0] == 'o' || params[0][0] == 'O'))
-       ok = True;
-
-    ProcessColumnsCallback(w, (XtPointer)(long)ok, NULL);
-}
-
-/*ARGSUSED*/
-static void
-ChangeField(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Widget focus = XtGetKeyboardFocusWidget(columns_shell);
-
-    XtSetKeyboardFocus(columns_shell,
-                      focus == left_text ? right_text : left_text);
-}
-
-void
-UpdateTextProperties(int force)
-{
-    Arg args[4];
-    Cardinal num_args;
-    xedit_flist_item *item;
-    XawTextPropertyList *prop;
-    Widget text, source, sink;
-    int i;
-
-    /* save default information */
-    if (fonts[0] == NULL) {
-       for (i = 0; i < 3; i++) {
-           num_args = 0;
-           XtSetArg(args[num_args], XtNfont, &fonts[i]);             ++num_args;
-           XtSetArg(args[num_args], XtNforeground, &foregrounds[i]); ++num_args;
-           XtSetArg(args[num_args], XtNbackground, &backgrounds[i]); ++num_args;
-           XtGetValues(XawTextGetSink(texts[i]), args, num_args);
-       }
-    }
-
-    for (i = 0; i < 3; i++) {
-       text = texts[i];
-       source = XawTextGetSource(text);
-       sink = XawTextGetSink(text);
-       item = FindTextSource(source, NULL);
-
-       XtSetArg(args[0], XawNtextProperties, &prop);
-       XtGetValues(sink, args, 1);
-
-       if (item == NULL || (!force && prop == item->properties))
-           continue;
-
-       XtSetArg(args[0], XawNtextProperties, item->properties);
-       num_args = 1;
-       if (item->properties == NULL) {
-           XtSetArg(args[num_args], XtNfont, fonts[i]);             ++num_args;
-           XtSetArg(args[num_args], XtNforeground, foregrounds[i]); ++num_args;
-           XtSetArg(args[num_args], XtNbackground, backgrounds[i]); ++num_args;
-       }
-       XtSetValues(sink, args, num_args);
-
-       if (text == textwindow) {
-           XtSetArg(args[0], XtNdisplayCaret, False);
-           XtSetValues(text, args, 1);
-       }
-       _XawTextBuildLineTable((TextWidget)text,
-                              XawTextTopPosition(text), True);
-       XawTextDisplay(text);
-       if (text == textwindow) {
-           XtSetArg(args[0], XtNdisplayCaret, True);
-           XtSetValues(text, args, 1);
-       }
-    }
-}
diff --git a/xedit/print.c b/xedit/print.c
deleted file mode 100644 (file)
index fbb260b..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * $Xorg: print.c,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#define Log(x)   { if(True) printf x; }
-
-#ifdef XEDIT
-#include "xedit.h"
-#endif /* XEDIT */
-#include "print.h"
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/AsciiText.h> 
-#include <stdio.h>
-#include <stdlib.h>
-
-static Widget
-CreatePrintShell(Widget    videoshell,
-                 Screen   *pscreen,
-                 Visual   *pvisual,
-                 String    printshell_name,
-                 ArgList   args,
-                 Cardinal  numargs)
-{
-    String   videoname,
-             videoclass;
-    Widget   pappshell,
-             printshell;
-    Display *pdpy = XDisplayOfScreen(pscreen);
-    int      dummyc = 0;
-    String   dummys = "";
-    Cardinal shell_n;
-    Arg      shell_args[5];
-
-    XtGetApplicationNameAndClass(XtDisplay(videoshell), 
-                                 &videoname, &videoclass);
-
-    /* XXX: Why is the |dummyc|&&|dummys| stuff needed here ? */
-    XtDisplayInitialize(XtWidgetToApplicationContext(videoshell), pdpy,
-                        videoname, videoclass,
-                        NULL, 0,
-                        &dummyc, &dummys);
-
-    shell_n = 0;
-    XtSetArg(shell_args[shell_n], XtNscreen, pscreen); shell_n++;
-    if (pvisual) {
-        XtSetArg(shell_args[shell_n], XtNvisual, pvisual); shell_n++;
-    }
-    pappshell = XtAppCreateShell(videoname, videoclass,
-                                   applicationShellWidgetClass,
-                                   pdpy,
-                                   shell_args, shell_n);
-    printshell = XtCreatePopupShell(printshell_name,
-                                    xawPrintShellWidgetClass,
-                                    pappshell, args, numargs);
-                                
-
-    /* we're mapping/unmapping at start/end page time */
-    XtSetMappedWhenManaged(printshell, False);
-
-    /* We realise the widget when we're done with building the widget tree... */
-    
-    return printshell;
-}
-
-typedef struct
-{
-  const char       *programname;
-  Widget            toplevel;
-  Bool              isPrinting;
-  Widget            printshell;
-  struct
-  {
-      Widget  form;
-      Widget  pageheaderlabel;
-      Widget  text;
-  } content; /* content to print */
-  int               numpages;
-  Display          *pdpy;
-  Screen           *pscreen;
-  XPContext         pcontext;
-  XtCallbackProc    pdpyDestroyCallback;
-  void             *printtofile_handle;
-  const char       *jobtitle;
-} AppPrintData;
-
-static AppPrintData  apdx;
-static AppPrintData *apd = &apdx;
-
-/* Count pages in a text widget
- * WARNING: This will reset the current position of the text widget
- * back to the beginning */
-static
-long CountPages(Widget textWidget)
-{
-    long numpages = 0;
-
-    XawTextPosition prevpagepos = -1,
-                    currpos = 0;        
-
-    /* Move to the top of the file... */
-    XtCallActionProc(textWidget, "beginning-of-file", NULL, NULL, 0);
-    
-    /* ... count pages ...*/
-    do
-    {
-        prevpagepos = XawTextTopPosition(textWidget);
-        XtCallActionProc(textWidget, "next-page", NULL, NULL, 0);        
-        currpos     = XawTextTopPosition(textWidget);
-        numpages++;
-    } while(prevpagepos != currpos);            
-
-    /* ... and move to the top of the file... */
-    XtCallActionProc(textWidget, "beginning-of-file", NULL, NULL, 0);
-    
-    Log(("CountPages() found %ld pages.\n", numpages))
-
-    return numpages;
-}
-
-static void 
-PageSetupCB(Widget widget, XtPointer client_data, XtPointer call_data)
-{
-    Widget                       pshell = widget;
-    XawPrintShellCallbackStruct *psp    = (XawPrintShellCallbackStruct *)call_data;
-    AppPrintData                *p      = (AppPrintData *)client_data;
-   
-    Log(("--> PageSetupCB\n"));
-
-    if (!psp->last_page_in_job) {
-        int  currpage;
-        char buffer[256];
-
-        XtVaGetValues(pshell, XawNcurrPageNumInJob, &currpage, NULL);
-
-        sprintf(buffer, "Title: %s / Page: %d/%d", p->jobtitle, currpage, p->numpages);
-        XtVaSetValues(apd->content.pageheaderlabel, XtNlabel, buffer, NULL);
-
-        /* Note: XawPrintShell's pagecount starts with '1'
-         * (=first page is page no. '1') */
-        if (currpage > 1) {
-            Log(("pagedown %d\n", currpage));
-            XtCallActionProc(p->content.text, "next-page", NULL, NULL, 0);
-        }
-        else
-        {
-            Log(("first page\n"));
-        }              
-      
-        if (currpage >= p->numpages) {
-            psp->last_page_in_job = True;
-        }
-    }
-}
-
-static
-void FinishPrinting(AppPrintData *p)
-{
-    char *scr;
-
-    if (p->printtofile_handle) {
-        if (XpuWaitForPrintFileChild(p->printtofile_handle) != XPGetDocFinished) {
-            PrintMsg(("Error while printing to file.\n"));
-        }
-        p->printtofile_handle = NULL;
-    }
-    
-    /* Job completed, check if there are any messages from the spooler command */
-    scr = XpGetOneAttribute(p->pdpy, p->pcontext, XPJobAttr, "xp-spooler-command-results");
-    if( scr )
-    {
-      if( strlen(scr) > 0 )
-      {
-        const char *msg = XpuCompoundTextToXmb(p->pdpy, scr);
-        if( msg )
-        {
-          PrintMsg(("Spooler command returned:\n%s", msg));
-          XpuFreeXmbString(msg);
-        }
-        else
-        {
-          PrintMsg(("Spooler command returned (unconverted):\n%s", scr));
-        }
-      }
-
-      XFree((void *)scr);
-    }
-    
-    if (p->printshell) {
-        XtDestroyWidget(p->printshell);
-        p->printshell = NULL;
-    }
-  
-    /* Two issues here:
-     * 1. The print display connection is owned by the print dialog
-     *    To avoid any problems with that use a callback back to the main
-     *    application which calls
-     *    |XawPrintDialogClosePrinterConnection(w, False)| to ask the
-     *    print dialog widget to close all print display resources and
-     *    disown the object.
-     * 2. We have to use XpDestroyContext() and XtCloseDisplay()
-     *    instead of XpuClosePrinterDisplay() to make libXt happy...
-     *
-     * Call callback... */
-    (*apd->pdpyDestroyCallback)(NULL, NULL, NULL); /* HACK! */
-
-    /* ... and then get rid of the display */
-    if (p->pcontext != None) {
-        XpDestroyContext(p->pdpy, p->pcontext);
-    }
-    XtCloseDisplay(p->pdpy);
-
-    p->toplevel   = NULL;
-    p->isPrinting = False;
-    p->pdpy       = NULL;
-    p->pscreen    = NULL;
-    p->pcontext   = None;
-}
-
-static
-void PrintEndJobCB(Widget pshell, XtPointer client_data, XtPointer call_data)
-{
-    AppPrintData *p = (AppPrintData *)client_data;
-
-    Log(("--> PrintEndJobCB\n"));
-
-    /* Finish printing and destroy print shell (it's legal to destroy Xt
-     * widgets from within it's own callbacks) */
-    FinishPrinting(p);
-}
-
-static
-XFontSet GetPrintTextFontSet(const char *appname, Display *pdpy, long dpi_x, long dpi_y)
-{
-    XFontSet     fontset;
-    char         fontname[1024];
-    char       **missing_charset_list_return;
-    int          missing_charset_count_return;
-    char        *def_string_return;
-    int          i;
-    
-    sprintf(fontname, /* Default font for CDE */
-                      "-dt-interface user-medium-r-normal-s*-*-120-%ld-%ld-*-*,"
-                      /* Default font */
-                      "-adobe-courier-medium-r-normal--*-120-%ld-%ld-*-*,"
-                      /* Default font for Linux/Japanese locales (ja_JP.SJIS) */
-                      "-watanabe-mincho-medium-r-normal--*-120-%ld-%ld-*-*,"
-                      "-wadalab-gothic-medium-r-normal--*-120-%ld-%ld-*-*,"
-                      /* Fallback */
-                      "-*-*-*-*-*--*-120-%ld-%ld-*-*",
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y);
-    fontset = XCreateFontSet(pdpy, fontname,
-                             &missing_charset_list_return,
-                             &missing_charset_count_return,
-                             &def_string_return);
-
-    for( i=0 ; i < missing_charset_count_return ; i++ ) {
-        fprintf(stderr, "%s: warning: font for charset %s is lacking.\n",
-                appname, missing_charset_list_return[i]);
-    }
-
-    if (!fontset)
-        Error(("GetPrintTextFontSet: XCreateFontSet() failure.\n"));
-    return fontset;
-}
-
-void DoPrintTextSource(const char *programname,
-                       Widget textsource, Widget toplevel,
-                       Display *pdpy, XPContext pcontext,
-                       XpuColorspaceRec *colorspace,
-                       XtCallbackProc pdpyDestroyCB,
-                       const char *jobtitle, const char *toFile)
-{
-    long               dpi_x = 0L,
-                       dpi_y = 0L;
-    int                n;
-    Arg                args[20];
-    XFontSet           textfontset = NULL;
-    XFontSetExtents   *font_extents;
-    
-    apd->programname         = programname;
-    apd->pdpyDestroyCallback = pdpyDestroyCB;
-  
-    if (apd->isPrinting) {
-        PrintMsg(("Already busy with printing.\n"));
-        return;
-    } 
-        
-    /* Configure the print context (paper size, title etc.)
-     * We must do this before creating any Xt widgets - otherwise they will
-     * make wrong assuptions about fonts, resultions etc. ...
-     */
-    XpuSetJobTitle(pdpy, pcontext, jobtitle);
-    
-    /* Configuration done, set the context */
-    XpSetContext(pdpy, pcontext);   
-
-    /* Get default printer resolution */   
-    if (XpuGetResolution(pdpy, pcontext, &dpi_x, &dpi_y) != 1) {
-        PrintMsg(("No default resolution for printer.\n"));
-        XpuClosePrinterDisplay(pdpy, pcontext);
-        return;
-    }
-    
-    apd->toplevel = toplevel;
-    apd->pdpy     = pdpy;
-    apd->pcontext = pcontext;
-    apd->pscreen  = XpGetScreenOfContext(pdpy, pcontext);
-    apd->jobtitle = jobtitle;
-
-    n = 0;
-    /* Override any geometry resource settings as XawPrintShell adjusts it's size
-     * to the current page siue when |XawPrintLAYOUTMODE_DRAWABLEAREA| or
-     * |XawPrintLAYOUTMODE_PAGESIZE| are used. */
-    XtSetArg(args[n], XtNgeometry,    "+0+0");                          n++;
-    XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
-    if (colorspace) {
-        printf("Setting visual to id=0x%lx.\n", colorspace->visualinfo.visualid);
-    }
-    apd->printshell = CreatePrintShell(toplevel, apd->pscreen, 
-                                       (colorspace?(colorspace->visualinfo.visual):(NULL)),
-                                       "printshell", args, n);
-    n = 0;
-    XtSetArg(args[n], XtNresizable,            True);            n++;
-    XtSetArg(args[n], XtNright,                XtChainRight);    n++;
-    apd->content.form = XtCreateManagedWidget("form", formWidgetClass, apd->printshell, args, n);
-
-    textfontset = GetPrintTextFontSet(apd->programname, pdpy, dpi_x, dpi_y);
-
-    n = 0;
-    XtSetArg(args[n], XtNinternational,        True);            n++;
-    XtSetArg(args[n], XtNfromHoriz,            NULL);            n++;
-    XtSetArg(args[n], XtNfromVert,             NULL);            n++;
-    XtSetArg(args[n], XtNtop,                  XtChainTop);      n++;
-    XtSetArg(args[n], XtNright,                XtChainRight);    n++;
-    XtSetArg(args[n], XtNresizable,            True);            n++;
-    XtSetArg(args[n], XtNfontSet,              textfontset);     n++;
-    XtSetArg(args[n], XtNlabel,                "Page: n/n");     n++;
-    XtSetArg(args[n], XtNjustify,              XtJustifyRight);  n++;
-    apd->content.pageheaderlabel = XtCreateManagedWidget("pageinfo", labelWidgetClass, apd->content.form, args, n);
-
-    font_extents = XExtentsOfFontSet(textfontset);
-
-    n = 0;
-    XtSetArg(args[n], XtNinternational,    True);                         n++;
-    XtSetArg(args[n], XtNtextSource,       textsource);                   n++;
-    XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollNever);           n++;
-    XtSetArg(args[n], XtNscrollVertical,   XawtextScrollNever);           n++;
-
-/* Usually I would expect that using |XtNfromVert, apd->content.pageheaderlabel|
- * would be the correct way to place the text widget with the main content below
- * the page header widget - but for an unknown reason this doesn not work: The
- * text widget squishes itself into the bottom half of the page and only occupies
- * 1/2 of the page's with... ;-(( */
-#define WORKAROUND_FOR_SOMETHING_IS_WRONG 1
-#ifdef WORKAROUND_FOR_SOMETHING_IS_WRONG
-    XtSetArg(args[n], XtNtop,              XtChainTop);                   n++;
-    XtSetArg(args[n], XtNright,            XtChainRight);                 n++;
-    XtSetArg(args[n], XtNvertDistance,     (font_extents->max_logical_extent.height+2)*2); n++;    
-#else
-    XtSetArg(args[n], XtNfromHoriz,        NULL);                         n++;
-    XtSetArg(args[n], XtNfromVert,         apd->content.pageheaderlabel); n++;
-#endif
-    XtSetArg(args[n], XtNfontSet,          textfontset);                  n++;
-    apd->content.text = XtCreateManagedWidget("text", asciiTextWidgetClass, apd->content.form, args, n);
-
-    /* Disable the caret - that is not needed for printing */
-    XawTextDisplayCaret(apd->content.text, False);
-    
-    XtAddCallback(apd->printshell, XawNpageSetupCallback, PageSetupCB,   (XtPointer)apd);
-    XtAddCallback(apd->printshell, XawNendJobCallback,    PrintEndJobCB, (XtPointer)apd);
-
-    /* Realise print shell (which will set position+size of the child
-     * widgets based on the current page size) */
-    XtRealizeWidget(apd->printshell);
-    
-    /* Count number of pages in the text widget */
-    apd->numpages = CountPages(apd->content.text);
-
-    /* Make sure that the Xt machinery is really using the right screen (assertion) */
-    if (XpGetScreenOfContext(XtDisplay(apd->printshell), apd->pcontext) != XtScreen(apd->printshell))
-        Error(("Widget's screen != print screen. BAD.\n"));
-
-    apd->isPrinting = True;
-
-    if (toFile) {
-        PrintMsg(("Printing to file '%s'...\n", toFile));
-        apd->printtofile_handle = XpuStartJobToFile(pdpy, pcontext, toFile);
-        if (!apd->printtofile_handle) {
-            perror("XpuStartJobToFile failure");
-            PrintMsg(("Printing failed: XpuStartJobToFile\n"));
-            apd->isPrinting = False;
-            return;
-        }
-    }
-    else
-    {
-        PrintMsg(("Printing to printer...\n"));
-        XpuStartJobToSpooler(pdpy);
-    }
-}
-
-
diff --git a/xedit/print.h b/xedit/print.h
deleted file mode 100644 (file)
index a87779c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * $Xorg: print.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef XMORE_PRINT_H
-#define XMORE_PRINT_H 1
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Print.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/XprintUtil/xprintutil.h>
-
-#if defined(XMORE)
-#define PrintMsg(x) { printf("xmore: "); printf x ; }
-#elif defined(XEDIT)
-#define PrintMsg(x) { XeditPrintf x ; }
-#else
-#error unknown application
-#endif 
-
-/* Prototypes */
-void DoPrintTextSource(const char *programname,
-                       Widget textsource,
-                       Widget toplevel, 
-                       Display *pdpy, XPContext pcontext,
-                       XpuColorspaceRec *colorspace,
-                       XtCallbackProc printDisplayDestroyCallback,
-                       const char *jobTitle,
-                       const char *toFile);
-
-#endif /* !XMORE_PRINT_H */
diff --git a/xedit/printdialog.c b/xedit/printdialog.c
deleted file mode 100644 (file)
index 50d2a88..0000000
+++ /dev/null
@@ -1,1396 +0,0 @@
-/*
- * $Xorg: printdialog.c,v 1.1 2004/05/12 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-/* Force ANSI C prototypes from X11 headers */
-#ifndef FUNCPROTO 
-#define FUNCPROTO 15
-#endif /* !FUNCPROTO */
-
-#include <X11/StringDefs.h> 
-#include <X11/Intrinsic.h> 
-#include <X11/Shell.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Dialog.h>
-
-#ifdef XKB
-#include <X11/extensions/XKBbells.h>
-#endif /* XKB */
-
-#ifdef XEDIT
-#include "xedit.h"
-#endif /* XEDIT */
-#include "printdialog.h"
-#include "printdialogprivates.h"
-#include "print.h"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdio.h>
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#ifdef DEBUG
-#  define Log(x)   { if(True)  printf x; }
-#else
-#  define Log(x)   { if(False) printf x; }
-#endif /* DEBUG */
-
-/* Local prototypes */
-static void     do_beep(PrintDialogWidget pdw);
-static void     center_popup(Widget parent, Widget popup);
-static void     updateWidgetStates(PrintDialogWidget pdw);
-static void     printSetupClose(PrintDialogWidget pdw);
-static void     printSetupOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSetupCancelXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSetupJobCopiesXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printDialogDestXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSelectFileXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSetupXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printFileSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     buildFileDialog(PrintDialogWidget pdw);
-static void     closePrinterConnection(PrintDialogWidget  pdw, Bool closeDisplay);
-static Bool     openPrinterConnection(PrintDialogWidget  pdw);
-static void     destroyPrintSetupDialog(PrintDialogWidget pdw);
-static Widget   buildPrintSetupDialog(PrintDialogWidget pdw);
-static String  *xpprinterlist_to_widget_printerlist(XPPrinterList printerlist, int num_printers);
-static String  *xppaperlist_to_widget_paperlist(XpuMediumSourceSizeList paperlist, int num_papers);
-static String  *xpresolutionlist_to_widget_resolutionlist(XpuResolutionList reslist, int num_resolutions);
-static String  *xporientationlist_to_widget_orientationlist(XpuOrientationList orientationlist, int num_orientations);
-static String  *xpplexlist_to_widget_plexlist(XpuPlexList plexlist, int num_plex);
-static String  *xpcolorspacelist_to_widget_colorspacelist(XpuColorspaceList colorspacelist, int num_colorspaces);
-static void     printerSelectionPrinterSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSelectPrinterXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printerSelectionClose(PrintDialogWidget  pdw);
-static void     printerSelectionOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printerSelectionCancelXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static Bool     buildPrinterSelectionDialog(PrintDialogWidget  pdw);
-static void     destroyPrinterSelectionDialog(PrintDialogWidget pdw);
-static void     createprintdialogchildren(Widget w);
-
-static
-void do_beep(PrintDialogWidget pdw)
-{
-    Log(("*** Beep!\n"));
-#ifdef XKB
-    XkbStdBell(XtDisplay((Widget)pdw), XtWindow((Widget)pdw), 0, XkbBI_MinorError);
-#else
-    XBell(XtDisplay((Widget)pdw), 0);
-#endif /* XKB */
-}
-
-/* Center popup (on parent, not on screen - which would be a bad idea
- * in the Xinerama case) */
-static
-void center_popup(Widget parent, Widget popup)
-{
-    Dimension width,
-              height;
-    Position  x,
-              y;
-
-    XtVaGetValues(parent,
-        XtNx,  &x,
-        XtNy,  &y,
-        NULL);
-    XtVaGetValues(popup,
-        XtNwidth,  &width,
-        XtNheight, &height,
-        NULL);
-
-    x += (Position)width  / 2;
-    y += (Position)height / 3;
-
-    XtVaSetValues(popup,
-        XtNx, x,
-        XtNy, y,
-        NULL);
-}
-
-static
-void updateWidgetStates(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-    
-    /* Do not update anything if we will be destroyed */
-    if (pdw->core.being_destroyed)
-        return;
-
-    if (pdp->printToFile == False) {  
-        XtVaSetValues(pdp->main.printtoprinter, XtNstate,     True,  NULL);
-        XtVaSetValues(pdp->main.printtofile,    XtNstate,     False, NULL);
-        /* Disable the widgets which depend on print-to-file */
-        XtVaSetValues(pdp->main.filenamelabel,  XtNsensitive, False, NULL);
-        XtVaSetValues(pdp->main.filename,       XtNsensitive, False, NULL);
-        XtVaSetValues(pdp->main.selectfile,     XtNsensitive, False, NULL);
-    }
-    else
-    {
-        XtVaSetValues(pdp->main.printtoprinter, XtNstate, False, NULL);
-        XtVaSetValues(pdp->main.printtofile,    XtNstate, True,  NULL);
-        /* Enable the widgets which depend on print-to-file */
-        XtVaSetValues(pdp->main.filenamelabel,  XtNsensitive, True, NULL);
-        XtVaSetValues(pdp->main.filename,       XtNsensitive, True, NULL);
-        XtVaSetValues(pdp->main.selectfile,     XtNsensitive, True, NULL);
-    }
-
-    /* Update file name */
-    XtVaSetValues(pdp->main.filename, XtNlabel, pdp->filename?pdp->filename:"-", NULL);
-    
-    /* General check whether we can print... */
-    pdp->canPrint = True;
-    if (pdp->printer_name == NULL) {
-        pdp->canPrint = False;
-    }
-    else if (strlen(pdp->printer_name) == 0) {
-        pdp->canPrint = False;
-    }
-
-    pdp->canReallyPrint = pdp->canPrint;
-
-    /* Some extra checks for print-to-file */
-    if (pdp->printToFile) {
-        if (pdp->filename == NULL) {
-            pdp->canReallyPrint = False;
-        }
-        else if (strlen(pdp->filename) == 0) {
-            pdp->canReallyPrint = False;
-        }
-    }
-
-    XtVaSetValues(pdp->main.ok,    XtNsensitive, pdp->canReallyPrint, NULL);
-    XtVaSetValues(pdp->main.setup, XtNsensitive, pdp->canPrint,       NULL);
-}
-
-static void
-printSetupClose(PrintDialogWidget pdw)
-{ 
-    PrintDialogPart *pdp = &pdw->printdialog;
-    if (pdp->setup.popup) {
-        XtPopdown(pdp->setup.popup);
-    }
-}
-
-static void
-printSetupOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget    pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart     *pdp = &pdw->printdialog;
-    char                *s;
-    XawListReturnStruct *lrs;    
-    Log(("## printSetupOK: closing print setup!\n"));
-    
-    /* Set copy count (if the value is invalid beep and return to the user ) */
-    XtVaGetValues(pdp->setup.jobcopies, XtNstring, &s, NULL);
-    if (s) {
-        int c = atoi(s);
-        if (c < 1 || c > 999) {
-            do_beep(pdw);
-            XtVaSetValues(pdp->setup.jobcopies, XtNstring, "1", NULL);
-            Log(("## printSetupOKXtProc: not a valid copy count value\n"));
-            return;
-        }
-        
-        /* Fix me: We should set the number of _job_ copies here, not _doc_ copies */
-        XpuSetDocumentCopies(pdp->pdpy, pdp->pcontext, c);
-    }
-    
-    /* Set paper size */
-    lrs = XawListShowCurrent(pdp->setup.paperlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected paper is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_papers, (("Error: lrs->list_index < pdp->num_papers\n")));
-        XpuSetDocMediumSourceSize(pdp->pdpy, pdp->pcontext, &pdp->paperlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set resolution */
-    lrs = XawListShowCurrent(pdp->setup.resolutionlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected resolution is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_resolutions, (("Error: lrs->list_index < pdp->num_resolutions\n")));
-        XpuSetDocResolution(pdp->pdpy, pdp->pcontext, &pdp->resolutionlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set orientation */
-    lrs = XawListShowCurrent(pdp->setup.orientationlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected orientation is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_orientations, (("Error: lrs->list_index < pdp->num_orientations\n")));
-        XpuSetDocOrientation(pdp->pdpy, pdp->pcontext, &pdp->orientationlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set plex mode */
-    lrs = XawListShowCurrent(pdp->setup.plexlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected plex is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_plex, (("Error: lrs->list_index < pdp->num_plex\n")));
-        XpuSetDocPlex(pdp->pdpy, pdp->pcontext, &pdp->plexlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set colorspace */
-    lrs = XawListShowCurrent(pdp->setup.colorspacelist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected colorspace is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_colorspaces, (("Error: lrs->list_index < pdp->num_colorspaces\n")));
-        pdp->selected_colorspace = &pdp->colorspacelist[lrs->list_index];
-    }
-    XtFree((char *)lrs);
-    
-    printSetupClose(pdw);
-}
-
-static void
-printSetupCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    Log(("## printSetupCancel: closing print setup!\n"));
-
-    printSetupClose(pdw);
-}
-
-static void
-printSetupJobCopiesXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget pdw    = (PrintDialogWidget)client_data;
-    PrintDialogPart  *pdp    = &pdw->printdialog;
-    char             *string = NULL;
-    
-    Log(("## printSetupJobCopiesXtProc!\n"));
-
-    /* Check whether the input is a valid number - and in the case of invalid input reset the value */    
-    XtVaGetValues(pdp->setup.jobcopies, XtNstring, &string, NULL);
-    if (string) {
-        char *s;
-        int   i;
-        Bool  isValidNumber = True;
-
-        /* First check for invalid characters... */
-        for( s = string ; *s != '\0' ; s++ ) {
-            if (!isdigit(*s)) {
-                isValidNumber = False;
-                break;
-            }
-        }
-        
-        /* .. and the do a range check... */
-        i = atoi(string);
-        if (i < 1 || i > 999) {
-            isValidNumber = False;
-        }
-        
-        if (!isValidNumber) {
-            do_beep(pdw);
-            XtVaSetValues(pdp->setup.jobcopies, XtNstring, "1", NULL);
-            Log(("## printSetupJobCopiesXtProc: not a valid number\n"));
-        }
-    }
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart  *pdp = &pdw->printdialog;
-
-    printSetupClose(pdw);
-
-    if (pdp->cancel_callback) {
-        Log(("printCancelXtProc: calling callback\n"));
-        XtCallCallbackList((Widget)pdw, pdp->cancel_callback, NULL);
-    }
-}
-
-static void
-printDialogDestXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-
-    if (w == pdp->main.printtoprinter) {  
-        pdp->printToFile = False;
-    }
-    else if (w == pdp->main.printtofile) {
-        pdp->printToFile = True;
-    }
-    else
-    {
-        Log(("printDialogDestXtProc: ERROR: Unknown widget.\n"));
-    }
-
-    updateWidgetStates(pdw);
-}
-
-static void
-printSelectFileXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget   pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart    *pdp = &pdw->printdialog;
-
-    Log(("## printSelectFileXtProc!\n"));
-
-    if (!pdp->selectFile.shell) {
-        buildFileDialog(pdw);
-    }
-    
-    center_popup((Widget)pdw, pdp->selectFile.shell);
-
-    XtPopup(pdp->selectFile.shell, XtGrabExclusive);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-    Log(("## printing!\n"));
-    
-    if (!pdp->pdpy) {
-        Log(("printOKXtProc: no printer connection, opening one....\n"));
-        openPrinterConnection(pdw);
-
-        if (!pdp->pdpy) {
-            Log(("printOKXtProc: still no printer connection - BAD (this should never happen).\n"));
-            do_beep(pdw);
-            return;
-        }
-    }    
-
-    if (pdp->ok_callback) {
-        XawPrintDialogCallbackStruct pdcs;
-
-        Log(("printOKXtProc: calling callbacks...\n"));
-        memset(&pdcs, 0, sizeof(pdcs));
-        pdcs.pdpy            = pdp->pdpy;
-        pdcs.pcontext        = pdp->pcontext;
-        pdcs.printToFile     = pdp->printToFile;
-        pdcs.printToFileName = (const char *)pdp->filename;
-        pdcs.colorspace      = pdp->selected_colorspace;
-        XtCallCallbackList((Widget)pdw, pdp->ok_callback, &pdcs);
-    }
-
-    printSetupClose(pdw);
-}
-
-static void
-printSetupXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget   pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart    *pdp = &pdw->printdialog;
-
-    Log(("## setup!\n"));
-
-    if (!pdp->setup.popup) {
-        if (buildPrintSetupDialog(pdw) == NULL) {
-            Log(("printSetupXtProc: buildPrintSetupDialog failure.\n"));
-            return;
-        }
-    }
-
-    center_popup((Widget)pdw, pdp->setup.popup);
-
-    XtPopup(pdp->setup.popup, XtGrabExclusive);
-}
-
-static void
-printFileSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-    const char        *filename;
-    
-    Log(("printFileSelectedXtProc: User selected file.\n"));
-    filename = XawDialogGetValueString(pdp->selectFile.dialog);
-    
-    if (pdp->filename)
-        free(pdp->filename);
-    pdp->filename = strdup(filename);
-    
-    XtPopdown(pdp->selectFile.shell);
-    
-    updateWidgetStates(pdw);
-}
-
-static
-void buildFileDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-    int              n;
-    Arg              args[20];
-
-    pdp->selectFile.shell = XtCreatePopupShell("selectfile",
-                                               transientShellWidgetClass,
-                                               (Widget)pdw, NULL, 0);
-    n = 0;
-    XtSetArg(args[n], XtNvalue, pdp->filename?pdp->filename:""); n++;  
-    pdp->selectFile.dialog = XtCreateManagedWidget("dialog", dialogWidgetClass,
-                                                   pdp->selectFile.shell, args, n);
-    XawDialogAddButton(pdp->selectFile.dialog, "Accept", printFileSelectedXtProc, pdw);
-
-    XtRealizeWidget(pdp->selectFile.shell);
-}
-
-static
-void closePrinterConnection(PrintDialogWidget pdw, Bool closeDisplay)
-{ 
-    PrintDialogPart *pdp = &pdw->printdialog;
-    
-    Log(("# closePrinterConnection\n"));
-
-    destroyPrintSetupDialog(pdw);
-
-    if (pdp->paperlist) {
-        XpuFreeMediumSourceSizeList(pdp->paperlist);
-        pdp->paperlist = NULL;
-    }
-
-    if (pdp->widget_paperlist) {
-        free(pdp->widget_paperlist);
-        pdp->widget_paperlist = NULL;
-    }
-
-    if (pdp->resolutionlist) {
-        XpuFreeResolutionList(pdp->resolutionlist);
-        pdp->resolutionlist = NULL;
-    }
-
-    if (pdp->widget_resolutionlist) {
-        free(pdp->widget_resolutionlist);
-        pdp->widget_resolutionlist = NULL;
-    }
-
-
-    if (pdp->orientationlist) {
-        XpuFreeOrientationList(pdp->orientationlist);
-        pdp->orientationlist = NULL;
-    }  
-
-    if (pdp->widget_orientationlist) {
-        free(pdp->widget_orientationlist);
-        pdp->widget_orientationlist = NULL;
-    }
-
-    if (pdp->plexlist) {
-        XpuFreePlexList(pdp->plexlist);
-        pdp->plexlist = NULL;
-    }  
-
-    if (pdp->widget_plexlist) {
-        free(pdp->widget_plexlist);
-        pdp->widget_plexlist = NULL;
-    }
-
-    if (pdp->colorspacelist) {
-        XpuFreeColorspaceList(pdp->colorspacelist);
-        pdp->colorspacelist = NULL;
-    }  
-
-    if (pdp->widget_colorspacelist) {
-        free(pdp->widget_colorspacelist);
-        pdp->widget_colorspacelist = NULL;
-    }
-    pdp->selected_colorspace = NULL;
-
-    if (pdp->pdpy) {
-        if (closeDisplay) {
-            XpuClosePrinterDisplay(pdp->pdpy, pdp->pcontext);
-        }
-        pdp->pdpy     = NULL;
-        pdp->pcontext = None;
-    }
-
-    updateWidgetStates(pdw);
-}
-
-static
-Bool openPrinterConnection(PrintDialogWidget pdw)
-{
-    PrintDialogPart   *pdp = &pdw->printdialog;
-
-    Log(("# openPrinterConnection\n"));
-
-    /* Close any outstanding connection first... */
-    closePrinterConnection(pdw, True);
-
-    if (!pdp->printer_name) {
-        Log(("# error: openPrinterConnection: No printer name.\n"));
-        return False;
-    }
-
-    if (XpuGetPrinter(pdp->printer_name, &pdp->pdpy, &pdp->pcontext) == False) {
-        Log(("openPrinterConnection: could not open printer.\n"));
-        return False;
-    }
-
-    pdp->paperlist       = XpuGetMediumSourceSizeList(pdp->pdpy, pdp->pcontext, &pdp->num_papers);
-    pdp->resolutionlist  =       XpuGetResolutionList(pdp->pdpy, pdp->pcontext, &pdp->num_resolutions);
-    pdp->orientationlist =      XpuGetOrientationList(pdp->pdpy, pdp->pcontext, &pdp->num_orientations);
-    pdp->plexlist        =             XpuGetPlexList(pdp->pdpy, pdp->pcontext, &pdp->num_plex);  
-    pdp->colorspacelist  =       XpuGetColorspaceList(pdp->pdpy, pdp->pcontext, &pdp->num_colorspaces);  
-
-    pdp->widget_paperlist       = xppaperlist_to_widget_paperlist(pdp->paperlist, pdp->num_papers);
-    pdp->widget_resolutionlist  = xpresolutionlist_to_widget_resolutionlist(pdp->resolutionlist, pdp->num_resolutions);
-    pdp->widget_orientationlist = xporientationlist_to_widget_orientationlist(pdp->orientationlist, pdp->num_orientations);
-    pdp->widget_plexlist        = xpplexlist_to_widget_plexlist(pdp->plexlist, pdp->num_plex);
-    pdp->widget_colorspacelist  = xpcolorspacelist_to_widget_colorspacelist(pdp->colorspacelist, pdp->num_colorspaces);
-
-    updateWidgetStates(pdw);
-
-    return True;
-}
-
-#undef DEFAULT_WIDTH
-#define DEFAULT_WIDTH 120
-#undef DEFAULT_INFOLABEL_WIDTH
-#define DEFAULT_INFOLABEL_WIDTH 250
-
-static
-void destroyPrintSetupDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-
-    if (pdp->setup.popup) {
-        XtDestroyWidget(pdp->setup.popup);
-    }
-
-    /* |XtDestroyWidget(pdp->setup.popup);| above will recursively destroy
-     * all children so we only have to reset the pointers here... */
-    pdp->setup.popup            = NULL;
-    pdp->setup.form             = NULL;
-    pdp->setup.paperlist        = NULL;
-    pdp->setup.resolutionlist   = NULL;
-    pdp->setup.orientationlist  = NULL;
-    pdp->setup.plexlist         = NULL;
-    pdp->setup.colorspacelist   = NULL;
-    pdp->setup.ok               = NULL;
-    pdp->setup.cancel           = NULL;
-}
-
-static
-Widget buildPrintSetupDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart  *pdp = &pdw->printdialog;
-    int               n;
-    Arg               args[20];
-    Widget            listform;
-    XpuSupportedFlags jobflags,
-                      docflags;
-    Bool              canChangeJobCopies,
-                      canChangePaperSize,
-                      canChangeResolution,
-                      canChangeOrientation,
-                      canChangePlex;
-
-    if (!pdp->pdpy) {
-        Log(("buildPrintSetupDialog: no printer connection, opening one....\n"));
-        openPrinterConnection(pdw);
-
-        if (!pdp->pdpy) {
-            Log(("buildPrintSetupDialog: still no printer connection - BAD.\n"));
-            do_beep(pdw);
-            return NULL;
-        }
-    }
-
-    /* Get flags which types of attributes can be modified */
-    jobflags = XpuGetSupportedDocAttributes(pdp->pdpy, pdp->pcontext);
-    docflags = XpuGetSupportedDocAttributes(pdp->pdpy, pdp->pcontext);
-    canChangeJobCopies   = (jobflags & XPUATTRIBUTESUPPORTED_COPY_COUNT) == XPUATTRIBUTESUPPORTED_COPY_COUNT;
-    canChangePaperSize   = (docflags & XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM) == XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM;
-    canChangeResolution  = (docflags & XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION) == XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION;
-    canChangeOrientation = (docflags & XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION) == XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION;
-    canChangePlex        = (docflags & XPUATTRIBUTESUPPORTED_PLEX) == XPUATTRIBUTESUPPORTED_PLEX;
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    pdp->setup.popup = XtCreatePopupShell("setup", transientShellWidgetClass, (Widget)pdw, args, n);
-
-    n = 0;
-    pdp->setup.form = XtCreateManagedWidget("form", formWidgetClass, pdp->setup.popup, args, n);
-
-    n = 0;
-    listform = XtCreateManagedWidget("list", formWidgetClass, pdp->setup.form, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangePaperSize);          n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_paperlist);       n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.paperlist = XtCreateManagedWidget("paperlist", listWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeResolution);         n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_resolutionlist);  n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.resolutionlist = XtCreateManagedWidget("resolutionlist", listWidgetClass, listform, args, n);
-    
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeOrientation);        n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_orientationlist); n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.orientationlist = XtCreateManagedWidget("orientationlist", listWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangePlex);               n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_plexlist);        n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.plexlist = XtCreateManagedWidget("plexlist", listWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           True);                        n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_colorspacelist);  n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.colorspacelist = XtCreateManagedWidget("colorspacelist", listWidgetClass, listform, args, n);
-    
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,         0);                           n++;
-    XtSetArg(args[n], XtNresizable,           False);                       n++;
-    XtSetArg(args[n], XtNjustify,             XtJustifyRight);              n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeJobCopies);          n++;
-    pdp->setup.jobcopieslabel = XtCreateManagedWidget("jobcopieslabel", labelWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNstring,              "1");                         n++;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNeditType,            XawtextEdit);                 n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeJobCopies);          n++;
-    pdp->setup.jobcopies = XtCreateManagedWidget("jobcopies", asciiTextWidgetClass, listform, args, n);
-    XtAddCallback(pdp->setup.jobcopies, XtNpositionCallback, printSetupJobCopiesXtProc, pdw);
-
-    n = 0;
-    pdp->setup.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->setup.form, args, n);
-    XtAddCallback(pdp->setup.ok, XtNcallback, printSetupOKXtProc, pdw);
-
-    n = 0;
-    pdp->setup.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->setup.form, args, n);
-    XtAddCallback(pdp->setup.cancel, XtNcallback, printSetupCancelXtProc, pdw);
-
-    XtRealizeWidget(pdp->setup.popup); 
-
-    return pdp->setup.popup;
-}
-
-#undef DEFAULT_WIDTH
-#define DEFAULT_WIDTH 150
-
-static
-String *xpprinterlist_to_widget_printerlist(XPPrinterList printerlist, int num_printers)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_printers+1));
-    if(!names)
-      return NULL;
-
-    for(i = 0 ; i < num_printers ; i++)
-        names[i] = printerlist[i].name;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xppaperlist_to_widget_paperlist(XpuMediumSourceSizeList paperlist, int num_papers)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_papers+1));
-    if (!names)
-      return NULL;
-
-    for(i = 0 ; i < num_papers ; i++)
-        names[i] = (char *)paperlist[i].medium_name; /* FixMe: tray selection missing */
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xpresolutionlist_to_widget_resolutionlist(XpuResolutionList reslist, int num_resolutions)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_resolutions+1));
-    if (!names)
-        return NULL;
-
-    for(i = 0 ; i < num_resolutions ; i++)
-        names[i] = (char *)reslist[i].name;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xporientationlist_to_widget_orientationlist(XpuOrientationList orientationlist, int num_orientations)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_orientations+1));
-    if (!names)
-        return NULL;
-
-    for(i = 0 ; i < num_orientations ; i++)
-        names[i] = (char *)orientationlist[i].orientation;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xpplexlist_to_widget_plexlist(XpuPlexList plexlist, int num_plex)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_plex+1));
-    if(!names)
-      return NULL;
-
-    for(i = 0 ; i < num_plex ; i++)
-      names[i] = (char *)plexlist[i].plex;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xpcolorspacelist_to_widget_colorspacelist(XpuColorspaceList colorspacelist, int num_colorspaces)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_colorspaces+1));
-    if(!names)
-      return NULL;
-
-    for(i = 0 ; i < num_colorspaces ; i++)
-      names[i] = (char *)colorspacelist[i].name;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static void
-printerSelectionPrinterSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget    pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart     *pdp = &pdw->printdialog;
-    XawListReturnStruct *lrs = (XawListReturnStruct *)callData;
-    int                  list_index;
-
-    Log(("## user selected a printer\n"));
-
-    list_index = lrs->list_index;
-    if (list_index == XAW_LIST_NONE) {
-        Log(("printerSelectionPrinterSelectedXtProc: Nothing selected.\n"));
-        return;
-    }
-    
-    Log(("selected printer is '%d'/'%s'/'%s'\n", 
-        list_index, lrs->string, NULLSTR(pdp->printerlist[list_index].name)));
-
-    /* Enable OK button */
-    XtVaSetValues(pdp->selectPrinter.ok, XtNsensitive, True, NULL);
-}
-
-static void
-printSelectPrinterXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget   pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart    *pdp = &pdw->printdialog;
-
-    Log(("## select printer!\n"));
-
-    if (!pdp->selectPrinter.popup) {
-        if (!buildPrinterSelectionDialog(pdw)) {
-            Log(("printSelectPrinterXtProc: buildPrinterSelectionDialog failure.\n"));
-            return;
-        }
-    }
-
-    center_popup((Widget)pdw, pdp->selectPrinter.popup);
-
-    XtPopup(pdp->selectPrinter.popup, XtGrabExclusive);
-}
-
-static void
-printerSelectionClose(PrintDialogWidget  pdw)
-{ 
-    PrintDialogPart *pdp = &pdw->printdialog;
-
-    if (pdp->selectPrinter.popup) {
-        XtPopdown(pdp->selectPrinter.popup);
-    }
-}
-
-static void
-printerSelectionOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget    pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart     *pdp = &pdw->printdialog;
-    XawListReturnStruct *lrs;
-    int                  list_index;
-
-    Log(("## printerSelectionOKXtProc: closing printer selection!\n"));
-
-    /* Copy current selection in printer list widget and open a printer connection */
-    lrs = XawListShowCurrent(pdp->selectPrinter.list);
-    if (!lrs) {
-        Log(("printerSelectionOKXtProc: |lrs|==NULL\n"));
-        return;
-    }
-
-    list_index = lrs->list_index;
-    if (lrs->list_index == XAW_LIST_NONE) {
-        Log(("printerSelectionOKXtProc: rs->list_index == XAW_LIST_NONE\n"));
-        XtFree((char *)lrs);
-        return;
-    }
-
-    /* Set printer name and description in main dialog */
-    XtVaSetValues(pdp->main.name, XtNlabel, NULLSTR(pdp->printerlist[list_index].name), NULL);
-    XtVaSetValues(pdp->main.desc, XtNlabel, NULLSTR(pdp->printerlist[list_index].desc), NULL);
-
-    if (pdp->printer_name)
-        free(pdp->printer_name);
-    pdp->printer_name = strdup(lrs->string);
-
-    /* Close any outstanding printer connection since user has selected
-     * a different printer */
-    closePrinterConnection(pdw, True);
-
-    printerSelectionClose(pdw);
-    
-    XtFree((char *)lrs);
-}
-
-static void
-printerSelectionCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    Log(("## printerSelectionCancelXtProc: closing printer selection!\n"));
-
-    printerSelectionClose(pdw);
-}
-
-static
-Bool buildPrinterSelectionDialog(PrintDialogWidget  pdw)
-{
-    PrintDialogPart   *pdp = &pdw->printdialog;
-
-    int  n;
-    Arg  args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True);                    n++;
-    pdp->selectPrinter.popup = XtCreatePopupShell("printerselection", transientShellWidgetClass, (Widget)pdw, args, n);
-
-    n = 0;
-    pdp->selectPrinter.form = XtCreateManagedWidget("form", formWidgetClass, pdp->selectPrinter.popup, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,        True);                    n++;
-    XtSetArg(args[n], XtNforceColumns,     True);                    n++;
-    XtSetArg(args[n], XtNdefaultColumns,   1);                       n++;
-    XtSetArg(args[n], XtNlist,             pdp->widget_printerlist); n++;
-    XtSetArg(args[n], XtNwidth,            DEFAULT_WIDTH);           n++;
-    pdp->selectPrinter.list = XtCreateManagedWidget("list", listWidgetClass, pdp->selectPrinter.form, args, n);
-    XtAddCallback(pdp->selectPrinter.list, XtNcallback, printerSelectionPrinterSelectedXtProc, pdw);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,        False);                   n++;
-    pdp->selectPrinter.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->selectPrinter.form, args, n);
-    XtAddCallback(pdp->selectPrinter.ok, XtNcallback, printerSelectionOKXtProc, pdw);
-
-    n = 0;
-    pdp->selectPrinter.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->selectPrinter.form, args, n);
-    XtAddCallback(pdp->selectPrinter.cancel, XtNcallback, printerSelectionCancelXtProc, pdw);
-
-    XtRealizeWidget(pdp->selectPrinter.popup);
-
-    return True;
-}
-
-static
-void destroyPrinterSelectionDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-
-    if (pdp->selectPrinter.popup) {
-        XtDestroyWidget(pdp->selectPrinter.popup);
-    }
-
-    /* |XtDestroyWidget(pdp->setup.popup);| above will recursively destroy
-     * all children so we only have to reset the pointers here... */
-    pdp->selectPrinter.popup   = NULL;
-    pdp->selectPrinter.form    = NULL;
-    pdp->selectPrinter.list    = NULL;
-    pdp->selectPrinter.popup   = NULL;
-    pdp->selectPrinter.cancel  = NULL;
-}
-
-/*
- * Function:
- *      createprintdialogchildren
- *
- * Parameters:
- *      w - print dialog widget
- *
- * Description:
- *      Creates the print dialog widgets.
- *
- * Note
- *      -
- */
-static void
-createprintdialogchildren(Widget w)
-{
-    int                n;
-    Arg                args[20];
-    PrintDialogWidget  pdw = (PrintDialogWidget)w;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-    const char        *default_printername = NULL,
-                      *default_printerdesc = NULL;
-    Bool               has_default_printer = False;
-
-    pdp->printerlist = XpuGetPrinterList(NULL, &pdp->num_printers);
-    pdp->widget_printerlist = xpprinterlist_to_widget_printerlist(pdp->printerlist, pdp->num_printers);
-
-    if (pdp->num_printers > 0) {
-        if (pdp->printerlist[0].name && strlen(pdp->printerlist[0].name)) {
-            /* XprintUtils moves the default printer to the top */
-            default_printername = pdp->printerlist[0].name;
-            default_printerdesc = pdp->printerlist[0].desc;
-            pdp->printer_name   = strdup(pdp->printerlist[0].name);
-            has_default_printer = True;
-        }
-    }
-    else
-    {
-      PrintMsg(("No Xprint servers could be found.\n"
-                "Check whether the XPSERVERLIST environment variable contains any valid Xprint server(s).\n"));
-    }
-    
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    pdp->main.form = XtCreateManagedWidget("main", formWidgetClass, (Widget)pdw, args, n);
-
-    n = 0;
-    pdp->main.innerform = XtCreateManagedWidget("innerform", formWidgetClass, pdp->main.form, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyRight);           n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_WIDTH);            n++;
-    pdp->main.desclabel = XtCreateManagedWidget("desclabel", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyLeft);            n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_INFOLABEL_WIDTH);  n++;
-    XtSetArg(args[n], XtNlabel,           default_printerdesc?default_printerdesc:"-"); n++;
-    pdp->main.desc = XtCreateManagedWidget("desc", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       has_default_printer);      n++;
-    pdp->main.info = XtCreateManagedWidget("info", commandWidgetClass, pdp->main.innerform, args, n);
-  /*
-    XtAddCallback(pdp->main.info, XtNcallback, printerInfoXtProc, pdw);
-  */
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyRight);           n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_WIDTH);            n++;
-    pdp->main.namelabel = XtCreateManagedWidget("namelabel", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyLeft);            n++;
-    XtSetArg(args[n], XtNlabel,           default_printername?default_printername:"-"); n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_INFOLABEL_WIDTH);  n++;
-    pdp->main.name = XtCreateManagedWidget("name", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    pdp->main.selectprinter = XtCreateManagedWidget("selectprinter", commandWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.selectprinter, XtNcallback, printSelectPrinterXtProc, pdw);
-
-    /* Line: "File selection" */
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyRight);           n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_WIDTH);            n++;
-    XtSetArg(args[n], XtNsensitive,       False);                    n++;
-    pdp->main.filenamelabel = XtCreateManagedWidget("filenamelabel", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyLeft);            n++;
-    XtSetArg(args[n], XtNlabel,           "-");                      n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_INFOLABEL_WIDTH);  n++;
-    XtSetArg(args[n], XtNsensitive,       False);                    n++;
-    pdp->main.filename = XtCreateManagedWidget("filename", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       False);                    n++;
-    pdp->main.selectfile = XtCreateManagedWidget("selectfile", commandWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.selectfile, XtNcallback, printSelectFileXtProc, pdw);
-
-    /* Line: Misc (Print destination toggles, copy-count etc.)*/
-    n = 0;
-    XtSetArg(args[n], XtNstate,           True);                     n++;
-    pdp->main.printtoprinter = XtCreateManagedWidget("printtoprinter", toggleWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.printtoprinter, XtNcallback, printDialogDestXtProc, pdw);
-
-    n = 0;
-    XtSetArg(args[n], XtNstate,           False);                    n++;
-    pdp->main.printtofile = XtCreateManagedWidget("printtofile", toggleWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.printtofile, XtNcallback, printDialogDestXtProc, pdw);
-
-    /* End-of-Inner-Form-Content */
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       has_default_printer);       n++;
-    pdp->main.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->main.form, args, n);
-    XtAddCallback(pdp->main.ok, XtNcallback, printOKXtProc, pdw);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       has_default_printer);       n++;
-    pdp->main.setup = XtCreateManagedWidget("setup", commandWidgetClass, pdp->main.form, args, n);
-    XtAddCallback(pdp->main.setup, XtNcallback, printSetupXtProc, pdw);
-
-    n = 0;
-    pdp->main.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->main.form, args, n);
-    XtAddCallback(pdp->main.cancel, XtNcallback, printCancelXtProc, pdw);
-}
-
-/*
- * Class Methods
- */
-static void    XawPrintDialogConstraintInitialize(Widget, Widget, ArgList, Cardinal *);
-static void    XawPrintDialogGetValuesHook(Widget, ArgList, Cardinal*);
-static void    XawPrintDialogInitialize(Widget, Widget, ArgList, Cardinal*);
-static void    XawPrintDialogDestroy(Widget);
-static Boolean XawPrintDialogSetValues(Widget, Widget, Widget, ArgList, Cardinal *);
-
-/*
- * Initialization
- */
-static XtResource resources[] = {
-  {
-    XtNicon,
-    XtCIcon,
-    XtRBitmap,
-    sizeof(Pixmap),
-    XtOffsetOf(PrintDialogRec, printdialog.icon),
-    XtRImmediate,
-    0
-  },
-  {
-    XawNOkCallback, XtCCallback, XtRCallback,
-    sizeof(XtCallbackList), XtOffsetOf(PrintDialogRec, printdialog.ok_callback),
-    XtRImmediate, (XtPointer)NULL
-  },
-  {
-    XawNCancelCallback, XtCCallback, XtRCallback,
-    sizeof(XtCallbackList), XtOffsetOf(PrintDialogRec, printdialog.cancel_callback),
-    XtRImmediate, (XtPointer)NULL
-  },
-};
-
-PrintDialogClassRec printdialogClassRec = {
-  /* core */
-  {
-    (WidgetClass)&formClassRec,         /* superclass */
-    "PrintDialog",                      /* class_name */
-    sizeof(PrintDialogRec),             /* widget_size */
-    XawInitializeWidgetSet,             /* class_initialize */
-    NULL,                               /* class_part init */
-    False,                              /* class_inited */
-    XawPrintDialogInitialize,           /* initialize */
-    NULL,                               /* initialize_hook */
-    XtInheritRealize,                   /* realize */
-    NULL,                               /* actions */
-    0,                                  /* num_actions */
-    resources,                          /* resources */
-    XtNumber(resources),                /* num_resources */
-    NULLQUARK,                          /* xrm_class */
-    True,                               /* compress_motion */
-    True,                               /* compress_exposure */
-    True,                               /* compress_enterleave */
-    False,                              /* visible_interest */
-    XawPrintDialogDestroy,              /* destroy */
-    XtInheritResize,                    /* resize */
-    XtInheritExpose,                    /* expose */
-    XawPrintDialogSetValues,            /* set_values */
-    NULL,                               /* set_values_hook */
-    XtInheritSetValuesAlmost,           /* set_values_almost */
-    XawPrintDialogGetValuesHook,        /* get_values_hook */
-    NULL,                               /* accept_focus */
-    XtVersion,                          /* version */
-    NULL,                               /* callback_private */
-    NULL,                               /* tm_table */
-    XtInheritQueryGeometry,             /* query_geometry */
-    XtInheritDisplayAccelerator,        /* display_accelerator */
-    NULL,                               /* extension */
-  },
-  /* composite */
-  {
-    XtInheritGeometryManager,           /* geometry_manager */
-    XtInheritChangeManaged,             /* change_managed */
-    XtInheritInsertChild,               /* insert_child */
-    XtInheritDeleteChild,               /* delete_child */
-    NULL,                               /* extension */
-  },
-  /* constraint */
-  {
-    NULL,                               /* subresourses */
-    0,                                  /* subresource_count */
-    sizeof(PrintDialogConstraintsRec),  /* constraint_size */
-    XawPrintDialogConstraintInitialize, /* initialize */
-    NULL,                               /* destroy */
-    NULL,                               /* set_values */
-    NULL,                               /* extension */
-  },
-  /* form */
-  {
-    XtInheritLayout,                    /* layout */
-  },
-  /* printdialog */
-  {
-    NULL,                               /* extension */
-  }
-};
-
-WidgetClass printDialogWidgetClass = (WidgetClass)&printdialogClassRec;
-
-/*
- * Implementation
- */
-/*ARGSUSED*/
-static void
-XawPrintDialogInitialize(Widget request, Widget cnew, ArgList args, Cardinal *num_args)
-{
-    PrintDialogWidget dw = (PrintDialogWidget)cnew;
-    Arg               arglist[9];
-    Cardinal          arg_cnt = 0;
-
-    XtSetArg(arglist[arg_cnt], XtNborderWidth, 0);     arg_cnt++;
-    XtSetArg(arglist[arg_cnt], XtNleft, XtChainLeft);  arg_cnt++;
-
-    if (dw->printdialog.icon != (Pixmap)0) {
-        XtSetArg(arglist[arg_cnt], XtNbitmap, dw->printdialog.icon);     arg_cnt++;
-        XtSetArg(arglist[arg_cnt], XtNright, XtChainLeft);               arg_cnt++;
-        dw->printdialog.iconW = XtCreateManagedWidget("icon", labelWidgetClass,
-                                                      cnew, arglist, arg_cnt);
-        arg_cnt = 2;
-        XtSetArg(arglist[arg_cnt], XtNfromHoriz, dw->printdialog.iconW); arg_cnt++;
-    }
-    else {
-        dw->printdialog.iconW = NULL;
-    }
-    
-    createprintdialogchildren((Widget)dw);
-}
-
-/*ARGSUSED*/
-static void
-XawPrintDialogConstraintInitialize(Widget request, Widget cnew,
-                                   ArgList args, Cardinal *num_args)
-{
-    PrintDialogWidget dw = (PrintDialogWidget)cnew->core.parent;
-    PrintDialogConstraints constraint = (PrintDialogConstraints)cnew->core.constraints;
-
-    if (!XtIsSubclass(cnew, commandWidgetClass)) /* if not a button */
-        return;                                  /* then just use defaults */
-
-    constraint->form.left = constraint->form.right = XtChainLeft;
-    constraint->form.vert_base = dw->printdialog.main.form;
-
-    if (dw->composite.num_children > 1) {
-        WidgetList  children = dw->composite.children;
-        Widget     *childP;
-
-        for (childP = children + dw->composite.num_children - 1;
-           childP >= children; childP-- ) {
-            if (*childP == dw->printdialog.main.form)
-                break;
-            if (XtIsManaged(*childP) &&
-                XtIsSubclass(*childP, commandWidgetClass)) {
-                constraint->form.horiz_base = *childP;
-                break;
-            }
-        }
-    }
-}
-
-#define ICON       0
-#define NUM_CHECKS 1
-/*ARGSUSED*/
-static Boolean
-XawPrintDialogSetValues(Widget current, Widget request, Widget cnew,
-                        ArgList in_args, Cardinal *in_num_args)
-{
-    PrintDialogWidget w   = (PrintDialogWidget)cnew;
-    PrintDialogWidget old = (PrintDialogWidget)current;
-    Arg               args[5];
-    unsigned int      i;
-    Bool              checks[NUM_CHECKS];
-
-    for (i = 0; i < NUM_CHECKS; i++)
-        checks[i] = False;
-
-    for (i = 0; i < *in_num_args; i++) {
-        if (!strcmp(XtNicon, in_args[i].name))
-            checks[ICON]  = True;
-    }
-
-    if (checks[ICON]) {
-        if (w->printdialog.icon != 0) {
-            XtSetArg(args[0], XtNbitmap, w->printdialog.icon);
-            if (old->printdialog.iconW != NULL) {
-                XtSetValues(old->printdialog.iconW, args, 1);
-            }
-            else {
-                XtSetArg(args[1], XtNborderWidth, 0);
-                XtSetArg(args[2], XtNleft,        XtChainLeft);
-                XtSetArg(args[3], XtNright,       XtChainLeft);
-                w->printdialog.iconW = XtCreateWidget("icon", labelWidgetClass,
-                                                      cnew, args, 4);
-                XtManageChild(w->printdialog.iconW);
-            }
-        }
-        else if (old->printdialog.icon != 0) {
-            XtDestroyWidget(old->printdialog.iconW);
-            w->printdialog.iconW = NULL;
-        }
-    }
-
-    return True;
-}
-
-/*
- * Function:
- *      XawPrintDialogGetValuesHook
- *
- * Parameters:
- *      w        - Print Dialog Widget
- *      args     - argument list
- *      num_args - number of args
- *
- * Description:
- *      This is a get values hook routine that gets the values in the dialog.
- */
-static void
-XawPrintDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
-{
-    /* NO-OP for now */
-}
-
-static void 
-XawPrintDialogDestroy(Widget w)
-{
-    PrintDialogWidget pdw = (PrintDialogWidget)w;
-    Log(("# XawPrintDialogDestroy: start.\n"));
-
-    destroyPrintSetupDialog(pdw);
-    destroyPrinterSelectionDialog(pdw);
-    closePrinterConnection(pdw, True);
-    
-    Log(("# XawPrintDialogDestroy: done.\n"));
-}
-
-/*
- * Function:
- *      XawPrintDialogClosePrinterConnection
- *
- * Parameters:
- *      w            - Print Dialog Widget
- *      closeDisplay - Boolean which decides whether |Display *|
- *                     and |XPContext| should be disposed, too.
- *
- * Description:
- *      The print display connection is owned by the print dialog
- *      by default.
- *      If the application wishes to close the display connection
- *      to the print server, either to close it itself or force
- *      a disconnection for other reasons this function can be used.
- *
- * Notes
- *      1. PUBLIC API
- *      2. After this function returns all resources returned by the
- *         print dialog which are related to the status of the printer
- *         connection are stale.
- */
-void
-XawPrintDialogClosePrinterConnection(Widget w, Bool closeDisplay)
-{
-    closePrinterConnection((PrintDialogWidget)w, closeDisplay);
-}
-
diff --git a/xedit/printdialog.h b/xedit/printdialog.h
deleted file mode 100644 (file)
index f166a27..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * $Xorg: printdialog.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef XMORE_PRINTDIALOG_H
-#define XMORE_PRINTDIALOG_H 1
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Print.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Form.h>
-#include <X11/XprintUtil/xprintutil.h>
-
-/* Resources:
-   NOT WRITTEN YET
-*/
-
-#define XtCIcon "Icon"
-#define XtNicon "icon"
-
-#define XawNOkCallback             "okCallback"
-#define XawNCancelCallback         "cancelCallback"
-
-typedef struct
-{
-    Display            *pdpy;
-    XPContext           pcontext;
-    const char         *printToFileName;
-    Boolean             printToFile;
-    XpuColorspaceRec   *colorspace;
-} XawPrintDialogCallbackStruct;
-
-typedef struct _PrintDialogClassRec *PrintDialogWidgetClass;
-typedef struct _PrintDialogRec      *PrintDialogWidget;
-
-extern WidgetClass printDialogWidgetClass;
-
-_XFUNCPROTOBEGIN
-
-/* Prototypes */
-void XawPrintDialogClosePrinterConnection(Widget w, Bool closeDisplay);
-
-_XFUNCPROTOEND
-
-#endif /* !XMORE_PRINTDIALOG_H */
diff --git a/xedit/printdialogprivates.h b/xedit/printdialogprivates.h
deleted file mode 100644 (file)
index 1e66eb8..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * $Xorg: printdialogprivates.h,v 1.1 2004/05/12 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef _XawPrintDialogP_h
-#define _XawPrintDialogP_h 1
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xos.h>
-#include <X11/Xmu/Misc.h>
-#include <X11/CoreP.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Command.h>    
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/DialogP.h>
-#include <X11/Xaw/XawInit.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/FormP.h>
-
-/* From Xaw/Privates.h */
-#ifndef XtWidth
-#define XtWidth(w)        (((RectObj)w)->rectangle.width)
-#endif
-#ifndef XtHeight
-#define XtHeight(w)       (((RectObj)w)->rectangle.height)
-#endif
-
-
-typedef struct {
-    XtPointer extension;
-} PrintDialogClassPart;
-
-typedef struct _PrintDialogClassRec {
-    CoreClassPart         core_class;
-    CompositeClassPart    composite_class;
-    ConstraintClassPart   constraint_class;
-    FormClassPart         form_class;
-    PrintDialogClassPart  print_dialog_class;
-} PrintDialogClassRec;
-
-extern PrintDialogClassRec printDialogClassRec;
-
-typedef struct _PrintDialogPart {
-    /* resources */
-    String        label;               /* description of the dialog     */
-    String        value;               /* for the user response         */
-    Pixmap        icon;                /* icon bitmap                   */
-    XtCallbackList ok_callback,
-                   cancel_callback;
-        
-    /* private */
-    Widget     iconW;          /* widget to display the icon    */
-    
-    struct
-    {
-        Widget form,
-               innerform,
-               desclabel,
-               desc,
-               info,
-               namelabel,
-               name,
-               selectprinter,
-               filenamelabel,
-               filename,
-               selectfile,
-               printtoprinter,
-               printtofile,
-               ok,
-               setup,
-               cancel;
-    } main;
-
-    Bool   printToFile;
-    char  *filename;
-    Bool   canPrint,       /* can we print ? */
-           canReallyPrint; /* is it really save to print ? */
-    XpuColorspaceRec *selected_colorspace;
-
-    struct
-    {
-        Widget popup,
-               form,
-               list,
-               ok,
-               cancel;
-    } selectPrinter;
-
-    struct
-    {
-      Widget popup,
-             form,
-             paperlist,
-             resolutionlist,
-             orientationlist,
-             plexlist,
-             colorspacelist,
-             jobcopieslabel,
-             jobcopies,
-             ok,
-             cancel;
-    } setup;
-
-    struct
-    {
-        Widget dialog,
-               shell;
-    } selectFile;
-
-    XPPrinterList  printerlist;
-    int            num_printers;
-    String        *widget_printerlist;
-
-    String     printer_name;
-    Display   *pdpy;
-    XPContext  pcontext;
-
-    XpuMediumSourceSizeList  paperlist;
-    int                      num_papers;
-    String                  *widget_paperlist;
-    
-    XpuResolutionList        resolutionlist;
-    int                      num_resolutions;
-    String                  *widget_resolutionlist;
-
-    XpuOrientationList       orientationlist;
-    int                      num_orientations;
-    String                  *widget_orientationlist;
-
-    XpuPlexList              plexlist;
-    int                      num_plex;
-    String                  *widget_plexlist;
-
-    XpuColorspaceList        colorspacelist;
-    int                      num_colorspaces;
-    String                  *widget_colorspacelist;
-} PrintDialogPart;
-
-typedef struct _PrintDialogRec {
-    CorePart            core;
-    CompositePart       composite;
-    ConstraintPart      constraint;
-    FormPart            form;
-    PrintDialogPart     printdialog;
-} PrintDialogRec;
-
-typedef struct {
-    XtPointer extension;
-} PrintDialogConstraintsPart;
-
-typedef struct _PrintDialogConstraintsRec {
-    FormConstraintsPart        form;
-    PrintDialogConstraintsPart printdialog;
-} PrintDialogConstraintsRec, *PrintDialogConstraints;
-
-#endif /* !_XawPrintDialogP_h */
-
diff --git a/xedit/realpath.c b/xedit/realpath.c
deleted file mode 100644 (file)
index 4d58b75..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 1994
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/* $XFree86: xc/programs/xedit/realpath.c,v 1.4 2000/02/12 20:45:45 dawes Exp $ */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)realpath.c 8.1 (Berkeley) 2/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifndef LISP
-#include "xedit.h"
-#endif
-
-#if defined(__Lynx__)
-#define NO_FCHDIR
-#endif
-
-#if defined(ISC)
-#ifndef MAXPATHLEN
-#define MAXPATHLEN     1024
-#endif
-#endif
-#ifndef MAXSYMLINKS
-#define MAXSYMLINKS    256
-#endif
-
-/*
- * char *realpath(const char *path, char resolved_path[MAXPATHLEN]);
- *
- * Find the real name of path, by removing all ".", ".." and symlink
- * components.  Returns (resolved) on success, or (NULL) on failure,
- * in which case the path which caused trouble is left in (resolved).
- */
-char *
-realpath(path, resolved)
-       const char *path;
-       char *resolved;
-{
-       struct stat sb;
-#ifdef NO_FCHDIR
-       char start[MAXPATHLEN];
-#else
-       int fd;
-#endif
-       int n, rootd, serrno;
-       char *p, *q, wbuf[MAXPATHLEN];
-       int symlinks = 0;
-
-       /* Save the starting point. */
-#ifdef NO_FCHDIR
-       if (getcwd(start, MAXPATHLEN) == NULL) {
-               (void)strcpy(resolved, ".");
-               return (NULL);
-       }
-#else
-       if ((fd = open(".", O_RDONLY)) < 0) {
-               (void)strcpy(resolved, ".");
-               return (NULL);
-       }
-#endif
-
-       /*
-        * Find the dirname and basename from the path to be resolved.
-        * Change directory to the dirname component.
-        * lstat the basename part.
-        *     if it is a symlink, read in the value and loop.
-        *     if it is a directory, then change to that directory.
-        * get the current directory name and append the basename.
-        */
-       (void)strncpy(resolved, path, MAXPATHLEN - 1);
-       resolved[MAXPATHLEN - 1] = '\0';
-loop:
-       q = strrchr(resolved, '/');
-       if (q != NULL) {
-               p = q + 1;
-               if (q == resolved)
-                       q = "/";
-               else {
-                       do {
-                               --q;
-                       } while (q > resolved && *q == '/');
-                       q[1] = '\0';
-                       q = resolved;
-               }
-               if (chdir(q) < 0)
-                       goto err1;
-       } else
-               p = resolved;
-
-       /* Deal with the last component. */
-       if (*p != '\0' && lstat(p, &sb) == 0) {
-               if (S_ISLNK(sb.st_mode)) {
-                      if (++symlinks > MAXSYMLINKS) {
-                              errno = ELOOP;
-                              goto err1;
-                      }
-                       n = readlink(p, resolved, MAXPATHLEN);
-                       if (n < 0)
-                               goto err1;
-                       resolved[n] = '\0';
-                       goto loop;
-               }
-               if (S_ISDIR(sb.st_mode)) {
-                       if (chdir(p) < 0)
-                               goto err1;
-                       p = "";
-               }
-       }
-
-       /*
-        * Save the last component name and get the full pathname of
-        * the current directory.
-        */
-       (void)strcpy(wbuf, p);
-       if (getcwd(resolved, MAXPATHLEN) == 0)
-               goto err1;
-
-       /*
-        * Join the two strings together, ensuring that the right thing
-        * happens if the last component is empty, or the dirname is root.
-        */
-       if (resolved[0] == '/' && resolved[1] == '\0')
-               rootd = 1;
-       else
-               rootd = 0;
-
-       if (*wbuf) {
-               if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) {
-                       errno = ENAMETOOLONG;
-                       goto err1;
-               }
-               if (rootd == 0)
-                       (void)strcat(resolved, "/");
-               (void)strcat(resolved, wbuf);
-       }
-
-       /* Go back to where we came from. */
-#ifdef NO_FCHDIR
-       if (chdir(start) < 0)
-#else
-       if (fchdir(fd) < 0)
-#endif
-       {
-               serrno = errno;
-               goto err2;
-       }
-
-       /* It's okay if the close fails, what's an fd more or less? */
-#ifndef NO_FCHDIR
-       (void)close(fd);
-#endif
-       return (resolved);
-
-err1:  serrno = errno;
-#ifdef NO_FCHDIR
-       (void)chdir(start);
-#else
-       (void)fchdir(fd);
-#endif
-err2:
-#ifndef NO_FCHDIR
-       (void)close(fd);
-#endif
-       errno = serrno;
-       return (NULL);
-}
diff --git a/xedit/strcasecmp.c b/xedit/strcasecmp.c
deleted file mode 100644 (file)
index 77ff4c3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $XFree86: xc/programs/xedit/strcasecmp.c,v 1.1 1999/06/14 02:38:07 dawes Exp $ */
-
-#include <ctype.h>
-#include <sys/types.h>
-
-#ifndef LISP
-#include "xedit.h"
-#endif
-
-/* Just like the BSD version.  It assumes that tolower() is ANSI-compliant */
-
-int
-strcasecmp(const char *s1, const char *s2)
-{
-       const unsigned char *us1 = (const unsigned char *)s1;
-       const unsigned char *us2 = (const unsigned char *)s2;
-
-       while (tolower(*us1) == tolower(*us2++))
-               if (*us1++ == '\0')
-                       return 0;
-       return tolower(*us1) - tolower(*--us2);
-}
-
-int
-strncasecmp(const char *s1, const char *s2, size_t n)
-{
-       if (n != 0) {
-               const unsigned char *us1 = (const unsigned char *)s1;
-               const unsigned char *us2 = (const unsigned char *)s2;
-
-               do {
-                       if (tolower(*us1) != tolower(*us2++))
-                               return tolower(*us1) - tolower(*--us2);
-                       if (*us1++ == '\0')
-                               break;
-               } while (--n != 0);
-       }
-       return 0;
-}
-
diff --git a/xedit/tags.c b/xedit/tags.c
deleted file mode 100644 (file)
index b8f3970..0000000
+++ /dev/null
@@ -1,635 +0,0 @@
-/*
- * Copyright © 2007 Paulo César Pereira de Andrade
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Paulo César Pereira de Andrade
- */
-
-/*
- *   Certain tag files may require quite some time and memory to load.
- * Linux kernel 2.6x is an example, the tags file itself is almost 80Mb
- * and xedit will use over 100Mb to store the data, and take quite some
- * time to load it (and can grow drastically with every loaded files
- * due to the memory used by the file contents and internal structures,
- * like the syntax highlight ones).
- *   Possible workarounds could be to load the tags file in a separate
- * process or thread. The memory problem would be hard to circunvent,
- * as the tags file metadata would need to be stored in some very fast
- * database, or at least some special format that would not require
- * a linear search in a huge tags file.
- */
-
-#include "xedit.h"
-#include "util.h"
-#include "re.h"
-#include <unistd.h>
-
-/*
- * Types
- */
-typedef struct _TagsEntry      TagsEntry;
-typedef struct _RegexEntry     RegexEntry;
-
-struct _TagsEntry {
-    hash_key   *symbol;
-    TagsEntry  *next;
-
-    int                nentries;
-    hash_entry **filenames;
-    char       **patterns;
-};
-
-struct _RegexEntry {
-    hash_key   *pattern;
-    RegexEntry *next;
-
-    re_cod     regex;
-};
-
-struct _XeditTagsInfo {
-    hash_key           *pathname;
-    XeditTagsInfo      *next;
-
-    hash_table         *entries;
-    hash_table         *filenames;
-    hash_table         *patterns;
-
-    /* Used when searching for alternate tags and failing descending to
-     * root directory */
-    Boolean            visited;
-
-    /* Flag to know if tags file is in xedit cwd and allow using relative
-     * pathnames when loading a file with some tag definition, so that
-     * other code will not fail to write file (or even worse, write to
-     * wrong file) if file is edited and tags is not in the current dir */
-    Boolean            incwd;
-
-    /* Cache information for circulating over multiple definitions */
-    XeditTagsInfo      *tags;          /* If trying another TagsInfo */
-    TagsEntry          *entry;         /* Entry in tags->tags */
-    int                        offset;
-    Widget             textwindow;
-    XawTextPosition    position;
-};
-
-/*
- * Prototypes
- */
-static XeditTagsInfo *LoadTagsFile(char *tagsfile);
-static XeditTagsInfo *DoLoadTagsFile(char *tagsfile, int length);
-static void FindTagFirst(XeditTagsInfo *tags, char *symbol, int length);
-static void FindTagNext(XeditTagsInfo *tags,
-                       Widget window, XawTextPosition position);
-static void FindTag(XeditTagsInfo *tags);
-
-/*
- * Initialization
- */
-extern Widget texts[3];
-static hash_table *ht_tags;
-
-/*
- * Implementation
- */
-void
-TagsAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    xedit_flist_item   *item;
-    char               buffer[1024];
-    XawTextPosition    position, left, right;
-    XawTextBlock       block;
-    int                        length;
-    Widget             source;
-
-    source = XawTextGetSource(w);
-    item = FindTextSource(source, NULL);
-    if (item->tags == NULL)
-       SearchTagsFile(item);
-
-    if (item->tags) {
-       position = XawTextGetInsertionPoint(w);
-       XawTextGetSelectionPos(w, &left, &right);
-       if (right > left) {
-           XawTextSourceRead(source, left, &block, right - left);
-           length = block.length + 1;
-           if (length >= sizeof(buffer))
-               length = sizeof(buffer);
-           XmuSnprintf(buffer, length, "%s", block.ptr);
-           item->tags->textwindow = w;
-           item->tags->position = position;
-           FindTagFirst(item->tags, buffer, length - 1);
-       }
-       else
-           FindTagNext(item->tags, w, position);
-    }
-    else
-       Feep();
-}
-
-void
-SearchTagsFile(xedit_flist_item *item)
-{
-    if (app_resources.loadTags) {
-       char            buffer[BUFSIZ];
-       char            *ptr, *tagsfile;
-       int             length;
-       Boolean         exists;
-       FileAccess      file_access;
-
-       tagsfile = NULL;
-
-       /* If path fully specified in resource */
-       if (app_resources.tagsName[0] == '/')
-           tagsfile = ResolveName(app_resources.tagsName);
-       /* Descend up to root directory searching for a tags file */
-       else {
-           /* *scratch* buffer */
-           if (item->filename[0] != '/') {
-               ptr = ResolveName(app_resources.tagsName);
-               strncpy(buffer, ptr ? ptr : "", sizeof(buffer));
-           }
-           else
-               strncpy(buffer, item->filename, sizeof(buffer));
-
-           /* Make sure buffer is nul terminated */
-           buffer[sizeof(buffer) - 1] = '\0';
-           ptr = buffer + strlen(buffer);
-
-           for (;;) {
-               while (ptr > buffer && ptr[-1] != '/')
-                   --ptr;
-               if (ptr <= buffer)
-                   break;
-               length = ptr - buffer;
-               if (length >= sizeof(buffer))
-                   length = sizeof(buffer);
-               strncpy(ptr, app_resources.tagsName,
-                       sizeof(buffer) - length);
-               buffer[sizeof(buffer) - 1] = '\0';
-
-               /* Check if tags filename exists */
-               tagsfile = ResolveName(buffer);
-               if (tagsfile != NULL) {
-                   file_access = CheckFilePermissions(tagsfile, &exists);
-                   /* Check if can read tagsfile */
-                   if (exists &&
-                       (file_access == READ_OK || file_access == WRITE_OK))
-                       break;
-                   else
-                       tagsfile = NULL;
-               }
-               *--ptr = '\0';
-           }
-       }
-
-       if (tagsfile)
-           item->tags = LoadTagsFile(tagsfile);
-       else {
-           XeditPrintf("No tags file found."
-                       " Run \"ctags -R\" to build a tags file.\n");
-           item->tags = NULL;
-       }
-    }
-}
-
-static void
-FindTagFirst(XeditTagsInfo *tags, char *symbol, int length)
-{
-    char       *ptr;
-    TagsEntry  *entry;
-    char       buffer[BUFSIZ];
-
-    /* Check for malformed parameters */
-    ptr = symbol;
-    while (*ptr) {
-       if (*ptr == ' ' || *ptr == '\t' || *ptr == '\n' || *ptr == '\r' ||
-           *ptr == '(' || *ptr == ')') {
-           Feep();
-           return;
-       }
-       ptr++;
-    }
-
-    /* First try in buffer tags */
-    tags->tags = tags;
-    entry = (TagsEntry *)hash_check(tags->entries, symbol, length);
-    if (entry == NULL) {
-       /* Try to find in alternate tags */
-       strncpy(buffer, tags->pathname->value, tags->pathname->length);
-       buffer[tags->pathname->length] = '\0';
-       ptr = buffer + tags->pathname->length - 1;
-
-       for (tags->tags = (XeditTagsInfo *)hash_iter_first(ht_tags);
-            tags->tags;
-            tags->tags = (XeditTagsInfo *)hash_iter_next(ht_tags))
-           tags->tags->visited = False;
-
-       tags->visited = True;
-
-       while (ptr > buffer && entry == NULL) {
-           --ptr;
-           while (ptr > buffer && ptr[-1] != '/')
-               --ptr;
-           if (ptr <= buffer)
-               break;
-           *ptr = '\0';
-
-           /* Try an upper directory tags */
-           tags->tags = (XeditTagsInfo *)
-               hash_check(ht_tags, buffer, ptr - buffer);
-           if (tags->tags) {
-               tags->tags->visited = True;
-               entry = (TagsEntry *)
-                   hash_check(tags->tags->entries, symbol, length);
-           }
-       }
-
-       /* If still failed, check other available tags
-        * for possible different projects */
-       if (entry == NULL) {
-           for (tags->tags = (XeditTagsInfo *)hash_iter_first(ht_tags);
-                tags->tags;
-                tags->tags = (XeditTagsInfo *)hash_iter_next(ht_tags)) {
-               if (tags->tags->visited == False) {
-                   entry = (TagsEntry *)
-                       hash_check(tags->tags->entries, symbol, length);
-                   /* Stop on first match */
-                   if (entry != NULL)
-                       break;
-               }
-           }
-       }
-
-       if (entry == NULL) {
-           XeditPrintf("Symbol %s not in tags\n", symbol);
-           Feep();
-           return;
-       }
-    }
-
-    tags->entry = entry;
-    tags->offset = 0;
-
-    FindTag(tags);
-}
-
-static void
-FindTagNext(XeditTagsInfo *tags, Widget window, XawTextPosition position)
-{
-    if (window != tags->textwindow || position != tags->position)
-       Feep();
-    else {
-       if (tags->entry->nentries > 1) {
-           if (++tags->offset >= tags->entry->nentries)
-               tags->offset = 0;
-           FindTag(tags);
-       }
-       else
-           Feep();
-    }
-}
-
-static XeditTagsInfo *
-LoadTagsFile(char *tagsfile)
-{
-    XeditTagsInfo      *tags;
-    int                        length;
-
-    if (ht_tags == NULL)
-       ht_tags = hash_new(11, NULL);
-
-    /* tags key is only the directory name with ending '/' */
-    length = strlen(tagsfile) - strlen(app_resources.tagsName);
-    tags = (XeditTagsInfo *)hash_check(ht_tags, tagsfile, length);
-
-    return (tags ? tags : DoLoadTagsFile(tagsfile, length));
-}
-
-static XeditTagsInfo *
-DoLoadTagsFile(char *tagsfile, int length)
-{
-    char               *ptr;
-    FILE               *file;
-    XeditTagsInfo      *tags;
-    TagsEntry          *entry;
-    hash_entry         *file_entry;
-    char               buffer[BUFSIZ];
-    char               *symbol, *filename, *pattern;
-
-    file = fopen(tagsfile, "r");
-    if (file) {
-       char *cwd;
-
-       tags = XtNew(XeditTagsInfo);
-
-       cwd = getcwd(buffer, sizeof(buffer));
-       tags->incwd = cwd &&
-           (strlen(cwd) == length - 1 &&
-            memcmp(cwd, tagsfile, length - 1) == 0);
-
-       /* Build pathname as a nul terminated directory specification string */
-       tags->pathname = XtNew(hash_key);
-       tags->pathname->value = XtMalloc(length + 1);
-       tags->pathname->length = length;
-       memcpy(tags->pathname->value, tagsfile, length);
-       tags->pathname->value[length] = '\0';
-       tags->next = NULL;
-
-       tags->entries = hash_new(809, NULL);
-       tags->filenames = hash_new(31, NULL);
-       tags->patterns = hash_new(47, NULL);
-
-       /* Cache information */
-       tags->tags = tags;      /* :-) */
-       tags->entry = NULL;
-       tags->offset = 0;
-       tags->textwindow = NULL;
-       tags->position = 0;
-
-       while (fgets(buffer, sizeof(buffer) - 1, file)) {
-           /* XXX Ignore malformed lines and tags file format information */
-           if (isspace(buffer[0]) || buffer[0] == '!')
-               continue;
-
-           /* Symbol name */
-           symbol = ptr = buffer;
-           while (*ptr && !isspace(*ptr))
-               ptr++;
-           *ptr++ = '\0';
-           while (isspace(*ptr))
-               ptr++;
-
-           /* Filename with basename of tagsfile for symbol definition */
-           filename = ptr;
-           while (*ptr && !isspace(*ptr))
-               ptr++;
-           *ptr++ = '\0';
-           while (isspace(*ptr))
-               ptr++;
-
-           pattern = ptr;
-           /* Check for regex */
-           if (*pattern == '/' || *pattern == '?') {
-               ptr++;
-               while (*ptr && *ptr != *pattern) {
-                   if (*ptr == '\\') {
-                       if (ptr[1] == *pattern || ptr[1] == '\\') {
-                           /* XXX tags will escape pattern end, and backslash
-                            * not sure about other special characters */
-                           memmove(ptr, ptr + 1, strlen(ptr));
-                       }
-                       else {
-                           ++ptr;
-                           if (!*ptr)
-                               break;
-                       }
-                   }
-                   ptr++;
-               }
-
-               if (*ptr != *pattern)
-                   continue;
-               ++pattern;
-               /*   Will do a RE_NOSPEC search, that means ^ and $
-                 * would be literally search (do this to avoid escaping
-                * other regex characters and building a fast/simple literal
-                * string search pattern.
-                *   Expect patterns to be full line */
-               if (*pattern == '^' && ptr[-1] == '$') {
-                   ++pattern;
-                   --ptr;
-               }
-           }
-           /* Check for line number */
-           else if (isdigit(*ptr)) {
-               while (isdigit(*ptr))
-                   ptr++;
-           }
-           /* Format not understood */
-           else
-               continue;
-
-           *ptr = '\0';
-
-           length = strlen(symbol);
-           entry = (TagsEntry *)hash_check(tags->entries,
-                                           symbol, length);
-           if (entry == NULL) {
-               entry = XtNew(TagsEntry);
-               entry->symbol = XtNew(hash_key);
-               entry->symbol->value = XtNewString(symbol);
-               entry->symbol->length = length;
-               entry->next = NULL;
-               entry->nentries = 0;
-               entry->filenames = NULL;
-               entry->patterns = NULL;
-               hash_put(tags->entries, (hash_entry *)entry);
-           }
-
-           length = strlen(filename);
-           file_entry = hash_check(tags->filenames, filename, length);
-           if (file_entry == NULL) {
-               file_entry = XtNew(hash_entry);
-               file_entry->key = XtNew(hash_key);
-               file_entry->key->value = XtNewString(filename);
-               file_entry->key->length = length;
-               file_entry->next = NULL;
-               hash_put(tags->filenames, file_entry);
-           }
-
-           if ((entry->nentries % 4) == 0) {
-               entry->filenames = (hash_entry **)
-                       XtRealloc((char *)entry->filenames,
-                                 sizeof(hash_entry *) *
-                                 (entry->nentries + 4));
-               entry->patterns = (char **)
-                       XtRealloc((char *)entry->patterns,
-                                 sizeof(char *) *
-                                 (entry->nentries + 4));
-           }
-           entry->filenames[entry->nentries] = file_entry;
-           entry->patterns[entry->nentries] = XtNewString(pattern);
-           ++entry->nentries;
-       }
-       fclose(file);
-
-       /* Add tags information to global hash table */
-       hash_put(ht_tags, (hash_entry *)tags);
-       XeditPrintf("Tags file %s loaded\n", tagsfile);
-    }
-    else {
-       XeditPrintf("Failed to load tags file %s\n", tagsfile);
-       tags = NULL;
-    }
-
-    return (tags);
-}
-
-static void
-FindTag(XeditTagsInfo *tags)
-{
-    static String      params[] = { "vertical", NULL };
-
-    char               buffer[BUFSIZ];
-    char               *pattern;
-    int                        length;
-    char               *line;
-    char               *text;
-    RegexEntry         *regex;
-    re_mat             match;
-    XawTextPosition    position, left, right, last;
-    Widget             source;
-    XawTextBlock       block;
-    int                        size;
-    int                        lineno;
-    Boolean            found;
-    xedit_flist_item   *item;
-    Widget             otherwindow;
-
-    XmuSnprintf(buffer, sizeof(buffer), "%s%s", tags->tags->pathname->value,
-               tags->entry->filenames[tags->offset]->key->value);
-
-    pattern = tags->entry->patterns[tags->offset];
-    if (isdigit(*pattern)) {
-       lineno = atoi(pattern);
-       regex = NULL;
-    }
-    else {
-       lineno = 0;
-       length = strlen(pattern);
-       regex = (RegexEntry *)hash_check(tags->patterns, pattern, length);
-       if (regex == NULL) {
-           regex = XtNew(RegexEntry);
-           regex->pattern = XtNew(hash_key);
-           regex->pattern->value = XtNewString(pattern);
-           regex->pattern->length = length;
-           regex->next = NULL;
-           if (recomp(&regex->regex, pattern, RE_NOSUB | RE_NOSPEC)) {
-               XeditPrintf("Failed to compile regex %s\n", pattern);
-               Feep();
-               return;
-           }
-           hash_put(tags->patterns, (hash_entry *)regex);
-       }
-    }
-
-    /* Short circuit to know if split horizontally */
-    if (!XtIsManaged(texts[1]))
-       XtCallActionProc(textwindow, "split-window", NULL, params, 1);
-
-    /* Switch to "other" buffer */
-    XtCallActionProc(textwindow, "other-window", NULL, NULL, 0);
-
-    /* This should print an error message if tags file cannot be read */
-    if (!LoadFileInTextwindow(tags->incwd ?
-                             tags->entry->filenames[tags->offset]->key->value :
-                             buffer, buffer))
-       return;
-
-    otherwindow = textwindow;
-
-    item = FindTextSource(XawTextGetSource(textwindow), NULL);
-    source = item->source;
-    left = XawTextSourceScan(source, 0, XawstAll, XawsdLeft, 1, True);
-
-    found = False;
-
-    if (lineno) {
-       right = RSCAN(left, lineno, False);
-       left = LSCAN(right, 1, False);
-       found = True;
-    }
-    else {
-       right = RSCAN(left, 1, True);
-       last = XawTextSourceScan(source, 0, XawstAll, XawsdRight, 1, True);
-       text = buffer;
-
-       size = sizeof(buffer);
-       for (;;) {
-           length = right - left;
-           match.rm_so = 0;
-           match.rm_eo = length;
-           XawTextSourceRead(source, left, &block, right - left);
-           if (block.length >= length)
-               line = block.ptr;
-           else {
-               if (length > size) {
-                   if (text == buffer)
-                       text = XtMalloc(length);
-                   else
-                       text = XtRealloc(text, length);
-                   size = length;
-               }
-               line = text;
-               memcpy(line, block.ptr, block.length);
-               length = block.length;
-               for (position = left + length;
-                    position < right;
-                    position += block.length) {
-                   XawTextSourceRead(source, position, &block, right - position);
-                   memcpy(line + length, block.ptr, block.length);
-                   length += block.length;
-               }
-           }
-
-           /* If not last line or if it ends in a newline */
-           if (right < last ||
-               (right > left && line[match.rm_eo - 1] == '\n')) {
-               --match.rm_eo;
-               length = match.rm_eo;
-           }
-
-           /* Accept as a match when matching the entire line, as the regex
-            * search pattern is optmized to not need to start with ^ and not
-            * need to end with $*/
-           if (reexec(&regex->regex, line, 1, &match, RE_STARTEND) == 0 &&
-               match.rm_eo > match.rm_so &&
-               match.rm_so == 0 && match.rm_eo == length) {
-               right = left + match.rm_so + (match.rm_eo - match.rm_so);
-               found = True;
-               break;
-           }
-           else if (right >= last) {
-               XeditPrintf("Failed to match regex %s\n", pattern);
-               Feep();
-               break;
-           }
-           else {
-               left = LSCAN(right + 1, 1, False);
-               right = RSCAN(left, 1, True);
-           }
-       }
-
-       if (text != buffer)
-           XtFree(text);
-    }
-
-    /* Switch back to editing buffer */
-    XtCallActionProc(otherwindow, "other-window", NULL, NULL, 0);
-
-    if (found) {
-       if (source != XawTextGetSource(tags->textwindow) ||
-           right < tags->position || left > tags->position) {
-           XawTextSetInsertionPoint(otherwindow, left);
-           XawTextSetSelection(otherwindow, left, right);
-       }
-    }
-}
diff --git a/xedit/util.c b/xedit/util.c
deleted file mode 100644 (file)
index f65bf4d..0000000
+++ /dev/null
@@ -1,995 +0,0 @@
-/* $XConsortium: util.c,v 1.16 92/08/12 16:46:22 converse Exp $ */
-
-/*
- *                       COPYRIGHT 1987
- *                DIGITAL EQUIPMENT CORPORATION
- *                    MAYNARD, MASSACHUSETTS
- *                     ALL RIGHTS RESERVED.
- *
- * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
- * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
- * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
- * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
- *
- * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
- * APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
- * SET FORTH ABOVE.
- *
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Digital Equipment Corporation not be 
- * used in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission.
- */
-/* $XFree86: xc/programs/xedit/util.c,v 1.26 2003/05/07 20:54:43 herrb Exp $ */
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include <libgen.h>            /* POSIX basename() */
-#include <stdlib.h>            /* for realpath() */
-#include <errno.h>             /* for ENOENT */
-#include "xedit.h"
-
-#include <X11/Xfuncs.h>
-#include <X11/Xos.h>           /* for types.h */
-
-#include <sys/stat.h>
-#include <X11/Xmu/CharSet.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/SimpleMenu.h>
-
-/*
- * Prototypes
- */
-static void SwitchSourceCallback(Widget, XtPointer, XtPointer);
-static int WindowIndex(Widget);
-static void ChangeTextWindow(Widget);
-
-/*
- * External
- */
-extern void _XawTextShowPosition(TextWidget);
-
-/*
- * Initialization
- */
-extern Widget scratch;
-extern Widget vpanes[2], labels[3], texts[3], forms[3];
-extern XawTextWrapMode wrapmodes[3];
-
-#ifndef va_copy
-# ifdef __va_copy
-#  define va_copy __va_copy
-# else
-#  error "no working va_copy was found"
-# endif
-#endif
-    
-/*
- * Implementation
- */
-void
-XeditPrintf(const char *format, ...)
-{
-    static struct {
-       XawTextPosition last;
-       int             size;
-       int             length;
-       int             repeat;
-       char            *buffer;
-    } info;
-
-    size_t             size;
-    va_list            va;
-    XawTextBlock       text;
-    XawTextPosition    left, right;
-    char               buffer[BUFSIZ];
-    char               *string, rbuffer[32];
-
-    va_start(va, format);
-    size = vsnprintf(buffer, sizeof(buffer), format, va);
-    va_end(va);
-
-    /* Should never happen... */
-    if (size >= sizeof(buffer)) {
-       strcpy(buffer + sizeof(buffer) - 5, "...\n");
-       size = sizeof(buffer) - 1;
-    }
-    else if (size) {
-       left = right = XawTextSourceScan(XawTextGetSource(messwidget),
-                                        0, XawstAll, XawsdRight, 1, True);
-
-       if (left == info.last &&
-           info.buffer &&
-           strcmp(buffer, info.buffer) == 0) {
-           string = rbuffer;
-           if (info.repeat == 1)
-               left -= info.buffer[strlen(info.buffer) - 1] == '\n';
-           else
-               left -= info.length;
-           size = info.length = XmuSnprintf(rbuffer, sizeof(rbuffer),
-                                            " [%d times]\n", ++info.repeat);
-       }
-       else {
-           string = buffer;
-           if (size >= info.size)
-               info.buffer = XtMalloc(size + 1);
-           strcpy(info.buffer, buffer);
-           info.repeat = 1;
-       }
-
-       text.length = size;
-       text.ptr = string;
-       text.firstPos = 0;
-       text.format = FMT8BIT;
-
-       XawTextReplace(messwidget, left, right, &text);
-
-       info.last = left + text.length;
-       XawTextSetInsertionPoint(messwidget, info.last);
-    }
-}
-
-Widget
-MakeCommandButton(Widget box, char *name, XtCallbackProc function)
-{
-  Widget w = XtCreateManagedWidget(name, commandWidgetClass, box, NULL, ZERO);
-  if (function != NULL)
-    XtAddCallback(w, XtNcallback, function, (caddr_t) NULL);
-  else
-    XtVaSetValues(w, XtNsensitive, False, NULL);
-  return w;
-}
-
-Widget 
-MakeStringBox(Widget parent, String name, String string)
-{
-  Arg args[5];
-  Cardinal numargs = 0;
-  Widget StringW;
-
-  XtSetArg(args[numargs], XtNeditType, XawtextEdit); numargs++;
-  XtSetArg(args[numargs], XtNstring, string); numargs++;
-
-  StringW = XtCreateManagedWidget(name, asciiTextWidgetClass, 
-                                 parent, args, numargs);
-  return(StringW);  
-}
-/*     Function Name: GetString
- *     Description: retrieves the string from a asciiText widget.
- *     Arguments: w - the ascii text widget.
- *     Returns: the filename.
- */
-
-String
-GetString(Widget w)
-{
-  String str;
-  Arg arglist[1];
-  
-  XtSetArg(arglist[0], XtNstring, &str);
-  XtGetValues( w, arglist, ONE);
-  return(str);
-}
-
-/*     Function Name: MaybeCreateFile
- *     Description: Checks to see if file exists, and if not, creates it.
- *     Arguments: file - name of file to check.
- *     Returns: permissions status
- */
-
-FileAccess
-MaybeCreateFile(char *file)
-{
-    Boolean exists;
-    int fd;
-
-    if (access(file, F_OK) != 0) {
-       fd = creat(file, 0666);
-       if (fd != -1)
-           close(fd);
-    }
-
-    return(CheckFilePermissions(file, &exists));
-}
-
-
-FileAccess
-CheckFilePermissions(char *file, Boolean *exists)
-{
-    char temp[BUFSIZ], *ptr;
-
-    if (access(file, F_OK) == 0) {
-       *exists = TRUE;
-
-       if (access(file, R_OK) != 0) 
-           return(NO_READ);
-       
-       if (access(file, R_OK | W_OK) == 0) 
-           return(WRITE_OK);
-       return(READ_OK);
-    }
-
-    *exists = FALSE;
-    
-    strncpy(temp, file, sizeof(temp) - 1);
-    temp[sizeof(temp) - 1] = '\0';
-    if ( (ptr = rindex(temp, '/')) == NULL) 
-       strcpy(temp, ".");
-    else 
-       *ptr = '\0';
-    
-    if (access(temp, R_OK | W_OK | X_OK) == 0)
-       return(WRITE_OK);
-    return(NO_READ);
-}
-
-xedit_flist_item *
-AddTextSource(Widget source, char *name, char *filename, int flags,
-             FileAccess file_access)
-{
-    xedit_flist_item *item;
-    char *wid_name;
-
-    item = (xedit_flist_item*)XtMalloc(sizeof(xedit_flist_item));
-    item->source = source;
-    item->name = XtNewString(name);
-    item->filename = XtNewString(filename);
-    item->flags = flags;
-    item->file_access = file_access;
-    item->display_position = item->insert_position = 0;
-    item->mode = 0;
-    item->mtime = 0;
-    item->properties = NULL;
-    item->xldata = NULL;
-    /* Try to load associated tags file */
-    SearchTagsFile(item);
-
-    flist.itens = (xedit_flist_item**)
-       XtRealloc((char*)flist.itens, sizeof(xedit_flist_item*)
-                 * (flist.num_itens + 1));
-
-    flist.itens[flist.num_itens++] = item;
-
-    if (!flist.popup) {
-       flist.popup = XtCreatePopupShell("fileMenu", simpleMenuWidgetClass,
-                                        topwindow, NULL, 0);
-       /* XXX hack: this don't allow setting the geometry of the popup widget
-        * as it will override any settings when a menu entry is inserted
-        * or deleted, but saves us the trouble generated by a resource
-        * setting like: '*geometry: <width>x<height>'
-        */
-       XtRealizeWidget(flist.popup);
-    }
-    if ((wid_name = strrchr(item->name, '/')) == NULL)
-       wid_name = item->name;
-    else
-       ++wid_name;
-    item->sme = XtVaCreateManagedWidget(wid_name, smeBSBObjectClass,
-                                       flist.popup, XtNlabel, item->filename,
-                                       NULL, NULL);
-    XtAddCallback(item->sme, XtNcallback,
-                 SwitchSourceCallback, (XtPointer)item);
-
-    SetTextProperties(item);
-
-    return (item);
-}
-
-Bool
-KillTextSource(xedit_flist_item *item)
-{
-    xedit_flist_item *nitem = NULL;
-    unsigned idx, i;
-    Arg targs[3];
-    Cardinal tnum_args;
-    Arg largs[2];
-    Cardinal lnum_args;
-    char label_buf[BUFSIZ];
-
-    for (idx = 0; idx < flist.num_itens; idx++)
-       if (flist.itens[idx] == item) {
-           if (idx + 1 < flist.num_itens)
-               nitem = flist.itens[idx + 1];
-           else if (idx >= 1)
-               nitem = flist.itens[idx - 1];
-           break;
-       }
-
-    if (idx >= flist.num_itens)
-       return (False);
-
-    flist.current = nitem;
-    if (item == flist.other)
-       flist.other = NULL;
-
-    if (nitem->file_access == READ_OK)
-       XmuSnprintf(label_buf, sizeof(label_buf), "%s       READ ONLY",
-                   nitem->name);
-    else if (nitem->file_access == WRITE_OK)
-       XmuSnprintf(label_buf, sizeof(label_buf), "%s       Read - Write",
-                   nitem->name);
-    lnum_args = 0;
-    XtSetArg(largs[lnum_args], XtNlabel, label_buf);           ++lnum_args;
-    if (nitem->flags & CHANGED_BIT)
-       XtSetArg(largs[lnum_args], XtNleftBitmap, flist.pixmap);
-    else
-       XtSetArg(largs[lnum_args], XtNleftBitmap, None);
-    ++lnum_args;
-
-    tnum_args = 0;
-    XtSetArg(targs[tnum_args], XtNtextSource,
-            nitem->source);                            ++tnum_args;
-    XtSetArg(targs[tnum_args], XtNdisplayPosition,
-            nitem->display_position);                  ++tnum_args;
-    XtSetArg(targs[tnum_args], XtNinsertPosition,
-            nitem->insert_position);                   ++tnum_args;
-    for (i = 0; i < 3; i++)
-       if (XawTextGetSource(texts[i]) == item->source) {
-           XtSetValues(labels[i], largs, lnum_args);
-           XawTextDisableRedisplay(texts[i]);
-           XtSetValues(texts[i], targs, tnum_args);
-
-           UpdateTextProperties(0);
-
-           _XawTextShowPosition((TextWidget)texts[i]);
-           XawTextEnableRedisplay(texts[i]);
-           if (texts[i] == textwindow) {
-               Arg args[1];
-
-               if (nitem->source != scratch)
-                   XtSetArg(args[0], XtNstring, nitem->name);
-               else
-                   XtSetArg(args[0], XtNstring, NULL);
-               XtSetValues(filenamewindow, args, 1);
-           }
-       }
-
-    UnsetTextProperties(item);
-    XtFree(item->name);
-    XtFree(item->filename);
-    XtDestroyWidget(item->sme);
-    XtDestroyWidget(item->source);
-    XtFree((char*)item);
-
-    if (idx < flist.num_itens - 1)
-       memmove(&flist.itens[idx], &flist.itens[idx + 1],
-               (flist.num_itens - idx) * sizeof(xedit_flist_item*));
-
-    --flist.num_itens;
-
-    return (True);
-}
-
-xedit_flist_item *
-FindTextSource(Widget source, char *filename)
-{
-    unsigned i;
-
-    if (source) {
-       for (i = 0; i < flist.num_itens; i++)
-           if (flist.itens[i]->source == source)
-               return (flist.itens[i]);
-    }
-    else if (filename) {
-       for (i = 0; i < flist.num_itens; i++)
-           if (strcmp(flist.itens[i]->filename, filename) == 0)
-               return (flist.itens[i]);
-    }
-
-    return (NULL);
-}
-
-void
-SwitchTextSource(xedit_flist_item *item)
-{
-    Arg args[4];
-    Cardinal num_args;
-    char label_buf[BUFSIZ];
-    xedit_flist_item *old_item =
-       FindTextSource(XawTextGetSource(textwindow), NULL);
-    int i;
-
-    if (old_item != item)
-       flist.other = old_item;
-    flist.current = item;
-
-    XawTextDisableRedisplay(textwindow);
-    if (item->file_access == READ_OK)
-       XmuSnprintf(label_buf, sizeof(label_buf), "%s       READ ONLY",
-                   item->name);
-    else if (item->file_access == WRITE_OK)
-       XmuSnprintf(label_buf, sizeof(label_buf), "%s       Read - Write",
-                   item->name);
-    num_args = 0;
-    XtSetArg(args[num_args], XtNlabel, label_buf);             ++num_args;
-    if (item->flags & CHANGED_BIT)
-       XtSetArg(args[num_args], XtNleftBitmap, flist.pixmap);
-    else
-       XtSetArg(args[num_args], XtNleftBitmap, None);
-    ++num_args;
-    XtSetValues(labelwindow, args, num_args);
-
-    for (i = 0; i < 3; i++)
-       if (XawTextGetSource(texts[i]) == item->source
-           && XtIsManaged(texts[i]))
-           break;
-
-    if (i < 3) {
-       num_args = 0;
-       XtSetArg(args[num_args], XtNdisplayPosition,
-            &(item->display_position));                        ++num_args;
-       XtSetArg(args[num_args], XtNinsertPosition,
-            &(item->insert_position));                         ++num_args;
-       XtGetValues(texts[i], args, num_args);
-    }
-    if (old_item != item) {
-       int count, idx = 0;
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNdisplayPosition,
-            &(old_item->display_position));                    ++num_args;
-       XtSetArg(args[num_args], XtNinsertPosition,
-            &(old_item->insert_position));                     ++num_args;
-       XtGetValues(textwindow, args, num_args);
-
-       for (count = 0, i = 0; i < 3; i++)
-           if (XawTextGetSource(texts[i]) == old_item->source
-               && XtIsManaged(texts[i])) {
-               if (++count > 1)
-                   break;
-               idx = i;
-           }
-
-       if (count == 1) {
-           num_args = 0;
-           XtSetArg(args[num_args], XtNdisplayPosition,
-                    &(old_item->display_position));            ++num_args;
-               XtSetArg(args[num_args], XtNinsertPosition,
-                    &(old_item->insert_position));             ++num_args;
-           XtGetValues(texts[idx], args, num_args);
-       }
-    }
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNtextSource, item->source);     ++num_args;
-    XtSetArg(args[num_args], XtNdisplayPosition, item->display_position);
-    ++num_args;
-    XtSetArg(args[num_args], XtNinsertPosition, item->insert_position);
-    ++num_args;
-    if (item->flags & WRAP_BIT)
-       XtSetArg(args[num_args], XtNwrap, item->wrap);
-    else
-       XtSetArg(args[num_args], XtNwrap, wrapmodes[WindowIndex(textwindow)]);
-    ++num_args;
-    XtSetValues(textwindow, args, num_args);
-
-    UpdateTextProperties(0);
-
-    _XawTextShowPosition((TextWidget)textwindow);
-    XawTextEnableRedisplay(textwindow);
-
-    num_args = 0;
-    if (item->source != scratch) {
-       XtSetArg(args[num_args], XtNstring, item->name);        ++num_args;
-    }
-    else {
-       XtSetArg(args[num_args], XtNstring, NULL);              ++num_args;
-    }
-    XtSetValues(filenamewindow, args, num_args);
-    /* XXX This probably should be done by the TextWidget, i.e. notice
-     * if the cursor became inivisible due to an horizontal scroll */
-    _XawTextShowPosition((TextWidget)filenamewindow);
-}
-
-char *
-ResolveName(char *filename)
-{
-#ifndef __UNIXOS2__
-    static char *name;
-    char       *result, *tmp = name;
-#endif
-
-    if (filename == NULL)
-       filename = GetString(filenamewindow);
-
-#ifndef __UNIXOS2__
-    /* Ensure not passing the same pointer again to realpath */
-    name = XtMalloc(BUFSIZ);
-    XtFree(tmp);
-    result = realpath(filename, name);
-
-    if (result == NULL && errno == ENOENT) {
-       int     length;
-       char    *dir, *file;
-
-       length = strlen(filename);
-       tmp = dir = XtMalloc(length + 1);
-       strcpy(dir, filename);
-
-       file = basename(filename);
-       dir = dirname(tmp);
-
-       /* Creating a new file? */
-       if (dir && file && strcmp(dir, file) &&
-           access(dir, F_OK) == 0 &&
-           (result = realpath(dir, name)) == name) {
-           int length = strlen(result);
-
-           XmuSnprintf(result + length, BUFSIZ - length, "%s%s",
-                       dir[length - 1] == '/' ? "" : "/", file);
-       }
-
-       XtFree(tmp);
-    }
-
-    return (result);
-#else
-    return filename;
-#endif
-}
-
-static void
-ChangeTextWindow(Widget w)
-{
-    Arg args[1];
-
-    if (textwindow != w) {
-       xedit_flist_item *other, *current;
-
-       other = FindTextSource(XawTextGetSource(textwindow), NULL);
-       current = FindTextSource(XawTextGetSource(w), NULL);
-       if (other != current)
-           flist.other = other;
-       if (current)
-           flist.current = current;
-       XtSetArg(args[0], XtNdisplayCaret, False);
-       XtSetValues(textwindow, args, 1);
-       XtSetArg(args[0], XtNdisplayCaret, True);
-       XtSetValues(w, args, 1);
-       XawTextUnsetSelection(textwindow);
-       textwindow = w;
-    }
-}
-
-/*ARGSUSED*/
-void
-XeditFocus(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Arg args[1];
-    xedit_flist_item *item;
-    int idx = WindowIndex(w);
-
-    XtSetKeyboardFocus(topwindow, w);
-
-    ChangeTextWindow(w);
-
-    labelwindow = labels[idx];
-    item = FindTextSource(XawTextGetSource(textwindow), NULL);
-
-    if (item->source != scratch)
-       XtSetArg(args[0], XtNstring, item->name);
-    else
-       XtSetArg(args[0], XtNstring, NULL);
-
-    XtSetValues(filenamewindow, args, 1);
-
-    line_edit = False;
-}
-
-void
-PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Cardinal n_params = num_params ? *num_params : 0;
-
-    if (*num_params && XmuCompareISOLatin1(*params, "editMenu") == 0)
-       SetEditMenu();
-
-    XtCallActionProc(w, "XawPositionSimpleMenu", event, params, n_params);
-    XtCallActionProc(w, "XtMenuPopup", event, params, n_params);
-}
-
-/*ARGSUSED*/
-static void
-SwitchSourceCallback(Widget entry, XtPointer client_data, XtPointer call_data)
-{
-    SwitchTextSource((xedit_flist_item*)client_data);
-}
-
-static int
-WindowIndex(Widget w)
-{
-    int i;
-
-    for (i = 0; i < 3; i++)
-       if (texts[i] == w)
-           return (i);
-
-    return (-1);
-}
-
-void
-DeleteWindow(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Widget unmanage[2];
-    int idx = WindowIndex(w), uidx;
-    Bool current = False;
-
-    if (*num_params == 1 && (*params[0] == 'd' || *params[0] == 'D')) {
-       if (XtIsManaged(XtParent(dirwindow)))
-           SwitchDirWindow(False);
-       return;
-    }
-
-    if (idx < 0 || (!XtIsManaged(texts[1]) && !XtIsManaged(texts[2]))) {
-       Feep();
-       return;
-    }
-
-    if (num_params && *num_params == 1 &&
-       (*params[0] == 'o' || *params[0] == 'O'))
-       current = True;
-
-    uidx = XtIsManaged(texts[1]) ? 1 : 2;
-
-    unmanage[0] = forms[uidx];
-    unmanage[1] = texts[uidx];
-    XtUnmanageChildren(unmanage, 2);
-
-    if (!XtIsManaged(texts[2]))
-       XtUnmanageChild(vpanes[1]);
-
-    if ((!current && idx == 0) || (current && idx != 0)) {
-       Arg args[4];
-       Cardinal num_args;
-       String label_str;
-       Pixmap label_pix;
-       XawTextPosition d_pos, i_pos;
-       Widget source;
-       xedit_flist_item *item;
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNlabel, &label_str);         ++num_args;
-       XtSetArg(args[num_args], XtNleftBitmap, &label_pix);    ++num_args;
-       XtGetValues(labels[current ? idx : uidx], args, num_args);
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNlabel, label_str);          ++num_args;
-       XtSetArg(args[num_args], XtNleftBitmap, label_pix);     ++num_args;
-       XtSetValues(labels[0], args, num_args);
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNdisplayPosition, &d_pos);   ++num_args;
-       XtSetArg(args[num_args], XtNinsertPosition, &i_pos);    ++num_args;
-       XtSetArg(args[num_args], XtNtextSource, &source);       ++num_args;
-       XtGetValues(texts[current ? idx : uidx], args, num_args);
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNdisplayPosition, d_pos);    ++num_args;
-       XtSetArg(args[num_args], XtNinsertPosition, i_pos);     ++num_args;
-       XtSetArg(args[num_args], XtNtextSource, source);        ++num_args;
-
-       item = FindTextSource(source, NULL);
-       if (item && (item->flags & WRAP_BIT))
-           XtSetArg(args[num_args], XtNwrap, item->wrap);
-       else
-           XtSetArg(args[num_args], XtNwrap,
-                    wrapmodes[WindowIndex(texts[current ? idx : uidx])]);
-       XtSetValues(texts[0], args, num_args);
-
-       UpdateTextProperties(0);
-    }
-
-    labelwindow = labels[0];
-    XeditFocus(texts[0], NULL, NULL, NULL);
-}
-
-void
-SwitchSource(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    int idx = WindowIndex(w);
-    Widget source;
-    int i;
-
-    if (idx < 0 || textwindow != texts[idx]) {
-       Feep();
-       return;
-    }
-
-    source = XawTextGetSource(textwindow);
-
-    for (i = 0; i < flist.num_itens; i++)
-       if (flist.itens[i]->source == source) {
-           if (i > 0 && i == flist.num_itens - 1)
-               i = 0;
-           else if (i < flist.num_itens - 1)
-               ++i;
-           else {
-               Feep();
-               return;
-           }
-           break;
-       }
-
-    if (i >= flist.num_itens) {
-       Feep();
-       return;
-    }
-
-    SwitchTextSource(flist.itens[i]);
-}
-
-void
-OtherWindow(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    int oidx, idx = WindowIndex(w);
-
-    if (idx < 0 || (!XtIsManaged(texts[1]) && !XtIsManaged(texts[2]))) {
-       Feep();
-       return;
-    }
-
-    if (idx == 0)
-       oidx = XtIsManaged(texts[1]) ? 1 : 2;
-    else
-       oidx = 0;
-
-    XeditFocus(texts[oidx], event, params, num_params);
-}
-
-void
-SplitWindow(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Arg args[6];
-    Cardinal num_args;
-    Widget nlabel, ntext, source, sink, manage[2];
-    Dimension width, height, bw;
-    XawTextPosition i_pos, d_pos;
-    String label_str;
-    Pixmap label_pix;
-    int idx = WindowIndex(w), dimension;
-    Bool vert = True;
-    xedit_flist_item *item;
-
-    if (num_params && *num_params == 1
-       && (*params[0] == 'h' || *params[0] == 'H'))
-       vert = False;
-
-    if (idx < 0
-       || (vert && XtIsManaged(texts[1]))
-       || (!vert && XtIsManaged(vpanes[1]))) {
-       Feep();
-       return;
-    }
-
-    if (vert) {
-       nlabel = labels[1];
-       ntext = texts[1];
-    }
-    else {
-       nlabel = labels[2];
-       ntext = texts[2];
-    }
-    ChangeTextWindow(texts[idx]);
-    labelwindow = labels[idx];
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNinsertPosition, &i_pos);       ++num_args;
-    XtSetArg(args[num_args], XtNdisplayPosition, &d_pos);      ++num_args;
-    XtSetArg(args[num_args], XtNtextSource, &source);          ++num_args;
-    XtSetArg(args[num_args], XtNtextSink, &sink);              ++num_args;
-    XtSetArg(args[num_args], XtNwidth, &width);                        ++num_args;
-    XtSetArg(args[num_args], XtNheight, &height);              ++num_args;
-    XtGetValues(w, args, num_args);
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNinternalBorderWidth, &bw);     ++num_args;
-    XtGetValues(XtParent(w), args, num_args);
-
-    if (vert) {
-       dimension = (int)height - (((int)bw) << 1);
-       num_args = 0;
-       XtSetArg(args[num_args], XtNheight, &height);           ++num_args;
-       XtGetValues(labelwindow, args, num_args);
-       dimension -= (int)height;
-    }
-    else
-       dimension = (int)width - (int)bw;
-
-    dimension >>= 1;
-
-    if (dimension <= 0 || dimension < XawTextSinkMaxHeight(sink, 3)) {
-       Feep();
-       return;
-    }
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNlabel, &label_str);            ++num_args;
-    XtSetArg(args[num_args], XtNleftBitmap, &label_pix);       ++num_args;
-    XtGetValues(labelwindow, args, num_args);
-
-    if (vert) {
-       if (XtIsManaged(texts[2])) {
-           manage[0] = forms[2];
-           manage[1] = texts[2];
-           XtUnmanageChildren(manage, 2);
-           XtUnmanageChild(vpanes[1]);
-       }
-    }
-    else {
-       if (XtIsManaged(texts[1])) {
-           manage[0] = forms[1];
-           manage[1] = texts[1];
-           XtUnmanageChildren(manage, 2);
-       }
-    }
-
-    XawTextDisableRedisplay(texts[0]);
-    XawTextDisableRedisplay(ntext);
-    if (textwindow == texts[1] || textwindow == texts[2]) {
-       num_args = 0;
-       XtSetArg(args[num_args], XtNdisplayPosition, d_pos);    ++num_args;
-       XtSetArg(args[num_args], XtNinsertPosition, i_pos);     ++num_args;
-       XtSetArg(args[num_args], XtNtextSource, source);        ++num_args;
-       ChangeTextWindow(texts[0]);
-       XtSetValues(textwindow, args, num_args);
-       XtSetKeyboardFocus(topwindow, textwindow);
-
-       num_args = 0;
-       XtSetArg(args[num_args], XtNlabel, label_str);          ++num_args;
-       XtSetArg(args[num_args], XtNleftBitmap, label_pix);     ++num_args;
-       XtSetValues(labelwindow = labels[0], args, num_args);
-    }
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNlabel, label_str);             ++num_args;
-    XtSetArg(args[num_args], XtNleftBitmap, label_pix);                ++num_args;
-    XtSetValues(nlabel, args, num_args);
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNmin, dimension);               ++num_args;
-    XtSetArg(args[num_args], XtNmax, dimension);               ++num_args;
-    if (!vert)
-       XtSetValues(vpanes[1], args, num_args);
-    else
-       XtSetValues(ntext, args, num_args);
-
-    manage[0] = XtParent(nlabel);
-    manage[1] = ntext;
-    XtManageChildren(manage, 2);
-    if (!vert)
-       XtManageChild(vpanes[1]);
-
-    num_args = 0;
-    XtSetArg(args[num_args], XtNmin, 1);                       ++num_args;
-    XtSetArg(args[num_args], XtNmax, 65535);                   ++num_args;
-    if (!vert) {
-       XtSetValues(vpanes[1], args, num_args);
-       num_args = 0;
-    }
-    XtSetArg(args[num_args], XtNtextSource, source);           ++num_args;
-    XtSetArg(args[num_args], XtNdisplayPosition, d_pos);       ++num_args;
-    XtSetArg(args[num_args], XtNinsertPosition, i_pos);                ++num_args;
-    item = FindTextSource(source, NULL);
-    if (item && (item->flags & WRAP_BIT))
-       XtSetArg(args[num_args], XtNwrap, item->wrap);
-    else
-       XtSetArg(args[num_args], XtNwrap, wrapmodes[WindowIndex(ntext)]);
-    ++num_args;
-    XtSetValues(ntext, args, num_args);
-
-    UpdateTextProperties(0);
-
-    _XawTextShowPosition((TextWidget)textwindow);
-    _XawTextShowPosition((TextWidget)ntext);
-
-    XawTextEnableRedisplay(textwindow);
-    XawTextEnableRedisplay(ntext);
-}
-
-void
-SwitchDirWindow(Bool show)
-{
-    static int map;    /* There must be one instance of this
-                        * variable per top level window */
-    Widget manage[2];
-
-    if (!show && XtIsManaged(XtParent(dirwindow))) {
-       manage[0] = dirlabel;
-       manage[1] = XtParent(dirwindow);
-       XtUnmanageChildren(manage, 2);
-       XtUnmanageChild(vpanes[1]);
-
-       XtManageChild(vpanes[0]);
-       if (map == 2) {
-           Arg args[2];
-           Dimension width, bw;
-
-           XtSetArg(args[0], XtNwidth, &width);
-           XtGetValues(texts[0], args, 1);
-           XtSetArg(args[0], XtNinternalBorderWidth, &bw);
-           XtGetValues(XtParent(texts[0]), args, 1);
-           width = (width - bw) >> 1;
-           XtSetArg(args[0], XtNmin, width);
-           XtSetArg(args[0], XtNmax, width);
-           XtSetValues(vpanes[0], args, 1);
-           manage[0] = forms[2];
-           manage[1] = texts[2];
-           XtManageChildren(manage, 2);
-           XtManageChild(vpanes[1]);
-           XtSetArg(args[0], XtNmin, 1);
-           XtSetArg(args[0], XtNmax, 65535);
-           XtSetValues(vpanes[0], args, 1);
-       }
-    }
-    else if (show && !XtIsManaged(XtParent(dirwindow))) {
-       XtUnmanageChild(vpanes[0]);
-       if (XtIsManaged(texts[2])) {
-           manage[0] = forms[2];
-           manage[1] = texts[2];
-           XtUnmanageChildren(manage, 2);
-           map = 2;
-       }
-       else {
-           map = XtIsManaged(texts[1]);
-           XtManageChild(vpanes[1]);
-       }
-
-       manage[0] = dirlabel;
-       manage[1] = XtParent(dirwindow);
-       XtManageChildren(manage, 2);
-    }
-}
-
-/*ARGSUSED*/
-void
-DirWindow(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-    Arg args[1];
-    char path[BUFSIZ + 1], *dir;
-
-    if (XtIsManaged(XtParent(dirwindow)))
-       return;
-
-    if (*num_params == 1) {
-       strncpy(path, params[0], sizeof(path) - 2);
-       path[sizeof(path) - 2] = '\0';
-    }
-    else {
-       char *slash;
-       xedit_flist_item *item = FindTextSource(XawTextGetSource(textwindow), NULL);
-
-       if (item == NULL || item->source == scratch
-           || (slash = rindex(item->filename, '/')) == NULL)
-           strcpy(path, "./");
-       else {
-           int len = slash - item->filename + 1;
-
-           if (len > sizeof(path) - 2)
-               len = sizeof(path) - 2;
-           strncpy(path, item->filename, len);
-           path[len] = '\0';
-       }
-    }
-
-    dir = ResolveName(path);
-    if (dir != NULL) {
-       strncpy(path, dir, sizeof(path) - 2);
-       path[sizeof(path) - 2] = '\0';
-       if (*path && path[strlen(path) - 1] != '/')
-           strcat(path, "/");
-
-       XtSetArg(args[0], XtNlabel, "");
-       XtSetValues(dirlabel, args, 1);
-
-       SwitchDirWindow(True);
-       DirWindowCB(dirwindow, path, NULL);
-    }
-    else
-       Feep();
-}
diff --git a/xedit/util.h b/xedit/util.h
deleted file mode 100644 (file)
index 9717589..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2007,2008 Paulo Cesar Pereira de Andrade
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Paulo Cesar Pereira de Andrade
- */
-
-/* Generic hash table */
-
-#ifndef _util_h
-#define _util_h
-
-/*
- * Types
- */
-typedef struct _hash_key       hash_key;
-typedef struct _hash_entry     hash_entry;
-typedef struct _hash_table     hash_table;
-typedef int (*hash_compare)(hash_key *left, hash_key *right);
-
-struct _hash_key {
-    char               *value;
-    unsigned int       length;
-};
-
-struct _hash_entry {
-    hash_key           *key;
-    hash_entry         *next;
-};
-
-struct _hash_table {
-    hash_entry         **entries;
-    unsigned int       count;          /* length of entries */
-    unsigned int       length;         /* sum of entries */
-    hash_compare       compare;
-
-    struct {
-       int             offset;
-       hash_entry      *entry;
-    } iter;
-};
-
-/*
- * Prototypes
- */
-hash_table *hash_new(unsigned int length, hash_compare compare);
-hash_entry *hash_put(hash_table *hash, hash_entry *entry);
-hash_entry *hash_get(hash_table *hash, hash_key *name);
-hash_entry * hash_check(hash_table *hash, char *name, unsigned int length);
-void hash_rem(hash_table *hash, hash_entry *entry);
-/* Removes from hash table but doesn't release any memory */
-hash_entry *hash_rem_no_free(hash_table *hash, hash_entry *entry);
-void hash_rehash(hash_table *hash, unsigned int length);
-hash_entry *hash_iter_first(hash_table *hash);
-hash_entry *hash_iter_next(hash_table *hash);
-
-/* Frees all data. When casting to another type, use the
- * iterator to free extra data */
-void hash_clr(hash_table *hash);
-void hash_del(hash_table *hash);
-
-#endif /* _util_h */
diff --git a/xedit/xedit.c b/xedit/xedit.c
deleted file mode 100644 (file)
index 0b49226..0000000
+++ /dev/null
@@ -1,677 +0,0 @@
-/* $XConsortium: xedit.c,v 1.28 94/03/26 17:06:28 rws Exp $ */
-/*
- *                       COPYRIGHT 1987
- *                DIGITAL EQUIPMENT CORPORATION
- *                    MAYNARD, MASSACHUSETTS
- *                     ALL RIGHTS RESERVED.
- *
- * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
- * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
- * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
- * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
- *
- * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
- * APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
- * SET FORTH ABOVE.
- *
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Digital Equipment Corporation not be 
- * used in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission.
- */
-/* $XFree86: xc/programs/xedit/xedit.c,v 1.17 2002/09/22 07:09:05 paulo Exp $ */
-
-#include "xedit.h"
-#include <X11/Xaw/SmeBSB.h>
-#include <time.h>
-#include <sys/stat.h>
-#include <X11/CoreP.h>
-
-#include <stdlib.h> 
-
-#define randomize()    srand((unsigned)time((time_t*)NULL))
-
-static XtActionsRec actions[] = {
-{"quit", QuitAction},
-{"save-file", SaveFile},
-{"load-file", LoadFile},
-#ifdef INCLUDE_XPRINT_SUPPORT
-{"print-file", PrintFile},
-#endif /* INCLUDE_XPRINT_SUPPORT */
-{"find-file", FindFile},
-{"cancel-find-file", CancelFindFile},
-{"file-completion", FileCompletion},
-{"popup-menu", PopupMenu},
-{"kill-file", KillFile},
-{"split-window", SplitWindow},
-{"dir-window", DirWindow},
-{"delete-window", DeleteWindow},
-{"xedit-focus", XeditFocus},
-{"other-window", OtherWindow},
-{"switch-source", SwitchSource},
-#ifndef __UNIXOS2__
-{"lisp-eval", XeditLispEval},
-{"xedit-print-lisp-eval", XeditPrintLispEval},
-{"xedit-keyboard-reset",XeditKeyboardReset},
-#endif
-{"ispell", IspellAction},
-{"line-edit", LineEditAction},
-{"tags", TagsAction}
-};
-
-#define DEF_HINT_INTERVAL      300     /* in seconds, 5 minutes */
-
-static Atom wm_delete_window;
-static Widget hintswindow;
-static int position_format_mask;
-static XawTextPositionInfo infos[3];
-
-Widget topwindow, textwindow, messwidget, labelwindow, filenamewindow;
-Widget scratch, hpane, vpanes[2], labels[3], texts[3], forms[3], positions[3];
-Widget options_popup, dirlabel, dirwindow;
-Boolean international;
-Boolean line_edit;
-XawTextWrapMode wrapmodes[3];
-
-extern void ResetSourceChanged(xedit_flist_item*);
-
-static void makeButtonsAndBoxes(Widget);
-static void HintsTimer(XtPointer, XtIntervalId*);
-static void PositionChanged(Widget, XtPointer, XtPointer);
-static void StartFormatPosition(void);
-static void StartHints(void);
-
-Display *CurDpy;
-
-struct _app_resources app_resources;
-struct _xedit_flist flist;
-
-#define Offset(field) XtOffsetOf(struct _app_resources, field)
-
-static XtResource resources[] = {
-   {"enableBackups", "EnableBackups", XtRBoolean, sizeof(Boolean),
-         Offset(enableBackups), XtRImmediate, FALSE},
-   {"backupNamePrefix", "BackupNamePrefix", XtRString, sizeof(char *),
-         Offset(backupNamePrefix),XtRString, ""},
-   {"backupNameSuffix", "BackupNameSuffix", XtRString, sizeof(char *),
-         Offset(backupNameSuffix),XtRString, ".BAK"},
-   {"hints", "Hint", XtRString, sizeof(char *),
-        Offset(hints.resource), XtRImmediate, NULL},
-   {"hintsInterval", XtCInterval, XtRInt, sizeof(long),
-        Offset(hints.interval), XtRImmediate, (XtPointer)DEF_HINT_INTERVAL},
-   {"changedBitmap", XtRBitmap, XtRString, sizeof(char*),
-        Offset(changed_pixmap_name), XtRString, "dot"},
-   {"positionFormat", "Format", XtRString, sizeof(char*),
-        Offset(position_format), XtRString, "L%l"},
-   {"autoReplace", "Replace", XtRString, sizeof(char*),
-        Offset(auto_replace), XtRImmediate, NULL},
-   {"tagsName", "TagsName", XtRString, sizeof(char *),
-         Offset(tagsName), XtRString, "tags"},
-   {"loadTags", "LoadTags", XtRBoolean, sizeof(Boolean),
-        Offset(loadTags), XtRImmediate, (XtPointer)TRUE},
-};
-
-#undef Offset
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-String fallback_resources[] = {
-    "*international:     True", /* set this globally for ALL widgets to avoid wiered crashes */
-    NULL
-};
-#endif
-
-int
-main(int argc, char *argv[])
-{
-    Boolean            exists;
-    char               *filename;
-    FileAccess         file_access;
-    Widget             source;
-    XtAppContext       appcon;
-    unsigned int       i, num_loaded, lineno;
-
-    num_loaded = lineno = 0;
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-    XtSetLanguageProc(NULL, NULL, NULL);
-#endif
-    topwindow = XtAppInitialize(&appcon, "Xedit", NULL, 0, &argc, argv,
-#ifdef INCLUDE_XPRINT_SUPPORT
-                               fallback_resources,
-#else
-                               NULL,
-#endif
-                               NULL, 0);
-
-    XtAppAddActions(appcon, actions, XtNumber(actions));
-    XtOverrideTranslations(topwindow,
-                          XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()"));
-
-    XtGetApplicationResources(topwindow, (XtPointer) &app_resources, resources,
-                             XtNumber(resources), NULL, 0);
-
-    CurDpy = XtDisplay(topwindow);
-    XawSimpleMenuAddGlobalActions(appcon);
-    XtRegisterGrabAction(PopupMenu, True,
-                        ButtonPressMask | ButtonReleaseMask,
-                        GrabModeAsync, GrabModeAsync);
-
-    makeButtonsAndBoxes(topwindow);
-
-    StartHints();
-    StartFormatPosition();
-    (void)StartHooks(appcon);
-    if (position_format_mask == 0) {
-       for (i = 0; i < 3; i++)
-           XtRemoveCallback(texts[i], XtNpositionCallback,
-                            PositionChanged, NULL);
-    }
-    XtRealizeWidget(topwindow);
-
-#ifndef __UNIXOS2__
-    XeditLispInitialize();
-#endif
-
-    options_popup = XtCreatePopupShell("optionsMenu", simpleMenuWidgetClass,
-                                      topwindow, NULL, 0);
-    XtRealizeWidget(options_popup);
-    XtAddCallback(XtCreateManagedWidget("ispell", smeBSBObjectClass,
-                                       options_popup, NULL, 0),
-                 XtNcallback, IspellCallback, NULL);
-    CreateEditPopup();
-
-    wm_delete_window = XInternAtom(XtDisplay(topwindow), "WM_DELETE_WINDOW",
-                                  False);
-    (void)XSetWMProtocols(XtDisplay(topwindow), XtWindow(topwindow),
-                         &wm_delete_window, 1);
-
-    /* This first call is just to save the default font and colors */
-    UpdateTextProperties(0);
-
-    if (argc > 1) {
-       xedit_flist_item        *item;
-       Arg                     args[2];
-       unsigned int            num_args;
-
-       for (i = 1; i < argc; i++) {
-           struct stat st;
-
-           if (argv[i][0] == '+') {
-               char    *endptr;
-
-               lineno = strtol(argv[i], &endptr, 10);
-               /* Don't warn or anything about incorrect input? */
-               if (*endptr)
-                   lineno = 0;
-               continue;
-           }
-
-           filename = ResolveName(argv[i]);
-           if (filename == NULL || FindTextSource(NULL, filename) != NULL)
-               continue;
-
-           num_args = 0;
-           if (stat(filename, &st) == 0 && !S_ISREG(st.st_mode)) {
-               if (S_ISDIR(st.st_mode)) {
-                   if (!num_loaded) {
-                       char path[BUFSIZ + 1];
-
-                       strncpy(path, filename, sizeof(path) - 2);
-                       path[sizeof(path) - 2] = '\0';
-                       if (*path) {
-                           if (path[strlen(path) - 1] != '/')
-                               strcat(path, "/");
-                       }
-                       else
-                           strcpy(path, "./");
-                       XtSetArg(args[0], XtNlabel, "");
-                       XtSetValues(dirlabel, args, 1);
-                       SwitchDirWindow(True);
-                       DirWindowCB(dirwindow, path, NULL);
-                       ++num_loaded;
-                   }
-                   continue;
-               }
-           }
-
-           switch (file_access = CheckFilePermissions(filename, &exists)) {
-           case NO_READ:
-               if (exists)
-                   XeditPrintf("File %s exists, and could not be opened for "
-                               "reading.\n", argv[i]);
-               else
-                   XeditPrintf("File %s does not exist, and the directory "
-                               "could not be opened for writing.\n", argv[i]);
-               break;
-           case READ_OK:
-               XtSetArg(args[num_args], XtNeditType, XawtextRead); num_args++;
-               XeditPrintf("File %s opened READ ONLY.\n", argv[i]);
-               break;
-           case WRITE_OK:
-               XtSetArg(args[num_args], XtNeditType, XawtextEdit); num_args++;
-               XeditPrintf("File %s opened read - write.\n", argv[i]);
-               break;
-           }
-           if (file_access != NO_READ) {
-               int flags;
-
-               if (exists) {
-                   flags = EXISTS_BIT;
-                   XtSetArg(args[num_args], XtNstring, filename);num_args++;
-               }
-               else {
-                   flags = 0;
-                   XtSetArg(args[num_args], XtNstring, NULL);    num_args++;
-               }
-               source = XtVaCreateWidget("textSource", international ?
-                                         multiSrcObjectClass
-                                         : asciiSrcObjectClass, topwindow,
-                                         XtNtype, XawAsciiFile,
-                                         XtNeditType, XawtextEdit,
-                                         NULL, NULL);
-               XtSetValues(source, args, num_args);
-               item = AddTextSource(source, argv[i], filename,
-                                    flags, file_access);
-               XtAddCallback(item->source, XtNcallback, SourceChanged,
-                             (XtPointer)item);
-               if (exists && file_access == WRITE_OK) {
-                   item->mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
-                   item->mtime = st.st_mtime;
-               }
-               if (!num_loaded)
-                   SwitchTextSource(item);
-               ++num_loaded;
-               ResetSourceChanged(item);
-           }
-       }
-    }
-
-    if (!flist.pixmap && strlen(app_resources.changed_pixmap_name)) {
-       XrmValue from, to;
-
-       from.size = strlen(app_resources.changed_pixmap_name);
-       from.addr = app_resources.changed_pixmap_name;
-       to.size = sizeof(Pixmap);
-       to.addr = (XtPointer)&(flist.pixmap);
-
-       XtConvertAndStore(flist.popup, XtRString, &from, XtRBitmap, &to);
-    }
-
-    if (num_loaded == 0) {
-       XtSetKeyboardFocus(topwindow, filenamewindow);
-       XtVaSetValues(textwindow, XtNwrap, XawtextWrapLine, NULL);
-    }
-    else {
-       XtSetKeyboardFocus(topwindow, textwindow);
-       if (lineno) {
-           XawTextPosition position;
-
-           source = XawTextGetSource(textwindow);
-           position = RSCAN(XawTextGetInsertionPoint(textwindow),
-                            lineno, False);
-           position = LSCAN(position, 1, False);
-           XawTextSetInsertionPoint(textwindow, position);
-       }
-    }
-
-    XtAppMainLoop(appcon);
-    return EXIT_SUCCESS;
-}
-
-static void
-makeButtonsAndBoxes(Widget parent)
-{
-    Widget outer, b_row, viewport;
-    Arg arglist[10];
-    Cardinal num_args;
-    xedit_flist_item *item;
-    static char *labelWindow = "labelWindow", *editWindow = "editWindow";
-    static char *formWindow = "formWindow", *positionWindow = "positionWindow";
-
-    outer = XtCreateManagedWidget("paned", panedWidgetClass, parent,
-                                 NULL, ZERO);
-    b_row = XtCreateManagedWidget("buttons", panedWidgetClass, outer, NULL, ZERO);
-    {
-       MakeCommandButton(b_row, "quit", DoQuit);
-       MakeCommandButton(b_row, "save", DoSave);
-       MakeCommandButton(b_row, "load", DoLoad);
-#ifdef INCLUDE_XPRINT_SUPPORT
-       MakeCommandButton(b_row, "print", DoPrint);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-       filenamewindow = MakeStringBox(b_row, "filename", NULL);
-    }
-    hintswindow = XtCreateManagedWidget("bc_label", labelWidgetClass,
-                                       outer, NULL, ZERO);
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNeditType, XawtextEdit);             ++num_args;
-    messwidget = XtCreateManagedWidget("messageWindow", asciiTextWidgetClass,
-                                      outer, arglist, num_args);
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNorientation, XtorientHorizontal);   ++num_args;
-    hpane = XtCreateManagedWidget("hpane", panedWidgetClass, outer,
-                                 arglist, num_args);
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNorientation, XtorientVertical);     ++num_args;
-    vpanes[0] = XtCreateManagedWidget("vpane", panedWidgetClass, hpane,
-                                     arglist, num_args);
-    XtSetArg(arglist[num_args], XtNheight, 1);                         ++num_args;
-    XtSetArg(arglist[num_args], XtNwidth, 1);                          ++num_args;
-    vpanes[1] = XtCreateWidget("vpane", panedWidgetClass, hpane,
-                              arglist, num_args);
-
-    forms[0] = XtCreateManagedWidget(formWindow, formWidgetClass,
-                                    vpanes[0], NULL, 0);
-    labelwindow = XtCreateManagedWidget(labelWindow,labelWidgetClass,
-                                       forms[0], NULL, 0);
-    labels[0] = labelwindow;
-    positions[0] = XtCreateManagedWidget(positionWindow,labelWidgetClass,
-                                        forms[0], NULL, 0);
-
-    forms[2] = XtCreateWidget(formWindow, formWidgetClass,
-                             vpanes[1], NULL, 0);
-    labels[2] = XtCreateManagedWidget(labelWindow,labelWidgetClass,
-                                     forms[2], NULL, 0);
-    positions[2] = XtCreateManagedWidget(positionWindow,labelWidgetClass,
-                                        forms[2], NULL, 0);
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNtype, XawAsciiFile);                        ++num_args;
-    XtSetArg(arglist[num_args], XtNeditType, XawtextEdit);             ++num_args;
-    textwindow =  XtCreateManagedWidget(editWindow, asciiTextWidgetClass,
-                                       vpanes[0], arglist, num_args);
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-    international = True;
-#else
-    /* Get international resource value form the textwindow */
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNinternational, &international);     ++num_args;
-    XtGetValues(textwindow, arglist, num_args);
-#endif
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNtype, XawAsciiFile);                        ++num_args;
-    XtSetArg(arglist[num_args], XtNeditType, XawtextEdit);             ++num_args;
-    scratch = XtVaCreateWidget("textSource", international ?
-                              multiSrcObjectClass :
-                              asciiSrcObjectClass, topwindow,
-                              XtNtype, XawAsciiFile,
-                              XtNeditType, XawtextEdit,
-                              NULL, NULL);
-    XtSetValues(scratch, arglist, num_args);
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNtextSource, scratch);               ++num_args;
-    XtSetValues(textwindow, arglist, num_args);
-
-    texts[0] = textwindow;
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNtextSource, scratch);               ++num_args;
-    XtSetArg(arglist[num_args], XtNdisplayCaret, False);               ++num_args;
-    texts[2] = XtCreateWidget(editWindow, asciiTextWidgetClass,
-                             vpanes[1], arglist, num_args);
-
-    forms[1] = XtCreateWidget(formWindow, formWidgetClass,
-                             vpanes[0], NULL, 0);
-    labels[1] = XtCreateManagedWidget(labelWindow,labelWidgetClass,
-                                     forms[1], NULL, 0);
-    positions[1] = XtCreateManagedWidget(positionWindow,labelWidgetClass,
-                                        forms[1], NULL, 0);
-
-    texts[1] = XtCreateWidget(editWindow, asciiTextWidgetClass,
-                             vpanes[0], arglist, num_args);
-
-    dirlabel = XtCreateWidget("dirlabel", labelWidgetClass,
-                             vpanes[1], NULL, 0);
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNheight, 1);                         ++num_args;
-    XtSetArg(arglist[num_args], XtNwidth, 1);                          ++num_args;
-    viewport = XtCreateWidget("viewport", viewportWidgetClass,
-                             vpanes[1], arglist, num_args);
-    dirwindow = XtCreateManagedWidget("dirwindow", listWidgetClass,
-                                     viewport, NULL, 0);
-
-    item = AddTextSource(scratch, "*scratch*", "*scratch*",
-                        0, WRITE_OK);
-    item->wrap = XawtextWrapLine;
-    item->flags |= WRAP_BIT;
-    XtAddCallback(item->source, XtNcallback, SourceChanged,
-                 (XtPointer)item);
-    ResetSourceChanged(item);
-    flist.current = item;
-
-    for (num_args = 0; num_args < 3; num_args++)
-       XtAddCallback(texts[num_args], XtNpositionCallback, PositionChanged, NULL);
-
-    for (num_args = 0; num_args < 3; num_args++) {
-       XtSetArg(arglist[0], XtNwrap, &wrapmodes[num_args]);
-       XtGetValues(texts[num_args], arglist, 1);
-    }
-
-    XtAddCallback(dirwindow, XtNcallback, DirWindowCB, NULL);
-}
-
-/*     Function Name: Feep
- *     Description: feeps the bell.
- *     Arguments: none.
- *     Returns: none.
- */
-
-void
-Feep(void)
-{
-  XBell(CurDpy, 0);
-}
-
-#define        l_BIT           0x01
-#define        c_BIT           0x02
-#define        p_BIT           0x04
-#define        s_BIT           0x08
-#define MAX_FMT_LEN    30
-
-static void
-StartFormatPosition(void)
-{
-    char *fmt = app_resources.position_format;
-
-    if (fmt)
-       while (*fmt)
-           if (*fmt++ == '%') {
-               int len = 0;
-
-               if (*fmt == '-') {
-                   ++fmt;
-                   ++len;
-               }
-               while (*fmt >= '0' && *fmt <= '9') {
-                   ++fmt;
-                   if (++len >= MAX_FMT_LEN) {
-                       XtAppWarning(XtWidgetToApplicationContext(topwindow),
-                                    "Format too large to formatPosition");
-                       position_format_mask = 0;
-                       return;
-                   }
-               }
-               switch (*fmt++) {
-                   case 'l':   position_format_mask |= l_BIT;  break;
-                   case 'c':   position_format_mask |= c_BIT;  break;
-                   case 'p':   position_format_mask |= p_BIT;  break;
-                   case 's':   position_format_mask |= s_BIT;  break;
-                   case '%':   break;
-                   default: {
-                       char msg[256];
-
-                       XmuSnprintf(msg, sizeof(msg),
-                                   "Unknown format \"%%%c\" in positionFormat",
-                                   fmt[-1]);
-                       XtAppWarning(XtWidgetToApplicationContext(topwindow),
-                                    msg);
-                       position_format_mask = 0;
-                       return;
-                   }
-               }
-           }
-}
-
-/*ARGSUSED*/
-static void
-PositionChanged(Widget w, XtPointer client_data, XtPointer call_data)
-{
-    int idx;
-    XawTextPositionInfo *info = (XawTextPositionInfo*)call_data;
-
-    for (idx = 0; idx < 3; idx++)
-       if (w == texts[idx])
-           break;
-    if (idx > 2)
-       return;
-
-    if (((position_format_mask & l_BIT)
-         && infos[idx].line_number != info->line_number)
-       || ((position_format_mask & c_BIT)
-           && infos[idx].column_number != info->column_number)
-       || ((position_format_mask & p_BIT)
-           && infos[idx].insert_position != info->insert_position)
-       || ((position_format_mask & s_BIT)
-           && infos[idx].last_position != info->last_position)
-       || infos[idx].overwrite_mode != info->overwrite_mode) {
-       int len = 6;
-       Arg args[1];
-       char buffer[256], *str = app_resources.position_format;
-       char fmt_buf[MAX_FMT_LEN + 2], *fmt;
-
-       memcpy(&infos[idx], info, sizeof(XawTextPositionInfo));
-       if (info->overwrite_mode)
-           strcpy(buffer, "Ovrwt ");
-       else
-           strcpy(buffer, "      ");
-       while (*str) {
-           switch (*str) {
-               case '%':
-                   fmt = fmt_buf;
-                   *fmt++ = *str++;
-                   if (*str == '-')
-                       *fmt++ = *str++;
-                   /*CONSTCOND*/
-                   while (*str >= '0' && *str <= '9') {
-                       /* StartPositionFormat() already checked the format
-                        * length.
-                        */
-                       *fmt++ = *str++;
-                   }
-                   *fmt++ = 'd';
-                   *fmt = '\0';
-                   switch (*str) {
-                       case 'l':
-                           XmuSnprintf(&buffer[len], sizeof(buffer) - len,
-                                       fmt_buf, info->line_number);
-                           break;
-                       case 'c':
-                           XmuSnprintf(&buffer[len], sizeof(buffer) - len,
-                                       fmt_buf, info->column_number);
-                           break;
-                       case 'p':
-                           XmuSnprintf(&buffer[len], sizeof(buffer) - len,
-                                       fmt_buf, info->insert_position);
-                           break;
-                       case 's':
-                           XmuSnprintf(&buffer[len], sizeof(buffer) - len,
-                                       fmt_buf, info->last_position);
-                           break;
-                       case '%':
-                           strcpy(&buffer[len], "%");
-                           break;
-                   }
-                   len += strlen(&buffer[len]);
-                   break;
-               default:
-                   buffer[len++] = *str;
-                   break;
-           }
-           if (len >= sizeof(buffer) - 1)
-               break;
-           ++str;
-       }
-       buffer[len] = '\0';
-
-       XtSetArg(args[0], XtNlabel, buffer);
-       XtSetValues(positions[idx], args, 1);
-    }
-}
-
-/*ARGSUSED*/
-static void
-HintsTimer(XtPointer closure, XtIntervalId *id)
-{
-    Arg args[1];
-    xedit_hints *hints = (xedit_hints*)closure;
-
-    hints->cur_hint = rand() % hints->num_hints;
-
-    XtSetArg(args[0], XtNlabel, hints->hints[hints->cur_hint]);
-    XtSetValues(hintswindow, args, 1);
-
-    hints->timer = XtAppAddTimeOut(XtWidgetToApplicationContext(topwindow),
-                                  hints->interval, HintsTimer, closure);
-}
-
-#define MAX_HINT_LEN           255
-#define MIN_HINT_INTERVAL      5
-static void
-StartHints(void)
-{
-    char *str, *p;
-    unsigned i, len;
-    xedit_hints *hints = &(app_resources.hints);
-
-    /* if resource was not set, or was overriden */
-    if (hints->resource == NULL || !*hints->resource)
-       return;
-
-    randomize();
-
-    if (hints->interval < MIN_HINT_INTERVAL)
-       hints->interval = DEF_HINT_INTERVAL;
-    hints->interval *= 1000;
-    hints->hints = (char**)XtMalloc(sizeof(char*));
-    hints->hints[hints->cur_hint = 0] = p = hints->resource;
-    hints->num_hints = 1;
-
-    while ((p = strchr(p, '\n')) != NULL) {
-       if (*++p == '\0')
-           break;
-       hints->hints = (char**)
-           XtRealloc((char*)hints->hints,
-                     sizeof(char*) * (hints->num_hints + 1));
-       hints->hints[hints->num_hints++] = p;
-    }
-
-    /* make a private copy of the resource values, so that one can change
-     * the Xrm database safely.
-     */
-    for (i = 0; i < hints->num_hints; i++) {
-       if ((p = strchr(hints->hints[i], '\n')) != NULL)
-           len = p - hints->hints[i];
-       else
-           len = strlen(hints->hints[i]);
-       if (len > MAX_HINT_LEN)
-           len = MAX_HINT_LEN;
-       str = XtMalloc(len + 1);
-       strncpy(str, hints->hints[i], len);
-       str[len] = '\0';
-       hints->hints[i] = str;
-    }
-
-    hints->timer = XtAppAddTimeOut(XtWidgetToApplicationContext(topwindow),
-                                  hints->interval, HintsTimer,
-                                  (XtPointer)hints);
-}
diff --git a/xedit/xedit.h b/xedit/xedit.h
deleted file mode 100644 (file)
index 0abda4c..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- *     rcs_id[] = "$XConsortium: xedit.h,v 1.19 89/10/07 14:59:46 kit Exp $";
- */
-/*
- *                       COPYRIGHT 1987
- *                DIGITAL EQUIPMENT CORPORATION
- *                    MAYNARD, MASSACHUSETTS
- *                     ALL RIGHTS RESERVED.
- *
- * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
- * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
- * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
- * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
- *
- * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
- * APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
- * SET FORTH ABOVE.
- *
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Digital Equipment Corporation not be 
- * used in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission.
- */
-/* $XFree86: xc/programs/xedit/xedit.h,v 1.17 2002/10/06 17:11:39 paulo Exp $ */
-
-#include <stdio.h>
-#include <time.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/cursorfont.h>
-#include <X11/Xatom.h>
-
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Paned.h>
-#include <X11/Xaw/Viewport.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/SimpleMenu.h>
-
-#include <X11/IntrinsicP.h>
-#include <X11/Xaw/TextSinkP.h>         /* for the property list definition */
-
-#include <X11/Xmu/SysUtil.h>
-
-#define LSCAN(from, count, include)    \
-       XawTextSourceScan(source, from, XawstEOL, XawsdLeft, count, include)
-#define RSCAN(from, count, include)    \
-       XawTextSourceScan(source, from, XawstEOL, XawsdRight, count, include)
-
-typedef struct _xedit_hints {
-    char *resource;
-    unsigned long interval;
-    XtIntervalId timer;
-    char **hints;
-    unsigned num_hints;
-    unsigned cur_hint;
-} xedit_hints;
-
-typedef enum {NO_READ, READ_OK, WRITE_OK} FileAccess;
-
-typedef struct _XeditLispData XeditLispData;
-typedef struct _XeditTagsInfo XeditTagsInfo;
-
-#define CHANGED_BIT    0x01
-#define EXISTS_BIT     0x02
-#define WRAP_BIT       0x10
-typedef struct _xedit_flist_item {
-    Widget source, sme;
-    String name;
-    String filename;
-    int flags;
-    FileAccess file_access;
-    XawTextPosition display_position, insert_position;
-    int mode;
-    time_t mtime;
-    XawTextPropertyList *properties;
-    XawTextWrapMode wrap;
-    XeditLispData *xldata;
-    XeditTagsInfo *tags;
-} xedit_flist_item;
-
-extern struct _xedit_flist {
-    Widget popup;
-    Pixmap pixmap;
-    xedit_flist_item **itens;
-    xedit_flist_item *current, *other;
-    Cardinal num_itens;
-} flist;
-
-extern Widget options_popup;
-
-extern struct _app_resources {
-    Boolean enableBackups;
-    char *backupNamePrefix;
-    char *backupNameSuffix;
-    xedit_hints hints;
-    char *changed_pixmap_name;
-    char *position_format;
-    char *auto_replace;
-    char *tagsName;
-    Boolean loadTags;
-} app_resources;
-
-extern Widget topwindow, textwindow, labelwindow, filenamewindow, messwidget;
-extern Widget dirlabel, dirwindow;
-extern Boolean international;
-extern Boolean line_edit;
-
-/*     externals in xedit.c    */
-void Feep(void);
-
-/*     externals in util.c     */
-void XeditPrintf(const char *format, ...);
-Widget MakeCommandButton(Widget, char*, XtCallbackProc);
-Widget MakeStringBox(Widget, String, String);
-String GetString(Widget);
-FileAccess MaybeCreateFile(char*), CheckFilePermissions(char*, Boolean*);
-xedit_flist_item *AddTextSource(Widget, String, String, int, FileAccess);
-xedit_flist_item *FindTextSource(Widget, char*);
-Bool KillTextSource(xedit_flist_item*);
-char *ResolveName(char*);
-void DeleteWindow(Widget, XEvent*, String*, Cardinal*);
-void SplitWindow(Widget, XEvent*, String*, Cardinal*);
-void SwitchTextSource(xedit_flist_item*);
-void PopupMenu(Widget, XEvent*, String*, Cardinal*);
-void OtherWindow(Widget, XEvent*, String*, Cardinal*);
-void SwitchSource(Widget, XEvent*, String*, Cardinal*);
-void XeditFocus(Widget, XEvent*, String*, Cardinal*);
-void SwitchDirWindow(Bool);
-void DirWindow(Widget, XEvent*, String*, Cardinal*);
-
-/*     externs in commands.c   */
-void DoQuit(Widget, XtPointer, XtPointer);
-void QuitAction(Widget, XEvent*, String*, Cardinal*);
-void DoSave(Widget, XtPointer, XtPointer);
-void SaveFile(Widget, XEvent*, String*, Cardinal*);
-void DoLoad(Widget, XtPointer, XtPointer);
-#ifdef INCLUDE_XPRINT_SUPPORT
-void DoPrint(Widget, XtPointer, XtPointer);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-void CancelFindFile(Widget, XEvent*, String*, Cardinal*);
-void FindFile(Widget, XEvent*, String*, Cardinal*);
-void LoadFile(Widget, XEvent*, String*, Cardinal*);
-Bool LoadFileInTextwindow(char *name, char *resolved_name);
-#ifdef INCLUDE_XPRINT_SUPPORT
-void PrintFile(Widget, XEvent*, String*, Cardinal*);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-void FileCompletion(Widget, XEvent*, String*, Cardinal*);
-void KillFile(Widget, XEvent*, String*, Cardinal*);
-void DirWindowCB(Widget, XtPointer, XtPointer);
-void SourceChanged(Widget, XtPointer, XtPointer);
-
-/*     externs in ispell.c     */
-void IspellAction(Widget, XEvent*, String*, Cardinal*);
-void IspellCallback(Widget, XtPointer, XtPointer);
-
-/*     externs in options.c    */
-void CreateEditPopup(void);
-void SetEditMenu(void);
-void UpdateTextProperties(int);
-
-/*     externs in hook.c       */
-Bool StartHooks(XtAppContext);
-void LineEditAction(Widget, XEvent*, String*, Cardinal*);
-void LineEdit(Widget);
-
-/*     externs in lisp.c       */
-void XeditLispInitialize(void);
-void XeditLispEval(Widget, XEvent*, String*, Cardinal*);
-void XeditPrintLispEval(Widget, XEvent*, String*, Cardinal*);
-void XeditKeyboardReset(Widget, XEvent*, String*, Cardinal*);
-void XeditLispCleanUp(void);
-void SetTextProperties(xedit_flist_item*);
-void UnsetTextProperties(xedit_flist_item*);
-void CreateEditModePopup(Widget);
-void SetEditModeMenu(void);
-
-/* tags.c */
-void TagsAction(Widget, XEvent*, String*, Cardinal*);
-void SearchTagsFile(xedit_flist_item *item);
-
-/*     externs for system replacement functions */
-#ifdef NEED_STRCASECMP
-int strcasecmp(const char *s1, const char *s2);
-int strncasecmp(const char *s1, const char *s2, size_t n);
-#endif
-#ifdef NEED_REALPATH
-#include <sys/param.h>
-#if defined(ISC)
-#ifndef MAXPATHLEN
-#define MAXPATHLEN      1024
-#endif
-#endif
-char *realpath(const char *pathname, char resolvedname[MAXPATHLEN]);
-#endif
-
diff --git a/xedit/xedit.man b/xedit/xedit.man
deleted file mode 100644 (file)
index 3491bd1..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-.\" $XConsortium: xedit.man,v 1.23 94/04/17 20:43:39 matt Exp $
-.\" Copyright (c) 1994  X Consortium
-.\" 
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation the rights to use, copy, modify, merge, publish,
-.\" distribute, sublicense, and/or sell copies of the Software, and to
-.\" permit persons to whom the Software is furnished to do so, subject to
-.\" the following conditions:
-.\" 
-.\" The above copyright notice and this permission notice shall be included
-.\" in all copies or substantial portions of the Software.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-.\" OTHER DEALINGS IN THE SOFTWARE.
-.\" 
-.\" Except as contained in this notice, the name of the X Consortium shall
-.\" not be used in advertising or otherwise to promote the sale, use or
-.\" other dealings in this Software without prior written authorization
-.\" from the X Consortium.
-.\"
-.\" $XFree86: xc/programs/xedit/xedit.man,v 1.18 2002/10/12 16:06:48 herrb Exp $
-.\"
-.TH XEDIT 1 __vendorversion__
-.SH NAME
-xedit \- simple text editor for X
-.SH SYNTAX
-.B xedit
-[
-.I \-toolkitoption
-\&.\|.\|. ] [
-.I filename
-\&.\|.\|. ]
-.SH DESCRIPTION
-.I Xedit
-provides a window consisting of the following four areas:
-.IP "Commands Section" 25
-A set of commands that allow you to exit \fIxedit\fP, save the file, or
-load a new file into the edit window.
-.IP "Message Window" 25
-Displays \fIxedit\fP messages. In addition, this window can be also used as
-a scratch pad. 
-.IP "Filename Display"
-Displays the name of the file currently being edited, and whether this file
-is \fIRead-Write\fP or \fIRead Only\fP.
-.IP "Edit Window" 25
-Displays the text of the file that you are editing or creating.  
-.SH OPTIONS
-.I Xedit
-accepts all of the standard X Toolkit command line
-options (see
-.IR X (__miscmansuffix__)).
-The order of the command line options is not important.
-.TP 8
-.I filename
-Specifies the file(s) that are to be loaded during start-up. This is the
-file which will be edited. If a file is not specified,
-.I xedit
-lets you load files or create new files after it has started up.
-.SH EDITING
-The Athena Text widget is used for the three sections of this
-application that allow text input.  The characters typed will go to
-the Text widget that has the input focus, or the Text widget that the pointer
-cursor is currently over.
-.PP
-
-The following keystroke combinations are defined:
-.sp
-.nf
-.ta 1.0i 3.0i 4.5i
-Ctrl-a Beginning Of Line       Meta-b  Backward Word
-Ctrl-b Backward Character      Meta-f  Forward Word
-Ctrl-d Delete Next Character   Meta-i  Insert File
-Ctrl-e End Of Line     Meta-k  Kill To End Of Paragraph
-Ctrl-f Forward Character       Meta-q  Form Paragraph
-Ctrl-g Keyboard Reset  Meta-v  Previous Page
-Ctrl-h Delete Previous Character       Meta-y  Insert Current Selection
-Ctrl-j Newline And Indent      Meta-z  Scroll One Line Down
-Ctrl-k Kill To End Of Line     Meta-d  Delete Next Word
-Ctrl-l Redraw Display  Meta-D  Kill Word
-Ctrl-m Newline Meta-h  Delete Previous Word
-Ctrl-n Next Line       Meta-H  Backward Kill Word
-Ctrl-o Newline And Backup      Meta-<  Beginning Of File
-Ctrl-p Previous Line   Meta->  End Of File
-Ctrl-r Search/Replace Backward Meta-]  Forward Paragraph
-Ctrl-s Search/Replace Forward  Meta-[  Backward Paragraph
-Ctrl-t Transpose Characters
-Ctrl-u [\fInumber\fP]  Multiply by 4 or \fInumber\fP   Meta-Delete     Delete Previous Word
-Ctrl-v Next Page       Meta-Shift Delete       Kill Previous Word
-Ctrl-w Kill Selection  Meta-Backspace  Delete Previous Word
-Ctrl-y Unkill  Meta-Shift Backspace    Kill Previous Word
-Ctrl-z Scroll One Line Up      Meta-z  Scroll One Line Down
-Ctrl-_ Undo
-Escape Line Edit Mode
-.sp
-In addition, the pointer may be used to cut and paste text:
-.ta .5i 2.0i
-       Button 1 Down   Start Selection
-       Button 1 Motion Adjust Selection
-       Button 1 Up     End Selection (cut)
-
-       Button 2 Down   Insert Current Selection (paste)
-
-       Button 3 Down   Extend Current Selection
-       Button 3 Motion Adjust Selection
-       Button 3 Up     End Selection (cut)
-.fi
-.sp
-
-.SH LINE EDIT MODE
-.I Line edit mode
-enables several shortcut commands for searching and replacing text in a
-xedit buffer.
-.I Line edit mode
-commands have the format:
-.br
-.nf
-
-       [\fIline-number\fP[,\fIline-number\fP]]\fIcommand\fP[\fIparameters\fP]
-
-.fi
-.I Line number
-may be specified as:
-.TP 8
-\&.
-The current text line.
-.TP 8
-$
-The last line of the file.
-.TP 8
-number
-The literal line \fInumber\fP.
-.TP 8
-- or ^
-The previous line. Equivalent to \fI-1\fP.
-.TP 8
--number or ^number
-The current line minus \fInumber\fP.
-.TP 8
-+
-The next line. Equivalent to \fI+1\fP.
-.TP 8
-+number
-The current line plus \fInumber\fP.
-.TP 8
-, or %
-From the first to the last line. Equivalent to \fI1,$\fP.
-.TP 8
-;
-From the current to the last line. Equivalent to \fI.,$\fP.
-
-.PP
-.I Command
-may be specified as:
-.TP 8
-s
-Substitute text in the specified lines.
-.TP 8
-/re/
-Search forward for the regular expression pattern \fIre\fP.
-.TP 8
-?re?
-Search backward for the regular expression pattern \fIre\fP.
-
-.PP
-.I Parameters
-may be specified as:
-.TP 8
-/re/
-Works as a parameter to \fIi\fP or as a command.
-.TP 8
-/re/text/
-Search forward for \fIre\fP and substitute by \fItext\fP.
-
-.PP
-.I Options
-may follow or be parameters, known values are:
-.TP 8
-i
-Case insensitive search.
-.TP 8
-g
-\fIGlobal\fP match when replacing text. Unless specified, only the nth,
-that defaults to 1, match will be replaced.
-.TP 8
-c
-\fIConfirm\fP before replacing text.
-.TP 8
-number
-Replace only the occurrence referenced by \fInumber\fP.
-.PP
-
-Commands accept some variations, examples:
-.br
-.nf
-       /pattern/i
-       i/pattern/
-       i/pattern
-.fi
-Search forward for \fIpattern\fP.
-.br
-.nf
-
-       ,sc/pattern/text
-       ,sc/pattern/text/
-       ,s/pattern/text/c
-.fi
-Search the entire buffer and ask confirmation to replace \fIpattern\fP
-with \fItext\fP.
-.br
-.nf
-
-       ,s/pattern/text/number
-.fi
-Replace the match \fInumber\fP in the text line. If not specified,
-defaults to the first occurrence.
-
-.PP
-When searching for text, type <Return> to go to the next match.
-When interactively replacing text, type \fIy\fP or \fIY\fP to accept the
-change, and \fIn\fP or \fIN\fP to ignore it and go to the next match.
-
-.SH COMMANDS
-.IP Quit 8
-Quits the current editing session. If any changes have not been saved,
-.I xedit 
-displays a warning message, allowing the user to save them.
-.IP Save 
-If file backups are enabled (see RESOURCES, below)
-.I xedit
-stores a copy of the
-original, unedited file in <prefix>\fIfile\fP<suffix>,
-then overwrites the \fIfile\fP with the contents of the edit window.  The
-filename is retrieved from the Text widget directly to the right of
-the \fILoad\fP button.
-.IP Load
-Loads the file named in the text widget immediately to the right
-of the this button and displays it in the Edit window.
-.SH RESOURCES
-For \fIxedit\fP the available resources are:
-.TP 8
-.B tagsName (\fPClass\fB TagsName)
-Specifies the name of the tags file to search when loading a new file.
-Default value is \fItags\fP.
-.TP 8
-.B loadTags (\fPClass\fB LoadTags)
-Boolean value to enable or disabling searching for tags files.
-Default is \fITrue\fP.
-.TP 8
-.B enableBackups (\fPClass\fB EnableBackups)
-Specifies that, when edits made to an existing file are saved,
-.I xedit
-is to copy the original version of that file to <prefix>\fIfile\fP<suffix>
-before it saves the changes.  The default value for this resource is
-``on,'' stating that backups should be created.
-.TP 8
-.B backupNamePrefix (\fPClass\fB BackupNamePrefix)
-Specifies a string that is to be prepended to the backup filename.  The
-default is that no string shall be prepended.
-.TP 8
-.B backupNameSuffix (\fPClass\fB BackupNameSuffix)
-Specifies a string that is to be appended to the backup filename.  The
-default is to use ``~'' as the suffix.
-.TP 8
-.B positionFormat (\fPClass\fB Format)
-Specifies a format string used to display the cursor position.  This
-string uses printf(3) like notation, where
-.B %l
-prints the line number,
-.B %c
-prints the column number,
-.B %p
-prints the insert position offset, and
-.B %s
-prints the current file size.  It is also allowed to specify field sizes,
-with the notation
-.B %\-?[0\-9]+
-\&.  The default format string is ``L%l'', which shows the character ``L''
-followed by the line number.
-.TP 8
-.B hints (\fPClass\fB Hints)
-Specifies a list of strings, separated by new lines, that will be
-displayed in the bc_label window.
-.TP 8
-.B hintsInterval (\fPClass \fBInterval)
-Specifies the interval in seconds, which the hint string in the bc_label
-window will be changed.
-.TP 8
-.B changedBitmap (\fPClass \fBBitmap)
-Specifies the name of the Bitmap that will be displayed in the fileMenu, when
-the file being edited is changed.
-.TP 8
-.B autoReplace (\fPClass \fBReplace)
-This resource is useful to automatically correct common misspelling errors, but
-can also be used to create simple macros. The format is
-\fI{non-blanks}{blanks}[{string}]\fP. Fields are separeted by newlines.
-Example of use:
-\"
-.br
-.nf
-nto      not\\n\\
-/macro some long string with \\\\\\n newlines \\\\\\n
-.fi
-\"
-.br
-Will automatically replace the word \fInto\fP by \fInot\fP, and \fI/macro\fP
-by \fIsome long string with
- newlines
-\fP
-when you type that words.
-.TP 8
-.B ispell.dictionaries (\fPClass \fBispell.Dictionary)
-Specifies a list of dictionary names, separeted by spaces, available to the
-ispell program. The default value is \fI"american americamed+ english"\fP.
-.TP 8
-.B ispell.dictionary (\fPClass \fBispell.Dictionary)
-Specifies the default dictionary to use.
-.TP 8
-.B ispell*<DICTIONARY>.wordChars (\fPClass \fBispell*Chars)
-Specifies a set of characters that can be part of a legal word. The
-\fI<DICTIONARY>\fP field is one of the dictionaries specified in the
-\fIdictionaries\fP resource.
-.TP 8
-.B ispell.ispellCommand (\fPClass \fBispell.CommandLine)
-The path to the ispell program, and possibly, additional arguments. You don't
-need to specify the ``-w'' option, neither the ``-a'' option.
-Refer to the \fIispell\fP(1) manpage for more information on ispell options.
-.TP 8
-.B ispell.formatting (\fPClass \fPispell.TextFormat)
-Specifies which text formatting to use while spell checking the file. The
-available formats are \fItext\fP and \fIhtml\fP.
-.TP 8
-.B ispell*text.skipLines (\fPClass \fBispell*text.Skip)
-Lines starting with one of the characters in this string will not be spell
-checked. This resource is only used in \fItext\fP mode.
-.TP 8
-.B ispell.terseMode (\fPClass \fBispell.Terse)
-When enabled, runs ispell in terse mode, not asking user interaction for words
-generated through compound formation (when using the ispell ``-C'' option), or
-words generated through affix removal. The default value is False.
-.TP 8
-.B ispell.lookCommand (\fPClass \fBispell.CommandLine)
-The path to the program to search for alternate words, and possibly,
-additional arguments. The default program used is \fI/usr/bin/egrep\fP.
-.TP 8
-.B ispell.wordsFile (\fPClass \fBispell.Words)
-The path to the file[s] to search for alternate words. The default file is
-\fI/usr/share/dict/words\fP.
-.TP 8
-.B ispell.guessLabel (\fPClass \fBispell.Status)
-String displayed in the ispell status bar when ispell returns a guess list
-of one or more words. The default value is \fIGuess\fP.
-.TP 8
-.B ispell.missLabel (\fPClass \fBispell.Status)
-String displayed in the ispell status bar when ispell returns a list of one
-or more words to match a misspelled one. The default value is \fIMiss\fP.
-.TP 8
-.B ispell.rootLabel (\fPClass \fBispell.Status)
-String displayed in the ispell status bar when the word is not in the dictionary,
-but it can be formed through a root one. The default value is \fIRoot:\fP, and is
-followed by a space and the root word.
-.TP 8
-.B ispell.noneLabel (\fPClass \fBispell.Status)
-String displayed in the ispell status bar when there is no near misses. The default
-value is \fINone\fP.
-.TP 8
-.B ispell.compoundLabel (\fPClass \fBispell.Status)
-String displayed in the ispell status bar when the word being checked is formed by
-concatenation of two words. The default value is \fICompound\fP.
-.TP 8
-.B ispell.okLabel (\fPClass \fBispell.Status)
-String displayed in the ispell status bar when the checked word is in the dictionary.
-This string is only displayed when using the \fIcheck\fP button in the xedit ispell
-interface. The default value is \fIOk\fP.
-.TP 8
-.B ispell.eofLabel (\fPClass \fBispell.Status)
-The string displayed in the ispell status bar when the end of the file is reached.
-The default value is \fIEnd Of File\fP.
-.TP 8
-.B ispell.repeatLabel (\fPClass \fBispell.Status)
-The string displayed in the ispell status bar when two identical words are found
-together in the file. The default value is \fIRepeat\fP.
-.TP 8
-.B ispell.lookLabel (\fPClass \fBispell.Status)
-The string displayed in the ispell status bar after displaying the results of
-the \fILook\fP command. If no results are found, the value of the
-\fIispell.noneLabel\fP resource is shown.
-.TP 8
-.B ispell.workingLabel (\fPClass \fBispell.Status)
-The string displayed in the ispell status bar while xedit is communicating with
-ispell. The default value is \fI...\fP.
-.SH WIDGETS
-In order to specify resources, it is useful to know the hierarchy of
-the widgets which compose \fIxedit\fR.  In the notation below,
-indentation indicates hierarchical structure.  The widget class name
-is given first, followed by the widget instance name.
-.sp
-.nf
-.ta .5i 1.0i 1.5i 2.0i
-Xedit  xedit
-       Paned  paned
-               Paned  buttons
-                       Command  quit
-                       Command  save
-                       Command  load
-                       Text     filename
-               Label  bc_label
-               Text   messageWindow
-               Label  labelWindow
-               Text   editWindow
-.fi
-.sp
-.SH ENVIRONMENT
-.PP
-.TP 20
-.I DISPLAY
-to get the default host and display number.
-.TP 20
-.I XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-.SH FILES
-.TP 20
-.I __apploaddir__/Xedit
-specifies required resources
-.SH "SEE ALSO"
-.IR X (__miscmansuffix__),
-.IR xrdb (1),
-.I "Athena Widget Set"
-.SH RESTRICTIONS
-Xedit is not a replacement to Emacs.
-.SH COPYRIGHT
-Copyright 1988, Digital Equipment Corporation.
-.br
-Copyright 1989, X Consortium
-.br
-Copyright 1998, The XFree86 Project
-.br
-See
-.IR X (__miscmansuffix__)
-for a full statement of rights and permissions.
-.SH AUTHORS
-Chris D. Peterson, MIT X Consortium
-.br
-Paulo Cesar Pereira de Andrade, The XFree86 Project
index 7f33cbf..f968ebe 100644 (file)
@@ -1,12 +1,25 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright (c) 1991  X Consortium
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
index d8e40d1..65866a2 100644 (file)
@@ -1,6 +1,109 @@
+commit 72e65631bb3d3bb4f65b5d841ca5d409dff07e20
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 24 23:28:41 2010 -0800
+
+    xeyes 1.1.1
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cf26a29230cd3ccd79fc8c113dab12a47e244f7a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Nov 20 17:33:52 2010 -0800
+
+    Make usage message fit into 80-column lines
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f6a9256db2c463f73982c79378b563d92a6ff180
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Nov 20 17:24:20 2010 -0800
+
+    Remove trailing whitespace
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 906c634e85111deac379f0a8e664c933d31c97d8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Nov 8 23:35:55 2010 -0800
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Regroup AC statements under the Autoconf initialization section.
+    Regroup AM sttaements under the Automake initialization section.
+    Add missing AC_CONFIG_SRCDIR
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b24dce8f95cbed1a91a989a783eb1fdd36335bf1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Nov 8 23:34:03 2010 -0800
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 34ea83ac16ce3bc55aedd9d8e73e3d4a04bafdcc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Mon Nov 8 23:31:22 2010 -0800
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    Enables use of platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a10b0c4b0445a2b4e12916ee0498db533fde86fd
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Nov 8 23:30:16 2010 -0800
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fcda75a70b29e1532a2a5f33058f3882bcad2642
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date:   Tue Sep 28 13:29:49 2010 -0700
+
+    Purge cvs tags.
+    
+    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+
+commit 2cbe4f83d4b24794679bda517573f907bb3de710
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 09:04:12 2010 -0700
+
+    Fill in COPYING file with copyright notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 96a593c4a221db4b31041e01053e907bedd60519
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:06 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
 commit a2c8bc28a57474cda77769292aabe1d9f73839a5
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Fri Dec 18 09:44:32 2009 -0500
+Date:   Fri Dec 18 09:44:56 2009 -0500
 
     xeyes 1.1.0
     
@@ -8,7 +111,7 @@ Date:   Fri Dec 18 09:44:32 2009 -0500
 
 commit e134d57ac54b77269252b7f73f0e84d08ded5212
 Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Thu Nov 26 09:19:29 2009 -0500
+Date:   Thu Nov 26 09:19:53 2009 -0500
 
     Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
     
@@ -17,7 +120,7 @@ Date:   Thu Nov 26 09:19:29 2009 -0500
 
 commit 6e387e3329722dc9a09b481dbd15f441f39aa054
 Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Wed Oct 28 14:08:44 2009 -0400
+Date:   Wed Oct 28 14:09:08 2009 -0400
 
     INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
     
@@ -28,7 +131,7 @@ Date:   Wed Oct 28 14:08:44 2009 -0400
 
 commit 34ddbb1213cc4c061409cf6e3883683f6ed8dc92
 Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Tue Oct 27 15:07:00 2009 -0400
+Date:   Tue Oct 27 15:07:24 2009 -0400
 
     Deploy the new XORG_DEFAULT_OPTIONS #24242
     
@@ -38,7 +141,7 @@ Date:   Tue Oct 27 15:07:00 2009 -0400
 
 commit d1c05b6bb985c00447b3eef598fc6c9b5a95134b
 Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Mon Oct 26 22:08:14 2009 -0400
+Date:   Mon Oct 26 22:08:38 2009 -0400
 
     Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
     
@@ -47,7 +150,7 @@ Date:   Mon Oct 26 22:08:14 2009 -0400
 
 commit 3195a5dc486e6daa2ed9754ffd7d2e12da7906a2
 Author: Gaetan Nadon <memsize@videotron.ca>
-Date:   Thu Oct 22 12:33:51 2009 -0400
+Date:   Thu Oct 22 12:34:15 2009 -0400
 
     .gitignore: use common defaults with custom section # 24239
     
@@ -57,7 +160,7 @@ Date:   Thu Oct 22 12:33:51 2009 -0400
 
 commit 6054c8c98d25752492b57b8ad7fd1d3679d23369
 Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Wed Oct 21 12:46:56 2009 -0700
+Date:   Wed Oct 21 12:47:20 2009 -0700
 
     This is not a GNU project, so declare it foreign.
     
@@ -79,7 +182,7 @@ Date:   Wed Oct 21 12:46:56 2009 -0700
 
 commit 59a5be39cdbddb070cd4e4758848fd08aa5910a4
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Mon Oct 5 18:07:53 2009 -0400
+Date:   Mon Oct 5 18:08:17 2009 -0400
 
     Bump version for second beta release.
     
@@ -91,7 +194,7 @@ Date:   Mon Oct 5 18:07:53 2009 -0400
 
 commit 610889785caf41146505458beccc5e3662c233db
 Author: Dylan Simon <dylan@dylex.net>
-Date:   Sun Oct 4 17:41:30 2009 -0400
+Date:   Sun Oct 4 17:41:54 2009 -0400
 
     New -distance mapping option
     
@@ -102,7 +205,7 @@ Date:   Sun Oct 4 17:41:30 2009 -0400
 
 commit dc0f730a4a49f0e436a0a915955997b07bbf56e0
 Author: Dylan Simon <dylan@dylex.net>
-Date:   Sun Oct 4 17:38:43 2009 -0400
+Date:   Sun Oct 4 17:39:07 2009 -0400
 
     Cleanup and simplify calculation and drawing
     
@@ -120,7 +223,7 @@ Date:   Sun Oct 4 17:38:43 2009 -0400
 
 commit 7cc3aa8ce30990e12e7b102f61dfcaaf8baa4d16
 Author: Dylan Simon <dylan@dylex.net>
-Date:   Sun Oct 4 17:29:59 2009 -0400
+Date:   Sun Oct 4 17:30:23 2009 -0400
 
     Fix excessive redraw bug
     
@@ -131,7 +234,7 @@ Date:   Sun Oct 4 17:29:59 2009 -0400
 
 commit 6d9fdcfb076f4c261b071cc5c454c8b9ce560e68
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Sat Oct 3 21:32:48 2009 -0400
+Date:   Sat Oct 3 21:33:12 2009 -0400
 
     Bump version for beta release.
     
@@ -141,7 +244,7 @@ Date:   Sat Oct 3 21:32:48 2009 -0400
 
 commit 41f604009c3c7b4a3d05311faa649c8152494700
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Sat Oct 3 21:28:35 2009 -0400
+Date:   Sat Oct 3 21:28:59 2009 -0400
 
     Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
     
@@ -149,7 +252,7 @@ Date:   Sat Oct 3 21:28:35 2009 -0400
 
 commit fd754c702c789f15ac1c0241e50dbb23aed354fc
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Oct 1 14:53:59 2009 -0700
+Date:   Thu Oct 1 14:54:23 2009 -0700
 
     Add README with pointers to mailing lists, bugzilla, & git
     
@@ -157,7 +260,7 @@ Date:   Thu Oct 1 14:53:59 2009 -0700
 
 commit 5e825a140f4022b88dd7a1a20a9a01b653f1a95c
 Author: Dylan Simon <dylan@dylex.net>
-Date:   Sun Sep 27 14:44:11 2009 -0400
+Date:   Sun Sep 27 14:44:35 2009 -0400
 
     Add xrender support
     
@@ -170,13 +273,13 @@ Date:   Sun Sep 27 14:44:11 2009 -0400
 
 commit dbb8401026c421d64a2962e6ac6eb900f6dc141e
 Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Jul 17 19:21:15 2009 +1000
+Date:   Fri Jul 17 19:21:39 2009 +1000
 
     Split drawing code into multiple functions.
 
 commit 85f1441378b47c01aa68dd1479850c4cd1c8eb72
 Author: Peter Hutterer <peter.hutterer@who-t.net>
-Date:   Fri Jul 17 18:41:07 2009 +1000
+Date:   Fri Jul 17 18:41:31 2009 +1000
 
     Remove unused NUM_EYES define.
     
@@ -184,7 +287,7 @@ Date:   Fri Jul 17 18:41:07 2009 +1000
 
 commit e8bd6bcaf2cbe8306cc9a4821e8ea7a54a7e56a2
 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Jan 13 17:42:23 2009 -0200
+Date:   Tue Jan 13 17:42:47 2009 -0200
 
     Ansification and compile warning fixes.
     
@@ -193,106 +296,106 @@ Date:   Tue Jan 13 17:42:23 2009 -0200
 
 commit 7e3208d263050d0ad4502f7d7d7d64d7ec84a4ad
 Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Thu Nov 27 22:46:26 2008 -0800
+Date:   Thu Nov 27 22:46:49 2008 -0800
 
     AM_CFLAGS instead of xeyes_CFLAGS to shut automake up
 
 commit 53488fad7ef10ff8c4835bcd497cd3980be38b7a
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Dec 6 16:36:49 2007 -0500
+Date:   Thu Dec 6 16:37:12 2007 -0500
 
     Replace static ChangeLog with dist-hook to generate from git log
 
 commit ab449267ea2fcae6261e57f42bfb54d2205c470f
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Mon Sep 3 05:50:58 2007 -0400
+Date:   Mon Sep 3 05:51:21 2007 -0400
 
     Add *~ to .gitignore to skip patch/emacs droppings
 
 commit 07dfa4cb3ff0c9a94bea85db0e571fbb2cfe9161
 Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Aug 23 19:24:22 2007 -0400
+Date:   Thu Aug 23 19:24:45 2007 -0400
 
     Rename .cvsignore to .gitignore
 
 commit ecb2095318d7233e8cfa3a58626c31f770be6ee7
 Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:27 2005 +0000
+Date:   Wed Dec 21 02:29:49 2005 +0000
 
     Update package version for X11R7 release.
 
 commit 3aae44d6b3c9332f73fbeacb39e9c928a2002164
 Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:21 2005 +0000
+Date:   Mon Dec 19 16:22:43 2005 +0000
 
     Stub COPYING files
 
 commit 41b039a4861154d82bdd3e6ea1b6697b16205b93
 Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:23:44 2005 +0000
+Date:   Thu Dec 15 00:24:06 2005 +0000
 
     Update package version number for final X11R7 release candidate.
 
 commit bc99738464950416207d43a4a4db970bd0563d56
 Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:47:59 2005 +0000
+Date:   Tue Dec 6 22:48:21 2005 +0000
 
     Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
 
 commit 266b7244e16ec2f82bdfb1bd346951761e0d27e2
 Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:48:58 2005 +0000
+Date:   Sat Dec 3 05:49:20 2005 +0000
 
     Update package version number for X11R7 RC3 release.
 
 commit 4298a74b61a6aa8ac36b2d820e147e44ab0f5e32
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:19 2005 +0000
+Date:   Mon Nov 28 22:01:41 2005 +0000
 
     Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
         update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
 
 commit 69160791a057704e9a83794420d2349ae8bbbe1c
 Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:34:38 2005 +0000
+Date:   Mon Nov 21 10:35:00 2005 +0000
 
     Another pass at .cvsignores for apps.
 
 commit ba6118981be2d3a058a08cd1621113cc8e4a42f8
 Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:30 2005 +0000
+Date:   Sun Nov 20 22:08:52 2005 +0000
 
     Add/improve .cvsignore files for apps.
 
 commit 6772ce855c078b40635ad62f47da741c037e05c5
 Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:31 2005 +0000
+Date:   Wed Oct 19 02:47:53 2005 +0000
 
     Update package version number for RC1 release.
 
 commit 8001fd04f2d893e147b3b21fb4702c54e2919b1d
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:00 2005 +0000
+Date:   Mon Oct 17 23:56:22 2005 +0000
 
     Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
         work better with BSD make
 
 commit 1f61a27ce249d94b4be20db22cb84642a4d8a480
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:23 2005 +0000
+Date:   Fri Oct 14 00:25:45 2005 +0000
 
     Use sed to fill in variables in man page
 
 commit 79456c023b864e06b3ab3c6c93106772286b10ae
 Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Aug 1 20:25:07 2005 +0000
+Date:   Mon Aug 1 20:25:29 2005 +0000
 
     Install man pages to section 1 instead of section m (Patch from Donnie
         Berkholz)
 
 commit 8119360377d17461578cfb26e07c98df6bbe560d
 Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:10 2005 +0000
+Date:   Fri Jul 29 21:22:32 2005 +0000
 
     Various changes preparing packages for RC0:
     - Verify and update package version numbers as needed
@@ -306,67 +409,67 @@ Date:   Fri Jul 29 21:22:10 2005 +0000
 
 commit 9da2af8715937921c718733e309471f565614c99
 Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Jul 28 15:56:50 2005 +0000
+Date:   Thu Jul 28 15:57:12 2005 +0000
 
     Fix distcheck for remaining apps
 
 commit ae49bb18f5feab2b70e6faae046bb26058421d61
 Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Jul 20 19:31:31 2005 +0000
+Date:   Wed Jul 20 19:31:53 2005 +0000
 
     Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
         configure cache, you cache it, and the cached value is probably wrong.
 
 commit c903caebf875d510cbd1f720ccc02bd03250d7c6
 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Fri Jul 1 18:06:56 2005 +0000
+Date:   Fri Jul 1 18:07:18 2005 +0000
 
     Xeyes build system
 
 commit 160c9f4f69bb2fd273c6223c7e4c6cda1523757f
 Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:25 2004 +0000
+Date:   Fri Apr 23 19:54:47 2004 +0000
 
     Merging XORG-CURRENT into trunk
 
 commit 37db892d918e67bb13652d48f76d3da4c67f5d58
 Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:34:58 2004 +0000
+Date:   Sun Mar 14 08:35:20 2004 +0000
 
     Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
 
 commit e1eda60fd5b4634652d0505a13a2516515d8ff88
 Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:12:43 2004 +0000
+Date:   Wed Mar 3 12:13:05 2004 +0000
 
     Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
 
 commit f8eb90ffc747cd45db069212031e1e41c797d378
 Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:02 2004 +0000
+Date:   Thu Feb 26 13:36:24 2004 +0000
 
     readding XFree86's cvs IDs
 
 commit cd8a87f77a8ee8b4d29c34cc2066a840964fe3b8
 Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:23:45 2004 +0000
+Date:   Thu Feb 26 09:24:07 2004 +0000
 
     Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
 
 commit bd6d337e78c95b6cd3d831f6e6ad44afc6595520
 Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:28:50 2003 +0000
+Date:   Tue Nov 25 19:29:12 2003 +0000
 
     XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
 
 commit 2d36e110b8dbfa073bd533d7d0c720a4e51339a4
 Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:00 2003 +0000
+Date:   Fri Nov 14 16:49:22 2003 +0000
 
     XFree86 4.3.0.1
 
 commit dfc0320568e5237fff45b3f7fb6f332d1bf5e9bf
 Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:00 2003 +0000
+Date:   Fri Nov 14 16:49:22 2003 +0000
 
     Initial revision
index e792445..a9f2618 100644 (file)
@@ -1,5 +1,3 @@
-/* $XConsortium: Eyes.c,v 1.28 94/04/17 20:45:22 eswu Exp $ */
-/* $XFree86: xc/programs/xeyes/Eyes.c,v 1.3 2001/07/25 15:05:21 dawes Exp $ */
 /*
 
 Copyright (c) 1991  X Consortium
index 424967b..5170356 100644 (file)
@@ -1,6 +1,3 @@
-/*
-* $XConsortium: Eyes.h,v 1.7 90/12/01 13:04:51 rws Exp $
-*/
 
 #ifndef _XtEyes_h
 #define _XtEyes_h
index 3a04b13..159d7f3 100644 (file)
@@ -1,6 +1,3 @@
-/*
-* $XConsortium: EyesP.h,v 1.9 90/12/01 13:04:43 rws Exp $
-*/
 
 #ifndef _EyesP_h
 #define _EyesP_h
index e69de29..8b82ade 100644 (file)
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
index cffa4ef..8dbfcf1 100644 (file)
@@ -1,6 +1,6 @@
-# 
+#
 #  Copyright 2005  Red Hat, Inc.
-# 
+#
 #  Permission to use, copy, modify, distribute, and sell this software and its
 #  documentation for any purpose is hereby granted without fee, provided that
 #  the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@
 #  specific, written prior permission.  Red Hat makes no
 #  representations about the suitability of this software for any purpose.  It
 #  is provided "as is" without express or implied warranty.
-# 
+#
 #  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 #  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -21,8 +21,8 @@
 
 bin_PROGRAMS = xeyes
 
-AM_CFLAGS = $(XEYES_CFLAGS)
-xeyes_LDADD = $(XEYES_LIBS) -lm
+AM_CFLAGS = $(XEYES_CFLAGS) $(XRENDER_CFLAGS) $(CWARNFLAGS)
+xeyes_LDADD = $(XEYES_LIBS) $(XRENDER_LIBS) -lm
 
 xeyes_SOURCES =        \
         Eyes.c \
@@ -45,27 +45,9 @@ EXTRA_DIST += $(appman_PRE)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
index 673d50d..29c3f24 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,9 +15,9 @@
 
 @SET_MAKE@
 
-# 
+#
 #  Copyright 2005  Red Hat, Inc.
-# 
+#
 #  Permission to use, copy, modify, distribute, and sell this software and its
 #  documentation for any purpose is hereby granted without fee, provided that
 #  the above copyright notice appear in all copies and that both that
@@ -27,7 +27,7 @@
 #  specific, written prior permission.  Red Hat makes no
 #  representations about the suitability of this software for any purpose.  It
 #  is provided "as is" without express or implied warranty.
-# 
+#
 #  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 #  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -77,7 +77,7 @@ PROGRAMS = $(bin_PROGRAMS)
 am_xeyes_OBJECTS = Eyes.$(OBJEXT) transform.$(OBJEXT) xeyes.$(OBJEXT)
 xeyes_OBJECTS = $(am_xeyes_OBJECTS)
 am__DEPENDENCIES_1 =
-xeyes_DEPENDENCIES = $(am__DEPENDENCIES_1)
+xeyes_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -180,6 +180,7 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -189,15 +190,18 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
 XEYES_CFLAGS = @XEYES_CFLAGS@
 XEYES_LIBS = @XEYES_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
 XRENDER_CFLAGS = @XRENDER_CFLAGS@
 XRENDER_LIBS = @XRENDER_LIBS@
 abs_builddir = @abs_builddir@
@@ -250,8 +254,8 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = $(XEYES_CFLAGS)
-xeyes_LDADD = $(XEYES_LIBS) -lm
+AM_CFLAGS = $(XEYES_CFLAGS) $(XRENDER_CFLAGS) $(CWARNFLAGS)
+xeyes_LDADD = $(XEYES_LIBS) $(XRENDER_LIBS) -lm
 xeyes_SOURCES = \
         Eyes.c \
         Eyes.h \
@@ -268,24 +272,6 @@ appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -518,7 +504,8 @@ distdir: $(DISTFILES)
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
        -test -n "$(am__skip_mode_fix)" \
-       || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -562,17 +549,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
-         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -757,6 +744,7 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS
        uninstall-binPROGRAMS
 
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
index 31385f9..21735af 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                    [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
 #
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
+# serial 9
 
-$$1_PKG_ERRORS
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# serial 10
 
-_PKG_TEXT
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
 
-dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
 #
-# To ensure that this macro is defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION],
-#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
 #
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.3.0])
-m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
-m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
-m4_if(m4_cmp(maj_have, maj_needed), 0,,
-    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
-m4_if(m4_version_compare(vers_have, [$1]), -1,
-    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
-m4_undefine([vers_have])
-m4_undefine([maj_have])
-m4_undefine([maj_needed])
-]) # XORG_MACROS_VERSION
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       # under Cygwin unix is still defined even with -undef
-       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS="-undef -ansi"
-               AC_MSG_RESULT([yes, with -ansi])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
-rm -f conftest.$ac_ext
 
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
+AC_SUBST([CYGPATH_W])
 
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
 
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
 
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
+AC_SUBST(install_sh)])
 
-
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
 
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
+# serial 5
 
-AC_MSG_RESULT([$BUILDDOC])
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_RESULT([$BUILDPDFDOC])
+# serial 4
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+# serial 6
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
 fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+# Helper functions for option handling.                     -*- Autoconf -*-
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AS_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
+# serial 4
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
-#
-AC_DEFUN([XORG_WITH_LINT],[
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-]) # XORG_WITH_LINT
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
-
-]) # XORG_LINT_LIBRARY
+# serial 5
 
-# XORG_CWARNFLAGS
+# AM_SANITY_CHECK
 # ---------------
-# Minimum version: 1.2.0
-#
-# Defines CWARNFLAGS to enable C compiler warnings.
-#
-AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-]) # XORG_CWARNFLAGS
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
 
-# XORG_STRICT_OPTION
-# -----------------------
-# Minimum version: 1.3.0
-#
-# Add configure option to enable strict compilation
-AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_CC_C99])
-AC_REQUIRE([XORG_CWARNFLAGS])
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
 
-AC_ARG_ENABLE(strict-compilation,
-                         AS_HELP_STRING([--enable-strict-compilation],
-                         [Enable all warnings from compiler and make them errors (default: disabled)]),
-                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
-if test "x$STRICT_COMPILE" = "xyes"; then
-       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
-       if test "x$GCC" = xyes ; then
-               STRICT_CFLAGS="-pedantic -Werror"
-       elif test "x$SUNCC" = "xyes"; then
-               STRICT_CFLAGS="-errwarn"
-    elif test "x$INTELCC" = "xyes"; then
-               STRICT_CFLAGS="-Werror"
-       fi
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
 fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
-]) # XORG_STRICT_OPTION
+AC_MSG_RESULT(yes)])
 
-# XORG_DEFAULT_OPTIONS
-# --------------------
-# Minimum version: 1.3.0
-#
-# Defines default options for X.Org modules.
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_DEFAULT_OPTIONS], [
-XORG_CWARNFLAGS
-XORG_STRICT_OPTION
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-XORG_INSTALL
-XORG_MANPAGE_SECTIONS
-]) # XORG_DEFAULT_OPTIONS
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# XORG_INSTALL()
-# ----------------
-# Minimum version: 1.4.0
-#
-# Defines the variable INSTALL_CMD as the command to copy
-# INSTALL from $prefix/share/doc/util-macros.
-#
-AC_DEFUN([XORG_INSTALL], [
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-macros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros)
-INSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-AC_SUBST([INSTALL_CMD])
-]) # XORG_INSTALL
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# serial 1
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AS_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# XORG_CHANGELOG()
-# ----------------
-# Minimum version: 1.2.0
-#
-# Defines the variable CHANGELOG_CMD as the command to generate
-# ChangeLog from git.
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-AC_SUBST([CHANGELOG_CMD])
-]) # XORG_CHANGELOG
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
 #
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
 #
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 #
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
 #
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.11.0])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
-# serial 9
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
 else
-  $1_TRUE='#'
-  $1_FALSE=
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
 
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
     esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
 fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
 
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
 
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
+]) # XORG_MANPAGE_SECTIONS
+
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
 fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
 
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
-#serial 5
+AC_PATH_PROG(LINUXDOC, linuxdoc)
 
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+AC_MSG_CHECKING([whether to build documentation])
+
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
+else
+   BUILDDOC=no
+fi
 
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+AC_MSG_RESULT([$BUILDDOC])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-# serial 8
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
+fi
 
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
+
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
+
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
-# serial 16
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
 fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
 fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES(CC)],
-                 [define([AC_PROG_CC],
-                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES(CXX)],
-                 [define([AC_PROG_CXX],
-                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES(OBJC)],
-                 [define([AC_PROG_OBJC],
-                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
+fi
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+          [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
 fi
-AC_SUBST(install_sh)])
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
+# --------------------------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+          [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+# XORG_WITH_GROFF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: ]_defopt[)]),
+          [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
 else
-  am__leading_dot=_
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
 
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
 
-# serial 5
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
 
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
+# XORG_WITH_FOP([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: ]_defopt[)]),
+          [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+# XORG_WITH_PS2PDF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
 
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+m4_define([docs_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: ]docs_default[)]),
+          [build_docs=$enableval], [build_docs=]docs_default)
+m4_undefine([docs_default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+m4_define([devel_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: ]devel_default[)]),
+          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+m4_define([spec_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: ]spec_default[)]),
+          [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
 
-# serial 4
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
 
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
 
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
 
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+]) # XORG_WITH_LINT
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
-# serial 4
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
+fi
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+]) # XORG_LINT_LIBRARY
 
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
+#
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
+
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
 
-# serial 5
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
 
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
-AC_MSG_RESULT(yes)])
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-# serial 1
 
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
-# serial 2
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
 
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-# serial 2
+$$1_PKG_ERRORS
 
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+_PKG_TEXT
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
old mode 100755 (executable)
new mode 100644 (file)
index 12734a7..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-08-19'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -139,25 +140,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
-Linux|GNU/*)
-       eval $set_cc_for_build
-       cat << EOF > $dummy.c
-       #include <features.h>
-       #ifdef __UCLIBC__
-       # ifdef __UCLIBC_CONFIG_VERSION__
-       LIBC=uclibc __UCLIBC_CONFIG_VERSION__
-       # else
-       LIBC=uclibc
-       # endif
-       #else
-       LIBC=gnu
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
-       ;;
-esac
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -352,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
        SUN_ARCH="i386"
@@ -567,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -826,12 +811,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd | genuineintel)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -868,41 +853,66 @@ EOF
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
        else
-           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-${LIBC}
+       echo cris-axis-linux-gnu
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-${LIBC}
+       echo crisv32-axis-linux-gnu
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-${LIBC}
+       echo frv-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -920,125 +930,56 @@ EOF
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
-       echo or32-unknown-linux-${LIBC}
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-${LIBC}
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-${LIBC}
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo or32-unknown-linux-gnu
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-${LIBC}
+       echo sparc-unknown-linux-gnu
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-         *)    echo hppa-unknown-linux-${LIBC} ;;
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-${LIBC}
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+       echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-${LIBC}
+       echo x86_64-unknown-linux-gnu
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
-               ;;
-       esac
-       # This should get integrated into the C code below, but now we hack
-       if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1268,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
index 51a69e0..6ef94cc 100644 (file)
@@ -42,6 +42,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
 
old mode 100755 (executable)
new mode 100644 (file)
index 3243784..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-08-19'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -251,7 +253,7 @@ case $basic_machine in
        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
        | bfin \
        | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx | dvp \
+       | d10v | d30v | dlx | dsp16xx \
        | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
@@ -281,26 +283,38 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -331,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -365,21 +379,24 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -477,6 +494,15 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -747,24 +773,6 @@ case $basic_machine in
                basic_machine=m68k-atari
                os=-mint
                ;;
-       mipsEE* | ee | ps2)
-               basic_machine=mips64r5900el-scei
-               case $os in
-                   -linux*)
-                       ;;
-                   *)
-                       os=-elf
-                       ;;
-               esac
-               ;;
-       iop)
-               basic_machine=mipsel-scei
-               os=-irx
-               ;;
-       dvp)
-               basic_machine=dvp-scei
-               os=-elf
-               ;;
        mips3*-*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
                ;;
@@ -854,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1088,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1271,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1292,8 +1302,8 @@ case $os in
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1306,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1314,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1447,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1487,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
index 772389f..bbf627f 100755 (executable)
@@ -1,20 +1,24 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for xeyes 1.1.0.
+# Generated by GNU Autoconf 2.68 for xeyes 1.1.1.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
+#
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -22,23 +26,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   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
-
 as_nl='
 '
 export as_nl
@@ -46,7 +42,13 @@ export as_nl
 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
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# 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
@@ -57,7 +59,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -80,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -96,15 +91,16 @@ fi
 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
 
      ;;
@@ -116,12 +112,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  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='> '
@@ -133,7 +133,257 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  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=.
+  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
+            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
+
+
+      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 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 and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
+
+# 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"
+
+
+} # 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
+
+
+# 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
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -147,8 +397,12 @@ 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\(//\)$' \| \
@@ -168,415 +422,127 @@ $as_echo X/"$0" |
          }
          s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# 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
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
+  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/=
+  ' <$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" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  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
+  # 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
 }
 
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
+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 2>/dev/null
 fi
-
-if as_func_ret_success; then
-  :
+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'
+  fi
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_ln_s='cp -p'
 fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
 fi
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
 fi
+as_executable_p=$as_test_x
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
-(
-  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
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-IFS=$as_save_IFS
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-      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=:
-  # 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 ;;
-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=:
-  # 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 ;;
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf@gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  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" ||
-    { $as_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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 2>/dev/null
-fi
-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'
-  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
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&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`
 
@@ -591,15 +557,16 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='xeyes'
 PACKAGE_TARNAME='xeyes'
-PACKAGE_VERSION='1.1.0'
-PACKAGE_STRING='xeyes 1.1.0'
+PACKAGE_VERSION='1.1.1'
+PACKAGE_STRING='xeyes 1.1.1'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
 
+ac_unique_file="Makefile.am"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -644,6 +611,10 @@ XRENDER_LIBS
 XRENDER_CFLAGS
 XEYES_LIBS
 XEYES_CFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
 DRIVER_MAN_DIR
 MISC_MAN_DIR
@@ -656,6 +627,7 @@ MISC_MAN_SUFFIX
 FILE_MAN_SUFFIX
 LIB_MAN_SUFFIX
 APP_MAN_SUFFIX
+SED
 host_os
 host_vendor
 host_cpu
@@ -667,8 +639,6 @@ build
 INSTALL_CMD
 PKG_CONFIG
 CHANGELOG_CMD
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
 CWARNFLAGS
 EGREP
 GREP
@@ -745,6 +715,7 @@ bindir
 program_transform_name
 prefix
 exec_prefix
+PACKAGE_URL
 PACKAGE_BUGREPORT
 PACKAGE_STRING
 PACKAGE_VERSION
@@ -757,9 +728,8 @@ ac_user_opts='
 enable_option_checking
 enable_maintainer_mode
 enable_dependency_tracking
-enable_silent_rules
 enable_strict_compilation
-with_release_version
+enable_silent_rules
 with_xrender
 '
       ac_precious_vars='build_alias
@@ -838,8 +808,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.
@@ -884,8 +855,7 @@ do
     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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -911,8 +881,7 @@ do
     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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -1116,8 +1085,7 @@ do
     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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -1133,8 +1101,7 @@ do
     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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      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
@@ -1164,17 +1131,17 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { $as_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 &&
-      { $as_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 ;;
 
@@ -1183,7 +1150,7 @@ Try \`$0 --help' for more information." >&2
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1191,15 +1158,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_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_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1222,8 +1187,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { $as_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'
@@ -1237,8 +1201,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $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
+    $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
@@ -1253,11 +1217,9 @@ 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 .` ||
-  { $as_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" ||
-  { $as_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.
@@ -1296,13 +1258,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_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" || { $as_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
@@ -1328,7 +1288,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xeyes 1.1.0 to adapt to many kinds of systems.
+\`configure' configures xeyes 1.1.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1342,7 +1302,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
@@ -1398,7 +1358,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xeyes 1.1.0:";;
+     short | recursive ) echo "Configuration of xeyes 1.1.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1410,17 +1370,15 @@ Optional Features:
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')
   --enable-strict-compilation
                           Enable all warnings from compiler and make them
                           errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
   --with-xrender          Use Xrender for rendering (Default is YES)
 
 Some influential environment variables:
@@ -1429,7 +1387,7 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xeyes configure 1.1.0
-generated by GNU Autoconf 2.63
+xeyes configure 1.1.1
+generated by GNU Autoconf 2.68
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 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
-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 xeyes $as_me 1.1.0, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  $ $0 $@
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-_ACEOF
-exec 5>>config.log
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+  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
 
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-_ASUNAME
+} # ac_fn_c_try_compile
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_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_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\""
+$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_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
+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 xeyes $as_me 1.1.1, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 } >&5
@@ -1596,9 +1751,9 @@ do
       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
@@ -1614,13 +1769,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
@@ -1632,11 +1787,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1645,13 +1798,13 @@ _ASBOX
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_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) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -1670,11 +1823,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1687,11 +1838,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1705,11 +1854,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1723,46 +1870,53 @@ _ASBOX
     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"
 _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 an explicitly selected file to automatically selected ones.
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$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
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1773,19 +1927,23 @@ fi
 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
   test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+  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
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+  # 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";;
@@ -1793,7 +1951,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
 $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -1808,11 +1966,11 @@ 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,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { $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:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+      { $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=: ;;
     ,);;
@@ -1822,17 +1980,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
        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:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+         { $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:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+         { $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:$LINENO:   former value:  \`$ac_old_val'" >&5
+       { $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:$LINENO:   current value: \`$ac_new_val'" >&5
+       { $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
@@ -1844,43 +2002,20 @@ $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
     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
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { $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:$LINENO: error: changes in the environment can compromise the build" >&5
+  { $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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+  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'
@@ -1889,6 +2024,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Initialize Automake
 am__api_version='1.11'
 
 ac_aux_dir=
@@ -1908,9 +2048,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_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,
@@ -1936,10 +2074,10 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 # 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:$LINENO: checking for a BSD-compatible install" >&5
+{ $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
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -1947,11 +2085,11 @@ 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.
@@ -1988,7 +2126,7 @@ case $as_dir/ in
     ;;
 esac
 
-done
+  done
 IFS=$as_save_IFS
 
 rm -rf conftest.one conftest.two conftest.dir
@@ -2004,7 +2142,7 @@ fi
     INSTALL=$ac_install_sh
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+{ $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}.
@@ -2015,7 +2153,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
@@ -2026,15 +2164,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2056,11 +2190,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -2069,13 +2200,10 @@ then
    # Ok.
    :
 else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
@@ -2103,7 +2231,7 @@ if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
@@ -2124,9 +2252,9 @@ if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2137,24 +2265,24 @@ 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_STRIP="${ac_tool_prefix}strip"
-    $as_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
 STRIP=$ac_cv_prog_STRIP
 if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
 $as_echo "$STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2164,9 +2292,9 @@ if test -z "$ac_cv_prog_STRIP"; then
   ac_ct_STRIP=$STRIP
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2177,24 +2305,24 @@ 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_STRIP="strip"
-    $as_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_STRIP=$ac_cv_prog_ac_ct_STRIP
 if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
 $as_echo "$ac_ct_STRIP" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2203,7 +2331,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2216,10 +2344,10 @@ fi
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+{ $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2227,7 +2355,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in mkdir gmkdir; do
+    for ac_prog in mkdir gmkdir; do
         for ac_exec_ext in '' $ac_executable_extensions; do
           { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
           case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
@@ -2239,11 +2367,12 @@ do
           esac
         done
        done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 
+  test -d ./--version && rmdir ./--version
   if test "${ac_cv_path_mkdir+set}" = set; then
     MKDIR_P="$ac_cv_path_mkdir -p"
   else
@@ -2251,11 +2380,10 @@ fi
     # value for MKDIR_P within a source directory, because that will
     # break other packages using the cache if that directory is
     # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
     MKDIR_P="$ac_install_sh -d"
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
 $as_echo "$MKDIR_P" >&6; }
 
 mkdir_p="$MKDIR_P"
@@ -2268,9 +2396,9 @@ for ac_prog in gawk mawk nawk awk
 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:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2281,24 +2409,24 @@ 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_AWK="$ac_prog"
-    $as_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
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
 $as_echo "$AWK" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2306,11 +2434,11 @@ fi
   test -n "$AWK" && break
 done
 
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2318,7 +2446,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2328,11 +2456,11 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
   SET_MAKE=
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
@@ -2352,9 +2480,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2370,7 +2496,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xeyes'
- VERSION='1.1.0'
+ VERSION='1.1.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2411,16 +2537,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
-{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
+if test "${enable_maintainer_mode+set}" = set; then :
   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
   USE_MAINTAINER_MODE=no
 fi
 
-  { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
 $as_echo "$USE_MAINTAINER_MODE" >&6; }
    if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
@@ -2434,10 +2560,7 @@ fi
 
 
 
-ac_config_headers="$ac_config_headers config.h"
-
-
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 
 
 
@@ -2461,7 +2584,7 @@ am__doit:
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
 $as_echo_n "checking for style of include used by $am_make... " >&6; }
 am__include="#"
 am__quote=
@@ -2489,12 +2612,12 @@ if test "$am__include" = "#"; then
 fi
 
 
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
 $as_echo "$_am_result" >&6; }
 rm -f confinc confmf
 
 # Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
+if test "${enable_dependency_tracking+set}" = set; then :
   enableval=$enable_dependency_tracking;
 fi
 
@@ -2519,9 +2642,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2532,24 +2655,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2559,9 +2682,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2572,24 +2695,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2598,7 +2721,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2612,9 +2735,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2625,24 +2748,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2652,9 +2775,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2666,18 +2789,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"
-    $as_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
@@ -2696,10 +2819,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2711,9 +2834,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2724,24 +2847,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2755,9 +2878,9 @@ 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2768,24 +2891,24 @@ 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"
-    $as_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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2798,7 +2921,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -2809,57 +2932,37 @@ fi
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+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_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+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:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
+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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_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
@@ -2875,8 +2978,8 @@ 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.
-{ $as_echo "$as_me:$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}: 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:
@@ -2892,17 +2995,17 @@ do
 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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,
@@ -2919,7 +3022,7 @@ do
        # 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
@@ -2938,84 +3041,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 else
   ac_file=''
 fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_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
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $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:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+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.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_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
-$as_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
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
 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.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+{ $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"
+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:$LINENO: $ac_try_echo\""
-$as_echo "$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=$?
-  $as_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
@@ -3030,57 +3090,108 @@ for ac_file in conftest.exe conftest conftest.*; do
   esac
 done
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { { $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:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+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
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; 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 <stdio.h>
 int
 main ()
 {
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+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:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&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=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
+  $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
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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>&5
+  ac_status=$?
+  $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 | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
@@ -3090,31 +3201,23 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $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:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+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:$LINENO: result: $ac_cv_objext" >&5
+{ $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
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then
+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
@@ -3128,37 +3231,16 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+{ $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
@@ -3167,20 +3249,16 @@ else
 fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+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
@@ -3191,35 +3269,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
@@ -3230,36 +3284,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
@@ -3270,42 +3300,17 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+{ $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
@@ -3322,18 +3327,14 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+{ $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 test "${ac_cv_prog_cc_c89+set}" = set; then
+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 <stdarg.h>
 #include <stdio.h>
@@ -3390,32 +3391,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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
@@ -3426,17 +3404,19 @@ fi
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 $as_echo "none needed" >&6; } ;;
   xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+    { $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:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+    { $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'
@@ -3446,9 +3426,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 depcc="$CC"   am_compiler_list=
 
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3556,7 +3536,7 @@ else
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
@@ -3571,133 +3551,203 @@ else
 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:$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
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
 #else
-# include <assert.h>
+  your preprocessor is broken;
 #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
 
-rm -f conftest.err conftest.$ac_ext
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
 
-  # 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
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
+typedef const char *ccp;
 
-rm -f conftest.err conftest.$ac_ext
+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;
+}
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
 
-    done
-    ac_cv_prog_CPP=$CPP
+  const char *str;
+  int number;
+  float fnumber;
 
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+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
@@ -3706,11 +3756,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -3719,87 +3765,99 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 <ac_nonexistent.h>
 _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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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.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
+{ $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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-rm -f conftest.err 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 <ac_nonexistent.h>
+_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.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { { $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:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3809,9 +3867,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+{ $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 test "${ac_cv_path_GREP+set}" = set; then
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -3822,7 +3880,7 @@ 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_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
@@ -3842,7 +3900,7 @@ case `"$ac_path_GREP" --version 2>&1` in
     $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"
@@ -3857,26 +3915,24 @@ esac
       $ac_path_GREP_found && break 3
     done
   done
-done
+  done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+    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:$LINENO: result: $ac_cv_path_GREP" >&5
+{ $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:$LINENO: checking for egrep" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -3890,7 +3946,7 @@ 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_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
@@ -3910,7 +3966,7 @@ case `"$ac_path_EGREP" --version 2>&1` in
     $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"
@@ -3925,12 +3981,10 @@ esac
       $ac_path_EGREP_found && break 3
     done
   done
-done
+  done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+    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
@@ -3938,21 +3992,17 @@ fi
 
    fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+{ $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:$LINENO: checking for ANSI C header files" >&5
+{ $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 test "${ac_cv_header_stdc+set}" = set; then
+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 <stdlib.h>
 #include <stdarg.h>
@@ -3967,48 +4017,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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 <string.h>
 
 _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
@@ -4018,18 +4043,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 <stdlib.h>
 
 _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
@@ -4039,14 +4060,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 <ctype.h>
 #include <stdlib.h>
@@ -4073,338 +4090,51 @@ 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-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
+if ac_fn_c_try_run "$LINENO"; then :
 
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+  ac_cv_header_stdc=no
 fi
-rm -rf conftest.dSYM
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+{ $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
 
 # 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
 
+done
 
 
 
 
-
-
-
-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`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; 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
-/* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-   { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __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
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  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 void
-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;
-  float fnumber;
-
-  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);
-}
-
-int
-main ()
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  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[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_c99=$ac_arg
-else
-  $as_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_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c99"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -4417,14 +4147,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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_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
 
   ;;
@@ -4432,10 +4162,10 @@ esac
 fi
 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
 $as_echo "$PKG_CONFIG" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4445,9 +4175,9 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
   ac_pt_PKG_CONFIG=$PKG_CONFIG
   # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4460,14 +4190,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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_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
 
   ;;
@@ -4475,10 +4205,10 @@ esac
 fi
 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -4487,7 +4217,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $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
@@ -4500,13 +4230,13 @@ fi
 fi
 if test -n "$PKG_CONFIG"; then
        _pkg_min_version=0.9.0
-       { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        else
-               { $as_echo "$as_me:$LINENO: result: no" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
@@ -4514,35 +4244,27 @@ $as_echo "no" >&6; }
 fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4558,28 +4280,24 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4595,73 +4313,91 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
 
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
        ;;
     esac
 else
-    { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___SUNPRO_C=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
     fi
 fi
 
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=0;;
-esac
-AM_BACKSLASH='\'
-
-
 
 
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 
 
 
 # Check whether --enable-strict-compilation was given.
-if test "${enable_strict_compilation+set}" = set; then
+if test "${enable_strict_compilation+set}" = set; then :
   enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
 else
   STRICT_COMPILE=no
 fi
 
 if test "x$STRICT_COMPILE" = "xyes"; then
-       { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___SUNPRO_C=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
 fi
 
-       { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
-$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
-if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __INTEL_COMPILER
-  (void) __INTEL_COMPILER;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___INTEL_COMPILER=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___INTEL_COMPILER=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
-$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
   INTELCC="yes"
 else
   INTELCC="no"
@@ -4829,20 +4449,6 @@ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
 
 
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
 _ACEOF
@@ -4875,11 +4481,12 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
 
 
 
-macros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros)
-INSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
 
 
 
 
 
 
+XORG_MAN_PAGE="X Version 11"
 
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
 
-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
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
 fi
 
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
 
-fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
+# Checks for pkg-config packages
 
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEYES" >&5
+$as_echo_n "checking for XEYES... " >&6; }
 
+if test -n "$XEYES_CFLAGS"; then
+    pkg_cv_XEYES_CFLAGS="$XEYES_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11 xt xext xmu") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XEYES_CFLAGS=`$PKG_CONFIG --cflags "x11 xt xext xmu" 2>/dev/null`
+else
+  pkg_failed=yes
 fi
+ else
+    pkg_failed=untried
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+if test -n "$XEYES_LIBS"; then
+    pkg_cv_XEYES_LIBS="$XEYES_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11 xt xext xmu") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XEYES_LIBS=`$PKG_CONFIG --libs "x11 xt xext xmu" 2>/dev/null`
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
 
-  fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-{ $as_echo "$as_me:$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 test "${ac_cv_c_compiler_gnu+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-{ $as_echo "$as_me:$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
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_g=yes
-else
-  $as_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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_g=yes
-else
-  $as_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
-{ $as_echo "$as_me:$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
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; 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
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_c89=$ac_arg
-else
-  $as_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
-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:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-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
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$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
-  $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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           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
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$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.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-# Checks for pkg-config packages
-
-pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for XEYES" >&5
-$as_echo_n "checking for XEYES... " >&6; }
-
-if test -n "$XEYES_CFLAGS"; then
-    pkg_cv_XEYES_CFLAGS="$XEYES_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu\"") >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xt xext xmu") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XEYES_CFLAGS=`$PKG_CONFIG --cflags "x11 xt xext xmu" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XEYES_LIBS"; then
-    pkg_cv_XEYES_LIBS="$XEYES_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu\"") >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xt xext xmu") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XEYES_LIBS=`$PKG_CONFIG --libs "x11 xt xext xmu" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
                XEYES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xt xext xmu" 2>&1`
@@ -5916,18 +4648,7 @@ fi
        # Put the nasty error message in config.log where it belongs
        echo "$XEYES_PKG_ERRORS" >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xt xext xmu) were not met:
-
-$XEYES_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XEYES_CFLAGS
-and XEYES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (x11 xt xext xmu) were not met:
+       as_fn_error $? "Package requirements (x11 xt xext xmu) were not met:
 
 $XEYES_PKG_ERRORS
 
@@ -5937,12 +4658,11 @@ installed software in a non-standard prefix.
 Alternatively, you may set the environment variables XEYES_CFLAGS
 and XEYES_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+       { { $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:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -5951,32 +4671,18 @@ and XEYES_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XEYES_CFLAGS
-and XEYES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        XEYES_CFLAGS=$pkg_cv_XEYES_CFLAGS
        XEYES_LIBS=$pkg_cv_XEYES_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        :
 fi
-XEYES_CFLAGS="$CWARNFLAGS $XEYES_CFLAGS"
-
-
 
 
 # Check whether --with-xrender was given.
-if test "${with_xrender+set}" = set; then
+if test "${with_xrender+set}" = set; then :
   withval=$with_xrender; use_xrender="$withval"
 else
   use_xrender="try"
@@ -5985,18 +4691,18 @@ fi
 if test x$use_xrender != xno ; then
 
 pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for XRENDER" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRENDER" >&5
 $as_echo_n "checking for XRENDER... " >&6; }
 
 if test -n "$XRENDER_CFLAGS"; then
     pkg_cv_XRENDER_CFLAGS="$XRENDER_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender >= 0.4\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xrender >= 0.4\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xrender >= 0.4") 2>&5
   ac_status=$?
-  $as_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
   pkg_cv_XRENDER_CFLAGS=`$PKG_CONFIG --cflags "xrender >= 0.4" 2>/dev/null`
 else
   pkg_failed=yes
@@ -6008,11 +4714,11 @@ if test -n "$XRENDER_LIBS"; then
     pkg_cv_XRENDER_LIBS="$XRENDER_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xrender >= 0.4\"") >&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xrender >= 0.4\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xrender >= 0.4") 2>&5
   ac_status=$?
-  $as_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
   pkg_cv_XRENDER_LIBS=`$PKG_CONFIG --libs "xrender >= 0.4" 2>/dev/null`
 else
   pkg_failed=yes
@@ -6038,18 +4744,7 @@ fi
        # Put the nasty error message in config.log where it belongs
        echo "$XRENDER_PKG_ERRORS" >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xrender >= 0.4) were not met:
-
-$XRENDER_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XRENDER_CFLAGS
-and XRENDER_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xrender >= 0.4) were not met:
+       as_fn_error $? "Package requirements (xrender >= 0.4) were not met:
 
 $XRENDER_PKG_ERRORS
 
@@ -6059,22 +4754,11 @@ installed software in a non-standard prefix.
 Alternatively, you may set the environment variables XRENDER_CFLAGS
 and XRENDER_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+       { { $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:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XRENDER_CFLAGS
-and XRENDER_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -6083,21 +4767,16 @@ and XRENDER_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        XRENDER_CFLAGS=$pkg_cv_XRENDER_CFLAGS
        XRENDER_LIBS=$pkg_cv_XRENDER_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        :
 fi
-       XEYES_CFLAGS="$XEYES_CFLAGS $XRENDER_CFLAGS"
-       XEYES_LIBS="$XEYES_LIBS $XRENDER_LIBS"
 
-cat >>confdefs.h <<\_ACEOF
-#define XRENDER 1
-_ACEOF
+$as_echo "#define XRENDER 1" >>confdefs.h
 
 fi
 
@@ -6130,13 +4809,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_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) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -6144,8 +4823,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
   (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 quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -6167,12 +4846,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+    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;}
-    cat confcache >$cache_file
+      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
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+    { $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
@@ -6186,14 +4876,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=`$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
 
@@ -6209,41 +4900,26 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+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.
@@ -6253,17 +4929,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## 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=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -6271,23 +4948,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   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
-
 as_nl='
 '
 export as_nl
@@ -6295,7 +4964,13 @@ export as_nl
 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
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# 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
@@ -6306,7 +4981,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
        expr "X$arg" : "X\\(.*\\)$as_nl";
        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -6329,13 +5004,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -6345,15 +5013,16 @@ fi
 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
 
      ;;
@@ -6365,12 +5034,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  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='> '
@@ -6382,7 +5055,89 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# 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
+
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -6396,8 +5151,12 @@ 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\(//\)$' \| \
@@ -6417,76 +5176,25 @@ $as_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" ||
-    { $as_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
@@ -6515,8 +5223,56 @@ 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
@@ -6535,10 +5291,10 @@ else
       if test -d "$1"; then
        test -d "$1/.";
       else
-       case $1 in
+       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
   '
@@ -6553,13 +5309,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 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 xeyes $as_me 1.1.0, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+This file was extended by xeyes $as_me 1.1.1, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6591,13 +5353,15 @@ _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 [OPTION]... [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
   -q, --quiet, --silent
                    do not print progress messages
   -d, --debug      don't remove temporary files
@@ -6616,16 +5380,17 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xeyes config.status 1.1.0
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+xeyes config.status 1.1.1
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2008 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."
 
@@ -6643,11 +5408,16 @@ 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
@@ -6661,27 +5431,29 @@ do
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     $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
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { $as_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 )
     $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -6689,11 +5461,10 @@ Try \`$0 --help' for more information." >&2
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { $as_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
@@ -6748,9 +5519,7 @@ do
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_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
 
@@ -6773,26 +5542,24 @@ 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")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6800,7 +5567,13 @@ $debug ||
 if test -n "$CONFIG_FILES"; then
 
 
-ac_cr='\r'
+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 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
   ac_cs_awk_cr='\\r'
@@ -6808,7 +5581,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -6817,24 +5590,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  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
   . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   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
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_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
@@ -6842,7 +5609,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -6856,7 +5623,7 @@ s/'"$ac_delim"'$//
 t delim
 :nl
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more1
 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
 p
@@ -6870,7 +5637,7 @@ s/.\{148\}//
 t nl
 :delim
 h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
 t more2
 s/["\\]/\\&/g; s/^/"/; s/$/"/
 p
@@ -6890,7 +5657,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -6922,23 +5689,29 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
+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
@@ -6950,7 +5723,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6962,13 +5735,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -7053,9 +5824,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -7068,9 +5837,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_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
@@ -7089,7 +5856,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
     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 `:'.
@@ -7098,12 +5865,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_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
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
+      as_fn_append ac_file_inputs " '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -7114,7 +5879,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
        `' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+      { $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.
@@ -7126,10 +5891,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -7157,47 +5920,7 @@ $as_echo X"$ac_file" |
            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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_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
@@ -7254,7 +5977,6 @@ 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=
-
 ac_sed_dataroot='
 /datarootdir/ {
   p
@@ -7264,12 +5986,11 @@ ac_sed_dataroot='
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p
-'
+/@mandir@/p'
 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:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+  { $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 || ac_write_fail=1
@@ -7279,7 +6000,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
@@ -7307,27 +6028,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+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"; } &&
-  { $as_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
+  { 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;}
+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";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -7336,27 +6054,21 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+      && 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" \
-       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -7394,7 +6106,7 @@ $as_echo X"$_am_arg" |
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
 $as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
@@ -7489,47 +6201,7 @@ $as_echo X"$file" |
            q
          }
          s/.*/./; q'`
-      { as_dir=$dirpart/$fdir
-  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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
       # echo "creating $dirpart/$file"
       echo '# dummy' > "$dirpart/$file"
     done
@@ -7541,15 +6213,12 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
 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_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -7570,10 +6239,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:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+  { $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
 
index 55a7a1e..6e1e315 100644 (file)
@@ -1,6 +1,6 @@
 
 dnl  Copyright 2005 Red Hat, Inc.
-dnl 
+dnl
 dnl  Permission to use, copy, modify, distribute, and sell this software and its
 dnl  documentation for any purpose is hereby granted without fee, provided that
 dnl  the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@ dnl  advertising or publicity pertaining to distribution of the software without
 dnl  specific, written prior permission.  Red Hat makes no
 dnl  representations about the suitability of this software for any purpose.  It
 dnl  is provided "as is" without express or implied warranty.
-dnl 
+dnl
 dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -21,35 +21,30 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xeyes,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xeyes)
+# Initialize Autoconf
+AC_PREREQ([2.60])
+AC_INIT([xeyes], [1.1.1],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xeyes])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-AM_CONFIG_HEADER(config.h)
-
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-AC_PROG_CC
-AC_PROG_INSTALL
-
-
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XEYES, x11 xt xext xmu)
-XEYES_CFLAGS="$CWARNFLAGS $XEYES_CFLAGS"
-AC_SUBST(XEYES_CFLAGS)
-AC_SUBST(XEYES_LIBS)
 
 dnl Optional dependencies
 AC_ARG_WITH(xrender, AC_HELP_STRING([--with-xrender],[Use Xrender for rendering (Default is YES)]),use_xrender="$withval",use_xrender="try")
 if test x$use_xrender != xno ; then
        PKG_CHECK_MODULES(XRENDER, [xrender >= 0.4])
-       XEYES_CFLAGS="$XEYES_CFLAGS $XRENDER_CFLAGS"
-       XEYES_LIBS="$XEYES_LIBS $XRENDER_LIBS"
        AC_DEFINE([XRENDER],1,[Define to use X Render Extension])
 fi
 
index 5f63516..ae6eb2e 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * transformed coordinate system objects for X
  */
-/* $XFree86: xc/programs/xeyes/transform.c,v 1.3 2000/02/17 14:00:35 dawes Exp $ */
 
 # include      <X11/Xos.h>
 # include      <stdlib.h>
index 7567fcc..e2f5467 100644 (file)
@@ -2,7 +2,6 @@
  * header file for transformed coordinate system.  No rotations
  * supported, as elipses cannot be rotated in X.
  */
-/* $XFree86$ */
 
 typedef struct _transform {
        double  mx, bx;
index 276a084..c58436d 100644 (file)
@@ -1,4 +1,3 @@
-/* $XConsortium: xeyes.c,v 1.16 94/04/17 20:45:23 rws Exp $ */
 /*
 
 Copyright (c) 1991  X Consortium
@@ -28,7 +27,6 @@ other dealings in this Software without prior written authorization
 from the X Consortium.
 
 */
-/* $XFree86: xc/programs/xeyes/xeyes.c,v 1.3 2000/02/17 14:00:35 dawes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -38,8 +36,8 @@ from the X Consortium.
 #include <X11/StringDefs.h>
 #include <X11/Shell.h>
 #include "Eyes.h"
-#include <stdio.h> 
-#include <stdlib.h> 
+#include <stdio.h>
+#include <stdlib.h>
 #include "eyes.bit"
 #include "eyesmask.bit"
 
@@ -49,18 +47,15 @@ static void
 usage(void)
 {
     fprintf(stderr,
-"usage: xeyes\n");
-    fprintf (stderr, 
-"       [-geometry [{width}][x{height}][{+-}{xoff}[{+-}{yoff}]]] [-display [{host}]:[{vs}]]\n");
-    fprintf(stderr,
-"       [-fg {color}] [-bg {color}] [-bd {color}] [-bw {pixels}]");
-    fprintf(stderr, " [-shape | +shape]");
-    fprintf(stderr, "\n");
-    fprintf(stderr,
-"       [-outline {color}] [-center {color}] [-backing {backing-store}] [-distance]\n");
+           "usage: xeyes\n"
+           "       [-display [{host}]:[{vs}]]\n"
+           "       [-geometry [{width}][x{height}][{+-}{xoff}[{+-}{yoff}]]]\n"
+           "       [-fg {color}] [-bg {color}] [-bd {color}] [-bw {pixels}]\n"
+           "       [-shape | +shape] [-outline {color}] [-center {color}]\n"
+           "       [-backing {backing-store}] [-distance]\n");
 #ifdef XRENDER
     fprintf(stderr,
-"       [-render | +render]\n");
+           "       [-render | +render]\n");
 #endif
     exit(1);
 }
@@ -87,7 +82,7 @@ static Atom wm_delete_window;
 static void
 quit(Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
-    if (event->type == ClientMessage && 
+    if (event->type == ClientMessage &&
        event->xclient.data.l[0] != wm_delete_window) {
        XBell(XtDisplay(w), 0);
     } else {
@@ -107,10 +102,10 @@ main(int argc, char **argv)
     Widget toplevel;
     Arg arg[2];
     Cardinal i;
-    
+
     XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
 
-    toplevel = XtAppInitialize(&app_context, "XEyes", 
+    toplevel = XtAppInitialize(&app_context, "XEyes",
                               options, XtNumber(options), &argc, argv,
                               NULL, arg, (Cardinal) 0);
     if (argc != 1) usage();
@@ -120,14 +115,14 @@ main(int argc, char **argv)
     XtAppAddActions(app_context, actions, XtNumber(actions));
     XtOverrideTranslations
        (toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: quit()"));
-    
+
     i = 0;
-    XtSetArg (arg[i], XtNiconPixmap, 
+    XtSetArg (arg[i], XtNiconPixmap,
              XCreateBitmapFromData (XtDisplay(toplevel),
                                     XtScreen(toplevel)->root,
                                     (char *)eyes_bits, eyes_width, eyes_height));
     i++;
-    XtSetArg (arg[i], XtNiconMask, 
+    XtSetArg (arg[i], XtNiconMask,
              XCreateBitmapFromData (XtDisplay(toplevel),
                                     XtScreen(toplevel)->root,
                                     (char *)eyesmask_bits,
index 1685af2..db144b9 100644 (file)
@@ -1,7 +1,3 @@
-.\" $XConsortium: xeyes.man,v 1.12 94/04/17 20:45:24 gildea Exp $
-.\"
-.\" $XFree86: xc/programs/xeyes/xeyes.man,v 1.3 2001/01/27 18:21:12 dawes Exp $
-.\"
 .TH XEYES 1 __xorgversion__
 .SH NAME
 xeyes \- a follow the mouse X demo
similarity index 70%
rename from xmore/xmore.h
rename to xfd/COPYING
index 101f73a..73f9f5f 100644 (file)
@@ -1,7 +1,4 @@
-/*
- * $Xorg: xmore.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
+Copyright 1989, 1993, 1994, 1998  The Open Group
 
 Permission to use, copy, modify, distribute, and sell this software and its
 documentation for any purpose is hereby granted without fee, provided that
@@ -22,20 +19,3 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 Except as contained in this notice, the name of The Open Group shall not be
 used in advertising or otherwise to promote the sale, use or other dealings
 in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef XMORE_XMORE_H
-#define XMORE_XMORE_H 1
-
-#include <X11/Intrinsic.h>
-
-typedef struct {
-  Boolean  verbose;
-  XFontSet textfont;
-} XMoreResourceData, *XMoreResourceDataPtr;
-
-#define STANDARDFONT "-adobe-courier-medium-r-normal--12-*-*-*-*-*," \
-                      "-*-*-*-*-*-*-12-*-*-*-*-*"
-
-#endif /* !XMORE_XMORE_H */
diff --git a/xfd/ChangeLog b/xfd/ChangeLog
new file mode 100644 (file)
index 0000000..f8e06a6
--- /dev/null
@@ -0,0 +1,471 @@
+commit 6b2c1c93d9d7914d7d8e0a65c3de9c6b76c71b5f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Oct 20 21:44:30 2010 -0700
+
+    xfd 1.1.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a63c2b401e23ca80b457d378259122b7940a3bab
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Sep 26 17:14:59 2010 -0700
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5624d27b3b64410b7c66044853d775e9a0f4a33b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Sep 26 17:14:31 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    Enables use of platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit efea1a6413d758753c625eeecdb74fc1e3beb05b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit c997e34d623e69c614778d2264e184b69fc6a590
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Apr 1 16:40:39 2010 -0400
+
+    config: ignore xfd.po file when gettext is used
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 19671092fce79699d7bd306ae4f906347fe8d68e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Mar 31 17:12:37 2010 -0400
+
+    config: update and relocate AX_DEFINE_DIR macro
+    
+    Remove deprecated acinclude.m4 macro container file
+    Use separate macro files as per autoconf recommendation
+    Use the latest macro from GNU
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ee8deed4006d89231f71e3692d487eeaf1fd312c
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Feb 14 15:29:04 2010 +0100
+
+    Let xfd build on systems without gettext.
+    
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit cc62d8127797a769fb83c719a499290b780e0307
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 22:53:15 2010 -0800
+
+    Use AM_V_GEN to silence manpage generation too
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 169e6d230f09627500d9c417350d3a8a9aa4dba4
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 22:45:46 2010 -0800
+
+    Clean up CFLAGS/LIB settings in configure.ac & Makefile.am
+    
+     - Use AM_CFLAGS so AM_PROG_CC_C_O isn't needed
+     - Combine pkg-config calls now that we don't need special handling for Xaw
+     - Add dependencies on libXmu & libXrender since xfd calls functions in
+       those directly
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 12a1392fc96e32ed6d55208a2a7fc040617a9cb7
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:20:56 2010 -0800
+
+    Integrate gettext support with autotools build system
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit b83ec6e3a79e30b8a7a3947679221ad76441b27f
+Author: Jay Hobson <jay.hobson@sun.com>
+Date:   Fri Aug 4 10:36:37 2000 -0700
+
+    Internationalize xfd: Call gettext on strings printed to stderr
+    
+    Originally done for Solaris 9 to fix Sun bug 4348474
+    http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4348474
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit cf8659cf40ed338c00bde2b4248bc6e9f8766248
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jan 7 09:54:42 2010 -0800
+
+    Fill in COPYING with notices from source code & man page
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit eb90d66bf80637ed3f4aceae7a004d117f915fcd
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jan 7 09:53:07 2010 -0800
+
+    Bump xorg-macros requirement to 1.4 for XORG_INSTALL changes
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit ffdbeb4d57344a6a8fdb76ccb9ac6690acba1bb4
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 36824d2a0fc22da07e6f81cc344dd1b8b5d648dc
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:53 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit 13b9256eccd0516da11e10ac0c6e1913d319b4f5
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit c00de683965a7eda68af8f50dc065b4eea1daf94
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 9fddcf802fc0301a7155eef301070ab23ebdf3cc
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:38 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit bcb7f696b30dbb3abdb3c01903c7102b725bf71e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit c0bbbeb349baab668437d4396074ef97a221e144
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:23 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit d8a9d9cd11fc9d3fca03add3bc830a49139cce20
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Tue Jan 20 20:37:10 2009 -0200
+
+    Correct make distcheck and sparse warnings.
+
+commit 18323bb7de4573dc32ab38abe634d7035d9bf882
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Nov 10 20:12:14 2008 +0100
+
+    enable VPATH build, reorganize app default files
+
+commit ac2f229757ee60eedeb0aeb0d3ed858cf26dfd07
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Wed Aug 20 10:32:51 2008 -0400
+
+    xaw8 is gone, use xaw7
+
+commit fd81704532095ae9246b50305906f626bce1ada5
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:33:41 2008 -0700
+
+    Added missing AM_PROG_CC_C_O
+
+commit e5359d2724aaffcb4a775683784b5a89c1d9c8b5
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:07:59 2008 -0700
+
+    Build fix for file systems that are not case sensitive
+
+commit 528cd6ad67acbc94941835534b6f35395d1f8f94
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Feb 22 20:09:29 2008 -0800
+
+    Update man page to better reflect Xft support
+
+commit b5d88c984bd60ea9ef50dd3a12e748bb5b98ec2b
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 16:37:13 2007 -0500
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit 55302c14597dc6fd13aa81df56e66ec3e0d0c55e
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:51:22 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 2cd9919e16f49aab8d431fe8d0c008593511edcd
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Aug 23 19:24:47 2007 -0400
+
+    Rename .cvsignore to .gitignore
+
+commit 8df52309e79cc6d439ca7d8cc6ac64c8041970f9
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:50 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit e3a1d0cbb33a01b18a28fe8a65c60da15fb29a4e
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:43 2005 +0000
+
+    Stub COPYING files
+
+commit 7da6b54aa3e3c4b7c067d853a1664a421706c1fa
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:06 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit 1e549821dd9fbb322dc9b620f65fa15bd4991279
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 7 16:17:59 2005 +0000
+
+    Change to use the app-defaults default dir configured in libXt.
+
+commit eaa39449a305ef83612f35efa2028aa457666d5a
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:21 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 98c0e649ce6e73effa89309720ce6bf7685cb05c
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:20 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 03f1097ac09995ec729af3d90ff16dc96f687ad5
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:41 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 4d7dee81100f1b4aad88df1821ca76170747c6cd
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:35:00 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit f26ae03ec0717a520293ab9080bfcbe374aa4a23
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:52 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit be4c5faf50238bdb2b66dd9e47233a887a13ea48
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:53 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit 9f611ea299778259fe32babf8ef1fddbba5d60e0
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:32:54 2005 +0000
+
+    Change default install dir for app-default files from
+        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
+        the monolith & allow localization
+
+commit e7eff33b947e45c4af7b592f915cd3af86d2238b
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:22 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 32644189014a12f97dfe5a54f2f1369f1de07ee6
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:45 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit bd8980b53fe42bd02524fffd77aea85895fd8b22
+Author: Kristian Høgsberg <krh@redhat.com>
+Date:   Tue Sep 27 20:23:15 2005 +0000
+
+    Update configure.ac to not require xaw8.
+
+commit aafc1f6428ecdcb858e954ad7e5f866a07782851
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Sun Aug 28 19:39:54 2005 +0000
+
+    Bug #3424: Xft and high-index glyph fixes for xfd (James Cloos)
+
+commit 9e2944c39c197c7b70ac26f1e56beb9085769f63
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:29 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit 63e5c79c6d324501f2030cebf47fca54279f27e9
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:32 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit 84402c21218d680e062d1effd217472d5a0d98dd
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Wed Jul 27 22:41:14 2005 +0000
+
+    Add _BSD_SOURCE to xfd
+
+commit 14d8dcd0ff4fbe796a86395e0b0cc81bd0859bf4
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Jul 26 15:44:02 2005 +0000
+
+    Replace more GNU make-ism's with more portable macros
+
+commit 3bc92b088c824cdf1f34ed09f71401daf9a755de
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sat Jul 23 16:22:09 2005 +0000
+
+    - fix remaining DEP_{CFLAGS,LIBS} reference
+    - add explicit check for xaw8
+
+commit f92b9fbe0d87f9702d4e3b3743cf110cd9cdaf30
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sat Jul 23 16:21:03 2005 +0000
+
+    fix GNU-make only app-default rule
+
+commit 875c7f079c6230e8a09e53904e64277360ec86c7
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:31:55 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit 3fc196e33de9fe3c8468d771763c4433328c764c
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Wed Jul 6 19:26:26 2005 +0000
+
+    - Xaw/xaw.m4: Change help string to say "enable xprint" instead of "disable
+        xprint"
+    - symlink.sh: Rename Bitmap-co.ad to Bitmap-color.ad. Add bitmaps for the
+        bitmap application. Add xdbedizzy.sgml.
+    - xc/programs/xdbedizzy/: Conditionalize use of xprint
+    - remove font/arabic-misc/README and font/mutt-misc/README
+
+commit 5309f3af0daaf8292ad4fbdd8a7c1c66dc20a178
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Wed Jul 6 15:14:08 2005 +0000
+
+    Build system for xfd
+
+commit 861dfbf4919bdd2358c0b22e6c3eea116c6ac9c1
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:54:47 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit db321b2ec955cfe454428b354ca00bf5d99dfefe
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:35:20 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 114cfa20b9b74fe67112aae5e9f8f00342181043
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:13:05 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 7187bddc1b8abd1e1f16a11c76f1982a347e0400
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:24 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit a1dc170d169a3db64bb741d39aec5fe00dd74439
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:24:07 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 4bcf61534221f70622392f8095e39a35665d3893
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Dec 19 20:55:56 2003 +0000
+
+    XFree86 4.3.99.902 (RC 2)
+
+commit 7a16b3e2dd3ea817f2ae503c9242eea27989e47d
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:12 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 7c4135cb4b16908b54a07ee14a7ef03727102c78
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:22 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit 961d4493f519b5b093581e111997f894b1675d48
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 15:54:53 2003 +0000
+
+    R6.6 is the Xorg base-line
similarity index 60%
rename from xditview/INSTALL
rename to xfd/INSTALL
index 23e5f25..8b82ade 100644 (file)
@@ -1,16 +1,19 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-These are generic installation instructions.
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -23,9 +26,9 @@ debugging `configure').
 
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
+the results of its tests to speed up reconfiguring.  Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
@@ -67,42 +67,57 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
 is an example:
 
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
    *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -125,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -137,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
 Specifying the System Type
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -170,9 +207,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -190,21 +227,29 @@ them in the `configure' command line, using `VAR=value'.  For example:
      ./configure CC=/usr/local2/bin/gcc
 
 causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
+overridden in the site shell script).
 
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
 
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -231,6 +276,16 @@ configuration-related scripts to be executed by `/bin/bash'.
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
similarity index 52%
rename from xman/Makefile.am
rename to xfd/Makefile.am
index 91ffb81..60f089a 100644 (file)
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-bin_PROGRAMS = xman
-
-helpdir=@HELPDIR@
-dist_help_DATA = xman.help
-
-AM_CFLAGS = $(CWARNFLAGS) $(XMAN_CFLAGS) \
-       -D_BSD_SOURCE -DHELPFILE=\"$(helpdir)/xman.help\"
-xman_LDADD = $(XMAN_LIBS)
-
-xman_SOURCES = \
-        buttons.c \
-        defs.h \
-        globals.c \
-        globals.h \
-        handler.c \
-        help.c \
-        iconclosed.h \
-        icon_help.h \
-        icon_open.h \
-        main.c \
-        man.c \
-        man.h \
-        misc.c \
-        ScrollByL.c \
-        ScrollByL.h \
-        ScrollByLP.h \
-        search.c \
-        tkfuncs.c \
-        vendor.c \
-        vendor.h \
-        version.h
+bin_PROGRAMS = xfd
+
+AM_CFLAGS = $(XFD_CFLAGS) $(CWARNFLAGS) -DXRENDER -D_BSD_SOURCE
+xfd_LDADD = $(XFD_LIBS)
+
+ACLOCAL_AMFLAGS = -I m4
+
+xfd_SOURCES =  \
+        grid.c \
+        grid.h \
+        gridP.h \
+        xfd.c
 
 appman_PRE = \
-        xman.man
+        xfd.man
 
 # App default files
-
 DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 
 appdefaultdir = @appdefaultdir@
 
-dist_appdefault_DATA = app-defaults/Xman
+dist_appdefault_DATA = \
+        app-defaults/Xfd
+
+
 
 appmandir = $(APP_MAN_DIR)
 
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
 EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-EXTRA_DIST += ChangeLog
-MAINTAINERCLEANFILES = ChangeLog
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
+
+if USE_GETTEXT
+noinst_DATA = xfd.po
+
+xfd.po: $(xfd_SOURCES:%=$(srcdir)/%)
+       $(AM_V_GEN)xgettext -d xfd -n $(xfd_SOURCES:%=$(srcdir)/%)
+
+CLEANFILES += xfd.po
+endif
diff --git a/xfd/Makefile.in b/xfd/Makefile.in
new file mode 100644 (file)
index 0000000..6b54857
--- /dev/null
@@ -0,0 +1,799 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 
+#  Copyright 2005  Red Hat, Inc.
+# 
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+# 
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = xfd$(EXEEXT)
+@USE_GETTEXT_TRUE@am__append_1 = xfd.po
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
+       "$(DESTDIR)$(appdefaultdir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_xfd_OBJECTS = grid.$(OBJEXT) xfd.$(OBJEXT)
+xfd_OBJECTS = $(am_xfd_OBJECTS)
+am__DEPENDENCIES_1 =
+xfd_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(xfd_SOURCES)
+DIST_SOURCES = $(xfd_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(appman_DATA) $(dist_appdefault_DATA) $(noinst_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
+APPDEFS_LIBS = @APPDEFS_LIBS@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
+DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FILE_MAN_DIR = @FILE_MAN_DIR@
+FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_MAN_DIR = @LIB_MAN_DIR@
+LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LOCALEDIR = @LOCALEDIR@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
+MISC_MAN_DIR = @MISC_MAN_DIR@
+MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XFD_CFLAGS = @XFD_CFLAGS@
+XFD_LIBS = @XFD_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+appdefaultdir = @appdefaultdir@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = $(XFD_CFLAGS) $(CWARNFLAGS) -DXRENDER -D_BSD_SOURCE
+xfd_LDADD = $(XFD_LIBS)
+ACLOCAL_AMFLAGS = -I m4
+xfd_SOURCES = \
+        grid.c \
+        grid.h \
+        gridP.h \
+        xfd.c
+
+appman_PRE = \
+        xfd.man
+
+
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+dist_appdefault_DATA = \
+        app-defaults/Xfd
+
+appmandir = $(APP_MAN_DIR)
+appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA) $(am__append_1)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+@USE_GETTEXT_TRUE@noinst_DATA = xfd.po
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
+am--refresh:
+       @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+       else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+       rm -f stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+xfd$(EXEEXT): $(xfd_OBJECTS) $(xfd_DEPENDENCIES) 
+       @rm -f xfd$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(xfd_OBJECTS) $(xfd_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grid.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfd.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+install-appmanDATA: $(appman_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
+       done
+
+uninstall-appmanDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
+install-dist_appdefaultDATA: $(dist_appdefault_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
+       done
+
+uninstall-dist_appdefaultDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+       @$(am__cd) '$(distuninstallcheck_dir)' \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(DATA) config.h
+installdirs:
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-appmanDATA install-dist_appdefaultDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+       clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-appmanDATA \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_appdefaultDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
+
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+@USE_GETTEXT_TRUE@xfd.po: $(xfd_SOURCES:%=$(srcdir)/%)
+@USE_GETTEXT_TRUE@     $(AM_V_GEN)xgettext -d xfd -n $(xfd_SOURCES:%=$(srcdir)/%)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
similarity index 72%
rename from xcalc/README
rename to xfd/README
index 307699e..6df6136 100644 (file)
@@ -1,5 +1,5 @@
-xcalc is a scientific calculator X11 client that can emulate a TI-30
-or an HP-10C.
+xfd - display all the characters in a font using either the
+X11 core protocol or libXft2.
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
@@ -12,9 +12,9 @@ Please submit bug reports to the Xorg bugzilla:
 
 The master development code repository can be found at:
 
-        git://anongit.freedesktop.org/git/xorg/app/xcalc
+        git://anongit.freedesktop.org/git/xorg/app/xfd
 
-        http://cgit.freedesktop.org/xorg/app/xcalc
+        http://cgit.freedesktop.org/xorg/app/xfd
 
 For patch submission instructions, see:
 
similarity index 94%
rename from bitmap/aclocal.m4
rename to xfd/aclocal.m4
index b713a40..79ece1b 100644 (file)
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                    [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 #
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test $pkg_failed = yes; then
-       AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+# serial 9
 
-       m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-$$1_PKG_ERRORS
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# serial 10
 
-_PKG_TEXT])[]dnl
-        ])
-elif test $pkg_failed = untried; then
-       AC_MSG_RESULT([no])
-       m4_default([$4], [AC_MSG_FAILURE(
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-_PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
-        ])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       $3
-fi[]dnl
-])# PKG_CHECK_MODULES
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
 
-dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
-dnl
-dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the "Software"),
-dnl to deal in the Software without restriction, including without limitation
-dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
-dnl and/or sell copies of the Software, and to permit persons to whom the
-dnl Software is furnished to do so, subject to the following conditions:
-dnl
-dnl The above copyright notice and this permission notice (including the next
-dnl paragraph) shall be included in all copies or substantial portions of the
-dnl Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-dnl DEALINGS IN THE SOFTWARE.
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To ensure that this macro is defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION],
-#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.11.0])
-m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
-m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
-m4_if(m4_cmp(maj_have, maj_needed), 0,,
-    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
-m4_if(m4_version_compare(vers_have, [$1]), -1,
-    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
-m4_undefine([vers_have])
-m4_undefine([maj_have])
-m4_undefine([maj_needed])
-]) # XORG_MACROS_VERSION
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
 
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       # under Cygwin unix is still defined even with -undef
-       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS="-undef -ansi"
-               AC_MSG_RESULT([yes, with -ansi])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
 else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
+  am_cv_$1_dependencies_compiler_type=none
 fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-# Added MAN_SUBSTS in version 1.8
-# Added AC_PROG_SED in version 1.8
 
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_SED])
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
 
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
 
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
+#serial 5
 
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-XORG_MAN_PAGE="X Version 11"
-AC_SUBST([XORG_MAN_PAGE])
-MAN_SUBSTS="\
-       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|\$(prefix)|g' \
-       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
-AC_SUBST([MAN_SUBSTS])
 
-]) # XORG_MANPAGE_SECTIONS
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
-# ------------------------
-# Minimum version: 1.7.0
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
 #
-# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
-# provided by xorg-sgml-doctools, if installed.
-AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
-AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
-XORG_SGML_PATH=
-PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
-    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
-    [m4_ifval([$1],[:],
-        [if test x"$cross_compiling" != x"yes" ; then
-            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
-                          [XORG_SGML_PATH=$prefix/share/sgml])
-         fi])
-    ])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
-# the path and the name of the doc stylesheet
-if test "x$XORG_SGML_PATH" != "x" ; then
-   AC_MSG_RESULT([$XORG_SGML_PATH])
-   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
-   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
-else
-   AC_MSG_RESULT([no])
-fi
+# serial 8
 
-AC_SUBST(XORG_SGML_PATH)
-AC_SUBST(STYLESHEET_SRCDIR)
-AC_SUBST(XSL_STYLESHEET)
-AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
-]) # XORG_CHECK_SGML_DOCTOOLS
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
-AC_REQUIRE([XORG_WITH_PS2PDF])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_PATH_PROG(LINUXDOC, linuxdoc)
+# serial 16
 
-AC_MSG_CHECKING([whether to build documentation])
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
 
-if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([whether to build pdf documentation])
-
-if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
+AC_SUBST([CYGPATH_W])
 
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
 
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([whether to build text documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
 
-AC_MSG_CHECKING([whether to build PDF documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-AC_MSG_CHECKING([whether to build PostScript documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([whether to build HTML documentation])
-if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+AC_SUBST(install_sh)])
 
-# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
-# ----------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package. When DEFAULT is not specified,
-# --with-xmlto assumes 'auto'.
-#
-# Interface to module:
-# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
-# XMLTO:       returns the path of the xmlto program found
-#              returns the path set by the user in the environment
-# --with-xmlto:        'yes' user instructs the module to use xmlto
-#              'no' user instructs the module not to use xmlto
-#
-# Added in version 1.10.0
-# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
-#                  xmlto for text output requires either lynx, links, or w3m browsers
-#
-# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_XMLTO],[
-AC_ARG_VAR([XMLTO], [Path to xmlto command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(xmlto,
-       AS_HELP_STRING([--with-xmlto],
-          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
-          [use_xmlto=$withval], [use_xmlto=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_xmlto" = x"auto"; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
-       have_xmlto=no
-   else
-        have_xmlto=yes
-   fi
-elif test "x$use_xmlto" = x"yes" ; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
-   fi
-   have_xmlto=yes
-elif test "x$use_xmlto" = x"no" ; then
-   if test "x$XMLTO" != "x"; then
-      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
-   fi
-   have_xmlto=no
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
 else
-   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-# Test for a minimum version of xmlto, if provided.
-m4_ifval([$1],
-[if test "$have_xmlto" = yes; then
-    # scrape the xmlto version
-    AC_MSG_CHECKING([the xmlto version])
-    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
-    AC_MSG_RESULT([$xmlto_version])
-    AS_VERSION_COMPARE([$xmlto_version], [$1],
-        [if test "x$use_xmlto" = xauto; then
-            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
-            have_xmlto=no
-        else
-            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
-        fi])
-fi])
-
-# Test for the ability of xmlto to generate a text target
-have_xmlto_text=no
-cat > conftest.xml << "EOF"
-EOF
-AS_IF([test "$have_xmlto" = yes],
-      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
-             [have_xmlto_text=yes],
-             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
-rm -f conftest.xml
-AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
-AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
-]) # XORG_WITH_XMLTO
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
-# ----------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package. When DEFAULT is not specified,
-# --with-asciidoc assumes 'auto'.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# Interface to module:
-# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
-# ASCIIDOC:     returns the path of the asciidoc program found
-#               returns the path set by the user in the environment
-# --with-asciidoc: 'yes' user instructs the module to use asciidoc
-#                'no' user instructs the module not to use asciidoc
-#
-# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_ASCIIDOC],[
-AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(asciidoc,
-       AS_HELP_STRING([--with-asciidoc],
-          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
-          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_asciidoc" = x"auto"; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
-       have_asciidoc=no
-   else
-        have_asciidoc=yes
-   fi
-elif test "x$use_asciidoc" = x"yes" ; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
-   fi
-   have_asciidoc=yes
-elif test "x$use_asciidoc" = x"no" ; then
-   if test "x$ASCIIDOC" != "x"; then
-      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
-   fi
-   have_asciidoc=no
-else
-   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-m4_ifval([$1],
-[if test "$have_asciidoc" = yes; then
-    # scrape the asciidoc version
-    AC_MSG_CHECKING([the asciidoc version])
-    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
-    AC_MSG_RESULT([$asciidoc_version])
-    AS_VERSION_COMPARE([$asciidoc_version], [$1],
-        [if test "x$use_asciidoc" = xauto; then
-            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
-            have_asciidoc=no
-        else
-            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
-        fi])
-fi])
-AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
-]) # XORG_WITH_ASCIIDOC
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
 
-# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
-# --------------------------------
-# Minimum version: 1.5.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package. When DEFAULT is not specified,
-# --with-doxygen assumes 'auto'.
-#
-# Interface to module:
-# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
-# DOXYGEN:      returns the path of the doxygen program found
-#               returns the path set by the user in the environment
-# --with-doxygen: 'yes' user instructs the module to use doxygen
-#                'no' user instructs the module not to use doxygen
-#
-# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_DOXYGEN],[
-AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
-m4_define([_defopt], m4_default([$2], [auto]))
-AC_ARG_WITH(doxygen,
-       AS_HELP_STRING([--with-doxygen],
-          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
-          [use_doxygen=$withval], [use_doxygen=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_doxygen" = x"auto"; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
-       have_doxygen=no
-   else
-        have_doxygen=yes
-   fi
-elif test "x$use_doxygen" = x"yes" ; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
-   fi
-   have_doxygen=yes
-elif test "x$use_doxygen" = x"no" ; then
-   if test "x$DOXYGEN" != "x"; then
-      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
-   fi
-   have_doxygen=no
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
 fi
-m4_ifval([$1],
-[if test "$have_doxygen" = yes; then
-    # scrape the doxygen version
-    AC_MSG_CHECKING([the doxygen version])
-    doxygen_version=`$DOXYGEN --version 2>/dev/null`
-    AC_MSG_RESULT([$doxygen_version])
-    AS_VERSION_COMPARE([$doxygen_version], [$1],
-        [if test "x$use_doxygen" = xauto; then
-            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
-            have_doxygen=no
-        else
-            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
-        fi])
-fi])
-AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
-]) # XORG_WITH_DOXYGEN
+])
 
-# XORG_WITH_GROFF([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-groff option, it allows maximum flexibilty in making decisions
-# as whether or not to use the groff package. When DEFAULT is not specified,
-# --with-groff assumes 'auto'.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Interface to module:
-# HAVE_GROFF:   used in makefiles to conditionally generate documentation
-# HAVE_GROFF_MM: the memorandum macros (-mm) package
-# HAVE_GROFF_MS: the -ms macros package
-# GROFF:        returns the path of the groff program found
-#               returns the path set by the user in the environment
-# --with-groff:         'yes' user instructs the module to use groff
-#               'no' user instructs the module not to use groff
-#
-# Added in version 1.9.0:
-# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
-#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
-#                 psselect from the psutils package.
-#                 the ghostcript package. Refer to the grohtml man pages
-#
-# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
-#
-# OS and distros often splits groff in a basic and full package, the former
-# having the groff program and the later having devices, fonts and macros
-# Checking for the groff executable is not enough.
-#
-# If macros are missing, we cannot assume that groff is useless, so we don't
-# unset HAVE_GROFF or GROFF env variables.
-# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
-#
-AC_DEFUN([XORG_WITH_GROFF],[
-AC_ARG_VAR([GROFF], [Path to groff command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(groff,
-       AS_HELP_STRING([--with-groff],
-          [Use groff to regenerate documentation (default: ]_defopt[)]),
-          [use_groff=$withval], [use_groff=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_groff" = x"auto"; then
-   AC_PATH_PROG([GROFF], [groff])
-   if test "x$GROFF" = "x"; then
-        AC_MSG_WARN([groff not found - documentation targets will be skipped])
-       have_groff=no
-   else
-        have_groff=yes
-   fi
-elif test "x$use_groff" = x"yes" ; then
-   AC_PATH_PROG([GROFF], [groff])
-   if test "x$GROFF" = "x"; then
-        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
-   fi
-   have_groff=yes
-elif test "x$use_groff" = x"no" ; then
-   if test "x$GROFF" != "x"; then
-      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
-   fi
-   have_groff=no
-else
-   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
-fi
+# serial 4
 
-# We have groff, test for the presence of the macro packages
-if test "x$have_groff" = x"yes"; then
-    AC_MSG_CHECKING([for ${GROFF} -ms macros])
-    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
-        groff_ms_works=yes
-    else
-        groff_ms_works=no
-    fi
-    AC_MSG_RESULT([$groff_ms_works])
-    AC_MSG_CHECKING([for ${GROFF} -mm macros])
-    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
-        groff_mm_works=yes
-    else
-        groff_mm_works=no
-    fi
-    AC_MSG_RESULT([$groff_mm_works])
-fi
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
-# We have groff, test for HTML dependencies, one command per package
-if test "x$have_groff" = x"yes"; then
-   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
-   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
-   AC_PATH_PROG(PSSELECT_PATH, [psselect])
-   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
-      have_groff_html=yes
-   else
-      have_groff_html=no
-      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
-   fi
-fi
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
-# Set Automake conditionals for Makefiles
-AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
-AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
-AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
-AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
-]) # XORG_WITH_GROFF
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
-# XORG_WITH_FOP([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-fop option, it allows maximum flexibilty in making decisions
-# as whether or not to use the fop package. When DEFAULT is not specified,
-# --with-fop assumes 'auto'.
-#
-# Interface to module:
-# HAVE_FOP:    used in makefiles to conditionally generate documentation
-# FOP:         returns the path of the fop program found
-#              returns the path set by the user in the environment
-# --with-fop:  'yes' user instructs the module to use fop
-#              'no' user instructs the module not to use fop
-#
-# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
-#
-AC_DEFUN([XORG_WITH_FOP],[
-AC_ARG_VAR([FOP], [Path to fop command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(fop,
-       AS_HELP_STRING([--with-fop],
-          [Use fop to regenerate documentation (default: ]_defopt[)]),
-          [use_fop=$withval], [use_fop=]_defopt)
-m4_undefine([_defopt])
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-if test "x$use_fop" = x"auto"; then
-   AC_PATH_PROG([FOP], [fop])
-   if test "x$FOP" = "x"; then
-        AC_MSG_WARN([fop not found - documentation targets will be skipped])
-       have_fop=no
-   else
-        have_fop=yes
-   fi
-elif test "x$use_fop" = x"yes" ; then
-   AC_PATH_PROG([FOP], [fop])
-   if test "x$FOP" = "x"; then
-        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
-   fi
-   have_fop=yes
-elif test "x$use_fop" = x"no" ; then
-   if test "x$FOP" != "x"; then
-      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
-   fi
-   have_fop=no
-else
-   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
-fi
-AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
-]) # XORG_WITH_FOP
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# XORG_WITH_PS2PDF([DEFAULT])
-# ----------------
-# Minimum version: 1.6.0
-# Minimum version for optional DEFAULT argument: 1.11.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
-# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
-# --with-ps2pdf assumes 'auto'.
-#
-# Interface to module:
-# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
-# PS2PDF:      returns the path of the ps2pdf program found
-#              returns the path set by the user in the environment
-# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
-#               'no' user instructs the module not to use ps2pdf
-#
-# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_PS2PDF],[
-AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
-m4_define([_defopt], m4_default([$1], [auto]))
-AC_ARG_WITH(ps2pdf,
-       AS_HELP_STRING([--with-ps2pdf],
-          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
-          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
-m4_undefine([_defopt])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_ps2pdf" = x"auto"; then
-   AC_PATH_PROG([PS2PDF], [ps2pdf])
-   if test "x$PS2PDF" = "x"; then
-        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
-       have_ps2pdf=no
-   else
-        have_ps2pdf=yes
-   fi
-elif test "x$use_ps2pdf" = x"yes" ; then
-   AC_PATH_PROG([PS2PDF], [ps2pdf])
-   if test "x$PS2PDF" = "x"; then
-        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
-   have_ps2pdf=yes
-elif test "x$use_ps2pdf" = x"no" ; then
-   if test "x$PS2PDF" != "x"; then
-      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
    fi
-   have_ps2pdf=no
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
 fi
-AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
-]) # XORG_WITH_PS2PDF
+AC_MSG_RESULT(yes)])
 
-# XORG_ENABLE_DOCS (enable_docs=yes)
-# ----------------
-# Minimum version: 1.6.0
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a builder to skip all
-# documentation targets except traditional man pages.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
-# --enable-docs: 'yes' user instructs the module to generate docs
-#               'no' user instructs the module not to generate docs
-# parm1:       specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_DOCS],[
-m4_define([default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(docs,
-       AS_HELP_STRING([--enable-docs],
-          [Enable building the documentation (default: ]default[)]),
-          [build_docs=$enableval], [build_docs=]default)
-m4_undefine([default])
-AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
-AC_MSG_CHECKING([whether to build documentation])
-AC_MSG_RESULT([$build_docs])
-]) # XORG_ENABLE_DOCS
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
-# ----------------
-# Minimum version: 1.6.0
-#
-# This macro enables a builder to skip all developer documentation.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
-# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
-#                      'no' user instructs the module not to generate developer docs
-# parm1:               specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
-m4_define([devel_default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(devel-docs,
-       AS_HELP_STRING([--enable-devel-docs],
-          [Enable building the developer documentation (default: ]devel_default[)]),
-          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
-m4_undefine([devel_default])
-AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
-AC_MSG_CHECKING([whether to build developer documentation])
-AC_MSG_RESULT([$build_devel_docs])
-]) # XORG_ENABLE_DEVEL_DOCS
+# serial 1
 
-# XORG_ENABLE_SPECS (enable_specs=yes)
-# ----------------
-# Minimum version: 1.6.0
-#
-# This macro enables a builder to skip all functional specification targets.
-# Combined with the specific tool checking macros XORG_WITH_*, it provides
-# maximum flexibilty in controlling documentation building.
-# Refer to:
-# XORG_WITH_XMLTO         --with-xmlto
-# XORG_WITH_ASCIIDOC      --with-asciidoc
-# XORG_WITH_DOXYGEN       --with-doxygen
-# XORG_WITH_FOP           --with-fop
-# XORG_WITH_GROFF         --with-groff
-# XORG_WITH_PS2PDF        --with-ps2pdf
-#
-# Interface to module:
-# ENABLE_SPECS:                used in makefiles to conditionally generate specs
-# --enable-specs:      'yes' user instructs the module to generate specs
-#                      'no' user instructs the module not to generate specs
-# parm1:               specify the default value, yes or no.
-#
-AC_DEFUN([XORG_ENABLE_SPECS],[
-m4_define([spec_default], m4_default([$1], [yes]))
-AC_ARG_ENABLE(specs,
-       AS_HELP_STRING([--enable-specs],
-          [Enable building the specs (default: ]spec_default[)]),
-          [build_specs=$enableval], [build_specs=]spec_default)
-m4_undefine([spec_default])
-AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
-AC_MSG_CHECKING([whether to build functional specifications])
-AC_MSG_RESULT([$build_specs])
-]) # XORG_ENABLE_SPECS
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AS_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no],
-               [MALLOC_ZERO_RETURNS_NULL=yes])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
 fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# This macro enables the use of a tool that flags some suspicious and
-# non-portable constructs (likely to be bugs) in C language source code.
-# It will attempt to locate the tool and use appropriate options.
-# There are various lint type tools on different platforms.
-#
-# Interface to module:
-# LINT:                returns the path to the tool found on the platform
-#              or the value set to LINT on the configure cmd line
-#              also an Automake conditional
-# LINT_FLAGS:  an Automake variable with appropriate flags
-#
-# --with-lint: 'yes' user instructs the module to use lint
-#              'no' user instructs the module not to use lint (default)
-#
-# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
-# If the user sets the value of LINT_FLAGS, they are used verbatim.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_LINT],[
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_ARG_VAR([LINT], [Path to a lint-style command])
-AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
-AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
+# serial 2
 
-# Obtain platform specific info like program name and options
-# The lint program on FreeBSD and NetBSD is different from the one on Solaris
-case $host_os in
-  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
-       lint_name=splint
-       lint_options="-badflag"
-       ;;
-  *freebsd* | *netbsd*)
-       lint_name=lint
-       lint_options="-u -b"
-       ;;
-  *solaris*)
-       lint_name=lint
-       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-       ;;
-esac
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
 
-# Test for the presence of the program (either guessed by the code or spelled out by the user)
-if test "x$use_lint" = x"yes" ; then
-   AC_PATH_PROG([LINT], [$lint_name])
-   if test "x$LINT" = "x"; then
-        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
-   fi
-elif test "x$use_lint" = x"no" ; then
-   if test "x$LINT" != "x"; then
-      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
-   fi
-else
-   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
-fi
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
-# User supplied flags override default flags
-if test "x$LINT_FLAGS" != "x"; then
-   lint_options=$LINT_FLAGS
-fi
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-AC_SUBST([LINT_FLAGS],[$lint_options])
-AM_CONDITIONAL(LINT, [test "x$LINT" != x])
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-]) # XORG_WITH_LINT
+# serial 2
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# Interface to module:
-# LINTLIB              - Automake variable with the name of lint library file to make
-# MAKE_LINT_LIB                - Automake conditional
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
 #
-# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
-#                        - 'no' user instructs the module not to create a lint library (default)
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-if test "x$make_lint_lib" = x"yes" ; then
-   LINTLIB=llib-l$1.ln
-   if test "x$LINT" = "x"; then
-        AC_MSG_ERROR([Cannot make lint library without --with-lint])
-   fi
-elif test "x$make_lint_lib" != x"no" ; then
-   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
-fi
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
 
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
 
-]) # XORG_LINT_LIBRARY
+m4_include([m4/ax_define_dir.m4])
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
-# XORG_CWARNFLAGS
-# ---------------
-# Minimum version: 1.2.0
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
 #
-# Defines CWARNFLAGS to enable C compiler warnings.
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
 #
-AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC_C99])
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-]) # XORG_CWARNFLAGS
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.1])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
 
-# XORG_STRICT_OPTION
-# -----------------------
-# Minimum version: 1.3.0
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
 #
-# Add configure option to enable strict compilation
-AC_DEFUN([XORG_STRICT_OPTION], [
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
-AC_REQUIRE([AC_PROG_CC_C99])
-AC_REQUIRE([XORG_CWARNFLAGS])
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
-AC_ARG_ENABLE(strict-compilation,
-                         AS_HELP_STRING([--enable-strict-compilation],
-                         [Enable all warnings from compiler and make them errors (default: disabled)]),
-                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
-if test "x$STRICT_COMPILE" = "xyes"; then
-       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
-       if test "x$GCC" = xyes ; then
-               STRICT_CFLAGS="-pedantic -Werror"
-       elif test "x$SUNCC" = "xyes"; then
-               STRICT_CFLAGS="-errwarn"
-    elif test "x$INTELCC" = "xyes"; then
-               STRICT_CFLAGS="-Werror"
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
        fi
 fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
-]) # XORG_STRICT_OPTION
+rm -f conftest.$ac_ext
 
-# XORG_DEFAULT_OPTIONS
-# --------------------
-# Minimum version: 1.3.0
-#
-# Defines default options for X.Org modules.
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
+
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-AC_DEFUN([XORG_DEFAULT_OPTIONS], [
-AC_REQUIRE([AC_PROG_INSTALL])
-XORG_CWARNFLAGS
-XORG_STRICT_OPTION
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-XORG_INSTALL
-XORG_MANPAGE_SECTIONS
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
-    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
-]) # XORG_DEFAULT_OPTIONS
-
-# XORG_INSTALL()
-# ----------------
-# Minimum version: 1.4.0
-#
-# Defines the variable INSTALL_CMD as the command to copy
-# INSTALL from $prefix/share/util-macros.
-#
-AC_DEFUN([XORG_INSTALL], [
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
-INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-AC_SUBST([INSTALL_CMD])
-]) # XORG_INSTALL
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
-])
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
-# XORG_CHANGELOG()
-# ----------------
-# Minimum version: 1.2.0
-#
-# Defines the variable CHANGELOG_CMD as the command to generate
-# ChangeLog from git.
-#
-#
-AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-AC_SUBST([CHANGELOG_CMD])
-]) # XORG_CHANGELOG
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
 
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+]) # XORG_MANPAGE_SECTIONS
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
 else
-  $1_TRUE='#'
-  $1_FALSE=
+   AC_MSG_RESULT([no])
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+AC_PATH_PROG(LINUXDOC, linuxdoc)
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+AC_MSG_CHECKING([whether to build documentation])
 
-  cd ..
-  rm -rf conftest.dir
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
 else
-  am_cv_$1_dependencies_compiler_type=none
+   BUILDDOC=no
 fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
 
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_MSG_RESULT([$BUILDDOC])
 
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
 fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
 
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
 
-# serial 16
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
 fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
 fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES(CC)],
-                 [define([AC_PROG_CC],
-                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES(CXX)],
-                 [define([AC_PROG_CXX],
-                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES(OBJC)],
-                 [define([AC_PROG_OBJC],
-                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
+fi
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
 
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
 fi
-AC_SUBST(install_sh)])
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
 else
-  am__leading_dot=_
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
 
-# serial 4
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
 
-# serial 6
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
 fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
-          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
 
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
 
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
 
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+]) # XORG_WITH_LINT
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
 
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
+fi
 
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+]) # XORG_LINT_LIBRARY
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
 
-# serial 5
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
 
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
-AC_MSG_RESULT(yes)])
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-# serial 1
 
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
-# serial 2
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
 
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
 
-# Check how to create a tarball.                            -*- Autoconf -*-
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
 
-# serial 2
+$$1_PKG_ERRORS
 
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+_PKG_TEXT
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
diff --git a/xfd/app-defaults/Xfd b/xfd/app-defaults/Xfd
new file mode 100644 (file)
index 0000000..8b738c8
--- /dev/null
@@ -0,0 +1,40 @@
+! $Xorg: Xfd.ad,v 1.3 2000/08/17 19:54:18 cpqbld Exp $
+
+
+
+! $XFree86$
+
+*internalBorderWidth: 0
+*showGrip: false
+
+*grid.borderWidth: 0
+
+*quit.Label: Quit
+*prev.Label: Prev
+*next.Label: Next
+*prev16.Label: -16
+*next16.Label: +16
+
+*select.Label: Select a character
+*metrics.Label:
+*select.Justify: center
+*metrics.Justify: center
+*range.Justify: left
+*start.Justify: left
+
+*quit.Translations:  #override \
+               <Btn1Down>,<Btn1Up>: Quit() unset()
+*next16.Translations:  #override \
+               <Btn1Down>,<Btn1Up>: Next16() unset()
+*next.Translations:  #override \
+               <Btn1Down>,<Btn1Up>: Next() unset()
+*prev.Translations:  #override \
+               <Btn1Down>,<Btn1Up>: Prev() unset()
+*prev16.Translations:  #override \
+               <Btn1Down>,<Btn1Up>: Prev16() unset()
+
+*Translations: #override \n\
+<Key>q: Quit()\n\
+Ctrl <Key>n: Next()\n\
+Ctrl <Key>p: Prev()
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from bitmap/config.guess
rename to xfd/config.guess
index da83314..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-04-27'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
        SUN_ARCH="i386"
@@ -548,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -656,7 +660,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -807,12 +811,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd | genuineintel)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -822,6 +826,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +858,20 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +894,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -882,78 +914,34 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
        exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,8 +950,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -977,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -986,66 +980,6 @@ EOF
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1074,7 +1008,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1182,7 +1116,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
similarity index 90%
rename from bitmap/config.h.in
rename to xfd/config.h.in
index e522402..c76769e 100644 (file)
@@ -1,8 +1,5 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the "mkstemp" function. */
-#undef HAS_MKSTEMP
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -30,8 +27,8 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
+/* Location of translated messages */
+#undef LOCALEDIR
 
 /* Name of package */
 #undef PACKAGE
@@ -66,5 +63,8 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define to 1 if you want to use the gettext() function. */
+#undef USE_GETTEXT
+
 /* Version number of package */
 #undef VERSION
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from xgc/config.sub
rename to xfd/config.sub
index a39437d..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-04-17'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -149,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -275,26 +283,38 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -325,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -337,7 +357,7 @@ case $basic_machine in
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -359,21 +379,24 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -467,6 +490,19 @@ case $basic_machine in
                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
                os=-linux
                ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -719,6 +755,9 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -823,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1057,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1240,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1260,9 +1301,9 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1275,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1283,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1416,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1456,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1613,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
similarity index 88%
rename from bitmap/configure
rename to xfd/configure
index 04e7640..98122ab 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for bitmap 1.0.4.
+# Generated by GNU Autoconf 2.68 for xfd 1.1.0.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # 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
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       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 test x$as_have_required = xno; then :
@@ -551,10 +559,10 @@ MFLAGS=
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME='bitmap'
-PACKAGE_TARNAME='bitmap'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='bitmap 1.0.4'
+PACKAGE_NAME='xfd'
+PACKAGE_TARNAME='xfd'
+PACKAGE_VERSION='1.1.0'
+PACKAGE_STRING='xfd 1.1.0'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
@@ -601,14 +609,11 @@ LIBOBJS
 appdefaultdir
 APPDEFS_LIBS
 APPDEFS_CFLAGS
-XBITMAP_LIBS
-XBITMAP_CFLAGS
-BITMAP_LIBS
-BITMAP_CFLAGS
-ATOBM_LIBS
-ATOBM_CFLAGS
-BMTOA_LIBS
-BMTOA_CFLAGS
+XFD_LIBS
+XFD_CFLAGS
+USE_GETTEXT_FALSE
+USE_GETTEXT_TRUE
+LOCALEDIR
 AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
 MAN_SUBSTS
@@ -635,8 +640,6 @@ build_vendor
 build_cpu
 build
 INSTALL_CMD
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
 PKG_CONFIG
 CHANGELOG_CMD
 CWARNFLAGS
@@ -730,6 +733,7 @@ enable_maintainer_mode
 enable_dependency_tracking
 enable_strict_compilation
 enable_silent_rules
+with_localedir
 with_appdefaultdir
 '
       ac_precious_vars='build_alias
@@ -742,16 +746,8 @@ LIBS
 CPPFLAGS
 CPP
 PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-BMTOA_CFLAGS
-BMTOA_LIBS
-ATOBM_CFLAGS
-ATOBM_LIBS
-BITMAP_CFLAGS
-BITMAP_LIBS
-XBITMAP_CFLAGS
-XBITMAP_LIBS
+XFD_CFLAGS
+XFD_LIBS
 APPDEFS_CFLAGS
 APPDEFS_LIBS'
 
@@ -1158,7 +1154,7 @@ Try \`$0 --help' for more information"
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1296,7 +1292,7 @@ if test "$ac_init_help" = "long"; then
   # 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 bitmap 1.0.4 to adapt to many kinds of systems.
+\`configure' configures xfd 1.1.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1344,7 +1340,7 @@ Fine tuning of the installation directories:
   --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/bitmap]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/xfd]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1366,7 +1362,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bitmap 1.0.4:";;
+     short | recursive ) echo "Configuration of xfd 1.1.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1387,6 +1383,8 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-localedir=<path> Path to install message files in (default:
+                          datadir/locale)
   --with-appdefaultdir=<pathname>
                           specify directory for app-defaults files (default is
                           autodetected)
@@ -1401,23 +1399,8 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  BMTOA_CFLAGS
-              C compiler flags for BMTOA, overriding pkg-config
-  BMTOA_LIBS  linker flags for BMTOA, overriding pkg-config
-  ATOBM_CFLAGS
-              C compiler flags for ATOBM, overriding pkg-config
-  ATOBM_LIBS  linker flags for ATOBM, overriding pkg-config
-  BITMAP_CFLAGS
-              C compiler flags for BITMAP, overriding pkg-config
-  BITMAP_LIBS linker flags for BITMAP, overriding pkg-config
-  XBITMAP_CFLAGS
-              C compiler flags for XBITMAP, overriding pkg-config
-  XBITMAP_LIBS
-              linker flags for XBITMAP, overriding pkg-config
+  XFD_CFLAGS  C compiler flags for XFD, overriding pkg-config
+  XFD_LIBS    linker flags for XFD, overriding pkg-config
   APPDEFS_CFLAGS
               C compiler flags for APPDEFS, overriding pkg-config
   APPDEFS_LIBS
@@ -1489,8 +1472,8 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bitmap configure 1.0.4
-generated by GNU Autoconf 2.67
+xfd configure 1.1.0
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1536,7 +1519,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1552,7 +1535,7 @@ ac_fn_c_check_decl ()
   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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1583,7 +1566,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 
@@ -1619,7 +1602,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1661,7 +1644,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1675,7 +1658,7 @@ 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 "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1693,7 +1676,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1738,83 +1721,16 @@ fi
   # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
-
-# 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 "test \"\${$3+set}\"" = set; 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 <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#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; test "x$as_lineno_stack" = x && { as_lineno=; 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 bitmap $as_me 1.0.4, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by xfd $as_me 1.1.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2072,7 +1988,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&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 $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2161,6 +2077,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+
 am__api_version='1.11'
 
 ac_aux_dir=
@@ -2209,7 +2126,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $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 :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2296,11 +2213,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2386,7 +2303,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2426,7 +2343,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2479,7 +2396,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2530,7 +2447,7 @@ do
 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 test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2570,7 +2487,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2627,8 +2544,8 @@ fi
 
 
 # Define the identity of the package.
- PACKAGE='bitmap'
- VERSION='1.0.4'
+ PACKAGE='xfd'
+ VERSION='1.1.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2692,7 +2609,7 @@ fi
 
 
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 
 
 
@@ -2704,8 +2621,66 @@ fi
 
 
 
+DEPDIR="${am__leading_dot}deps"
 
-ac_config_headers="$ac_config_headers config.h"
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -2718,7 +2693,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2758,7 +2733,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2811,7 +2786,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2851,7 +2826,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2910,7 +2885,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2954,7 +2929,7 @@ do
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3009,7 +2984,7 @@ 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;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3124,7 +3099,7 @@ 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;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3167,7 +3142,7 @@ 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 compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3226,7 +3201,7 @@ $as_echo "$ac_try_echo"; } >&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 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3237,7 +3212,7 @@ 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 test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3278,7 +3253,7 @@ 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;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3288,7 +3263,7 @@ 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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3325,7 +3300,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 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 test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3403,7 +3378,7 @@ else
 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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3497,74 +3472,12 @@ 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
 
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3687,137 +3600,9 @@ else
 fi
 
 
-if test "x$CC" != xcc; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
-                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { 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; } &&
-   test -f conftest2.$ac_objext && { { 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
-  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
-  if test "x$CC" != xcc; then
-    # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.$ac_ext >&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
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-      rm -f conftest2.*
-      if { { 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; } &&
-        test -f conftest2.$ac_objext && { { 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
-       # cc works too.
-       :
-      else
-       # cc exists but doesn't like -o.
-       eval ac_cv_prog_cc_${ac_cc}_c_o=no
-      fi
-    fi
-  fi
-else
-  eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-
-
-
-
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+if ${ac_cv_prog_cc_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c99=no
@@ -4005,7 +3790,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4121,7 +3906,7 @@ 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 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4133,7 +3918,7 @@ 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 test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4196,7 +3981,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4263,7 +4048,7 @@ $as_echo "$ac_cv_path_EGREP" >&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 test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4392,17 +4177,13 @@ done
 
 
 
-
-
-
-
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -4445,7 +4226,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4508,6 +4289,7 @@ $as_echo "yes" >&6; }
 $as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
+
 fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -4515,7 +4297,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -4531,7 +4313,7 @@ fi
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4549,7 +4331,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -4564,7 +4346,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4582,7 +4364,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -4664,7 +4446,7 @@ if  test "x$GCC" = xyes ; then
     esac
 else
     ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
@@ -4690,14 +4472,14 @@ fi
 
 if test "x$STRICT_COMPILE" = "xyes"; then
        ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
 fi
 
        ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then :
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
   INTELCC="yes"
 else
   INTELCC="no"
@@ -4859,321 +4641,151 @@ AM_BACKSLASH='\'
 
 
 
-ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
-if test "x$ac_cv_func_mkstemp" = x""yes; then :
-
-$as_echo "#define HAS_MKSTEMP 1" >>confdefs.h
-
-fi
-
+ac_config_headers="$ac_config_headers config.h"
 
-# bmtoa checks for packages
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BMTOA" >&5
-$as_echo_n "checking for BMTOA... " >&6; }
 
-if test -n "$BMTOA_CFLAGS"; then
-    pkg_cv_BMTOA_CFLAGS="$BMTOA_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xmu\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xmu") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_BMTOA_CFLAGS=`$PKG_CONFIG --cflags "x11 xmu" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$BMTOA_LIBS"; then
-    pkg_cv_BMTOA_LIBS="$BMTOA_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xmu\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11 xmu") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_BMTOA_LIBS=`$PKG_CONFIG --libs "x11 xmu" 2>/dev/null`
+# Internationalization & localization support
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gettext" >&5
+$as_echo_n "checking for library containing gettext... " >&6; }
+if ${ac_cv_search_gettext+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+/* 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 gettext ();
+int
+main ()
+{
+return gettext ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' intl; 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_gettext=$ac_res
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               BMTOA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xmu" 2>&1`
-        else
-               BMTOA_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xmu" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$BMTOA_PKG_ERRORS" >&5
-
-       as_fn_error $? "Package requirements (x11 xmu) were not met:
-
-$BMTOA_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables BMTOA_CFLAGS
-and BMTOA_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables BMTOA_CFLAGS
-and BMTOA_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
-       BMTOA_CFLAGS=$pkg_cv_BMTOA_CFLAGS
-       BMTOA_LIBS=$pkg_cv_BMTOA_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_gettext+:} false; then :
+  break
 fi
+done
+if ${ac_cv_search_gettext+:} false; then :
 
-
-
-# atobm checks for packages
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATOBM" >&5
-$as_echo_n "checking for ATOBM... " >&6; }
-
-if test -n "$ATOBM_CFLAGS"; then
-    pkg_cv_ATOBM_CFLAGS="$ATOBM_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ATOBM_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
 else
-  pkg_failed=yes
+  ac_cv_search_gettext=no
 fi
- else
-    pkg_failed=untried
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
-if test -n "$ATOBM_LIBS"; then
-    pkg_cv_ATOBM_LIBS="$ATOBM_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ATOBM_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gettext" >&5
+$as_echo "$ac_cv_search_gettext" >&6; }
+ac_res=$ac_cv_search_gettext
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  USE_GETTEXT="yes"
 else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
+  USE_GETTEXT="no"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install localized messages" >&5
+$as_echo_n "checking where to install localized messages... " >&6; }
 
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+# Check whether --with-localedir was given.
+if test "${with_localedir+set}" = set; then :
+  withval=$with_localedir; LOCALEDIR=${withval}
 else
-        _pkg_short_errors_supported=no
+  LOCALEDIR=${datadir}/locale
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               ATOBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
-        else
-               ATOBM_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$ATOBM_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (x11) were not met:
 
-$ATOBM_PKG_ERRORS
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ax_define_dir="\"$LOCALEDIR\""
+  eval ax_define_dir="\"$ax_define_dir\""
+  LOCALEDIR="$ax_define_dir"
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables ATOBM_CFLAGS
-and ATOBM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+cat >>confdefs.h <<_ACEOF
+#define LOCALEDIR "$ax_define_dir"
+_ACEOF
 
-Alternatively, you may set the environment variables ATOBM_CFLAGS
-and ATOBM_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: nowhere" >&5
+$as_echo "nowhere" >&6; }
+        USE_GETTEXT="no"
 else
-       ATOBM_CFLAGS=$pkg_cv_ATOBM_CFLAGS
-       ATOBM_LIBS=$pkg_cv_ATOBM_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCALEDIR" >&5
+$as_echo "$LOCALEDIR" >&6; }
 fi
 
+if test "x$USE_GETTEXT" = "xyes" ; then
 
+$as_echo "#define USE_GETTEXT 1" >>confdefs.h
 
-# bitmap checks for packages
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BITMAP" >&5
-$as_echo_n "checking for BITMAP... " >&6; }
-
-if test -n "$BITMAP_CFLAGS"; then
-    pkg_cv_BITMAP_CFLAGS="$BITMAP_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu xaw7 xbitmaps\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmu xaw7 xbitmaps") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_BITMAP_CFLAGS=`$PKG_CONFIG --cflags "xmu xaw7 xbitmaps" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$BITMAP_LIBS"; then
-    pkg_cv_BITMAP_LIBS="$BITMAP_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu xaw7 xbitmaps\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmu xaw7 xbitmaps") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_BITMAP_LIBS=`$PKG_CONFIG --libs "xmu xaw7 xbitmaps" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
 fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+ if test "x$USE_GETTEXT" = "xyes"; then
+  USE_GETTEXT_TRUE=
+  USE_GETTEXT_FALSE='#'
 else
-        _pkg_short_errors_supported=no
+  USE_GETTEXT_TRUE='#'
+  USE_GETTEXT_FALSE=
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               BITMAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmu xaw7 xbitmaps" 2>&1`
-        else
-               BITMAP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmu xaw7 xbitmaps" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$BITMAP_PKG_ERRORS" >&5
-
-       as_fn_error $? "Package requirements (xmu xaw7 xbitmaps) were not met:
-
-$BITMAP_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables BITMAP_CFLAGS
-and BITMAP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables BITMAP_CFLAGS
-and BITMAP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
-else
-       BITMAP_CFLAGS=$pkg_cv_BITMAP_CFLAGS
-       BITMAP_LIBS=$pkg_cv_BITMAP_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-fi
+# Checks for pkg-config packages
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XBITMAP" >&5
-$as_echo_n "checking for XBITMAP... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFD" >&5
+$as_echo_n "checking for XFD... " >&6; }
 
-if test -n "$XBITMAP_CFLAGS"; then
-    pkg_cv_XBITMAP_CFLAGS="$XBITMAP_CFLAGS"
+if test -n "$XFD_CFLAGS"; then
+    pkg_cv_XFD_CFLAGS="$XFD_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu xaw7 xbitmaps\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmu xaw7 xbitmaps") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 freetype2 fontconfig xft xrender xmu\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 freetype2 fontconfig xft xrender xmu") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XBITMAP_CFLAGS=`$PKG_CONFIG --cflags "xmu xaw7 xbitmaps" 2>/dev/null`
+  pkg_cv_XFD_CFLAGS=`$PKG_CONFIG --cflags "xaw7 freetype2 fontconfig xft xrender xmu" 2>/dev/null`
 else
   pkg_failed=yes
 fi
  else
     pkg_failed=untried
 fi
-if test -n "$XBITMAP_LIBS"; then
-    pkg_cv_XBITMAP_LIBS="$XBITMAP_LIBS"
+if test -n "$XFD_LIBS"; then
+    pkg_cv_XFD_LIBS="$XFD_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xmu xaw7 xbitmaps\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xmu xaw7 xbitmaps") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 freetype2 fontconfig xft xrender xmu\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 freetype2 fontconfig xft xrender xmu") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XBITMAP_LIBS=`$PKG_CONFIG --libs "xmu xaw7 xbitmaps" 2>/dev/null`
+  pkg_cv_XFD_LIBS=`$PKG_CONFIG --libs "xaw7 freetype2 fontconfig xft xrender xmu" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -5184,8 +4796,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5193,52 +4803,45 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               XBITMAP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmu xaw7 xbitmaps" 2>&1`
+               XFD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 freetype2 fontconfig xft xrender xmu" 2>&1`
         else
-               XBITMAP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmu xaw7 xbitmaps" 2>&1`
+               XFD_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 freetype2 fontconfig xft xrender xmu" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$XBITMAP_PKG_ERRORS" >&5
+       echo "$XFD_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (xmu xaw7 xbitmaps) were not met:
+       as_fn_error $? "Package requirements (xaw7 freetype2 fontconfig xft xrender xmu) were not met:
 
-$XBITMAP_PKG_ERRORS
+$XFD_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XBITMAP_CFLAGS
-and XBITMAP_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+Alternatively, you may set the environment variables XFD_CFLAGS
+and XFD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XBITMAP_CFLAGS
-and XBITMAP_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XFD_CFLAGS
+and XFD_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
-       XBITMAP_CFLAGS=$pkg_cv_XBITMAP_CFLAGS
-       XBITMAP_LIBS=$pkg_cv_XBITMAP_LIBS
+       XFD_CFLAGS=$pkg_cv_XFD_CFLAGS
+       XFD_LIBS=$pkg_cv_XFD_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
 
-BITMAP_CFLAGS="$BITMAP_CFLAGS $XBITMAPS_CFLAGS"
-BITMAP_LIBS="$BITMAP_LIBS $XBITMAPS_LIBS"
-
-
-
-
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
@@ -5280,8 +4883,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5305,10 +4906,9 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables APPDEFS_CFLAGS
 and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
@@ -5320,15 +4920,15 @@ and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
        APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
 # Check whether --with-appdefaultdir was given.
 if test "${with_appdefaultdir+set}" = set; then :
@@ -5339,6 +4939,7 @@ fi
 
 
 
+
 ac_config_files="$ac_config_files Makefile"
 
 cat >confcache <<\_ACEOF
@@ -5405,10 +5006,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
+    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;}
-    cat confcache >$cache_file
+      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
     { $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;}
@@ -5459,8 +5071,12 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${USE_GETTEXT_TRUE}" && test -z "${USE_GETTEXT_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GETTEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
-: ${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"
@@ -5561,6 +5177,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5867,8 +5484,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by bitmap $as_me 1.0.4, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by xfd $as_me 1.1.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -5933,8 +5550,8 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-bitmap config.status 1.0.4
-configured by $0, generated by GNU Autoconf 2.67,
+xfd config.status 1.1.0
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -6062,11 +5679,11 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -6089,9 +5706,10 @@ 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 'as_fn_exit 1' 1 2 13 15
 }
@@ -6099,12 +5717,13 @@ $debug ||
 
 {
   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")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6126,7 +5745,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -6154,7 +5773,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -6202,7 +5821,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -6234,7 +5853,7 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -6268,7 +5887,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6280,8 +5899,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  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
@@ -6382,7 +6001,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -6401,7 +6020,7 @@ do
     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 `:'.
@@ -6410,7 +6029,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+          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
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -6436,8 +6055,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -6573,21 +6192,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+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"; } &&
+  { 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";;
+  -) 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
  ;;
@@ -6598,20 +6218,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && 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" "$tmp/config.h" >/dev/null 2>&1; then
+    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" \
+      mv "$ac_tmp/config.h" "$ac_file" \
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
similarity index 53%
rename from bitmap/configure.ac
rename to xfd/configure.ac
index d2421b8..e14a1d2 100644 (file)
@@ -21,52 +21,52 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(bitmap,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],bitmap)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xfd],[1.1.0],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xfd])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
-
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-AC_CHECK_FUNC([mkstemp], 
-   AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.]))
-
-# bmtoa checks for packages
-PKG_CHECK_MODULES(BMTOA, x11 xmu)
-AC_SUBST(BMTOA_CFLAGS)
-AC_SUBST(BMTOA_LIBS)
+AM_CONFIG_HEADER(config.h)
 
-# atobm checks for packages
-PKG_CHECK_MODULES(ATOBM, x11)
-AC_SUBST(ATOBM_CFLAGS)
-AC_SUBST(ATOBM_LIBS)
 
-# bitmap checks for packages
-PKG_CHECK_MODULES(BITMAP, xmu xaw7 xbitmaps)
-PKG_CHECK_MODULES(XBITMAP, xmu xaw7 xbitmaps)
+# Internationalization & localization support
+AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
+AC_MSG_CHECKING([where to install localized messages])
+AC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>],
+        [Path to install message files in (default: datadir/locale)]),
+        [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
+AX_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages])
+if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
+        AC_MSG_RESULT([nowhere])
+        USE_GETTEXT="no"
+else
+        AC_MSG_RESULT([$LOCALEDIR])
+fi
 
-BITMAP_CFLAGS="$BITMAP_CFLAGS $XBITMAPS_CFLAGS"
-BITMAP_LIBS="$BITMAP_LIBS $XBITMAPS_LIBS"
+if test "x$USE_GETTEXT" = "xyes" ; then
+        AC_DEFINE([USE_GETTEXT], 1,
+                  [Define to 1 if you want to use the gettext() function.])
+fi
+AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
 
-AC_SUBST(BITMAP_CFLAGS)
-AC_SUBST(BITMAP_LIBS)
+# Checks for pkg-config packages
+PKG_CHECK_MODULES(XFD, xaw7 freetype2 fontconfig xft xrender xmu)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
        [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
+
 AC_OUTPUT([Makefile])
similarity index 100%
rename from xgc/depcomp
rename to xfd/depcomp
diff --git a/xfd/grid.c b/xfd/grid.c
new file mode 100644 (file)
index 0000000..4976221
--- /dev/null
@@ -0,0 +1,1004 @@
+/*
+ * $XdotOrg: grid.c,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $
+ * $Xorg: grid.c,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $
+ *
+ * 
+Copyright 1989, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ * *
+ * Author:  Jim Fulton, MIT X Consortium
+ */
+/* $XFree86: xc/programs/xfd/grid.c,v 1.9 2002/07/06 00:46:42 keithp Exp $ */
+
+
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+#include <X11/Xaw/SimpleP.h>
+#include <X11/Xmu/Converters.h>
+#include <X11/Xos.h>
+#include "gridP.h"
+
+#ifdef XKB
+#include <X11/extensions/XKBbells.h>
+#else
+#define        XkbBI_MinorError                2
+#define        XkbBI_Ignore                    11
+#endif
+
+#ifdef XKB
+#define Bell(w,n) XkbStdBell(XtDisplay(w), XtWindow(w), 50, n)
+#else
+#define Bell(w,n) XBell(XtDisplay(w), 0)
+#endif
+
+static GC get_gc(FontGridWidget fgw, Pixel fore);
+static void ClassInitialize(void);
+static void Initialize(Widget request, Widget new, ArgList args, 
+                      Cardinal *num_args);
+static void Realize(Widget gw, Mask *valueMask, 
+                   XSetWindowAttributes *attributes);
+static void Destroy(Widget gw);
+static void Resize(Widget gw);
+static void Redisplay(Widget gw, XEvent *event, Region region);
+static void paint_grid(FontGridWidget fgw, int col, int row, 
+                      int ncols, int nrows);
+static Boolean SetValues(Widget current, Widget request, Widget new, 
+                        ArgList args, Cardinal *num_args);
+static void Notify(Widget gw, XEvent *event, String *params, 
+                  Cardinal *nparams);
+
+#define Offset(field) XtOffsetOf(FontGridRec, fontgrid.field)
+
+static XtResource resources[] = {
+    { XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
+       Offset(text_font), XtRString, (XtPointer) NULL },
+    { XtNcellColumns, XtCCellColumns, XtRInt, sizeof(int),
+       Offset(cell_cols), XtRImmediate, (XtPointer) 0 },
+    { XtNcellRows, XtCCellRows, XtRInt, sizeof(int),
+       Offset(cell_rows), XtRImmediate, (XtPointer) 0 },
+    { XtNcellWidth, XtCCellWidth, XtRInt, sizeof(int),
+       Offset(cell_width), XtRImmediate, (XtPointer) 0 },
+    { XtNcellHeight, XtCCellHeight, XtRInt, sizeof(int),
+       Offset(cell_height), XtRImmediate, (XtPointer) 0 },
+    { XtNstartChar, XtCStartChar, XtRLong, sizeof(long),
+       Offset(start_char), XtRImmediate, (XtPointer) 0xffffffff },
+#ifndef XRENDER
+    { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
+       Offset(foreground_pixel), XtRString, (XtPointer) XtDefaultForeground },
+#endif
+    { XtNcenterChars, XtCCenterChars, XtRBoolean, sizeof(Boolean),
+       Offset(center_chars), XtRImmediate, (XtPointer) FALSE },
+    { XtNboxChars, XtCBoxChars, XtRBoolean, sizeof(Boolean),
+       Offset(box_chars), XtRImmediate, (XtPointer) FALSE },
+    { XtNboxColor, XtCForeground, XtRPixel, sizeof(Pixel),
+       Offset(box_pixel), XtRString, (XtPointer) XtDefaultForeground },
+    { XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer),
+       Offset(callbacks), XtRCallback, (XtPointer) NULL },
+    { XtNinternalPad, XtCInternalPad, XtRInt, sizeof(int),
+       Offset(internal_pad), XtRImmediate, (XtPointer) 4 },
+    { XtNgridWidth, XtCGridWidth, XtRInt, sizeof(int),
+       Offset(grid_width), XtRImmediate, (XtPointer) 1 },
+#ifdef XRENDER
+    {XtNforeground, XtCForeground, XtRXftColor, sizeof(XftColor),
+        Offset(fg_color), XtRString, XtDefaultForeground},
+    {XtNface, XtCFace, XtRXftFont, sizeof (XftFont *),
+       Offset (text_face), XtRString, NULL},
+#endif
+};
+
+#undef Offset
+
+static char defaultTranslations[] = 
+  "<ButtonPress>:  notify()";
+
+static XtActionsRec actions_list[] = {
+    { "notify",                Notify },
+};
+
+FontGridClassRec fontgridClassRec = {
+  { /* core fields */
+    /* superclass               */      (WidgetClass) &simpleClassRec,
+    /* class_name               */      "FontGrid",
+    /* widget_size              */      sizeof(FontGridRec),
+    /* class_initialize         */      ClassInitialize,
+    /* class_part_initialize    */      NULL,
+    /* class_inited             */      FALSE,
+    /* initialize               */      Initialize,
+    /* initialize_hook          */      NULL,
+    /* realize                  */      Realize,
+    /* actions                  */      actions_list,
+    /* num_actions              */      XtNumber(actions_list),
+    /* resources                */      resources,
+    /* num_resources            */      XtNumber(resources),
+    /* xrm_class                */      NULLQUARK,
+    /* compress_motion          */      TRUE,
+    /* compress_exposure        */      TRUE,
+    /* compress_enterleave      */      TRUE,
+    /* visible_interest         */      FALSE,
+    /* destroy                  */      Destroy,
+    /* resize                   */      Resize,
+    /* expose                   */      Redisplay,
+    /* set_values               */      SetValues,
+    /* set_values_hook          */      NULL,
+    /* set_values_almost        */      XtInheritSetValuesAlmost,
+    /* get_values_hook          */      NULL,
+    /* accept_focus             */      NULL,
+    /* version                  */      XtVersion,
+    /* callback_private         */      NULL,
+    /* tm_table                 */      defaultTranslations,
+    /* query_geometry           */      XtInheritQueryGeometry,
+    /* display_accelerator      */      XtInheritDisplayAccelerator,
+    /* extension                */      NULL
+  },
+  { /* simple fields */
+    /* change_sensitive                */      XtInheritChangeSensitive
+  }
+};
+
+WidgetClass fontgridWidgetClass = (WidgetClass) &fontgridClassRec;
+
+
+long
+GridFirstChar (Widget w)
+{
+    FontGridWidget     fgw = (FontGridWidget) w;
+    XFontStruct                *fs = fgw->fontgrid.text_font;
+#ifdef XRENDER
+    XftFont            *xft = fgw->fontgrid.text_face;
+    if (xft)
+    {
+       FcChar32    map[FC_CHARSET_MAP_SIZE];
+       FcChar32    next;
+       FcChar32    first;
+       int         i;
+
+       first = FcCharSetFirstPage (xft->charset, map, &next);
+       for (i = 0; i < FC_CHARSET_MAP_SIZE; i++)
+           if (map[i])
+           {
+               FcChar32    bits = map[i];
+               first += i * 32;
+               while (!(bits & 0x1))
+               {
+                   bits >>= 1;
+                   first++;
+               }
+               break;
+           }
+       return first;
+    }
+    else
+#endif
+    if (fs)
+    {
+       return (fs->min_byte1 << 8) | (fs->min_char_or_byte2);
+    }
+    else
+       return 0;
+}
+
+long
+GridLastChar (Widget w)
+{
+    FontGridWidget     fgw = (FontGridWidget) w;
+    XFontStruct                *fs = fgw->fontgrid.text_font;
+#ifdef XRENDER
+    XftFont            *xft = fgw->fontgrid.text_face;
+    if (xft)
+    {
+       FcChar32    this, last, next;
+       FcChar32    map[FC_CHARSET_MAP_SIZE];
+       int         i;
+       last = FcCharSetFirstPage (xft->charset, map, &next);
+       while ((this = FcCharSetNextPage (xft->charset, map, &next)) != FC_CHARSET_DONE)
+           last = this;
+       last &= ~0xff;
+       for (i = FC_CHARSET_MAP_SIZE - 1; i >= 0; i--)
+           if (map[i])
+           {
+               FcChar32    bits = map[i];
+               last += i * 32 + 31;
+               while (!(bits & 0x80000000))
+               {
+                   last--;
+                   bits <<= 1;
+               }
+               break;
+           }
+       return (long) last;
+    }
+    else
+#endif
+    if (fs)
+    {
+       return (fs->max_byte1 << 8) | (fs->max_char_or_byte2);
+    }
+    else
+       return 0;
+}
+
+/*
+ * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
+ * character.  If the character is in the column and exists, then return the
+ * appropriate metrics (note that fonts with common per-character metrics will
+ * return min_bounds).
+ */
+
+#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
+                            (((cs)->rbearing|(cs)->lbearing| \
+                              (cs)->ascent|(cs)->descent) == 0))
+
+#define CI_GET_CHAR_INFO_1D(fs,col,cs) \
+{ \
+    cs = NULL; \
+    if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
+       if (fs->per_char == NULL) { \
+           cs = &fs->min_bounds; \
+       } else { \
+           cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
+       } \
+       if (CI_NONEXISTCHAR(cs)) \
+           cs = NULL; \
+    } \
+}
+
+/*
+ * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and 
+ * column.  This is used for fonts that have more than row zero.
+ */
+#define CI_GET_CHAR_INFO_2D(fs,row,col,cs) \
+{ \
+    cs = NULL; \
+    if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
+       col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
+       if (fs->per_char == NULL) { \
+           cs = &fs->min_bounds; \
+       } else { \
+           cs = &fs->per_char[((row - fs->min_byte1) * \
+                               (fs->max_char_or_byte2 - \
+                                fs->min_char_or_byte2 + 1)) + \
+                              (col - fs->min_char_or_byte2)]; \
+        } \
+       if (CI_NONEXISTCHAR(cs)) \
+           cs = NULL; \
+    } \
+}
+
+static Boolean
+GridHasChar (Widget w, long ch)
+{
+    FontGridWidget     fgw = (FontGridWidget) w;
+#ifdef XRENDER
+    XftFont            *xft = fgw->fontgrid.text_face;
+    if (xft)
+    {
+       return FcCharSetHasChar (xft->charset, (FcChar32) ch);
+    }
+    else
+#endif
+    {
+       XFontStruct     *fs = fgw->fontgrid.text_font;
+       XCharStruct     *cs;
+       
+       if (!fs)
+           return False;
+       if (fs->max_byte1 == 0)
+       {
+           CI_GET_CHAR_INFO_1D (fs, ch, cs);
+       }
+       else
+       {
+           unsigned int        r = (ch >> 8);
+           unsigned int        c = (ch & 0xff);
+           CI_GET_CHAR_INFO_2D (fs, r, c, cs);
+       }
+       return cs != NULL;
+    }
+}
+
+/*
+ * public routines
+ */
+
+void 
+GetFontGridCellDimensions(Widget w, long *startp, 
+                         int *ncolsp, int *nrowsp)
+{
+    FontGridWidget fgw = (FontGridWidget) w;
+    *startp = fgw->fontgrid.start_char;
+    *ncolsp = fgw->fontgrid.cell_cols;
+    *nrowsp = fgw->fontgrid.cell_rows;
+}
+
+
+void 
+GetPrevNextStates(Widget w, Bool *prevvalidp, Bool *nextvalidp,
+                 Bool *prev16validp, Bool *next16validp)
+{
+    FontGridWidget fgw = (FontGridWidget) w;
+    long minn = (long) GridFirstChar (w);
+    long maxn = (long) GridLastChar (w);
+
+    *prev16validp = (fgw->fontgrid.start_char - 0xf00 > minn);
+    *prevvalidp = (fgw->fontgrid.start_char > minn);
+    *nextvalidp = (fgw->fontgrid.start_char +
+                  (fgw->fontgrid.cell_cols * fgw->fontgrid.cell_rows)
+                  < maxn);
+    *next16validp =((fgw->fontgrid.start_char + 0xf00 +
+                   (fgw->fontgrid.cell_cols * fgw->fontgrid.cell_rows))
+                  < maxn);
+}
+
+
+
+/*
+ * private routines and methods
+ */
+
+
+static GC 
+get_gc(FontGridWidget fgw, Pixel fore)
+{
+    XtGCMask mask;
+    XGCValues gcv;
+
+    mask = (GCForeground | GCBackground | GCFunction);
+    gcv.foreground = fore;
+    gcv.background = fgw->core.background_pixel;
+    gcv.function = GXcopy;
+    if (fgw->fontgrid.text_font)
+    {
+       mask |= GCFont;
+       gcv.font = fgw->fontgrid.text_font->fid;
+    }
+    gcv.cap_style = CapProjecting;
+    mask |= GCCapStyle;
+    if (fgw->fontgrid.grid_width > 0) {
+       mask |= GCLineWidth;
+       gcv.line_width = ((fgw->fontgrid.grid_width < 2) ? 0 : 
+                         fgw->fontgrid.grid_width);
+    }
+    return (XtGetGC ((Widget) fgw, mask, &gcv));
+}
+
+
+#ifdef XRENDER
+static XtConvertArgRec xftColorConvertArgs[] = {
+    {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
+     sizeof(Screen *)},
+    {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.colormap),
+     sizeof(Colormap)}
+};
+
+#define        donestr(type, value, tstr) \
+       {                                                       \
+           if (toVal->addr != NULL) {                          \
+               if (toVal->size < sizeof(type)) {               \
+                   toVal->size = sizeof(type);                 \
+                   XtDisplayStringConversionWarning(dpy,       \
+                       (char*) fromVal->addr, tstr);           \
+                   return False;                               \
+               }                                               \
+               *(type*)(toVal->addr) = (value);                \
+           }                                                   \
+           else {                                              \
+               static type static_val;                         \
+               static_val = (value);                           \
+               toVal->addr = (XPointer)&static_val;            \
+           }                                                   \
+           toVal->size = sizeof(type);                         \
+           return True;                                        \
+       }
+
+static void
+XmuFreeXftColor (XtAppContext app, XrmValuePtr toVal, XtPointer closure,
+                XrmValuePtr args, Cardinal *num_args)
+{
+    Screen     *screen;
+    Colormap   colormap;
+    XftColor   *color;
+    
+    if (*num_args != 2)
+    {
+       XtAppErrorMsg (app,
+                      "freeXftColor", "wrongParameters",
+                      "XtToolkitError",
+                      "Freeing an XftColor requires screen and colormap arguments",
+                      (String *) NULL, (Cardinal *)NULL);
+       return;
+    }
+
+    screen = *((Screen **) args[0].addr);
+    colormap = *((Colormap *) args[1].addr);
+    color = (XftColor *) toVal->addr;
+    XftColorFree (DisplayOfScreen (screen),
+                 DefaultVisual (DisplayOfScreen (screen),
+                                XScreenNumberOfScreen (screen)),
+                 colormap, color);
+}
+    
+static Boolean
+XmuCvtStringToXftColor(Display *dpy,
+                      XrmValue *args, Cardinal *num_args,
+                      XrmValue *fromVal, XrmValue *toVal,
+                      XtPointer *converter_data)
+{
+    char           *spec;
+    XRenderColor    renderColor;
+    XftColor       xftColor;
+    Screen         *screen;
+    Colormap       colormap;
+    
+    if (*num_args != 2)
+    {
+       XtAppErrorMsg (XtDisplayToApplicationContext (dpy),
+                      "cvtStringToXftColor", "wrongParameters",
+                      "XtToolkitError",
+                      "String to render color conversion needs screen and colormap arguments",
+                      (String *) NULL, (Cardinal *)NULL);
+       return False;
+    }
+
+    screen = *((Screen **) args[0].addr);
+    colormap = *((Colormap *) args[1].addr);
+
+    spec = (char *) fromVal->addr;
+    if (strcasecmp (spec, XtDefaultForeground) == 0)
+    {
+       renderColor.red = 0;
+       renderColor.green = 0;
+       renderColor.blue = 0;
+       renderColor.alpha = 0xffff;
+    }
+    else if (strcasecmp (spec, XtDefaultBackground) == 0)
+    {
+       renderColor.red = 0xffff;
+       renderColor.green = 0xffff;
+       renderColor.blue = 0xffff;
+       renderColor.alpha = 0xffff;
+    }
+    else if (!XRenderParseColor (dpy, spec, &renderColor))
+       return False;
+    if (!XftColorAllocValue (dpy, 
+                            DefaultVisual (dpy,
+                                           XScreenNumberOfScreen (screen)),
+                            colormap,
+                            &renderColor,
+                            &xftColor))
+       return False;
+    
+    donestr (XftColor, xftColor, XtRXftColor);
+}
+
+static void
+XmuFreeXftFont (XtAppContext app, XrmValuePtr toVal, XtPointer closure,
+               XrmValuePtr args, Cardinal *num_args)
+{
+    Screen  *screen;
+    XftFont *font;
+    
+    if (*num_args != 1)
+    {
+       XtAppErrorMsg (app,
+                      "freeXftFont", "wrongParameters",
+                      "XtToolkitError",
+                      "Freeing an XftFont requires screen argument",
+                      (String *) NULL, (Cardinal *)NULL);
+       return;
+    }
+
+    screen = *((Screen **) args[0].addr);
+    font = *((XftFont **) toVal->addr);
+    if (font)
+       XftFontClose (DisplayOfScreen (screen), font);
+}
+
+static Boolean
+XmuCvtStringToXftFont(Display *dpy,
+                     XrmValue *args, Cardinal *num_args,
+                     XrmValue *fromVal, XrmValue *toVal,
+                     XtPointer *converter_data)
+{
+    char    *name;
+    XftFont *font;
+    Screen  *screen;
+    
+    if (*num_args != 1)
+    {
+       XtAppErrorMsg (XtDisplayToApplicationContext (dpy),
+                      "cvtStringToXftFont", "wrongParameters",
+                      "XtToolkitError",
+                      "String to XftFont conversion needs screen argument",
+                      (String *) NULL, (Cardinal *)NULL);
+       return False;
+    }
+
+    screen = *((Screen **) args[0].addr);
+    name = (char *) fromVal->addr;
+
+    font = NULL;
+    if (name)
+    {
+       font = XftFontOpenName (dpy,
+                               XScreenNumberOfScreen (screen),
+                               name);
+       if (!font)
+       {
+           XtDisplayStringConversionWarning(dpy, (char *) fromVal->addr, XtRXftFont);
+           return False;
+       }
+    }
+    donestr (XftFont *, font, XtRXftFont);
+}
+
+static XtConvertArgRec xftFontConvertArgs[] = {
+    {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen),
+     sizeof(Screen *)},
+};
+
+#endif
+
+static void 
+ClassInitialize(void)
+{
+    XtAddConverter (XtRString, XtRLong, XmuCvtStringToLong, NULL, 0);
+#ifdef XRENDER
+    XtSetTypeConverter (XtRString, XtRXftColor, 
+                       XmuCvtStringToXftColor, 
+                       xftColorConvertArgs, XtNumber(xftColorConvertArgs),
+                       XtCacheByDisplay, XmuFreeXftColor);
+    XtSetTypeConverter (XtRString, XtRXftFont,
+                       XmuCvtStringToXftFont,
+                       xftFontConvertArgs, XtNumber(xftFontConvertArgs),
+                       XtCacheByDisplay, XmuFreeXftFont);
+#endif
+}
+
+
+static void 
+Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args)
+{
+    FontGridWidget reqfg = (FontGridWidget) request;
+    FontGridWidget newfg = (FontGridWidget) new;
+    XFontStruct *fs = newfg->fontgrid.text_font;
+#ifdef XRENDER
+    XftFont *xft = newfg->fontgrid.text_face;
+#endif
+    unsigned maxn;
+
+    if (reqfg->fontgrid.cell_cols <= 0)
+      newfg->fontgrid.cell_cols = 16;
+
+    if (reqfg->fontgrid.cell_rows <= 0) {
+#ifdef XRENDER
+       if (xft)
+           newfg->fontgrid.cell_rows = 16;
+       else
+#endif
+       if (fs && fs->max_byte1 == 0) {
+           newfg->fontgrid.cell_rows = (fs->max_char_or_byte2 / 
+                                        newfg->fontgrid.cell_cols) + 1;
+           if (newfg->fontgrid.cell_rows > 16)
+             newfg->fontgrid.cell_rows = 16;
+       } else
+         newfg->fontgrid.cell_rows = 16;
+    }
+
+    if (reqfg->fontgrid.cell_width <= 0)
+      newfg->fontgrid.cell_width = DefaultCellWidth (newfg);
+    if (reqfg->fontgrid.cell_height <= 0)
+      newfg->fontgrid.cell_height = DefaultCellHeight (newfg);
+
+    /* give a nice size that fits one screen full */
+    if (newfg->core.width == 0)
+      newfg->core.width = (newfg->fontgrid.cell_width *
+                          newfg->fontgrid.cell_cols +
+                          newfg->fontgrid.grid_width *
+                          (newfg->fontgrid.cell_cols + 1));
+
+    if (newfg->core.height == 0) 
+      newfg->core.height = (newfg->fontgrid.cell_height * 
+                           newfg->fontgrid.cell_rows +
+                           newfg->fontgrid.grid_width *
+                           (newfg->fontgrid.cell_rows + 1));
+
+    /*
+     * select the first character
+     */
+
+    if (newfg->fontgrid.start_char == 0xffffffff)
+       newfg->fontgrid.start_char = GridFirstChar(new) & ~0xff;
+    maxn = GridLastChar (new);
+    if (newfg->fontgrid.start_char > maxn) 
+       newfg->fontgrid.start_char = (maxn + 1 - 
+                                     (newfg->fontgrid.cell_cols * 
+                                      newfg->fontgrid.cell_rows));
+}
+
+static void 
+Realize(Widget gw, Mask *valueMask, XSetWindowAttributes *attributes)
+{
+    FontGridWidget fgw = (FontGridWidget) gw;
+    FontGridPart *p = &fgw->fontgrid;
+
+    p->text_gc = get_gc (fgw, GridForeground (fgw));
+    p->box_gc = get_gc (fgw, p->box_pixel);
+    Resize (gw);
+
+    (*(XtSuperclass(gw)->core_class.realize)) (gw, valueMask, attributes);
+#ifdef XRENDER
+    p->draw = XftDrawCreate (XtDisplay (gw), XtWindow (gw),
+                            DefaultVisual (XtDisplay (gw),
+                                           DefaultScreen(XtDisplay (gw))),
+                            fgw->core.colormap);
+#endif
+    return;
+}
+
+
+
+static void 
+Destroy(Widget gw)
+{
+    FontGridWidget fgw = (FontGridWidget) gw;
+
+    XtReleaseGC (gw, fgw->fontgrid.text_gc);
+    XtReleaseGC (gw, fgw->fontgrid.box_gc);
+}
+
+
+static void 
+Resize(Widget gw)
+{
+    FontGridWidget fgw = (FontGridWidget) gw;
+
+    /* recompute in case we've changed size */
+    fgw->fontgrid.cell_width = CellWidth (fgw);
+    if (fgw->fontgrid.cell_width <= 0)
+       fgw->fontgrid.cell_width = 1;
+    fgw->fontgrid.cell_height = CellHeight (fgw);
+    if (fgw->fontgrid.cell_height <= 0)
+       fgw->fontgrid.cell_height = 1;
+    fgw->fontgrid.xoff = (fgw->fontgrid.cell_width -
+                           DefaultCellWidth (fgw)) / 2;
+    fgw->fontgrid.yoff = (fgw->fontgrid.cell_height -
+                           DefaultCellHeight (fgw)) / 2;
+
+}
+
+
+/* ARGSUSED */
+static void 
+Redisplay(Widget gw, XEvent *event, Region region)
+{
+    FontGridWidget fgw = (FontGridWidget) gw;
+    XRectangle rect;                   /* bounding rect for region */
+    int left, right, top, bottom;      /* which cells were damaged */
+    int cw, ch;                                /* cell size */
+
+#ifdef XRENDER
+    if (!fgw->fontgrid.text_face)
+#endif
+    if (!fgw->fontgrid.text_font) {
+       Bell (gw, XkbBI_BadValue);
+       return;
+    }
+
+    /*
+     * compute the left, right, top, and bottom cells that were damaged
+     */
+    XClipBox (region, &rect);
+    cw = fgw->fontgrid.cell_width + fgw->fontgrid.grid_width;
+    ch = fgw->fontgrid.cell_height + fgw->fontgrid.grid_width;
+    if ((left = (((int) rect.x) / cw)) < 0) left = 0;
+    right = (((int) (rect.x + rect.width - 1)) / cw);
+    if ((top = (((int) rect.y) / ch)) < 0) top = 0;
+    bottom = (((int) (rect.y + rect.height - 1)) / ch);
+
+    paint_grid (fgw, left, top, right - left + 1, bottom - top + 1);
+}
+
+
+static void 
+paint_grid(FontGridWidget fgw,                 /* widget in which to draw */ 
+          int col, int row,            /* where to start */          
+          int ncols, int nrows)        /* number of cells */         
+{
+    FontGridPart *p = &fgw->fontgrid;
+    int i, j;
+    Display *dpy = XtDisplay(fgw);
+    Window wind = XtWindow(fgw);
+    int cw = p->cell_width + p->grid_width;
+    int ch = p->cell_height + p->grid_width;
+    int tcols = p->cell_cols;
+    int trows = p->cell_rows;
+    int x1, y1, x2, y2, x, y;
+    unsigned maxn = GridLastChar ((Widget) fgw);
+    unsigned n, prevn;
+    int startx;
+
+    if (col + ncols >= tcols) {
+       ncols = tcols - col;
+       if (ncols < 1) return;
+    }
+
+    if (row + nrows >= trows) {
+       nrows = trows - row;
+       if (nrows < 1) return;
+    }
+
+    /*
+     * paint the grid lines for the indicated rows 
+     */
+    if (p->grid_width > 0) {
+       int half_grid_width = p->grid_width >> 1;
+       x1 = col * cw + half_grid_width;
+       y1 = row * ch + half_grid_width;
+       x2 = x1 + ncols * cw;
+       y2 = y1 + nrows * ch;
+       for (i = 0, x = x1; i <= ncols; i++, x += cw) {
+           XDrawLine (dpy, wind, p->box_gc, x, y1, x, y2);
+       }
+       for (i = 0, y = y1; i <= nrows; i++, y += ch) {
+           XDrawLine (dpy, wind, p->box_gc, x1, y, x2, y);
+       }
+    }
+    /*
+     * Draw a character in every box; treat all fonts as if they were 16bit
+     * fonts.  Store the high eight bits in byte1 and the low eight bits in 
+     * byte2.
+     */
+    prevn = p->start_char + col + row * tcols;
+    startx = col * cw + p->internal_pad + p->grid_width;
+    for (j = 0,
+        y = row * ch + p->internal_pad + p->grid_width + GridFontAscent (fgw);
+        j < nrows; j++, y += ch) {
+       n = prevn;
+       for (i = 0, x = startx; i < ncols; i++, x += cw) {
+           int xoff = p->xoff, yoff = p->yoff;
+           if (n > maxn) goto done;    /* no break out of nested */
+
+#ifdef XRENDER
+           if (fgw->fontgrid.text_face)
+           {
+               XftFont *xft = p->text_face;
+               FcChar32    c = n;
+               XGlyphInfo  extents;
+               XftTextExtents32 (dpy, xft, &c, 1, &extents);
+               if (p->center_chars)
+               {
+                   xoff = (p->cell_width - extents.width) / 2 - extents.x;
+                   yoff = (p->cell_height - extents.height) / 2 - extents.y;
+               }
+               if (extents.width && extents.height)
+               {
+                   XClearArea (dpy, wind, x + xoff - extents.x, 
+                               y + yoff - extents.y,
+                               extents.width, extents.height, False);
+                   if (p->box_chars)
+                       XDrawRectangle (dpy, wind, p->box_gc,
+                                       x + xoff - extents.x, 
+                                       y + yoff - extents.y,
+                                       extents.width - 1,
+                                       extents.height - 1);
+               }
+               XftDrawString32 (p->draw, &p->fg_color, xft,
+                                x + xoff, y + yoff, &c, 1);
+           }
+           else
+#endif
+           {
+           XChar2b thechar;
+
+           thechar.byte1 = (n >> 8);   /* high eight bits */
+           thechar.byte2 = (n & 255);  /* low eight bits */
+           if (p->box_chars || p->center_chars) {
+               XCharStruct metrics;
+               int direction, fontascent, fontdescent;
+
+               XTextExtents16 (p->text_font, &thechar, 1, &direction,
+                               &fontascent, &fontdescent, &metrics);
+
+               if (p->center_chars) {
+                   /*
+                    * We want to move the origin by enough to center the ink
+                    * within the cell.  The left edge will then be at 
+                    * (cell_width - (rbearing - lbearing)) / 2; so we subtract
+                    * the lbearing to find the origin.  Ditto for vertical.
+                    */
+                   xoff = (((p->cell_width -
+                             (metrics.rbearing - metrics.lbearing)) / 2) -
+                           p->internal_pad - metrics.lbearing);
+                   yoff = (((p->cell_height - 
+                             (metrics.descent + metrics.ascent)) / 2) -
+                           p->internal_pad -
+                           p->text_font->ascent + metrics.ascent);
+               }
+               if (p->box_chars) {
+                   XDrawRectangle (dpy, wind, p->box_gc,
+                                   x + xoff, y + yoff - p->text_font->ascent, 
+                                   metrics.width - 1,
+                                   fontascent + fontdescent - 1);
+               }
+           }
+           XDrawString16 (dpy, wind, p->text_gc, x + xoff, y + yoff,
+                          &thechar, 1);
+           }
+           n++;
+       }
+       prevn += tcols;
+    }
+
+  done:
+    /*
+     * paint the grid lines for the indicated rows 
+     */
+    if (p->grid_width > 0) {
+       int half_grid_width = p->grid_width >> 1;
+       x1 = col * cw + half_grid_width;
+       y1 = row * ch + half_grid_width;
+       x2 = x1 + ncols * cw;
+       y2 = y1 + nrows * ch;
+       for (i = 0, x = x1; i <= ncols; i++, x += cw) {
+           XDrawLine (dpy, wind, p->box_gc, x, y1, x, y2);
+       }
+       for (i = 0, y = y1; i <= nrows; i++, y += ch) {
+           XDrawLine (dpy, wind, p->box_gc, x1, y, x2, y);
+       }
+    }
+
+       
+    return;
+}
+
+static Boolean
+PageBlank (Widget w, long first, long last)
+{
+    while (first <= last)
+    {
+       if (GridHasChar (w, first))
+           return False;
+       first++;
+    }
+    return True;
+}
+
+/*ARGSUSED*/
+static Boolean 
+SetValues(Widget current, Widget request, Widget new, 
+         ArgList args, Cardinal *num_args)
+{
+    FontGridWidget curfg = (FontGridWidget) current;
+    FontGridWidget newfg = (FontGridWidget) new;
+    Boolean redisplay = FALSE;
+
+    if (curfg->fontgrid.text_font != newfg->fontgrid.text_font ||
+       curfg->fontgrid.internal_pad != newfg->fontgrid.internal_pad) {
+       newfg->fontgrid.cell_width = DefaultCellWidth (newfg);
+       newfg->fontgrid.cell_height = DefaultCellHeight (newfg);
+       redisplay = TRUE;
+    }
+
+    if (GridForeground(curfg) != GridForeground (newfg)) {
+       XtReleaseGC (new, curfg->fontgrid.text_gc);
+       newfg->fontgrid.text_gc = get_gc (newfg, GridForeground (newfg));
+       redisplay = TRUE;
+    }
+
+    if (curfg->fontgrid.box_pixel != newfg->fontgrid.box_pixel) {
+       XtReleaseGC (new, curfg->fontgrid.text_gc);
+       newfg->fontgrid.box_gc = get_gc (newfg, newfg->fontgrid.box_pixel);
+       redisplay = TRUE;
+    }
+
+    if (curfg->fontgrid.center_chars != newfg->fontgrid.center_chars ||
+       curfg->fontgrid.box_chars != newfg->fontgrid.box_chars)
+      redisplay = TRUE;
+
+    if (curfg->fontgrid.start_char != newfg->fontgrid.start_char) {
+       long maxn = GridLastChar (new);
+       long page = newfg->fontgrid.cell_cols * newfg->fontgrid.cell_rows;
+       long dir = page;
+       long start = newfg->fontgrid.start_char;
+
+       if (start < curfg->fontgrid.start_char)
+           dir = -page;
+
+       if (start < 0)
+           start = 0;
+       if (start > maxn) 
+         start = (maxn / page) * page;
+       
+       while (PageBlank (new, start, start + page - 1))
+       {
+           long    next = start + dir;
+
+           if (next < 0 || maxn < next)
+               break;
+           start = next;
+       }
+
+       newfg->fontgrid.start_char = start;
+       redisplay = (curfg->fontgrid.start_char != newfg->fontgrid.start_char);
+    }
+
+    return redisplay;
+}
+
+
+/* ARGSUSED */
+static void 
+Notify(Widget gw, XEvent *event, String *params, Cardinal *nparams)
+{
+    FontGridWidget fgw = (FontGridWidget) gw;
+    int x, y;                          /* where the event happened */
+    FontGridCharRec rec;               /* callback data */
+
+    /*
+     * only allow events with (x,y)
+     */
+    switch (event->type) {
+      case KeyPress:
+      case KeyRelease:
+       x = event->xkey.x;
+       y = event->xkey.y;
+       break;
+      case ButtonPress:
+      case ButtonRelease:
+       x = event->xbutton.x;
+       y = event->xbutton.y;
+       break;
+      case MotionNotify:
+       x = event->xmotion.x;
+       y = event->xmotion.y;
+       break;
+      default:
+       Bell (gw, XkbBI_Ignore);
+       return;
+    }
+
+    /*
+     * compute the callback data
+     */
+    {
+       int cw = fgw->fontgrid.cell_width + fgw->fontgrid.grid_width;
+       int ch = fgw->fontgrid.cell_height + fgw->fontgrid.grid_width;
+       unsigned n;
+
+       if (x > (fgw->fontgrid.cell_cols * cw)) {
+           Bell (gw, XkbBI_InvalidLocation);
+           return;
+       }
+
+       n= (fgw->fontgrid.start_char + 
+           ((y / ch) * fgw->fontgrid.cell_cols) + (x / cw));
+
+       rec.thefont = fgw->fontgrid.text_font;
+#ifdef XRENDER
+       rec.theface = fgw->fontgrid.text_face;
+#endif
+       rec.thechar = n;
+    }
+
+    XtCallCallbacks (gw, XtNcallback, (XtPointer) &rec);
+}
+
diff --git a/xfd/grid.h b/xfd/grid.h
new file mode 100644 (file)
index 0000000..2000d0f
--- /dev/null
@@ -0,0 +1,105 @@
+/* $Xorg: grid.h,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
+/*
+
+Copyright 1993, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86: xc/programs/xfd/grid.h,v 1.4 2002/07/23 01:45:41 tsi Exp $ */
+
+#ifndef _FontGrid_h_
+#define _FontGrid_h_
+
+#ifdef XRENDER
+#include <X11/Xft/Xft.h>
+#include <X11/extensions/Xrender.h>
+#endif
+
+typedef struct _FontGridRec *FontGridWidget;
+extern WidgetClass fontgridWidgetClass;
+
+#define XtNcellRows "cellRows"
+#define XtCCellRows "CellRows"
+#define XtNcellColumns "cellColumns"
+#define XtCCellColumns "CellColumns"
+#define XtNcellWidth "cellWidth"
+#define XtCCellWidth "CellWidth"
+#define XtNcellHeight "cellHeight"
+#define XtCCellHeight "CellHeight"
+
+#define XtNcenterChars "centerChars"
+#define XtCCenterChars "CenterChars"
+
+#define XtNboxChars "boxChars"
+#define XtCBoxChars "BoxChars"
+
+#define XtNboxColor "boxColor"
+#define XtCBoxColor "BoxColor"
+
+#define XtNstartChar "startChar"
+#define XtCStartChar "StartChar"
+
+#define XtNinternalPad "internalPad"
+#define XtCInternalPad "InternalPad"
+
+#define XtNgridWidth "gridWidth"
+#define XtCGridWidth "GridWidth"
+
+#define XtRXftColor "XftColor"
+
+#define XtNface "face"
+#define XtCFace "Face"
+#define XtRXftFont "XftFont"
+
+typedef struct _FontGridCharRec {
+#ifdef XRENDER
+    XftFont *          theface;
+#endif
+    XFontStruct *      thefont;
+    long               thechar;
+} FontGridCharRec;
+
+extern void GetFontGridCellDimensions(
+   Widget,
+   long *,
+   int *,
+   int *
+);
+
+extern void GetPrevNextStates(
+    Widget,
+    Bool *,
+    Bool *,
+    Bool *,
+    Bool *
+);
+
+long
+GridFirstChar (Widget w);
+
+long
+GridLastChar (Widget w);
+
+    
+#endif /* _FontGrid_h_ */
diff --git a/xfd/gridP.h b/xfd/gridP.h
new file mode 100644 (file)
index 0000000..9e23145
--- /dev/null
@@ -0,0 +1,116 @@
+/* $Xorg: gridP.h,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
+/*
+
+Copyright 1993, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86$ */
+
+#ifndef _FontGridP_h_
+#define _FontGridP_h_
+
+#include "grid.h"
+
+typedef struct _FontGridClassPart { int dummy; } FontGridClassPart;
+
+typedef struct _FontGridClassRec {
+    CoreClassPart      core_class;
+    SimpleClassPart    simple_class;
+    FontGridClassPart  grid_class;
+} FontGridClassRec;
+extern FontGridClassRec fontgridClassRec;
+
+typedef struct _FontGridPart {
+    XFontStruct *      text_font;              /* font to display */
+    int                        cell_cols, cell_rows;  /* number of cells */
+    int                        cell_width, cell_height;  /* size of cell */
+#ifndef XRENDER
+    Pixel              foreground_pixel;       /* color of text */
+#endif
+    Pixel              box_pixel;      /* for box_chars */
+    Boolean            center_chars;   /* center characters in grid */
+    Boolean            box_chars;      /* put box around logical width */
+    XtCallbackList     callbacks;      /* for notifying caller */
+    int                        internal_pad;   /* extra padding inside grid */
+    long               start_char;     /* first character of grid */
+    int                        grid_width;     /* width of grid lines */
+    /* private data */
+    GC                 text_gc;        /* printing text */
+    GC                 box_gc;         /* for box_chars */
+    int                        xoff, yoff;     /* extra offsets within grid */
+#ifdef XRENDER
+    XftDraw            *draw;
+    XftColor           fg_color;
+    XftFont            *text_face;
+#endif
+} FontGridPart;
+
+typedef struct _FontGridRec {
+    CorePart           core;
+    SimplePart         simple;
+    FontGridPart       fontgrid;
+} FontGridRec;
+
+#ifdef XRENDER
+
+#define GridFontHeight(g)   ((g)->fontgrid.text_face ? \
+                            (g)->fontgrid.text_face->height : \
+                            (g)->fontgrid.text_font ? \
+                            (g)->fontgrid.text_font->ascent + \
+                            (g)->fontgrid.text_font->descent : 1)
+#define GridFontAscent(g)   ((g)->fontgrid.text_face ? \
+                            (g)->fontgrid.text_face->ascent : \
+                            (g)->fontgrid.text_font ? \
+                            (g)->fontgrid.text_font->ascent: 1)
+#define GridFontWidth(g)    ((g)->fontgrid.text_face ? \
+                            (g)->fontgrid.text_face->max_advance_width : \
+                            (g)->fontgrid.text_font ? \
+                            (g)->fontgrid.text_font->max_bounds.width : 1)
+#define GridForeground(g)   ((g)->fontgrid.fg_color.pixel)
+                            
+#else /* XRENDER */
+                            
+#define GridFontHeight(g)   ((g)->fontgrid.text_font->ascent + \
+                            (g)->fontgrid.text_font->descent)
+#define GridFontAscent(g)   ((g)->fontgrid.text_font ? \
+                            (g)->fontgrid.text_font->ascent: 1)
+#define GridFontWidth(g)    ((g)->fontgrid.text_font->max_bounds.width)
+#define GridForeground(g)   ((g)->fontgrid.foreground_pixel)
+                            
+#endif /* else XRENDER */
+
+#define DefaultCellWidth(fgw) (GridFontWidth(fgw) \
+                              + ((fgw)->fontgrid.internal_pad * 2))
+#define DefaultCellHeight(fgw) (GridFontHeight(fgw) + \
+                               ((fgw)->fontgrid.internal_pad * 2))
+
+#define CellWidth(fgw) (((int)(fgw)->core.width - (fgw)->fontgrid.grid_width) \
+                       / (fgw)->fontgrid.cell_cols \
+                       - (fgw)->fontgrid.grid_width)
+#define CellHeight(fgw) (((int)(fgw)->core.height - (fgw)->fontgrid.grid_width)\
+                        / (fgw)->fontgrid.cell_rows \
+                        - (fgw)->fontgrid.grid_width)
+
+#endif /* !_FontGridP_h_ */
similarity index 100%
rename from xgc/install-sh
rename to xfd/install-sh
diff --git a/xfd/m4/ax_define_dir.m4 b/xfd/m4/ax_define_dir.m4
new file mode 100644 (file)
index 0000000..b74d155
--- /dev/null
@@ -0,0 +1,49 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+#   This macro sets VARNAME to the expansion of the DIR variable, taking
+#   care of fixing up ${prefix} and such.
+#
+#   VARNAME is then offered as both an output variable and a C preprocessor
+#   symbol.
+#
+#   Example:
+#
+#     AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
+#   Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2008 Alexandre Oliva
+#
+#   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 6
+
+AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
+AC_DEFUN([AX_DEFINE_DIR], [
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}.  Thus we have to use `eval' twice.
+  eval ax_define_dir="\"[$]$2\""
+  eval ax_define_dir="\"$ax_define_dir\""
+  AC_SUBST($1, "$ax_define_dir")
+  AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+])
similarity index 100%
rename from xgc/missing
rename to xfd/missing
diff --git a/xfd/xfd.c b/xfd/xfd.c
new file mode 100644 (file)
index 0000000..c49ba31
--- /dev/null
+++ b/xfd/xfd.c
@@ -0,0 +1,544 @@
+/*
+ * $Xorg: xfd.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $
+ *
+ * 
+Copyright 1989, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ * *
+ * Author:  Jim Fulton, MIT X Consortium
+ */
+/* $XFree86: xc/programs/xfd/xfd.c,v 1.8 2003/02/20 02:56:40 dawes Exp $ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <X11/Xos.h>
+#include <X11/Xatom.h>
+#include <X11/Shell.h>
+#include <X11/Xaw/Cardinals.h>
+#include <X11/Xaw/Paned.h>
+#include <X11/Xaw/Box.h>
+#include <X11/Xaw/Form.h>
+#include <X11/Xaw/Command.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef USE_GETTEXT
+# include <X11/Xlocale.h>
+# include <libintl.h>
+#else
+# define gettext(a) (a)
+#endif
+#include "grid.h"
+#ifdef XRENDER
+#include <X11/Xft/Xft.h>
+#include <X11/extensions/Xrender.h>
+#endif
+
+static char *ProgramName;
+
+static XrmOptionDescRec xfd_options[] = {
+{"-fn",                "*grid.font",   XrmoptionSepArg,        (caddr_t) NULL },
+#ifdef XRENDER
+{"-fa",                "*grid.face", XrmoptionSepArg,          (caddr_t) NULL },
+#endif
+{"-start",     "*startChar",   XrmoptionSepArg,        (caddr_t) NULL },
+{"-box",       "*grid.boxChars", XrmoptionNoArg,       (caddr_t) "on" },
+{"-bc",                "*grid.boxColor", XrmoptionSepArg,      (caddr_t) NULL },
+{"-center",    "*grid.centerChars", XrmoptionNoArg,    (caddr_t) "on" },
+{"-rows",      "*grid.cellRows", XrmoptionSepArg,      (caddr_t) NULL },
+{"-columns",   "*grid.cellColumns", XrmoptionSepArg,   (caddr_t) NULL },
+};
+
+static void usage(void);
+static void SelectChar(Widget w, XtPointer closure, XtPointer data);
+static void do_quit(Widget w, XEvent *event, String *params, 
+                   Cardinal *num_params);
+static void change_page(int page);
+static void set_button_state(void);
+static void do_prev(Widget w, XEvent *event, String *params, 
+                   Cardinal *num_params);
+static void do_next(Widget w, XEvent *event, String *params, 
+                   Cardinal *num_params);
+static void do_prev16(Widget w, XEvent *event, String *params, 
+                     Cardinal *num_params);
+static void do_next16(Widget w, XEvent *event, String *params, 
+                     Cardinal *num_params);
+static char *get_font_name(Display *dpy, XFontStruct *fs);
+static void CatchFontConversionWarning(String name, String type, String class, 
+                                      String defaultp, String *params, 
+                                      Cardinal *np);
+
+static XtActionsRec xfd_actions[] = {
+  { "Quit", do_quit },
+  { "Prev16", do_prev16 },
+  { "Prev", do_prev },
+  { "Next", do_next },
+  { "Next16", do_next16 },
+};
+
+static Atom wm_delete_window;
+
+static Widget quitButton, prev16Button, prevButton, nextButton, next16Button;
+
+
+#define DEF_SELECT_FORMAT "character 0x%04x%02x (%u,%u) (%#o,%#o)"
+#define DEF_METRICS_FORMAT "width %d; left %d, right %d; ascent %d, descent %d (font %d, %d)"
+#define DEF_RANGE_FORMAT "range:  0x%04x%02x (%u,%u) thru 0x%04x%02x (%u,%u)"
+#define DEF_START_FORMAT "upper left:  0x%06x (%d,%d)"
+#define DEF_NOCHAR_FORMAT "no such character 0x%04x%02x (%u,%u) (%#o,%#o)"
+
+static struct _xfd_resources {
+  char *select_format;
+  char *metrics_format;
+  char *range_format;
+  char *start_format;
+  char *nochar_format;
+} xfd_resources;
+
+#define Offset(field) XtOffsetOf(struct _xfd_resources, field)
+
+static XtResource Resources[] = {
+  { "selectFormat", "SelectFormat", XtRString, sizeof(char *), 
+      Offset(select_format), XtRString, DEF_SELECT_FORMAT },
+  { "metricsFormat", "MetricsFormat", XtRString, sizeof(char *), 
+      Offset(metrics_format), XtRString, DEF_METRICS_FORMAT },
+  { "rangeFormat", "RangeFormat", XtRString, sizeof(char *), 
+      Offset(range_format), XtRString, DEF_RANGE_FORMAT },
+  { "startFormat", "StartFormat", XtRString, sizeof(char *), 
+      Offset(start_format), XtRString, DEF_START_FORMAT },
+  { "nocharFormat", "NocharFormat", XtRString, sizeof(char *), 
+      Offset(nochar_format), XtRString, DEF_NOCHAR_FORMAT },
+};
+
+#undef Offset
+
+static void
+usage(void)
+{
+    fprintf (stderr, gettext("usage:  %s [-options ...] "), ProgramName);
+    fprintf (stderr, "-fn ");
+    fprintf (stderr, gettext("font\n\n"));
+#ifdef XRENDER
+    fprintf (stderr, gettext("        %s [-options ...] "), ProgramName);
+    fprintf (stderr, "-fa ");
+    fprintf (stderr, gettext("font\n\n"));
+#endif
+    fprintf (stderr, gettext("where options include:\n"));
+    fprintf (stderr, "    -display ");
+    fprintf (stderr, gettext("display       X server to contact\n"));
+    fprintf (stderr, "    -geometry ");
+    fprintf (stderr, gettext("geometry     size and location of window\n"));
+    fprintf (stderr, "    -bc ");
+    fprintf (stderr, gettext("color              color for ImageText boxes\n"));
+    fprintf (stderr, "    -start ");
+    fprintf (stderr, gettext("number          first character to show\n"));
+    fprintf (stderr, "    -box                   ");
+    fprintf (stderr, gettext("show a box around each character\n"));
+    fprintf (stderr, "    -center                ");
+    fprintf (stderr, gettext("center each character inside its grid\n"));
+    fprintf (stderr, "    -rows ");
+    fprintf (stderr, gettext("number           number of rows in grid\n"));
+    fprintf (stderr, "    -columns ");
+    fprintf (stderr, gettext("number        number of columns in grid\n"));
+    exit (1);
+}
+
+
+static Widget selectLabel, metricsLabel, rangeLabel, startLabel, fontGrid;
+
+static Boolean fontConversionFailed = False;
+static XtErrorMsgHandler oldWarningHandler;
+
+int
+main(int argc, char *argv[]) 
+{
+    XtAppContext xtcontext;
+    Widget toplevel, pane, toplabel, box, form;
+    char buf[256];
+    Arg av[10];
+    Cardinal i;
+    static XtCallbackRec cb[2] = { { SelectChar, NULL }, { NULL, NULL } };
+    XFontStruct *fs;
+#ifdef XRENDER
+    XftFont *xft;
+#endif
+    char *fontname;
+    char *domaindir;
+    long minn, maxn;
+
+    XtSetLanguageProc(NULL, NULL, NULL);
+
+    ProgramName = argv[0];
+
+    toplevel = XtAppInitialize (&xtcontext, "Xfd",
+                               xfd_options, XtNumber(xfd_options),
+                               &argc, argv, NULL, NULL, 0);
+
+#ifdef USE_GETTEXT
+    textdomain("xfd");
+
+    /* mainly for debugging */
+    if ((domaindir = getenv ("TEXTDOMAINDIR")) == NULL) {
+       domaindir = LOCALEDIR;
+    }
+    bindtextdomain ("xfd", domaindir);
+#endif
+
+    Resources[0].default_addr = gettext(DEF_SELECT_FORMAT);
+    Resources[1].default_addr = gettext(DEF_METRICS_FORMAT);
+    Resources[2].default_addr = gettext(DEF_RANGE_FORMAT);
+    Resources[3].default_addr = gettext(DEF_START_FORMAT);
+    Resources[4].default_addr = gettext(DEF_NOCHAR_FORMAT);
+
+    if (argc != 1) usage ();
+    XtAppAddActions (xtcontext, xfd_actions, XtNumber (xfd_actions));
+    XtOverrideTranslations
+        (toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: Quit()"));
+
+    XtGetApplicationResources (toplevel, (XtPointer) &xfd_resources, Resources,
+                              XtNumber (Resources), NULL, ZERO);
+
+
+    /* pane wrapping everything */
+    pane = XtCreateManagedWidget ("pane", panedWidgetClass, toplevel,
+                                 NULL, ZERO);
+
+    /* font name */
+    toplabel = XtCreateManagedWidget ("fontname", labelWidgetClass, pane, 
+                                     NULL, ZERO);
+
+    /* button box */
+    box = XtCreateManagedWidget ("box", boxWidgetClass, pane, NULL, ZERO);
+    quitButton = XtCreateManagedWidget ("quit", commandWidgetClass, box,
+                                       NULL, ZERO);
+    prev16Button = XtCreateManagedWidget ("prev16", commandWidgetClass, box,
+                                       NULL, ZERO);
+    prevButton = XtCreateManagedWidget ("prev", commandWidgetClass, box,
+                                       NULL, ZERO);
+    nextButton = XtCreateManagedWidget ("next", commandWidgetClass, box,
+                                       NULL, ZERO);
+    next16Button = XtCreateManagedWidget ("next16", commandWidgetClass, box,
+                                       NULL, ZERO);
+
+
+    /* and labels in which to put information */
+    selectLabel = XtCreateManagedWidget ("select", labelWidgetClass,
+                                        pane, NULL, ZERO);
+
+    metricsLabel = XtCreateManagedWidget ("metrics", labelWidgetClass,
+                                         pane, NULL, ZERO);
+
+    rangeLabel = XtCreateManagedWidget ("range", labelWidgetClass, pane, 
+                                       NULL, ZERO);
+
+    startLabel = XtCreateManagedWidget ("start", labelWidgetClass, pane, 
+                                       NULL, ZERO);
+
+    /* form in which to draw */
+    form = XtCreateManagedWidget ("form", formWidgetClass, pane, NULL, ZERO);
+    
+    i = 0;
+    XtSetArg (av[i], XtNtop, XtChainTop); i++;
+    XtSetArg (av[i], XtNbottom, XtChainBottom); i++;
+    XtSetArg (av[i], XtNleft, XtChainLeft); i++;
+    XtSetArg (av[i], XtNright, XtChainRight); i++;
+    XtSetArg (av[i], XtNcallback, cb); i++;
+
+    oldWarningHandler = XtAppSetWarningMsgHandler(xtcontext, 
+                                                 CatchFontConversionWarning);
+
+    fontGrid = XtCreateManagedWidget ("grid", fontgridWidgetClass, form,
+                                     av, i);
+
+    XtAppSetWarningMsgHandler(xtcontext, oldWarningHandler);
+
+    /* set the label at the top to tell us which font this is */
+#ifdef XRENDER
+    i = 0;
+    XtSetArg (av[i], XtNface, &xft); i++;
+    XtGetValues (fontGrid, av, i);
+    if (xft)
+    {
+       FcChar8 *family;
+       FcChar8 *style;
+       FcPattern   *p;
+       double  size;
+       family = (FcChar8 *) "";
+       FcPatternGetString (xft->pattern, FC_FAMILY, 0, &family);
+       style = (FcChar8 *) "";
+       FcPatternGetString (xft->pattern, FC_STYLE, 0, &style);
+       size = 0;
+       FcPatternGetDouble (xft->pattern, FC_SIZE, 0, &size);
+       p = FcPatternBuild (NULL,
+                           FC_FAMILY, FcTypeString, family,
+                           FC_STYLE, FcTypeString, style,
+                           FC_SIZE, FcTypeDouble, size,
+                           NULL);
+       fontname = (char *) FcNameUnparse (p);
+       FcPatternDestroy (p);
+    }
+    else
+#endif
+    {
+       i = 0;
+       XtSetArg (av[i], XtNfont, &fs); i++;
+       XtGetValues (fontGrid, av, i);
+       if (!fs || fontConversionFailed) {
+           fprintf (stderr, gettext("%s:  no font to display\n"), ProgramName);
+           exit (1);
+       }
+       fontname = get_font_name (XtDisplay(toplevel), fs);
+       if (!fontname) fontname = gettext("unknown font!");
+    }
+    i = 0;
+    XtSetArg (av[i], XtNlabel, fontname); i++;
+    XtSetValues (toplabel, av, i);
+
+    minn = GridFirstChar (fontGrid);
+    maxn = GridLastChar (fontGrid);
+    sprintf (buf, xfd_resources.range_format, 
+            minn >> 8, minn & 0xff,
+            minn >> 8, minn & 0xff,
+            maxn >> 8, maxn & 0xff,
+            maxn >> 8, maxn & 0xff);
+    
+    i = 0;
+    XtSetArg (av[i], XtNlabel, buf); i++;
+    XtSetValues (rangeLabel, av, i);
+
+    XtRealizeWidget (toplevel);
+
+    wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
+                                   False);
+    (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
+                            &wm_delete_window, 1);
+
+    change_page (0);
+    XtAppMainLoop (xtcontext);
+    exit(0);
+}
+
+/*ARGSUSED*/
+static void 
+SelectChar(Widget w, XtPointer closure, XtPointer data)
+{
+    FontGridCharRec *p = (FontGridCharRec *) data;
+    XFontStruct *fs = p->thefont;
+    long n = p->thechar;
+    int direction, fontascent, fontdescent;
+    XCharStruct metrics;
+    char buf[256];
+    Arg arg;
+    Boolean has_char = 1;
+
+    XtSetArg (arg, XtNlabel, buf);
+
+    buf[0] = '\0';
+#ifdef XRENDER
+    if (p->theface)
+    {
+       XftFont *xft = p->theface;
+       FcChar32    c = (FcChar32) n;
+       has_char = (Boolean) FcCharSetHasChar (xft->charset, n);
+       if (has_char)
+       {
+           XGlyphInfo  extents;
+           XftTextExtents32 (XtDisplay (w), xft, &c, 1, &extents);
+           sprintf (buf, xfd_resources.metrics_format,
+                    extents.xOff, - extents.x, 
+                    extents.xOff - extents.width + extents.x,
+                    extents.y, extents.height - extents.y,
+                    xft->ascent, xft->descent);
+       }
+    }
+    else
+#endif
+    {
+       if ((!fs->min_byte1 && !fs->max_byte1) ?
+           (n < fs->min_char_or_byte2 || n > fs->max_char_or_byte2) :
+           (n >> 8 < fs->min_byte1 || n >> 8 > fs->max_byte1 ||
+            (n & 0xff)  < fs->min_char_or_byte2 ||
+            (n & 0xff) > fs->max_char_or_byte2)) 
+       {
+           has_char = 0;
+       }
+       else
+       {
+           XChar2b char2b;
+           char2b.byte1 = p->thechar >> 8;
+           char2b.byte2 = p->thechar & 0xff;
+           XTextExtents16 (fs, &char2b, 1, &direction, &fontascent, &fontdescent,
+                           &metrics);
+           sprintf (buf, xfd_resources.metrics_format,
+                    metrics.width, metrics.lbearing, metrics.rbearing,
+                    metrics.ascent, metrics.descent, fontascent, fontdescent);
+       }
+    }
+    XtSetValues (metricsLabel, &arg, ONE);
+
+    if (has_char)
+    {
+       sprintf (buf, xfd_resources.select_format, 
+                n >> 8, n & 0xff,
+                n >> 8, n & 0xff,
+                n >> 8, n & 0xff);
+    }
+    else
+    {
+           sprintf (buf, xfd_resources.nochar_format,
+                    n >> 8, n & 0xff,
+                    n >> 8, n & 0xff,
+                    n >> 8, n & 0xff);
+    }
+    XtSetValues (selectLabel, &arg, ONE);
+
+    return;
+}
+
+
+/*ARGSUSED*/
+static void 
+do_quit (Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    exit (0);
+}
+
+static void 
+change_page(int page)
+{
+    long oldstart, newstart;
+    int ncols, nrows;
+    char buf[256];
+    Arg arg;
+
+    arg.name = XtNstartChar;
+    GetFontGridCellDimensions (fontGrid, &oldstart, &ncols, &nrows);
+
+    if (page) {
+       long start = (oldstart + 
+                          ((long) ncols) * ((long) nrows) * ((long) page));
+
+       arg.value = (XtArgVal) start;
+       XtSetValues (fontGrid, &arg, ONE);
+    }
+
+    /* find out what it got set to */
+    arg.value = (XtArgVal) &newstart;
+    XtGetValues (fontGrid, &arg, ONE);
+
+    /* if not paging, then initialize it, else only do it actually changed */
+    if (!page || newstart != oldstart) {
+       unsigned int row = (unsigned int) ((newstart >> 8));
+       unsigned int col = (unsigned int) (newstart & 0xff);
+
+       XtSetArg (arg, XtNlabel, buf);
+       sprintf (buf, xfd_resources.start_format, newstart, row, col);
+       XtSetValues (startLabel, &arg, ONE);
+    }
+
+    set_button_state ();
+
+    return;
+}
+
+
+static void 
+set_button_state(void)
+{
+    Bool prevvalid, nextvalid, prev16valid, next16valid;
+    Arg arg;
+
+    GetPrevNextStates (fontGrid, &prevvalid, &nextvalid, &prev16valid, &next16valid);
+    arg.name = XtNsensitive;
+    arg.value = (XtArgVal) (prevvalid ? TRUE : FALSE);
+    XtSetValues (prevButton, &arg, ONE);
+    arg.value = (XtArgVal) (nextvalid ? TRUE : FALSE);
+    XtSetValues (nextButton, &arg, ONE);
+    arg.name = XtNsensitive;
+    arg.value = (XtArgVal) (prev16valid ? TRUE : FALSE);
+    XtSetValues (prev16Button, &arg, ONE);
+    arg.value = (XtArgVal) (next16valid ? TRUE : FALSE);
+    XtSetValues (next16Button, &arg, ONE);
+}
+
+
+/* ARGSUSED */
+static void 
+do_prev16(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    change_page (-16);
+}
+
+
+static void 
+do_prev(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    change_page (-1);
+}
+
+
+/* ARGSUSED */
+static void 
+do_next(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    change_page (1);
+}
+
+/* ARGSUSED */
+static void 
+do_next16(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    change_page (16);
+}
+
+
+static char *
+get_font_name(Display *dpy, XFontStruct *fs)
+{
+    register XFontProp *fp;
+    register int i;
+    Atom fontatom = XInternAtom (dpy, "FONT", False);
+
+    for (i = 0, fp = fs->properties; i < fs->n_properties; i++, fp++) {
+       if (fp->name == fontatom) {
+           return (XGetAtomName (dpy, fp->card32));
+       }
+    }
+    return NULL;
+}
+
+
+static void 
+CatchFontConversionWarning(String name, String type, String class, 
+                          String defaultp, String *params, Cardinal *np)
+{
+    if (np && *np > 1 &&
+       strcmp(name, "conversionError") == 0 &&
+       strcmp(type, "string") == 0 &&
+       strcmp(class, "XtToolkitError") == 0 &&
+       strcmp(params[1], "FontStruct") == 0) fontConversionFailed = True;
+
+    (*oldWarningHandler)(name, type, class, defaultp, params, np);
+}
diff --git a/xfd/xfd.man b/xfd/xfd.man
new file mode 100644 (file)
index 0000000..f56abc3
--- /dev/null
@@ -0,0 +1,201 @@
+.\" $Xorg: xfd.man,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $
+.\" Copyright 1989, 1994, 1998  The Open Group
+.\" 
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\" 
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\" 
+.\" Except as contained in this notice, the name of The Open Group shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from The Open Group.
+.\"
+.\" $XFree86: xc/programs/xfd/xfd.man,v 1.9 2003/04/19 23:49:27 herrb Exp $
+.\"
+.TH XFD 1 __xorgversion__
+.SH NAME
+xfd \- display all the characters in an X font
+.SH SYNOPSIS
+.B xfd
+[\-options ...] \fB\-fn\fP \fIfontname\fP
+.PP
+.B xfd
+[\-options ...] \fB\-fa\fP \fIfontname\fP
+.SH DESCRIPTION
+The \fIxfd\fP utility creates a window containing the name of the font being
+displayed, a row of command buttons, several lines of text for displaying
+character metrics, and a grid containing one glyph per cell.  The
+characters are shown in increasing order from left to right, top to
+bottom.  The first character displayed at the top left will be character
+number 0 unless the \fB\-start\fP option has been supplied in which case the
+character with the number given in the \fB\-start\fP option will be used.
+.PP
+The characters are displayed in a grid of boxes, each large enough to hold 
+any single character in the font.  Each character glyph is drawn using
+the PolyText16 request (used by the \fIXlib\fP routine \fBXDrawString16\fP)
+or the XftDrawString32 routine, depending on whether the \fB\-fn\fP or 
+\fB\-fa\fP option was given.
+If the \fB\-box\fP option is given, a rectangle will be drawn around each
+character, showing where an ImageText16 request (used by the \fIXlib\fP
+routine \fBXDrawImageString16\fP) would cause background color to be displayed.
+.PP
+The origin of each glyph is normally set so that the character is drawn in
+the upper left hand corner of the grid cell.  However, if a glyph has a 
+negative left bearing or an unusually large ascent, descent, or right bearing 
+(as is the case with \fIcursor\fP font), some character may not appear in their
+own grid cells.  The \fB\-center\fP option may be used to force all glyphs to 
+be centered in their respective cells.
+.PP
+All the characters in the font may not fit in the window at once.
+To see the next page of glyphs, press the \fINext\fP button at the top 
+of the window.  To see the previous page, press \fIPrev\fP.  To exit \fIxfd\fP,
+press \fIQuit\fP.
+.PP
+Individual character metrics (index, width, bearings, ascent and descent) can
+be displayed at the top of the window by clicking on the desired character.
+.PP
+The font name displayed at the top of the window is the full name of the 
+font, as determined by the server.  See \fIxlsfonts\fP and \fIfc-list\fP
+for ways to generate lists of fonts, as well as more detailed summaries of 
+their metrics and properties.
+.SH "OPTIONS"
+.PP
+.I xfd
+accepts all of the standard toolkit command line options along with
+the additional options listed below:
+.TP 8
+.B \-fn \fIfont\fP
+This option specifies the core X server side font to be displayed.  
+This can also be set with 
+the FontGrid \fBfont\fP resource.  A font must be specified.
+.TP 8
+.B \-fa \fIfont\fP
+This option specifies a Xft font to be displayed. This can also be set with 
+the FontGrid \fBface\fP resource. A font pattern must be specified. 
+.TP 8
+.B \-box
+This option indicates that a box should be displayed outlining the area
+that would be filled with background color by an ImageText request.
+This can also be set with
+the FontGrid \fBboxChars\fP resource.  The default is False.
+.TP 8
+.B \-center
+This option indicates that each glyph should be centered in its grid.
+This can also be set with
+the FontGrid \fBcenterChars\fP resource.  The default is False.
+.TP 8
+.B \-start \fInumber\fP
+This option specifies the glyph index of the upper left hand corner of the
+grid.  This is used to view characters at arbitrary locations in the font.
+This can also be set with
+the FontGrid \fBstartChar\fP resource.  The default is 0.
+.TP 8
+.B \-bc \fIcolor\fP
+This option specifies the color to be used if ImageText boxes are drawn.
+This can also be set with
+the FontGrid \fBboxColor\fP resource.
+.TP 8
+.B \-rows \fInumrows\fP
+This option specifies the number of rows in the grid.
+This can also be set with
+the FontGrid \fBcellRows\fP resource.
+.TP 8
+.B \-columns \fInumcols\fP
+This option specifies the number of columns in the grid.
+This can also be set with
+the FontGrid \fBcellColumns\fP resource.
+.SH WIDGETS
+In order to specify resources, it is useful to know the 
+widgets which compose \fIxfd\fR.  In the notation below, indentation
+indicates hierarchical structure.  The widget class name is given first,
+followed by the widget instance name.
+The application class name is Xfd.
+.sp
+.nf
+.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i
+Xfd  xfd
+       Paned  pane
+               Label  fontname
+               Box  box
+                       Command  quit
+                       Command  prev
+                       Command  next
+               Label  select
+               Label  metrics
+               Label  range
+               Label  start
+               Form  form
+                       FontGrid  grid
+.fi
+.SH FONTGRID RESOURCES
+The FontGrid widget is an application-specific widget, and a subclass
+of the Simple widget in the Athena widget set.  The effects and
+instance names of this widget's resources are given in the
+\fBOPTIONS\fP section.  Capitalize the first letter of the resource
+instance name to get the corresponding class name.
+.SH APPLICATION SPECIFIC RESOURCES
+The instance names of the application specific resources
+are given below.  Capitalize the first letter of the resource
+instance name to get the corresponding class name.
+These resources are unlikely to be interesting unless you are localizing
+xfd for a different language.
+.TP 8
+.B selectFormat
+Specifies a printf-style format string used to display information
+about the selected character.  The default is "character 0x%02x%02x
+(%u,%u) (%#o,%#o)".  The arguments that will come after the format string are
+char.byte1, char.byte2, char.byte1, char.byte2, char.byte1, char.byte2.
+char.byte1 is byte 1 of the selected character.  
+char.byte2 is byte 2 of the selected character.  
+.TP 8
+.B metricsFormat
+Specifies a printf-style format string used to display character
+metrics.  The default is "width %d; left %d, right %d; ascent %d,
+descent %d (font %d, %d)".  The arguments that will come after the
+format string are the character metrics width, lbearing, rbearing,
+character ascent, character descent, font ascent, and font descent.
+.TP 8
+.B rangeFormat
+Specifies a printf-style format string used to display the range of
+characters currently being displayed.  The default is "range:
+0x%02x%02x (%u,%u) thru 0x%02x%02x (%u,%u)".  The arguments that will
+come after the format string are the following fields from the
+XFontStruct that is returned from opening the font:
+min_byte1, min_char_or_byte2, min_byte1, min_char_or_byte2,
+max_byte1, max_char_or_byte2, max_byte1, max_char_or_byte2.
+.TP 8
+.B startFormat
+Specifies a printf-style format string used to display information
+about the character at the upper left corner of the font grid.  The
+default is "upper left: 0x%04x (%d,%d)".  The arguments that will come
+after the format string are the new character, the high byte of the new
+character, and the low byte of the new character.
+.TP 8
+.B nocharFormat
+Specifies a printf-style format string to display when the selected
+character does not exist.  The default is "no such character
+0x%02x%02x (%u,%u) (%#o,%#o)".  The arguments that will come after the
+format string are the same as for the \fBselectFormat\fP resource.
+.SH "SEE ALSO"
+X(__miscmansuffix__), xlsfonts(1), xrdb(1), xfontsel(1), fc-list(1),
+fonts.conf(__filemansuffix__),
+.I "X Logical Font Description Conventions"
+.SH "BUGS"
+The program should skip over pages full of non-existent characters.
+.SH AUTHOR
+Jim Fulton, MIT X Consortium; previous program of the same name by 
+Mark Lillibridge, MIT Project Athena.
+
similarity index 63%
rename from ico/COPYING
rename to xfontsel/COPYING
index 15697a8..5fcc3a7 100644 (file)
@@ -1,4 +1,4 @@
-Copyright (c) 1987, 1994  X Consortium
+Copyright (c) 1985-1989, 1994  X Consortium
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -22,7 +22,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
 in this Software without prior written authorization from the X Consortium.
 
 
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
 
                         All Rights Reserved
 
@@ -42,24 +42,3 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 SOFTWARE.
 
-------------------------------------------------------------------------------
-
-Copyright 2005  Red Hat, Inc.
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Red Hat not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission.  Red Hat makes no
-representations about the suitability of this software for any purpose.  It
-is provided "as is" without express or implied warranty.
-RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
diff --git a/xfontsel/ChangeLog b/xfontsel/ChangeLog
new file mode 100644 (file)
index 0000000..3c0a2c9
--- /dev/null
@@ -0,0 +1,400 @@
+commit 3aaccefa18e0eb37393642823b2e8454b1de20fd
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Sep 26 17:24:50 2010 -0700
+
+    xfontsel 1.0.3
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 646dcaa531897aedf76a53c7b0017c90c849eb18
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Sep 26 17:20:51 2010 -0700
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6c77dc68321ca2149d95df90b97d741f8ff914a2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit e50e3cab1eb5e50d8e0d4dfe52e2e39625bdff3c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 17:59:02 2010 -0700
+
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e3d6a121d1074422ea7296fdfe335eee3f42ad66
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jun 30 23:25:03 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+    Enables silent rule and use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7b1853e8ae91e7aaecebd78eb4c6e498059e5200
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:07 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 9205c610f211837e9a63d08d1fbd8c687b7d0b8a
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit f6398f9cc100f63bf694be9c6157e1b774a75c2b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:53 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit c609c074f9d76e89cedabead3fab0600d294c3f9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit 7d890dfd9ef6eeac6c7619dfb3c7eeb7666f3834
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit b9aca05dc1bb882fabc03d11fa833cb975593e4e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:39 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 38b984a4cae2bf18e8fbff07ccd98a587e0c16bd
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit a9c2e152c8a112f5783430b27de777da7daf6aa7
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:24 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 4d15dbb1ac524a017e9812fb7f21f032ccbc2ae1
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Wed Jan 21 16:04:57 2009 -0200
+
+    Ansification and compile warning fixes.
+    
+        This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
+    make distcheck and all gcc 4.3 and sparse warnings.
+
+commit edda127130da731e9d314456d89f083a7eeca276
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Sun Mar 16 20:22:55 2008 -0300
+
+    Compile warning fixes.
+    
+      Ansify functions with K&R prototypes.
+      Adjust some definitions to match required prototypes.
+      Declare as static some functions to avoid warnings about missing prototypes.
+
+commit bb0968eff74cb55cf2de125f828a76f679c4a017
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Tue Aug 19 00:58:18 2008 +0200
+
+    xaw8 is gone, use xaw7
+
+commit 9e6d440567ae5b853875f0ecb8a780733c15fb38
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri May 16 14:17:52 2008 +0200
+
+    $(builddir) is the current directory
+    
+    Apparently automake doesn't always export the builddir variable.
+    This fixes my previous commit.
+
+commit 42b8ab848739ee6bf9003dea67c376236600964b
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Apr 20 19:16:26 2008 +0200
+
+    Fix build with builddir != srcdir
+
+commit 99e02e7a17ab8efe09b9a5411466bf273c01c692
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Apr 20 19:13:59 2008 +0200
+
+    Use AM_CFLAGS instead of xfontsel_CFLAGS and remove AM_PROG_CC_C_O
+
+commit 7177700678091d64956d789aa93e265539d9ea5c
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:27:16 2008 -0700
+
+    Added missing AM_PROG_CC_C_O
+
+commit 4c38de0cbf47ae3dcc67ae8e81924831cb050a34
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:07:45 2008 -0700
+
+    Build fix for file systems that are not case sensitive
+
+commit 2f878b2bc5c2e35a0ba28f8fc2e22785af3f537e
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 15:51:07 2007 -0500
+
+    Add missing PHONY line for automatic ChangeLog generation
+
+commit b4d05bfdd02bb993fe27d79977be0d117f6869f5
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 1 10:47:34 2007 -0800
+
+    Version bump: 1.0.2
+
+commit ca186c58baf13be19feb9c4ed63c73fcbc3c374e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 1 10:46:56 2007 -0800
+
+    Fill in COPYING with copyright/license notices from source code files
+
+commit 67813a0abf40cf4e0a4c958b132a5679e734b14d
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 1 10:44:42 2007 -0800
+
+    renamed: .cvsignore -> .gitignore
+
+commit 5c43b433c0f3042f24f41eb66d3453c72edd3698
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 1 10:44:12 2007 -0800
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit a109dc6867135b8dcdb4a32d016dba96fc42b1fa
+Author: Eric S. Raymond <esr@thyrsus.com>
+Date:   Tue Jan 2 19:10:31 2007 -0800
+
+    Bug 9519: Markup problems in xfontsel.1x
+    
+    <https://bugs.freedesktop.org/show_bug.cgi?id=9519>
+
+commit 8e06c5f5100b2dc533291e6d305aecedec86abae
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:50 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit 7d5a9e2c6197215076884f438d88bab886f4fcfc
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:44 2005 +0000
+
+    Stub COPYING files
+
+commit 2bcdd77cbd56b099d1f521671be1a5f69f81fe84
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:07 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit d235b45cc12cbf9c04cf79e525033a3b0205c53d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 7 16:17:59 2005 +0000
+
+    Change to use the app-defaults default dir configured in libXt.
+
+commit 15308d1a18f86d783b2480b31ce168de3f9ca109
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:22 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 9d4606cf318bf4432068db87ee55572b2695d7ed
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:20 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 982954c1edb0505be600e6b034d75aaa3d334f24
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:42 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 1b58506131be085db5d35b6648d603385c7d8a37
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:35:00 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit 3582308724b9ef06ad0283fab21c52ed2ab400c0
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:52 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit 3187b3402cc0bd738bc74593fbf25892b69c2b23
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:54 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit 63b7fa0f97e2f2da1817b8abd0a47d6bc5ee86f8
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:32:54 2005 +0000
+
+    Change default install dir for app-default files from
+        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
+        the monolith & allow localization
+
+commit 27299597d3c7d2223de97a2fd510a33247795a8e
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:22 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 1f19bc1d0920fde791440d2a1b18ddb4c650a1d7
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:45 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit 01e99cb7d65cb5159cb0b5d2f10ea304f837df42
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:29 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit 327d6df6c97dd9d55e95dfabf002f78fe624e0ee
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:33 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit c3da8169ed2876732a86b7c1cb3d4e3cb6ba5046
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Jul 26 15:44:02 2005 +0000
+
+    Replace more GNU make-ism's with more portable macros
+
+commit 1234c030c16eb1e0d6f8a8655bc1b093e43ef288
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:31:55 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit fb8c54ae47b8dd71f082fd0c4b705690c8aca524
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Fri Jul 1 18:11:22 2005 +0000
+
+    Build system for xfontsel
+
+commit cad003acf8e3a2ae88b9e0fda9f6d0a070bbd3c5
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:54:47 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit 5853543ca60db9bbb8db1b4b3d68fb30ada5a249
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:35:20 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 7ce32771cd493a3fa27d2b0c584a95a8da54a262
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:13:05 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 51284798e3b3af50838597e605a45e01d961d4ed
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:24 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit d65fdc557636a5a4454a11c3a9a0a58d95ec9ce0
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:24:07 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 69ecccb0fa674314d8e72084dbaae3b248494d19
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:13 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit c9df46d65c9ba7c39c8c0fb355199ff3627ae76e
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:22 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit ec7cff5eb04007f30e0fa732bca8a55882f5482f
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:22 2003 +0000
+
+    Initial revision
similarity index 60%
rename from xmore/INSTALL
rename to xfontsel/INSTALL
index 23e5f25..8b82ade 100644 (file)
@@ -1,16 +1,19 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-These are generic installation instructions.
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -23,9 +26,9 @@ debugging `configure').
 
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
+the results of its tests to speed up reconfiguring.  Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
@@ -67,42 +67,57 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
 is an example:
 
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
    *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -125,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -137,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
 Specifying the System Type
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -170,9 +207,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -190,21 +227,29 @@ them in the `configure' command line, using `VAR=value'.  For example:
      ./configure CC=/usr/local2/bin/gcc
 
 causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
+overridden in the site shell script).
 
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
 
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -231,6 +276,16 @@ configuration-related scripts to be executed by `/bin/bash'.
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
similarity index 50%
rename from xgc/Makefile.am
rename to xfontsel/Makefile.am
index b7e2fd9..c030c97 100644 (file)
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-AM_YFLAGS = -d
-
-bin_PROGRAMS = xgc
-
-AM_CFLAGS = $(CWARNFLAGS) $(XGC_CFLAGS) -D_BSD_SOURCE
-xgc_LDADD = $(XGC_LIBS) -lm
-
-xgc_SOURCES =  \
-        choice.c \
-        constants.h \
-        dashlist.c \
-        getfile.c \
-       gram.y \
-        interpret.c \
-       lex.l \
-        main.c \
-        planemask.c \
-        record.c \
-        testfrac.c \
-        tests.c \
-        text.c \
-        xgc.h
+bin_PROGRAMS = xfontsel
 
-appman_PRE = \
-        xgc.man
+AM_CFLAGS = $(XFONTSEL_CFLAGS) $(CWARNFLAGS)
+xfontsel_LDADD = $(XFONTSEL_LIBS)
 
-BUILT_SOURCES = gram.h gram.c lex.c
-MAINTAINERCLEANFILES = $(BUILT_SOURCES)
+xfontsel_SOURCES =     \
+        ULabel.c \
+        ULabel.h \
+        ULabelP.h \
+        xfontsel.c
 
-gram.h: gram.c
+appman_PRE = \
+        xfontsel.man
 
 # App default files
-
 DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 
 appdefaultdir = @appdefaultdir@
 
 dist_appdefault_DATA = \
-        app-defaults/Xgc \
-        app-defaults/Xgc-color
-
-EXTRA_DIST = tile Bugs \
-       Written/FilledRects                                             \
-       Written/Interface                                               \
-       Written/Jim                                                     \
-       Written/Notes                                                   \
-       Written/Notes2                                                  \
-       Written/Outline                                                 \
-       Written/Widget
-
+        app-defaults/XFontSel
 
 appmandir = $(APP_MAN_DIR)
 
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
-EXTRA_DIST += $(appman_PRE)
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-EXTRA_DIST += ChangeLog
-MAINTAINERCLEANFILES += ChangeLog
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
similarity index 61%
rename from ico/Makefile.in
rename to xfontsel/Makefile.in
index d6badca..97046e2 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -38,8 +39,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -54,12 +56,13 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-bin_PROGRAMS = ico$(EXEEXT)
+bin_PROGRAMS = xfontsel$(EXEEXT)
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       config.guess config.sub depcomp install-sh missing
+DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -69,39 +72,67 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
+       "$(DESTDIR)$(appdefaultdir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_ico_OBJECTS = ico.$(OBJEXT)
-ico_OBJECTS = $(am_ico_OBJECTS)
+am_xfontsel_OBJECTS = ULabel.$(OBJEXT) xfontsel.$(OBJEXT)
+xfontsel_OBJECTS = $(am_xfontsel_OBJECTS)
 am__DEPENDENCIES_1 =
-ico_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+xfontsel_DEPENDENCIES = $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(ico_SOURCES)
-DIST_SOURCES = $(ico_SOURCES)
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(xfontsel_SOURCES)
+DIST_SOURCES = $(xfontsel_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appmanDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appman_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(appman_DATA) $(dist_appdefault_DATA)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -110,6 +141,9 @@ ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
+APPDEFS_LIBS = @APPDEFS_LIBS@
 APP_MAN_DIR = @APP_MAN_DIR@
 APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
 AUTOCONF = @AUTOCONF@
@@ -119,7 +153,10 @@ AWK = @AWK@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -128,12 +165,13 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
+EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-ICO_CFLAGS = @ICO_CFLAGS@
-ICO_LIBS = @ICO_LIBS@
+GREP = @GREP@
 INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -146,6 +184,7 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -155,14 +194,18 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-XTHREADLIB = @XTHREADLIB@
+XFONTSEL_CFLAGS = @XFONTSEL_CFLAGS@
+XFONTSEL_LIBS = @XFONTSEL_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -173,6 +216,7 @@ am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+appdefaultdir = @appdefaultdir@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -210,46 +254,31 @@ sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = $(ICO_CFLAGS)
-ico_LDADD = $(ICO_LIBS) $(XTHREADLIB) -lm
-ico_SOURCES = \
-        allobjs.h \
-        ico.c \
-        objcube.h \
-        objico.h \
-        objocta.h \
-        objplane.h \
-        objpyr.h \
-        polyinfo.h
+AM_CFLAGS = $(XFONTSEL_CFLAGS) $(CWARNFLAGS)
+xfontsel_LDADD = $(XFONTSEL_LIBS)
+xfontsel_SOURCES = \
+        ULabel.c \
+        ULabel.h \
+        ULabelP.h \
+        xfontsel.c
 
 appman_PRE = \
-        ico.man
+        xfontsel.man
+
+
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+dist_appdefault_DATA = \
+        app-defaults/XFontSel
 
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-EXTRA_DIST = $(appman_PRE) ChangeLog
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
-MAINTAINERCLEANFILES = ChangeLog
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -262,15 +291,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -286,9 +315,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
        @if test ! -f $@; then \
@@ -300,7 +330,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -309,29 +339,43 @@ distclean-hdr:
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
        test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-ico$(EXEEXT): $(ico_OBJECTS) $(ico_DEPENDENCIES) 
-       @rm -f ico$(EXEEXT)
-       $(LINK) $(ico_OBJECTS) $(ico_LDADD) $(LIBS)
+xfontsel$(EXEEXT): $(xfontsel_OBJECTS) $(xfontsel_DEPENDENCIES) 
+       @rm -f xfontsel$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(xfontsel_OBJECTS) $(xfontsel_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -339,90 +383,120 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ico.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ULabel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfontsel.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
 install-appmanDATA: $(appman_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
        done
 
 uninstall-appmanDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
+install-dist_appdefaultDATA: $(dist_appdefault_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
        done
 
+uninstall-dist_appdefaultDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       test -d $(distdir) || mkdir $(distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -438,24 +512,30 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
        $(MAKE) $(AM_MAKEFLAGS) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
@@ -463,6 +543,14 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -487,13 +575,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -501,9 +593,11 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
@@ -525,13 +619,15 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -552,7 +648,7 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS) $(DATA) config.h
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
@@ -576,6 +672,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -598,26 +695,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am: install-appmanDATA
+install-data-am: install-appmanDATA install-dist_appdefaultDATA
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -639,36 +748,44 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS
+uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
 
-.MAKE: install-am install-strip
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
        clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appmanDATA install-binPROGRAMS install-data \
-       install-data-am install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am install-info \
-       install-info-am install-man install-pdf install-pdf-am \
-       install-ps install-ps-am install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-appmanDATA \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_appdefaultDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
 
 
-.PHONY: ChangeLog
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
-       (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+       $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
 
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
similarity index 61%
rename from xman/README
rename to xfontsel/README
index 3134690..4f1c53d 100644 (file)
@@ -1,4 +1,6 @@
-xman is a graphical manual page browser using the Athena Widgets (Xaw) toolkit.
+xfontsel application provides a simple way to display the X11 core
+protocol fonts known to your X server, examine samples of each, and
+retrieve the X Logical Font Description ("XLFD") full name for a font.
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
@@ -11,9 +13,9 @@ Please submit bug reports to the Xorg bugzilla:
 
 The master development code repository can be found at:
 
-        git://anongit.freedesktop.org/git/xorg/app/xman
+        git://anongit.freedesktop.org/git/xorg/app/xfontsel
 
-        http://cgit.freedesktop.org/xorg/app/xman
+        http://cgit.freedesktop.org/xorg/app/xfontsel
 
 For patch submission instructions, see:
 
diff --git a/xfontsel/ULabel.c b/xfontsel/ULabel.c
new file mode 100644 (file)
index 0000000..ef9ecd2
--- /dev/null
@@ -0,0 +1,839 @@
+/* $XConsortium: Label.c,v 1.97 94/04/17 20:12:12 kaleb Exp $ */
+
+/***********************************************************
+
+Copyright (c) 1987, 1988, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: xc/programs/xfontsel/ULabel.c,v 1.3tsi Exp $ */
+
+/*
+ * ULabel.c - UCSLabel widget
+ *
+ */
+
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+#include <X11/Xos.h>
+#include <X11/Xaw/XawInit.h>
+#include "ULabelP.h"
+#include <X11/Xmu/Converters.h>
+#include <X11/Xmu/Drawing.h>
+#include <stdio.h>
+#include <ctype.h>
+/* needed for abs() */
+#include <stdlib.h>
+
+#define streq(a,b) (strcmp( (a), (b) ) == 0)
+
+#define MULTI_LINE_LABEL 32767
+
+#ifdef CRAY
+#define WORD64
+#endif
+
+/****************************************************************
+ *
+ * Full class record constant
+ *
+ ****************************************************************/
+
+/* Private Data */
+
+#define offset(field) XtOffsetOf(UCSLabelRec, field)
+static XtResource resources[] = {
+    {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
+       offset(label.foreground), XtRString, XtDefaultForeground},
+    {XtNfont,  XtCFont, XtRFontStruct, sizeof(XFontStruct *),
+       offset(label.font),XtRString, XtDefaultFont},
+    {XtNfontSet,  XtCFontSet, XtRFontSet, sizeof(XFontSet ),
+        offset(label.fontset),XtRString, XtDefaultFontSet},
+    {XtNlabel,  XtCLabel, XtRString, sizeof(String),
+       offset(label.label), XtRString, NULL},
+    {XtNencoding, XtCEncoding, XtRUnsignedChar, sizeof(unsigned char),
+       offset(label.encoding), XtRImmediate, (XtPointer)XawTextEncoding8bit},
+    {XtNjustify, XtCJustify, XtRJustify, sizeof(XtJustify),
+       offset(label.justify), XtRImmediate, (XtPointer)XtJustifyCenter},
+    {XtNinternalWidth, XtCWidth, XtRDimension,  sizeof(Dimension),
+       offset(label.internal_width), XtRImmediate, (XtPointer)4},
+    {XtNinternalHeight, XtCHeight, XtRDimension, sizeof(Dimension),
+       offset(label.internal_height), XtRImmediate, (XtPointer)2},
+    {XtNleftBitmap, XtCLeftBitmap, XtRBitmap, sizeof(Pixmap),
+       offset(label.left_bitmap), XtRImmediate, (XtPointer) None},
+    {XtNbitmap, XtCPixmap, XtRBitmap, sizeof(Pixmap),
+       offset(label.pixmap), XtRImmediate, (XtPointer)None},
+    {XtNresize, XtCResize, XtRBoolean, sizeof(Boolean),
+       offset(label.resize), XtRImmediate, (XtPointer)True},
+};
+#undef offset
+
+static void Initialize(Widget request, Widget new,
+                      ArgList args, Cardinal *num_args);
+static void Resize(Widget w);
+static void Redisplay(Widget gw, XEvent *event, Region region);
+static Boolean SetValues(Widget current, Widget request, Widget new,
+                        ArgList args, Cardinal *num_args);
+static void ClassInitialize(void);
+static void Destroy(Widget w);
+static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *intended,
+                                     XtWidgetGeometry *preferred);
+
+UCSLabelClassRec ucsLabelClassRec = {
+  {
+/* core_class fields */        
+    /* superclass              */      (WidgetClass) &simpleClassRec,
+    /* class_name              */      "UCSLabel",
+    /* widget_size             */      sizeof(UCSLabelRec),
+    /* class_initialize        */      ClassInitialize,
+    /* class_part_initialize   */      NULL,
+    /* class_inited            */      FALSE,
+    /* initialize              */      Initialize,
+    /* initialize_hook         */      NULL,
+    /* realize                 */      XtInheritRealize,
+    /* actions                 */      NULL,
+    /* num_actions             */      0,
+    /* resources               */      resources,
+    /* num_resources           */      XtNumber(resources),
+    /* xrm_class               */      NULLQUARK,
+    /* compress_motion         */      TRUE,
+    /* compress_exposure       */      TRUE,
+    /* compress_enterleave     */      TRUE,
+    /* visible_interest                */      FALSE,
+    /* destroy                 */      Destroy,
+    /* resize                  */      Resize,
+    /* expose                  */      Redisplay,
+    /* set_values              */      SetValues,
+    /* set_values_hook         */      NULL,
+    /* set_values_almost       */      XtInheritSetValuesAlmost,
+    /* get_values_hook         */      NULL,
+    /* accept_focus            */      NULL,
+    /* version                 */      XtVersion,
+    /* callback_private        */      NULL,
+    /* tm_table                        */      NULL,
+    /* query_geometry          */      QueryGeometry,
+    /* display_accelerator     */      XtInheritDisplayAccelerator,
+    /* extension               */      NULL
+  },
+/* Simple class fields initialization */
+  {
+    /* change_sensitive                */      XtInheritChangeSensitive
+  },
+/* UCSLabel class fields initialization */
+  {
+    /* ignore                  */      0
+  }
+};
+WidgetClass ucsLabelWidgetClass = (WidgetClass)&ucsLabelClassRec;
+/****************************************************************
+ *
+ * Private Procedures
+ *
+ ****************************************************************/
+
+static void ClassInitialize(void)
+{
+    XawInitializeWidgetSet();
+    XtAddConverter( XtRString, XtRJustify, XmuCvtStringToJustify, 
+                   (XtConvertArgList)NULL, 0 );
+}
+
+static XChar2b *buf2b;
+static int buf2blen = 0;
+
+#ifndef WORD64
+
+#define TXT16 XChar2b
+
+#else
+
+#define TXT16 char
+
+static int _XawLabelWidth16(XFontStruct *fs, char *str, int n)
+{
+    int i;
+    XChar2b *ptr;
+
+    if (n > buf2blen) {
+       buf2b = (XChar2b *)XtRealloc((char *)buf2b, n * sizeof(XChar2b));
+       buf2blen = n;
+    }
+    for (ptr = buf2b, i = n; --i >= 0; ptr++) {
+       ptr->byte1 = *str++;
+       ptr->byte2 = *str++;
+    }
+    return XTextWidth16(fs, buf2b, n);
+}
+
+static void _XawLabelDraw16(Display *dpy, Drawable d, GC gc,
+                           int x, int y, char *str, int n)
+{
+    int i;
+    XChar2b *ptr;
+
+    if (n > buf2blen) {
+       buf2b = (XChar2b *)XtRealloc((char *)buf2b, n * sizeof(XChar2b));
+       buf2blen = n;
+    }
+    for (ptr = buf2b, i = n; --i >= 0; ptr++) {
+       ptr->byte1 = *str++;
+       ptr->byte2 = *str++;
+    }
+    XDrawString16(dpy, d, gc, x, y, buf2b, n);
+}
+
+#define XTextWidth16 _XawLabelWidth16
+#define XDrawString16 _XawLabelDraw16
+
+#endif /* WORD64 */
+
+static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
+                            int x, int y, char *str, int n)
+{
+    char *ep;
+    unsigned short codepoint;
+    XChar2b *ptr;
+
+    /*
+     * Convert to UCS2 string on the fly.
+     */
+
+    if (n > buf2blen) {
+       buf2b = (XChar2b *)XtRealloc((char *)buf2b, n * sizeof(XChar2b));
+       buf2blen = n;
+    }
+    ep = str + n;
+    for (ptr = buf2b; str < ep; ptr++) {
+        if((str[0]&0x80)==0) {
+            codepoint=str[0];
+            str++;
+        } else if((str[0]&0x20)==0) {
+            codepoint=(str[0]&0x1F)<<6 | (str[1]&0x3F);
+            str+=2;
+        } else if((str[0]&0x10)==0) {
+            codepoint=(str[0]&0x0F)<<12 | (str[1]&0x3F)<<6 | (str[2]&0x3F);
+            str+=3;
+        } else {                    /* wrong UTF-8 */
+            codepoint=(unsigned)'?';
+            str++;
+        }
+       ptr->byte1 = (codepoint >> 8) & 0xff;;
+       ptr->byte2 = codepoint & 0xff;
+    }
+    XDrawString16(dpy, d, gc, x, y, buf2b, ptr - buf2b);
+}
+
+static int _XawLabelWidthUCS(
+    XFontStruct *fs,
+    char *str,
+    int        n
+)
+{
+    char *ep;
+    unsigned short codepoint;
+    XChar2b *ptr;
+
+    /*
+     * Convert to UCS2 string on the fly.
+     */
+
+    if (n > buf2blen) {
+       buf2b = (XChar2b *)XtRealloc((char *)buf2b, n * sizeof(XChar2b));
+       buf2blen = n;
+    }
+    ep = str + n;
+    for (ptr = buf2b; str < ep; ptr++) {
+        if((str[0]&0x80)==0) {
+            codepoint=str[0];
+            str++;
+        } else if((str[0]&0x20)==0) {
+            codepoint=(str[0]&0x1F)<<6 | (str[1]&0x3F);
+            str+=2;
+        } else if((str[0]&0x10)==0) {
+            codepoint=(str[0]&0x0F)<<12 | (str[1]&0x3F)<<6 | (str[2]&0x3F);
+            str+=3;
+        } else {                    /* wrong UTF-8 */
+            codepoint=(unsigned)'?';
+            str++;
+        }
+       ptr->byte1 = (codepoint >> 8) & 0xff;;
+       ptr->byte2 = codepoint & 0xff;
+    }
+    return XTextWidth16(fs, buf2b, ptr - buf2b);
+}
+
+#define XTextWidthUCS _XawLabelWidthUCS
+#define XDrawStringUCS _XawLabelDrawUCS
+
+/*
+ * Calculate width and height of displayed text in pixels
+ */
+
+static void SetTextWidthAndHeight(UCSLabelWidget lw)
+{
+    XFontStruct        *fs = lw->label.font;
+
+    char *nl;
+
+    if (lw->label.pixmap != None) {
+       Window root;
+       int x, y;
+       unsigned int width, height, bw, depth;
+       if (XGetGeometry(XtDisplay(lw), lw->label.pixmap, &root, &x, &y,
+                        &width, &height, &bw, &depth)) {
+           lw->label.label_height = height;
+           lw->label.label_width = width;
+           lw->label.label_len = depth;
+           return;
+       }
+    }
+    if ( lw->simple.international == True ) {
+
+      XFontSet fset = lw->label.fontset;
+      XFontSetExtents *ext = XExtentsOfFontSet(fset);
+
+      lw->label.label_height = ext->max_ink_extent.height;
+      if (lw->label.label == NULL) {
+         lw->label.label_len = 0;
+         lw->label.label_width = 0;
+      }
+      else if ((nl = index(lw->label.label, '\n')) != NULL) {
+         char *label;
+         lw->label.label_len = MULTI_LINE_LABEL;
+         lw->label.label_width = 0;
+         for (label = lw->label.label; nl != NULL; nl = index(label, '\n')) {
+             int width = XmbTextEscapement(fset, label, (int)(nl - label));
+
+             if (width > (int)lw->label.label_width)
+                 lw->label.label_width = width;
+             label = nl + 1;
+             if (*label)
+                 lw->label.label_height +=
+                     ext->max_ink_extent.height;
+         }
+         if (*label) {
+             int width = XmbTextEscapement(fset, label, strlen(label));
+
+             if (width > (int) lw->label.label_width)
+                 lw->label.label_width = width;
+         }
+      } else {
+         lw->label.label_len = strlen(lw->label.label);
+         lw->label.label_width =
+             XmbTextEscapement(fset, lw->label.label, (int) lw->label.label_len);
+      }
+
+    } else {
+
+        lw->label.label_height = fs->max_bounds.ascent + fs->max_bounds.descent;
+        if (lw->label.label == NULL) {
+            lw->label.label_len = 0;
+            lw->label.label_width = 0;
+        }
+        else if ((nl = index(lw->label.label, '\n')) != NULL) {
+           char *label;
+            lw->label.label_len = MULTI_LINE_LABEL;
+            lw->label.label_width = 0;
+            for (label = lw->label.label; nl != NULL; nl = index(label, '\n')) {
+               int width;
+
+               if (lw->label.encoding == XawTextEncodingChar2b)
+                   width = XTextWidth16(fs, (TXT16*)label, (int)(nl - label)/2);
+                else if (lw->label.encoding == XawTextEncodingUCS)
+                   width = XTextWidthUCS(fs, label, nl - label);
+               else
+                   width = XTextWidth(fs, label, (int)(nl - label));
+               if (width > (int)lw->label.label_width)
+                   lw->label.label_width = width;
+               label = nl + 1;
+               if (*label)
+                   lw->label.label_height +=
+                       fs->max_bounds.ascent + fs->max_bounds.descent;
+           }
+           if (*label) {
+               int width;
+
+               if (lw->label.encoding == XawTextEncodingChar2b)
+                   width = XTextWidth16(fs, (TXT16*)label, (int)strlen(label)/2);
+                else if (lw->label.encoding == XawTextEncodingUCS)
+                   width = XTextWidthUCS(fs, label, strlen(label));
+               else
+                   width = XTextWidth(fs, label, strlen(label));
+               if (width > (int) lw->label.label_width)
+                   lw->label.label_width = width;
+           }
+        } else {
+           lw->label.label_len = strlen(lw->label.label);
+           if (lw->label.encoding == XawTextEncodingChar2b)
+               lw->label.label_width =
+                   XTextWidth16(fs, (TXT16*)lw->label.label,
+                                (int) lw->label.label_len/2);
+            else if (lw->label.encoding == XawTextEncodingUCS)
+               lw->label.label_width = XTextWidthUCS(fs, lw->label.label,
+                                                      lw->label.label_len);
+           else
+               lw->label.label_width =
+                   XTextWidth(fs, lw->label.label, (int) lw->label.label_len);
+        }
+
+    }
+}
+
+static void GetnormalGC(UCSLabelWidget lw)
+{
+    XGCValues  values;
+
+    values.foreground  = lw->label.foreground;
+    values.background  = lw->core.background_pixel;
+    values.font                = lw->label.font->fid;
+    values.graphics_exposures = False;
+
+    if ( lw->simple.international == True )
+        /* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC. */
+        lw->label.normal_GC = XtAllocateGC(
+                (Widget)lw, 0,
+       (unsigned) GCForeground | GCBackground | GCGraphicsExposures,
+       &values, GCFont, 0 );
+    else
+        lw->label.normal_GC = XtGetGC(
+       (Widget)lw,
+       (unsigned) GCForeground | GCBackground | GCFont | GCGraphicsExposures,
+       &values);
+}
+
+static void GetgrayGC(UCSLabelWidget lw)
+{
+    XGCValues  values;
+
+    values.foreground = lw->label.foreground;
+    values.background = lw->core.background_pixel;
+    values.font              = lw->label.font->fid;
+    values.fill_style = FillTiled;
+    values.tile       = XmuCreateStippledPixmap(XtScreen((Widget)lw),
+                                               lw->label.foreground, 
+                                               lw->core.background_pixel,
+                                               lw->core.depth);
+    values.graphics_exposures = False;
+
+    lw->label.stipple = values.tile;
+    if ( lw->simple.international == True )
+        /* Since Xmb/wcDrawString eats the font, I must use XtAllocateGC. */
+        lw->label.gray_GC = XtAllocateGC((Widget)lw,  0,
+                               (unsigned) GCForeground | GCBackground |
+                                          GCTile | GCFillStyle |
+                                          GCGraphicsExposures,
+                               &values, GCFont, 0);
+    else
+        lw->label.gray_GC = XtGetGC((Widget)lw, 
+                               (unsigned) GCForeground | GCBackground |
+                                          GCFont | GCTile | GCFillStyle |
+                                          GCGraphicsExposures,
+                               &values);
+}
+
+static void compute_bitmap_offsets(UCSLabelWidget lw)
+{
+    /*
+     * bitmap will be eventually be displayed at 
+     * (internal_width, internal_height + lbm_y)
+     */
+    if (lw->label.lbm_height != 0) {
+       lw->label.lbm_y = (lw->core.height -
+                         (lw->label.internal_height * 2 + 
+                          lw->label.lbm_height)) / 2;
+    } else {
+       lw->label.lbm_y = 0;
+    }
+}
+
+
+static void set_bitmap_info(UCSLabelWidget lw)
+{
+    Window root;
+    int x, y;
+    unsigned int bw, depth;
+
+    if (!(lw->label.left_bitmap &&
+         XGetGeometry (XtDisplay(lw), lw->label.left_bitmap, &root, &x, &y,
+                       &lw->label.lbm_width, &lw->label.lbm_height,
+                       &bw, &depth))) {
+       lw->label.lbm_width = lw->label.lbm_height = 0;
+    }
+    compute_bitmap_offsets (lw);
+}
+
+
+
+/* ARGSUSED */
+static void
+Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args)
+{
+    UCSLabelWidget lw = (UCSLabelWidget) new;
+
+    if (lw->label.label == NULL) 
+        lw->label.label = XtNewString(lw->core.name);
+    else {
+        lw->label.label = XtNewString(lw->label.label);
+    }
+
+    GetnormalGC(lw);
+    GetgrayGC(lw);
+
+    SetTextWidthAndHeight(lw);
+
+    if (lw->core.height == 0)
+        lw->core.height = lw->label.label_height +
+                           2 * lw->label.internal_height;
+
+    set_bitmap_info (lw);              /* need core.height */
+
+    if (lw->core.width == 0)           /* need label.lbm_width */
+        lw->core.width = (lw->label.label_width +
+                           2 * lw->label.internal_width +
+                           LEFT_OFFSET(lw));
+
+    lw->label.label_x = lw->label.label_y = 0;
+    (*XtClass(new)->core_class.resize) ((Widget)lw);
+
+} /* Initialize */
+
+/*
+ * Repaint the widget window
+ */
+
+/* ARGSUSED */
+static void Redisplay(Widget gw, XEvent *event, Region region)
+{
+    UCSLabelWidget w = (UCSLabelWidget) gw;
+    GC gc;
+
+    /*
+     * now we'll see if we need to draw the rest of the label
+     */
+    if (region != NULL) {
+       int x = w->label.label_x;
+       unsigned int width = w->label.label_width;
+       if (w->label.lbm_width) {
+           if (w->label.label_x > (x = w->label.internal_width))
+               width += w->label.label_x - x;
+       }
+       if (XRectInRegion(region, x, w->label.label_y,
+                        width, w->label.label_height) == RectangleOut){
+           return;
+       }
+    }
+
+    gc = XtIsSensitive(gw) ? w->label.normal_GC : w->label.gray_GC;
+#ifdef notdef
+    if (region != NULL)
+       XSetRegion(XtDisplay(gw), gc, region);
+#endif /*notdef*/
+
+    if (w->label.pixmap == None) {
+       int len = w->label.label_len;
+       char *label = w->label.label;
+       Position y = w->label.label_y + w->label.font->max_bounds.ascent;
+        Position ksy = w->label.label_y;
+
+       /* display left bitmap */
+       if (w->label.left_bitmap && w->label.lbm_width != 0) {
+           XCopyPlane (XtDisplay(gw), w->label.left_bitmap, XtWindow(gw), gc,
+                      0, 0, w->label.lbm_width, w->label.lbm_height,
+                      (int) w->label.internal_width,
+                      (int) w->label.internal_height + w->label.lbm_y, 
+                      (unsigned long) 1L);
+       }
+
+        if ( w->simple.international == True ) {
+
+           XFontSetExtents *ext = XExtentsOfFontSet(w->label.fontset);
+
+           ksy += abs(ext->max_ink_extent.y);
+
+            if (len == MULTI_LINE_LABEL) {
+               char *nl;
+               while ((nl = index(label, '\n')) != NULL) {
+                   XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset, gc,
+                               w->label.label_x, ksy, label, (int)(nl - label));
+                   ksy += ext->max_ink_extent.height;
+                   label = nl + 1;
+               }
+               len = strlen(label);
+            }
+            if (len)
+               XmbDrawString(XtDisplay(w), XtWindow(w), w->label.fontset, gc,
+                             w->label.label_x, ksy, label, len);
+
+        } else { /*international false, so use R5 routine */
+
+           if (len == MULTI_LINE_LABEL) {
+               char *nl;
+               while ((nl = index(label, '\n')) != NULL) {
+                   if (w->label.encoding == XawTextEncodingChar2b)
+                       XDrawString16(XtDisplay(gw), XtWindow(gw), gc,
+                                               w->label.label_x, y,
+                                               (TXT16*)label, (int)(nl - label)/2);
+                    else if (w->label.encoding == XawTextEncodingUCS)
+                       XDrawStringUCS(XtDisplay(gw), XtWindow(gw), gc,
+                                       w->label.label_x, y, label, (int)(nl - label));
+                   else
+                       XDrawString(XtDisplay(gw), XtWindow(gw), gc,
+                                       w->label.label_x, y, label, (int)(nl - label));
+                   y += w->label.font->max_bounds.ascent + 
+                                       w->label.font->max_bounds.descent;
+                   label = nl + 1;
+               }
+               len = strlen(label);
+           }
+           if (len) {
+               if (w->label.encoding == XawTextEncodingChar2b)
+                   XDrawString16(XtDisplay(gw), XtWindow(gw), gc,
+                            w->label.label_x, y, (TXT16*)label, len/2);
+                else if (w->label.encoding == XawTextEncodingUCS)
+                    XDrawStringUCS(XtDisplay(gw), XtWindow(gw), gc,
+                             w->label.label_x, y, label, len);
+               else
+                   XDrawString(XtDisplay(gw), XtWindow(gw), gc,
+                          w->label.label_x, y, label, len);
+           }
+
+        } /*endif international*/
+
+    } else if (w->label.label_len == 1) { /* depth */
+       XCopyPlane(XtDisplay(gw), w->label.pixmap, XtWindow(gw), gc,
+                               0, 0, w->label.label_width, w->label.label_height,
+                               w->label.label_x, w->label.label_y, 1L);
+    } else {
+       XCopyArea(XtDisplay(gw), w->label.pixmap, XtWindow(gw), gc,
+                               0, 0, w->label.label_width, w->label.label_height,
+                               w->label.label_x, w->label.label_y);
+    }
+
+#ifdef notdef
+    if (region != NULL)
+       XSetClipMask(XtDisplay(gw), gc, (Pixmap)None);
+#endif /* notdef */
+}
+
+static void _Reposition(UCSLabelWidget lw, Dimension width, Dimension height,
+                       Position *dx, Position *dy)
+{
+    Position newPos;
+    Position leftedge = lw->label.internal_width + LEFT_OFFSET(lw);
+
+    switch (lw->label.justify) {
+
+       case XtJustifyLeft   :
+           newPos = leftedge;
+           break;
+
+       case XtJustifyRight  :
+           newPos = width -
+               (lw->label.label_width + lw->label.internal_width);
+           break;
+
+       case XtJustifyCenter :
+       default:
+           newPos = (int)(width - lw->label.label_width) / 2;
+           break;
+    }
+    if (newPos < (Position)leftedge)
+       newPos = leftedge;
+    *dx = newPos - lw->label.label_x;
+    lw->label.label_x = newPos;
+    *dy = (newPos = (int)(height - lw->label.label_height) / 2)
+         - lw->label.label_y;
+    lw->label.label_y = newPos;
+    return;
+}
+
+static void Resize(Widget w)
+{
+    UCSLabelWidget lw = (UCSLabelWidget)w;
+    Position dx, dy;
+
+    _Reposition(lw, w->core.width, w->core.height, &dx, &dy);
+    compute_bitmap_offsets (lw);
+}
+
+/*
+ * Set specified arguments into widget
+ */
+
+#define PIXMAP 0
+#define WIDTH 1
+#define HEIGHT 2
+#define NUM_CHECKS 3
+
+static Boolean
+SetValues(Widget current, Widget request, Widget new,
+         ArgList args, Cardinal *num_args)
+{
+    UCSLabelWidget curlw = (UCSLabelWidget) current;
+    UCSLabelWidget reqlw = (UCSLabelWidget) request;
+    UCSLabelWidget newlw = (UCSLabelWidget) new;
+    int i;
+    Boolean was_resized = False, redisplay = False, checks[NUM_CHECKS];
+
+    for (i = 0; i < NUM_CHECKS; i++)
+       checks[i] = FALSE;
+
+    for (i = 0; i < *num_args; i++) {
+       if (streq(XtNbitmap, args[i].name))
+           checks[PIXMAP] = TRUE;
+       if (streq(XtNwidth, args[i].name))
+           checks[WIDTH] = TRUE;
+       if (streq(XtNheight, args[i].name))
+           checks[HEIGHT] = TRUE;
+    }
+
+    if (newlw->label.label == NULL) {
+       newlw->label.label = newlw->core.name;
+    }
+
+    /*
+     * resize on bitmap change
+     */
+    if (curlw->label.left_bitmap != newlw->label.left_bitmap) {
+       was_resized = True;
+    }
+
+    if (curlw->label.encoding != newlw->label.encoding)
+       was_resized = True;
+
+    if ( (curlw->label.fontset != newlw->label.fontset) &&
+                                        curlw->simple.international ){
+       was_resized = True;
+    }
+    if (curlw->label.label != newlw->label.label) {
+        if (curlw->label.label != curlw->core.name)
+           XtFree( (char *)curlw->label.label );
+
+       if (newlw->label.label != newlw->core.name) {
+           newlw->label.label = XtNewString( newlw->label.label );
+       }
+       was_resized = True;
+    }
+
+    if (was_resized || (curlw->label.font != newlw->label.font) ||
+       (curlw->label.justify != newlw->label.justify) || checks[PIXMAP]) {
+
+       SetTextWidthAndHeight(newlw);
+       was_resized = True;
+    }
+
+    /* recalculate the window size if something has changed. */
+    if (newlw->label.resize && was_resized) {
+       if ((curlw->core.height == reqlw->core.height) && !checks[HEIGHT])
+           newlw->core.height = (newlw->label.label_height +
+                                   2 * newlw->label.internal_height);
+
+       set_bitmap_info (newlw);
+
+       if ((curlw->core.width == reqlw->core.width) && !checks[WIDTH])
+           newlw->core.width = (newlw->label.label_width +
+                                   LEFT_OFFSET(newlw) +
+                                   2 * newlw->label.internal_width);
+    }
+
+    if (curlw->label.foreground                != newlw->label.foreground
+       || curlw->core.background_pixel != newlw->core.background_pixel
+       || curlw->label.font->fid       != newlw->label.font->fid         ) {
+
+        /* The Fontset is not in the GC - don't make a new GC if FS changes! */
+
+       XtReleaseGC(new, curlw->label.normal_GC);
+       XtReleaseGC(new, curlw->label.gray_GC);
+       XmuReleaseStippledPixmap( XtScreen(current), curlw->label.stipple );
+       GetnormalGC(newlw);
+       GetgrayGC(newlw);
+       redisplay = True;
+    }
+
+    if ((curlw->label.internal_width != newlw->label.internal_width)
+        || (curlw->label.internal_height != newlw->label.internal_height)
+       || was_resized) {
+       /* Resize() will be called if geometry changes succeed */
+       Position dx, dy;
+       _Reposition(newlw, curlw->core.width, curlw->core.height, &dx, &dy);
+    }
+
+    return was_resized || redisplay ||
+          XtIsSensitive(current) != XtIsSensitive(new);
+}
+
+static void Destroy(Widget w)
+{
+    UCSLabelWidget lw = (UCSLabelWidget)w;
+
+    if ( lw->label.label != lw->core.name )
+       XtFree( lw->label.label );
+    XtReleaseGC( w, lw->label.normal_GC );
+    XtReleaseGC( w, lw->label.gray_GC);
+    XmuReleaseStippledPixmap( XtScreen(w), lw->label.stipple );
+}
+
+
+static XtGeometryResult
+QueryGeometry(Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
+{
+    UCSLabelWidget lw = (UCSLabelWidget)w;
+
+    preferred->request_mode = CWWidth | CWHeight;
+    preferred->width = (lw->label.label_width + 
+                           2 * lw->label.internal_width +
+                           LEFT_OFFSET(lw));
+    preferred->height = lw->label.label_height + 
+                           2 * lw->label.internal_height;
+    if (  ((intended->request_mode & (CWWidth | CWHeight))
+               == (CWWidth | CWHeight)) &&
+         intended->width == preferred->width &&
+         intended->height == preferred->height)
+       return XtGeometryYes;
+    else if (preferred->width == w->core.width &&
+            preferred->height == w->core.height)
+       return XtGeometryNo;
+    else
+       return XtGeometryAlmost;
+}
diff --git a/xfontsel/ULabel.h b/xfontsel/ULabel.h
new file mode 100644 (file)
index 0000000..7c7c2ed
--- /dev/null
@@ -0,0 +1,141 @@
+/* $XConsortium: Label.h,v 1.34 94/04/17 20:12:13 rws Exp $ */
+
+/***********************************************************
+
+Copyright (c) 1987, 1988, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: contrib/programs/xfontsel/ULabel.h,v 1.1 1999/04/29 09:12:39 dawes Exp $ */
+
+#ifndef _XawUCSLabel_h
+#define _XawUCSLabel_h
+
+/***********************************************************************
+ *
+ * UCSLabel Widget
+ *
+ ***********************************************************************/
+
+#include <X11/Xaw/Label.h>
+#include <X11/Xaw/Simple.h>
+
+/* Resources:
+
+ Name               Class              RepType         Default Value
+ ----               -----              -------         -------------
+ background         Background         Pixel           XtDefaultBackground
+ bitmap                     Pixmap             Pixmap          None
+ border                     BorderColor        Pixel           XtDefaultForeground
+ borderWidth        BorderWidth        Dimension       1
+ cursor                     Cursor             Cursor          None
+ cursorName         Cursor             String          NULL
+ destroyCallback     Callback          XtCallbackList  NULL
+ encoding           Encoding           unsigned char   XawTextEncoding8bit
+ font               Font               XFontStruct*    XtDefaultFont
+ foreground         Foreground         Pixel           XtDefaultForeground
+ height                     Height             Dimension       text height
+ insensitiveBorder   Insensitive       Pixmap          Gray
+ internalHeight             Height             Dimension       2
+ internalWidth      Width              Dimension       4
+ justify            Justify            XtJustify       XtJustifyCenter
+ label              Label              String          NULL
+ leftBitmap         LeftBitmap         Pixmap          None
+ mappedWhenManaged   MappedWhenManaged Boolean         True
+ pointerColor       Foreground         Pixel           XtDefaultForeground
+ pointerColorBackground Background     Pixel           XtDefaultBackground
+ resize                     Resize             Boolean         True
+ sensitive          Sensitive          Boolean         True
+ width              Width              Dimension       text width
+ x                  Position           Position        0
+ y                  Position           Position        0
+
+*/
+
+/*
+ * The only extra resource value needed for this widget.
+ */
+#define XawTextEncodingUCS     2
+
+#if 0
+/*
+ * All of this is defined by Label.h.
+ */
+#define XawTextEncoding8bit    0
+#define XawTextEncodingChar2b  1
+
+#define XtNleftBitmap "leftBitmap"
+#define XtCLeftBitmap "LeftBitmap"
+#define XtNencoding "encoding"
+#define XtCEncoding "Encoding"
+
+#ifndef XtNfontSet
+#define XtNfontSet "fontSet"
+#endif
+
+#ifndef XtCFontSet
+#define XtCFontSet "FontSet"
+#endif
+
+#ifndef _XtStringDefs_h_
+#define XtNbitmap "bitmap"
+#define XtNforeground "foreground"
+#define XtNlabel "label"
+#define XtNfont "font"
+#define XtNinternalWidth "internalWidth"
+#define XtNinternalHeight "internalHeight"
+#define XtNresize "resize"
+#define XtCResize "Resize"
+#define XtCBitmap "Bitmap"
+#endif
+#endif
+
+/* Class record constants */
+
+extern WidgetClass ucsLabelWidgetClass;
+
+typedef struct _UCSLabelClassRec *UCSLabelWidgetClass;
+typedef struct _UCSLabelRec      *UCSLabelWidget;
+
+#endif /* _XawUniLabel_h */
diff --git a/xfontsel/ULabelP.h b/xfontsel/ULabelP.h
new file mode 100644 (file)
index 0000000..81b0817
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+* $XConsortium: LabelP.h,v 1.29 94/04/17 20:12:14 kaleb Exp $
+*/
+
+
+/***********************************************************
+
+Copyright (c) 1987, 1988, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+/* $XFree86: contrib/programs/xfontsel/ULabelP.h,v 1.1 1999/04/29 09:12:39 dawes Exp $ */
+
+/* 
+ * ULabelP.h - Private definitions for UCSLabel widget
+ * 
+ */
+
+#ifndef _XawUCSLabelP_h
+#define _XawUCSLabelP_h
+
+/***********************************************************************
+ *
+ * Label Widget Private Data
+ *
+ ***********************************************************************/
+
+#include "ULabel.h"
+#include <X11/Xaw/SimpleP.h>
+
+/* New fields for the UCSLabel widget class record */
+
+typedef struct {int foo;} UCSLabelClassPart;
+
+/* Full class record declaration */
+typedef struct _UCSLabelClassRec {
+    CoreClassPart      core_class;
+    SimpleClassPart    simple_class;
+    UCSLabelClassPart  label_class;
+} UCSLabelClassRec;
+
+extern UCSLabelClassRec ucsLabelClassRec;
+
+/* New fields for the UCSLabel widget record */
+typedef struct {
+    /* resources */
+    Pixel      foreground;
+    XFontStruct        *font;
+    XFontSet   fontset;
+    char       *label;
+    XtJustify  justify;
+    Dimension  internal_width;
+    Dimension  internal_height;
+    Pixmap     pixmap;
+    Boolean    resize;
+    unsigned char encoding;
+    Pixmap     left_bitmap;
+
+    /* private state */
+    GC         normal_GC;
+    GC          gray_GC;
+    Pixmap     stipple;
+    Position   label_x;
+    Position   label_y;
+    Dimension  label_width;
+    Dimension  label_height;
+    Dimension  label_len;
+    int                lbm_y;                  /* where in label */
+    unsigned int lbm_width, lbm_height;         /* size of pixmap */
+} UCSLabelPart;
+
+/****************************************************************
+ *
+ * Full instance record declaration
+ *
+ ****************************************************************/
+
+typedef struct _UCSLabelRec {
+    CorePart   core;
+    SimplePart simple;
+    UCSLabelPart       label;
+} UCSLabelRec;
+
+#define LEFT_OFFSET(lw) ((lw)->label.left_bitmap \
+                        ? (lw)->label.lbm_width + (lw)->label.internal_width \
+                        : 0)
+
+#endif /* _XawUCSLabelP_h */
diff --git a/xfontsel/aclocal.m4 b/xfontsel/aclocal.m4
new file mode 100644 (file)
index 0000000..6be78d7
--- /dev/null
@@ -0,0 +1,2365 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
+#
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
+#
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.1])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
+
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
+#
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
+
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
+#
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
+
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
+]) # XORG_MANPAGE_SECTIONS
+
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
+#
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
+
+AC_PATH_PROG(LINUXDOC, linuxdoc)
+
+AC_MSG_CHECKING([whether to build documentation])
+
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
+else
+   BUILDDOC=no
+fi
+
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
+
+AC_MSG_RESULT([$BUILDDOC])
+
+AC_MSG_CHECKING([whether to build pdf documentation])
+
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
+fi
+
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+
+AC_MSG_RESULT([$BUILDPDFDOC])
+
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
+
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
+
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
+#
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
+
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
+
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
+fi
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
+
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
+
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
+
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
+fi
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
+
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
+
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
+
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
+#
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
+
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
+fi
+
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
+
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
+#
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
+#
+AC_DEFUN([XORG_WITH_LINT],[
+
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
+else
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
+fi
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
+fi
+
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
+
+]) # XORG_WITH_LINT
+
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
+#
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+#
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
+
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
+fi
+
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
+
+]) # XORG_LINT_LIBRARY
+
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
+
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
+#
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
+
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
+
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
+
+# XORG_RELEASE_VERSION
+# --------------------
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
+
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
diff --git a/xfontsel/app-defaults/XFontSel b/xfontsel/app-defaults/XFontSel
new file mode 100644 (file)
index 0000000..73c4854
--- /dev/null
@@ -0,0 +1,148 @@
+! $XConsortium: XFontSel.ad,v 1.12 94/04/17 20:43:40 gildea Exp $
+!
+! app-defaults for XFontSel
+!
+! Copyright (c) 1985, 1986, 1987, 1988, 1989  X Consortium
+! 
+! Permission is hereby granted, free of charge, to any person obtaining
+! a copy of this software and associated documentation files (the
+! "Software"), to deal in the Software without restriction, including
+! without limitation the rights to use, copy, modify, merge, publish,
+! distribute, sublicense, and/or sell copies of the Software, and to
+! permit persons to whom the Software is furnished to do so, subject to
+! the following conditions:
+! 
+! The above copyright notice and this permission notice shall be included
+! in all copies or substantial portions of the Software.
+! 
+! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+! MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+! IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+! OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+! ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+! OTHER DEALINGS IN THE SOFTWARE.
+! 
+! Except as contained in this notice, the name of the X Consortium shall
+! not be used in advertising or otherwise to promote the sale, use or
+! other dealings in this Software without prior written authorization
+! from the X Consortium.
+!
+! Author:
+!      Ralph R. Swick, Digital Equipment Corporation/M.I.T. Project Athena
+!      one weekend in November, 1989
+!
+! $XFree86: xc/programs/xfontsel/XFontSel.ad,v 1.1 2000/02/13 03:26:24 dawes Exp $
+
+*appDefaultsVersion:   1
+
+*pixelSizeList: 7, 30, 40, 50, 60
+*pointSizeList: 250, 300, 350, 400
+
+XFontSel.cursor:       left_ptr
+*allowShellResize:     true
+
+*commandBox.ShowGrip:  false
+*commandBox*top:       chainTop
+*commandBox*bottom:    chainTop
+
+*quitButton.Label:     quit
+*quitButton.left:      chainLeft
+*quitButton.right:     chainLeft
+
+*ownButton.Label:      select
+*ownButton.fromHoriz:  quitButton
+*ownButton.left:       chainLeft
+*ownButton.right:      chainLeft
+
+*countLabel.BorderWidth: 0
+*countLabel.Justify:   right
+*countLabel.Label:     999999 fonts match
+*countLabel.left:      chainRight
+*countLabel.right:     chainRight
+
+*fieldBox.Orientation: horizontal
+*fieldBox.HSpace:      0
+*fieldBox.HSpace:      0
+
+*dash.label:           -
+*dash.borderWidth:     0
+*dash.internalHeight:  0
+*dash.internalWidth:   0
+
+*fieldBox*MenuButton.BorderWidth:      0
+*fieldBox*MenuButton.internalHeight:   0
+*fieldBox*MenuButton.internalWidth:    0
+*fieldBox*MenuButton.shapeStyle:       rectangle
+
+#ifdef LONG_NAMES
+*fieldBox*field0.Label:        foundry
+*fieldBox*field1.Label: family
+*fieldBox*field2.Label: weight
+*fieldBox*field3.Label: slant
+*fieldBox*field4.Label: set width
+*fieldBox*field5.Label: add style
+*fieldBox*field6.Label: pixel size
+*fieldBox*field7.Label: point size
+*fieldBox*field8.Label: resolutionX
+*fieldBox*field9.Label: resolutionY
+*fieldBox*field10.Label: spacing
+*fieldBox*field11.Label: avg width
+*fieldBox*field12.Label: registry
+*fieldBox*field13.Label: encoding
+#else
+*fieldBox*field0.Label:        fndry
+*fieldBox*field1.Label: fmly
+*fieldBox*field2.Label: wght
+*fieldBox*field3.Label: slant
+*fieldBox*field4.Label: sWdth
+*fieldBox*field5.Label: adstyl
+*fieldBox*field6.Label: pxlsz
+*fieldBox*field7.Label: ptSz
+*fieldBox*field8.Label: resx
+*fieldBox*field9.Label: resy
+*fieldBox*field10.Label: spc
+*fieldBox*field11.Label: avgWdth
+*fieldBox*field12.Label: rgstry
+*fieldBox*field13.Label: encdng
+#endif
+
+!*fieldBox*field11.Sensitive: False
+*fieldBox*field11.menu.Options.ShowUnselectable: False
+
+
+!*field1*menu*courier.Font:
+
+*fontName*skipAdjust:  true
+
+*sampleText*international: false
+
+*sampleText*Label: \
+Processing fonts...
+
+*sampleText: \
+ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\
+abcdefghijklmnopqrstuvwxyz\n\
+0123456789\n\
+\340\346\347\353\356\360\361\363\371\375\
+\300\306\307\313\316\320\321\323\331\335
+
+
+*sampleText16: \
+\044\042\044\044\044\046\044\050\044\052\044\053\044\055\044\057\
+\044\061\044\063\044\065\044\067\044\071\044\073\044\075\044\077\n\
+\044\101\044\104\044\106\044\110\044\112\044\113\044\114\044\115\
+\044\116\044\117\044\122\044\125\044\130\044\133\044\136\044\137\n\
+\061\042\061\044\061\046\061\050\061\052\061\053\061\055\061\057\
+\061\061\061\063\061\065\061\067\061\071\061\073\061\075\061\077\n\
+\061\101\061\104\061\106\061\110\061\112\061\113\061\114\061\115\
+\061\116\061\117\061\122\061\125\061\130\061\133\061\136\061\137\n\
+
+*sampleTextUCS: \
+ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789\n\
+abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ\n\
+–—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд\n\
+∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა
+
+*sampleText*allowResize: true
+*sampleText*Height:     50
diff --git a/xfontsel/config.guess b/xfontsel/config.guess
new file mode 100644 (file)
index 0000000..2852378
--- /dev/null
@@ -0,0 +1,1505 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
+
+timestamp='2010-08-21'
+
+# This file 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' HUP INT TERM
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep -q __ELF__
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[4567])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep -q __LP64__
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       case ${UNAME_MACHINE} in
+           pc98)
+               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    *:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    arm*:Linux:*:*)
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=${UNAME_MACHINE}el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=${UNAME_MACHINE}
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
similarity index 100%
rename from xcalc/config.h.in
rename to xfontsel/config.h.in
diff --git a/xfontsel/config.sub b/xfontsel/config.sub
new file mode 100644 (file)
index 0000000..320e303
--- /dev/null
@@ -0,0 +1,1739 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
+
+timestamp='2010-09-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray | -microblaze)
+               os=
+               basic_machine=$1
+               ;;
+        -bluegene*)
+               os=-cnk
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fido | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | lm32 \
+       | m32c | m32r | m32rle | m68000 | m68k | m88k \
+       | maxq | mb | microblaze | mcore | mep | metag \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64octeon | mips64octeonel \
+       | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | moxie \
+       | mt \
+       | msp430 \
+       | nds32 | nds32le | nds32be \
+       | nios | nios2 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | rx \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k | z80)
+               basic_machine=$basic_machine-unknown
+               ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | lm32-* \
+       | m32c-* | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64octeon-* | mips64octeonel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
+       | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
+       | tron-* \
+       | ubicom32-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa*-* \
+       | ymp-* \
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16)
+               basic_machine=cr16-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pc98)
+               basic_machine=i386-pc
+               ;;
+       pc98-*)
+               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
+               ;;
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* | -aros* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -dicos*)
+               os=-dicos
+               ;;
+        -nacl*)
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
+        spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+        c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+        mep-*)
+               os=-elf
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -cnk*|-aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
similarity index 79%
rename from xedit/configure
rename to xfontsel/configure
index 9a70097..278ae7a 100755 (executable)
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for xedit 1.1.2.
+# Generated by GNU Autoconf 2.68 for xfontsel 1.0.3.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -172,7 +173,8 @@ 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 \"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
@@ -215,11 +217,18 @@ IFS=$as_save_IFS
   # 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
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       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 test x$as_have_required = xno; then :
@@ -319,7 +328,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -359,19 +368,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  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: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -533,7 +542,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&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`
 
@@ -550,17 +559,62 @@ MFLAGS=
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME='xedit'
-PACKAGE_TARNAME='xedit'
-PACKAGE_VERSION='1.1.2'
-PACKAGE_STRING='xedit 1.1.2'
+PACKAGE_NAME='xfontsel'
+PACKAGE_TARNAME='xfontsel'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='xfontsel 1.0.3'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+appdefaultdir
+APPDEFS_LIBS
+APPDEFS_CFLAGS
+XFONTSEL_LIBS
+XFONTSEL_CFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
 DRIVER_MAN_DIR
 MISC_MAN_DIR
@@ -573,6 +627,7 @@ MISC_MAN_SUFFIX
 FILE_MAN_SUFFIX
 LIB_MAN_SUFFIX
 APP_MAN_SUFFIX
+SED
 host_os
 host_vendor
 host_cpu
@@ -581,22 +636,13 @@ build_os
 build_vendor
 build_cpu
 build
-appdefaultdir
-APPDEFS_LIBS
-APPDEFS_CFLAGS
-NEED_UNSETENV_FALSE
-NEED_UNSETENV_TRUE
-NEED_STRCASECMP_FALSE
-NEED_STRCASECMP_TRUE
-NEED_REALPATH_FALSE
-NEED_REALPATH_TRUE
-LISPDIR
-PKGDEPS_LIBS
-PKGDEPS_CFLAGS
-USE_XPRINT_FALSE
-USE_XPRINT_TRUE
+INSTALL_CMD
 PKG_CONFIG
-RANLIB
+CHANGELOG_CMD
+CWARNFLAGS
+EGREP
+GREP
+CPP
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -682,9 +728,9 @@ ac_user_opts='
 enable_option_checking
 enable_maintainer_mode
 enable_dependency_tracking
-enable_xprint
-with_lispdir
-with_release_version
+enable_strict_compilation
+enable_silent_rules
+with_appdefaultdir
 '
       ac_precious_vars='build_alias
 host_alias
@@ -694,9 +740,10 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
+CPP
 PKG_CONFIG
-PKGDEPS_CFLAGS
-PKGDEPS_LIBS
+XFONTSEL_CFLAGS
+XFONTSEL_LIBS
 APPDEFS_CFLAGS
 APPDEFS_LIBS'
 
@@ -761,8 +808,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.
@@ -807,7 +855,7 @@ do
     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'`
     case $ac_user_opts in
@@ -833,7 +881,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1037,7 +1085,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1053,7 +1101,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1083,8 +1131,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1092,7 +1140,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1102,7 +1150,7 @@ Try \`$0 --help' for more information."
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1110,13 +1158,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  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" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1139,7 +1187,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  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'
@@ -1153,8 +1201,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $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
+    $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
@@ -1169,9 +1217,9 @@ 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 .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1210,11 +1258,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  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" || as_fn_error "$ac_msg"
+       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
@@ -1240,7 +1288,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xedit 1.1.2 to adapt to many kinds of systems.
+\`configure' configures xfontsel 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1254,7 +1302,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
@@ -1288,7 +1336,7 @@ Fine tuning of the installation directories:
   --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/xedit]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/xfontsel]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1310,7 +1358,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xedit 1.1.2:";;
+     short | recursive ) echo "Configuration of xfontsel 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1322,15 +1370,18 @@ Optional Features:
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-xprint         Compile with xprint support (default: disabled)
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-lispdir=PATH     Directory to install lisp files (default:
-                          $libdir/X11/xedit/lisp)
-  --with-release-version=STRING
-                          Use release version string in package name
+  --with-appdefaultdir=<pathname>
+                          specify directory for app-defaults files (default is
+                          autodetected)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1340,11 +1391,12 @@ Some influential environment variables:
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  PKGDEPS_CFLAGS
-              C compiler flags for PKGDEPS, overriding pkg-config
-  PKGDEPS_LIBS
-              linker flags for PKGDEPS, overriding pkg-config
+  XFONTSEL_CFLAGS
+              C compiler flags for XFONTSEL, overriding pkg-config
+  XFONTSEL_LIBS
+              linker flags for XFONTSEL, overriding pkg-config
   APPDEFS_CFLAGS
               C compiler flags for APPDEFS, overriding pkg-config
   APPDEFS_LIBS
@@ -1416,10 +1468,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xedit configure 1.1.2
-generated by GNU Autoconf 2.65
+xfontsel configure 1.0.3
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2009 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
@@ -1463,26 +1515,71 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  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 ()
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
 {
   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"
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_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_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\""
 $as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
   ac_status=$?
   if test -s conftest.err; then
     grep -v '^ *+' conftest.err >conftest.er1
@@ -1490,102 +1587,100 @@ $as_echo "$ac_try_echo"; } >&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 $ac_status = 0; } > conftest.i && {
+        test -z "$ac_c_preproc_warn_flag$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
+    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
-  # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  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_run
 
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
+# 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+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 <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#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;
-}
+$4
+#include <$2>
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+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_exeext conftest.$ac_ext
+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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} # ac_fn_c_check_func
+} # ac_fn_c_check_header_compile
 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 xedit $as_me 1.1.2, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+It was created by xfontsel $as_me 1.0.3, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1695,11 +1790,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1733,11 +1826,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1750,11 +1841,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1768,11 +1857,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1827,7 +1914,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$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
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1842,7 +1934,11 @@ do
     { $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
 
@@ -1918,7 +2014,7 @@ if $ac_cache_corrupted; then
 $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
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -1935,16 +2031,22 @@ am__api_version='1.11'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  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
+  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,
@@ -1973,7 +2075,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $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 :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2060,11 +2162,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2086,7 +2188,7 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" "$LINENO" 5
    fi
 
@@ -2096,7 +2198,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2150,7 +2252,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2190,7 +2292,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2243,7 +2345,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2294,7 +2396,7 @@ do
 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 test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2334,7 +2436,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2342,7 +2444,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2376,7 +2478,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2391,8 +2493,8 @@ fi
 
 
 # Define the identity of the package.
- PACKAGE='xedit'
- VERSION='1.1.2'
+ PACKAGE='xfontsel'
+ VERSION='1.0.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2456,7 +2558,78 @@ fi
 
 
 
-ac_config_headers="$ac_config_headers config.h"
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -2469,7 +2642,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2509,7 +2682,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2562,7 +2735,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2602,7 +2775,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2661,7 +2834,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2705,7 +2878,7 @@ do
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2759,8 +2932,8 @@ 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;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -2874,9 +3047,8 @@ 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;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+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; }
@@ -2918,8 +3090,8 @@ done
 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 compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -2976,9 +3148,9 @@ $as_echo "$ac_try_echo"; } >&5
     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.
+as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -2989,7 +3161,7 @@ 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 test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3029,8 +3201,8 @@ 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;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -3040,7 +3212,7 @@ 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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3077,7 +3249,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 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 test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3155,7 +3327,7 @@ else
 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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3249,74 +3421,12 @@ 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
 
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3439,225 +3549,581 @@ else
 fi
 
 
-if test "x$CC" != xcc; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
-                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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 void
+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;
+  float fnumber;
+
+  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);
+}
 
 int
 main ()
 {
 
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
   ;
   return 0;
 }
 _ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { 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; } &&
-   test -f conftest2.$ac_objext && { { 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
-  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
-  if test "x$CC" != xcc; then
-    # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.$ac_ext >&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
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-      rm -f conftest2.*
-      if { { 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; } &&
-        test -f conftest2.$ac_objext && { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
 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
-       # cc works too.
-       :
-      else
-       # cc exists but doesn't like -o.
-       eval ac_cv_prog_cc_${ac_cc}_c_o=no
-      fi
-    fi
-  fi
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+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
-  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      # 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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 core conftest*
+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
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_prog_CPP=$CPP
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
 
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+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 <ac_nonexistent.h>
+_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 :
 
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
+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
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+{ $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 -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+      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
+  $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
-IFS=$as_save_IFS
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+      $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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_path_GREP=$GREP
 fi
 
-
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+{ $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 test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  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
-  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_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+      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
+  $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+
 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
+
+# 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 test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
 fi
 
+done
+
+
 
 
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
@@ -3666,7 +4132,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -3709,7 +4175,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -3774,155 +4240,395 @@ $as_echo "no" >&6; }
        fi
 
 fi
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-# Check whether --enable-xprint was given.
-if test "${enable_xprint+set}" = set; then :
-  enableval=$enable_xprint; enable_xprint=$enableval
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  enable_xprint=no
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
 
- if test x$enable_xprint = xyes; then
-  USE_XPRINT_TRUE=
-  USE_XPRINT_FALSE='#'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
 else
-  USE_XPRINT_TRUE='#'
-  USE_XPRINT_FALSE=
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
-if test x$enable_xprint = xyes; then
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKGDEPS" >&5
-$as_echo_n "checking for PKGDEPS... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PKGDEPS_CFLAGS"; then
-        pkg_cv_PKGDEPS_CFLAGS="$PKGDEPS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xprintutil xp xaw8\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xprintutil xp xaw8") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_PKGDEPS_CFLAGS=`$PKG_CONFIG --cflags "xprintutil xp xaw8" 2>/dev/null`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  pkg_failed=yes
-fi
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
 else
-       pkg_failed=untried
+  ac_cv_path_SED=$SED
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PKGDEPS_LIBS"; then
-        pkg_cv_PKGDEPS_LIBS="$PKGDEPS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xprintutil xp xaw8\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xprintutil xp xaw8") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_PKGDEPS_LIBS=`$PKG_CONFIG --libs "xprintutil xp xaw8" 2>/dev/null`
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
 else
-  pkg_failed=yes
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
 fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
     fi
-else
-       pkg_failed=untried
 fi
 
 
 
-if test $pkg_failed = yes; then
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
 else
-        _pkg_short_errors_supported=no
+  STRICT_COMPILE=no
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp xaw8"`
-        else
-               PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp xaw8"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$PKGDEPS_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xprintutil xp xaw8) were not met:
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
 
-$PKGDEPS_PKG_ERRORS
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+  INTELCC="yes"
+else
+  INTELCC="no"
+fi
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
 
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
-else
-       PKGDEPS_CFLAGS=$pkg_cv_PKGDEPS_CFLAGS
-       PKGDEPS_LIBS=$pkg_cv_PKGDEPS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
 fi
-   print_noprint=xprint
-else
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PKGDEPS" >&5
-$as_echo_n "checking for PKGDEPS... " >&6; }
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PKGDEPS_CFLAGS"; then
-        pkg_cv_PKGDEPS_CFLAGS="$PKGDEPS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFONTSEL" >&5
+$as_echo_n "checking for XFONTSEL... " >&6; }
+
+if test -n "$XFONTSEL_CFLAGS"; then
+    pkg_cv_XFONTSEL_CFLAGS="$XFONTSEL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_PKGDEPS_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
+  pkg_cv_XFONTSEL_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PKGDEPS_LIBS"; then
-        pkg_cv_PKGDEPS_LIBS="$PKGDEPS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
+if test -n "$XFONTSEL_LIBS"; then
+    pkg_cv_XFONTSEL_LIBS="$XFONTSEL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_PKGDEPS_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
+  pkg_cv_XFONTSEL_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -3935,120 +4641,54 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7"`
+               XFONTSEL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt x11" 2>&1`
         else
-               PKGDEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7"`
+               XFONTSEL_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt x11" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$PKGDEPS_PKG_ERRORS" >&5
+       echo "$XFONTSEL_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xaw7) were not met:
+       as_fn_error $? "Package requirements (xaw7 xmu xt x11) were not met:
 
-$PKGDEPS_PKG_ERRORS
+$XFONTSEL_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XFONTSEL_CFLAGS
+and XFONTSEL_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 " "$LINENO" 5
 elif test $pkg_failed = untried; then
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables PKGDEPS_CFLAGS
-and PKGDEPS_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XFONTSEL_CFLAGS
+and XFONTSEL_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
-       PKGDEPS_CFLAGS=$pkg_cv_PKGDEPS_CFLAGS
-       PKGDEPS_LIBS=$pkg_cv_PKGDEPS_LIBS
+       XFONTSEL_CFLAGS=$pkg_cv_XFONTSEL_CFLAGS
+       XFONTSEL_LIBS=$pkg_cv_XFONTSEL_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        :
 fi
-   print_noprint=noxprint
-fi
-ac_config_links="$ac_config_links app-defaults/Xedit:app-defaults/Xedit-$print_noprint"
-
-
-
-# Check whether --with-lispdir was given.
-if test "${with_lispdir+set}" = set; then :
-  withval=$with_lispdir;  lispdir="$withval"
-else
-   lispdir=${libdir}/X11/xedit/lisp
-fi
-
-LISPDIR=$lispdir
-
-
-
-ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
-if test "x$ac_cv_func_realpath" = x""yes; then :
-
-else
-  have_realpath=yes
-fi
-
- if test x$have_realpath = xyes; then
-  NEED_REALPATH_TRUE=
-  NEED_REALPATH_FALSE='#'
-else
-  NEED_REALPATH_TRUE='#'
-  NEED_REALPATH_FALSE=
-fi
-
-ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = x""yes; then :
-
-else
-  have_strcasecmp=yes
-fi
-
- if test x$have_strcasecmp = xyes; then
-  NEED_STRCASECMP_TRUE=
-  NEED_STRCASECMP_FALSE='#'
-else
-  NEED_STRCASECMP_TRUE='#'
-  NEED_STRCASECMP_FALSE=
-fi
-
-ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
-if test "x$ac_cv_func_unsetenv" = x""yes; then :
-
-else
-  have_unsetenv=yes
-fi
-
- if test x$have_unsetenv = xyes; then
-  NEED_UNSETENV_TRUE=
-  NEED_UNSETENV_FALSE='#'
-else
-  NEED_UNSETENV_TRUE='#'
-  NEED_UNSETENV_FALSE=
-fi
-
-
-
-
 
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
 $as_echo_n "checking for APPDEFS... " >&6; }
 
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_CFLAGS"; then
-        pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$APPDEFS_CFLAGS"; then
+    pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xt") 2>&5
   ac_status=$?
@@ -4058,15 +4698,13 @@ if test -n "$PKG_CONFIG"; then
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_LIBS"; then
-        pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
+if test -n "$APPDEFS_LIBS"; then
+    pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
   ($PKG_CONFIG --exists --print-errors "xt") 2>&5
   ac_status=$?
@@ -4076,9 +4714,8 @@ if test -n "$PKG_CONFIG"; then
 else
   pkg_failed=yes
 fi
-    fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
 
@@ -4091,14 +4728,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
         else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$APPDEFS_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xt) were not met:
+       as_fn_error $? "Package requirements (xt) were not met:
 
 $APPDEFS_PKG_ERRORS
 
@@ -4112,7 +4749,7 @@ See the pkg-config man page for more details.
 elif test $pkg_failed = untried; then
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -4121,7 +4758,7 @@ and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
        APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
@@ -4129,188 +4766,15 @@ else
 $as_echo "yes" >&6; }
        :
 fi
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then :
-  withval=$with_release_version; RELEASE_VERSION="$withval"
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
 else
-  RELEASE_VERSION=""
+  appdefaultdir="${xt_appdefaultdir}"
 fi
 
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
-
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
-
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
 
 
 
@@ -4380,10 +4844,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
+    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;}
-    cat confcache >$cache_file
+      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
     { $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;}
@@ -4399,6 +4874,7 @@ 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$//'
@@ -4422,35 +4898,19 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error "conditional \"AMDEP\" was never defined.
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${USE_XPRINT_TRUE}" && test -z "${USE_XPRINT_FALSE}"; then
-  as_fn_error "conditional \"USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${NEED_REALPATH_TRUE}" && test -z "${NEED_REALPATH_FALSE}"; then
-  as_fn_error "conditional \"NEED_REALPATH\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${NEED_STRCASECMP_TRUE}" && test -z "${NEED_STRCASECMP_FALSE}"; then
-  as_fn_error "conditional \"NEED_STRCASECMP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${NEED_UNSETENV_TRUE}" && test -z "${NEED_UNSETENV_FALSE}"; then
-  as_fn_error "conditional \"NEED_UNSETENV\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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"
@@ -4551,6 +5011,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4596,19 +5057,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  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: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -4804,7 +5265,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -4857,8 +5318,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xedit $as_me 1.1.2, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+This file was extended by xfontsel $as_me 1.0.3, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -4884,7 +5345,6 @@ 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"
-config_links="$ac_config_links"
 config_commands="$ac_config_commands"
 
 _ACEOF
@@ -4915,9 +5375,6 @@ $config_files
 Configuration headers:
 $config_headers
 
-Configuration links:
-$config_links
-
 Configuration commands:
 $config_commands
 
@@ -4927,11 +5384,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xedit config.status 1.1.2
-configured by $0, generated by GNU Autoconf 2.65,
+xfontsel config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 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."
 
@@ -4949,11 +5406,16 @@ 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
@@ -4975,6 +5437,7 @@ do
     $ac_shift
     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;;
@@ -4987,7 +5450,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -4996,7 +5459,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -5050,12 +5513,11 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "app-defaults/Xedit") CONFIG_LINKS="$CONFIG_LINKS app-defaults/Xedit:app-defaults/Xedit-$print_noprint" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -5067,7 +5529,6 @@ done
 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_LINKS+set}" = set || CONFIG_LINKS=$config_links
   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
@@ -5079,9 +5540,10 @@ 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 'as_fn_exit 1' 1 2 13 15
 }
@@ -5089,12 +5551,13 @@ $debug ||
 
 {
   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")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -5111,12 +5574,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -5125,18 +5588,18 @@ _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 '$'`
+  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
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   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
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -5144,7 +5607,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -5192,7 +5655,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -5224,21 +5687,29 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+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
@@ -5250,7 +5721,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -5262,11 +5733,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  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
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -5351,11 +5822,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
 shift
 for ac_tag
 do
@@ -5364,7 +5835,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -5383,7 +5854,7 @@ do
     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 `:'.
@@ -5392,7 +5863,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -5418,8 +5889,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -5555,23 +6026,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+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"; } &&
+  { 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
+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;}
+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";;
+  -) 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
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -5580,21 +6052,21 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      && 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" \
-       || as_fn_error "could not create $ac_file" "$LINENO" 5
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -5631,38 +6103,7 @@ $as_echo X"$_am_arg" |
          }
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
-  :L)
-  #
-  # CONFIG_LINK
-  #
-
-  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
-    :
-  else
-    # Prefer the file from the source tree if names are identical.
-    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
-      ac_source=$srcdir/$ac_source
-    fi
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
-$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
-
-    if test ! -r "$ac_source"; then
-      as_fn_error "$ac_source: file not found" "$LINENO" 5
-    fi
-    rm -f "$ac_file"
 
-    # Try a relative symlink, then a hard link, then a copy.
-    case $srcdir in
-    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
-       *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
-    esac
-    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
-      ln "$ac_source" "$ac_file" 2>/dev/null ||
-      cp -p "$ac_source" "$ac_file" ||
-      as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
-  fi
- ;;
   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
 $as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
@@ -5775,7 +6216,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -5796,7 +6237,7 @@ 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 || as_fn_exit $?
+  $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
similarity index 77%
rename from xgc/configure.ac
rename to xfontsel/configure.ac
index 8c1bbbd..dd84943 100644 (file)
@@ -21,33 +21,29 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xgc, [1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xgc)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xfontsel], [1.0.3],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xfontsel])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
-AM_CONFIG_HEADER(config.h)
 
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-         [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
-AC_PROG_LEX
-AC_PROG_YACC
-AC_PROG_CC
-AC_PROG_INSTALL
+AM_CONFIG_HEADER(config.h)
 
-PKG_CHECK_MODULES(XGC, xaw7)
-AC_SUBST(XGC_CFLAGS)
-AC_SUBST(XGC_LIBS)
+PKG_CHECK_MODULES(XFONTSEL, xaw7 xmu xt x11)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
        [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
+
 AC_OUTPUT([Makefile])
similarity index 100%
rename from xedit/depcomp
rename to xfontsel/depcomp
similarity index 100%
rename from xedit/install-sh
rename to xfontsel/install-sh
similarity index 100%
rename from xedit/missing
rename to xfontsel/missing
diff --git a/xfontsel/xfontsel.c b/xfontsel/xfontsel.c
new file mode 100644 (file)
index 0000000..3b8f0aa
--- /dev/null
@@ -0,0 +1,1499 @@
+/* $XConsortium: xfontsel.c,v 1.35 94/04/17 20:43:41 rws Exp $ */
+/*
+
+Copyright (c) 1985-1989  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+Author:        Ralph R. Swick, DEC/MIT Project Athena
+       one weekend in November, 1989
+Modified: Mark Leisher <mleisher@crl.nmsu.edu> to deal with UCS sample text.
+*/
+/* $XFree86: xc/programs/xfontsel/xfontsel.c,v 1.7tsi Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <X11/Xatom.h>
+#include <X11/Xaw/AsciiText.h>
+#include <X11/Xaw/Box.h>
+#include <X11/Xaw/Cardinals.h>
+#include <X11/Xaw/Command.h>
+#include <X11/Xaw/Form.h>
+#include <X11/Xaw/MenuButton.h>
+#include <X11/Xaw/Paned.h>
+#include <X11/Xaw/SimpleMenu.h>
+#include <X11/Xaw/SmeBSB.h>
+#include <X11/Xaw/Toggle.h>
+#include <X11/Xaw/Viewport.h>
+#include <X11/Xmu/Atoms.h>
+#include <X11/Xmu/StdSel.h>
+#include <X11/Xfuncs.h>
+#include "ULabel.h"
+
+#define MIN_APP_DEFAULTS_VERSION 1
+#define FIELD_COUNT 14
+#define DELIM '-'
+
+/* number of font names to parse in each background iteration */
+#ifndef PARSE_QUANTUM
+#define PARSE_QUANTUM 25
+#endif
+
+#define NZ NULL,ZERO
+#define BACKGROUND 10
+
+void GetFontNames(XtPointer closure);
+Boolean Matches(String pattern, String fontName, Boolean fields[], int *maxfields);
+Boolean DoWorkPiece(XtPointer closure);
+void Quit(Widget w, XtPointer closure, XtPointer callData);
+void OwnSelection(Widget w, XtPointer closure, XtPointer callData);
+void SelectField(Widget w, XtPointer closure, XtPointer callData);
+void ParseFontNames(XtPointer closure);
+void SortFields(XtPointer closure);
+void FixScalables(XtPointer closure);
+void MakeFieldMenu(XtPointer closure);
+void SelectValue(Widget w, XtPointer closure, XtPointer callData);
+void AnyValue(Widget w, XtPointer closure, XtPointer callData);
+void EnableOtherValues(Widget w, XtPointer closure, XtPointer callData);
+void EnableMenu(XtPointer closure);
+void SetCurrentFont(XtPointer closure);
+void QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params);
+
+static XtActionsRec xfontsel_actions[] = {
+    {"Quit",       QuitAction}
+};
+
+static Atom wm_delete_window;
+
+Boolean IsXLFDFontName(String fontName);
+
+typedef void (*XtProc)(XtPointer closure);
+
+static struct _appRes {
+    int app_defaults_version;
+    Cursor cursor;
+    String pattern;
+    String pixelSizeList;
+    String pointSizeList;
+    Boolean print_on_quit;
+    String sample_text;
+    String sample_text16;
+    String sample_textUCS;
+    Boolean scaled_fonts;
+} AppRes;
+
+#define DEFAULTPATTERN "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
+
+static XtResource resources[] = {
+    { "cursor", "Cursor", XtRCursor, sizeof(Cursor),
+               XtOffsetOf( struct _appRes, cursor ),
+               XtRImmediate, NULL },
+    { "pattern", "Pattern", XtRString, sizeof(String),
+               XtOffsetOf( struct _appRes, pattern ),
+               XtRString, (XtPointer)DEFAULTPATTERN },
+    { "pixelSizeList", "PixelSizeList", XtRString, sizeof(String),
+                XtOffsetOf( struct _appRes, pixelSizeList ),
+                XtRString, (XtPointer)"" },
+    { "pointSizeList", "PointSizeList", XtRString, sizeof(String),
+                XtOffsetOf( struct _appRes, pointSizeList ),
+                XtRString, (XtPointer)"" },
+    { "printOnQuit", "PrintOnQuit", XtRBoolean, sizeof(Boolean),
+               XtOffsetOf( struct _appRes, print_on_quit ),
+               XtRImmediate, (XtPointer)False },
+    { "appDefaultsVersion", "AppDefaultsVersion", XtRInt, sizeof(int),
+               XtOffsetOf( struct _appRes, app_defaults_version ),
+               XtRImmediate, (XtPointer)0 },
+    { "sampleText", "Text", XtRString, sizeof(String),
+               XtOffsetOf( struct _appRes, sample_text ),
+               XtRString, (XtPointer)"" },
+    { "sampleText16", "Text16", XtRString, sizeof(String),
+               XtOffsetOf( struct _appRes, sample_text16 ),
+               XtRString, (XtPointer)"" },
+    { "sampleTextUCS", "TextUCS", XtRString, sizeof(String),
+               XtOffsetOf( struct _appRes, sample_textUCS ),
+               XtRString, (XtPointer)"" },
+    { "scaledFonts", "ScaledFonts", XtRBoolean, sizeof(Boolean),
+               XtOffsetOf( struct _appRes, scaled_fonts ),
+               XtRImmediate, (XtPointer)False },
+};
+
+static XrmOptionDescRec options[] = {
+{"-pattern",   "pattern",      XrmoptionSepArg,        NULL},
+{"-print",     "printOnQuit",  XrmoptionNoArg,         "True"},
+{"-sample",    "sampleText",   XrmoptionSepArg,        NULL},
+{"-sample16",  "sampleText16", XrmoptionSepArg,        NULL},
+{"-sampleUCS", "sampleTextUCS",XrmoptionSepArg,        NULL},
+{"-scaled",    "scaledFonts",  XrmoptionNoArg,         "True"},
+};
+
+static void Syntax(char *call)
+{
+    fprintf (stderr, "usage:  %s [-options ...] -fn font\n\n", call);
+    fprintf (stderr, "where options include:\n");
+    fprintf (stderr,
+       "    -display dpy           X server to contact\n");
+    fprintf (stderr, 
+       "    -geometry geom         size and location of window\n");
+    fprintf (stderr, 
+       "    -pattern fontspec      font name pattern to match against\n");
+    fprintf (stderr, 
+       "    -print                 print selected font name on exit\n");
+    fprintf (stderr, 
+       "    -sample string         sample text to use for 1-byte fonts\n");
+    fprintf (stderr, 
+       "    -sample16 string       sample text to use for 2-byte fonts\n");
+    fprintf (stderr,
+       "    -sampleUCS string      sample text to use for ISO10646 fonts\n");
+    fprintf (stderr, 
+       "    -scaled                use scaled instances of fonts\n");
+    fprintf (stderr, "\n");
+    exit (1);
+}
+
+
+typedef struct FieldValue FieldValue;
+struct FieldValue {
+    int field;
+    String string;
+    Widget menu_item;
+    int count;                 /* of fonts */
+    int allocated;
+    int *font;
+    Boolean enable;
+};
+
+
+typedef struct FieldValueList FieldValueList;
+struct FieldValueList {
+    int count;                 /* of values */
+    int allocated;
+    Boolean show_unselectable;
+    FieldValue value[1];       /* really [allocated] */
+};
+
+
+typedef struct FontValues FontValues;
+struct FontValues {
+    int value_index[FIELD_COUNT];
+};
+
+
+typedef struct FieldMenuRec FieldMenuRec;
+struct FieldMenuRec {
+    int field;
+    Widget button;
+};
+
+
+typedef struct Choice Choice;
+struct Choice {
+    Choice *prev;
+    FieldValue *value;
+};
+
+
+static XtResource menuResources[] = {
+    { "showUnselectable", "ShowUnselectable", XtRBoolean, sizeof(Boolean),
+               XtOffsetOf( FieldValueList, show_unselectable ),
+               XtRImmediate, (XtPointer)True },
+};
+
+
+typedef enum {ValidateCurrentField, SkipCurrentField} ValidateAction;
+
+static void EnableAllItems(int field);
+static void EnableRemainingItems(ValidateAction current_field_action);
+static void FlushXqueue(Display *dpy);
+static void MarkInvalidFonts(Boolean *set, FieldValue *val);
+static void ScheduleWork(XtProc proc, XtPointer closure, int priority);
+static void SetCurrentFontCount(void);
+static void SetNoFonts(void);
+static void SetParsingFontCount(int count);
+
+static XtAppContext appCtx;
+static int numFonts;
+static int numBadFonts;
+static FontValues *fonts;
+static int *scaledFonts;
+static int numScaledFonts;
+static FieldValueList *fieldValues[FIELD_COUNT];
+static FontValues currentFont;
+static int matchingFontCount;
+static Boolean anyDisabled = False;
+static Widget ownButton;
+static Widget fieldBox;
+static Widget countLabel;
+static Widget currentFontName;
+static String currentFontNameString;
+static int currentFontNameSize;
+static Widget sampleText;
+static int textEncoding = -1;
+static XFontStruct *sampleFont = NULL;
+static Boolean *fontInSet;
+static Choice *choiceList = NULL;
+static int enabledMenuIndex;
+static Boolean patternFieldSpecified[FIELD_COUNT]; /* = 0 */
+
+int
+main(int argc, char **argv)
+{
+    Widget topLevel, pane;
+
+    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
+
+    topLevel = XtAppInitialize(&appCtx, "XFontSel", options, XtNumber(options),
+                              &argc, argv, NULL, NULL, 0);
+
+    if (argc != 1) Syntax(argv[0]);
+
+    XtAppAddActions(appCtx, xfontsel_actions, XtNumber(xfontsel_actions));
+    XtOverrideTranslations
+       (topLevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: Quit()"));
+
+    XtGetApplicationResources( topLevel, (XtPointer)&AppRes,
+                              resources, XtNumber(resources), NZ );
+    if (AppRes.app_defaults_version < MIN_APP_DEFAULTS_VERSION) {
+       XrmDatabase rdb = XtDatabase(XtDisplay(topLevel));
+       XtWarning( "app-defaults file not properly installed." );
+       XrmPutLineResource( &rdb,
+"*sampleText*UCSLabel:XFontSel app-defaults file not properly installed;\\n\
+see 'xfontsel' manual page."
+                         );
+    }
+
+    ScheduleWork(GetFontNames, (XtPointer)XtDisplay(topLevel), 0);
+
+    pane = XtCreateManagedWidget("pane",panedWidgetClass,topLevel,NZ);
+    {
+       Widget commandBox, /* fieldBox, currentFontName,*/ viewPort;
+
+       commandBox = XtCreateManagedWidget("commandBox",formWidgetClass,pane,NZ);
+       {
+           Widget quitButton /*, ownButton , countLabel*/;
+
+           quitButton =
+               XtCreateManagedWidget("quitButton",commandWidgetClass,commandBox,NZ);
+
+           ownButton =
+               XtCreateManagedWidget("ownButton",toggleWidgetClass,commandBox,NZ);
+
+           countLabel =
+               XtCreateManagedWidget("countLabel",labelWidgetClass,commandBox,NZ);
+
+           XtAddCallback(quitButton, XtNcallback, Quit, NULL);
+           XtAddCallback(ownButton,XtNcallback,OwnSelection,(XtPointer)True);
+       }
+
+       fieldBox = XtCreateManagedWidget("fieldBox", boxWidgetClass, pane, NZ);
+       {
+           Widget /*dash,*/ field /*[FIELD_COUNT]*/;
+           int f;
+
+           for (f = 0; f < FIELD_COUNT; f++) {
+               char name[10];
+               FieldMenuRec *makeRec = XtNew(FieldMenuRec);
+               sprintf( name, "field%d", f );
+               XtCreateManagedWidget("dash",labelWidgetClass,fieldBox,NZ);
+               field = XtCreateManagedWidget(name, menuButtonWidgetClass,
+                       fieldBox, NZ);
+               XtAddCallback(field, XtNcallback, SelectField,
+                       (XtPointer)(long)f);
+               makeRec->field = f;
+               makeRec->button = field;
+               ScheduleWork(MakeFieldMenu, (XtPointer)makeRec, 2);
+               ScheduleWork((XtProc)XtFree, (XtPointer)makeRec, 2);
+           }
+       }
+
+       /* currentFontName = */
+       {
+           Arg args[1];
+           currentFontNameSize = strlen(AppRes.pattern);
+           if (currentFontNameSize < 128) currentFontNameSize = 128;
+           currentFontNameString = (String)XtMalloc(currentFontNameSize);
+           strcpy(currentFontNameString, AppRes.pattern);
+           XtSetArg(args[0], XtNlabel, currentFontNameString);
+           currentFontName =
+               XtCreateManagedWidget("fontName",labelWidgetClass,pane,args,ONE);
+       }
+
+       viewPort =
+           XtCreateManagedWidget("viewPort",viewportWidgetClass,pane,NZ);
+       {
+#ifdef USE_TEXT_WIDGET
+           Widget text =
+               XtCreateManagedWidget("sampleText",asciiTextWidgetClass,viewPort,NZ);
+           Arg args[1];
+           XtSetArg( args[0], XtNtextSink, &sampleText );
+           XtGetValues( text, args, ONE );
+#else
+           sampleText =
+               XtCreateManagedWidget("sampleText",ucsLabelWidgetClass,viewPort,NZ);
+#endif
+       }
+    }
+    
+    XtRealizeWidget(topLevel);
+    XDefineCursor( XtDisplay(topLevel), XtWindow(topLevel), AppRes.cursor );
+    {
+       int f;
+       for (f = 0; f < FIELD_COUNT; f++) currentFont.value_index[f] = -1;
+    }
+    wm_delete_window = XInternAtom(XtDisplay(topLevel), "WM_DELETE_WINDOW",
+                                  False);
+    (void) XSetWMProtocols (XtDisplay(topLevel), XtWindow(topLevel),
+                            &wm_delete_window, 1);
+    XtAppMainLoop(appCtx);
+
+    return 0;
+}
+
+
+typedef struct WorkPiece WorkPieceRec, *WorkPiece;
+struct WorkPiece {
+    WorkPiece next;
+    int priority;
+    XtProc proc;
+    XtPointer closure;
+};
+static WorkPiece workQueue = NULL;
+
+
+/*
+ * ScheduleWork( XtProc proc, XtPointer closure, int priority )
+ *
+ * Adds a WorkPiece to the workQueue in FIFO order by priority.
+ * Lower numbered priority work is completed before higher numbered
+ * priorities.
+ *
+ * If the workQueue was previously empty, then makes sure that
+ * Xt knows we have (background) work to do.
+ */
+
+static void ScheduleWork(XtProc proc, XtPointer closure, int priority)
+{
+    WorkPiece piece = XtNew(WorkPieceRec);
+
+    piece->priority = priority;
+    piece->proc = proc;
+    piece->closure = closure;
+    if (workQueue == NULL) {
+       piece->next = NULL;
+       workQueue = piece;
+       XtAppAddWorkProc(appCtx, DoWorkPiece, NULL);
+    } else {
+       if (workQueue->priority > priority) {
+           piece->next = workQueue;
+           workQueue = piece;
+       }
+       else {
+           WorkPiece n;
+           for (n = workQueue; n->next && n->next->priority <= priority;)
+               n = n->next;
+           piece->next = n->next;
+           n->next = piece;
+       }
+    }
+}
+
+/* ARGSUSED */
+Boolean DoWorkPiece(XtPointer closure)
+{
+    WorkPiece piece = workQueue;
+
+    if (piece) {
+       (*piece->proc)(piece->closure);
+       workQueue = piece->next;
+       XtFree((XtPointer)piece);
+       if (workQueue != NULL)
+           return False;
+    }
+    return True;
+}
+
+
+/*
+ * FinishWork()
+ *
+ * Drains foreground tasks from the workQueue.
+ * Foreground == (priority < BACKGROUND)
+ */
+
+static void FinishWork(void)
+{
+    while (workQueue && workQueue->priority < BACKGROUND)
+       DoWorkPiece(NULL);
+}
+
+
+typedef struct ParseRec ParseRec;
+struct ParseRec {
+    char **fontNames;
+    int num_fonts;
+    int start, end;
+    FontValues *fonts;
+    FieldValueList **fieldValues;
+};
+
+
+void GetFontNames(XtPointer closure)
+{
+    Display *dpy = (Display*)closure;
+    ParseRec *parseRec = XtNew(ParseRec);
+    int f, field, count;
+    String *fontNames;
+    Boolean *b;
+    int work_priority = 0;
+
+    fontNames = parseRec->fontNames =
+       XListFonts(dpy, AppRes.pattern, 32767, &numFonts);
+
+    fonts = (FontValues*)XtMalloc( numFonts*sizeof(FontValues) );
+    fontInSet = (Boolean*)XtMalloc( numFonts*sizeof(Boolean) );
+    for (f = numFonts, b = fontInSet; f; f--, b++) *b = True;
+    for (field = 0; field < FIELD_COUNT; field++) {
+       fieldValues[field] = (FieldValueList*)XtMalloc(sizeof(FieldValueList));
+       fieldValues[field]->allocated = 1;
+       fieldValues[field]->count = 0;
+    }
+    if (numFonts == 0) {
+       SetNoFonts();
+       return;
+    }
+    numBadFonts = 0;
+    parseRec->fonts = fonts;
+    parseRec->num_fonts = count = matchingFontCount = numFonts;
+    parseRec->fieldValues = fieldValues;
+    parseRec->start = 0;
+    /* this is bogus; the task should be responsible for quantizing...*/
+    while (count > PARSE_QUANTUM) {
+       ParseRec *prevRec = parseRec;
+       parseRec->end = parseRec->start + PARSE_QUANTUM;
+       ScheduleWork(ParseFontNames, (XtPointer)parseRec, work_priority);
+       ScheduleWork((XtProc)XtFree, (XtPointer)parseRec, work_priority);
+       parseRec = XtNew(ParseRec);
+       *parseRec = *prevRec;
+       parseRec->start += PARSE_QUANTUM;
+       parseRec->fonts += PARSE_QUANTUM;
+       parseRec->fontNames += PARSE_QUANTUM;
+       count -= PARSE_QUANTUM;
+       work_priority = 1;
+    }
+    parseRec->end = numFonts;
+    ScheduleWork(ParseFontNames,(XtPointer)parseRec,work_priority);
+    ScheduleWork((XtProc)XFreeFontNames,(XtPointer)fontNames,work_priority);
+    ScheduleWork((XtProc)XtFree, (XtPointer)parseRec, work_priority);
+    if (AppRes.scaled_fonts)
+       ScheduleWork(FixScalables,(XtPointer)0,work_priority);
+    ScheduleWork(SortFields,(XtPointer)0,work_priority);
+    SetParsingFontCount(matchingFontCount);
+    if (strcmp(AppRes.pattern, DEFAULTPATTERN)) {
+       int maxField, f;
+       for (f = 0; f < numFonts && !IsXLFDFontName(fontNames[f]); f++);
+       if (f != numFonts) {
+           if (Matches(AppRes.pattern, fontNames[f],
+                        patternFieldSpecified, &maxField)) {
+               for (f = 0; f <= maxField; f++) {
+                   if (patternFieldSpecified[f])
+                       currentFont.value_index[f] = 0;
+               }
+           }
+           else
+               XtAppWarning( appCtx, 
+                   "internal error; pattern didn't match first font" );
+       }
+       else {
+           SetNoFonts();
+           return;
+       }
+    }
+    ScheduleWork(SetCurrentFont, NULL, 1);
+}
+
+
+void ParseFontNames(XtPointer closure)
+{
+    ParseRec *parseRec = (ParseRec*)closure;
+    char **fontNames = parseRec->fontNames;
+    int num_fonts = parseRec->end;
+    FieldValueList **fieldValues = parseRec->fieldValues;
+    FontValues *fontValues = parseRec->fonts - numBadFonts;
+    int i, font;
+
+    for (font = parseRec->start; font < num_fonts; font++) {
+       char *p;
+       int f, len;
+       FieldValue *v;
+
+       if (!IsXLFDFontName(*fontNames)) {
+           numFonts--;
+           numBadFonts++;
+           continue;
+       }
+
+       for (f = 0, p = *fontNames++; f < FIELD_COUNT; f++) {
+           char *fieldP;
+
+           if (*p) ++p;
+           if (*p == DELIM || *p == '\0') {
+               fieldP = "";
+               len = 0;
+           } else {
+               fieldP = p;
+               while (*p && *++p != DELIM);
+               len = p - fieldP;
+           }
+           for (i=fieldValues[f]->count,v=fieldValues[f]->value; i;i--,v++) {
+               if (len == 0) {
+                   if (v->string == NULL) break;
+               }
+               else
+                   if (v->string &&
+                       strncmp( v->string, fieldP, len ) == 0 &&
+                       (v->string)[len] == '\0')
+                       break;
+           }
+           if (i == 0) {
+               int count = fieldValues[f]->count++;
+               if (count == fieldValues[f]->allocated) {
+                   int allocated = (fieldValues[f]->allocated += 10);
+                   fieldValues[f] = (FieldValueList*)
+                       XtRealloc( (char *) fieldValues[f],
+                                  sizeof(FieldValueList) +
+                                       (allocated-1) * sizeof(FieldValue) );
+               }
+               v = &fieldValues[f]->value[count];
+               v->field = f;
+               if (len == 0)
+                   v->string = NULL;
+               else {
+                   v->string = (String)XtMalloc( len+1 );
+                   strncpy( v->string, fieldP, len );
+                   v->string[len] = '\0';
+               }
+               v->font = (int*)XtMalloc( 10*sizeof(int) );
+               v->allocated = 10;
+               v->count = 0;
+               v->enable = True;
+               i = 1;
+           }
+           fontValues->value_index[f] = fieldValues[f]->count - i;
+           if ((i = v->count++) == v->allocated) {
+               int allocated = (v->allocated += 10);
+               v->font = (int*)XtRealloc( (char *) v->font, 
+                                         allocated * sizeof(int) );
+           }
+           v->font[i] = font - numBadFonts;
+       }
+       fontValues++;
+    }
+    SetParsingFontCount(numFonts - num_fonts);
+}
+
+
+/* Add the list of scalable fonts to the match-list of every value instance
+ * for field f.  Must produce sorted order.  Must deal with duplicates
+ * since we need to do this for resolution fields which can be nonzero in
+ * the scalable fonts.
+ */
+static void AddScalables(int f)
+{
+    int i;
+    int max = fieldValues[f]->count;
+    FieldValue *fval = fieldValues[f]->value;
+
+    for (i = 0; i < max; i++, fval++) {
+       int *oofonts, *ofonts, *nfonts, *fonts;
+       int ocount, ncount, count;
+
+       if (fval->string && !strcmp(fval->string, "0"))
+           continue;
+       count = numScaledFonts;
+       fonts = scaledFonts;
+       ocount = fval->count;
+       ncount = ocount + count;
+       nfonts = (int *)XtMalloc( ncount * sizeof(int) );
+       oofonts = ofonts = fval->font;
+       fval->font = nfonts;
+       fval->count = ncount;
+       fval->allocated = ncount;
+       while (count && ocount) {
+           if (*fonts < *ofonts) {
+               *nfonts++ = *fonts++;
+               count--;
+           } else if (*fonts == *ofonts) {
+               *nfonts++ = *fonts++;
+               count--;
+               ofonts++;
+               ocount--;
+               fval->count--;
+           } else {
+               *nfonts++ = *ofonts++;
+               ocount--;
+           }
+       }
+       while (ocount) {
+           *nfonts++ = *ofonts++;
+           ocount--;
+       }
+       while (count) {
+           *nfonts++ = *fonts++;
+           count--;
+       }
+       XtFree((char *)oofonts);
+    }
+}
+
+
+/* Merge in specific scaled sizes (specified in a comma-separated string)
+ * for field f.  Weed out duplicates.  The set of matching fonts is just
+ * the set of scalable fonts.
+ */
+static void NewScalables(int f, char *slist)
+{
+    char endc = 1;
+    char *str;
+    int i, count;
+    FieldValue *v;
+
+    while (endc) {
+       while (*slist == ' ' || *slist == ',')
+           slist++;
+       if (!*slist)
+           break;
+       str = slist;
+       while ((endc = *slist) && endc != ' ' && endc != ',')
+           slist++;
+       *slist++ = '\0';
+       for (i=fieldValues[f]->count,v=fieldValues[f]->value; --i >= 0; v++) {
+           if (v->string && !strcmp(v->string, str))
+               break;
+       }
+       if (i >= 0)
+           continue;
+       count = fieldValues[f]->count++;
+       if (count == fieldValues[f]->allocated) {
+           int allocated = (fieldValues[f]->allocated += 10);
+           fieldValues[f] = (FieldValueList*)
+               XtRealloc( (char *) fieldValues[f],
+                          sizeof(FieldValueList) +
+                               (allocated-1) * sizeof(FieldValue) );
+       }
+       v = &fieldValues[f]->value[count];
+       v->field = f;
+       v->string = str;
+       v->count = numScaledFonts;
+       v->font = scaledFonts;
+       v->allocated = 0;
+       v->enable = True;
+    }
+}
+
+
+/* Find all scalable fonts, defined as the set matching "0" in the pixel
+ * size field (field 6).  Augment the match-lists for all other fields
+ * that are scalable.  Add in new scalable pixel and point sizes given
+ * in resources.
+ */
+/*ARGSUSED*/
+void FixScalables(XtPointer closure)
+{
+    int i;
+    FieldValue *fval = fieldValues[6]->value;
+
+    for (i = fieldValues[6]->count; --i >= 0; fval++) {
+       if (fval->string && !strcmp(fval->string, "0")) {
+           scaledFonts = fval->font;
+           numScaledFonts = fval->count;
+           AddScalables(6);
+           NewScalables(6, AppRes.pixelSizeList);
+           AddScalables(7);
+           NewScalables(7, AppRes.pointSizeList);
+           AddScalables(8);
+           AddScalables(9);
+           AddScalables(11);
+           break;
+       }
+    }
+}
+
+
+/* A verbatim copy from xc/lib/font/fontfile/fontdir.c */
+
+/*
+ * Compare two strings just like strcmp, but preserve decimal integer
+ * sorting order, i.e. "2" < "10" or "iso8859-2" < "iso8859-10" <
+ * "iso10646-1". Strings are sorted as if sequences of digits were
+ * prefixed by a length indicator (i.e., does not ignore leading zeroes).
+ *
+ * Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
+ */
+#define Xisdigit(c) ('\060' <= (c) && (c) <= '\071')
+
+static int strcmpn(const char *s1, const char *s2)
+{
+    int digits, predigits = 0;
+    const char *ss1, *ss2;
+
+    while (1) {
+       if (*s1 == 0 && *s2 == 0)
+           return 0;
+       digits = Xisdigit(*s1) && Xisdigit(*s2);
+       if (digits && !predigits) {
+           ss1 = s1;
+           ss2 = s2;
+           while (Xisdigit(*ss1) && Xisdigit(*ss2))
+               ss1++, ss2++;
+           if (!Xisdigit(*ss1) && Xisdigit(*ss2))
+               return -1;
+           if (Xisdigit(*ss1) && !Xisdigit(*ss2))
+               return 1;
+       }
+       if ((unsigned char)*s1 < (unsigned char)*s2)
+           return -1;
+       if ((unsigned char)*s1 > (unsigned char)*s2)
+           return 1;
+       predigits = digits;
+       s1++, s2++;
+    }
+}
+
+
+/* Order is *, (nil), rest */
+static int AlphabeticSort(_Xconst void *fval1, _Xconst void *fval2)
+{
+#   define fval1 ((_Xconst FieldValue *)fval1)
+#   define fval2 ((_Xconst FieldValue *)fval2)
+
+    if (fval1->string && !strcmp(fval1->string, "*"))
+       return -1;
+    if (fval2->string && !strcmp(fval2->string, "*"))
+       return 1;
+    if (!fval1->string)
+       return -1;
+    if (!fval2->string)
+       return 1;
+
+    return strcmpn(fval1->string, fval2->string);
+
+#   undef fval1
+#   undef fval2
+}
+
+
+/* Order is *, (nil), rest */
+static int NumericSort(_Xconst void *fval1, _Xconst void *fval2)
+{
+#   define fval1 ((_Xconst FieldValue *)fval1)
+#   define fval2 ((_Xconst FieldValue *)fval2)
+
+    if (fval1->string && !strcmp(fval1->string, "*"))
+       return -1;
+    if (fval2->string && !strcmp(fval2->string, "*"))
+       return 1;
+    if (!fval1->string)
+       return -1;
+    if (!fval2->string)
+       return 1;
+
+    return atoi(fval1->string) - atoi(fval2->string);
+
+#   undef fval1
+#   undef fval2
+}
+
+
+/* Resort each field, to get reasonable menus.  Sort alphabetically or
+ * numerically, depending on the field.  Since the fonts have indexes
+ * into the fields, we need to deal with updating those indexes after the
+ * sort.
+ */
+/*ARGSUSED*/
+void SortFields(XtPointer closure)
+{
+    int i, j, count;
+    FieldValue *vals;
+    int *indexes;
+    int *idx;
+
+    for (i = 0; i < FIELD_COUNT; i++) {
+       count = fieldValues[i]->count;
+       vals = fieldValues[i]->value;
+       indexes = (int *)XtMalloc(count * sizeof(int));
+       /* temporarily use the field component, will restore it below */
+       for (j = 0; j < count; j++)
+           vals[j].field = j;
+       switch (i) {
+       case 6: case 7: case 8: case 9: case 11:
+           qsort((char *)vals, count, sizeof(FieldValue), NumericSort);
+           break;
+       default:
+           qsort((char *)vals, count, sizeof(FieldValue), AlphabeticSort);
+           break;
+       }
+       for (j = 0; j < count; j++) {
+           indexes[vals[j].field] = j;
+           vals[j].field = i;
+       }
+       for (j = 0; j < numFonts; j++) {
+           idx = &fonts[j].value_index[i];
+           if (*idx >= 0)
+               *idx = indexes[*idx];
+       }
+       XtFree((char *)indexes);
+    }
+}
+
+
+Boolean IsXLFDFontName(String fontName)
+{
+    int f;
+    for (f = 0; *fontName;) if (*fontName++ == DELIM) f++;
+    return (f == FIELD_COUNT);
+}
+
+
+void MakeFieldMenu(XtPointer closure)
+{
+    FieldMenuRec *makeRec = (FieldMenuRec*)closure;
+    Widget menu;
+    FieldValueList *values = fieldValues[makeRec->field];
+    FieldValue *val = values->value;
+    int i;
+    Arg args[1];
+    register Widget item;
+
+    if (numFonts)
+       menu =
+         XtCreatePopupShell("menu",simpleMenuWidgetClass,makeRec->button,NZ);
+    else {
+       SetNoFonts();
+       return;
+    }
+    XtGetSubresources(menu, (XtPointer) values, "options", "Options",
+                     menuResources, XtNumber(menuResources), NZ);
+    XtAddCallback(menu, XtNpopupCallback, EnableOtherValues,
+                 (XtPointer)(long)makeRec->field );
+
+    if (!patternFieldSpecified[val->field]) {
+       XtSetArg( args[0], XtNlabel, "*" );
+       item = XtCreateManagedWidget("any",smeBSBObjectClass,menu,args,ONE);
+       XtAddCallback(item, XtNcallback, AnyValue, (XtPointer)(long)val->field);
+    }
+
+    for (i = values->count; i; i--, val++) {
+       XtSetArg( args[0], XtNlabel, val->string ? val->string : "(nil)" );
+       item =
+           XtCreateManagedWidget(val->string ? val->string : "nil",
+                                 smeBSBObjectClass, menu, args, ONE);
+       XtAddCallback(item, XtNcallback, SelectValue, (XtPointer)val);
+       val->menu_item = item;
+    }
+}
+
+
+static void SetNoFonts(void)
+{
+    matchingFontCount = 0;
+    SetCurrentFontCount();
+    XtSetSensitive(fieldBox, False);
+    XtSetSensitive(ownButton, False);
+    if (AppRes.app_defaults_version >= MIN_APP_DEFAULTS_VERSION) {
+#ifdef USE_TEXT_WIDGET
+       XtUnmapWidget(XtParent(sampleText));
+#else
+       XtUnmapWidget(sampleText);
+#endif
+    }
+}
+
+
+Boolean Matches(register String pattern, register String fontName,
+               Boolean fields[/*FIELD_COUNT*/], int *maxField)
+{
+    register int field = (*fontName == DELIM) ? -1 : 0;
+    register Boolean marked_this_field = False;
+
+    while (*pattern) {
+       if (*pattern == *fontName || *pattern == '?') {
+           pattern++;
+           if (*fontName++ == DELIM) {
+               field++;
+               marked_this_field = False;
+           }
+           else if (!marked_this_field)
+               fields[field] = marked_this_field = True; 
+           continue;
+       }
+       if (*pattern == '*') {
+           if (*++pattern == '\0') {
+               *maxField = field;
+               return True;
+           }
+           while (*fontName) {
+               Boolean field_bits[FIELD_COUNT];
+               int max_field;
+               if (*fontName == DELIM) field++;
+               bzero( field_bits, sizeof(field_bits) );
+               if (Matches(pattern, fontName++, field_bits, &max_field)) {
+                   int f;
+                   *maxField = field + max_field;
+                   for (f = 0; f <= max_field; field++, f++)
+                       fields[field] = field_bits[f];
+                   return True;
+               }
+           }
+           return False;
+       }
+       else /* (*pattern != '*') */
+           return False;
+    }
+    if (*fontName)
+       return False;
+
+    *maxField = field;
+    return True;
+}
+
+
+/* ARGSUSED */
+void SelectValue(Widget w, XtPointer closure, XtPointer callData)
+{
+    FieldValue *val = (FieldValue*)closure;
+#ifdef LOG_CHOICES
+    Choice *choice = XtNew(Choice);
+#else
+    static Choice pChoice;
+    Choice *choice = &pChoice;
+#endif
+
+#ifdef notdef
+    Widget button = XtParent(XtParent(w));
+    Arg args[1];
+
+    XtSetArg(args[0], XtNlabel, val->string);
+    XtSetValues( button, args, ONE );
+#endif
+
+    currentFont.value_index[val->field] = val - fieldValues[val->field]->value;
+
+    choice->prev = choiceList;
+    choice->value = val;
+    choiceList = choice;
+       
+    SetCurrentFont(NULL);
+    EnableRemainingItems(SkipCurrentField);
+}
+
+
+/* ARGSUSED */
+void AnyValue(Widget w, XtPointer closure, XtPointer callData)
+{
+    int field = (long)closure;
+    currentFont.value_index[field] = -1;
+    SetCurrentFont(NULL);
+    EnableAllItems(field);
+    EnableRemainingItems(ValidateCurrentField);
+}
+
+
+static void SetCurrentFontCount(void)
+{
+    char label[80];
+    Arg args[1];
+    if (matchingFontCount == 1)
+       strcpy( label, "1 name matches" );
+    else if (matchingFontCount)
+       sprintf( label, "%d names match", matchingFontCount );
+    else
+       strcpy( label, "no names match" );
+    XtSetArg( args[0], XtNlabel, label );
+    XtSetValues( countLabel, args, ONE );
+}
+
+
+static void SetParsingFontCount(int count)
+{
+    char label[80];
+    Arg args[1];
+    if (count == 1)
+       strcpy( label, "1 name to parse" );
+    else
+       sprintf( label, "%d names to parse", count );
+    XtSetArg( args[0], XtNlabel, label );
+    XtSetValues( countLabel, args, ONE );
+    FlushXqueue(XtDisplay(countLabel));
+}
+
+/* ARGSUSED */
+static Boolean IsISO10646(Display *dpy, XFontStruct *font)
+{
+    Boolean ok;
+    int i;
+    char *regname;
+    Atom registry;
+    XFontProp *xfp;
+
+    ok = False;
+    registry = XInternAtom(dpy, "CHARSET_REGISTRY", False);
+
+    for (i = 0, xfp = font->properties;
+        ok == False && i < font->n_properties; xfp++, i++) {
+       if (xfp->name == registry) {
+           regname = XGetAtomName(dpy, (Atom) xfp->card32);
+           if (strcmp(regname, "ISO10646") == 0 ||
+               strcmp(regname, "iso10646") == 0)
+             ok = True;
+           XFree(regname);
+       }
+    }
+    return ok;
+}
+
+/* ARGSUSED */
+void SetCurrentFont(XtPointer closure)
+{
+    int f;
+    Boolean *b;
+
+    if (numFonts == 0) {
+       SetNoFonts();
+       return;
+    }
+    for (f = numFonts, b = fontInSet; f; f--, b++) *b = True;
+
+    {
+       int bytesLeft = currentFontNameSize;
+       int pos = 0;
+
+       for (f = 0; f < FIELD_COUNT; f++) {
+           int len, i;
+           String str;
+
+           currentFontNameString[pos++] = DELIM;
+           if ((i = currentFont.value_index[f]) != -1) {
+               FieldValue *val = &fieldValues[f]->value[i];
+               if ((str = val->string))
+                   len = strlen(str);
+               else {
+                   str = "";
+                   len = 0;
+               }
+               MarkInvalidFonts(fontInSet, val);
+           } else {
+               str = "*";
+               len = 1;
+           }
+           if (len+1 > --bytesLeft) {
+               currentFontNameString = (String)
+                   XtRealloc(currentFontNameString, currentFontNameSize+=128);
+               bytesLeft += 128;
+           }
+           strcpy( &currentFontNameString[pos], str );
+           pos += len;
+           bytesLeft -= len;
+       }
+    }
+    {
+       Arg args[1];
+       XtSetArg( args[0], XtNlabel, currentFontNameString );
+       XtSetValues( currentFontName, args, ONE );
+    }
+    matchingFontCount = 0;
+    for (f = numFonts, b = fontInSet; f; f--, b++) {
+       if (*b) matchingFontCount++;
+    }
+
+    SetCurrentFontCount();
+
+    {
+#ifdef USE_TEXT_WIDGET
+       Widget mapWidget = XtParent(sampleText);
+#else
+       Widget mapWidget = sampleText;
+#endif
+       Display *dpy = XtDisplay(mapWidget);
+       XFontStruct *font = XLoadQueryFont(dpy, currentFontNameString);
+       String sample_text;
+       if (font == NULL)
+           XtUnmapWidget(mapWidget);
+       else {
+           int nargs = 1;
+           Arg args[3];
+           int encoding;
+           if (font->min_byte1 || font->max_byte1) {
+               if (IsISO10646(dpy, font) == True) {
+                   encoding = XawTextEncodingUCS;
+                   sample_text = AppRes.sample_textUCS;
+               } else {
+                   encoding = XawTextEncodingChar2b;
+                   sample_text = AppRes.sample_text16;
+               }
+           } else {
+               encoding = XawTextEncoding8bit;
+               sample_text = AppRes.sample_text;
+           }
+           XtSetArg( args[0], XtNfont, font );
+           if (encoding != textEncoding) {
+               XtSetArg(args[1], XtNencoding, encoding);
+               XtSetArg(args[2], XtNlabel, sample_text);
+               textEncoding = encoding;
+               nargs = 3;
+           }
+           XtSetValues( sampleText, args, nargs );
+           XtMapWidget(mapWidget);
+           if (sampleFont) XFreeFont( dpy, sampleFont );
+           sampleFont = font;
+           OwnSelection( sampleText, (XtPointer)False, (XtPointer)True );
+       }
+       FlushXqueue(dpy);
+    }
+}
+
+
+static void MarkInvalidFonts(Boolean *set, FieldValue *val)
+{
+    int fi = 0, vi;
+    int *fp = val->font;
+    for (vi = val->count; vi; vi--, fp++) {
+       while (fi < *fp) {
+           set[fi] = False;
+           fi++;
+       }
+       fi++;
+    }
+    while (fi < numFonts) {
+       set[fi] = False;
+       fi++;
+    }
+}
+
+
+static void EnableRemainingItems(ValidateAction current_field_action)
+{
+    if (matchingFontCount == 0 || matchingFontCount == numFonts) {
+       if (anyDisabled) {
+           int field;
+           for (field = 0; field < FIELD_COUNT; field++) {
+               EnableAllItems(field);
+           }
+           anyDisabled = False;
+       }
+    }
+    else {
+       int field;
+       for (field = 0; field < FIELD_COUNT; field++) {
+           FieldValue *value = fieldValues[field]->value;
+           int count;
+           if (current_field_action == SkipCurrentField &&
+               field == choiceList->value->field)
+               continue;
+           for (count = fieldValues[field]->count; count; count--, value++) {
+               int *fp = value->font;
+               int fontCount;
+               for (fontCount = value->count; fontCount; fontCount--, fp++) {
+                   if (fontInSet[*fp]) {
+                       value->enable = True;
+                       goto NextValue;
+                   }
+               }
+               value->enable = False;
+             NextValue:;
+           }
+       }
+       anyDisabled = True;
+    }
+    enabledMenuIndex = -1;
+    {
+       int f;
+       for (f = 0; f < FIELD_COUNT; f++)
+           ScheduleWork(EnableMenu, (XtPointer)(long)f, BACKGROUND);
+    }
+}
+
+
+static void EnableAllItems(int field)
+{
+    FieldValue *value = fieldValues[field]->value;
+    int count;
+    for (count = fieldValues[field]->count; count; count--, value++) {
+       value->enable = True;
+    }
+}
+
+
+/* ARGSUSED */
+void SelectField(Widget w, XtPointer closure, XtPointer callData)
+{
+    int field = (long)closure;
+    FieldValue *values = fieldValues[field]->value;
+    int count = fieldValues[field]->count;
+    printf( "field %d:\n", field );
+    while (count--) {
+       printf( " %s: %d fonts\n", values->string, values->count );
+       values++;
+    }
+    printf( "\n" );
+}
+
+
+/* When 2 out of 3 y-related scalable fields are set, we need to restrict
+ * the third set to only match on exact matches, that is, ignore the
+ * matching to scalable fonts.  Because choosing a random third value
+ * will almost always produce an illegal font name, and it isn't worth
+ * trying to compute which choices might be legal to the font scaler.
+ */
+static void DisableScaled(int f, int f1, int f2)
+{
+    int i, j;
+    FieldValue *v;
+    int *font;
+
+    for (i = fieldValues[f]->count, v = fieldValues[f]->value; --i >= 0; v++) {
+       if (!v->enable || !v->string || !strcmp(v->string, "0"))
+           continue;
+       for (j = v->count, font = v->font; --j >= 0; font++) {
+           if (fontInSet[*font] &&
+               fonts[*font].value_index[f1] == currentFont.value_index[f1] &&
+               fonts[*font].value_index[f2] == currentFont.value_index[f2])
+               break;
+       }
+       if (j < 0) {
+           v->enable = False;
+           XtSetSensitive(v->menu_item, False);
+       }
+    }
+}
+
+/* ARGSUSED */
+void EnableOtherValues(Widget w, XtPointer closure, XtPointer callData)
+{
+    int field = (long)closure;
+    Boolean *font_in_set = (Boolean*)XtMalloc(numFonts*sizeof(Boolean));
+    Boolean *b;
+    int f, count;
+
+    FinishWork();
+    for (f = numFonts, b = font_in_set; f; f--, b++) *b = True;
+    for (f = 0; f < FIELD_COUNT; f++) {
+       int i;
+       if (f != field && (i = currentFont.value_index[f]) != -1) {
+           MarkInvalidFonts( font_in_set, &fieldValues[f]->value[i] );
+       }
+    }
+    if (scaledFonts)
+    {
+       /* Check for 2 out of 3 scalable y fields being set */
+       char *str;
+       Bool specificPxl, specificPt, specificY;
+
+       f = currentFont.value_index[6];
+       specificPxl = (f >= 0 &&
+                      (str = fieldValues[6]->value[f].string) &&
+                      strcmp(str, "0"));
+       f = currentFont.value_index[7];
+       specificPt = (f >= 0 &&
+                     (str = fieldValues[7]->value[f].string) &&
+                     strcmp(str, "0"));
+       f = currentFont.value_index[9];
+       specificY = (f >= 0 &&
+                    (str = fieldValues[9]->value[f].string) &&
+                    strcmp(str, "0"));
+       if (specificPt && specificY)
+           DisableScaled(6, 7, 9);
+       if (specificPxl && specificY)
+           DisableScaled(7, 6, 9);
+       if (specificPxl && specificPt)
+           DisableScaled(9, 6, 7);
+    }
+    count = 0;
+    for (f = numFonts, b = font_in_set; f; f--, b++) {
+       if (*b) count++;
+    }
+    if (count != matchingFontCount) {
+       Boolean *sp = fontInSet;
+       FieldValueList *fieldValue = fieldValues[field];
+       for (b = font_in_set, f = 0; f < numFonts; f++, b++, sp++) {
+           if (*b != *sp) {
+               int i = fonts[f].value_index[field];
+               FieldValue *val = &fieldValue->value[i];
+               val->enable = True;
+               XtSetSensitive(val->menu_item, True);
+               if (++count == matchingFontCount) break;
+           }
+       }
+    }
+    XtFree((char *)font_in_set);
+    if (enabledMenuIndex < field)
+       EnableMenu((XtPointer)(long)field);
+}
+
+
+void EnableMenu(XtPointer closure)
+{
+    int field = (long)closure;
+    FieldValue *val = fieldValues[field]->value;
+    int f;
+    Widget *managed = NULL, *pManaged = NULL;
+    Widget *unmanaged = NULL, *pUnmanaged = NULL;
+    Boolean showUnselectable = fieldValues[field]->show_unselectable;
+
+    for (f = fieldValues[field]->count; f; f--, val++) {
+       if (showUnselectable) {
+           if (val->enable != XtIsSensitive(val->menu_item))
+               XtSetSensitive(val->menu_item, val->enable);
+       }
+       else {
+           if (val->enable != XtIsManaged(val->menu_item)) {
+               if (val->enable) {
+                   if (managed == NULL) {
+                       managed = (Widget*)
+                           XtMalloc(fieldValues[field]->count*sizeof(Widget));
+                       pManaged = managed;
+                   }
+                   *pManaged++ = val->menu_item;
+               }
+               else {
+                   if (unmanaged == NULL) {
+                       unmanaged = (Widget*)
+                           XtMalloc(fieldValues[field]->count*sizeof(Widget));
+                       pUnmanaged = unmanaged;
+                   }
+                   *pUnmanaged++ = val->menu_item;
+               }
+           }
+       }
+    }
+    if (pManaged != managed) {
+       XtManageChildren(managed, pManaged - managed);
+       XtFree((char *) managed);
+    }
+    if (pUnmanaged != unmanaged) {
+       XtUnmanageChildren(unmanaged, pUnmanaged - unmanaged);
+       XtFree((char *) unmanaged);
+    }
+    enabledMenuIndex = field;
+}
+
+
+static void FlushXqueue(Display *dpy)
+{
+    XSync(dpy, False);
+    while (XtAppPending(appCtx)) XtAppProcessEvent(appCtx, XtIMAll);
+}
+
+
+/* ARGSUSED */
+void Quit(Widget w, XtPointer closure, XtPointer callData)
+{
+    XtCloseDisplay(XtDisplay(w));
+    if (AppRes.print_on_quit) printf( "%s", currentFontNameString );
+    exit(0);
+}
+
+
+static Boolean
+ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
+                XtPointer *value, unsigned long *length, int *format)
+{
+    /* XmuConvertStandardSelection will use the second parameter only when
+     * converting to the target TIMESTAMP.  However, it will never be
+     * called upon to perform this conversion, because Xt will handle it
+     * internally.  CurrentTime will never be used.
+     */
+    if (XmuConvertStandardSelection(w, CurrentTime, selection, target, type,
+                                   (XPointer *) value, length, format))
+       return True;
+
+    if (*target == XA_STRING) {
+       *type = XA_STRING;
+       *value = currentFontNameString;
+       *length = strlen(*value);
+       *format = 8;
+       return True;
+    }
+    else {
+       return False;
+    }
+}
+
+static AtomPtr _XA_PRIMARY_FONT = NULL;
+#define XA_PRIMARY_FONT XmuInternAtom(XtDisplay(w),_XA_PRIMARY_FONT)
+
+/* ARGSUSED */
+static void LoseSelection(Widget w, Atom *selection)
+{
+    Arg args[1];
+    XtSetArg( args[0], XtNstate, False );
+    XtSetValues( w, args, ONE );
+    if (*selection == XA_PRIMARY_FONT) {
+       XtSetSensitive(currentFontName, False);
+    }
+}
+
+
+/* ARGSUSED */
+static void DoneSelection(Widget w, Atom *selection, Atom *target)
+{
+    /* do nothing */
+}
+
+
+/* ARGSUSED */
+void OwnSelection(Widget w, XtPointer closure, XtPointer callData)
+{
+    Time time = XtLastTimestampProcessed(XtDisplay(w));
+    Boolean primary = (Boolean) (long) closure;
+    Boolean own = (Boolean) (long) callData;
+
+    if (_XA_PRIMARY_FONT == NULL)
+       _XA_PRIMARY_FONT = XmuMakeAtom("PRIMARY_FONT");
+
+    if (own) {
+       XtOwnSelection( w, XA_PRIMARY_FONT, time,
+                       ConvertSelection, LoseSelection, DoneSelection );
+       if (primary)
+           XtOwnSelection( w, XA_PRIMARY, time,
+                          ConvertSelection, LoseSelection, DoneSelection );
+       if (!XtIsSensitive(currentFontName)) {
+           XtSetSensitive(currentFontName, True);
+       }
+    }
+    else {
+       XtDisownSelection(w, XA_PRIMARY_FONT, time);
+       if (primary)
+           XtDisownSelection(w, XA_PRIMARY, time);
+       XtSetSensitive(currentFontName, False);
+    }
+}
+
+/*ARGSUSED*/
+void
+QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    exit (0);
+}
diff --git a/xfontsel/xfontsel.man b/xfontsel/xfontsel.man
new file mode 100644 (file)
index 0000000..40f9cbb
--- /dev/null
@@ -0,0 +1,229 @@
+.\" $XConsortium: xfontsel.man,v 1.14 94/06/10 14:39:10 gildea Exp $
+.\" Copyright (c) 1994  X Consortium
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\" 
+.\" Except as contained in this notice, the name of the X Consortium shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from the X Consortium.
+.\"
+.\" $XFree86: xc/programs/xfontsel/xfontsel.man,v 1.3 2001/01/27 18:21:12 dawes Exp $
+.de EX         \"Begin example
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
+.TH XFONTSEL 1 __xorgversion__
+.SH NAME
+xfontsel \- point and click selection of X11 font names
+.SH SYNTAX
+.PP
+\fBxfontsel\fP [-\fItoolkitoption\fP ...]
+[\fB-pattern \fIfontname\fP]
+[\fB-print\fP]
+[\fB-sample \fItext\fP]
+[\fB-sample16 \fItext16\fP]
+[\fB-sampleUCS \fItextUCS\fP]
+[\fB-scaled\fP]
+.PP
+.SH DESCRIPTION
+.PP
+The \fIxfontsel\fP application provides a simple way to display
+the fonts known to your X server, examine samples of each, and
+retrieve the X Logical Font Description ("XLFD") full name for a font.
+.PP
+If \fB-pattern\fP is not specified, all fonts with XLFD 14-part
+names will be selectable.  To work with only a subset of the
+fonts, specify \fB-pattern\fP followed by a partially or fully
+qualified font name; e.g., ``-pattern *medium*'' will
+select that subset of fonts which contain the string ``medium''
+somewhere in their font name.  Be careful about escaping
+wildcard characters in your shell.
+.PP
+If \fB-print\fP is specified on the command line the selected
+font specifier will be written to standard output when the \fIquit\fP
+button is activated.  Regardless of whether or not \fB-print\fP was
+specified, the font specifier may be made the PRIMARY (text)
+selection by activating the \fIselect\fP button.
+.PP
+The \fB-sample\fP option specifies the sample text to be used to
+display the selected font if the font is linearly indexed,
+overriding the default.
+.PP
+The \fB-sample16\fP option specifies the sample text to be used to
+display the selected font if the font is matrix encoded,
+overriding the default.
+.PP
+The \fB-sampleUCS\fP option specifies the sample text encoded in the UTF-8
+form to be used to display the selected font if the font has a
+CHARSET_REGISTRY of ISO10646, overriding the default.
+.PP
+The \fB-scaled\fP option enables the ability to select scaled fonts
+at arbitrary pixel or point sizes.
+.PP
+.SH INTERACTIONS
+.PP
+Clicking any pointer button in one of the XLFD field names will pop up
+a menu of the currently-known possibilities for that field.  If
+previous choices of other fields were made, only values
+for fonts which matched the previously selected fields will be
+selectable; to make other values selectable, you must deselect
+some other field(s) by choosing the ``*'' entry in that field.
+Unselectable values may be omitted from the menu entirely as
+a configuration option; see the \fBShowUnselectable\fP resource, below.
+Whenever any change is made to a field value, \fIxfontsel\fP will
+assert ownership of the PRIMARY_FONT selection.  Other applications
+(see, e.g., \fIxterm\fP) may then retrieve the selected font specification.
+.PP
+Scalable fonts come back from the server with zero for the pixel size,
+point size, and average width fields.  Selecting a font name with a
+zero in these positions results in an implementation-dependent size.
+Any pixel or point size can be selected to scale the font to a particular
+size.  Any average width can be selected to anamorphically scale the font
+(although you may find this challenging given the size of the average
+width menu).
+.PP
+Clicking the left pointer button in the \fIselect\fP widget will
+cause the currently selected font name to become the PRIMARY text
+selection as well as the PRIMARY_FONT selection.
+This then allows you to paste the string into other
+applications.  The \fBselect\fP button remains
+highlighted to remind you of this fact, and de-highlights when
+some other application takes the PRIMARY selection away.  The
+\fIselect\fP widget is a toggle; pressing it when it is highlighted
+will cause \fIxfontsel\fP to release the selection ownership and
+de-highlight the widget.  Activating the \fIselect\fP widget twice
+is the only way to cause \fIxfontsel\fP to release the
+PRIMARY_FONT selection.
+.PP
+.SH RESOURCES
+.PP
+The application class is \fBXFontSel\fP.  Most of the user-interface
+is configured in the app-defaults file; if this file is missing
+a warning message will be printed to standard output and the
+resulting window will be nearly incomprehensible.
+.PP
+Most of the significant parts of the widget hierarchy are documented
+in
+.IR __apploaddir__/XFontSel ,
+.PP
+Application specific resources:
+.PP
+.TP 8
+.B "cursor (\fPclass\fB Cursor)"
+Specifies the cursor for the application window.
+.TP 8
+.B "pattern (\fPclass\fB Pattern)"
+Specifies the font name pattern for selecting a subset of
+available fonts.  Equivalent to the \fB-pattern\fP option.
+Most useful patterns will contain at least one field
+delimiter; e.g. ``*-m-*'' for monospaced fonts.
+.TP 8
+.B "pixelSizeList (\fPclass\fB PixelSizeList)"
+Specifies a list of pixel sizes to add to the pixel size menu,
+so that scalable fonts can be selected at those pixel sizes.
+The default pixelSizeList contains 7, 30, 40, 50, and 60.
+.TP 8
+.B "pointSizeList (\fPclass\fB PointSizeList)"
+Specifies a list of point sizes (in units of tenths of points) to add to
+the point size menu, so that scalable fonts can be selected at those
+point sizes.  The default pointSizeList contains 250, 300, 350, and 400.
+.TP 8
+.B "printOnQuit (\fPclass\fB PrintOnQuit)"
+If \fITrue\fP the currently selected font name is printed
+to standard output when the quit button is activated.
+Equivalent to the \fB-print\fP option.
+.TP 8
+.B "sampleText (\fPclass\fB Text)"
+The sample 1-byte text to use for linearly indexed fonts.
+Each glyph index is a single byte, with newline separating lines.
+.TP 8
+.B "sampleText16 (\fPclass\fB Text16)"
+The sample 2-byte text to use for matrix-encoded fonts.
+Each glyph index is two bytes, with a 1-byte newline separating lines.
+.TP 8
+.B "scaledFonts (\fPclass\fB ScaledFonts)"
+If \fITrue\fP then selection of arbitrary pixel and point sizes for
+scalable fonts is enabled.
+.PP
+Widget specific resources:
+.PP
+.TP 8
+.B "showUnselectable (\fPclass\fB ShowUnselectable)"
+Specifies, for each field menu, whether or not to show values that
+are not currently selectable, based upon previous field selections.
+If shown, the unselectable values are clearly identified as such
+and do not highlight when the pointer is moved down the menu.
+The full name of this resource is \fBfieldN.menu.options.showUnselectable\fP,
+class \fBMenuButton.SimpleMenu.Options.ShowUnselectable\fP;
+where N is replaced with the field
+number (starting with the left-most field numbered 0).
+The default is True for all but field 11 (average width of characters
+in font) and False for field 11.  If you never want to see
+unselectable entries, '*menu.options.showUnselectable:False' is
+a reasonable thing to specify in a resource file.
+.PP
+.SH FILES
+.PP
+ $XFILESEARCHPATH/XFontSel
+.PP
+.SH SEE ALSO
+xrdb(1), xfd(1)
+.PP
+.SH BUGS
+.PP
+Sufficiently ambiguous patterns can be misinterpreted and lead to an
+initial selection string which may not correspond to what the user intended
+and which may cause the initial sample text output to fail to match
+the proffered string.  Selecting any new field value will correct the
+sample output, though possibly resulting in no matching font.
+.PP
+Should be able to return a FONT for the PRIMARY selection, not
+just a STRING.
+.PP
+Any change in a field value will cause \fIxfontsel\fP to assert
+ownership of the PRIMARY_FONT selection.  Perhaps this should
+be parameterized.
+.PP
+When running on a slow machine, it is possible for the user to
+request a field menu before the font names have been completely
+parsed.  An error message indicating a missing menu is printed
+to stderr but otherwise nothing bad (or good) happens.
+.PP
+The average-width menu is too large to be useful.
+.SH COPYRIGHT
+Copyright 1989, 1991,  X Consortium
+.PP
+See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
+.SH AUTHOR
+.PP
+Ralph R. Swick, Digital Equipment Corporation/MIT Project Athena
+.PP
+Mark Leisher <mleisher@crl.nmsu.edu> added the support for the UTF-8 sample
+text.
diff --git a/xgc/AUTHORS b/xgc/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xgc/Bugs b/xgc/Bugs
deleted file mode 100644 (file)
index c8ed6f2..0000000
--- a/xgc/Bugs
+++ /dev/null
@@ -1,11 +0,0 @@
-Bugs found with xbench
-----------------------
-Lines, FillStyle Solid, Planemask 0, LineWidth 0 - draws lines anyways.
-  other FillStyles work correctly.
-Rectangles - same problem.
-Filled Rectangles, FillStyle other than OpaqueStippled, Planemask 0 - draws
-  rectangles anyways.
-  OpaqueStippled works fine.
-Dashed Lines - sometimes hangs.
-  only happens when lots of lines/short dashes/long lines.
-Lines, Function equiv, LineWidth > 1 - copies instead of equiving.
diff --git a/xgc/COPYING b/xgc/COPYING
deleted file mode 100644 (file)
index 1d7ad39..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, and/or sell copies of the Software, and to permit persons
-to whom the Software is furnished to do so, provided that the above
-copyright notice(s) and this permission notice appear in all copies of
-the Software and that both the above copyright notice(s) and this
-permission notice appear in supporting documentation.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder
-shall not be used in advertising or otherwise to promote the sale, use
-or other dealings in this Software without prior written authorization
-of the copyright holder.
-
diff --git a/xgc/ChangeLog b/xgc/ChangeLog
deleted file mode 100644 (file)
index 9df271c..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-commit e3247097e61ddd8432921f8d52b73f09f6bf23c4
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Nov 10 22:55:23 2009 -0800
-
-    xgc 1.0.2
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 543917eccecd94261ff3cde8f617ca2801fefcd6
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Nov 10 22:54:08 2009 -0800
-
-    Fill in COPYING with notices from main.c & xgc.man
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit fab6c10f50649961059607ff6a43981d72e28c72
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Nov 10 22:25:32 2009 -0800
-
-    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 90877de1d293d9f0ec47e588a518327b43536c6e
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Nov 10 22:21:23 2009 -0800
-
-    Include more detailed xgc man page description from Solaris
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit d1abdda8c4e84b7df4927260753a8f47d027c6be
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Oct 1 14:54:24 2009 -0700
-
-    Add README with pointers to mailing lists, bugzilla, & git
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 038f559845ac8b8b45f5a53537b011e169d45f59
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Wed Jan 14 19:02:22 2009 -0200
-
-    Xgc now in Technicolor
-    
-      Added a simple Xgc-color resources file.
-      Corrected a bug that would prevent it from showing 100 in percent
-    label, due to using a buffer of 3 bytes.
-      Hardcode "test area" foreground&background to black&white.
-      Remove a few hardcoded resource values to better work with the new
-    resources file (some settings may require moving data from Xgc-color
-    to Xgc, if you don't have a color display).
-
-commit cc62903f999ba0c5076861888106365e3561f775
-Author: Jens Stroebel <dr-xorg@bcsoft.de>
-Date:   Wed Jan 14 06:24:16 2009 -0800
-
-    correcting typo w. regards to XGC_CFLAGS
-    
-    Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
-
-commit 04b994830dfebfed9311f1c3714620ebbdc1f75a
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Jan 13 15:55:19 2009 -0200
-
-    Ansification and compile warning fixes.
-    
-      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
-    make distcheck and most gcc 4.3 and sparse warnings.
-
-commit d662fac7b6541571ab9852f4e0290d48f0e97561
-Author: Peter Breitenlohner <peb@mppmu.mpg.de>
-Date:   Mon Nov 10 20:08:37 2008 +0100
-
-    enable VPATH build, reorganize app default files
-
-commit f964031d5f702ad17c76f7e7b1ab91efd56e0f01
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Wed Aug 20 10:32:51 2008 -0400
-
-    xaw8 is gone, use xaw7
-
-commit 16f631981143cdac06f3b7125c8ef2fb45962970
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Thu Mar 27 20:08:02 2008 -0700
-
-    Build fix for file systems that are not case sensitive
-
-commit a269f72e27d1bc368b6ecc5bc076f6f4e08bc1c2
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jan 22 16:02:26 2008 -0800
-
-    Change xgc_CFLAGS to AM_CFLAGS to make automake-1.10 happier
-    
-    Makefile.am:29: compiling `choice.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
-
-commit 8b87daa805cd684eb765872a73c6981eb90fcf9f
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Tue Jan 22 16:01:11 2008 -0800
-
-    Bug 14185: MAINTAINERCLEANFILES multiply defined in Makefile.am
-    
-    <http://bugs.freedesktop.org/show_bug.cgi?id=14185>
-
-commit fa7c9e5a92664b214f2787d07ce8737df75e8e85
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Dec 6 16:37:17 2007 -0500
-
-    Replace static ChangeLog with dist-hook to generate from git log
-
-commit 39311d4f5de1648379dbb0d954090ff6ee82f80f
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Mon Sep 3 05:51:25 2007 -0400
-
-    Add *~ to .gitignore to skip patch/emacs droppings
-
-commit a45aff7c0231080087f15707a0628f71cef60adf
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Aug 23 19:24:51 2007 -0400
-
-    Rename .cvsignore to .gitignore
-
-commit c31f20376c03da9395d6ab4bd46423ffe55d15df
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:50 2005 +0000
-
-    Update package version for X11R7 release.
-
-commit 3371db03f5ee610d5b4538b3c8206775ca8c4aea
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:44 2005 +0000
-
-    Stub COPYING files
-
-commit 225fada87719040b7da4a4a4cf7651704d5f4203
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:07 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit 62a334ff8c8ad8aac1800096a65885cadc0e4857
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 7 16:18:00 2005 +0000
-
-    Change to use the app-defaults default dir configured in libXt.
-
-commit 676cb92b59b998681eec1f94e549b131357f5f4a
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:48:22 2005 +0000
-
-    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-commit eda7026e7b05b60d028acac0adaa95fff5136cf5
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:49:24 2005 +0000
-
-    Update package version number for X11R7 RC3 release.
-
-commit 5dfb2831c12bfbeff3f8f54f27f4d8f0e35c3134
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:42 2005 +0000
-
-    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
-        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
-
-commit ac983da50c30042cd3c408b8fb6125d20009b274
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:35:01 2005 +0000
-
-    Another pass at .cvsignores for apps.
-
-commit 24ade0e366b9dd681c8956005853dd86d14e9623
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:53 2005 +0000
-
-    Add/improve .cvsignore files for apps.
-
-commit 9e1414070bef650f18e326fcd1427f8e2b9c7d7d
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:54 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit 677a1f2616a47bec64bddf2d7424551dbf9bcae3
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Oct 18 00:32:54 2005 +0000
-
-    Change default install dir for app-default files from
-        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
-        the monolith & allow localization
-
-commit e76fafcfd736eb3a0ee87ad5ba9b51a5e8e8649c
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:22 2005 +0000
-
-    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
-        work better with BSD make
-
-commit 68cf52e97a8f3051eb515847f6274998af4e8037
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Oct 15 19:22:35 2005 +0000
-
-    Have generated files be cleaned by maintainer in order to pass
-        check-tarball test.
-
-commit 64d7716266320d32acd3c804060a587623e4f054
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:45 2005 +0000
-
-    Use sed to fill in variables in man page
-
-commit da90b92a612915f9d7053015025785e338ee7a0c
-Author: Keith Packard <keithp@keithp.com>
-Date:   Tue Aug 2 18:10:32 2005 +0000
-
-    Mark generated files as BUILT_SOURCES and CLEANFILES to ensure they are
-        regenerated after 'make clean' and to make parallel builds work right.
-
-commit dea36bb8cdeed1629110cbc407fdb18482d59651
-Author: Keith Packard <keithp@keithp.com>
-Date:   Mon Aug 1 22:20:34 2005 +0000
-
-    dont initialize yylineno in case the lex variant defines it separately (as
-        flex does)
-
-commit ead3a2dc87122b8d6af79efe719362e2d7d4d697
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Aug 1 20:25:30 2005 +0000
-
-    Install man pages to section 1 instead of section m (Patch from Donnie
-        Berkholz)
-
-commit 97cfe91fdcc59406eba5fb2f085362593ea84e72
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 30 21:07:26 2005 +0000
-
-    Add prototypes of Xalloc/free functions.
-    Export ImUtil.h to match modular tree install.
-    Define SVR4 to 1 to avoid warning about redefining to different values.
-    Include missing headers to clear more compiler warnings.
-
-commit c6e2c72275eeb266abecc5273fb3257f45e71687
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:34 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit afa5fe1308479c6605c59922b1c61183f259a154
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Jul 26 15:44:02 2005 +0000
-
-    Replace more GNU make-ism's with more portable macros
-
-commit 18b73d71673d73bfb03b238bc20e50ebf2ae48e8
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sat Jul 23 16:33:41 2005 +0000
-
-    Fix GNU-make only app-defaults rule
-
-commit e32351b3b39517f94e976062f91403a154488359
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Jul 20 19:31:57 2005 +0000
-
-    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
-        configure cache, you cache it, and the cached value is probably wrong.
-
-commit 23e06fb205c2494dc8c44e976e27ca0a30c30ed2
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Thu Jul 14 22:40:16 2005 +0000
-
-    Add _BSD_SOURCE to lots of applications - patch from Stefan Dirsch
-
-commit 07ed043059d5fc7e8d694f6814eb1ba63946d646
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Tue Jul 5 21:11:37 2005 +0000
-
-    Add build system for xgc
-
-commit ace744607cc888bafb3ba487a11785fd46b65818
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:48 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit 2d5c3705b18672d88db46343c3a55b1768aaeaee
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:35:24 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit ce3e739625e75b9caf59f0a2e0290e3528f0cc8a
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:13:08 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit 8f8ef8a10885b51d38ef4aad7b36af5897f90e7b
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:24 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit 40d4328f4b4e1a70a227d2359532a667d79cee1c
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:24:08 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit c059776a3a8a7c760799d1a55c1a130c2179ecc9
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:29:13 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit e3dfd7a6398174ae8db6a1c0d5e5590d1dabcf31
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:22 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 82a6e01af6c39e22855495b912c23efddfb17224
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:22 2003 +0000
-
-    Initial revision
diff --git a/xgc/INSTALL b/xgc/INSTALL
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xgc/NEWS b/xgc/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xgc/Written/FilledRects b/xgc/Written/FilledRects
deleted file mode 100644 (file)
index d72849e..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-General concerns
-----------------
-
-Machine type
-Display type
-Display on different machine?
-Visual
-Clipping
-Obscured by cursor
-Background tiling
-The whole software vs. hardware bit: computational overhead vs. time spent
-  drawing
-Planemask
-
-PolyFillRectangle
------------------
-Use same test as PolyRectangle?
-Perhaps give FillPoly some of these too, see if it special cases them.
-Fill Rectangle vs. Fill Poly for same size areas would be an
-  interesting comparison.
-
-Things to look for:
-       All it's really doing is setting or unsetting planes.
-       When a whole word is filled, it should be quite fast (just
-       setting it to 0 or ~0).
-       Otherwise, the speed of a single rectangle should be about
-       equal to its size.
-
-Data: 
-       Pixels per second.
-       Average size of rectangle.
-
-GC fields: 
-       function:
-       Tiling: likely to be a lot slower, although for whole words
-               you're just setting it to a certain value, rather than 0.
-               (You also have to look at the y value).  Strange width
-               tiles (are these allowed?) are likely to be real bad.
-       Stippling: also slower - I'm not sure whether or not this would
-               be slower than tiling.  This probably has a greater
-               chance of being done in hardware.
-
-       plane-mask:
-               plane of 0 would be real fast, since it doesn't modify
-               anything.  plane of ~0 should be fast, since it doesn't
-               have to think.  Anything else would probably be
-               proportional to the number of planes...
-
-       subwindow-mode: I don't believe it matters.
-
-       clip-x-origin
-       clip-y-origin
-       clip-mask:
-               Clipping in general should probably increase speed rather
-               than decrease it, unless the clipping region is strange.
-               Possible increase in speed because less change to the
-               display is being made; possible decrease in speed because
-               more thought has to be given to what is drawn or not.
-               Software vs. hardware, I suppose.
-
-Possibly 
-       foreground: similar to plane-mask in its effect, I would think.
-
-       tile: "nice" width tiles would probably be better.  A width which
-               is not a divisor of the length of a word would be
-               significantly slower.  A width the size of a word is
-               probably perfect.  The actual contents of the tile
-               probably don't matter: Any code to check for tiles
-               which could be "simplified" would probably take too much
-               time to execute to do any good.
-
-       stipple: like tile
-
-Other:
-       alignment on word bounaries: fastest when one is changing whole
-       words at a time.  That way, you're just setting whole words to
-       0 or ~0 and not doing any computation.  A 32x1 rectangle should
-       be much faster than a 1x32 rectangle.
-
----------
-Things to put in test:
-
-Check all alignments.
-Perhaps some sort of comparison between thin rectangles oriented
-  horizontally and oriented vertically.
-Small rectangles, big rectangles: compare pixels/second for each.
-  Good way of computing overhead costs.
-
----------
-test
-(1-32)x32 at all 32 bits in a word.
-(97-128)x32
-(97-128)x128
diff --git a/xgc/Written/Interface b/xgc/Written/Interface
deleted file mode 100644 (file)
index 7b40562..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-The command buttons at the top -
-
-  Benchmark Options, Graphics Options, etc. 
-
-should just bring up the window, not force you to use it.
-
-1) It is nicer to the person who might want to have both up at once.
-
-2) It is nicer to the programmer who doesn't know how to focus events.
diff --git a/xgc/Written/Jim b/xgc/Written/Jim
deleted file mode 100644 (file)
index e370cd5..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-The Commands menu should contain the following items:
-
-    Run                                                [the selected benchmark]
-    Benchmark Options.../Hide Benchmark Options                        [toggle]
-    Graphics Options.../Hide Graphics Options                          [toggle]
-    Describe Test.../Hide Test Description                             [toggle]
-    Start Recording/Stop Recording                                     [toggle]
-    Playback                        [pop up a dialogue box asking for filename]
-    --------
-    Quit                   [pop up a dialogue box asking if we are really done]
-
-
-The Benchmark Options sheet should contain the information shown below.  The
-list of graphics primitives was derived from the "Definition of the Porting
-Layer for the X v11 Sample Server" by Angebranndt et al. and from the Protocol
-document.
-
-
-                              Benchmark Options
-
-
-            +-----------------------+-----------------------+
- Test       |      Copy Area        |      Copy Plane       |
-            +-----------------------+-----------------------+
-            |        Points         |        Lines          |
-            +-----------------------+-----------------------+
-            |       Segments        |      Rectangles       |
-            +-----------------------+-----------------------+
-            |         Arcs          |    Filled Polygons    |
-            +-----------------------+-----------------------+
-            |   Filled Rectangles   |      Filled Arcs      |
-            +-----------------------+-----------------------+
-            |       Put Image       |       Get Image       |
-            +-----------------------+-----------------------+
-            |        Text 8         |      Image Text 8     |
-            +-----------------------+-----------------------+
-            |        Text 16        |      Image Text 16    |
-            +-----------------------+-----------------------+
-
-            +---------+
- Iterations |   10000 |
-            +---------+
-
-            +----+-----+                         +----+-----+
- Record     | on | off |          Describe Test  | on | off |
-            +----+-----+                         +----+-----+
-
-            +-----------------------------------------------+
- Filename   |                                  ./xbench.log |
-            +-----------------------------------------------+
-
-
-*******************************************************************************
-
-
-The Graphics Options area would contain the following entries:
-
-    Function - one-of { clear, and, andReverse, copy, andInverted, noop, xor, 
-                       or, nor, equiv, invert, orReverse, copyInverted, 
-                       orInverted, nand, set }
-    PlaneMask - unsigned value or many-of-n representing bits
-    Foreground - unsigned value in range 0..2^nplanes
-    Background - unsigned value in range 0..2^nplanes
-    ForegroundColor - set rgb value of Foreground
-    BackgroundColor - set rgb value of background
-    LineWidth - unsigned number in range 0..65535
-    LineStyle - oneof { Solid, OnOffDash, DoubleDash }
-    CapStyle - one-of { NotLast, Butt, Round, Projecting }
-    JoinStyle - one-of { Miter, Round, Bevel }
-    FillStyle - one-of { Solid, Tiled, OpaqueStippled, Stippled }
-    FillRule - one-of { EvenOdd, Winding }
-    ArcMode - one-of { Chord, PieSlice }
-    # Tile - pixmap [probably not edittable in first version]
-    # Stipple - pixmap [probably not edittable in first version]
-    TileStipXOrigin - signed number in range -32768..32767
-    TileStipYOrigin - signed number in range -32768..32767
-    Font - name of font
-    ClipXOrigin - signed number in range -32768..32767
-    ClipYOrigin - signed number in range -32768..32767
-    ClipMask - one-of { None, select } [user selects by clicking in work area]
-    DashOffset - unsigned number in range -32768..32767
-    DashList - many-of-n of 8 boxes for defining dashes
-
-
-
-
-                              Graphics Options
-
-
-             +--------------+--------------+--------------+--------------+
- Function    |     clear    |      and     |  andReverse  |     copy     |
-             +--------------+--------------+--------------+--------------+
-             | andInverted  |     noop     |      xor     |      or      |
-             +--------------+--------------+--------------+--------------+
-             |      nor     |     equiv    |    invert    |   orReverse  |
-             +--------------+--------------+--------------+--------------+
-             | copyInverted |  orInverted  |     nand     |      set     |
-             +--------------+--------------+--------------+--------------+
-
-             +-----+---------+
- Colormap    | new | default |
-             +-----+---------+
-
-             +----------+                     +--------+--------+--------+
- Foreground  |        1 |    ForegroundColor  |  ffff  |  ffff  |  ffff  |
-             +----------+                     +--------+--------+--------+
-
-             +----------+                     +--------+--------+--------+
- Background  |        0 |    BackgroundColor  |  0000  |  0000  |  0000  |
-             +----------+                     +--------+--------+--------+
-
-             +------+                   +-------+-----------+------------+
- LineWidth   |    3 |        LineStyle  | Solid | OnOffDash | DoubleDash |
-             +------+                   +-------+-----------+------------+
-
-             +---------+------+-------+------------+
- CapStyle    | NotLast | Butt | Round | Projecting |
-             +---------+------+-------+------------+
-
-             +-------+-------+-------+
- JoinStyle   | Miter | Round | Bevel |
-             +-------+-------+-------+
-
-             +-------+-------+----------+----------------+
- FillStyle   | Solid | Tiled | Stippled | OpaqueStippled |
-             +-------+-------+----------+----------------+
-
-             +---------+---------+
- FillRule    | EvenOdd | Winding |
-             +---------+---------+
-
-             +-------+----------+
- ArcMode     | Chord | PieSlice |
-             +-------+----------+
-
-             +--------------+
- TStipOrigin | +####, +#### |
-             +--------------+
-
-             +-+-+-+-+-+-+-+-+                                   +-------+
- DashList    | | |X|X| | |X|X|                       DashOffset  | +#### |
-             +-+-+-+-+-+-+-+-+                                   +-------+
-
-             +----+-----+-----+-------+                         +--------+
- ClipMask    | on | off | set | clear |             PlaneMask   |  ffff  |
-             +----+-----+-----+-------+                         +--------+
-
-
-*******************************************************************************
-
-                                   Grammar
-
-
-Both to support Record/Playback (used for debugging, demonstrations, and for
-creating benchmark scripts), there needs to be a command line language that
-can be used to set all options.  Although we won't be doing anything as
-sophisticated as what is provided in many UIMS's, it would be nice to keep
-the application section of the benchmark as separate as possible from the
-user interface.
-
-    test  { CopyArea, CopyPlane, PolyPoint, PolyLine, PolySegment, 
-           PolyRectangle, PolyArc, FillPolygon, PolyFillRect, PolyFillArc,
-           PutImage, GetImage, ImageText8, PolyText8, ImageText16,
-           PolyText16 }
-       -  selects the test to be performed.
-
-    colormap  { new, default }
-       -  selects which colormap should be used for test
-
-    iterations UNSIGNEDNUMBER
-       -  specifies the number of times that the test should be run.
-
-    record BOOLEAN
-       -  indicates whether or not to record commands into the record-file.
-
-    record-file  FILENAME
-       -  specifies the name of the file into which commands are recorded.
-
-    describe  BOOLEAN
-       -  indicates whether or not a description of the test should be 
-          displayed whenever a test is selected (or when this option is
-          specified).
-
-    function  { clear, and, andReverse, copy, andInverted, noop, xor, or, nor,
-               equiv, invert, orReverse, copyInverted, orInverted, nand, set }
-       -  selects the alu function to use in the GC.
-
-    foreground UNSIGNEDNUMBER
-       -  selects the foreground pixel value to use in the GC; if a new
-          colormap is being used, the RGB value for this slot may be changed.
-
-    background UNSIGNEDNUMBER
-       -  selects the background pixel value to use in the GC; if a new
-          colormap is being used, the RGB value for this slot may be changed.
-
-    forecolor COLORNAME
-       -  specifies the RGB value or name of the color to be used for the 
-          foreground pixel, if settable.
-
-    backcolor COLORNAME
-       -  specifies the RGB value or name of the color to be used for the 
-          background pixel, if settable.
-
-    linewidth NUMBER
-       -  specifies width of lines to use in the GC.
-
-    linestyle  { Solid, OnOffDash, DoubleDash }
-       -  selects the type of lines to use in the GC.
-
-    capstyle  { NotLast, Butt, Round, Projecting }
-       -  selects the type of caps to use in the GC.
-
-    joinstyle  { Miter, Round, Bevel }
-       -  selects the type of joins to use in the GC.
-
-    fillstyle  { Solid, Tiled, Stippled, OpaqueStippled }
-       -  selects the type of fills to use in the GC.
-
-    fillrule  { EvenOdd, Winding }
-       -  selects the fill rule to be used in the GC.
-
-    arcmode  { Chord, PieSlice }
-       -  selects the type of arcs to be drawn in the GC.
-
-    tsorigin  NUMBER  NUMBER
-       -  specifies the X and Y values of the TileStippleOrigin in the GC.
-
-    dashlist  DASHPATTERN
-       -  specifies a pattern of 8 binary digits to use in the dashlist
-          in the GC; the characters are given in big-endian order such that
-          they may be read in binary to form a number between 0 and 255.
-
-    dashoffset  NUMBER
-       -  specifies the dashoffset to use in the GC.
-
-    cliporigin  NUMBER  NUMBER
-       -  specifies the X and Y values of the cliporigin in the GC.
-
-    clipmask  { on, off, set NUMBER NUMBER NUMBER NUMBER, clear }
-       -  selects a clipping mode.  If "on", then use the most recently
-          defined set of clipping rectangles; if "off", then do not do
-          any clipping but keep the clipping rectangles for future
-          reference; if "set", then add the rectangle specified by
-          the remaining numeric arguments as X1 Y1 X2 Y2 relative to the
-          cliporigin.
-
-    planemask  NUMBER
-       -  specifies the set of planes on to which graphics may be drawn
-          in the GC.
-
-    run
-       -  run the currently configured test.
-
-    quit
-       -  exit the program
diff --git a/xgc/Written/Notes b/xgc/Written/Notes
deleted file mode 100644 (file)
index 3b9f416..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-
-
-ClearArea
----------
-Basically a special case of PolyFillRect.  Put up some sort of image first
-so we can clear it away.  Try both small areas and big areas, to give
-credit to servers for optimizing small ones.
-
-Data: Pixels per second.
-      Breaking that down into large and small areas would probably not
-        be userful.
-      
-GC Fields: None.
-
-
-CopyArea
---------
-Putting up some image and then repeatedly copying from one part of it
-to another would do the right thing and could look neat if done right.
-
-We probably want to see what happens when the source area is clipped,
-as that as mentioned specifically in the protocol document.
-
-Data: Pixels per second.
-      
-GC Fields: function             (*)
-           plane-mask
-          subwindow-mode
-          graphics-exposures
-          clip-x-origin
-          clip-y-origin
-          clip-mask
-
-
-CopyPlane
----------
-Special case of CopyArea again.
-
-
-PolyPoint
----------
-Draw lots of points.
-Either start out with an image that's 50/50 black and white
-(preferred) or draw enough points that some points will get drawn at
-least twice (to test functions other than copy).
-
-Data: Points per second.
-
-GC fields: function             (*)
-           plane-mask
-           foreground
-           subwindow-mode
-           clip-x-origin
-           clip-y-origin
-          clip-mask
-
-
-PolyLine
---------
-Circular test like there is now.
-Try clipping at window boundaries?
-
-Data: Lines per second.
-      Pixels per second (is this valid - do lines that are twice as
-        long take twice as long to draw? Also, is it valid to compare
-        thin lines and fat lines?)
-GC fields: function             (*)
-           plane-mask
-           line-width           (*)
-           line-style          (*)
-           cap-style           (*)
-           join-style          (*)
-           fill-style          (*)
-           subwindow-mode
-           clip-x-origin
-           clip-y-origin
-           clip-mask
-Possibly   foreground
-           background
-           tile                        (*)
-           stipple             (*)
-           tile-stipple-x-origin
-          tile-stipple-y-origin
-          dash-offset
-          dashes               (*)
-
-
-PolySegment
------------
-Just like PolyLine but lines don't have to be connected. Crosshatching?
-
-Data: Lines per second, pixels per second(?)
-
-GC fields: function
-       plane-mask
-       line-width
-       line-style
-       cap-style
-       fill-style
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly  foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-       dash-offset
-       dashes
-
-
-PolyRectangle
--------------
-Lots of five point PolyLines.  Partly concentric ones would look nice; we
-also need overlap for testing different functions.
-
-Data: Rectangles per second.
-       Pixels per second? (divide by perimeter)
-
-GC fields: function
-       plane-mask
-       line-width
-       line-style
-       join-style
-       fill-style
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-       dash-offset
-       dashes
-
-
-PolyArc
--------
-Overlapping concentric things (ripples) would look cool.
-Is it possible to special-case circles?  Test for this?
-
-Data: Arcs per second?  If we had the same test each time this might
-        be OK.
-      Pixels per second?  Finding the length of an arc could be
-        annoying.
-
-GC fields: function
-       plane-mask
-       line-width
-       line-style
-       cap-style
-       join-style
-       fill-style
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-       dash-offset
-       dashes
-
-
-FillPoly
---------
-Use the same test as PolyLine?
-Overlapping is a must to test functions.
-Convex vs. Concave polygons.
-
-Data: Pixels per second, I guess.
-      Data for convex vs. concave could be interesting.
-
-GC fields: function
-       plane-mask
-       fill-style
-       fill-rule
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-
-
-PolyFillRectangle
------------------
-Use same test as PolyRectangle?
-Perhaps give FillPoly some of these too, see if it special cases them.
-Fill Rectangle vs. Fill Poly for same size areas would be an
-  interesting comparison.
-
-Data: Pixels per second.
-
-GC fields: function
-       plane-mask
-       fill-style
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-
-
-PolyFillArc
------------
-Use same test as PolyArc?
-
-Data: Pixels per second would be hard to compute, but what else is there?
-
-GC fields: function
-       plane-mask
-       fill-style
-       arc-mode
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-
-
-PutImage
---------
-
-GC fields: function
-       plane-mask
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-
-
-GetImage
---------
-
-PolyText8
----------
-
-GC fields: function
-       plane-mask
-       fill-style
-       font
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-Possibly foreground
-       background
-       tile
-       stipple
-       tile-stipple-x-origin
-       tile-stipple-y-origin
-
-
-PolyText16
-----------
-
-ImageText8
-----------
-
-GC fields: plane-mask
-       foreground
-       background
-       font
-       subwindow-mode
-       clip-x-origin
-       clip-y-origin
-       clip-mask
-
-ImageText16
----------
diff --git a/xgc/Written/Notes2 b/xgc/Written/Notes2
deleted file mode 100644 (file)
index cf3d99d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-                     C |C |C |P |P |P |P |P |F |P |P |P |G |P |P |I |I |
-             l |o |o |o |o |o |o |o |i |o |o |u |e |o |o |m |m |
-             e |p |p |l |l |l |l |l |l |l |l |t |t |l |l |a |a |
-             a |y |y |y |y |y |y |y |l |y |y |I |I |y |y |g |g |
-             r |A |P |P |L |S |R |A |P |F |F |m |m |T |T |e |e |
-             A |r |l |o |i |e |e |r |o |i |i |a |a |e |e |T |T |
-             r |e |a |i |n |g |c |c |l |l |l |g |g |x |x |e |e |
-             e |a |n |n |e |m |t |  |y |l |l |e |e |t |t |x |x |
-             a |  |e |t |  |e |a |  |  |R |A |  |  |8 |1 |t |t |
-               |  |  |  |  |n |n |  |  |e |r |  |  |  |6 |8 |1 |
-               |  |  |  |  |t |g |  |  |c |c |  |  |  |  |  |6 |
-               |  |  |  |  |  |l |  |  |t |  |  |  |  |  |  |  |
-               |  |  |  |  |  |e |  |  |a |  |  |  |  |  |  |  |
-                |  |  |  |  |  |  |  |  |n |  |  |  |  |  |  | |
-                |  |  |  |  |  |  |  |  |g |  |  |  |  |  |  | |
-                |  |  |  |  |  |  |  |  |l |  |  |  |  |  |  | |
-                |  |  |  |  |  |  |  |  |e |  |  |  |  |  |  | |
-                |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | |
-                |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
-function        |XX|  |XX|XX|XX|XX|XX|XX|XX|XX|XX|  |XX|XX|  | |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-plane_mask     |XX|  |XX|XX|XX|XX|XX|XX|XX|XX|XX|  |XX|XX|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-foreground      |  |  |XX|**|**|**|**|**|**|**|**|  |**|**|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-background     |  |  |  |**|**|**|**|**|**|**|**|  |**|**|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-line_width     |  |  |  |XX|XX|XX|XX|  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-line_style     |  |  |  |XX|XX|XX|XX|  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-cap_style      |  |  |  |XX|XX|  |XX|  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-join_style     |  |  |  |XX|  |XX|XX|  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-fill_style     |  |  |  |XX|XX|XX|XX|XX|XX|XX|  |  |XX|XX|  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-fill_rule      |  |  |  |  |  |  |  |XX|  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-arc_mode       |  |  |  |  |  |  |  |  |  |XX|  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-tile           |  |  |  |**|**|**|**|**|**|**|  |  |**|**|  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-stipple         |  |  |         |**|**|**|**|**|**|**|  |  |**|**|  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-ts_x_origin    |  |  |  |**|**|**|**|**|**|**|  |  |**|**|  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-ts_y_origin    |  |  |  |**|**|**|**|**|**|**|  |  |**|**|  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-font           |  |  |  |  |  |  |  |  |  |  |  |  |XX|XX|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-subwindow_mode |XX|  |XX|XX|XX|XX|XX|XX|XX|XX|XX|  |XX|XX|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-exposures              |XX|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-clip_x_origin  |XX|  |XX|XX|XX|XX|XX|XX|XX|XX|XX|  |XX|XX|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-clip_y_origin  |XX|  |XX|XX|XX|XX|XX|XX|XX|XX|XX|  |XX|XX|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-clip_mask      |XX|  |XX|XX|XX|XX|XX|XX|XX|XX|XX|  |XX|XX|XX|XX|
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-dash_offset    |  |  |  |**|**|**|**|  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-dashes         |  |  |  |**|**|**|**|  |  |  |  |  |  |  |  |  |
-----------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 
-
-
diff --git a/xgc/Written/Outline b/xgc/Written/Outline
deleted file mode 100644 (file)
index d83f3e5..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-
-                        Outline for Xbench
-                        ------------------
-
-GENERAL
--------
-
-Stuff starting with '-' are callbacks for that widget.
-'<>' means whatever is appropriate.
-
-Choice widgets will either be implemented as a new type of widget or a
-form containing a bunch of Command widgets.  The automatic callbacks for
-the commands are:
-   - set all children of parent to normal colors
-   - set oneself to reverse colors
-There will be a
-   - put <> in buffer, specified by the parent widget
-There will also be a
-   - put <>\n in buffer
-specific to each command.
-
-In general, the buffer does not need to be looked at until the test is
-actually run; however, if we decide to "gray out" choices in the Graphics
-Options window that have nothing to do with the benchmark, then choosing
-a benchmark must flush also.
-
-Widgets - we need to decide whether the windows that are turn-on-and-offable
-should be children of Form, or of TopLevel.  If they're children of Form,
-then the user won't be able to stack them or have a say in where they go.
-We also might run out of space.  If they're children of TopLevel, the user
-can decide where they go, but he's going to have to choose their location
-(with the wm) every time they come up.  I would vote for the latter approach.
-(Uh oh... I don't think that the TopLevel widget can have more than one
-child...)
-
-All choosing Widgets should write strings in the Xbench language to some
-buffer, where the actual testing thing can pull them out.
-
-
-
-HIERARCHY OF WIDGETS
---------------------
-
-Form (form) surrounding the whole thing (owned by TopLevel)
-Title (label) on top describing version & current test (owned by Form)
-MenuLine (form) under Title giving top level choices (owned by Form)
-MenuLine contains these Commands:
-   Run
-       - flush the buffer
-       - run benchmark
-   BenchmarkOptionsOn
-       - map benchmark options window (BenchmarkOptions)
-   BenchmarkOptionsOff
-       - unmap benchmark options window
-   GraphicsOptionsOn
-       - map graphics options window (GraphicsOptions)
-   GraphicsOptionsOff
-       - unmap graphics options window
-   DescriptionOn
-       - map description window (Description)
-   DescriptionOff
-       - unmap description window
-   RecordingOn
-       - bring up dialog box for name of file
-       - start saving commands into file (set a global boolean TRUE)
-   RecordingOff
-       - stop saving commands into file (set the global boolean FALSE)
-   Playback
-       - bring up dialog box for name of file
-       - read from file until EOF
-   Quit
-       - quit
-   
-The toggling command buttons exist in pairs, of which only one is visible at
-any one point.  This makes callbacks/names of buttons easier to implement.
-
----
-
-BenchmarkOptions (form) describing benchmark options (owned by Toplevel?)
-BenchmarkOptions contains:
-   TestChoice (choice) the 16 different test choices.
-       - put "test <>" in buffer
-       - put description of test in Description window
-       - call disable_gc_choices() with the GC field flags
-   Iterations (text) the number of times to run.
-       - put "iterations <>" in buffer
-   
----
-
-GraphicsOptions (form) describing graphics options (owned by Toplevel?)
-GraphicsOptions contains:
-   ChooseFunction (choice)
-       - put "function <>" in buffer
-   ChooseColormap (choice)
-       - put "colormap <>" in buffer
-   Foreground (text)
-       - put "foreground <>" in buffer
-   Background (text)
-       - put "background <>" in buffer
-   LineWidth (text)
-       - put "linewidth <>" in buffer
-   LineStyle (choice)
-       - put "linestyle <>" in buffer
-   CapStyle (choice)
-       - put "capstyle <>" in buffer
-   JoinStyle (choice)
-       - put "joinstyle <>" in buffer
-   FillStyle (choice)
-       - put "fillstyle <>" in buffer
-   FillRule (choice)
-       - put "fillrule <>" in buffer
-   ArcMode (choice)
-       - put "arcmode <>" in buffer
-   TStipOrigin (text * 2)
-       - put "tsorigin <>" in buffer
-   DashList (???)
-       - put "dashlist <>" in buffer
-   DashOffset (text?)
-       - put "dashoffset <>" in buffer
-   ClipMask (choice)
-       - put "clipmask <>" in buffer
-   Planemask (text)
-       - put "planemask <>" in buffer
-
-We need specialized widgets for DashList, possibly TStipOrigin and DashOffset.
-
-Still to be decided: can one choose GC options that have no meaning for that
-  particular benchmark? I don't think it should be a problem.
-
----
-
-Description (text) describing the current test (owned by Toplevel?)
-
-I really need to find out how to use sources and sinks for Text widgets -
-the documentation does not say how to do it.
-
-Every test will have a block of text associated with it.  When a new 
-benchmark is chosen, its associated text will become the source for the
-Description widget.  Note that we don't have to worry about whether 
-Description is mapped or not; we're just setting a source.
-
----
-
-Analysis (text) describing the results of the current test (owned by Form -
-we always want this to be around)
-
-This will display the name of the test, the important values of the GC,
-the results of the test, and a short analysis thereof.  If more than
-one test of a particular benchmark is performed, it will be appended to
-the analysis source (not replacing it).  This will allow for comparing
-results obtained with different GC's.
-
----
-
-Test (core + expose event handler) for doing the test.
-
-All this really needs to do, besides actually doing the test, is to
-time it and make sure the Analysis part knows about it.
-
----
-
-RecordingOn / RecordingOff / Playback
-
-When the user presses Playback, pretty much all we have to do is to
-1) change the buffer to the file that he wants, and 2) start reading.
-The rest should be taken care of the buffer-interpreting module.
-
-RecordingOn changes the output buffer _and_ the input buffer to the 
-desired file.
-       
-RecordingOff changes them both back to the usual.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/xgc/Written/Widget b/xgc/Written/Widget
deleted file mode 100644 (file)
index c653dfd..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-What we need is a widget which presents a collection of buttons.  The user
-can select only one of them at a time.  When one is selected, its 
-foreground and background colors should be reversed and stay that way
-until another one is selected.  Exactly one button can be selected at
-any one time.
-
-Possible implementations:
-
-1.  As a new kind of widget.  bleah.
-
-
-2.  Box surrounding a lot of command buttons.  The command buttons have
-    the appropriate callbacks.
-
-Callbacks:  a) set all buttons to normal colors
-            b) set this button to reverse colors
-            c) change the appropriate variable to the desired value.
-
-    This can all be done at the time of creation, thus the buttons would
-    be invisible to the rest of the program (a good thing).
-
-
-
-(2) would be a heck of a lot easier to program, since creating widgets is
-a bitch.  However, (1) could come in handy outside of this program.  Perhaps
-write it using (2) and switch to (1) if/when we can get the widget working.
diff --git a/xgc/app-defaults/Xgc b/xgc/app-defaults/Xgc
deleted file mode 100644 (file)
index 7695abb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-*planemask*ShapeStyle: rectangle
-*dashlist*ShapeStyle: rectangle
diff --git a/xgc/app-defaults/Xgc-color b/xgc/app-defaults/Xgc-color
deleted file mode 100644 (file)
index e70d869..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-*Foreground:                           rgb:2/3/1
-*Background:                           rgb:c/d/b
-*BorderWidth:                          0
-
-*Label.justify:                                left
-*Text.Background:                      rgb:d/e/c
-*Text.displayList:                     foreground rgb:f/f/d;segments 1,-1,-2,-1, -1,-2,-1,1;foreground rgb:7/7/5;segments -2,0,1,0, 0,1,0,-2
-*Form.displayList:                     foreground rgb:7/7/5;segments 1,-1,-2,-1, -1,-2,-1,1;foreground rgb:f/f/d;segments -2,0,1,0, 0,1,0,-2
-
-*Label.width:                          130
-*Label.left:                           chainLeft
-*Label.right:                          chainLeft
-*topform.Form.displayList:             foreground rgb:e/e/e;segments 1,-1,-2,-1, -1,-2,-1,1;foreground rgb:4/4/4;segments -2,0,1,0, 0,1,0,-2
-*topform.Form.Form.displayList:
-
-*topform.Form.linestyle.Toggle.width:  123
-*topform.Form.capstyle.Toggle.width:   185
-*topform.Form.joinstyle.Toggle.width:  123
-*topform.Form.fillstyle.Toggle.width:  185
-*topform.Form.fillrule.Toggle.width:   185
-*topform.Form.arcmode.Toggle.width:    185
-*topform.Form.linewidth.Text.width:    372
-*topform.Form.font.Text.width:         372
-*topform.Form.foreground.Text.width:   110
-*topform.Form.background.Text.width:   110
-*topform.Form.testpercent.100.Background:      rgb:b/c/a
-*topform.Form.testpercent.100.displayList:     foreground rgb:e/e/c;segments 1,-1,-2,-1, -1,-2,-1,1;foreground rgb:5/5/3;segments -2,0,1,0, 0,1,0,-2
-*topform.Form.testpercent.100.justify:right
-*topform.Form.testpercent.100.width:   30
-*topform.Form.testpercent.100.left:    chainLeft
-*topform.Form.testpercent.100.right:   chainRight
-*topform.Form.testpercent.100.borderWidth:     0
-*topform.Form.testpercent.Scrollbar.width:     332
-*topform.Form.testpercent.Scrollbar.displayList:       foreground rgb:e/e/c;segments 1,-1,-2,-1, -1,-2,-1,1;foreground rgb:5/5/3;segments -2,0,1,0, 0,1,0,-2
-
-*topform.Form.testpercent.Scrollbar.Background:        rgb:b/c/a
-
-*Toggle.borderWidth:                   1
-*Toggle.borderColor:                   rgb:6/8/6
-*Toggle.justify:                       left
-*Toggle.foreground:                    rgb:2/4/2
-*Toggle.background:                    rgb:8/a/8
-*Toggle.highlightThickness:            0
-*Toggle.displayList:                   foreground rgb:4/6/4;draw-rect 1,1,-2,-2;foreground rgb:8/a/8;draw-rect 0,0,-1,-1
-
-*Command.width:                        102
-*Command.borderWidth:          1
-*Command.borderColor:          rgb:a/8/6
-*Command.justify:              left
-*Command.foreground:           rgb:6/6/2
-*Command.background:           rgb:c/c/8
-*Command.highlightThickness:   2
-*Command.displayList:          line-style solid;foreground rgb:8/8/4;draw-rect 1,1,-2,-2;dashes 2,2;line-style onoffdash;foreground rgb:c/c/8;draw-rect 0,0,-1,-1
-
-*test.BorderWidth:             1
diff --git a/xgc/choice.c b/xgc/choice.c
deleted file mode 100644 (file)
index 42ca1cb..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/* $XFree86$ */
-/*
-** xgc
-**
-** choice.c
-**
-** All the generic stuff for dealing with choice widgets.
-*/
-
-#include <stdio.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Toggle.h>
-
-#include "xgc.h"
-
-static void print_text_to_buffer(Widget, caddr_t, caddr_t);
-
-/* create_choice(w,info)
-** ---------------------
-** What a choice widget is:  A collection of toggle buttons placed inside
-** a form widget.  Exactly one of these toggle buttons can be "on" at
-** any given time;  the rest are "off".  "On" toggle buttons have
-** the foreground and background colors reversed.
-** Also, specifically because it comes in handy in xgc, choosing one
-** of the buttons causes a string associated with it to be printed out
-** (and interpreted).  Half of the string is global to the whole form
-** and the other half is local to each button.
-**
-** For example, pressing the "xor" button in the "function" form would
-** cause xgc to interpret the string "function xor", thus changing the
-** function in the GC to xor.
-**
-** There's also a label widget to the left of that mess, with an
-** incredibly descriptive title.
-**
-** create_choice() makes one.
-**
-** w is the form widget (already created) into which we will place the
-** toggle buttons.  info contains lots of useful information, such
-** as the names of the buttons and their strings (see xgc.h).
-*/
-
-ChoiceDesc *
-create_choice(Widget w, XgcStuff *info)
-{
-  ChoiceDesc *choice;          /* What we will return.  Contains
-                               ** Widget ID's of the label and toggles. */
-  int i;                       /* Counter */
-  char *text;                  /* Text to be interpreted when the
-                               ** toggle widget is selected. */
-
-  /* ArgList for the label widget */
-  static Arg labelargs[] = {   
-    {XtNborderWidth,  (XtArgVal) 0}, 
-    {XtNjustify,      (XtArgVal) XtJustifyRight},
-    {XtNvertDistance, (XtArgVal) 4}
-  };
-
-  /* ArgList for the toggle widgets */
-  static Arg toggleargs[] = {
-    {XtNfromHoriz,     (XtArgVal) NULL},
-    {XtNfromVert,      (XtArgVal) NULL},
-    {XtNhorizDistance, (XtArgVal) 4},
-    {XtNvertDistance,  (XtArgVal) 4},
-    {XtNradioGroup,    (XtArgVal) NULL},
-    {XtNcallback,      (XtArgVal) NULL}
-  };
-
-  /* Callback list for the toggle widgets */
-  static XtCallbackRec callbacklist[] = {
-    {(XtCallbackProc)  print_text_to_buffer, NULL},
-    {NULL,                                   NULL}
-  };
-
-  /* Allocate space for the widgets and initialize choice */
-  choice = (ChoiceDesc *) XtMalloc(sizeof(ChoiceDesc));
-  choice->widgets = (WidgetList) XtMalloc(sizeof(Widget) * 
-                                         info->choice.num_toggles);
-  choice->size = info->choice.num_toggles;
-  choice->label = XtCreateManagedWidget(info->choice.name,labelWidgetClass,w,
-                                       labelargs,XtNumber(labelargs));
-
-  /* set up the toggle widgets */
-  toggleargs[5].value = (XtArgVal) callbacklist;
-  for (i = 0; i < info->choice.num_toggles; ++i) {
-    if (i == 0) {
-      /* the upper left toggle; put it next to the label
-       and don't worry about radio groups */
-      toggleargs[0].value = (XtArgVal) choice->label;
-      toggleargs[1].value = (XtArgVal) NULL;
-      toggleargs[2].value = (XtArgVal) 10;
-      toggleargs[3].value = (XtArgVal) 4;
-      toggleargs[4].value = (XtArgVal) NULL;
-    }
-    else {
-      toggleargs[4].value = (XtArgVal) choice->widgets[0];
-                               /* are we starting a new row? */
-      if (info->choice.columns > 0 && 
-         i > 1 && 
-         (i % (info->choice.columns) == 0)) {
-       toggleargs[0].value = (XtArgVal) choice->label;
-       /* under the appropriate toggle */
-       toggleargs[1].value = (XtArgVal) choice->widgets[i - info->choice.columns];
-       toggleargs[2].value = (XtArgVal) 10;
-       toggleargs[3].value = (XtArgVal) 4;
-      }
-      else {                   /* we're in the middle of a row */
-       /* to the right of the previous toggle */
-       toggleargs[0].value = (XtArgVal) choice->widgets[i - 1];
-       toggleargs[1].value = (XtArgVal) NULL;
-       toggleargs[2].value = (XtArgVal) -1; /* overlapping slightly */
-       toggleargs[3].value = (XtArgVal) 4;
-      }
-
-      if (info->choice.columns > 0 &&
-         i >= info->choice.columns) {
-       /* correct vertical spacing */
-       toggleargs[1].value = (XtArgVal) choice->widgets[i - info->choice.columns];
-       toggleargs[3].value = (XtArgVal) -1;
-      }
-    }
-
-    /* Put the correct stuff in the text field */
-    text = (char *) XtMalloc((unsigned) (strlen(info->choice.text) +
-                                        strlen((info->data)[i].text) + 3));
-    strcpy(text, info->choice.text);
-    strcat(text, " ");
-    strcat(text, (info->data)[i].text);
-    strcat(text, "\n");
-    callbacklist[0].closure = (caddr_t) text;
-    
-    /* Create it finally */
-    choice->widgets[i] = XtCreateManagedWidget((info->data[i]).name, 
-                                              toggleWidgetClass,
-                                              w,
-                                              toggleargs,
-                                              XtNumber(toggleargs));
-  }
-  
-  /* The toggle widgets have all been created;
-  ** now make the all the same width if that's
-  ** what we want to do.                    */
-
-  if (info->choice.columns > 0) {
-    Dimension maxwidth = 0;    /* maximum width we've found */
-    Dimension width;           /* width of the current widget */
-    static Arg args[] = {      /* for getting and setting the width */
-      {XtNwidth,    (XtArgVal) NULL}
-    };
-
-    args[0].value = (XtArgVal) &width;
-
-    /* Find the maximum width of any toggle widget */
-    for (i = 0; i < info->choice.num_toggles; ++i) {
-      XtGetValues(choice->widgets[i],args,1);
-      maxwidth = max(maxwidth,width);
-    }
-
-    /* Now set them all to that width */
-    args[0].value = (XtArgVal) maxwidth;
-    for (i = 0; i < info->choice.num_toggles; ++i)
-      XtSetValues(choice->widgets[i],args,1);
-  }
-
-  /* return the list of toggles that were just created */
-  return (choice);
-}
-
-
-
-/* select_button(choice,togglenum)
-** -------------------------------
-** "Selects" the togglenumth toggle widget in the choice layout
-** represented by choice.  It simply turns the widget on, as if the
-** user had selected it, without calling any callbacks.  It's used
-** to give feedback when reading from a script.
-*/
-
-void
-select_button(ChoiceDesc *choice, int togglenum)
-{
-  static Arg toggleargs[] = {
-    {XtNstate,   (XtArgVal) True}
-  };
-
-  XtSetValues(choice->widgets[togglenum],toggleargs,XtNumber(toggleargs));
-}
-
-/* line_up_labels(descs,numdescs)
-** ------------------------------
-** descs represents a bunch of choice layouts (numdescs is the size of
-** descs).  This function sets each label in descs to the same width,
-** thus making them line up nicely since they're all on the left margin.
-*/
-
-void
-line_up_labels(ChoiceDesc *descs[], int numdescs)
-{
-  int i;                       /* counter */
-  Dimension width;             /* current width */
-  Dimension maxwidth = (Dimension) 0; /* max width found */
-
-  static Arg widthargs[] = {
-    {XtNwidth,     (XtArgVal) NULL }
-  };
-
-  widthargs[0].value = (XtArgVal) &width;
-
-  /* Find the maximum width */
-  for (i = 0; i < numdescs; ++i) {
-    XtGetValues(descs[i]->label, widthargs, XtNumber(widthargs));
-    maxwidth = max(maxwidth,width);
-  }
-
-  /* Set all labels to that width */
-  widthargs[0].value = (XtArgVal) maxwidth;
-  for (i = 0; i < numdescs; ++i) {
-    XtSetValues(descs[i]->label, widthargs, XtNumber(widthargs));
-  }
-}
-
-/* choose_defaults(descs,numdescs)
-** -------------------------------
-** descs represents a bunch of choice layouts (numdescs is the size of
-** descs).  This function goes through all of descs and selects the
-** appropriate toggle widget for each one.  This includes calling
-** the callbacks associated with that widget.
-**
-** This function ends up initializing both the screen and the GC, and
-** ensures that they are consistent.
-*/
-
-void
-choose_defaults(ChoiceDesc *descs[], int numdescs)
-{
-  int i;                       /* which choice layout */
-  int j;                       /* which toggle within it */
-
-  for (i = 0; i < numdescs; ++i) {
-    j = 0;
-    if (i == 0)
-      j = 3;
-    select_button(descs[i],j);
-    XtCallCallbacks(descs[i]->widgets[j], XtNcallback, (caddr_t) NULL);
-  }
-}
-
-
-/* print_text_to_buffer(w,closure,call_data)
-** -----------------------------------------
-** This is also in the list of callbacks for the toggle buttons in a
-** choice widget.  It sends the string contained in closure (which
-** was set way back in create_choice()) over to interpret(), which
-** decides what to do with it.
-*/
-
-/*ARGSUSED*/
-static void
-print_text_to_buffer(
-    Widget  w,
-    caddr_t closure,           /* contains the string */
-    caddr_t call_data)
-{
-  interpret((char *) closure);          /* Gee, that was easy */
-}
diff --git a/xgc/configure b/xgc/configure
deleted file mode 100755 (executable)
index 5cfb156..0000000
+++ /dev/null
@@ -1,7830 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for xgc 1.0.2.
-#
-# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-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
-  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
-
-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
-if (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
-
-# 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
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  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
-  { (exit 1); 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
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# 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 ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-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
-}
-
-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
-  :
-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; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-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=:
-  # 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 ;;
-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=:
-  # 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 ;;
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf@gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
-
-
-  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" ||
-    { $as_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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 2>/dev/null
-fi
-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'
-  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
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='xgc'
-PACKAGE_TARNAME='xgc'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='xgc 1.0.2'
-PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LTLIBOBJS
-LIBOBJS
-appdefaultdir
-APPDEFS_LIBS
-APPDEFS_CFLAGS
-XGC_LIBS
-XGC_CFLAGS
-PKG_CONFIG
-YFLAGS
-YACC
-LEXLIB
-LEX_OUTPUT_ROOT
-LEX
-ADMIN_MAN_DIR
-DRIVER_MAN_DIR
-MISC_MAN_DIR
-FILE_MAN_DIR
-LIB_MAN_DIR
-APP_MAN_DIR
-ADMIN_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-MISC_MAN_SUFFIX
-FILE_MAN_SUFFIX
-LIB_MAN_SUFFIX
-APP_MAN_SUFFIX
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-distcleancheck_listfiles
-CHANGELOG_CMD
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-CWARNFLAGS
-EGREP
-GREP
-CPP
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-MAINT
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-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_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_maintainer_mode
-enable_dependency_tracking
-enable_silent_rules
-enable_strict_compilation
-with_release_version
-with_appdefaultdir
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP
-YACC
-YFLAGS
-PKG_CONFIG
-XGC_CFLAGS
-XGC_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS'
-
-
-# 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
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    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 ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    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_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    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- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    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_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_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
-    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.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
-    ;;
-
-  *=*)
-    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 &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# 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
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    $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
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-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 .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
-
-
-# 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 -- "$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
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # 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 xgc 1.0.2 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --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
-      --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
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-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/xgc]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of xgc 1.0.2:";;
-   esac
-  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]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')
-  --enable-strict-compilation
-                          Enable all warnings from compiler and make them
-                          errors (default: disabled)
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
-  --with-appdefaultdir=<pathname>
-                          specify directory for app-defaults files (default is
-                          autodetected)
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
-              the first program found out of: `bison -y', `byacc', `yacc'.
-  YFLAGS      The list of arguments that will be passed by default to $YACC.
-              This script will default YFLAGS to the empty string to avoid a
-              default value of `-d' given by some make applications.
-  PKG_CONFIG  path to pkg-config utility
-  XGC_CFLAGS  C compiler flags for XGC, overriding pkg-config
-  XGC_LIBS    linker flags for XGC, overriding pkg-config
-  APPDEFS_CFLAGS
-              C compiler flags for APPDEFS, overriding pkg-config
-  APPDEFS_LIBS
-              linker flags for APPDEFS, overriding pkg-config
-
-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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-_ACEOF
-ac_status=$?
-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" ||
-      { 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=/`$as_echo "$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|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-xgc configure 1.0.2
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 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
-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 xgc $as_me 1.0.2, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$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; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# 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=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$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) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=\$$ac_var
-       case $ac_val in
-       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       $as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $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
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* 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"
-_ACEOF
-
-
-# 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
-  ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$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"
-  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
-    { $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$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:$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:$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.
-       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:$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:$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:$LINENO:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-       { $as_echo "$as_me:$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=`$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'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
-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
-
-
-am__api_version='1.11'
-
-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_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
-   { (exit 1); exit 1; }; }
-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),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$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
-  $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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           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
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$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.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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=.
-  for ac_prog in mkdir gmkdir; do
-        for ac_exec_ext in '' $ac_executable_extensions; do
-          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
-            'mkdir (fileutils) '4.1*)
-              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-              break 3;;
-          esac
-        done
-       done
-done
-IFS=$as_save_IFS
-
-fi
-
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='xgc'
- VERSION='1.0.2'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
-fi
-
-  { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
-   if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
-fi
-
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
-
-
-
-
-
-
-
-
-
-
-
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-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
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-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.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&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 | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-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 | *.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;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-fi
-
-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.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_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
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_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
-$as_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
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-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.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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
-# `rm'.
-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 | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-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:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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 | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$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 test "${ac_cv_c_compiler_gnu+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-{ $as_echo "$as_me:$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
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_g=yes
-else
-  $as_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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_g=yes
-else
-  $as_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
-{ $as_echo "$as_me:$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
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; 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
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_c89=$ac_arg
-else
-  $as_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
-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:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-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
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-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:$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
-  $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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err 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
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  # Broken: success on invalid input.
-continue
-else
-  $as_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
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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
-{ $as_echo "$as_me:$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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err 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
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  # Broken: success on invalid input.
-continue
-else
-  $as_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
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-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:$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 test "${ac_cv_path_GREP+set}" = set; 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"
-      { 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
-  $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
-    ac_count=`expr $ac_count + 1`
-    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_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; 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"
-      { 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
-  $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
-    ac_count=`expr $ac_count + 1`
-    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_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; 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
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-/* end confdefs.h.  */
-#include <string.h>
-
-_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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#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
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-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
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$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
-
-fi
-
-# 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`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; 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
-/* 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_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 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-   { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __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
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  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 void
-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;
-  float fnumber;
-
-  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);
-}
-
-int
-main ()
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  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[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_c99=$ac_arg
-else
-  $as_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_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c99"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___SUNPRO_C=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
-  SUNCC="yes"
-else
-  SUNCC="no"
-fi
-
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=0;;
-esac
-AM_BACKSLASH='\'
-
-
-
-
-
-
-
-# Check whether --enable-strict-compilation was given.
-if test "${enable_strict_compilation+set}" = set; then
-  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
-else
-  STRICT_COMPILE=no
-fi
-
-if test "x$STRICT_COMPILE" = "xyes"; then
-       { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___SUNPRO_C=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___SUNPRO_C=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
-  SUNCC="yes"
-else
-  SUNCC="no"
-fi
-
-       { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
-$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
-if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; 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
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-#ifndef __INTEL_COMPILER
-  (void) __INTEL_COMPILER;
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_have_decl___INTEL_COMPILER=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_have_decl___INTEL_COMPILER=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
-$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then
-  INTELCC="yes"
-else
-  INTELCC="no"
-fi
-
-       if test "x$GCC" = xyes ; then
-               STRICT_CFLAGS="-pedantic -Werror"
-       elif test "x$SUNCC" = "xyes"; then
-               STRICT_CFLAGS="-errwarn"
-    elif test "x$INTELCC" = "xyes"; then
-               STRICT_CFLAGS="-Werror"
-       fi
-fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
-
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
-
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
-
-
-
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-
-distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_prog in flex lex
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LEX+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LEX"; then
-  ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_LEX="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-LEX=$ac_cv_prog_LEX
-if test -n "$LEX"; then
-  { $as_echo "$as_me:$LINENO: result: $LEX" >&5
-$as_echo "$LEX" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$LEX" && break
-done
-test -n "$LEX" || LEX=":"
-
-if test "x$LEX" != "x:"; then
-  cat >conftest.l <<_ACEOF
-%%
-a { ECHO; }
-b { REJECT; }
-c { yymore (); }
-d { yyless (1); }
-e { yyless (input () != 0); }
-f { unput (yytext[0]); }
-. { BEGIN INITIAL; }
-%%
-#ifdef YYTEXT_POINTER
-extern char *yytext;
-#endif
-int
-main (void)
-{
-  return ! yylex () + ! yywrap ();
-}
-_ACEOF
-{ (ac_try="$LEX conftest.l"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$LEX conftest.l") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ $as_echo "$as_me:$LINENO: checking lex output file root" >&5
-$as_echo_n "checking lex output file root... " >&6; }
-if test "${ac_cv_prog_lex_root+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-if test -f lex.yy.c; then
-  ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
-  ac_cv_prog_lex_root=lexyy
-else
-  { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
-$as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
-$as_echo "$ac_cv_prog_lex_root" >&6; }
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-if test -z "${LEXLIB+set}"; then
-  { $as_echo "$as_me:$LINENO: checking lex library" >&5
-$as_echo_n "checking lex library... " >&6; }
-if test "${ac_cv_lib_lex+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-
-    ac_save_LIBS=$LIBS
-    ac_cv_lib_lex='none needed'
-    for ac_lib in '' -lfl -ll; do
-      LIBS="$ac_lib $ac_save_LIBS"
-      cat >conftest.$ac_ext <<_ACEOF
-`cat $LEX_OUTPUT_ROOT.c`
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_lex=$ac_lib
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-      test "$ac_cv_lib_lex" != 'none needed' && break
-    done
-    LIBS=$ac_save_LIBS
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5
-$as_echo "$ac_cv_lib_lex" >&6; }
-  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
-fi
-
-
-{ $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
-$as_echo_n "checking whether yytext is a pointer... " >&6; }
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent.  Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-ac_save_LIBS=$LIBS
-LIBS="$LEXLIB $ac_save_LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#define YYTEXT_POINTER 1
-`cat $LEX_OUTPUT_ROOT.c`
-_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_prog_lex_yytext_pointer=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
-$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define YYTEXT_POINTER 1
-_ACEOF
-
-fi
-rm -f conftest.l $LEX_OUTPUT_ROOT.c
-
-fi
-for ac_prog in 'bison -y' byacc
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_YACC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { $as_echo "$as_me:$LINENO: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
-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
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:$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
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
-{ $as_echo "$as_me:$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 test "${ac_cv_c_compiler_gnu+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_compiler_gnu=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-{ $as_echo "$as_me:$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
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; 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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_g=yes
-else
-  $as_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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-/* end confdefs.h.  */
-
-int
-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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_g=yes
-else
-  $as_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
-{ $as_echo "$as_me:$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
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; 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
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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_prog_cc_c89=$ac_arg
-else
-  $as_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
-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:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-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
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$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
-  $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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           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
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:$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.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$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
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       else
-               { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-               PKG_CONFIG=""
-       fi
-
-fi
-
-pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for XGC" >&5
-$as_echo_n "checking for XGC... " >&6; }
-
-if test -n "$XGC_CFLAGS"; then
-    pkg_cv_XGC_CFLAGS="$XGC_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XGC_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XGC_LIBS"; then
-    pkg_cv_XGC_LIBS="$XGC_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XGC_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               XGC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7" 2>&1`
-        else
-               XGC_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XGC_PKG_ERRORS" >&5
-
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xaw7) were not met:
-
-$XGC_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XGC_CFLAGS
-and XGC_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xaw7) were not met:
-
-$XGC_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XGC_CFLAGS
-and XGC_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XGC_CFLAGS
-and XGC_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XGC_CFLAGS
-and XGC_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-       XGC_CFLAGS=$pkg_cv_XGC_CFLAGS
-       XGC_LIBS=$pkg_cv_XGC_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
-fi
-
-
-
-
-pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for APPDEFS" >&5
-$as_echo_n "checking for APPDEFS... " >&6; }
-
-if test -n "$APPDEFS_CFLAGS"; then
-    pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$APPDEFS_LIBS"; then
-    pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
-        else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" >&5
-
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
-fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-# Check whether --with-appdefaultdir was given.
-if test "${with_appdefaultdir+set}" = set; then
-  withval=$with_appdefaultdir; appdefaultdir="$withval"
-else
-  appdefaultdir="${xt_appdefaultdir}"
-fi
-
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$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) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (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 \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     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
-    test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
-  else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-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"`
-  # 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'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
- if test -n "$EXEEXT"; then
-  am__EXEEXT_TRUE=
-  am__EXEEXT_FALSE='#'
-else
-  am__EXEEXT_TRUE='#'
-  am__EXEEXT_FALSE=
-fi
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_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
-  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
-  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
-
-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
-if (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
-
-# 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
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  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
-  { (exit 1); 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
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# 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 ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         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" ||
-    { $as_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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 2>/dev/null
-fi
-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'
-  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
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&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 xgc $as_me 1.0.2, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_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"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, 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
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-xgc config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 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'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-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=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -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 ;;
-  --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"` ;;
-    esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    $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.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-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
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_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
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); 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"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
-
-# 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
-
-
-ac_cr='\r'
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/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 {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-  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
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$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
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = "\a"
-
-}
-{
-  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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
-  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
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = "\a"
-}
-/^[\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_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
-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*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-   { (exit 1); exit 1; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$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 `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) false;;
-          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-          esac ||
-          { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$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 '`
-         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-       `' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$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" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$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|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_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=
-
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-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:$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 || 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' ;;
-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 || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-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
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-
-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"; } &&
-  { $as_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
-$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"
-  case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$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" \
-       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$_am_arg" : 'X\(//\)[^/]' \| \
-        X"$_am_arg" : 'X\(//\)$' \| \
-        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      { as_dir=$dirpart/$fdir
-  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=`$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_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  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; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/xgc/constants.h b/xgc/constants.h
deleted file mode 100644 (file)
index 495ff94..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-** xgc
-**
-** constants.h
-**
-** Lots of constants which many files need.
-*/
-
-/* Find the max of two numbers */
-#ifndef max
-#define max(x,y) (((x)>(y))?(x):(y))
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#define MAXCHOICES 16           /* Max # of choices for any option */
-
-#define Black BlackPixel(X.dpy,0) 
-#define White WhitePixel(X.dpy,0)
-
-#define CopyArea      0                /* different tests */
-#define CopyPlane     1
-#define PolyPoint     2
-#define PolyLine      3
-#define PolySegment   4
-#define PolyRectangle 5
-#define PolyArc       6
-#define FillPolygon   7
-#define PolyFillRect  8
-#define PolyFillArc   9
-#define PutImage     10
-#define GetImage     11
-#define PolyText8    12
-#define ImageText8   13
-#define PolyText16   14
-#define ImageText16  15
-
-#define CFunction     0                /* different GC things you can choose */
-#define CLinestyle    1
-#define CCapstyle     2
-#define CJoinstyle    3
-#define CFillstyle    4
-#define CFillrule     5
-#define CArcmode      6
-#define NUMCHOICES    7
-#define CTest         7
-
-#define TLineWidth     0       /* different editable text widgets */
-#define TFont          1
-#define TForeground    2
-#define TBackground    3
-#define NUMTEXTWIDGETS 4
-
-#define StartTimer   0         /* flags for timing tests */
-#define EndTimer     1
-#define start_timer()   timer(StartTimer)
-#define end_timer()     timer(EndTimer)
-
-/* the number of toggle widgets in various groups */
-#define NUM_TESTS       16
-#define NUM_FUNCTIONS   16
-#define NUM_LINESTYLES   3
-#define NUM_CAPSTYLES    4
-#define NUM_JOINSTYLES   3
-#define NUM_FILLSTYLES   4
-#define NUM_FILLRULES    2
-#define NUM_ARCMODES     2
-
-/* The number of bits in the dash description */
-#define DASHLENGTH       8
diff --git a/xgc/dashlist.c b/xgc/dashlist.c
deleted file mode 100644 (file)
index 14a67c3..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-** dashlist.c
-**
-** How to make a widget to choose a dashlist.
-**
-** NOTE: This file uses static variables.  Therefore, trying to use these
-**       functions to create more than one of these dashlist choice things
-**       will fail in a big way.
-*/
-/* $XFree86: xc/programs/xgc/dashlist.c,v 1.3 2001/07/29 21:23:21 tsi Exp $ */
-
-#include <stdio.h>
-#include <X11/Xos.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Toggle.h>
-#include "xgc.h"
-
-static void change_dashlist(Widget, caddr_t, caddr_t);
-
-static short dashlist = 240;   /* in binary, becomes the dashlist
-                                  (240 = XXXX____) */
-static Widget *dashes;         /* the toggle widgets */
-
-/* create_dashlist_choice(w)
-** -------------------------
-** Inside w (a form widget), creates a bunch of little toggle buttons
-** in a row, representing the dash list.  There's also a label so
-** the user knows what it is.
-*/
-
-void
-create_dashlist_choice(Widget w)
-{
-  /* callback list for the toggle widgets */
-  static XtCallbackRec callbacklist[] = {
-    {(XtCallbackProc) change_dashlist, NULL},
-    {NULL,                             NULL}
-  };
-
-  /* ArgList for the label */
-  static Arg labelargs[] = {
-    {XtNborderWidth,  (XtArgVal) 0},
-    {XtNjustify,      (XtArgVal) XtJustifyRight},
-    {XtNvertDistance, (XtArgVal) 4}
-  };
-
-  /* ArgList for the toggles */
-  static Arg dashargs[] = {
-    {XtNcallback,           (XtArgVal) NULL},
-    {XtNhorizDistance,      (XtArgVal) NULL},
-    {XtNfromHoriz,          (XtArgVal) NULL},
-    {XtNwidth,              (XtArgVal) 10},
-    {XtNheight,             (XtArgVal) 10},
-    {XtNhighlightThickness, (XtArgVal) 1},
-    {XtNstate,              (XtArgVal) False},
-    {XtNlabel,              (XtArgVal) ""}
-  };
-
-  static Widget label;         /* the label, of course */
-  static int *dashinfo;                /* contains integers saying which bit
-                                  a particular button is; sent to
-                                  change_dashlist to tell it which
-                                  bit got changed */
-  int i;                       /* counter */
-
-  char name[11];
-
-  /* allocate space for stuff that we don't know the size of yet */
-  dashes = (Widget *) malloc(DASHLENGTH * sizeof(Widget));
-  dashinfo = (int *) malloc(DASHLENGTH * sizeof(int));
-
-  /* make the label widget */
-  label = XtCreateManagedWidget("dashlist",labelWidgetClass,w,
-                               labelargs,XtNumber(labelargs));
-
-  dashargs[0].value = (XtArgVal) callbacklist;
-
-  for (i=0;i<DASHLENGTH;++i) { /* go through all the buttons */
-    if (i==0) {                        /* offset the first one from the label */
-      dashargs[1].value = (XtArgVal) 10;
-      dashargs[2].value = (XtArgVal) label;
-    }
-    else {                     /* put it directly to the right of the
-                                  last one, no space in between */
-      dashargs[1].value = (XtArgVal) -1;
-      dashargs[2].value = (XtArgVal) dashes[i-1];
-    }
-
-    /* set its original state depending on the state of that
-    ** bit of the dashlist */
-
-    if (dashlist&1<<i)
-      dashargs[6].value = (XtArgVal) True;
-    else
-      dashargs[6].value = (XtArgVal) False;
-
-    snprintf(name, sizeof name, "dashlist%d",i);
-
-    dashinfo[i] = i;           /* which bit we're on; this is needed
-                                  in change_dashlist (the callback) */
-    callbacklist[0].closure = (caddr_t) &dashinfo[i];
-
-    dashes[i] = XtCreateManagedWidget(name,toggleWidgetClass,w,
-                                 dashargs,XtNumber(dashargs));
-  }
-}
-
-/* change_dashlist(w,closure,call_data)
-** ------------------------------------
-** This function is called when the user toggles a toggle widget.  It
-** makes the appropriate change to the dashlist and sends it off
-** to interpret().
-** Funny args are because it's a callback.
-*/
-
-/*ARGSUSED*/
-static void
-change_dashlist(Widget w, caddr_t closure, caddr_t call_data)
-{
-  int num;                     /* what number button it is */
-  Boolean on;                  /* is it currently on or off? */
-
-  char buf[80];                        /* string to send to interpret() */
-
-  static Arg args[] = {
-    {XtNstate,    (XtArgVal) NULL}
-  };
-
-  /* set up ArgList so that 'on' will contain the state */
-  args[0].value = (XtArgVal) &on;
-
-  num = * (int *) closure;     /* we put it here back in the last function */
-  XtGetValues(w,args,XtNumber(args));
-
-  /* modify the dashlist as appropriate. */
-  if (on) {                    
-    dashlist |= 1<<num;                
-  }
-  else {                       
-    dashlist &= ~(1<<num);     
-  }
-
-  /* now tell interpret() about it */
-  snprintf(buf, sizeof buf, "dashlist %d\n",dashlist); 
-  interpret(buf);
-}
-
-/* update_dashlist(newdash)
-** ------------------------
-** Updates the display of the dashlist so that it corresponds to
-** newdash.
-*/
-
-void
-update_dashlist(int newdash)
-{
-  int i;                       /* counter */
-  static Arg dashargs[] = {    /* Arglist for setting toggle state */
-    {XtNstate,   (XtArgVal) NULL}
-  };
-
-  /* first set the internal representation */
-  dashlist = newdash;
-
-  for (i = 0; i < DASHLENGTH; ++i) {
-    if (newdash & 1<<i)        /* if it's set, make it look that way */
-      dashargs[0].value = (XtArgVal) True;
-    else
-      dashargs[0].value = (XtArgVal) False;
-
-    XtSetValues(dashes[i],dashargs,XtNumber(dashargs));
-  }
-}
diff --git a/xgc/getfile.c b/xgc/getfile.c
deleted file mode 100644 (file)
index 43bba8b..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
-** getfilename.c
-**
-*/
-/* $XFree86: xc/programs/xgc/getfile.c,v 1.4tsi Exp $ */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/AsciiText.h>
-#include <stdio.h>
-
-#include "xgc.h"
-
-
-static Widget popupshell = NULL;       /* popup dialog box */
-Widget filename_text_widget;   /* Widget containing the name of
-                                  the file the user has selected */
-
-static void kill_popup_shell(void);
-
-void
-get_filename(
-     void (*success)(void),    /* what function to call when a filename is
-                                  chosen */
-     void (*failure)(void))    /* what function to call when the user
-                                  cancels */
-{
-  static Widget popupform;     /* form inside shell */
-  static Widget label;         /* "Filename :" */
-
-  Window dummy1, dummy2;
-  int x1,y1,x2,y2;
-  unsigned int mask;
-
-  /* The translation table for the text widget.  Things such as <RETURN>
-  ** confirm the user's choice.  Other keys which would move out of
-  ** the range of a one-line window are disabled. */
-
-  static const char *translationtable = 
-    "Ctrl<Key>J:    KillPopup() Done()\n\
-     Ctrl<Key>M:    KillPopup() Done()\n\
-     <Key>Linefeed: KillPopup() Done()\n\
-     <Key>Return:   KillPopup() Done()\n\
-     Ctrl<Key>O:    Nothing()\n\
-     Meta<Key>I:    Nothing()\n\
-     Ctrl<Key>N:    Nothing()\n\
-     Ctrl<Key>P:    Nothing()\n\
-     Ctrl<Key>Z:    Nothing()\n\
-     Meta<Key>Z:    Nothing()\n\
-     Ctrl<Key>V:    Nothing()\n\
-     Meta<Key>V:    Nothing()";
-
-  /* What the actions in the translation table correspond to. */
-
-  static XtActionsRec actiontable[] = {
-    {"KillPopup", (XtActionProc) kill_popup_shell},
-    {"Done",      NULL},
-    {"Nothing",   NULL}
-  };
-
-  static Arg popupshellargs[] = {     /* Where to put the popup shell. */
-    {XtNx,         (XtArgVal) NULL},
-    {XtNy,         (XtArgVal) NULL}
-  };
-
-  static Arg labelargs[] = {   /* ArgList for the label */
-    {XtNborderWidth,    (XtArgVal) 0},
-    {XtNjustify,        (XtArgVal) XtJustifyRight}
-  };
-
-  static Arg textargs[] = {    /* ArgList for the text widget */
-    {XtNeditType,       (XtArgVal) XawtextEdit},
-    {XtNwidth,          (XtArgVal) 200},
-    {XtNhorizDistance,  (XtArgVal) 10},
-    {XtNfromHoriz,      (XtArgVal) NULL},
-  };
-
-  static Arg cancelargs[] = {  /* ArgList for the cancel button */
-    {XtNfromHoriz,      (XtArgVal) NULL},
-    {XtNcallback,       (XtArgVal) NULL}
-  };
-
-  /* Procedures to call when the user selects 'cancel' */
-  static XtCallbackRec cancelcallbacklist[] = {
-    {(XtCallbackProc) kill_popup_shell, NULL},
-    {NULL, NULL},
-    {NULL, NULL}
-  };
-
-  if (popupshell != NULL) {
-      XtPopup(popupshell,XtGrabExclusive);
-      return;
-  }
-
-  /* Find out where the pointer is, so we can put the popup window there */
-
-  (void) XQueryPointer(X.dpy,XtWindow(topform),&dummy1,&dummy2,&x1,&y1,
-                      &x2,&y2,&mask);
-  
-  popupshellargs[0].value = (XtArgVal) x2;
-  popupshellargs[1].value = (XtArgVal) y2;
-  
-  popupshell = XtCreatePopupShell("popup",overrideShellWidgetClass,
-                        topform,popupshellargs,XtNumber(popupshellargs));
-
-  popupform = XtCreateManagedWidget("form",formWidgetClass,popupshell,
-                           NULL, 0);
-
-  label = XtCreateManagedWidget("Filename: ",labelWidgetClass,popupform,
-                              labelargs,XtNumber(labelargs));
-
-  textargs[3].value = (XtArgVal) label;
-
-  filename_text_widget = XtCreateManagedWidget("text",asciiTextWidgetClass,
-                                              popupform,
-                                              textargs,XtNumber(textargs));
-
-  /* Complete the action table.  We have to do it here because success
-  ** isn't known at compile time. */
-
-  actiontable[1].proc = (XtActionProc) success;
-
-  /* Register actions, translations, callbacks */
-
-  XtAppAddActions(appcontext,actiontable,XtNumber(actiontable));
-  XtOverrideTranslations(filename_text_widget,
-                        XtParseTranslationTable(translationtable));
-  cancelcallbacklist[1].callback = (XtCallbackProc) failure;
-
-  cancelargs[0].value = (XtArgVal) filename_text_widget;
-  cancelargs[1].value = (XtArgVal) cancelcallbacklist;
-
-  (void) XtCreateManagedWidget("Cancel",commandWidgetClass,popupform,
-                              cancelargs,XtNumber(cancelargs));
-
-  /* Bring up the popup.  When the user presses cancel or the return key,
-  ** the function kill_popup_shell (below) will be called to remove it. */
-
-  XtPopup(popupshell,XtGrabExclusive);
-}
-
-/* kill_popup_shell()
-** ------------------
-** Remove the popup window that get_filename popped up.
-*/
-
-static void
-kill_popup_shell(void)
-{
-  XtPopdown(popupshell);
-}
diff --git a/xgc/gram.c b/xgc/gram.c
deleted file mode 100644 (file)
index 42fe99c..0000000
+++ /dev/null
@@ -1,1731 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   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, 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.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "2.3"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 0
-
-/* Using locations.  */
-#define YYLSP_NEEDED 0
-
-
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     STRING = 258,
-     NUMBER = 259,
-     RUN = 260,
-     FUNCTION = 261,
-     FUNCTIONTYPE = 262,
-     TEST = 263,
-     TESTTYPE = 264,
-     LINESTYLE = 265,
-     LINESTYLETYPE = 266,
-     CAPSTYLE = 267,
-     CAPSTYLETYPE = 268,
-     JOINSTYLE = 269,
-     JOINSTYLETYPE = 270,
-     ROUND = 271,
-     SOLID = 272,
-     FILLSTYLE = 273,
-     FILLSTYLETYPE = 274,
-     FILLRULE = 275,
-     FILLRULETYPE = 276,
-     ARCMODE = 277,
-     ARCMODETYPE = 278,
-     FOREGROUND = 279,
-     BACKGROUND = 280,
-     LINEWIDTH = 281,
-     PLANEMASK = 282,
-     DASHLIST = 283,
-     PERCENT = 284,
-     FONT = 285
-   };
-#endif
-/* Tokens.  */
-#define STRING 258
-#define NUMBER 259
-#define RUN 260
-#define FUNCTION 261
-#define FUNCTIONTYPE 262
-#define TEST 263
-#define TESTTYPE 264
-#define LINESTYLE 265
-#define LINESTYLETYPE 266
-#define CAPSTYLE 267
-#define CAPSTYLETYPE 268
-#define JOINSTYLE 269
-#define JOINSTYLETYPE 270
-#define ROUND 271
-#define SOLID 272
-#define FILLSTYLE 273
-#define FILLSTYLETYPE 274
-#define FILLRULE 275
-#define FILLRULETYPE 276
-#define ARCMODE 277
-#define ARCMODETYPE 278
-#define FOREGROUND 279
-#define BACKGROUND 280
-#define LINEWIDTH 281
-#define PLANEMASK 282
-#define DASHLIST 283
-#define PERCENT 284
-#define FONT 285
-
-
-
-
-/* Copy the first part of user declarations.  */
-#line 6 "gram.y"
-
-#define YYDEBUG 1
-
-#include <stdio.h>
-#include <X11/X.h>
-#include <X11/Intrinsic.h>
-#include "xgc.h"
-
-extern int yylineno;
-
-
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 19 "gram.y"
-{
-  int num;
-  char *ptr;
-}
-/* Line 187 of yacc.c.  */
-#line 173 "gram.c"
-       YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations.  */
-
-
-/* Line 216 of yacc.c.  */
-#line 186 "gram.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions.  */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int i)
-#else
-static int
-YYID (i)
-    int i;
-#endif
-{
-  return i;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
-       && ! ((defined YYMALLOC || defined malloc) \
-            && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-        || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-  };
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)             \
-      do                                       \
-       {                                       \
-         YYSIZE_T yyi;                         \
-         for (yyi = 0; yyi < (Count); yyi++)   \
-           (To)[yyi] = (From)[yyi];            \
-       }                                       \
-      while (YYID (0))
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)                                       \
-    do                                                                 \
-      {                                                                        \
-       YYSIZE_T yynewbytes;                                            \
-       YYCOPY (&yyptr->Stack, Stack, yysize);                          \
-       Stack = &yyptr->Stack;                                          \
-       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-       yyptr += yynewbytes / sizeof (*yyptr);                          \
-      }                                                                        \
-    while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  3
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   40
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  32
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  4
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  26
-/* YYNRULES -- Number of states.  */
-#define YYNSTATES  43
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   285
-
-#define YYTRANSLATE(YYX)                                               \
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      31,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
-   YYRHS.  */
-static const yytype_uint8 yyprhs[] =
-{
-       0,     0,     3,     5,     6,     9,    13,    15,    17,    20,
-      23,    26,    29,    32,    35,    38,    41,    44,    47,    50,
-      53,    56,    59,    62,    65,    68,    71
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
-{
-      33,     0,    -1,    34,    -1,    -1,    34,    31,    -1,    34,
-      35,    31,    -1,     1,    -1,     5,    -1,     8,     9,    -1,
-       6,     7,    -1,    10,    11,    -1,    10,    17,    -1,    12,
-      13,    -1,    12,    16,    -1,    14,    15,    -1,    14,    16,
-      -1,    18,    19,    -1,    18,    17,    -1,    20,    21,    -1,
-      22,    23,    -1,    24,     4,    -1,    25,     4,    -1,    26,
-       4,    -1,    27,     4,    -1,    28,     4,    -1,    30,     3,
-      -1,    29,     4,    -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint8 yyrline[] =
-{
-       0,    41,    41,    44,    45,    46,    49,    50,    52,    54,
-      56,    58,    60,    62,    64,    66,    68,    70,    72,    74,
-      76,    78,    80,    82,    84,    86,    88
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "$end", "error", "$undefined", "STRING", "NUMBER", "RUN", "FUNCTION",
-  "FUNCTIONTYPE", "TEST", "TESTTYPE", "LINESTYLE", "LINESTYLETYPE",
-  "CAPSTYLE", "CAPSTYLETYPE", "JOINSTYLE", "JOINSTYLETYPE", "ROUND",
-  "SOLID", "FILLSTYLE", "FILLSTYLETYPE", "FILLRULE", "FILLRULETYPE",
-  "ARCMODE", "ARCMODETYPE", "FOREGROUND", "BACKGROUND", "LINEWIDTH",
-  "PLANEMASK", "DASHLIST", "PERCENT", "FONT", "'\\n'", "$accept", "all",
-  "stmts", "stmt", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,    10
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    32,    33,    34,    34,    34,    35,    35,    35,    35,
-      35,    35,    35,    35,    35,    35,    35,    35,    35,    35,
-      35,    35,    35,    35,    35,    35,    35
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     1,     0,     2,     3,     1,     1,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-       3,     0,     0,     1,     6,     7,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     4,     0,     9,     8,    10,    11,    12,    13,    14,
-      15,    17,    16,    18,    19,    20,    21,    22,    23,    24,
-      26,    25,     5
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int8 yydefgoto[] =
-{
-      -1,     1,     2,    22
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -10
-static const yytype_int8 yypact[] =
-{
-     -10,     2,     0,   -10,   -10,   -10,     8,    10,    -8,    -9,
-       1,    -6,    11,    -2,    19,    29,    30,    31,    32,    33,
-      35,   -10,     9,   -10,   -10,   -10,   -10,   -10,   -10,   -10,
-     -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,   -10,
-     -10,   -10,   -10
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int8 yypgoto[] =
-{
-     -10,   -10,   -10,   -10
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -3
-static const yytype_int8 yytable[] =
-{
-      -2,     4,     3,    25,    27,     5,     6,    28,     7,    26,
-       8,    31,     9,    32,    10,    23,    29,    30,    11,    24,
-      12,    34,    13,    35,    14,    15,    16,    17,    18,    19,
-      20,    21,    33,    36,    37,    38,    39,    40,    41,     0,
-      42
-};
-
-static const yytype_int8 yycheck[] =
-{
-       0,     1,     0,    11,    13,     5,     6,    16,     8,    17,
-      10,    17,    12,    19,    14,     7,    15,    16,    18,     9,
-      20,    23,    22,     4,    24,    25,    26,    27,    28,    29,
-      30,    31,    21,     4,     4,     4,     4,     4,     3,    -1,
-      31
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-   symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,    33,    34,     0,     1,     5,     6,     8,    10,    12,
-      14,    18,    20,    22,    24,    25,    26,    27,    28,    29,
-      30,    31,    35,     7,     9,    11,    17,    13,    16,    15,
-      16,    17,    19,    21,    23,     4,     4,     4,     4,     4,
-       4,     3,    31
-};
-
-#define yyerrok                (yyerrstatus = 0)
-#define yyclearin      (yychar = YYEMPTY)
-#define YYEMPTY                (-2)
-#define YYEOF          0
-
-#define YYACCEPT       goto yyacceptlab
-#define YYABORT                goto yyabortlab
-#define YYERROR                goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL         goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)                                 \
-do                                                             \
-  if (yychar == YYEMPTY && yylen == 1)                         \
-    {                                                          \
-      yychar = (Token);                                                \
-      yylval = (Value);                                                \
-      yytoken = YYTRANSLATE (yychar);                          \
-      YYPOPSTACK (1);                                          \
-      goto yybackup;                                           \
-    }                                                          \
-  else                                                         \
-    {                                                          \
-      yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;                                                 \
-    }                                                          \
-while (YYID (0))
-
-
-#define YYTERROR       1
-#define YYERRCODE      256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)                               \
-    do                                                                 \
-      if (YYID (N))                                                    \
-       {                                                               \
-         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
-         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
-         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
-         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
-       }                                                               \
-      else                                                             \
-       {                                                               \
-         (Current).first_line   = (Current).last_line   =              \
-           YYRHSLOC (Rhs, 0).last_line;                                \
-         (Current).first_column = (Current).last_column =              \
-           YYRHSLOC (Rhs, 0).last_column;                              \
-       }                                                               \
-    while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)                 \
-     fprintf (File, "%d.%d-%d.%d",                     \
-             (Loc).first_line, (Loc).first_column,     \
-             (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)                       \
-do {                                           \
-  if (yydebug)                                 \
-    YYFPRINTF Args;                            \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                   \
-do {                                                                     \
-  if (yydebug)                                                           \
-    {                                                                    \
-      YYFPRINTF (stderr, "%s ", Title);                                          \
-      yy_symbol_print (stderr,                                           \
-                 Type, Value); \
-      YYFPRINTF (stderr, "\n");                                                  \
-    }                                                                    \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (!yyvaluep)
-    return;
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
-  YYUSE (yyoutput);
-# endif
-  switch (yytype)
-    {
-      default:
-       break;
-    }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
-{
-  if (yytype < YYNTOKENS)
-    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-  else
-    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
-#else
-static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)                           \
-do {                                                           \
-  if (yydebug)                                                 \
-    yy_stack_print ((Bottom), (Top));                          \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-            yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      fprintf (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-                      &(yyvsp[(yyi + 1) - (yynrhs)])
-                                      );
-      fprintf (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)         \
-do {                                   \
-  if (yydebug)                         \
-    yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef        YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-\f
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-       switch (*++yyp)
-         {
-         case '\'':
-         case ',':
-           goto do_not_strip_quotes;
-
-         case '\\':
-           if (*++yyp != '\\')
-             goto do_not_strip_quotes;
-           /* Fall through.  */
-         default:
-           if (yyres)
-             yyres[yyn] = *yyp;
-           yyn++;
-           break;
-
-         case '"':
-           if (yyres)
-             yyres[yyn] = '\0';
-           return yyn;
-         }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-        constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-                   + sizeof yyexpecting - 1
-                   + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-                      * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-        YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-       if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-         {
-           if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-             {
-               yycount = 1;
-               yysize = yysize0;
-               yyformat[sizeof yyunexpected - 1] = '\0';
-               break;
-             }
-           yyarg[yycount++] = yytname[yyx];
-           yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-           yysize_overflow |= (yysize1 < yysize);
-           yysize = yysize1;
-           yyfmt = yystpcpy (yyfmt, yyprefix);
-           yyprefix = yyor;
-         }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-       return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-       {
-         /* Avoid sprintf, as that infringes on the user's name space.
-            Don't have undefined behavior even if the translation
-            produced a string with the wrong number of "%s"s.  */
-         char *yyp = yyresult;
-         int yyi = 0;
-         while ((*yyp = *yyf) != '\0')
-           {
-             if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-               {
-                 yyp += yytnamerr (yyp, yyarg[yyi++]);
-                 yyf += 2;
-               }
-             else
-               {
-                 yyp++;
-                 yyf++;
-               }
-           }
-       }
-      return yysize;
-    }
-}
-#endif /* YYERROR_VERBOSE */
-\f
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  YYUSE (yyvaluep);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-       break;
-    }
-}
-\f
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The look-ahead symbol.  */
-int yychar;
-
-/* The semantic value of the look-ahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-  
-  int yystate;
-  int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;            /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-       /* Give user a chance to reallocate the stack.  Use copies of
-          these so that the &'s don't force the real ones into
-          memory.  */
-       YYSTYPE *yyvs1 = yyvs;
-       yytype_int16 *yyss1 = yyss;
-
-
-       /* Each stack pointer address is followed by the size of the
-          data in use in that stack, in bytes.  This used to be a
-          conditional around just the two extra args, but that might
-          be undefined if yyoverflow is a macro.  */
-       yyoverflow (YY_("memory exhausted"),
-                   &yyss1, yysize * sizeof (*yyssp),
-                   &yyvs1, yysize * sizeof (*yyvsp),
-
-                   &yystacksize);
-
-       yyss = yyss1;
-       yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-       goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-       yystacksize = YYMAXDEPTH;
-
-      {
-       yytype_int16 *yyss1 = yyss;
-       union yyalloc *yyptr =
-         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-       if (! yyptr)
-         goto yyexhaustedlab;
-       YYSTACK_RELOCATE (yyss);
-       YYSTACK_RELOCATE (yyvs);
-
-#  undef YYSTACK_RELOCATE
-       if (yyss1 != yyssa)
-         YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                 (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-       YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to look-ahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
-
-  /* Not known => get a look-ahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-       goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the look-ahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 7:
-#line 51 "gram.y"
-    { run_test(); }
-    break;
-
-  case 8:
-#line 53 "gram.y"
-    { change_test ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 9:
-#line 55 "gram.y"
-    { GC_change_function ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 10:
-#line 57 "gram.y"
-    { GC_change_linestyle ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 11:
-#line 59 "gram.y"
-    { GC_change_linestyle (LineSolid, TRUE); }
-    break;
-
-  case 12:
-#line 61 "gram.y"
-    { GC_change_capstyle ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 13:
-#line 63 "gram.y"
-    { GC_change_capstyle (CapRound, TRUE); }
-    break;
-
-  case 14:
-#line 65 "gram.y"
-    { GC_change_joinstyle ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 15:
-#line 67 "gram.y"
-    { GC_change_joinstyle (JoinRound, TRUE); }
-    break;
-
-  case 16:
-#line 69 "gram.y"
-    { GC_change_fillstyle ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 17:
-#line 71 "gram.y"
-    { GC_change_fillstyle (FillSolid, TRUE); }
-    break;
-
-  case 18:
-#line 73 "gram.y"
-    { GC_change_fillrule ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 19:
-#line 75 "gram.y"
-    { GC_change_arcmode ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 20:
-#line 77 "gram.y"
-    { GC_change_foreground ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 21:
-#line 79 "gram.y"
-    { GC_change_background ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 22:
-#line 81 "gram.y"
-    { GC_change_linewidth ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 23:
-#line 83 "gram.y"
-    { GC_change_planemask ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 24:
-#line 85 "gram.y"
-    { GC_change_dashlist ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-  case 25:
-#line 87 "gram.y"
-    { GC_change_font ((yyvsp[(2) - (2)].ptr), TRUE); }
-    break;
-
-  case 26:
-#line 89 "gram.y"
-    { change_percent ((yyvsp[(2) - (2)].num), TRUE); }
-    break;
-
-
-/* Line 1267 of yacc.c.  */
-#line 1511 "gram.c"
-      default: break;
-    }
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
-#else
-      {
-       YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-       if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-         {
-           YYSIZE_T yyalloc = 2 * yysize;
-           if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-             yyalloc = YYSTACK_ALLOC_MAXIMUM;
-           if (yymsg != yymsgbuf)
-             YYSTACK_FREE (yymsg);
-           yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-           if (yymsg)
-             yymsg_alloc = yyalloc;
-           else
-             {
-               yymsg = yymsgbuf;
-               yymsg_alloc = sizeof yymsgbuf;
-             }
-         }
-
-       if (0 < yysize && yysize <= yymsg_alloc)
-         {
-           (void) yysyntax_error (yymsg, yystate, yychar);
-           yyerror (yymsg);
-         }
-       else
-         {
-           yyerror (YY_("syntax error"));
-           if (yysize != 0)
-             goto yyexhaustedlab;
-         }
-      }
-#endif
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse look-ahead token after an
-        error, discard it.  */
-
-      if (yychar <= YYEOF)
-       {
-         /* Return failure if at end of input.  */
-         if (yychar == YYEOF)
-           YYABORT;
-       }
-      else
-       {
-         yydestruct ("Error: discarding",
-                     yytoken, &yylval);
-         yychar = YYEMPTY;
-       }
-    }
-
-  /* Else will try to reuse look-ahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;     /* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
-       {
-         yyn += YYTERROR;
-         if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-           {
-             yyn = yytable[yyn];
-             if (0 < yyn)
-               break;
-           }
-       }
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-       YYABORT;
-
-
-      yydestruct ("Error: popping",
-                 yystos[yystate], yyvsp);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  *++yyvsp = yylval;
-
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#ifndef yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-                yytoken, &yylval);
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-                 yystos[*yyssp], yyvsp);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  /* Make sure YYID is used.  */
-  return YYID (yyresult);
-}
-
-
-#line 92 "gram.y"
-
-void
-yyerror(const char *s)
-{
-  fprintf(stderr, "xgc: syntax error, line %d\n", yylineno);
-}
-
diff --git a/xgc/gram.h b/xgc/gram.h
deleted file mode 100644 (file)
index a9b285f..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
-
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
-
-   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, 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.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     STRING = 258,
-     NUMBER = 259,
-     RUN = 260,
-     FUNCTION = 261,
-     FUNCTIONTYPE = 262,
-     TEST = 263,
-     TESTTYPE = 264,
-     LINESTYLE = 265,
-     LINESTYLETYPE = 266,
-     CAPSTYLE = 267,
-     CAPSTYLETYPE = 268,
-     JOINSTYLE = 269,
-     JOINSTYLETYPE = 270,
-     ROUND = 271,
-     SOLID = 272,
-     FILLSTYLE = 273,
-     FILLSTYLETYPE = 274,
-     FILLRULE = 275,
-     FILLRULETYPE = 276,
-     ARCMODE = 277,
-     ARCMODETYPE = 278,
-     FOREGROUND = 279,
-     BACKGROUND = 280,
-     LINEWIDTH = 281,
-     PLANEMASK = 282,
-     DASHLIST = 283,
-     PERCENT = 284,
-     FONT = 285
-   };
-#endif
-/* Tokens.  */
-#define STRING 258
-#define NUMBER 259
-#define RUN 260
-#define FUNCTION 261
-#define FUNCTIONTYPE 262
-#define TEST 263
-#define TESTTYPE 264
-#define LINESTYLE 265
-#define LINESTYLETYPE 266
-#define CAPSTYLE 267
-#define CAPSTYLETYPE 268
-#define JOINSTYLE 269
-#define JOINSTYLETYPE 270
-#define ROUND 271
-#define SOLID 272
-#define FILLSTYLE 273
-#define FILLSTYLETYPE 274
-#define FILLRULE 275
-#define FILLRULETYPE 276
-#define ARCMODE 277
-#define ARCMODETYPE 278
-#define FOREGROUND 279
-#define BACKGROUND 280
-#define LINEWIDTH 281
-#define PLANEMASK 282
-#define DASHLIST 283
-#define PERCENT 284
-#define FONT 285
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 19 "gram.y"
-{
-  int num;
-  char *ptr;
-}
-/* Line 1489 of yacc.c.  */
-#line 114 "gram.h"
-       YYSTYPE;
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE yylval;
-
diff --git a/xgc/gram.y b/xgc/gram.y
deleted file mode 100644 (file)
index e9cc92c..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-** grammar for xgc syntax
-*/
-/* $XFree86: xc/programs/xgc/gram.y,v 1.3 2000/02/17 14:00:36 dawes Exp $ */
-
-%{
-#define YYDEBUG 1
-
-#include <stdio.h>
-#include <X11/X.h>
-#include <X11/Intrinsic.h>
-#include "xgc.h"
-
-extern int yylineno;
-
-%}
-
-%union
-{
-  int num;
-  char *ptr;
-};
-
-%token <ptr> STRING
-%token <num> NUMBER
-%token <num> RUN
-%token <num> FUNCTION FUNCTIONTYPE
-%token <num> TEST TESTTYPE
-%token <num> LINESTYLE LINESTYLETYPE
-%token <num> CAPSTYLE CAPSTYLETYPE
-%token <num> JOINSTYLE JOINSTYLETYPE
-%token <num> ROUND SOLID
-%token <num> FILLSTYLE FILLSTYLETYPE
-%token <num> FILLRULE FILLRULETYPE
-%token <num> ARCMODE ARCMODETYPE
-%token <num> FOREGROUND BACKGROUND LINEWIDTH PLANEMASK DASHLIST PERCENT
-%token <num> FONT
-
-%%
-
-all            : stmts
-               ;
-
-stmts          : /* empty */
-               | stmts '\n'
-               | stmts stmt '\n'
-               ;
-
-stmt           : error
-               | RUN 
-       { run_test(); }  
-               | TEST TESTTYPE 
-       { change_test ($2, TRUE); }
-               | FUNCTION FUNCTIONTYPE 
-       { GC_change_function ($2, TRUE); }
-               | LINESTYLE LINESTYLETYPE 
-       { GC_change_linestyle ($2, TRUE); }
-               | LINESTYLE SOLID
-       { GC_change_linestyle (LineSolid, TRUE); }
-               | CAPSTYLE CAPSTYLETYPE 
-       { GC_change_capstyle ($2, TRUE); }
-               | CAPSTYLE ROUND 
-       { GC_change_capstyle (CapRound, TRUE); }
-               | JOINSTYLE JOINSTYLETYPE 
-       { GC_change_joinstyle ($2, TRUE); }
-               | JOINSTYLE ROUND 
-       { GC_change_joinstyle (JoinRound, TRUE); }
-               | FILLSTYLE FILLSTYLETYPE
-       { GC_change_fillstyle ($2, TRUE); }
-               | FILLSTYLE SOLID
-       { GC_change_fillstyle (FillSolid, TRUE); }
-               | FILLRULE FILLRULETYPE
-       { GC_change_fillrule ($2, TRUE); }
-               | ARCMODE ARCMODETYPE
-       { GC_change_arcmode ($2, TRUE); }
-               | FOREGROUND NUMBER
-       { GC_change_foreground ($2, TRUE); }
-               | BACKGROUND NUMBER
-       { GC_change_background ($2, TRUE); }
-               | LINEWIDTH NUMBER
-       { GC_change_linewidth ($2, TRUE); }
-               | PLANEMASK NUMBER
-       { GC_change_planemask ($2, TRUE); }
-               | DASHLIST NUMBER
-       { GC_change_dashlist ($2, TRUE); }
-               | FONT STRING
-       { GC_change_font ($2, TRUE); }
-               | PERCENT NUMBER
-       { change_percent ($2, TRUE); }
-               ;
-
-%%
-void
-yyerror(const char *s)
-{
-  fprintf(stderr, "xgc: syntax error, line %d\n", yylineno);
-}
diff --git a/xgc/interpret.c b/xgc/interpret.c
deleted file mode 100644 (file)
index 9b05c55..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
-** interpret.c
-**
-** interprets and executes lines in the Xgc syntax.
-*/
-/* $XFree86: xc/programs/xgc/interpret.c,v 1.4 2002/01/07 20:38:30 dawes Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include "xgc.h"
-#include "tile"
-
-
-/* interpret(string)
-** -----------------
-** Takes string, which is a line written in the xgc syntax, figures
-** out what it means, and passes the buck to the right procedure.
-** That procedure gets called with feedback set to FALSE; interpret()
-** is only called if the user is selecting things interactively.
-**
-** This procedure will go away when I can figure out how to make yacc
-** and lex read from strings as well as files.
-*/
-
-void
-interpret(const char *string)
-{
-  char word1[20], word2[80];
-  int i;
-
-  sscanf(string,"%s",word1);
-  if (!strcmp(word1,"run")) run_test();
-
-  else {
-    sscanf(string,"%s %s",word1,word2);
-    print_if_recording(string);
-
-    /* So word1 is the first word on the line and word2 is the second.
-       Now the fun begins... */
-    
-    if (!strcmp(word1,TestStuff.choice.text))  {
-      for (i=0;i<NUM_TESTS;++i) {
-       if (!strcmp(word2,(TestStuff.data)[i].text)) {
-         change_test((TestStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,FunctionStuff.choice.text)) {
-      for (i=0;i<NUM_FUNCTIONS;++i) {
-       if (!strcmp(word2,(FunctionStuff.data)[i].text)) {
-         GC_change_function((FunctionStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,LinestyleStuff.choice.text)) {
-      for (i=0;i<NUM_LINESTYLES;++i) {
-       if (!strcmp(word2,(LinestyleStuff.data)[i].text)) {
-         GC_change_linestyle((LinestyleStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,"linewidth"))
-      GC_change_linewidth(atoi(word2),FALSE);
-    else if (!strcmp(word1,CapstyleStuff.choice.text)) {
-      for (i=0;i<NUM_CAPSTYLES;++i) {
-       if (!strcmp(word2,(CapstyleStuff.data)[i].text)) {
-         GC_change_capstyle((CapstyleStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,JoinstyleStuff.choice.text)) {
-      for (i=0;i<NUM_JOINSTYLES;++i) {
-       if (!strcmp(word2,(JoinstyleStuff.data)[i].text)) {
-         GC_change_joinstyle((JoinstyleStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,FillstyleStuff.choice.text)) {
-      for (i=0;i<NUM_FILLSTYLES;++i) {
-       if (!strcmp(word2,(FillstyleStuff.data)[i].text)) {
-         GC_change_fillstyle((FillstyleStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,FillruleStuff.choice.text)) {
-      for (i=0;i<NUM_FILLRULES;++i) {
-       if (!strcmp(word2,(FillruleStuff.data)[i].text)) {
-         GC_change_fillrule((FillruleStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,ArcmodeStuff.choice.text)) {
-      for (i=0;i<NUM_ARCMODES;++i) {
-       if (!strcmp(word2,(ArcmodeStuff.data)[i].text)) {
-         GC_change_arcmode((ArcmodeStuff.data)[i].code,FALSE);
-         break;
-       }
-      }
-    }
-    else if (!strcmp(word1,"planemask")) 
-      GC_change_planemask((unsigned long) atoi(word2),FALSE);
-    else if (!strcmp(word1,"dashlist"))
-      GC_change_dashlist(atoi(word2),FALSE);
-    else if (!strcmp(word1,"font"))
-      GC_change_font(word2,FALSE);
-    else if (!strcmp(word1,"foreground"))
-      GC_change_foreground((unsigned long) atoi(word2),FALSE);
-    else if (!strcmp(word1,"background"))
-      GC_change_background((unsigned long) atoi(word2),FALSE);
-    else if (!strcmp(word1,"percent"))
-      change_percent(atoi(word2), FALSE);
-    else fprintf(stderr,"Ack... %s %s\n",word1,word2);
-  }
-}
-
-#ifdef notdef
-void
-interpret(const char *instring)
-{
-  FILE *inend;
-  
-  print_if_recording(instring);
-  yyin = outend;
-  inend = fdopen(fildes[1],"w");
-  fprintf(inend,"%s",instring);
-  fclose(inend);
-  yyparse();
-}
-#endif
-
-#define select_correct_button(which,number) \
-  select_button(GCdescs[(which)],(number));
-
-/* GC_change_blahzee(foo,feedback)
-** ---------------------
-** Changes the blahzee field in xgc's GC to foo.  If feedback is TRUE,
-** changes the display to reflect this (makes it look like the user
-** selected the button, or typed in the text, or whatever).
-*/
-
-void
-GC_change_function(int function, Boolean feedback)
-{
-  XSetFunction(X.dpy,X.gc,function);
-  X.gcv.function = function;
-  if (feedback) select_correct_button(CFunction,function);
-}
-
-void
-GC_change_foreground(unsigned long foreground, Boolean feedback)
-{
-  char text[40];
-
-  XSetForeground(X.dpy,X.miscgc,foreground);
-  XCopyPlane(X.dpy,X.stipple,X.tile,X.miscgc,0,0,tile_width,tile_height,0,0,1);
-  XSetForeground(X.dpy,X.gc,foreground);
-  X.gcv.foreground = foreground;
-  XSetTile(X.dpy,X.gc,X.tile);
-  XSetTile(X.dpy,X.miscgc,X.tile);
-  if (feedback) {
-    snprintf(text, sizeof text, "%lu",foreground);
-    change_text(foregroundtext,text);
-  }
-}
-
-void
-GC_change_background(unsigned long background, Boolean feedback)
-{
-  char text[40];
-
-  XSetBackground(X.dpy,X.miscgc,background);
-  XCopyPlane(X.dpy,X.stipple,X.tile,X.miscgc,0,0,tile_width,tile_height,0,0,1);
-  XSetBackground(X.dpy,X.gc,background);
-  X.gcv.background = background;
-  XSetTile(X.dpy,X.gc,X.tile);
-  XSetTile(X.dpy,X.miscgc,X.tile);
-
-  /* Update the background of the test window NOW. */
-
-  XSetWindowBackground(X.dpy,XtWindow(test),background);
-  XClearWindow(X.dpy,XtWindow(test));
-
-  if (feedback) {
-    snprintf(text, sizeof text, "%lu",background);
-    change_text(backgroundtext,text);
-  }
-}
-
-void
-GC_change_linewidth(int linewidth, Boolean feedback)
-{
-  char text[40];
-
-  X.gcv.line_width = linewidth;
-  XChangeGC(X.dpy,X.gc,GCLineWidth,&X.gcv);
-  if (feedback) {
-    snprintf(text, sizeof text, "%d",linewidth);
-    change_text(linewidthtext,text);
-  }
-}
-
-void
-GC_change_linestyle(int linestyle, Boolean feedback)
-{
-  X.gcv.line_style = linestyle;
-  XChangeGC(X.dpy,X.gc,GCLineStyle,&X.gcv);
-  if (feedback) select_correct_button(CLinestyle,linestyle);
-}
-
-void
-GC_change_capstyle(int capstyle, Boolean feedback)
-{
-  X.gcv.cap_style = capstyle;
-  XChangeGC(X.dpy,X.gc,GCCapStyle,&X.gcv);
-  if (feedback) select_correct_button(CCapstyle,capstyle);
-}
-
-void
-GC_change_joinstyle(int joinstyle, Boolean feedback)
-{
-  X.gcv.join_style = joinstyle;
-  XChangeGC(X.dpy,X.gc,GCJoinStyle,&X.gcv);
-  if (feedback) select_correct_button(CJoinstyle,joinstyle);
-}
-
-void
-GC_change_fillstyle(int fillstyle, Boolean feedback)
-{
-  XSetFillStyle(X.dpy,X.gc,fillstyle);
-  X.gcv.fill_style = fillstyle;
-  if (feedback) select_correct_button(CFillstyle,fillstyle);
-}
-
-void
-GC_change_fillrule(int fillrule, Boolean feedback)
-{
-  XSetFillRule(X.dpy,X.gc,fillrule);
-  X.gcv.fill_rule = fillrule;
-  if (feedback) select_correct_button(CFillrule,fillrule);
-}
-
-void
-GC_change_arcmode(int arcmode, Boolean feedback)
-{
-  XSetArcMode(X.dpy,X.gc,arcmode);
-  X.gcv.arc_mode = arcmode;
-  if (feedback) select_correct_button(CArcmode,arcmode);
-}
-
-/* GC_change_dashlist(dashlist)
-** ----------------------------
-** Now this one's a bit tricky.  dashlist gets passed in as an int, but we
-** want to change it to an array of chars, like the GC likes it.
-** For example:
-**     119 => XXX_XXX_ => [3,1,3,1]
-*/
-
-void
-GC_change_dashlist(int dashlist, Boolean feedback) 
-{
-  char dasharray[DASHLENGTH];  /* what we're gonna pass to XSetDashes */
-  int dashnumber = 0;          /* which element of dasharray we're currently
-                                  modifying */
-  int i;                       /* which bit of the dashlist we're on */
-  int state = 1;               /* whether the list bit we checked was
-                                  on (1) or off (0) */
-                                 
-  /* Initialize the dasharray */
-
-  for (i = 0; i < DASHLENGTH; ++i) dasharray[i] = 0;
-
-  if (dashlist == 0) return;   /* having no dashes at all is bogus */
-
-  /* XSetDashes expects the dashlist to start with an on bit, so if it
-  ** doesn't, we keep on rotating it until it does */
-
-  while (!(dashlist&1)) dashlist /= 2;
-
-  /* Go through all the bits in dashlist, and update the dasharray
-  ** accordingly */
-
-  for (i = 0; i < DASHLENGTH; ++i) {
-    /* the following if statements checks to see if the bit we're looking
-    ** at as the same on or offness as the one before it (state).  If
-    ** so, we increment the length of the current dash. */
-
-    if (((dashlist&1<<i) && state) || (!(dashlist&1<<i) && !state))
-      ++dasharray[dashnumber];
-    else {                     
-      state = state^1;         /* reverse the state */
-      ++dasharray[++dashnumber]; /* start a new dash */
-    }
-  } 
-
-  XSetDashes(X.dpy,X.gc,0,dasharray,dashnumber+1);
-  X.gcv.dashes = dashlist;
-
-  if (feedback) update_dashlist(dashlist);
-}
-
-void
-GC_change_planemask(unsigned long planemask, Boolean feedback)
-{
-  XSetPlaneMask(X.dpy,X.gc,planemask);
-  X.gcv.plane_mask = planemask;
-  if (feedback) update_planemask((long)planemask);
-}
-
-void
-change_test(int test, Boolean feedback) 
-{
-  X.test = test;
-  if (feedback) select_button(testchoicedesc,test);
-}
-
-void
-GC_change_font(char *str, Boolean feedback)
-{
-  int num_fonts;               /* number of fonts that match the string */
-
-  XListFonts(X.dpy,str,1,&num_fonts); /* see if the font exists */
-
-  if (num_fonts) {
-    XSetFont(X.dpy,X.gc,XLoadFont(X.dpy,str));
-    if (feedback) change_text(fonttext,str);
-  }
-}
-
-void
-change_percent(int percent, Boolean feedback)
-{
-  /* Make sure that percent is valid */
-
-  if (percent < 1 || percent > 100) return;
-
-  X.percent = (float) percent / 100.0;
-
-  if (feedback) update_slider(percent);
-}
diff --git a/xgc/lex.c b/xgc/lex.c
deleted file mode 100644 (file)
index 2668109..0000000
--- a/xgc/lex.c
+++ /dev/null
@@ -1,2412 +0,0 @@
-
-#line 3 "lex.c"
-
-#define  YY_INT_ALIGNED short int
-
-/* A lexical scanner generated by flex */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-
-/* First, we deal with  platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
- */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
-
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
-typedef unsigned short int flex_uint16_t;
-typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
-
-/* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else  /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN (yy_start) = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START (((yy_start) - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin  )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#define YY_BUF_SIZE 16384
-#endif
-
-/* The state buf must be large enough to hold one state per character in the main buffer.
- */
-#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
-
-extern int yyleng;
-
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-    #define YY_LESS_LINENO(n)
-    
-/* Return all but the first "n" matched characters back to the input stream. */
-#define yyless(n) \
-       do \
-               { \
-               /* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-               *yy_cp = (yy_hold_char); \
-               YY_RESTORE_YY_MORE_OFFSET \
-               (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
-               YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-               } \
-       while ( 0 )
-
-#define unput(c) yyunput( c, (yytext_ptr)  )
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
-       {
-       FILE *yy_input_file;
-
-       char *yy_ch_buf;                /* input buffer */
-       char *yy_buf_pos;               /* current position in input buffer */
-
-       /* Size of input buffer in bytes, not including room for EOB
-        * characters.
-        */
-       yy_size_t yy_buf_size;
-
-       /* Number of characters read into yy_ch_buf, not including EOB
-        * characters.
-        */
-       int yy_n_chars;
-
-       /* Whether we "own" the buffer - i.e., we know we created it,
-        * and can realloc() it to grow it, and should free() it to
-        * delete it.
-        */
-       int yy_is_our_buffer;
-
-       /* Whether this is an "interactive" input source; if so, and
-        * if we're using stdio for input, then we want to use getc()
-        * instead of fread(), to make sure we stop fetching input after
-        * each newline.
-        */
-       int yy_is_interactive;
-
-       /* Whether we're considered to be at the beginning of a line.
-        * If so, '^' rules will be active on the next match, otherwise
-        * not.
-        */
-       int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
-    
-       /* Whether to try to fill the input buffer when we reach the
-        * end of it.
-        */
-       int yy_fill_buffer;
-
-       int yy_buffer_status;
-
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-       /* When an EOF's been seen but there's still some text to process
-        * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-        * shouldn't try reading from the input source any more.  We might
-        * still have a bunch of tokens to match, though, because of
-        * possible backing-up.
-        *
-        * When we actually see the EOF, we change the status to "new"
-        * (via yyrestart()), so that the user can continue scanning by
-        * just pointing yyin at a new input file.
-        */
-#define YY_BUFFER_EOF_PENDING 2
-
-       };
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- *
- * Returns the top of the stack, or NULL.
- */
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
-                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
-                          : NULL)
-
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-static int yy_n_chars;         /* number of characters read into yy_ch_buf */
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 0;                /* whether we need to initialize */
-static int yy_start = 0;       /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart (FILE *input_file  );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
-void yy_delete_buffer (YY_BUFFER_STATE b  );
-void yy_flush_buffer (YY_BUFFER_STATE b  );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
-
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
-
-void *yyalloc (yy_size_t  );
-void *yyrealloc (void *,yy_size_t  );
-void yyfree (void *  );
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-       { \
-       if ( ! YY_CURRENT_BUFFER ){ \
-        yyensure_buffer_stack (); \
-               YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
-       } \
-       YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
-       }
-
-#define yy_set_bol(at_bol) \
-       { \
-       if ( ! YY_CURRENT_BUFFER ){\
-        yyensure_buffer_stack (); \
-               YY_CURRENT_BUFFER_LVALUE =    \
-            yy_create_buffer(yyin,YY_BUF_SIZE ); \
-       } \
-       YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
-       }
-
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-
-/* Begin user sect3 */
-
-typedef unsigned char YY_CHAR;
-
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-
-typedef int yy_state_type;
-
-extern int yylineno;
-
-int yylineno = 1;
-
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[]  );
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-       (yytext_ptr) = yy_bp; \
-       yyleng = (size_t) (yy_cp - yy_bp); \
-       (yy_hold_char) = *yy_cp; \
-       *yy_cp = '\0'; \
-       (yy_c_buf_p) = yy_cp;
-
-#define YY_NUM_RULES 72
-#define YY_END_OF_BUFFER 73
-/* This struct is not used in this scanner,
-   but its presence is necessary. */
-struct yy_trans_info
-       {
-       flex_int32_t yy_verify;
-       flex_int32_t yy_nxt;
-       };
-static yyconst flex_int16_t yy_accept[420] =
-    {   0,
-        0,    0,   73,   70,   68,   69,   70,   70,   65,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,    0,   66,   70,   70,    0,   67,   65,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   10,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   66,    0,   70,    0,   66,   70,
-
-        4,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   11,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,    1,   18,
-       70,   70,   70,   70,   70,    9,   70,   70,   66,    0,
-       70,   70,   70,   70,   70,   41,   70,   70,   70,    6,
-       70,   70,   70,   70,   70,   63,   70,   70,   70,   70,
-       70,   70,   70,   70,   17,    8,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       19,   70,   70,    6,   70,   70,   70,   70,   70,   45,
-
-       70,   56,    3,   70,   70,   70,   70,   70,   12,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   44,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   46,
-       51,   70,   48,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   13,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   70,   70,   70,   55,   70,   70,
-       70,   70,   70,   70,   70,   53,   70,   70,   70,   70,
-
-       70,   70,   70,   70,   70,   70,   40,   70,   70,   70,
-       70,   64,   70,   70,   26,   70,   70,   70,   70,   70,
-       70,   70,   70,   70,   54,   70,   70,   70,   39,   20,
-       70,   70,   62,   70,   70,   52,   70,   70,    2,   31,
-       70,   70,   70,   70,   70,   70,   70,   70,   57,   70,
-       70,   23,   70,   70,   70,   70,   70,   30,   49,   70,
-       70,   70,   70,   21,   70,   70,   47,   70,   70,   43,
-       36,   60,   37,   70,   70,   14,   61,   70,   70,   22,
-       70,   70,   70,   32,   70,   70,    5,   59,   70,   38,
-       70,   58,   70,   33,   70,   16,   70,   70,   70,   70,
-
-       34,   42,    7,   70,   27,   35,   70,   29,   70,   70,
-       24,   15,   70,   28,   70,   70,   25,   50,    0
-    } ;
-
-static yyconst flex_int32_t yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    6,    7,    6,
-        6,    6,    6,    8,    6,    9,    6,    1,    1,    1,
-        1,    1,    1,    1,   10,   11,   12,   13,   14,   15,
-       16,    1,   17,   18,    1,   19,   20,   21,   22,   23,
-        1,   24,   25,   26,    1,    1,   27,   28,    1,    1,
-        1,   29,    1,    1,    1,    1,   30,   31,   32,   33,
-
-       34,   35,   36,   37,   38,   39,   40,   41,   42,   43,
-       44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
-       54,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst flex_int32_t yy_meta[55] =
-    {   0,
-        1,    2,    2,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1
-    } ;
-
-static yyconst flex_int16_t yy_base[427] =
-    {   0,
-        0,    0,  498,    0,  499,  499,   53,   56,   54,   21,
-       35,   36,   37,   24,   34,  463,   44,  452,  457,  456,
-       44,   46,   56,   48,   61,   45,  455,  448,  461,   71,
-      460,  443,   58,  445,   69,  440,   70,  436,  451,  450,
-        0,  114,  103,    0,  117,  120,  480,  499,  118,  449,
-      449,  448,  428,  429,  432,  432,  441,  429,  425,  422,
-      421,  436,  428,   86,  425,  418,  436,  414,  426,  420,
-      413,  418,   87,  438,  429,  111,  411,  423,  426,  414,
-      410,  404,  402,  408,  401,  408,  410,  399,  405,  402,
-      397,  398,  401,   93,  499,  135,  145,  126,  148,  154,
-
-      136,  399,  400,  405,  389,  389,  389,  405,  380,  396,
-      401,  393,  387,  388,  379,  393,  394,  408,  388,  389,
-      379,  387,  386,  386,  373,    0,  398,  381,  369,  371,
-      379,  380,  386,  367,  355,  369,  390,  363,    0,    0,
-      367,  359,  354,  368,  368,    0,  346,  358,  137,  141,
-      355,  363,  352,  359,  353,    0,  344,  359,  344,  144,
-      349,  348,  337,  365,  139,    0,  350,  336,  342,  349,
-      335,  333,  111,  333,    0,    0,  349,  343,  327,  325,
-      324,  340,  332,  338,  165,  337,  328,  336,  335,  322,
-        0,  333,  327,  347,  121,  312,  311,  328,  313,    0,
-
-      305,    0,    0,  311,  314,  315,  317,  320,    0,  320,
-      308,  301,  301,  302,  310,  317,  320,  296,  295,  294,
-      304,    0,  293,  327,  305,  304,  303,  293,  297,  292,
-      286,  294,  293,  286,  295,  294,  293,  294,  295,    0,
-        0,  283,    0,  280,  288,  287,  286,  275,  277,  283,
-      265,  285,  266,  300,  279,  270,  269,  255,  264,  263,
-      270,  271,    0,  250,  249,  269,  252,  270,  274,  251,
-      250,  247,  263,  264,  261,  251,  248,  252,  257,  252,
-      234,  237,  249,  250,  247,  235,  234,    0,  230,  245,
-      248,  243,  233,  226,  244,    0,  219,  238,  230,  220,
-
-      226,  234,  214,  225,  224,  215,    0,  215,  213,  212,
-      212,    0,  225,  210,    0,  216,  222,  212,  205,  211,
-      203,  213,  216,  216,    0,  199,  199,  203,    0,    0,
-      198,  210,    0,  195,  206,    0,  207,  197,    0,    0,
-      190,  204,  203,  199,  198,  196,  199,  198,    0,  191,
-      155,    0,  181,  199,  194,  164,  184,    0,    0,  192,
-      191,  191,  174,    0,  185,  177,    0,  187,  169,    0,
-        0,    0,    0,  174,  185,    0,    0,  170,  182,    0,
-      172,  171,  205,    0,  176,  178,    0,    0,  176,    0,
-      166,    0,  200,    0,  162,    0,  174,  173,  168,  136,
-
-        0,    0,    0,  149,    0,    0,  140,    0,  123,  101,
-        0,    0,   80,    0,   75,   43,    0,    0,  499,   70,
-      191,  193,  195,  197,  199,  201
-    } ;
-
-static yyconst flex_int16_t yy_def[427] =
-    {   0,
-      419,    1,  419,  420,  419,  419,  421,  422,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  421,  423,  420,  424,  422,  425,  419,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  419,  426,  421,  423,  421,  424,
-
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  423,  426,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-
-      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
-      420,  420,  420,  420,  420,  420,  420,  420,    0,  419,
-      419,  419,  419,  419,  419,  419
-    } ;
-
-static yyconst flex_int16_t yy_nxt[554] =
-    {   0,
-        4,    5,    6,    7,    8,    9,    9,    9,    9,   10,
-       11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
-       21,   22,   23,   24,   25,   26,   27,   28,    4,   10,
-       29,   30,   31,   32,   33,    4,    4,   34,   18,    4,
-       19,    4,   35,   36,   37,    4,   38,   39,   40,    4,
-        4,    4,   28,    4,   43,   43,   44,   47,   48,   49,
-       49,   49,   49,   50,   52,   55,   59,   51,   53,   61,
-       41,   63,   56,   72,   62,  418,   57,   64,   88,   58,
-       60,   45,   89,   65,   54,   67,   68,   73,   74,   77,
-       75,   83,   76,   78,   85,   93,   79,   84,   72,   80,
-
-       55,   64,   81,   77,   86,   82,   95,   65,  417,   87,
-       79,   57,   94,  416,   92,   43,   43,   44,   98,   43,
-       99,   47,   48,   49,   49,   49,   49,  130,  115,   95,
-      125,   96,  116,  126,  131,  127,  125,   43,  149,  126,
-       95,  415,   45,   43,  149,  100,   43,   43,   44,   43,
-       43,   44,  151,  204,   96,   98,   43,   99,  220,  152,
-      205,  211,  221,  150,  378,   96,  206,  212,  213,  150,
-      383,  414,  384,   45,  231,  393,   45,  394,  379,  232,
-      413,  412,  100,  233,  411,  212,  213,  234,  235,  236,
-      237,   42,   42,   46,   46,   43,   43,   97,   97,   47,
-
-       47,   98,   98,  410,  409,  408,  407,  406,  405,  404,
-      403,  402,  401,  400,  399,  398,  397,  396,  395,  392,
-      391,  390,  389,  388,  387,  386,  385,  382,  381,  380,
-      377,  376,  375,  374,  373,  372,  371,  370,  369,  368,
-      367,  366,  365,  364,  363,  362,  361,  360,  359,  358,
-      357,  356,  355,  354,  353,  352,  351,  350,  349,  348,
-      347,  346,  345,  344,  343,  342,  341,  340,  339,  338,
-      337,  336,  335,  334,  333,  332,  331,  330,  329,  328,
-      327,  326,  325,  324,  323,  322,  321,  320,  319,  318,
-      317,  316,  315,  314,  313,  312,  311,  310,  309,  308,
-
-      307,  306,  305,  304,  303,  302,  301,  300,  299,  298,
-      297,  296,  295,  294,  293,  292,  291,  290,  289,  288,
-      287,  286,  285,  284,  283,  282,  281,  280,  279,  278,
-      277,  276,  275,  274,  273,  272,  271,  270,  269,  268,
-      267,  266,  265,  264,  263,  262,  261,  260,  259,  258,
-      257,  256,  255,  254,  253,  252,  251,  250,  249,  248,
-      247,  246,  245,  205,  244,  243,  242,  241,  240,  239,
-      238,  230,  229,  228,  227,  226,  225,  224,  223,  222,
-      219,  218,  217,  216,  215,  214,  210,  209,  208,  207,
-      203,  202,  201,  200,  199,  198,  197,  196,  195,  194,
-
-      193,  192,  191,  190,  189,  188,  187,  186,  185,  184,
-      183,  182,  181,  180,  179,  178,  177,  176,  175,  174,
-      173,  172,  171,  170,  169,  168,  167,  166,  165,  164,
-      163,  162,  161,  160,  159,  158,  157,  156,  155,  154,
-      153,  148,  147,  146,  145,  144,  143,  142,  141,  140,
-      139,  138,  137,  136,  135,  134,  133,  132,  129,  128,
-      124,  123,  122,  121,  120,  119,  118,  117,  114,  113,
-      112,  111,  110,  109,  108,  107,  106,  105,  104,  103,
-      102,  101,   48,   88,   85,   84,   76,   68,   61,   59,
-       52,   91,   90,   71,   70,   69,   66,  419,    3,  419,
-
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419
-    } ;
-
-static yyconst flex_int16_t yy_chk[554] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    7,    7,    7,    8,    8,    9,
-        9,    9,    9,   10,   11,   12,   13,   10,   11,   14,
-      420,   15,   12,   21,   14,  416,   12,   15,   26,   12,
-       13,    7,   26,   15,   11,   17,   17,   21,   22,   23,
-       22,   24,   22,   23,   25,   33,   23,   24,   35,   23,
-
-       30,   33,   23,   37,   25,   23,   43,   33,  415,   25,
-       37,   30,   35,  413,   30,   42,   42,   42,   45,   45,
-       45,   46,   46,   49,   49,   49,   49,   76,   64,   98,
-       73,   43,   64,   73,   76,   73,   94,   96,   96,   94,
-      149,  410,   42,  150,  150,   45,   97,   97,   97,   99,
-       99,   99,  101,  160,   98,  100,  100,  100,  173,  101,
-      160,  165,  173,   96,  351,  149,  160,  195,  195,  150,
-      356,  409,  356,   97,  185,  369,   99,  369,  351,  185,
-      407,  404,  100,  185,  400,  165,  165,  185,  185,  185,
-      185,  421,  421,  422,  422,  423,  423,  424,  424,  425,
-
-      425,  426,  426,  399,  398,  397,  395,  393,  391,  389,
-      386,  385,  383,  382,  381,  379,  378,  375,  374,  368,
-      366,  365,  363,  362,  361,  360,  357,  355,  354,  353,
-      350,  348,  347,  346,  345,  344,  343,  342,  341,  338,
-      337,  335,  334,  332,  331,  328,  327,  326,  324,  323,
-      322,  321,  320,  319,  318,  317,  316,  314,  313,  311,
-      310,  309,  308,  306,  305,  304,  303,  302,  301,  300,
-      299,  298,  297,  295,  294,  293,  292,  291,  290,  289,
-      287,  286,  285,  284,  283,  282,  281,  280,  279,  278,
-      277,  276,  275,  274,  273,  272,  271,  270,  269,  268,
-
-      267,  266,  265,  264,  262,  261,  260,  259,  258,  257,
-      256,  255,  254,  253,  252,  251,  250,  249,  248,  247,
-      246,  245,  244,  242,  239,  238,  237,  236,  235,  234,
-      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
-      223,  221,  220,  219,  218,  217,  216,  215,  214,  213,
-      212,  211,  210,  208,  207,  206,  205,  204,  201,  199,
-      198,  197,  196,  194,  193,  192,  190,  189,  188,  187,
-      186,  184,  183,  182,  181,  180,  179,  178,  177,  174,
-      172,  171,  170,  169,  168,  167,  164,  163,  162,  161,
-      159,  158,  157,  155,  154,  153,  152,  151,  148,  147,
-
-      145,  144,  143,  142,  141,  138,  137,  136,  135,  134,
-      133,  132,  131,  130,  129,  128,  127,  125,  124,  123,
-      122,  121,  120,  119,  118,  117,  116,  115,  114,  113,
-      112,  111,  110,  109,  108,  107,  106,  105,  104,  103,
-      102,   93,   92,   91,   90,   89,   88,   87,   86,   85,
-       84,   83,   82,   81,   80,   79,   78,   77,   75,   74,
-       72,   71,   70,   69,   68,   67,   66,   65,   63,   62,
-       61,   60,   59,   58,   57,   56,   55,   54,   53,   52,
-       51,   50,   47,   40,   39,   38,   36,   34,   32,   31,
-       29,   28,   27,   20,   19,   18,   16,    3,  419,  419,
-
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
-      419,  419,  419
-    } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "lex.l"
-/* $XConsortium: lex.l,v 1.8 94/03/31 20:40:44 rws Exp $ */
-/* $XFree86: xc/programs/xgc/lex.l,v 1.3 2000/04/05 18:14:07 dawes Exp $ */
-/*
-** lex file for xgc syntax
-*/
-/* Lots of stuff stolen from gwm's wool.lex */
-#line 10 "lex.l"
-
-#include <X11/X.h>
-#include <stdlib.h>
-#include "gram.h"
-#include "constants.h"
-#if defined(FLEX_SCANNER) && !defined(YY_FLEX_LEX_COMPAT) && !defined(__UNIXOS2__)
-int yylineno;
-#endif
-#line 726 "lex.c"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
-
-static int yy_init_globals (void );
-
-/* Accessor methods to globals.
-   These are made visible to non-reentrant scanners for convenience. */
-
-int yylex_destroy (void );
-
-int yyget_debug (void );
-
-void yyset_debug (int debug_flag  );
-
-YY_EXTRA_TYPE yyget_extra (void );
-
-void yyset_extra (YY_EXTRA_TYPE user_defined  );
-
-FILE *yyget_in (void );
-
-void yyset_in  (FILE * in_str  );
-
-FILE *yyget_out (void );
-
-void yyset_out  (FILE * out_str  );
-
-int yyget_leng (void );
-
-char *yyget_text (void );
-
-int yyget_lineno (void );
-
-void yyset_lineno (int line_number  );
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap (void );
-#else
-extern int yywrap (void );
-#endif
-#endif
-
-    static void yyunput (int c,char *buf_ptr  );
-    
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
-#endif
-
-#ifndef YY_NO_INPUT
-
-#ifdef __cplusplus
-static int yyinput (void );
-#else
-static int input (void );
-#endif
-
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-       if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
-               { \
-               int c = '*'; \
-               int n; \
-               for ( n = 0; n < max_size && \
-                            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-                       buf[n] = (char) c; \
-               if ( c == '\n' ) \
-                       buf[n++] = (char) c; \
-               if ( c == EOF && ferror( yyin ) ) \
-                       YY_FATAL_ERROR( "input in flex scanner failed" ); \
-               result = n; \
-               } \
-       else \
-               { \
-               errno=0; \
-               while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
-                       { \
-                       if( errno != EINTR) \
-                               { \
-                               YY_FATAL_ERROR( "input in flex scanner failed" ); \
-                               break; \
-                               } \
-                       errno=0; \
-                       clearerr(yyin); \
-                       } \
-               }\
-\
-
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* end tables serialization structures and prototypes */
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-       YY_USER_ACTION
-
-/** The main scanner function which does all the work.
- */
-YY_DECL
-{
-       register yy_state_type yy_current_state;
-       register char *yy_cp, *yy_bp;
-       register int yy_act;
-    
-#line 27 "lex.l"
-
-
-#line 911 "lex.c"
-
-       if ( !(yy_init) )
-               {
-               (yy_init) = 1;
-
-#ifdef YY_USER_INIT
-               YY_USER_INIT;
-#endif
-
-               if ( ! (yy_start) )
-                       (yy_start) = 1; /* first start state */
-
-               if ( ! yyin )
-                       yyin = stdin;
-
-               if ( ! yyout )
-                       yyout = stdout;
-
-               if ( ! YY_CURRENT_BUFFER ) {
-                       yyensure_buffer_stack ();
-                       YY_CURRENT_BUFFER_LVALUE =
-                               yy_create_buffer(yyin,YY_BUF_SIZE );
-               }
-
-               yy_load_buffer_state( );
-               }
-
-       while ( 1 )             /* loops until end-of-file is reached */
-               {
-               yy_cp = (yy_c_buf_p);
-
-               /* Support of yytext. */
-               *yy_cp = (yy_hold_char);
-
-               /* yy_bp points to the position in yy_ch_buf of the start of
-                * the current run.
-                */
-               yy_bp = yy_cp;
-
-               yy_current_state = (yy_start);
-yy_match:
-               do
-                       {
-                       register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-                       if ( yy_accept[yy_current_state] )
-                               {
-                               (yy_last_accepting_state) = yy_current_state;
-                               (yy_last_accepting_cpos) = yy_cp;
-                               }
-                       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-                               {
-                               yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 420 )
-                                       yy_c = yy_meta[(unsigned int) yy_c];
-                               }
-                       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-                       ++yy_cp;
-                       }
-               while ( yy_base[yy_current_state] != 499 );
-
-yy_find_action:
-               yy_act = yy_accept[yy_current_state];
-               if ( yy_act == 0 )
-                       { /* have to back up */
-                       yy_cp = (yy_last_accepting_cpos);
-                       yy_current_state = (yy_last_accepting_state);
-                       yy_act = yy_accept[yy_current_state];
-                       }
-
-               YY_DO_BEFORE_ACTION;
-
-do_action:     /* This label is used only to access EOF actions. */
-
-               switch ( yy_act )
-       { /* beginning of action switch */
-                       case 0: /* must back up */
-                       /* undo the effects of YY_DO_BEFORE_ACTION */
-                       *yy_cp = (yy_hold_char);
-                       yy_cp = (yy_last_accepting_cpos);
-                       yy_current_state = (yy_last_accepting_state);
-                       goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 29 "lex.l"
-{ return (RUN); }
-       YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 31 "lex.l"
-{ return (FUNCTION); }
-       YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 32 "lex.l"
-{ yylval.num = GXclear;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 34 "lex.l"
-{ yylval.num = GXand;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 36 "lex.l"
-{ yylval.num = GXandReverse;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 38 "lex.l"
-{ yylval.num = GXcopy;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 40 "lex.l"
-{ yylval.num = GXandInverted;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 42 "lex.l"
-{ yylval.num = GXnoop;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 44 "lex.l"
-{ yylval.num = GXxor;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 46 "lex.l"
-{ yylval.num = GXor;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 48 "lex.l"
-{ yylval.num = GXnor;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 50 "lex.l"
-{ yylval.num = GXequiv;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 52 "lex.l"
-{ yylval.num = GXinvert;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 54 "lex.l"
-{ yylval.num = GXorReverse;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 56 "lex.l"
-{ yylval.num = GXcopyInverted;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 58 "lex.l"
-{ yylval.num = GXorInverted;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 60 "lex.l"
-{ yylval.num = GXnand;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 62 "lex.l"
-{ yylval.num = GXset;
-                                 return (FUNCTIONTYPE); }
-       YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 65 "lex.l"
-{ return (TEST); }
-       YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 66 "lex.l"
-{ yylval.num = CopyArea;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 68 "lex.l"
-{ yylval.num = CopyPlane;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 70 "lex.l"
-{ yylval.num = PolyPoint;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 72 "lex.l"
-{ yylval.num = PolyLine;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 74 "lex.l"
-{ yylval.num = PolySegment;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 76 "lex.l"
-{ yylval.num = PolyRectangle;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 78 "lex.l"
-{ yylval.num = PolyArc;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 80 "lex.l"
-{ yylval.num = FillPolygon;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 82 "lex.l"
-{ yylval.num = PolyFillRect;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 84 "lex.l"
-{ yylval.num = PolyFillArc;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 86 "lex.l"
-{ yylval.num = PutImage;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 88 "lex.l"
-{ yylval.num = GetImage;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 90 "lex.l"
-{ yylval.num = PolyText8;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 92 "lex.l"
-{ yylval.num = ImageText8;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 94 "lex.l"
-{ yylval.num = PolyText16;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 96 "lex.l"
-{ yylval.num = ImageText16;
-                                 return (TESTTYPE); }
-       YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 99 "lex.l"
-{ return (LINESTYLE); }
-       YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 100 "lex.l"
-{ yylval.num = LineOnOffDash;
-                                 return (LINESTYLETYPE); }
-       YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 102 "lex.l"
-{ yylval.num = LineDoubleDash;
-                                 return (LINESTYLETYPE); }
-       YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 105 "lex.l"
-{ return (CAPSTYLE); }
-       YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 106 "lex.l"
-{ yylval.num = CapNotLast;
-                                 return (CAPSTYLETYPE); }
-       YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 108 "lex.l"
-{ yylval.num = CapButt;
-                                 return (CAPSTYLETYPE); }
-       YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 110 "lex.l"
-{ yylval.num = CapProjecting;
-                                 return (CAPSTYLETYPE); }
-       YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 113 "lex.l"
-{ return (JOINSTYLE); }
-       YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 114 "lex.l"
-{ yylval.num = JoinMiter;
-                                 return (JOINSTYLETYPE); }
-       YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 116 "lex.l"
-{ yylval.num = JoinBevel;
-                                 return (JOINSTYLETYPE); }
-       YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 119 "lex.l"
-{ return (ROUND); }
-       YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 121 "lex.l"
-{ return (FILLSTYLE); }
-       YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 122 "lex.l"
-{ yylval.num = FillTiled;
-                                 return (FILLSTYLETYPE); }
-       YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 124 "lex.l"
-{ yylval.num = FillStippled;
-                                 return (FILLSTYLETYPE); }
-       YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 126 "lex.l"
-{ yylval.num = FillOpaqueStippled;
-                                 return (FILLSTYLETYPE); }
-       YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 129 "lex.l"
-{ return (SOLID); }
-       YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 131 "lex.l"
-{ return (FILLRULE); }
-       YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 132 "lex.l"
-{ yylval.num = EvenOddRule;
-                                 return (FILLRULETYPE); }
-       YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 134 "lex.l"
-{ yylval.num = WindingRule;
-                                 return (FILLRULETYPE); }
-       YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 137 "lex.l"
-{ return (ARCMODE); }
-       YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 138 "lex.l"
-{ yylval.num = ArcChord;
-                                 return (ARCMODETYPE); }
-       YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 140 "lex.l"
-{ yylval.num = ArcPieSlice;
-                                 return (ARCMODETYPE); }
-       YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 143 "lex.l"
-{ return (FOREGROUND); }
-       YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 144 "lex.l"
-{ return (BACKGROUND); }
-       YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 145 "lex.l"
-{ return (LINEWIDTH); }
-       YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 146 "lex.l"
-{ return (PLANEMASK); }
-       YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 147 "lex.l"
-{ return (DASHLIST); }
-       YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 148 "lex.l"
-{ return (FONT); }
-       YY_BREAK
-case 64:
-YY_RULE_SETUP
-#line 149 "lex.l"
-{ return (PERCENT); }
-       YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 151 "lex.l"
-{ (void) sscanf ((char *)yytext, "%d", &yylval.num);
-                                 return (NUMBER); }
-       YY_BREAK
-case 66:
-/* rule 66 can match eol */
-YY_RULE_SETUP
-#line 153 "lex.l"
-{ yylval.ptr = (char *) yytext;
-                                 return (STRING); }
-       YY_BREAK
-case 67:
-/* rule 67 can match eol */
-YY_RULE_SETUP
-#line 155 "lex.l"
-{ ; }
-       YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 156 "lex.l"
-{ ; }
-       YY_BREAK
-case 69:
-/* rule 69 can match eol */
-YY_RULE_SETUP
-#line 157 "lex.l"
-{ return ('\n'); }
-       YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 159 "lex.l"
-{ yylval.ptr = (char *) yytext;
-                                 return (STRING); }
-       YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 162 "lex.l"
-{ fprintf(stderr,
-                                       "xgc: bad character `%s', line %d\n",
-                                       yytext, yylineno); }
-       YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 166 "lex.l"
-ECHO;
-       YY_BREAK
-#line 1408 "lex.c"
-case YY_STATE_EOF(INITIAL):
-       yyterminate();
-
-       case YY_END_OF_BUFFER:
-               {
-               /* Amount of text matched not including the EOB char. */
-               int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
-
-               /* Undo the effects of YY_DO_BEFORE_ACTION. */
-               *yy_cp = (yy_hold_char);
-               YY_RESTORE_YY_MORE_OFFSET
-
-               if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
-                       {
-                       /* We're scanning a new file or input source.  It's
-                        * possible that this happened because the user
-                        * just pointed yyin at a new source and called
-                        * yylex().  If so, then we have to assure
-                        * consistency between YY_CURRENT_BUFFER and our
-                        * globals.  Here is the right place to do so, because
-                        * this is the first action (other than possibly a
-                        * back-up) that will match for the new input source.
-                        */
-                       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-                       YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
-                       YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
-                       }
-
-               /* Note that here we test for yy_c_buf_p "<=" to the position
-                * of the first EOB in the buffer, since yy_c_buf_p will
-                * already have been incremented past the NUL character
-                * (since all states make transitions on EOB to the
-                * end-of-buffer state).  Contrast this with the test
-                * in input().
-                */
-               if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-                       { /* This was really a NUL. */
-                       yy_state_type yy_next_state;
-
-                       (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
-
-                       yy_current_state = yy_get_previous_state(  );
-
-                       /* Okay, we're now positioned to make the NUL
-                        * transition.  We couldn't have
-                        * yy_get_previous_state() go ahead and do it
-                        * for us because it doesn't know how to deal
-                        * with the possibility of jamming (and we don't
-                        * want to build jamming into it because then it
-                        * will run more slowly).
-                        */
-
-                       yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-                       yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-
-                       if ( yy_next_state )
-                               {
-                               /* Consume the NUL. */
-                               yy_cp = ++(yy_c_buf_p);
-                               yy_current_state = yy_next_state;
-                               goto yy_match;
-                               }
-
-                       else
-                               {
-                               yy_cp = (yy_c_buf_p);
-                               goto yy_find_action;
-                               }
-                       }
-
-               else switch ( yy_get_next_buffer(  ) )
-                       {
-                       case EOB_ACT_END_OF_FILE:
-                               {
-                               (yy_did_buffer_switch_on_eof) = 0;
-
-                               if ( yywrap( ) )
-                                       {
-                                       /* Note: because we've taken care in
-                                        * yy_get_next_buffer() to have set up
-                                        * yytext, we can now set up
-                                        * yy_c_buf_p so that if some total
-                                        * hoser (like flex itself) wants to
-                                        * call the scanner after we return the
-                                        * YY_NULL, it'll still work - another
-                                        * YY_NULL will get returned.
-                                        */
-                                       (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
-
-                                       yy_act = YY_STATE_EOF(YY_START);
-                                       goto do_action;
-                                       }
-
-                               else
-                                       {
-                                       if ( ! (yy_did_buffer_switch_on_eof) )
-                                               YY_NEW_FILE;
-                                       }
-                               break;
-                               }
-
-                       case EOB_ACT_CONTINUE_SCAN:
-                               (yy_c_buf_p) =
-                                       (yytext_ptr) + yy_amount_of_matched_text;
-
-                               yy_current_state = yy_get_previous_state(  );
-
-                               yy_cp = (yy_c_buf_p);
-                               yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-                               goto yy_match;
-
-                       case EOB_ACT_LAST_MATCH:
-                               (yy_c_buf_p) =
-                               &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
-
-                               yy_current_state = yy_get_previous_state(  );
-
-                               yy_cp = (yy_c_buf_p);
-                               yy_bp = (yytext_ptr) + YY_MORE_ADJ;
-                               goto yy_find_action;
-                       }
-               break;
-               }
-
-       default:
-               YY_FATAL_ERROR(
-                       "fatal flex scanner internal error--no action found" );
-       } /* end of action switch */
-               } /* end of scanning one token */
-} /* end of yylex */
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *     EOB_ACT_LAST_MATCH -
- *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *     EOB_ACT_END_OF_FILE - end of file
- */
-static int yy_get_next_buffer (void)
-{
-       register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-       register char *source = (yytext_ptr);
-       register int number_to_move, i;
-       int ret_val;
-
-       if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
-               YY_FATAL_ERROR(
-               "fatal flex scanner internal error--end of buffer missed" );
-
-       if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
-               { /* Don't try to fill the buffer, so this is an EOF. */
-               if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
-                       {
-                       /* We matched a single character, the EOB, so
-                        * treat this as a final EOF.
-                        */
-                       return EOB_ACT_END_OF_FILE;
-                       }
-
-               else
-                       {
-                       /* We matched some text prior to the EOB, first
-                        * process it.
-                        */
-                       return EOB_ACT_LAST_MATCH;
-                       }
-               }
-
-       /* Try to read more data. */
-
-       /* First move last chars to start of buffer. */
-       number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
-
-       for ( i = 0; i < number_to_move; ++i )
-               *(dest++) = *(source++);
-
-       if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-               /* don't do the read, it's not guaranteed to return an EOF,
-                * just force an EOF
-                */
-               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
-
-       else
-               {
-                       int num_to_read =
-                       YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
-               while ( num_to_read <= 0 )
-                       { /* Not enough room in the buffer - grow it. */
-
-                       /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
-                       int yy_c_buf_p_offset =
-                               (int) ((yy_c_buf_p) - b->yy_ch_buf);
-
-                       if ( b->yy_is_our_buffer )
-                               {
-                               int new_size = b->yy_buf_size * 2;
-
-                               if ( new_size <= 0 )
-                                       b->yy_buf_size += b->yy_buf_size / 8;
-                               else
-                                       b->yy_buf_size *= 2;
-
-                               b->yy_ch_buf = (char *)
-                                       /* Include room in for 2 EOB chars. */
-                                       yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
-                               }
-                       else
-                               /* Can't grow it, we don't own it. */
-                               b->yy_ch_buf = 0;
-
-                       if ( ! b->yy_ch_buf )
-                               YY_FATAL_ERROR(
-                               "fatal error - scanner input buffer overflow" );
-
-                       (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-                       num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
-                                               number_to_move - 1;
-
-                       }
-
-               if ( num_to_read > YY_READ_BUF_SIZE )
-                       num_to_read = YY_READ_BUF_SIZE;
-
-               /* Read in more data. */
-               YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       (yy_n_chars), (size_t) num_to_read );
-
-               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-               }
-
-       if ( (yy_n_chars) == 0 )
-               {
-               if ( number_to_move == YY_MORE_ADJ )
-                       {
-                       ret_val = EOB_ACT_END_OF_FILE;
-                       yyrestart(yyin  );
-                       }
-
-               else
-                       {
-                       ret_val = EOB_ACT_LAST_MATCH;
-                       YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
-                               YY_BUFFER_EOF_PENDING;
-                       }
-               }
-
-       else
-               ret_val = EOB_ACT_CONTINUE_SCAN;
-
-       if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
-               /* Extend the array by 50%, plus the number we really need. */
-               yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
-               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
-               if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-                       YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
-       }
-
-       (yy_n_chars) += number_to_move;
-       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
-       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
-
-       (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
-
-       return ret_val;
-}
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-    static yy_state_type yy_get_previous_state (void)
-{
-       register yy_state_type yy_current_state;
-       register char *yy_cp;
-    
-       yy_current_state = (yy_start);
-
-       for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
-               {
-               register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-               if ( yy_accept[yy_current_state] )
-                       {
-                       (yy_last_accepting_state) = yy_current_state;
-                       (yy_last_accepting_cpos) = yy_cp;
-                       }
-               while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-                       {
-                       yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 420 )
-                               yy_c = yy_meta[(unsigned int) yy_c];
-                       }
-               yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-               }
-
-       return yy_current_state;
-}
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *     next_state = yy_try_NUL_trans( current_state );
- */
-    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
-{
-       register int yy_is_jam;
-       register char *yy_cp = (yy_c_buf_p);
-
-       register YY_CHAR yy_c = 1;
-       if ( yy_accept[yy_current_state] )
-               {
-               (yy_last_accepting_state) = yy_current_state;
-               (yy_last_accepting_cpos) = yy_cp;
-               }
-       while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-               {
-               yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 420 )
-                       yy_c = yy_meta[(unsigned int) yy_c];
-               }
-       yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-       yy_is_jam = (yy_current_state == 419);
-
-       return yy_is_jam ? 0 : yy_current_state;
-}
-
-    static void yyunput (int c, register char * yy_bp )
-{
-       register char *yy_cp;
-    
-    yy_cp = (yy_c_buf_p);
-
-       /* undo effects of setting up yytext */
-       *yy_cp = (yy_hold_char);
-
-       if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-               { /* need to shift things up to make room */
-               /* +2 for EOB chars. */
-               register int number_to_move = (yy_n_chars) + 2;
-               register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
-                                       YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-               register char *source =
-                               &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
-
-               while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
-                       *--dest = *--source;
-
-               yy_cp += (int) (dest - source);
-               yy_bp += (int) (dest - source);
-               YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
-                       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
-
-               if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
-                       YY_FATAL_ERROR( "flex scanner push-back overflow" );
-               }
-
-       *--yy_cp = (char) c;
-
-       (yytext_ptr) = yy_bp;
-       (yy_hold_char) = *yy_cp;
-       (yy_c_buf_p) = yy_cp;
-}
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-    static int yyinput (void)
-#else
-    static int input  (void)
-#endif
-
-{
-       int c;
-    
-       *(yy_c_buf_p) = (yy_hold_char);
-
-       if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
-               {
-               /* yy_c_buf_p now points to the character we want to return.
-                * If this occurs *before* the EOB characters, then it's a
-                * valid NUL; if not, then we've hit the end of the buffer.
-                */
-               if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
-                       /* This was really a NUL. */
-                       *(yy_c_buf_p) = '\0';
-
-               else
-                       { /* need more input */
-                       int offset = (yy_c_buf_p) - (yytext_ptr);
-                       ++(yy_c_buf_p);
-
-                       switch ( yy_get_next_buffer(  ) )
-                               {
-                               case EOB_ACT_LAST_MATCH:
-                                       /* This happens because yy_g_n_b()
-                                        * sees that we've accumulated a
-                                        * token and flags that we need to
-                                        * try matching the token before
-                                        * proceeding.  But for input(),
-                                        * there's no matching to consider.
-                                        * So convert the EOB_ACT_LAST_MATCH
-                                        * to EOB_ACT_END_OF_FILE.
-                                        */
-
-                                       /* Reset buffer status. */
-                                       yyrestart(yyin );
-
-                                       /*FALLTHROUGH*/
-
-                               case EOB_ACT_END_OF_FILE:
-                                       {
-                                       if ( yywrap( ) )
-                                               return EOF;
-
-                                       if ( ! (yy_did_buffer_switch_on_eof) )
-                                               YY_NEW_FILE;
-#ifdef __cplusplus
-                                       return yyinput();
-#else
-                                       return input();
-#endif
-                                       }
-
-                               case EOB_ACT_CONTINUE_SCAN:
-                                       (yy_c_buf_p) = (yytext_ptr) + offset;
-                                       break;
-                               }
-                       }
-               }
-
-       c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
-       *(yy_c_buf_p) = '\0';   /* preserve yytext */
-       (yy_hold_char) = *++(yy_c_buf_p);
-
-       return c;
-}
-#endif /* ifndef YY_NO_INPUT */
-
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- * 
- * @note This function does not reset the start condition to @c INITIAL .
- */
-    void yyrestart  (FILE * input_file )
-{
-    
-       if ( ! YY_CURRENT_BUFFER ){
-        yyensure_buffer_stack ();
-               YY_CURRENT_BUFFER_LVALUE =
-            yy_create_buffer(yyin,YY_BUF_SIZE );
-       }
-
-       yy_init_buffer(YY_CURRENT_BUFFER,input_file );
-       yy_load_buffer_state( );
-}
-
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- * 
- */
-    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
-{
-    
-       /* TODO. We should be able to replace this entire function body
-        * with
-        *              yypop_buffer_state();
-        *              yypush_buffer_state(new_buffer);
-     */
-       yyensure_buffer_stack ();
-       if ( YY_CURRENT_BUFFER == new_buffer )
-               return;
-
-       if ( YY_CURRENT_BUFFER )
-               {
-               /* Flush out information for old buffer. */
-               *(yy_c_buf_p) = (yy_hold_char);
-               YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-               }
-
-       YY_CURRENT_BUFFER_LVALUE = new_buffer;
-       yy_load_buffer_state( );
-
-       /* We don't actually know whether we did this switch during
-        * EOF (yywrap()) processing, but the only time this flag
-        * is looked at is after yywrap() is called, so it's safe
-        * to go ahead and always set it.
-        */
-       (yy_did_buffer_switch_on_eof) = 1;
-}
-
-static void yy_load_buffer_state  (void)
-{
-       (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
-       (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
-       yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
-       (yy_hold_char) = *(yy_c_buf_p);
-}
-
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
- * @return the allocated buffer state.
- */
-    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
-{
-       YY_BUFFER_STATE b;
-    
-       b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
-       if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-       b->yy_buf_size = size;
-
-       /* yy_ch_buf has to be 2 characters longer than the size given because
-        * we need to put in 2 end-of-buffer characters.
-        */
-       b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
-       if ( ! b->yy_ch_buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-       b->yy_is_our_buffer = 1;
-
-       yy_init_buffer(b,file );
-
-       return b;
-}
-
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- * 
- */
-    void yy_delete_buffer (YY_BUFFER_STATE  b )
-{
-    
-       if ( ! b )
-               return;
-
-       if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
-               YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
-
-       if ( b->yy_is_our_buffer )
-               yyfree((void *) b->yy_ch_buf  );
-
-       yyfree((void *) b  );
-}
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
-/* Initializes or reinitializes a buffer.
- * This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
- */
-    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
-
-{
-       int oerrno = errno;
-    
-       yy_flush_buffer(b );
-
-       b->yy_input_file = file;
-       b->yy_fill_buffer = 1;
-
-    /* If b is the current buffer, then yy_init_buffer was _probably_
-     * called from yyrestart() or through yy_get_next_buffer.
-     * In that case, we don't want to reset the lineno or column.
-     */
-    if (b != YY_CURRENT_BUFFER){
-        b->yy_bs_lineno = 1;
-        b->yy_bs_column = 0;
-    }
-
-        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-    
-       errno = oerrno;
-}
-
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
- */
-    void yy_flush_buffer (YY_BUFFER_STATE  b )
-{
-       if ( ! b )
-               return;
-
-       b->yy_n_chars = 0;
-
-       /* We always need two end-of-buffer characters.  The first causes
-        * a transition to the end-of-buffer state.  The second causes
-        * a jam in that state.
-        */
-       b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-       b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-       b->yy_buf_pos = &b->yy_ch_buf[0];
-
-       b->yy_at_bol = 1;
-       b->yy_buffer_status = YY_BUFFER_NEW;
-
-       if ( b == YY_CURRENT_BUFFER )
-               yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- *  the current state. This function will allocate the stack
- *  if necessary.
- *  @param new_buffer The new state.
- *  
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
-       if (new_buffer == NULL)
-               return;
-
-       yyensure_buffer_stack();
-
-       /* This block is copied from yy_switch_to_buffer. */
-       if ( YY_CURRENT_BUFFER )
-               {
-               /* Flush out information for old buffer. */
-               *(yy_c_buf_p) = (yy_hold_char);
-               YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
-               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
-               }
-
-       /* Only push if top exists. Otherwise, replace top. */
-       if (YY_CURRENT_BUFFER)
-               (yy_buffer_stack_top)++;
-       YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
-       /* copied from yy_switch_to_buffer. */
-       yy_load_buffer_state( );
-       (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- *  The next element becomes the new top.
- *  
- */
-void yypop_buffer_state (void)
-{
-       if (!YY_CURRENT_BUFFER)
-               return;
-
-       yy_delete_buffer(YY_CURRENT_BUFFER );
-       YY_CURRENT_BUFFER_LVALUE = NULL;
-       if ((yy_buffer_stack_top) > 0)
-               --(yy_buffer_stack_top);
-
-       if (YY_CURRENT_BUFFER) {
-               yy_load_buffer_state( );
-               (yy_did_buffer_switch_on_eof) = 1;
-       }
-}
-
-/* Allocates the stack if it does not exist.
- *  Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
-       int num_to_alloc;
-    
-       if (!(yy_buffer_stack)) {
-
-               /* First allocation is just for 2 elements, since we don't know if this
-                * scanner will even need a stack. We use 2 instead of 1 to avoid an
-                * immediate realloc on the next call.
-         */
-               num_to_alloc = 1;
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
-                                                               (num_to_alloc * sizeof(struct yy_buffer_state*)
-                                                               );
-               if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-                                                                 
-               memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-                               
-               (yy_buffer_stack_max) = num_to_alloc;
-               (yy_buffer_stack_top) = 0;
-               return;
-       }
-
-       if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
-               /* Increase the buffer to prepare for a possible push. */
-               int grow_size = 8 /* arbitrary grow size */;
-
-               num_to_alloc = (yy_buffer_stack_max) + grow_size;
-               (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
-                                                               ((yy_buffer_stack),
-                                                               num_to_alloc * sizeof(struct yy_buffer_state*)
-                                                               );
-               if ( ! (yy_buffer_stack) )
-                       YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
-               /* zero only the new slots.*/
-               memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
-               (yy_buffer_stack_max) = num_to_alloc;
-       }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
- */
-YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
-{
-       YY_BUFFER_STATE b;
-    
-       if ( size < 2 ||
-            base[size-2] != YY_END_OF_BUFFER_CHAR ||
-            base[size-1] != YY_END_OF_BUFFER_CHAR )
-               /* They forgot to leave room for the EOB's. */
-               return 0;
-
-       b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
-       if ( ! b )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-       b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
-       b->yy_buf_pos = b->yy_ch_buf = base;
-       b->yy_is_our_buffer = 0;
-       b->yy_input_file = 0;
-       b->yy_n_chars = b->yy_buf_size;
-       b->yy_is_interactive = 0;
-       b->yy_at_bol = 1;
-       b->yy_fill_buffer = 0;
-       b->yy_buffer_status = YY_BUFFER_NEW;
-
-       yy_switch_to_buffer(b  );
-
-       return b;
-}
-
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param yystr a NUL-terminated string to scan
- * 
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- *       yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
-{
-    
-       return yy_scan_bytes(yystr,strlen(yystr) );
-}
-
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
- * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
- * 
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
-{
-       YY_BUFFER_STATE b;
-       char *buf;
-       yy_size_t n;
-       int i;
-    
-       /* Get memory for full buffer, including space for trailing EOB's. */
-       n = _yybytes_len + 2;
-       buf = (char *) yyalloc(n  );
-       if ( ! buf )
-               YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-       for ( i = 0; i < _yybytes_len; ++i )
-               buf[i] = yybytes[i];
-
-       buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
-
-       b = yy_scan_buffer(buf,n );
-       if ( ! b )
-               YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-       /* It's okay to grow etc. this buffer, and we should throw it
-        * away when we're done.
-        */
-       b->yy_is_our_buffer = 1;
-
-       return b;
-}
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-static void yy_fatal_error (yyconst char* msg )
-{
-       (void) fprintf( stderr, "%s\n", msg );
-       exit( YY_EXIT_FAILURE );
-}
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-       do \
-               { \
-               /* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
-        YY_LESS_LINENO(yyless_macro_arg);\
-               yytext[yyleng] = (yy_hold_char); \
-               (yy_c_buf_p) = yytext + yyless_macro_arg; \
-               (yy_hold_char) = *(yy_c_buf_p); \
-               *(yy_c_buf_p) = '\0'; \
-               yyleng = yyless_macro_arg; \
-               } \
-       while ( 0 )
-
-/* Accessor  methods (get/set functions) to struct members. */
-
-/** Get the current line number.
- * 
- */
-int yyget_lineno  (void)
-{
-        
-    return yylineno;
-}
-
-/** Get the input stream.
- * 
- */
-FILE *yyget_in  (void)
-{
-        return yyin;
-}
-
-/** Get the output stream.
- * 
- */
-FILE *yyget_out  (void)
-{
-        return yyout;
-}
-
-/** Get the length of the current token.
- * 
- */
-int yyget_leng  (void)
-{
-        return yyleng;
-}
-
-/** Get the current token.
- * 
- */
-
-char *yyget_text  (void)
-{
-        return yytext;
-}
-
-/** Set the current line number.
- * @param line_number
- * 
- */
-void yyset_lineno (int  line_number )
-{
-    
-    yylineno = line_number;
-}
-
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- * 
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE *  in_str )
-{
-        yyin = in_str ;
-}
-
-void yyset_out (FILE *  out_str )
-{
-        yyout = out_str ;
-}
-
-int yyget_debug  (void)
-{
-        return yy_flex_debug;
-}
-
-void yyset_debug (int  bdebug )
-{
-        yy_flex_debug = bdebug ;
-}
-
-static int yy_init_globals (void)
-{
-        /* Initialization is the same as for the non-reentrant scanner.
-     * This function is called from yylex_destroy(), so don't allocate here.
-     */
-
-    (yy_buffer_stack) = 0;
-    (yy_buffer_stack_top) = 0;
-    (yy_buffer_stack_max) = 0;
-    (yy_c_buf_p) = (char *) 0;
-    (yy_init) = 0;
-    (yy_start) = 0;
-
-/* Defined in main.c */
-#ifdef YY_STDINIT
-    yyin = stdin;
-    yyout = stdout;
-#else
-    yyin = (FILE *) 0;
-    yyout = (FILE *) 0;
-#endif
-
-    /* For future reference: Set errno on error, since we are called by
-     * yylex_init()
-     */
-    return 0;
-}
-
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy  (void)
-{
-    
-    /* Pop the buffer stack, destroying each element. */
-       while(YY_CURRENT_BUFFER){
-               yy_delete_buffer(YY_CURRENT_BUFFER  );
-               YY_CURRENT_BUFFER_LVALUE = NULL;
-               yypop_buffer_state();
-       }
-
-       /* Destroy the stack itself. */
-       yyfree((yy_buffer_stack) );
-       (yy_buffer_stack) = NULL;
-
-    /* Reset the globals. This is important in a non-reentrant scanner so the next time
-     * yylex() is called, initialization will occur. */
-    yy_init_globals( );
-
-    return 0;
-}
-
-/*
- * Internal utility routines.
- */
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
-       register int i;
-       for ( i = 0; i < n; ++i )
-               s1[i] = s2[i];
-}
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
-       register int n;
-       for ( n = 0; s[n]; ++n )
-               ;
-
-       return n;
-}
-#endif
-
-void *yyalloc (yy_size_t  size )
-{
-       return (void *) malloc( size );
-}
-
-void *yyrealloc  (void * ptr, yy_size_t  size )
-{
-       /* The cast to (char *) in the following accommodates both
-        * implementations that use char* generic pointers, and those
-        * that use void* generic pointers.  It works with the latter
-        * because both ANSI C and C++ allow castless assignment from
-        * any pointer type to void*, and deal with argument conversions
-        * as though doing an assignment.
-        */
-       return (void *) realloc( (char *) ptr, size );
-}
-
-void yyfree (void * ptr )
-{
-       free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
-
-#line 166 "lex.l"
-
-
-
-#ifndef yywrap
-int yywrap(void) { return (1); }
-#endif
-
diff --git a/xgc/lex.l b/xgc/lex.l
deleted file mode 100644 (file)
index 6a7f6e0..0000000
--- a/xgc/lex.l
+++ /dev/null
@@ -1,170 +0,0 @@
-/* $XConsortium: lex.l,v 1.8 94/03/31 20:40:44 rws Exp $ */
-/* $XFree86: xc/programs/xgc/lex.l,v 1.3 2000/04/05 18:14:07 dawes Exp $ */
-/*
-** lex file for xgc syntax
-*/
-
-/* Lots of stuff stolen from gwm's wool.lex */
-
-%{
-
-#include <X11/X.h>
-#include <stdlib.h>
-#include "gram.h"
-#include "constants.h"
-#if defined(FLEX_SCANNER) && !defined(YY_FLEX_LEX_COMPAT) && !defined(__UNIXOS2__)
-int yylineno;
-#endif
-%}
-
-%p                             4000
-%a                             3000
-
-number                         [0-9]+
-word                           [^\n\t ]+
-string                         \"([^"]|\\.)*\"
-
-%%
-
-[Rr]un                         { return (RUN); }
-
-[Ff]unction                    { return (FUNCTION); }
-[Cc]lear                       { yylval.num = GXclear;
-                                 return (FUNCTIONTYPE); }
-[Aa]nd                         { yylval.num = GXand;
-                                 return (FUNCTIONTYPE); }
-[Aa]ndReverse                  { yylval.num = GXandReverse;
-                                 return (FUNCTIONTYPE); }
-[Cc]opy                                { yylval.num = GXcopy;
-                                 return (FUNCTIONTYPE); }
-[Aa]ndInverted                 { yylval.num = GXandInverted;
-                                 return (FUNCTIONTYPE); }
-[Nn]oop                                { yylval.num = GXnoop;
-                                 return (FUNCTIONTYPE); }
-[Xx]or                         { yylval.num = GXxor;
-                                 return (FUNCTIONTYPE); }
-[Oo]r                          { yylval.num = GXor;
-                                 return (FUNCTIONTYPE); }
-[Nn]or                         { yylval.num = GXnor;
-                                 return (FUNCTIONTYPE); }
-[Ee]quiv                       { yylval.num = GXequiv;
-                                 return (FUNCTIONTYPE); }
-[Ii]nvert                      { yylval.num = GXinvert;
-                                 return (FUNCTIONTYPE); }
-[Oo]rReverse                   { yylval.num = GXorReverse;
-                                 return (FUNCTIONTYPE); }
-[Cc]opyInverted                        { yylval.num = GXcopyInverted;
-                                 return (FUNCTIONTYPE); }
-[Oo]rInverted                  { yylval.num = GXorInverted;
-                                 return (FUNCTIONTYPE); }
-[Nn]and                                { yylval.num = GXnand;
-                                 return (FUNCTIONTYPE); }
-[Ss]et                         { yylval.num = GXset;
-                                 return (FUNCTIONTYPE); }
-
-[Tt]est                                { return (TEST); }
-CopyArea                       { yylval.num = CopyArea;
-                                 return (TESTTYPE); }
-CopyPlane                      { yylval.num = CopyPlane;
-                                 return (TESTTYPE); }
-PolyPoint                      { yylval.num = PolyPoint;
-                                 return (TESTTYPE); }
-PolyLine                       { yylval.num = PolyLine;
-                                 return (TESTTYPE); }
-PolySegment                    { yylval.num = PolySegment;
-                                 return (TESTTYPE); }
-PolyRectangle                  { yylval.num = PolyRectangle;
-                                 return (TESTTYPE); }
-PolyArc                                { yylval.num = PolyArc;
-                                 return (TESTTYPE); }
-FillPolygon                    { yylval.num = FillPolygon;
-                                 return (TESTTYPE); }
-PolyFillRect                   { yylval.num = PolyFillRect;
-                                 return (TESTTYPE); }
-PolyFillArc                    { yylval.num = PolyFillArc;
-                                 return (TESTTYPE); }
-PutImage                       { yylval.num = PutImage;
-                                 return (TESTTYPE); }
-GetImage                       { yylval.num = GetImage;
-                                 return (TESTTYPE); }
-PolyText8                      { yylval.num = PolyText8;
-                                 return (TESTTYPE); }
-ImageText8                     { yylval.num = ImageText8;
-                                 return (TESTTYPE); }
-PolyText16                     { yylval.num = PolyText16;
-                                 return (TESTTYPE); }
-ImageText16                    { yylval.num = ImageText16;
-                                 return (TESTTYPE); }
-
-[Ll]inestyle                   { return (LINESTYLE); }
-OnOffDash                      { yylval.num = LineOnOffDash;
-                                 return (LINESTYLETYPE); }
-DoubleDash                     { yylval.num = LineDoubleDash;
-                                 return (LINESTYLETYPE); }
-
-[Cc]apstyle                    { return (CAPSTYLE); }
-NotLast                                { yylval.num = CapNotLast;
-                                 return (CAPSTYLETYPE); }
-Butt                           { yylval.num = CapButt;
-                                 return (CAPSTYLETYPE); }
-Projecting                     { yylval.num = CapProjecting;
-                                 return (CAPSTYLETYPE); }
-
-[Jj]oinstyle                   { return (JOINSTYLE); }
-Miter                          { yylval.num = JoinMiter;
-                                 return (JOINSTYLETYPE); }
-Bevel                          { yylval.num = JoinBevel;
-                                 return (JOINSTYLETYPE); }
-
-Round                          { return (ROUND); }
-
-[Ff]illstyle                   { return (FILLSTYLE); }
-Tiled                          { yylval.num = FillTiled;
-                                 return (FILLSTYLETYPE); }
-Stippled                       { yylval.num = FillStippled;
-                                 return (FILLSTYLETYPE); }
-OpaqueStippled                 { yylval.num = FillOpaqueStippled;
-                                 return (FILLSTYLETYPE); }
-
-Solid                          { return (SOLID); }
-
-[Ff]illrule                    { return (FILLRULE); }
-EvenOdd                                { yylval.num = EvenOddRule;
-                                 return (FILLRULETYPE); }
-Winding                                { yylval.num = WindingRule;
-                                 return (FILLRULETYPE); }
-
-[Aa]rcmode                     { return (ARCMODE); }
-Chord                          { yylval.num = ArcChord;
-                                 return (ARCMODETYPE); }
-PieSlice                       { yylval.num = ArcPieSlice;
-                                 return (ARCMODETYPE); }
-
-[Ff]oreground                  { return (FOREGROUND); }
-[Bb]ackground                  { return (BACKGROUND); }
-[Ll]inewidth                   { return (LINEWIDTH); }
-[Pp]lanemask                   { return (PLANEMASK); }
-[Dd]ashlist                    { return (DASHLIST); }
-[Ff]ont                                { return (FONT); }
-[Pp]ercent                     { return (PERCENT); }
-
-{number}                       { (void) sscanf ((char *)yytext, "%d", &yylval.num);
-                                 return (NUMBER); }
-{string}                       { yylval.ptr = (char *) yytext;
-                                 return (STRING); }
-\#[^\n]*\n                     { ; }
-[\t ]                          { ; }
-\n                             { return ('\n'); }
-
-{word}                         { yylval.ptr = (char *) yytext;
-                                 return (STRING); }
-
-.                              { fprintf(stderr,
-                                       "xgc: bad character `%s', line %d\n",
-                                       yytext, yylineno); }
-
-%%
-
-#ifndef yywrap
-int yywrap(void) { return (1); }
-#endif
diff --git a/xgc/main.c b/xgc/main.c
deleted file mode 100644 (file)
index 08f88fa..0000000
+++ /dev/null
@@ -1,617 +0,0 @@
-/* $XConsortium: main.c,v 1.22 94/04/17 20:45:30 rws Exp $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xgc/main.c,v 1.6tsi Exp $ */
-
-/* xgc
-**
-** main.c
-**
-** Contains the bare minimum necessary to oversee the whole operation.
-*/
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Shell.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "xgc.h"
-#define DEFINE_TILE
-#include "tile"
-
-static void fill_up_commandform(Widget);
-static void quit(void);
-static void quitAction(Widget, XEvent *, String *, Cardinal *);
-static void clear_test_window(void);
-static void clear_result_window(void);
-static void set_foreground_and_background(void);
-
-/* The three columns in the XgcData arrays are:
-**   name: the name of the toggle button
-**   text: the corresponding text in the xgc syntax
-**   code: the integer that the text corresponds to, for sending stuff
-**         to X calls, etc.
-*/
-
-static XgcData FunctionData[NUM_FUNCTIONS] = {
-  {"clear",        "clear",        GXclear},
-  {"and",          "and",          GXand},
-  {"andReverse",   "andReverse",   GXandReverse},
-  {"copy",         "copy",         GXcopy},
-  {"andInverted",  "andInverted",  GXandInverted},
-  {"noop",         "noop",         GXnoop},
-  {"xor",          "xor",          GXxor},
-  {"or",           "or",           GXor},
-  {"nor",          "nor",          GXnor},
-  {"equiv",        "equiv",        GXequiv},
-  {"invert",       "invert",       GXinvert},
-  {"orReverse",    "orReverse",    GXorReverse},
-  {"copyInverted", "copyInverted", GXcopyInverted},
-  {"orInverted",   "orInverted",   GXorInverted},
-  {"nand",         "nand",         GXnand},
-  {"set",          "set",          GXset}
-}; 
-
-/* The two rows in the XgcStuff structure are:
-**   name of label, xgc syntax text, # of toggles, # of columns of toggles
-**     (0 columns means 1 row, as many columns as necessary)
-**   appropriate XgcData
-*/
-
-XgcStuff FunctionStuff = {
-  {"Function","function",NUM_FUNCTIONS,4},
-  FunctionData
-};
-
-static XgcData TestData[NUM_TESTS] = {
-  {"Copy Area",          "CopyArea",      CopyArea},
-  {"Copy Plane",         "CopyPlane",     CopyPlane},
-  {"Points",             "PolyPoint",     PolyPoint},
-  {"Lines",              "PolyLine",      PolyLine},
-  {"Segments",           "PolySegment",   PolySegment},
-  {"Rectangles",         "PolyRectangle", PolyRectangle},
-  {"Arcs",               "PolyArc",       PolyArc},
-  {"(Filled Polygons)",  "FillPolygon",   FillPolygon},
-  {"Filled Rectangles",  "PolyFillRect",  PolyFillRect},
-  {"Filled Arcs",        "PolyFillArc",   PolyFillArc},
-  {"Put Image",          "PutImage",      PutImage},
-  {"(Get Image)",        "GetImage",      GetImage},
-  {"Text 8",             "PolyText8",     PolyText8},
-  {"Image Text 8",       "ImageText8",    ImageText8},
-  {"Text 16",            "PolyText16",    PolyText16},
-  {"Image Text 16",      "ImageText16",   ImageText16}
-};
-
-XgcStuff TestStuff = {
-  {"Test","test",NUM_TESTS,2},
-  TestData
-};
-
-static XgcData LinestyleData[NUM_LINESTYLES] = {
-  {"Solid",      "Solid",       LineSolid},
-  {"OnOffDash",  "OnOffDash",   LineOnOffDash},
-  {"DoubleDash", "DoubleDash",  LineDoubleDash}
-};
-
-XgcStuff LinestyleStuff = {
-  {"LineStyle","linestyle",NUM_LINESTYLES,0},
-  LinestyleData
-};
-
-static XgcData CapstyleData[NUM_CAPSTYLES] = {
-  {"NotLast",    "NotLast",     CapNotLast},
-  {"Butt",       "Butt",        CapButt},
-  {"Round",      "Round",       CapRound},
-  {"Projecting", "Projecting",  CapProjecting}
-};
-
-XgcStuff CapstyleStuff = {
-  {"CapStyle","capstyle",NUM_CAPSTYLES,2},
-  CapstyleData
-};
-
-static XgcData JoinstyleData[NUM_JOINSTYLES] = {
-  {"Miter",   "Miter",   JoinMiter},
-  {"Round",   "Round",   JoinRound},
-  {"Bevel",   "Bevel",   JoinBevel}
-};
-
-XgcStuff JoinstyleStuff = {
-  {"JoinStyle","joinstyle",NUM_JOINSTYLES,0},
-  JoinstyleData
-};
-
-static XgcData FillstyleData[NUM_FILLSTYLES] = {
-  {"Solid",          "Solid",          FillSolid},
-  {"Tiled",          "Tiled",          FillTiled},
-  {"Stippled",       "Stippled",       FillStippled},
-  {"OpaqueStippled", "OpaqueStippled", FillOpaqueStippled}
-};
-
-XgcStuff FillstyleStuff = {
-  {"FillStyle","fillstyle",NUM_FILLSTYLES,2},
-  FillstyleData
-};
-
-static XgcData FillruleData[NUM_FILLRULES] = {
-  {"EvenOdd",  "EvenOdd",  EvenOddRule},
-  {"Winding",  "Winding",  WindingRule}
-};
-
-XgcStuff FillruleStuff = {
-  {"FillRule","fillrule",NUM_FILLRULES,0},
-  FillruleData
-};
-
-static XgcData ArcmodeData[NUM_ARCMODES] = {
-  {"Chord",    "Chord",    ArcChord},
- {"PieSlice", "PieSlice", ArcPieSlice}
-};
-
-XgcStuff ArcmodeStuff = {
-  {"ArcMode","arcmode",NUM_ARCMODES,0},
-  ArcmodeData
-};
-
-/* Pointers to all the Xgcstuffs so we can run them through a loop */
-
-static XgcStuff *Everything[8] = {
-  &FunctionStuff,
-  &LinestyleStuff,
-  &CapstyleStuff,
-  &JoinstyleStuff,
-  &FillstyleStuff,
-  &FillruleStuff,
-  &ArcmodeStuff,
-  &TestStuff
-};
-
-#ifdef notdef
-int fildes[2];                 /* for pipe */
-FILE *outend;
-#endif
-
-XStuff X;                      /* GC stuff plus some global variables */
-Boolean recording = FALSE;     /* Whether we're recording into a file */
-XtAppContext appcontext;       /* To make Xt happy */
-static Atom wm_delete_window;
-static XtActionsRec actions[] = {
-    {"quit",   quitAction}
-};
-
-static Widget bigdaddy;                /* the top level widget */
-       Widget topform;         /* form surrounding the whole thing */
-       Widget GCform;          /* form in which you choose the GC */
-static Widget Testform;                /* form in which you choose the test */
-       Widget testchoiceform;   /* form inside that */
-  ChoiceDesc *testchoicedesc;  /* record of what widgets are in the
-                                  test choice form */
-static Widget commandform;     /* form with run, quit, clear, etc. */
-       Widget test;            /* where the test is run */
-       Widget result;           /* where the results are displayed */
-static Widget runbutton;       /* command for running */
-static Widget clearbutton;     /* command for clearing the test window */
-       Widget recordbutton;    /* start/stop recording */
-static Widget playbackbutton;  /* playback from file */
-static Widget keyinputbutton;  /* start reading from keyboard */
-static Widget GCchoices[NUMCHOICES]; /* all the forms that contain stuff
-                                       for changing GC's*/
-  ChoiceDesc *GCdescs[NUMCHOICES]; /* record of the widgets inside
-                                     the choice widgets */
-       Widget planemaskchoice; /* form for choosing the plane mask */
-       Widget dashlistchoice;  /* form for choosing the dash list */
-static Widget linewidthchoice; /* form for choosing line width */
-       Widget linewidthtext;   /* text widget within that */
-static Widget fontchoice;      /* form for choosing the font */
-       Widget fonttext;                /* text widget within that */
-static Widget foregroundchoice;        /* form for choosing foreground */
-       Widget foregroundtext;  /* text widget within that */
-static Widget backgroundchoice;        /* form for choosing background */
-       Widget backgroundtext;  /* text widget within that */
-static Widget percentchoice;   /* form for choosing percentage of test */
-
-/* main(argc.argv)
-** ---------------
-** Initializes the toolkit, initializes data, puts up the widgets,
-** starts the event loop.
-*/
-
-int
-main(int argc, char *argv[])
-{
-  static Arg shellargs[] = {
-    {XtNinput,               (XtArgVal) True}
-  };
-
-  static Arg testformargs[] = {        
-    {XtNfromVert,     (XtArgVal) NULL} /* put it under GCform */
-  };
-
-  static Arg commandformargs[] = {
-    {XtNfromVert,    (XtArgVal) NULL}, /* put it under GCform */
-    {XtNfromHoriz,   (XtArgVal) NULL}  /* and to the right of Testform */
-  };
-
-  static Arg testargs[] = {
-    {XtNheight,     (XtArgVal) 400},
-    {XtNwidth,      (XtArgVal) 400},
-    {XtNfromHoriz,  (XtArgVal) NULL} /* put it to the right of GCform */
-  };
-
-  static Arg resultargs[] = {
-    {XtNheight,     (XtArgVal) 50},
-    {XtNwidth,      (XtArgVal) 400},
-    {XtNfromHoriz,  (XtArgVal) NULL}, /* put it to the right of GCform */
-    {XtNfromVert,   (XtArgVal) NULL} /* and under test */
-  };
-
-  static Arg gcchoiceargs[] = {
-    {XtNfromVert,    (XtArgVal) NULL}, /* put it under the one above it */
-    {XtNfromHoriz,   (XtArgVal) NULL}, /* and next to that one */
-    {XtNborderWidth, (XtArgVal) 0}     /* no ugly borders */
-  };
-
-  static Arg testchoiceargs[] = {
-    {XtNborderWidth, (XtArgVal) 0}
-  };
-
-  int i;                       /* counter */
-
-  /* Open the pipe */
-
-#ifdef notdef
-  pipe(fildes);
-  outend = fdopen(fildes[0],"r");
-#endif
-
-  /* Initialize toolkit stuff */
-
-  XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
-
-  bigdaddy = XtAppInitialize(&appcontext, "Xgc", (XrmOptionDescList) NULL,
-                            (Cardinal) 0, &argc, argv, (String *) NULL,
-                            shellargs, XtNumber(shellargs));
-  X.dpy = XtDisplay(bigdaddy);
-  XtAppAddActions(appcontext, actions, XtNumber(actions));
-  XtOverrideTranslations
-      (bigdaddy, XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()"));
-
-  /* Initialize GC stuff */
-
-  X.scr = DefaultScreenOfDisplay(X.dpy);
-  X.gc = XCreateGC(X.dpy,RootWindowOfScreen(X.scr),0,(XGCValues *) NULL);
-  X.miscgc = XCreateGC(X.dpy,RootWindowOfScreen(X.scr),0,(XGCValues *) NULL);
-
-  /* Find out what the foreground & background are, and update the GC
-  ** accordingly */
-
-  set_foreground_and_background();
-
-  topform = XtCreateManagedWidget("topform",formWidgetClass,bigdaddy,
-                                 NULL,0);
-
-  GCform = XtCreateManagedWidget("GCform",formWidgetClass,topform,
-                               NULL,0);
-
-  /* create all the GCchoices forms */
-
-  for (i=0;i<NUMCHOICES;++i) {
-    if (i==0)                  /* on top */
-      gcchoiceargs[0].value = (XtArgVal) NULL;
-    else                       /* under the last one */
-      gcchoiceargs[0].value = (XtArgVal) GCchoices[i-1];
-
-    GCchoices[i] = XtCreateManagedWidget(Everything[i]->choice.text,
-                                        formWidgetClass,GCform,
-                                        gcchoiceargs,XtNumber(gcchoiceargs));
-
-    /* now fill up that form */
-    GCdescs[i] = create_choice(GCchoices[i],Everything[i]);
-  }
-
-  /* put the planemask choice under the bottom GC choice */
-  gcchoiceargs[0].value = (XtArgVal) GCchoices[NUMCHOICES-1];
-  planemaskchoice = XtCreateManagedWidget("planemask",formWidgetClass,GCform,
-                                 gcchoiceargs,XtNumber(gcchoiceargs));
-  /* fill it up */
-  create_planemask_choice(planemaskchoice);
-
-  /* put the dashlist choice under the planemask choice */
-  gcchoiceargs[0].value = (XtArgVal) planemaskchoice;
-  dashlistchoice = XtCreateManagedWidget("dashlist",formWidgetClass,GCform,
-                                 gcchoiceargs,XtNumber(gcchoiceargs));
-  /* fill it up */
-  create_dashlist_choice(dashlistchoice);
-
-  /* put the linewidth choice under the dashlist choice */
-  gcchoiceargs[0].value = (XtArgVal) dashlistchoice;
-  linewidthchoice = XtCreateManagedWidget("linewidth",formWidgetClass,GCform,
-                                 gcchoiceargs,XtNumber(gcchoiceargs));
-  /* fill it up */
-  linewidthtext = create_text_choice(linewidthchoice,TLineWidth,2,30);
-
-  /* put the font choice under the linewidth choice */
-  gcchoiceargs[0].value = (XtArgVal) linewidthchoice;
-  fontchoice = XtCreateManagedWidget("font",formWidgetClass,GCform,
-                                    gcchoiceargs,XtNumber(gcchoiceargs));
-  /* fill it up */
-  fonttext = create_text_choice(fontchoice,TFont,80,300);
-
-  gcchoiceargs[0].value = (XtArgVal) fontchoice;
-  foregroundchoice = XtCreateManagedWidget("foreground",formWidgetClass,GCform,
-                                  gcchoiceargs,XtNumber(gcchoiceargs));
-  foregroundtext = create_text_choice(foregroundchoice,TForeground,9,50);
-  /* FIXME 9 characters may not be the proper choice; really it
-   * should understand a more proper pixel specification... */
-
-  gcchoiceargs[1].value = (XtArgVal) foregroundchoice;
-  backgroundchoice = XtCreateManagedWidget("background",formWidgetClass,GCform,
-                                  gcchoiceargs,XtNumber(gcchoiceargs));
-  backgroundtext = create_text_choice(backgroundchoice,TBackground,9,50);
-  
-  gcchoiceargs[1].value = (XtArgVal) NULL;
-  gcchoiceargs[0].value = (XtArgVal) foregroundchoice;
-  percentchoice = XtCreateManagedWidget("testpercent",formWidgetClass,GCform,
-                                gcchoiceargs,XtNumber(gcchoiceargs));
-  X.percent = 1.0;
-  create_testfrac_choice(percentchoice);
-
-  /* make all the labels inside the choices line up nicely */
-  line_up_labels(GCdescs,(int) XtNumber(GCdescs));
-
-  /* put the test form under the GC form */
-  testformargs[0].value = (XtArgVal) GCform;
-  Testform = XtCreateManagedWidget("Testform",formWidgetClass,topform,
-                                  testformargs,XtNumber(testformargs));
-  
-  testchoiceform = XtCreateManagedWidget("testchoiceform",formWidgetClass,
-                            Testform,testchoiceargs,XtNumber(testchoiceargs));
-  testchoicedesc = create_choice(testchoiceform,Everything[CTest]);
-
-  commandformargs[0].value = (XtArgVal) GCform;
-  commandformargs[1].value = (XtArgVal) Testform;
-  commandform = XtCreateManagedWidget("commandform",formWidgetClass,topform,
-                             commandformargs,XtNumber(commandformargs));
-
-  /* Put the appropriate command buttons in the command form */
-
-  fill_up_commandform(commandform);
-
-  testargs[2].value = (XtArgVal) GCform;    /* to the right of */
-  test = XtCreateManagedWidget("test",widgetClass,topform,
-                              testargs,XtNumber(testargs));
-
-  resultargs[2].value = (XtArgVal) GCform; /* to the right of */
-  resultargs[3].value = (XtArgVal) test; /* under */
-  result = XtCreateManagedWidget("result",asciiTextWidgetClass,topform,
-                                resultargs,XtNumber(resultargs));
-
-  /* Now realize all the widgets */
-
-  XtRealizeWidget(bigdaddy);
-
-  /* Now do things we couldn't do until we had a window available */
-
-  X.win = XtWindow(test);
-  X.tile = XCreatePixmap(X.dpy,X.win,tile_width,tile_height,
-                        DefaultDepthOfScreen(X.scr));
-
-  X.tile = XCreatePixmapFromBitmapData(X.dpy,X.win,
-                                      (char *)tile_bits,tile_width,
-                                      tile_height,Black,White,
-                                      DefaultDepthOfScreen(X.scr));
-  X.stipple = XCreateBitmapFromData(X.dpy,X.win,(char *)tile_bits,tile_width,
-                                   tile_height);
-
-  XSetStipple(X.dpy,X.gc,X.stipple);
-  XSetStipple(X.dpy,X.miscgc,X.stipple);
-
-  GC_change_foreground(X.foreground,TRUE);
-  GC_change_background(X.background,TRUE);
-
-  wm_delete_window = XInternAtom(X.dpy, "WM_DELETE_WINDOW", False);
-  (void) XSetWMProtocols(X.dpy, XtWindow(bigdaddy), &wm_delete_window, 1);
-
-  /* Act like the user picked the first choice in each group */
-
-  choose_defaults(GCdescs,(int)XtNumber(GCdescs));
-  choose_defaults(&testchoicedesc,1);
-  
-  /* Loop forever, dealing with events */
-
-  XtAppMainLoop(appcontext);
-
-  return 0;
-}
-
-/* fill_up_commandform(w)
-** ----------------------
-** Put the appropriate command buttons in the command form (w).
-*/
-
-static void
-fill_up_commandform(Widget w)
-{
-  static XtCallbackRec runcallbacklist[] = {
-    {(XtCallbackProc) run_test,  NULL},
-    {NULL,                       NULL}
-  };
-
-  static XtCallbackRec quitcallbacklist[] = {
-    {(XtCallbackProc) quit,      NULL},
-    {NULL,                       NULL}
-  };
-
-  static XtCallbackRec clearcallbacklist[] = {
-    {(XtCallbackProc) clear_test_window,    NULL},
-    {(XtCallbackProc) clear_result_window,  NULL},
-    {NULL,                                  NULL}
-  };
-
-  static XtCallbackRec playbackcallbacklist[] = {
-    {(XtCallbackProc) start_playback,       NULL},
-    {NULL,                                  NULL}
-  };
-
-  static XtCallbackRec keyinputcallbacklist[] = {
-    {(XtCallbackProc) read_from_keyboard,   NULL},
-    {NULL,                                  NULL}
-  };
-
-  static XtCallbackRec recordcallbacklist[] = {
-    {(XtCallbackProc) toggle_recordbutton,  NULL},
-    {NULL,                                  NULL}
-  };
-
-  static Arg runargs[] = {
-    {XtNcallback,    (XtArgVal) NULL}
-  };
-
-  static Arg clearargs[] = {
-    {XtNcallback,    (XtArgVal) NULL},
-    {XtNfromVert,    (XtArgVal) NULL}, /* put it under runbutton */
-    {XtNvertDistance,(XtArgVal) 10}
-  };
-
-  static Arg recordargs[] = {
-    {XtNcallback,    (XtArgVal) NULL},
-    {XtNfromVert,    (XtArgVal) NULL}, /* put it under clearbutton */
-    {XtNvertDistance,(XtArgVal) 10},
-    {XtNresizable,   (XtArgVal) True} /* so we can change the name */
-  };
-
-  static Arg playbackargs[] = {
-    {XtNcallback,    (XtArgVal) NULL},
-    {XtNfromVert,    (XtArgVal) NULL} /* put it under recordbutton */
-  };
-
-  static Arg keyinputargs[] = {
-    {XtNcallback,     (XtArgVal) NULL},
-    {XtNfromVert,    (XtArgVal) NULL} /* put it under playbackbutton */
-  };
-
-  static Arg quitargs[] = {
-    {XtNcallback,    (XtArgVal) NULL},
-    {XtNfromVert,    (XtArgVal) NULL}, /* put it under keyinputbutton */
-    {XtNvertDistance,(XtArgVal) 10}
-  };
-
-  runargs[0].value = (XtArgVal) runcallbacklist;
-  runbutton = XtCreateManagedWidget("Run",commandWidgetClass,
-                             w,runargs,XtNumber(runargs));
-
-  clearargs[0].value = (XtArgVal) clearcallbacklist;
-  clearargs[1].value = (XtArgVal) runbutton; /* under */
-  clearbutton = XtCreateManagedWidget("Clear window",commandWidgetClass,
-                             w,clearargs,XtNumber(clearargs));
-
-  recordargs[0].value = (XtArgVal) recordcallbacklist;
-  recordargs[1].value = (XtArgVal) clearbutton;        /* under */
-  recordbutton = XtCreateManagedWidget("Record",commandWidgetClass,
-                             w,recordargs,XtNumber(recordargs));
-
-  playbackargs[0].value = (XtArgVal) playbackcallbacklist;
-  playbackargs[1].value = (XtArgVal) recordbutton; /* under */
-  playbackbutton = XtCreateManagedWidget("Playback",commandWidgetClass,
-                             w,playbackargs,XtNumber(playbackargs));
-
-  keyinputargs[0].value = (XtArgVal) keyinputcallbacklist;
-  keyinputargs[1].value = (XtArgVal) playbackbutton;
-  keyinputbutton = XtCreateManagedWidget("Read Input",commandWidgetClass,
-                             w,keyinputargs,XtNumber(keyinputargs));
-
-  quitargs[0].value = (XtArgVal) quitcallbacklist;
-  quitargs[1].value = (XtArgVal) keyinputbutton; /* under */
-  (void) XtCreateManagedWidget("Quit",commandWidgetClass,
-                              w,quitargs,XtNumber(quitargs));
-    
-}    
-/* quit()
-** ------
-** Leave the program nicely.
-*/
-
-static void
-quit(void)
-{
-  close_file_if_recording();
-  exit(0);
-}
-
-static void quitAction(Widget w, XEvent *e, String *p, Cardinal *n)
-{
-    if (e->type == ClientMessage && e->xclient.data.l[0] != wm_delete_window)
-       XBell(XtDisplay(w), 0);
-    else 
-       quit();
-}
-
-/* clear_test_window()
-** -------------------
-** Clear the test window.
-*/
-
-static void
-clear_test_window(void)
-{
-  XClearWindow(X.dpy,XtWindow(test));
-}
-
-/* clear_result_window()
-** ---------------------
-** Clear the result window.
-*/
-
-static void
-clear_result_window(void)
-{
-  set_text(result, "");
-}
-
-/* set_foreground_and_background()
-** -------------------------------
-** Finds the user-specified foreground and background by querying
-** the resource manager, and sets state accordingly.  Also specifies
-** the initial font for text tests.
-*/
-
-static void
-set_foreground_and_background(void)
-{
-  X.gcv.foreground = X.foreground = 0;
-  X.gcv.background = X.background = 0xffffffff;
-
-  X.fontname = "6x10";
-  GC_change_font(X.fontname,FALSE);
-}
diff --git a/xgc/planemask.c b/xgc/planemask.c
deleted file mode 100644 (file)
index c710562..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-** planemask.c
-**
-** How to make a widget to choose a planemask.
-**
-** NOTE: This file uses static variables.  Therefore, trying to use these
-**       functions to create more than one of these planemask choice things
-**       will fail in a big way.
-*/
-/* $XFree86: xc/programs/xgc/planemask.c,v 1.3 2000/02/17 14:00:37 dawes Exp $ */
-
-#include <X11/Xos.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Toggle.h>
-#include "xgc.h"
-
-static void choose_plane(Widget, caddr_t, caddr_t);
-
-static unsigned long planemask;        
-static Widget *pm;
-
-/* create_planemask_choice(w)
-** -------------------------
-** Inside w (a form widget), creates a bunch of little toggle buttons
-** in a row, representing the planemask.  There's also a label so
-** the user knows what it is.
-*/
-
-void
-create_planemask_choice(Widget w)
-{
-  /* callback list for the toggle widgets */
-  static XtCallbackRec callbacklist[] = {
-    {(XtCallbackProc) choose_plane, NULL},
-    {NULL,                          NULL}
-  };
-
-  /* ArgList for the label */
-  static Arg labelargs[] = {
-    {XtNborderWidth,     (XtArgVal) 0},
-    {XtNjustify,         (XtArgVal) XtJustifyRight},
-    {XtNvertDistance,    (XtArgVal) 4}
-  };
-
-  /* ArgList for the toggles */
-  static Arg pmargs[] = {
-    {XtNcallback,          (XtArgVal) NULL},
-    {XtNhorizDistance,     (XtArgVal) NULL},
-    {XtNfromHoriz,         (XtArgVal) NULL},
-    {XtNwidth,             (XtArgVal) 10},
-    {XtNheight,            (XtArgVal) 10},
-    {XtNhighlightThickness,(XtArgVal) 1},
-    {XtNstate,             (XtArgVal) True},
-    {XtNlabel,             (XtArgVal) ""}
-  };
-
-  static Widget label;         /* the label, of course */
-  static int *pminfo;          /* contains integers saying which bit
-                                  a particular button is; sent to
-                                  choose_plane to tell it which
-                                  bit got changed */
-
-  int i, num_planes;
-
-  char buf[40];
-  char name[12];
-
-  num_planes = PlanesOfScreen(X.scr);
-
-  planemask = (1<<num_planes)-1;
-  snprintf(buf, sizeof buf, "planemask %lu",planemask);
-  interpret(buf);
-
-  /* Allocate space for stuff that we don't know the size of yet */
-
-  pm = (Widget *) malloc(num_planes * sizeof(Widget));
-  pminfo = (int *) malloc(num_planes * sizeof(int));
-
-  /* Make the label widget */
-
-  label = XtCreateManagedWidget("planemask",labelWidgetClass,w,
-                               labelargs,XtNumber(labelargs));
-
-  pmargs[0].value = (XtArgVal) callbacklist;
-
-  for (i=0;i<num_planes;++i) { /* go through all the buttons */
-    if (i==0) {                        /* offset the first one from the label */
-      pmargs[1].value = (XtArgVal) 10;
-      pmargs[2].value = (XtArgVal) label;
-    }
-    else {                     /* put it directly to the right of the
-                                  last one, no space in between */
-      pmargs[1].value = (XtArgVal) -1;
-      pmargs[2].value = (XtArgVal) pm[i-1];
-    }
-
-    /* set its original state depending on the state of that bit
-    ** of the planemask */
-
-    if (planemask & 1<<i)
-      pmargs[6].value = (XtArgVal) True;
-    else
-      pmargs[6].value = (XtArgVal) False;
-
-    snprintf(name, sizeof name, "planemask%d",i);
-
-    pminfo[i] = i;             /* which bit we're on; this is needed in
-                                  choose_plane (the callback) */
-    callbacklist[0].closure = (caddr_t) &pminfo[i];
-
-    pm[i] = XtCreateManagedWidget(name,toggleWidgetClass,w,
-                                 pmargs,XtNumber(pmargs));
-  }
-}
-
-/* choose_plane(w,closure,call_data)
-** ------------------------------------
-** This function is called when the user toggles a toggle widget.  It
-** makes the appropriate change to the planemask and sends it off
-** to interpret().
-** Funny args are because it's a callback.
-*/
-
-/*ARGSUSED*/
-static void
-choose_plane(Widget w, caddr_t closure, caddr_t call_data)
-{
-  int num;                     /* what number button it is */
-  Boolean on;                  /* is it currently on or off? */
-
-  char buf[80];                        /* string to send to interpret() */
-
-  static Arg args[] = {
-    {XtNstate,    (XtArgVal) NULL}
-  };
-
-  /* set up ArgList so that 'on' will contain the state */
-  args[0].value = (XtArgVal) &on;
-
-  num = * (int *) closure;     /* we put it here back in the last function */
-  XtGetValues(w,args,XtNumber(args));
-
-  /* Modify the planemask appropriately */
-
-  if (on)
-    planemask |= 1<<num;
-  else
-    planemask &= ~(1<<num);
-
-  (void) snprintf(buf, sizeof buf, "planemask %lu\n",planemask);
-  interpret(buf);
-}
-
-/* update_planemask(mask)
-** ----------------------
-** Updates the display of the planemask so that it corresponds to mask.
-*/
-
-void
-update_planemask(long mask)
-{
-  int i;                       /* counter */
-  static Arg maskargs[] = {    /* ArgList for setting toggle state */
-    {XtNstate,     (XtArgVal) NULL}
-  };
-
-  /* First set the internal representation */
-
-  planemask = mask;
-
-  for (i = 0; i < PlanesOfScreen(X.scr); ++i) {
-    if (planemask & 1<<i) {        /* if it's set, make it look that way */
-      maskargs[0].value = (XtArgVal) True;
-    }
-    else {
-      maskargs[0].value = (XtArgVal) False;
-    }
-
-    XtSetValues(pm[i],maskargs,XtNumber(maskargs));
-  }
-}
diff --git a/xgc/record.c b/xgc/record.c
deleted file mode 100644 (file)
index db5ec65..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
-** xgc
-**
-** record.c
-*/
-/* $XFree86: xc/programs/xgc/record.c,v 1.3 2000/02/17 14:00:37 dawes Exp $ */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/AsciiText.h>
-#include <stdio.h>
-
-#include "xgc.h"
-
-static void start_recording(void);
-static void stop_recording(void);
-static void print_out_gc_values(void);
-static void chose_playback_filename(void);
-static void cancel_playback(void);
-static void done_choosing_filename(void) ;
-static void cancel_record(void);
-
-FILE *recordfile;              /* the file we're recording to */
-FILE *playbackfile;            /* the file we're playing back from */
-
-/* toggle_recordbutton(w,closure,call_data)
-** ----------------------------------------
-** This function is called when the user presses the "Record"
-** command button.  If we're not recording, we start; if we are,
-** we stop.  Also change the label to reflect the change in the
-** function of the button.
-*/
-
-/*ARGSUSED*/
-void
-toggle_recordbutton(Widget w, caddr_t closure, caddr_t call_data)
-{
-  /* ArgList for changing the label */
-  static Arg recordargs[] = {
-    {XtNlabel,        (XtArgVal) NULL}
-  };
-  
-  char tmp[20];                        /* new label */
-  
-  if (!recording) {
-    start_recording();
-  }
-  else {
-    recording = FALSE;
-    stop_recording();
-    snprintf(tmp, sizeof tmp, "Record");
-    recordargs[0].value = (XtArgVal) tmp;
-  }
-
-  XtSetValues(recordbutton,recordargs,XtNumber(recordargs));
-}
-
-/* start_recording()
-** -----------------
-** Get the name of the file the user wants to record into, and
-** start recording into it if he doesn't cancel.
-*/
-
-static void
-start_recording(void) 
-{
-  get_filename(done_choosing_filename,cancel_record);
-}
-
-/* stop_recording()
-** ----------------
-** Close the output file.
-*/
-
-static void
-stop_recording(void) 
-{
-  fclose(recordfile);
-}
-
-/* cancel_record()
-** ---------------
-** What to do if the if the user canceled recording, i.e. nothing.
-*/
-
-static void
-cancel_record(void) 
-{
-}
-
-/* done_choosing_filename()
-** ------------------------
-** What to do after the user's chosen a file.  Change the label on the
-** command button, open the file, and dump the current contents of the
-** GC into it.
-*/
-
-static void
-done_choosing_filename(void) 
-{
-  static Arg recordargs[] = {
-    {XtNlabel,        (XtArgVal) NULL},
-    {XtNresize,       (XtArgVal) True}
-  };
-  Arg args[1];
-  char tmp[20], *filename;
-
-  XtSetArg(args[0], XtNstring, &filename);
-  XtGetValues(filename_text_widget, args, (Cardinal) 1);
-
-  if ((recordfile = fopen(filename,"w")) != NULL) {
-    recording = TRUE;
-    snprintf(tmp, sizeof tmp, "End Record");
-    recordargs[0].value = (XtArgVal) tmp;
-    XtSetValues(recordbutton,recordargs,XtNumber(recordargs));
-
-    print_out_gc_values();
-  }
-}
-
-/* print_if_recording(str)
-** -----------------------
-** If we're recording to a file, put str in it.
-*/
-
-void
-print_if_recording(const char *str)
-{
-  if (recording)
-    fprintf(recordfile,"%s",str);
-}
-
-/* close_file_if_recording()
-** -------------------------
-** If we're recording, stop.
-*/
-
-void 
-close_file_if_recording(void)
-{
-  if (recording)
-    fclose(recordfile);
-}
-
-/* print_out_gc_values()
-** ---------------------
-** Dump the contents of the GC to the file, so that when the file gets
-** played back, it will be correctly initialized.
-*/
-
-static void
-print_out_gc_values(void)
-{
-  int i;
-  for (i=0;i<NUM_TESTS;++i) {
-    if ((TestStuff.data)[i].code == X.test) {
-      fprintf(recordfile,"%s %s\n",
-             TestStuff.choice.text,(TestStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_FUNCTIONS;++i) {
-    if ((FunctionStuff.data)[i].code == X.gcv.function) {
-      fprintf(recordfile,"%s %s\n",
-             FunctionStuff.choice.text,(FunctionStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_LINESTYLES;++i) {
-    if ((LinestyleStuff.data)[i].code == X.gcv.line_style) {
-      fprintf(recordfile,"%s %s\n",
-             LinestyleStuff.choice.text,(LinestyleStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_CAPSTYLES;++i) {
-    if ((CapstyleStuff.data)[i].code == X.gcv.cap_style) {
-      fprintf(recordfile,"%s %s\n",
-             CapstyleStuff.choice.text,(CapstyleStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_JOINSTYLES;++i) {
-    if ((JoinstyleStuff.data)[i].code == X.gcv.join_style) {
-      fprintf(recordfile,"%s %s\n",
-             JoinstyleStuff.choice.text,(JoinstyleStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_FILLSTYLES;++i) {
-    if ((FillstyleStuff.data)[i].code == X.gcv.fill_style) {
-      fprintf(recordfile,"%s %s\n",
-             FillstyleStuff.choice.text,(FillstyleStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_FILLRULES;++i) {
-    if ((FillruleStuff.data)[i].code == X.gcv.fill_rule) {
-      fprintf(recordfile,"%s %s\n",
-             FillruleStuff.choice.text,(FillruleStuff.data)[i].text);
-      break;
-    }
-  }
-  for (i=0;i<NUM_ARCMODES;++i) {
-    if ((ArcmodeStuff.data)[i].code == X.gcv.arc_mode) {
-      fprintf(recordfile,"%s %s\n",
-             ArcmodeStuff.choice.text,(ArcmodeStuff.data)[i].text);
-      break;
-    }
-  }
-  fprintf(recordfile,"linewidth %d\n",X.gcv.line_width);
-  fprintf(recordfile,"foreground %ld\n",X.gcv.foreground);
-  fprintf(recordfile,"background %ld\n",X.gcv.background);
-  fprintf(recordfile,"planemask %ld\n",X.gcv.plane_mask);
-  fprintf(recordfile,"dashlist %d\n",X.gcv.dashes);
-  fprintf(recordfile,"font %s\n",X.fontname);
-}  
-
-/********************************************/
-
-/* start_playback()
-** ----------------
-** This gets called if the user wants to playback from a file.
-** Get the file name and do the appropriate thing.
-*/
-
-void
-start_playback(void)
-{
-  get_filename(chose_playback_filename,cancel_playback);
-}
-
-/* cancel_playback()
-** -----------------
-** What to do if the user canceled the playback request.
-*/
-
-static void
-cancel_playback(void)
-{
-}
-
-/* chose_playback_filename()
-** -------------------------
-** What to do once the user's selected a filename to playback.
-** Play it back.
-*/
-
-static void
-chose_playback_filename(void)
-{
-  Arg args[1];
-  char *filename;
-
-  XtSetArg(args[0], XtNstring, &filename);
-  XtGetValues(filename_text_widget, args, (Cardinal) 1);
-
-  if ((playbackfile = fopen(filename,"r")) != NULL) {
-    yyin = playbackfile;
-    yyparse();
-  }
-}
-
-/* read_from_keyboard()
-** --------------------
-** Do a playback from the keyboard.
-*/
-
-void
-read_from_keyboard(void)
-{
-  yyin = stdin;
-  yyparse();
-}
diff --git a/xgc/testfrac.c b/xgc/testfrac.c
deleted file mode 100644 (file)
index c5afd75..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-** testfrac.c
-**
-** How to make a widget to choose the fraction of tests to be run.
-**
-*/
-/* $XFree86: xc/programs/xgc/testfrac.c,v 1.4 2003/05/07 21:02:07 herrb Exp $ */
-
-#include <stdio.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/Scrollbar.h>
-#include "xgc.h"
-
-#define SCROLLBAR_LENGTH 125
-#define SLIDER_LENGTH 0.2      /* proportion of scrollbar taken up
-                                  by the slider */
-
-static Widget label;           /* the label */
-static Widget slider;          /* the scrollbar */
-static Widget percent; /* label with chosen percentage */
-
-static float fraction;         /* what percent has been chosen */
-static int   oldpercent = -1;  /* so we only update when the slider has
-                                  been moved */
-
-/* slider_jump(w,data,position)
-** ----------------------------
-** This function is called if the user moves the scrollbar to a new
-** position (generally, by using the middle button).  It updates
-** information about where the scrollbar is.
-*/
-
-/*ARGSUSED*/
-static void
-slider_jump(Widget w, caddr_t data, caddr_t position)
-{
-  static Arg percentargs[] = {
-    {XtNlabel,   (XtArgVal) NULL}
-  };
-
-  float oldpercent;            /* where the scrollbar is */
-  float newpercent;            /* normalized scrollbar */
-  char snewpercent[4];         /* string representation of scrollbar */
-
-  oldpercent = *(float *) position;
-
-  /* We want the scrollbar to be at 100% when the right edge of the slider
-  ** hits the end of the scrollbar, not the left edge.  When the right edge
-  ** is at 1.0, the left edge is at 1.0 - SLIDER_LENGTH.  Normalize
-  ** accordingly.  */
-   
-  newpercent = oldpercent / (1.0 - SLIDER_LENGTH);
-
-  /* If the slider's partially out of the scrollbar, move it back in. */
-
-  if (newpercent > 1.0) {
-    newpercent = 1.0;
-    XawScrollbarSetThumb( slider, 1.0 - SLIDER_LENGTH, SLIDER_LENGTH);
-  }
-
-  /* Store the position of the silder where it can be found */
-
-  *(float *)data = newpercent;
-
-  /* Update the label widget */
-
-  snprintf(snewpercent, sizeof snewpercent, "%d",(int)(newpercent*100));
-  percentargs[0].value = (XtArgVal) snewpercent;
-  XtSetValues(percent, percentargs, XtNumber(percentargs));
-}
-
-/* slider_scroll(w,data,position)
-** ------------------------------
-** This function is called when the user does incremental scrolling, 
-** generally with the left or right button.  Right now it just ignores it.
-*/
-
-/*ARGSUSED*/
-static void
-slider_scroll(Widget w, caddr_t data, caddr_t position)
-{
-}
-
-/*ARGSUSED*/
-static void
-update(Widget w, XEvent *event, String *params, int *num_params)
-{
-  char buf[80];
-  int newpercent;
-
-  newpercent = (int)(fraction * 100.0);
-  if (newpercent != oldpercent) {
-    snprintf(buf, sizeof buf, "percent %d\n", (int)(fraction * 100.0));
-    interpret(buf);
-    oldpercent = newpercent;
-  }
-}
-
-/* create_testfrac_choice(w)
-** -------------------------
-** Inside w (a form widget), creates:
-**   1. A label "Percentage of Test"
-**   2. A scrollbar for the user to choose the percentage (from 0 to 100)
-**   3. A label with the current percentage displayed on it.
-** The percentage starts at 100.
-**
-** When the pointer leaves the scrollbar, a string is sent to interpret()
-** so that it knows the position of the scrollbar.
-*/
-
-void
-create_testfrac_choice(Widget w)
-{
-  static XtCallbackRec jumpcallbacks[] = {
-    {(XtCallbackProc) slider_jump, NULL},
-    {NULL,                         NULL}
-  };
-
-  static XtCallbackRec scrollcallbacks[] = {
-    {(XtCallbackProc) slider_scroll, NULL},
-    {NULL,                           NULL}
-  };
-
-  static Arg labelargs[] = {
-    {XtNborderWidth,  (XtArgVal) 0},
-    {XtNjustify,      (XtArgVal) XtJustifyRight},
-    {XtNvertDistance, (XtArgVal) 4}
-  };
-
-  static Arg percentargs[] = {
-    {XtNhorizDistance,  (XtArgVal) 10},
-    {XtNfromHoriz,      (XtArgVal) NULL}
-  };
-
-  static Arg scrollargs[] = {
-    {XtNorientation,     (XtArgVal) XtorientHorizontal},
-    {XtNlength,          (XtArgVal) SCROLLBAR_LENGTH},
-    {XtNthickness,       (XtArgVal) 10},
-    {XtNshown,           (XtArgVal) 10},
-    {XtNhorizDistance,   (XtArgVal) 10},
-    {XtNfromHoriz,       (XtArgVal) NULL},
-    {XtNjumpProc,        (XtArgVal) NULL},
-    {XtNscrollProc,      (XtArgVal) NULL}
-  };
-    
-  static const char *translationtable = "<Leave>: Update()";
-
-  static XtActionsRec actiontable[] = {
-    {"Update",  (XtActionProc) update},
-    {NULL,      NULL}
-  };
-
-  /* Let the scrollbar know where to store information where we
-  ** can see it */
-
-  jumpcallbacks[0].closure = (caddr_t) &fraction;
-
-  label = XtCreateManagedWidget("Percentage of Test",labelWidgetClass,w,
-                               labelargs,XtNumber(labelargs));
-
-  percentargs[1].value = (XtArgVal) label;
-
-  percent = XtCreateManagedWidget("100",labelWidgetClass,w,
-                                 percentargs,XtNumber(percentargs));
-
-  scrollargs[5].value = (XtArgVal) percent;
-  scrollargs[6].value = (XtArgVal) jumpcallbacks;
-  scrollargs[7].value = (XtArgVal) scrollcallbacks;
-
-  slider = XtCreateManagedWidget("Slider",scrollbarWidgetClass,w,
-                                scrollargs,XtNumber(scrollargs));
-
-  XtAppAddActions(appcontext,actiontable,XtNumber(actiontable));
-  XtOverrideTranslations(slider,XtParseTranslationTable(translationtable));
-
-  /* Start the thumb out at 100% */
-
-  XawScrollbarSetThumb(slider, 1.0 - SLIDER_LENGTH, SLIDER_LENGTH);
-}
-
-void
-update_slider(int newpercent)
-{
-  fraction = (float) newpercent / 100.0;
-  XawScrollbarSetThumb(slider, fraction / (1.0-SLIDER_LENGTH), SLIDER_LENGTH);
-}
diff --git a/xgc/tests.c b/xgc/tests.c
deleted file mode 100644 (file)
index dcd32d2..0000000
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
-** $XConsortium: tests.c,v 1.20 91/06/08 18:57:07 rws Exp $
-** $XFree86: xc/programs/xgc/tests.c,v 1.11tsi Exp $
-**
-*/
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xos.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include "xgc.h"
-#ifdef SVR4
-#define SYSV
-#endif
-#if !defined(SYSV) && !defined(QNX4)
-#include <sys/timeb.h>
-#include <sys/resource.h>
-#endif
-
-#ifndef PI
-#define PI 3.14159265
-#endif
-
-#ifdef SYSV
-#define random lrand48
-#endif
-
-
-/* timer(flag)
-** -----------
-** When called with StartTimer, starts the stopwatch and returns nothing.
-** When called with EndTimer, stops the stopwatch and returns the time
-** in microseconds since it started.
-**
-** Uses rusage() so we can subtract the time used by the system and user
-** from our timer, and just concentrate on the time used in the X calls.
-*/
-
-static long
-timer(int flag)
-{
-#if !defined(SYSV)
-  static struct timeval starttime;  /* starting time for gettimeofday() */
-  struct timeval endtime;           /* ending time for gettimeofday() */
-#if !defined(__UNIXOS2__) && !defined(QNX4)
-  static struct rusage startusage;  /* starting time for getrusage() */
-  struct rusage endusage;           /* ending time for getrusage() */
-#endif
-  struct timezone tz;               /* to make gettimeofday() happy */
-
-  long elapsedtime;                 /* how long since we started the timer */
-
-  switch (flag) {
-    case StartTimer:                       /* store initial values */
-      gettimeofday(&starttime,&tz);       
-#if !defined(__UNIXOS2__) && !defined(QNX4)
-      getrusage(RUSAGE_SELF,&startusage);
-#endif
-      return((long) NULL);
-    case EndTimer:
-      gettimeofday(&endtime,&tz);          /* store final values */
-#if !defined(__UNIXOS2__) && !defined(QNX4)
-      getrusage(RUSAGE_SELF,&endusage);
-#endif
-
-  /* all the following line does is use the formula 
-     elapsed time = ending time - starting time, but there are three 
-     different timers and two different units of time, ack... */
-
-#if !defined(__UNIXOS2__) && !defined(QNX4)
-      elapsedtime = (long) ((long)
-       ((endtime.tv_sec - endusage.ru_utime.tv_sec - endusage.ru_stime.tv_sec
-        - starttime.tv_sec + startusage.ru_utime.tv_sec
-        + startusage.ru_stime.tv_sec)) * 1000000) + (long)
-      ((endtime.tv_usec - endusage.ru_utime.tv_usec - endusage.ru_stime.tv_usec
-        - starttime.tv_usec + startusage.ru_utime.tv_usec
-        + startusage.ru_stime.tv_usec));
-#else
-      elapsedtime = (long)( ((long)endtime.tv_sec-(long)starttime.tv_sec)*1000000
-                          +((long)endtime.tv_usec-(long)starttime.tv_usec));
-#endif
-      return(elapsedtime);                
-
-    default:                              
-      fprintf(stderr,"Invalid flag in timer()\n");
-      return((long) NULL);
-    }
-#else
-  static time_t starttime;
-  
-  switch (flag) {
-    case StartTimer:
-      time(&starttime);
-      return((long) NULL);
-    case EndTimer:
-      return( (time(NULL) - starttime) * 1000000);
-    default:
-      fprintf(stderr,"Invalid flag in timer()\n");
-      return((long) NULL);
-    }
-#endif
-}
-
-
-void
-copyarea_test(void)
-{
-  int num_copies = 200;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_copies *= X.percent;
-
-  XSetFillStyle(X.dpy,X.miscgc,FillTiled);
-  XFillRectangle(X.dpy,X.win,X.miscgc,0,0,400,400);
-
-  XSync(X.dpy,0);
-  timer(StartTimer);
-  for (i=0;i<num_copies;++i)
-    XCopyArea(X.dpy,X.win,X.win,X.gc,i,200-i,
-             200,200,200-i,i);
-  XSync(X.dpy,0);
-  totaltime = timer(EndTimer);
-
-  snprintf(buf,sizeof buf,"%.2f seconds.",(double)totaltime/1000000.);
-  show_result(buf);
-}
-
-void
-copyplane_test(void)
-{
-  int num_copies = 200;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  if(!X.gcv.plane_mask || (X.gcv.plane_mask & (X.gcv.plane_mask - 1))) {
-    show_result("exactly one bit in plane mask must be set for this test");
-    return;
-  }
-
-
-  num_copies *= X.percent;
-
-  XSetPlaneMask(X.dpy, X.gc, ~0L);
-  XSetFillStyle(X.dpy,X.miscgc,FillTiled);
-  XFillRectangle(X.dpy,X.win,X.miscgc,0,0,400,400);
-
-  XSync(X.dpy,0);
-  timer(StartTimer);
-  for (i=0;i<num_copies;++i)
-    XCopyPlane(X.dpy,X.win,X.win,X.gc,i,200-i,
-             200,200,200-i,i,X.gcv.plane_mask);
-  XSync(X.dpy,0);
-  totaltime = timer(EndTimer);
-  XSetPlaneMask(X.dpy, X.gc, X.gcv.plane_mask);
-
-  snprintf(buf,sizeof buf,"%.2f seconds.",(double)totaltime/1000000.);
-  show_result(buf);
-}
-
-void
-circle_line_test(int num_vertices, int radius)
-{
-  double theta, delta;
-  int length, centerx, centery, i;
-  int relative_angle;
-  long totaltime;
-  char buf[80];
-  XPoint *coord;
-
-  relative_angle = num_vertices*5/12+1;
-  delta = (double) relative_angle / (double) num_vertices * 2 * PI;
-  centerx = centery = 200;
-
-  coord = (XPoint *) malloc (sizeof(XPoint)*(num_vertices+1));
-
-  length = (int) (2 * radius * (float) atan(delta/2.));
-
-  for (i=0;i<=num_vertices;++i) {
-    theta = (double) i * delta;
-    coord[i].x = centerx + (int) (radius * cos(theta));
-    coord[i].y = centery + (int) (radius * sin(theta));
-  }
-
-  XSync(X.dpy,0);
-  timer(StartTimer);
-  XDrawLines(X.dpy,X.win,X.gc,coord,num_vertices+1,CoordModeOrigin);
-  XSync(X.dpy,0);
-  totaltime = timer(EndTimer);
-
-  snprintf(buf,sizeof buf,"%d lines of length %d in %.3f seconds.",num_vertices,
-         length,(double)totaltime/1000000.);
-  show_result(buf);
-
-  free(coord);
-}
-
-
-
-void
-polyline_test(void)
-{
-  circle_line_test((int)(601*X.percent),190);
-}
-
-void
-polysegment_test(void)
-{
-  XSegment *segments;
-  int num_segments = 600;
-  long totaltime;
-  char buf[80];
-  int i;
-
-  num_segments *= X.percent;
-
-  segments = (XSegment *) malloc(sizeof(XSegment) * num_segments);
-
-  segments[0].x1 = random()%400; segments[0].y1 = random()%400;
-  segments[0].x2 = random()%400; segments[0].y2 = random()%400;
-
-  for(i=1;i<num_segments;++i) {
-    segments[i].x1 = (segments[i-1].x1-segments[i-1].y2+400+i)%400;
-    segments[i].y1 = (segments[i-1].y1+segments[i-1].x2+i)%400;
-    segments[i].x2 = (segments[i-1].x1-segments[i-1].y1+400+i)%400;
-    segments[i].y2 = (segments[i-1].x2+segments[i-1].y2+i)%400;
-  }
-
-  XSync(X.dpy,0);
-  start_timer();
-  XDrawSegments(X.dpy,X.win,X.gc,segments,num_segments);
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-  
-  snprintf(buf,sizeof buf,"%d segments in %.3f seconds.",num_segments,
-         (double)totaltime/1000000.);
-  show_result(buf);
-
-  free(segments);
-}
-
-void
-polypoint_test(void)
-{
-  XPoint *points;
-  int num_points = 100000;
-  long totaltime;
-  char buf[80];
-  int i;
-  
-  num_points *= X.percent;
-
-  points = (XPoint *) malloc(sizeof(XPoint) * num_points);
-
-  points[0].x = random()%400; points[0].y = random()%400;
-  points[1].x = random()%400; points[1].y = random()%400;
-
-  for (i=2;i<num_points;++i) {
-    points[i].x = (points[i-1].x+points[i-2].y+i*3/200)%400;
-    points[i].y = (points[i-1].y+points[i-2].x+i*5/200)%400;
-  }
-
-  XSync(X.dpy,0);
-  start_timer();
-  XDrawPoints(X.dpy,X.win,X.gc,points,num_points,CoordModeOrigin);
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  snprintf(buf,sizeof buf,"%d points in %.3f seconds.",num_points,
-         (double)totaltime/1000000.);
-  show_result(buf);
-
-  free(points);
-}
-
-void
-genericrectangle_test(Boolean fill)
-{
-  XRectangle *rects;
-  int num_rects = 200;
-  int perimeter = 0, area = 0;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_rects *= X.percent;
-
-  rects = (XRectangle *) malloc(sizeof(XRectangle) * num_rects);
-
-  for (i=0;i<num_rects;++i) {
-    rects[i].x = rects[i].y = 200 - i;
-    rects[i].width = rects[i].height = 2 * i;
-    perimeter += rects[i].width * 2 + rects[i].height * 2;
-    area += rects[i].width * rects[i].height;
-  }
-
-  XSync(X.dpy,0);
-  start_timer();
-  if (fill) XFillRectangles(X.dpy,X.win,X.gc,rects,num_rects);
-  else XDrawRectangles(X.dpy,X.win,X.gc,rects,num_rects);
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  if (fill)
-    snprintf(buf,sizeof buf,"%d pixels in %.2f seconds.",area,(double)totaltime/1000000.);
-  else
-    snprintf(buf,sizeof buf,"Total line length %d in %.3f seconds.",perimeter,
-           (double)totaltime/1000000.);
-  show_result(buf);
-
-  free(rects);
-}
-
-void
-polyrectangle_test(void)
-{
-  genericrectangle_test(FALSE);
-}
-
-void
-polyfillrectangle_test(void)
-{
-  genericrectangle_test(TRUE);
-}
-
-/*****************************/
-
-void
-fillpolygon_test(void)
-{
-  int i;
-  int points_per_side = 40;
-  int spacing;
-  XPoint *points;
-  XPoint polypoints[3];
-
-  points = (XPoint *) malloc (sizeof(XPoint) * points_per_side * 4);
-  spacing = 400 / points_per_side;
-
-  for (i = 0; i < points_per_side; ++i) {
-    points[i].x = i * spacing;
-    points[i].y = 0;
-
-    points[i + points_per_side].x = 400;
-    points[i + points_per_side].y = i * spacing;
-
-    points[i + 2 * points_per_side].x = 400 - i * spacing;
-    points[i + 2 * points_per_side].y = 400;
-
-    points[i + 3 * points_per_side].x = 0;
-    points[i + 3 * points_per_side].y = 400 - i * spacing;
-  }
-
-  for (i = 0; i < 2 * points_per_side; i += 2) {
-    polypoints[0].x = points[i].x;
-    polypoints[0].y = points[i].y;
-
-    polypoints[1].x = points[i + 2 * points_per_side].x;
-    polypoints[1].y = points[i + 2 * points_per_side].y;
-
-    polypoints[2].x = points[i + 2 * points_per_side + 1].x;
-    polypoints[2].y = points[i + 2 * points_per_side + 1].y;
-
-    XFillPolygon (X.dpy, X.win, X.gc, polypoints, 3, Convex, CoordModeOrigin);
-  }
-  free(points);
-}
-
-/*****************************/
-
-void
-genericarc_test(Boolean fill)
-{
-  XArc *arcs;
-  int num_arcs = 180;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_arcs *= X.percent;
-
-  arcs = (XArc *) malloc(sizeof(XArc) * num_arcs);
-
-  for (i=0;i<num_arcs;++i) {
-    arcs[i].x = i;
-    arcs[i].y = i;
-    arcs[i].width = i;
-    arcs[i].height = i;
-    arcs[i].angle1 = i * 128;
-    arcs[i].angle2 = i * 128;
-  }
-
-  XSync(X.dpy,0);
-  start_timer();
-  if (fill) XFillArcs(X.dpy,X.win,X.gc,arcs,num_arcs);
-  else XDrawArcs(X.dpy,X.win,X.gc,arcs,num_arcs);
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  snprintf(buf,sizeof buf,"An uncounted number of pixels in %.3f seconds.",
-         (double)totaltime/1000000.);
-  show_result(buf);
-
-  free(arcs);
-}
-
-void
-polyarc_test(void)
-{
-  genericarc_test(FALSE);
-}
-
-void
-polyfillarc_test(void)
-{
-  genericarc_test(TRUE);
-}
-
-static const char string8[] = "pack my box with five dozen liquor jugs";
-
-void
-polytext8_test(void)
-{
-  int num_strings = 200;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_strings *= X.percent;
-
-  XSync(X.dpy,0);
-  start_timer();
-  for (i=0;i<num_strings;++i) {
-    XDrawString(X.dpy,X.win,X.gc,(i%2 ? i : num_strings - i),i,
-               string8,sizeof(string8)-1);
-  }
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  snprintf(buf,sizeof buf,"%d strings in %.2f seconds.",num_strings,
-         (double) totaltime/1000000.);
-  show_result(buf);
-}
-
-void
-imagetext8_test(void)
-{
-  int num_strings = 200;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_strings *= X.percent;
-
-  XSync(X.dpy,0);
-  start_timer();
-  for (i=0;i<num_strings;++i) {
-    XDrawImageString(X.dpy,X.win,X.gc,(i%2 ? i : num_strings - i),i,
-                    string8,sizeof(string8)-1);
-  }
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  snprintf(buf,sizeof buf,"%d strings in %.2f seconds.",num_strings,
-         (double) totaltime/1000000.);
-  show_result(buf);
-}
-
-static char unicode_font[] =
-  "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1";
-
-static const XChar2b string16[] = {
-  { 0x00, 0x20 }, { 0x00, 0x20 }, { 0x22, 0x2E }, { 0x00, 0x20 },
-  { 0x00, 0x45 }, { 0x22, 0xC5 }, { 0x00, 0x64 }, { 0x00, 0x61 },
-  { 0x00, 0x20 }, { 0x00, 0x3D }, { 0x00, 0x20 }, { 0x00, 0x51 },
-  { 0x00, 0x2C }, { 0x00, 0x20 }, { 0x00, 0x20 }, { 0x00, 0x6E },
-  { 0x00, 0x20 }, { 0x21, 0x92 }, { 0x00, 0x20 }, { 0x22, 0x1E },
-  { 0x00, 0x2C }, { 0x00, 0x20 }, { 0x22, 0x11 }, { 0x00, 0x20 },
-  { 0x00, 0x66 }, { 0x00, 0x28 }, { 0x00, 0x69 }, { 0x00, 0x29 },
-  { 0x00, 0x20 }, { 0x00, 0x3D }, { 0x00, 0x20 }, { 0x22, 0x0F },
-  { 0x00, 0x20 }, { 0x00, 0x67 }, { 0x00, 0x28 }, { 0x00, 0x69 },
-  { 0x00, 0x29 }, { 0x00, 0x2C }, { 0x00, 0x20 }, { 0x22, 0x00 },
-  { 0x00, 0x78 }, { 0x22, 0x08 }, { 0x21, 0x1D }, { 0x00, 0x3A },
-  { 0x00, 0x20 }, { 0x23, 0x08 }, { 0x00, 0x78 }, { 0x23, 0x09 },
-  { 0x00, 0x20 }, { 0x00, 0x3D }, { 0x00, 0x20 }, { 0x22, 0x12 },
-  { 0x23, 0x0A }, { 0x22, 0x12 }, { 0x00, 0x78 }, { 0x23, 0x0B },
-  { 0x00, 0x2C }, { 0x00, 0x20 }, { 0x03, 0xB1 }, { 0x00, 0x20 },
-  { 0x22, 0x27 }, { 0x00, 0x20 }, { 0x00, 0xAC }, { 0x03, 0xB2 },
-  { 0x00, 0x20 }, { 0x00, 0x3D }, { 0x00, 0x20 }, { 0x00, 0xAC },
-  { 0x00, 0x28 }, { 0x00, 0xAC }, { 0x03, 0xB1 }, { 0x00, 0x20 },
-  { 0x22, 0x28 }, { 0x00, 0x20 }, { 0x03, 0xB2 }, { 0x00, 0x29 },
-  { 0x00, 0x2C }
-};
-
-void
-polytext16_test(void)
-{
-  int num_strings = 50;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_strings *= X.percent;
-
-  GC_change_font(unicode_font,FALSE);
-
-  XSync(X.dpy,0);
-  start_timer();
-  for (i=0;i<num_strings;++i) {
-    XDrawString16(X.dpy,X.win,X.gc,(i%2 ? i : num_strings - i),10*i,
-                 string16,sizeof(string16)/sizeof(XChar2b));
-  }
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  GC_change_font(X.fontname,FALSE);
-
-  snprintf(buf,sizeof buf,"%d strings in %.2f seconds.",num_strings,
-         (double) totaltime/1000000.);
-  show_result(buf);
-}
-
-void
-imagetext16_test(void)
-{
-  int num_strings = 50;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_strings *= X.percent;
-
-  GC_change_font(unicode_font,FALSE);
-
-  XSync(X.dpy,0);
-  start_timer();
-  for (i=0;i<num_strings;++i) {
-    XDrawImageString16(X.dpy,X.win,X.gc,(i%2 ? i : num_strings - i),10*i,
-                      string16,sizeof(string16)/sizeof(XChar2b));
-  }
-  XSync(X.dpy,0);
-  totaltime = end_timer();
-
-  GC_change_font(X.fontname,FALSE);
-
-  snprintf(buf,sizeof buf,"%d strings in %.2f seconds.",num_strings,
-         (double) totaltime/1000000.);
-  show_result(buf);
-}
-
-void
-putimage_test(void)
-{
-  int num_copies = 200;
-  int i;
-  long totaltime;
-  char buf[80];
-
-  num_copies *= X.percent;
-
-  XSetFillStyle(X.dpy,X.miscgc,FillTiled);
-  XFillRectangle(X.dpy,X.win,X.miscgc,0,0,400,400);
-
-  X.image = XGetImage(X.dpy,X.win,0,0,200,200,~0,XYPixmap);
-
-  XSync(X.dpy,0);
-  timer(StartTimer);
-  for (i=0;i<num_copies;++i)
-    XPutImage(X.dpy,X.win,X.gc,X.image,0,0,i,i,200,200);
-  XSync(X.dpy,0);
-  totaltime = timer(EndTimer);
-
-  snprintf(buf,sizeof buf,"%.2f seconds.",(double)totaltime/1000000.);
-  show_result(buf);
-}
-
-
-/*****************************/
-/*****************************/
-
-void
-run_test(void)
-{
-  XClearWindow(X.dpy,X.win);
-
-  print_if_recording("run\n");
-  
-  switch (X.test) {
-    case CopyArea:      copyarea_test();           break;
-    case CopyPlane:     copyplane_test();          break;
-    case PolyPoint:     polypoint_test();          break;
-    case PolyLine:      polyline_test();           break;
-    case PolySegment:   polysegment_test();        break;
-    case PolyRectangle: polyrectangle_test();      break;
-    case PolyArc:       polyarc_test();            break;
-    case FillPolygon:   fillpolygon_test();        break;
-    case PolyFillRect:  polyfillrectangle_test();  break;
-    case PolyFillArc:   polyfillarc_test();        break;
-    case PolyText8:     polytext8_test();          break;
-    case ImageText8:    imagetext8_test();         break;
-    case PolyText16:    polytext16_test();         break;
-    case ImageText16:   imagetext16_test();        break;
-    case PutImage:      putimage_test();           break;
-    default: fprintf(stderr,"That test doesn't exist yet.\n");
-    }
-}
-
-/*****************************/
-
-/* set_text(w,string)
-** ------------------
-** Sets the text in a read-only text widget to the specified string.
-*/
-
-void
-set_text(Widget w, char *string)
-{
-  static Arg args[2];
-
-  XtSetArg(args[0], XtNstring, string);
-  XtSetArg(args[1], XtNlength, strlen(string));
-  XtSetValues(w, args, (Cardinal) 2 );
-}
-
-void
-show_result(char *string)
-{
-  char buf[80];
-
-  set_text(result,string);
-
-  strcpy(buf,"# ");
-  strncat(buf,string,sizeof(buf) - 3);
-  buf[sizeof(buf) - 3] = '\0';
-  strcat(buf,"\n");
-  print_if_recording(buf);
-}
diff --git a/xgc/text.c b/xgc/text.c
deleted file mode 100644 (file)
index fd5e389..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
-** xgc
-**
-** text.c
-**
-** How to make a text widget that returns a string when the cursor
-** leaves its window.
-*/
-/* $XFree86: xc/programs/xgc/text.c,v 1.3 2000/02/17 14:00:37 dawes Exp $ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/AsciiText.h>
-#include "xgc.h"
-
-static void WriteText(Widget, XEvent *, String *, Cardinal *);
-
-/* the strings which are displayed on the screen, edited, and sent
-   to interpret() */
-static char textstrings[NUMTEXTWIDGETS][80];
-
-static char oldtextstrings[NUMTEXTWIDGETS][80];
-
-static const char *defaultstrings[NUMTEXTWIDGETS] = {"0","6x10","0","1"};
-
-/* The labels displayed next to them */
-static const char *labels[NUMTEXTWIDGETS] = {"Line Width","Font","Foreground",
-                                            "Background"};
-
-/* the first half of what gets sent to interpret() */
-static const char *names[NUMTEXTWIDGETS] = {"linewidth ","font ","foreground ",
-                                           "background "};
-
-/* create_text_choice(w,type,length,width)
-** ---------------------------------------
-** Inside w (a form), creates an editable text widget of width width.  The
-** user can enter a string of up to length characters.  type is one of
-** the constants defined in xgc.h; it decides things like the label,
-** what string will be displayed and edited, etc.  When the pointer leaves
-** the widget, the widget does the appropriate thing with the text
-** inside it; the user doesn't have to press an "enter" button or anything.
-** Returns the text widget which the user will edit.
-*/
-
-Widget
-create_text_choice(Widget w, int type, int length, int width)
-{
-  char translationtable[600];  /* for adding the new action (calling
-                                  WriteText() when the pointer leaves) */
-
-  static XtActionsRec actionTable[] = {        /* likewise */
-    {"WriteText",  WriteText},
-    {"Nothing",    NULL}
-  };
-
-  static Arg labelargs[] = {
-    {XtNborderWidth,   (XtArgVal) 0},
-    {XtNjustify,       (XtArgVal) XtJustifyRight}
-  };
-
-  static Arg textargs[] = {
-    {XtNeditType,   (XtArgVal) XawtextEdit},
-    {XtNstring,     (XtArgVal) NULL},
-    {XtNlength,     (XtArgVal) NULL},
-    {XtNhorizDistance, (XtArgVal) 10},
-    {XtNfromHoriz,  (XtArgVal) NULL},
-    {XtNinsertPosition, (XtArgVal) NULL},
-    {XtNuseStringInPlace, (XtArgVal) True}
-  };
-
-  static Widget text;          /* the text widget */
-  static Widget label;         /* the label widget */
-
-  /* Disable keys which would cause the cursor to go off the single
-  ** line that we want to display.  If the pointer leaves the window,
-  ** update the GC accordingly.  The integer passed to WriteText is
-  ** so it knows what type of widget was just updated. */
-
-  snprintf(translationtable,sizeof translationtable,
-     "<Leave>:      WriteText(%d)\n\
-     <Btn1Down>:    set-keyboard-focus() select-start()\n\
-     Ctrl<Key>J:    Nothing()\n\
-     Ctrl<Key>M:    Nothing()\n\
-     <Key>Linefeed: Nothing()\n\
-     <Key>Return:   Nothing()\n\
-     Ctrl<Key>O:    Nothing()\n\
-     Meta<Key>I:    Nothing()\n\
-     Ctrl<Key>N:    Nothing()\n\
-     Ctrl<Key>P:    Nothing()\n\
-     Ctrl<Key>Z:    Nothing()\n\
-     Meta<Key>Z:    Nothing()\n\
-     Ctrl<Key>V:    Nothing()\n\
-     Meta<Key>V:    Nothing()",type);
-
-  /* label uses type to find out what its title is */
-  label = XtCreateManagedWidget(labels[type],labelWidgetClass,w,
-                               labelargs,XtNumber(labelargs));
-  
-  /* text uses type to find out what its string is */
-  switch (type) {
-  case TForeground:
-    snprintf(textstrings[type],sizeof textstrings[type], 
-       "%d",(int) X.gcv.foreground);
-    snprintf(oldtextstrings[type],sizeof oldtextstrings[type],
-       "%d",(int) X.gcv.foreground);
-    break;
-  case TBackground:
-    snprintf(textstrings[type],sizeof textstrings[type],
-       "%d",(int) X.gcv.background);
-    snprintf(oldtextstrings[type],sizeof oldtextstrings[type],
-       "%d",(int) X.gcv.background);
-    break;
-  default:
-    strcpy(textstrings[type],defaultstrings[type]);
-    strcpy(oldtextstrings[type],defaultstrings[type]);
-  }
-  textargs[1].value = (XtArgVal) textstrings[type];
-  textargs[2].value = (XtArgVal) length;
-  textargs[4].value = (XtArgVal) label;
-  textargs[5].value = (XtArgVal) strlen(textstrings[type]);
-
-  text = XtCreateManagedWidget("text", asciiTextWidgetClass,w,
-                              textargs,XtNumber(textargs));
-
-  /* Register the actions and translations */
-
-  XtAppAddActions(appcontext,actionTable,XtNumber(actionTable));
-  XtOverrideTranslations(text,XtParseTranslationTable(translationtable));
-
-  return(text);
-}
-
-/* WriteText(w,event,params,num_params)
-** ------------------------------------
-** Makes an appropriate string and sends it off to interpret().
-** It's an ActionProc, thus the funny arguments.
-*/
-
-/*ARGSUSED*/
-static void
-WriteText(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-  char mbuf[80];
-  int type;                    /* which string # to send */
-
-  type = atoi(params[0]);
-  if (strcmp(textstrings[type],oldtextstrings[type])) {
-    strcpy(oldtextstrings[type],textstrings[type]);
-    snprintf(mbuf,sizeof mbuf,"%s%s\n", 
-       names[type],            /* the right first half */
-       textstrings[type]);     /* the right second half */
-    interpret(mbuf);           /* send it off */
-  }
-}
-
-/* change_text(w,type,newtext)
-** ------------------------
-** Changes the text in the text widget w of type type to newtext.
-*/
-
-void
-change_text(Widget w, String newtext)
-{
-  XawTextBlock text;           /* the new text */
-  XawTextPosition first, last; /* boundaries of the old text */
-  String oldtext;              /* the old text */
-
-  static Arg textargs[] = {
-    {XtNstring, (XtArgVal) 0}
-  };
-
-  /* Initialize the XawTextBlock. */
-
-  if (!newtext)
-      newtext = "";
-  text.firstPos = 0;
-  text.length = strlen(newtext);
-  text.ptr = newtext;
-  text.format = FMT8BIT;
-
-  /* Find the old text, so we can get its length, so we know how
-  ** much of it to update. */
-
-  textargs[0].value = (XtArgVal) &oldtext;
-  XtGetValues(w,textargs,XtNumber(textargs));
-  first = XawTextTopPosition(w);
-  if (!oldtext)
-      oldtext = "";
-  last = (XawTextPosition) strlen(oldtext)+1;
-
-  /* Replace it with the new text. */
-
-  XawTextReplace(w, first, last, &text);
-}
-
diff --git a/xgc/tile b/xgc/tile
deleted file mode 100644 (file)
index 46ab826..0000000
--- a/xgc/tile
+++ /dev/null
@@ -1,17 +0,0 @@
-/* $XFree86$ */
-
-#if !defined(tile_width) && !defined(tile_height)
-
-#define tile_width 16
-#define tile_height 16
-
-#ifdef DEFINE_TILE
-
-static unsigned char tile_bits[] = {
-   0xff, 0x80, 0xfc, 0x80, 0x70, 0xc0, 0xc0, 0xc0, 0xe0, 0xe3, 0xe0, 0xef,
-   0xf0, 0xff, 0xf0, 0xdf, 0xfb, 0x0f, 0xff, 0x0f, 0xf7, 0x07, 0xc7, 0x07,
-   0x03, 0x03, 0x03, 0x0e, 0x01, 0x3f, 0x01, 0xff};
-
-#endif
-
-#endif
diff --git a/xgc/xgc.h b/xgc/xgc.h
deleted file mode 100644 (file)
index c3a7021..0000000
--- a/xgc/xgc.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-** xgc
-**
-** xgc.h
-*/
-/* $XFree86: xc/programs/xgc/xgc.h,v 1.5 2003/05/07 21:17:06 herrb Exp $ */
-
-#include "constants.h"
-
-typedef struct {
-  Display  *dpy;               /* the display! */
-  Screen   *scr;               /* the screen! */
-  Window    win;               /* the window the test runs in */
-  GC        gc;                        /* the GC! */
-  GC        miscgc;            /* used for doing stuff when we don't want
-                                  to change the normal GC */
-  XGCValues gcv;               /* a separate copy of what's in the GC,
-                                  since we're not allowed to look in it */
-  Pixmap    tile;              /* what we tile with */
-  Pixmap    stipple;           /* what we stipple with */
-  XImage   *image;             /* image for GetImage & PutImage */
-  int       test;              /* which test is being run */
-  float     percent;           /* percentage of test to run */
-  Pixel     foreground;
-  Pixel     background;
-  char      *fontname;
-} XStuff;                       /* All the stuff that only X needs to
-                                   know about */
-
-typedef struct {
-  char name[40];               /* name as it will appear on the screen */
-  char text[40];               /* Xgc command it translates to */
-  int num_commands;            /* number of command buttons inside it */
-  int columns;                 /* how many columns of command buttons; if
-                                  0, then there's only one row */
-  struct {
-    char name[40];             /* name as it will appear on the screen */
-    char text[40];             /* Xgc command it translates to */
-  } command_data[MAXCHOICES];
-} ChoiceStuff;                 /* All the info needed to deal with a 
-                                  choice widget */
-typedef struct {
-  const char *name;
-  const char *text;
-  int code;
-} XgcData;
-
-typedef struct {
-  struct {
-    const char *name;
-    const char *text;
-    int   num_toggles;
-    int   columns;
-  } choice;
-  XgcData *data;
-} XgcStuff;
-
-typedef struct {
-  Widget label;
-  int size;
-  WidgetList widgets;
-} ChoiceDesc;
-
-#ifndef HAS_SNPRINTF
-#include <X11/Xmu/SysUtil.h>
-#define snprintf XmuSnprintf
-#endif
-
-/************/
-
-extern XStuff X;
-extern Widget topform;
-extern XtAppContext appcontext;
-
-extern XgcStuff TestStuff;
-extern XgcStuff FunctionStuff;
-extern XgcStuff LinestyleStuff;
-extern XgcStuff CapstyleStuff;
-extern XgcStuff JoinstyleStuff;
-extern XgcStuff FillstyleStuff;
-extern XgcStuff FillruleStuff;
-extern XgcStuff ArcmodeStuff;
-
-extern ChoiceDesc *GCdescs[];
-extern ChoiceDesc *testchoicedesc;
-extern Widget test;
-extern Widget GCform;
-extern Widget foregroundtext;
-extern Widget backgroundtext;
-extern Widget linewidthtext;
-extern Widget fonttext;
-extern Widget dashlistchoice;
-extern Widget planemaskchoice;
-extern Widget testchoiceform;
-
-extern Widget result;
-
-extern Boolean recording;
-extern Widget filename_text_widget, recordbutton;
-
-extern int fildes[2];
-extern FILE *outend;
-extern FILE *yyin;
-
-/************/
-
-extern void change_percent(int, Boolean);
-extern void change_test(int, Boolean);
-extern void change_text(Widget, String);
-extern void choose_defaults(ChoiceDesc *[], int);
-extern void circle_line_test(int, int);
-extern void close_file_if_recording(void);
-extern void copyarea_test(void);
-extern void copyplane_test(void);
-extern ChoiceDesc * create_choice(Widget, XgcStuff *);
-extern void create_dashlist_choice(Widget);
-extern void create_planemask_choice(Widget);
-extern void create_testfrac_choice(Widget);
-extern Widget create_text_choice(Widget, int, int, int);
-extern void fillpolygon_test(void);
-extern void GC_change_arcmode(int, Boolean);
-extern void GC_change_background(unsigned long, Boolean);
-extern void GC_change_capstyle(int, Boolean);
-extern void GC_change_dashlist(int, Boolean);
-extern void GC_change_fillrule(int, Boolean);
-extern void GC_change_fillstyle(int, Boolean);
-extern void GC_change_font(char *, Boolean);
-extern void GC_change_foreground(unsigned long, Boolean);
-extern void GC_change_function(int, Boolean);
-extern void GC_change_joinstyle(int, Boolean);
-extern void GC_change_linestyle(int, Boolean);
-extern void GC_change_linewidth(int, Boolean);
-extern void GC_change_planemask(unsigned long, Boolean);
-extern void genericarc_test(Boolean);
-extern void genericrectangle_test(Boolean);
-extern void get_filename(void (*)(void), void (*)(void));
-extern void imagetext16_test(void);
-extern void imagetext8_test(void);
-extern void interpret(const char *);
-extern void line_up_labels(ChoiceDesc *[], int);
-extern void polyarc_test(void);
-extern void polyfillarc_test(void);
-extern void polyfillrectangle_test(void);
-extern void polyline_test(void);
-extern void polypoint_test(void);
-extern void polyrectangle_test(void);
-extern void polysegment_test(void);
-extern void polytext16_test(void);
-extern void polytext8_test(void);
-extern void print_if_recording(const char *);
-extern void putimage_test(void);
-extern void read_from_keyboard(void);
-extern void run_test(void);
-extern void select_button(ChoiceDesc *, int);
-extern void set_text(Widget, char *);
-extern void show_result(char *);
-extern void start_playback(void);
-extern void toggle_recordbutton(Widget, caddr_t, caddr_t);
-extern void update_dashlist(int);
-extern void update_planemask(long);
-extern void update_slider(int);
-extern void yyerror(const char *);
-extern int yylex(void);
-extern int yyparse(void);
-extern void yyrestart(FILE *);
-extern int yywrap(void);
-
-
diff --git a/xgc/xgc.man b/xgc/xgc.man
deleted file mode 100644 (file)
index 7a3b4f3..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-.\" Copyright (c) 1991  X Consortium
-.\"
-.\" Permission is hereby granted, free of charge, to any person obtaining
-.\" a copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation the rights to use, copy, modify, merge, publish,
-.\" distribute, sublicense, and/or sell copies of the Software, and to
-.\" permit persons to whom the Software is furnished to do so, subject to
-.\" the following conditions:
-.\"
-.\" The above copyright notice and this permission notice shall be included
-.\" in all copies or substantial portions of the Software.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-.\" OTHER DEALINGS IN THE SOFTWARE.
-.\"
-.\" Except as contained in this notice, the name of the X Consortium shall
-.\" not be used in advertising or otherwise to promote the sale, use or
-.\" other dealings in this Software without prior written authorization
-.\" from the X Consortium.
-.\"
-.\" Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-.\"
-.\" Permission is hereby granted, free of charge, to any person obtaining a
-.\" copy of this software and associated documentation files (the
-.\" "Software"), to deal in the Software without restriction, including
-.\" without limitation the rights to use, copy, modify, merge, publish,
-.\" distribute, and/or sell copies of the Software, and to permit persons
-.\" to whom the Software is furnished to do so, provided that the above
-.\" copyright notice(s) and this permission notice appear in all copies of
-.\" the Software and that both the above copyright notice(s) and this
-.\" permission notice appear in supporting documentation.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-.\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-.\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-.\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.\" Except as contained in this notice, the name of a copyright holder
-.\" shall not be used in advertising or otherwise to promote the sale, use
-.\" or other dealings in this Software without prior written authorization
-.\" of the copyright holder.
-.\"
-.TH XGC 1 __xorgversion__
-.SH NAME
-xgc - X graphics demo
-.SH SYNOPSIS
-.ta 8n
-\fBxgc\fP [-\fItoolkitoption\fP ...]
-.SH DESCRIPTION
-The
-.I xgc
-program demonstrates various features of the X graphics primitives.
-In X, most of the details about the graphics to be generated are
-stored in a resource called a graphics context (GC).  The
-.B xgc
-program provides a user interface for setting various GC components.
-Pressing the "Run" button causes these results to be displayed in
-the large drawing window on the right.  Timing information is
-displayed in the window immediately below.
-.PP
-The items in the upper left hand window work as follows:
-.PP
-.I Function
-\- specify the logical function with which primitives
-will drawn.  The most usual setting is "set", i.e. simply to render
-pixels without regard to what has been drawn before.
-.PP
-.I LineStyle
-\- specify whether lines should be drawn solid in foreground,
-dashed in foreground or alternating foreground and background.
-.PP
-.I CapStyle
-\- specify the appearance of the ends of a line.
-.PP
-.I JoinStyle
-\- specify the appearance of joints between consecutive
-lines drawn within a single graphics primitive.
-.PP
-.I FillStyle
-\- specify whether lines, text and fill requests are
-solid, tiled with a pixmap or stippled.
-.PP
-.I FillRule
-\- specifies the rule used to fill polygons.  The EvenOdd
-rule means that if areas overlap an odd number of times, they are not
-drawn.  Winding rule means that overlapping areas are always filled,
-regardless of how many times they overlap.
-.PP
-.I ArcMode
-\- specifies the rule for filling of arcs.  The boundary
-of the arc is either a Chord or two radii.
-.PP
-.I planemask
-\- specifies which planes of the drawing window are
-modified.  By default, all planes are modified.
-.PP
-.I dashlist
-\- specifies a pattern to be used when drawing dashed lines.
-.PP
-.I Line Width
-\- specifies the width in pixels of lines to be drawn.
-Zero means to draw using the server's fastest algorithm with a line width of
-one pixel.
-.PP
-.I Font
-\- specifies the font to be used for text primitives.
-.PP
-.I Foreground
-and
-.I Background
-\- specify the pixel values to be
-applied when drawing primitives.
-The Foreground value is used as the
-pixel value for set bits in the source in all primitives.
-The Background value is used as the
-pixel value for unset bits in the source when using Copy Plane, drawing
-lines with LineStyle of DoubleDash and filling with FillStyle of
-OpaqueStippled.
-.PP
-.I Percentage of Test
-\- scrollbar permits specifying only
-a percentage of the test to be run.  The number at the left indicates
-the current setting, which defaults to 100%.
-.sp
-The window labeled "Test" permits choice of one a number of graphics
-primitive tests, including Points, Segments, Lines, Arcs and Filled Arcs,
-8-bit Text and Image Text, Rectangles and Filled Rectangles, Image draws,
-as well as Copy Plane and Copy Area.
-.PP
-The window to the right of this has buttons which permit record/playback
-of the primitives rendered.
-.SH OPTIONS
-.I Xgc
-accepts all of the standard X Toolkit command line options.
-.SH X DEFAULTS
-This program accepts the usual defaults for toolkit applications.
-.SH ENVIRONMENT
-.PP
-.TP 8
-.B DISPLAY
-to get the default host and display number.
-.TP 8
-.B XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-.SH "SEE ALSO"
-X(__miscmansuffix__)
-.SH BUGS
-This program isn't really finished yet, but it probably never will be,
-since it only demonstrates the original X11 core protocol rendering
-operations, which few modern programs use anymore.
-.SH AUTHORS
-Dan Schmidt, MIT
diff --git a/xgc/ylwrap b/xgc/ylwrap
deleted file mode 100755 (executable)
index 84d5634..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-#! /bin/sh
-# ylwrap - wrapper for lex/yacc invocations.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007, 2009 Free Software Foundation, Inc.
-#
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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 <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case "$1" in
-  '')
-    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
-    exit 1
-    ;;
-  --basedir)
-    basedir=$2
-    shift 2
-    ;;
-  -h|--h*)
-    cat <<\EOF
-Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
-
-Wrapper for lex/yacc invocations, renaming files as desired.
-
-  INPUT is the input file
-  OUTPUT is one file PROG generates
-  DESIRED is the file we actually want instead of OUTPUT
-  PROGRAM is program to run
-  ARGS are passed to PROG
-
-Any number of OUTPUT,DESIRED pairs may be used.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v|--v*)
-    echo "ylwrap $scriptversion"
-    exit $?
-    ;;
-esac
-
-
-# The input.
-input="$1"
-shift
-case "$input" in
-  [\\/]* | ?:[\\/]*)
-    # Absolute path; do nothing.
-    ;;
-  *)
-    # Relative path.  Make it absolute.
-    input="`pwd`/$input"
-    ;;
-esac
-
-pairlist=
-while test "$#" -ne 0; do
-  if test "$1" = "--"; then
-    shift
-    break
-  fi
-  pairlist="$pairlist $1"
-  shift
-done
-
-# The program to run.
-prog="$1"
-shift
-# Make any relative path in $prog absolute.
-case "$prog" in
-  [\\/]* | ?:[\\/]*) ;;
-  *[\\/]*) prog="`pwd`/$prog" ;;
-esac
-
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines.  But that might take us over the 14-char limit.
-dirname=ylwrap$$
-trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
-mkdir $dirname || exit 1
-
-cd $dirname
-
-case $# in
-  0) "$prog" "$input" ;;
-  *) "$prog" "$@" "$input" ;;
-esac
-ret=$?
-
-if test $ret -eq 0; then
-  set X $pairlist
-  shift
-  first=yes
-  # Since DOS filename conventions don't allow two dots,
-  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
-  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
-  y_tab_nodot="no"
-  if test -f y_tab.c || test -f y_tab.h; then
-    y_tab_nodot="yes"
-  fi
-
-  # The directory holding the input.
-  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
-  # Quote $INPUT_DIR so we can use it in a regexp.
-  # FIXME: really we should care about more than `.' and `\'.
-  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
-
-  while test "$#" -ne 0; do
-    from="$1"
-    # Handle y_tab.c and y_tab.h output by DOS
-    if test $y_tab_nodot = "yes"; then
-      if test $from = "y.tab.c"; then
-       from="y_tab.c"
-      else
-       if test $from = "y.tab.h"; then
-         from="y_tab.h"
-       fi
-      fi
-    fi
-    if test -f "$from"; then
-      # If $2 is an absolute path name, then just use that,
-      # otherwise prepend `../'.
-      case "$2" in
-       [\\/]* | ?:[\\/]*) target="$2";;
-       *) target="../$2";;
-      esac
-
-      # We do not want to overwrite a header file if it hasn't
-      # changed.  This avoid useless recompilations.  However the
-      # parser itself (the first file) should always be updated,
-      # because it is the destination of the .y.c rule in the
-      # Makefile.  Divert the output of all other files to a temporary
-      # file so we can compare them to existing versions.
-      if test $first = no; then
-       realtarget="$target"
-       target="tmp-`echo $target | sed s/.*[\\/]//g`"
-      fi
-      # Edit out `#line' or `#' directives.
-      #
-      # We don't want the resulting debug information to point at
-      # an absolute srcdir; it is better for it to just mention the
-      # .y file with no path.
-      #
-      # We want to use the real output file name, not yy.lex.c for
-      # instance.
-      #
-      # We want the include guards to be adjusted too.
-      FROM=`echo "$from" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-      TARGET=`echo "$2" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-
-      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
-          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
-
-      # Check whether header files must be updated.
-      if test $first = no; then
-       if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
-         echo "$2" is unchanged
-         rm -f "$target"
-       else
-          echo updating "$2"
-          mv -f "$target" "$realtarget"
-        fi
-      fi
-    else
-      # A missing file is only an error for the first file.  This
-      # is a blatant hack to let us support using "yacc -d".  If -d
-      # is not specified, we don't want an error when the header
-      # file is "missing".
-      if test $first = yes; then
-        ret=1
-      fi
-    fi
-    shift
-    shift
-    first=no
-  done
-else
-  ret=$?
-fi
-
-# Remove the directory.
-cd ..
-rm -rf $dirname
-
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/xload/AUTHORS b/xload/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
index 7f33cbf..8ddad19 100644 (file)
@@ -1,12 +1,81 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright (c) 1989  X Consortium
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+               ----------------------------------------
+
+Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+
+               ----------------------------------------
+
+get_rload.c (rwhod support) was added in 2001 by the XFree86 Project without
+a copyright notice, and is thus covered by this general notice:
+
+XFree86 code without an explicit copyright is covered by the following copy-
+right/license:
+
+Copyright (C) 1994-2003 The XFree86 Project, Inc.  All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the XFree86 Project shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from the XFree86
+Project.
index b3ea2a7..b859c38 100644 (file)
-2007-03-21  Jeremy C. Reed  <reed@reedmedia.net>
+commit 600c46eaccd89417a5e44e86d18f9c733af64dc9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Sep 26 13:06:17 2010 -0700
 
-       * configure.ac
-       Update version for another release.
+    xload 1.1.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2006-06-20  Matthieu Herrb <matthieu.herrb@laas.fr>
+commit 9a17373f8d3181b8dc2e86d9cadc04cd97f7b5e5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Sep 23 20:49:06 2010 -0700
 
-       * xload.c:
-       Check setuid() return value. Bugzilla #7116.
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit 2e1374266ef546a77218ec9bc00e12de142d888a
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
 
-       * configure.ac:
-       Update package version for X11R7 release.
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
 
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit f77024a7f7e25bf10b945a0240eb34b532fccbe7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 09:23:58 2010 -0700
 
-       * configure.ac:
-       Update package version number for final X11R7 release candidate.
+    Sun copyrights are now owned by Oracle
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-07  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit f1dc039a28e15b20037fd0e3a359712cacf269c9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 18:14:35 2010 -0700
 
-       * Makefile.am:
-       * configure.ac:
-       Change to use the app-defaults default dir configured in libXt.
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit 4efb36a101d94b678fc1996b035038a1e03d5165
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 18:11:32 2010 -0700
 
-       * Makefile.am:
-       Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use XORG_DEFAULT_OPTIONS provided $(SED)
+    Use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
 
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit c57e77c5620dbf2573e630a4eceec5dd5c5985d9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Mar 31 17:07:36 2010 -0400
 
-       * configure.ac:
-       Update package version number for X11R7 RC3 release.
+    config: ignore xload.po when using GETTEXT
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
 
-2005-10-18  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+commit a458825e9c6afe109460ebc1d0ca1fc08c6661a1
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Mar 31 16:52:55 2010 -0400
 
-       * configure.ac:
-       Update package version number for RC1 release.
+        config: update and relocate AX_DEFINE_DIR macro
+    
+        Remove deprecated acinclude.m4 macro container file
+        Use separate macro files as per autoconf recommendation
+        Use the latest macro from GNU
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
 
+commit 396dd7f191773a903dc13f476e0f968dc1645407
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Feb 14 15:20:30 2010 +0100
+
+    Let xload build on systems without gettext().
+    
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 36659aa666808e5b42f5d98bce8f84bf82e88c0e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:20:56 2010 -0800
+
+    Integrate gettext support with autotools build system
+    
+    Mostly cribbed from prior work for libXpm
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 6d96dd3d2df7d896a41d770ba380629948ead4d6
+Author: Jay Hobson <jay.hobson@sun.com>
+Date:   Fri Aug 25 14:29:09 2000 -0700
+
+    Internationalize xload: Call gettext on strings printed to stderr
+    
+    Originally done for Solaris 9 to fix Sun bug 4365629
+    http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4365629
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit d957cad1a453a84309cef3e30237c39d0541ecc4
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 21:22:39 2010 -0800
+
+    Use automake silencer on man page generation too
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 67b8eba82dba74f12f1ee4fac6f5ee8968b1f14c
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 21:20:50 2010 -0800
+
+    Move CWARNFLAGS addition from configure.ac to Makefile.am
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit a6040d867412b88e0586665079b96c0725b0a42c
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 21:16:53 2010 -0800
+
+    Raise xorg-macros requirement to 1.4
+    
+    Needed since the changes in f5eb18cefb774c5a5d43923d21b61c180a96b8ad
+    depend on the INSTALL file delivered in xorg-macros 1.4
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 0ddbf8aa2a67fb7a6b06c00b5ce2a654bd41c8df
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit f8bd2a195bd12161ba1fe16ef3e8ac0013d6eec2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:54 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit f5eb18cefb774c5a5d43923d21b61c180a96b8ad
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit c9117984a135aab376978da41ea31aba3ce34f3b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 187d6b083f5ae87ce7d10ce1b263c9d32bcfaa73
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:39 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 038407d1c5f4ee08cca7c23476fd9dae06a0080f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit 141aa01f04e98d6e7ddf15726da85e3f2b8b71ab
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:25 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 68bad5a59d3619372cb4a48563f5c7423f54163d
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Thu Jan 22 15:31:58 2009 -0200
+
+    Correct make distcheck and sparse warnings.
+
+commit 0436471fd8007826d40a2f57710e9964c0768d50
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Sun Mar 16 18:44:12 2008 -0300
+
+    Compile warning fixes.
+    
+      Ansify some functions with K&R definitions.
+
+commit b91f8e903b1004a35dfe01204852c628367475b7
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Wed Aug 20 10:32:51 2008 -0400
+
+    xaw8 is gone, use xaw7
+
+commit 5c84833c7f383685763550a348a3493025948cba
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jul 7 18:52:39 2008 -0700
+
+    Fill in COPYING file
+
+commit e80401dc35403df68532b8e80c32452f7a7f02f3
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jul 7 18:43:26 2008 -0700
+
+    Update man page to note that /dev/kmem access is only on old platforms
+
+commit 59281ce7182a7fb679339af89a1dc72e0695b7ab
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Fri May 16 14:20:03 2008 +0200
+
+    $(builddir) is the current directory
+    
+    Apparently automake doesn't always export the builddir variable.
+    This fixes my previous commit.
+
+commit d6bf0deb5ad6b540246b23a46fa2b5d21cd9b02c
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Tue May 6 02:02:00 2008 -0700
+
+    __DARWIN__ -> __APPLE__
+    https://bugs.freedesktop.org/show_bug.cgi?id=9017
+
+commit d1e5eb3dff370bb7c65a62dbe3ba0822b86aecbc
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Apr 20 19:20:51 2008 +0200
+
+    Fix build with builddir != srcdir
+
+commit 5e806152643740057bd43869122ea8ff05a9d384
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun Apr 20 19:18:19 2008 +0200
+
+    Use AM_CFLAGS instead of xload_CFLAGS and remove AM_PROG_CC_C_O
+
+commit 771817cc3923a0f142b941234047fa0020cb231d
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:27:49 2008 -0700
+
+    Added missing AM_PROG_CC_C_O
+
+commit 9004465b586104fed48bb301de843003c1fa2ad0
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:07:47 2008 -0700
+
+    Build fix for file systems that are not case sensitive
+
+commit 2d8250c1d56dc20f7afc3b3a155bcf8ac4cb7e9f
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 16:37:20 2007 -0500
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit 5c043a1cec89e884593f541f59b8abd237d91e50
+Author: Peter Dyballa <Peter_Dyballa@Freenet.DE>
+Date:   Mon Sep 24 14:13:39 2007 -0700
+
+    Bug #12534: nlist() needs to be handled differently in Mac OS X
+    
+    X.Org Bugzilla #12534 <https://bugs.freedesktop.org/show_bug.cgi?id=12534>
+    Patch #11704 <https://bugs.freedesktop.org/attachment.cgi?id=11704>
+
+commit 91088ab94b28877ca85151c1d1cf241f8e775555
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:51:30 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 6d6757b2e0abe6811aeec72fc4835748801cdcd4
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Aug 23 19:24:57 2007 -0400
+
+    Rename .cvsignore to .gitignore
+
+commit 8a4ffe593e55cc618599fcd9d643d799debe546a
+Author: Jeremy C. Reed <reed@glacier.reedmedia.net>
+Date:   Thu Mar 22 00:30:44 2007 -0500
+
+    Update version for another release.
+
+commit 1dbb7df5ccec3e3d9fecded33850730486d6374d
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Tue Jun 20 19:25:51 2006 +0000
+
+    Check setuid() return value. Bugzilla #7116.
+
+commit 382ca2392d31870cfb4b8b01cd2751040c479f86
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:51 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit 3d963be1c92843f29e331c7f4228473507f537ff
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:45 2005 +0000
+
+    Stub COPYING files
+
+commit d16274715e8f529a89d01d4be1e26e9f08a6565d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:08 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit 93d83b89292b73fa6d1a48064e4730f43a6fce3e
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 7 16:18:00 2005 +0000
+
+    Change to use the app-defaults default dir configured in libXt.
+
+commit ade038820780c806a8f43fadf2f9c9f4df50478d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:23 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 3fd55a3ea19b8c09caa10b4a9134b4a18b240975
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:25 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 9a3724aed228bbbd3294141d1a01c06fff6480f3
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:44 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit b589edc59845fd9b86f825597af6bb33dec13934
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:35:02 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit dfd95c81cc88972565c79cb78b42e1780638a504
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:53 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit 3fedcca82c2c9d55938928d25015720c8324e6a6
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:55 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit d872304e1e6aab8cf83f09cc3090f45cc245e5fa
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:32:54 2005 +0000
+
+    Change default install dir for app-default files from
+        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
+        the monolith & allow localization
+
+commit 0620fa99ef09fb0401e842dfeb9aa76b8d403ac6
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:23 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 90ecdb5eb628266037755e3b0be48f13d703b8e5
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:46 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit 09af03bf3b2f573c0b58c8a5fd84af1772707c6f
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Sun Oct 2 21:17:48 2005 +0000
+
+    Bug #3811 <https://bugs.freedesktop.org/show_bug.cgi?id=3811> GNU/kFreeBSD
+        support for xload & memleak (Robert Millan)
+
+commit 80cf9497a8c7776e67377a0d1eb623739206b695
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:30 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit 5d24389cad4d0669e1ec109a84fb0315805c0e66
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:35 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit 3fa36d6e984b2f5c2958d078ff19c1a3cf46f9b6
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Wed Jul 27 00:41:27 2005 +0000
+
+    Add check for libkstat to get load averages on Solaris
+
+commit f61e34fce870f45136a2cfcb73133b63df5321af
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Wed Jul 27 00:34:57 2005 +0000
+
+    Switch xload on Solaris from libkvm to libkstat so it works with both
+        32-bit and 64-bit kernels, and without group kmem. Add #include
+        "config.h" for modularization
+
+commit 662e42f98213df8dc834fa6be7b83e99cc07bacc
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Jul 26 15:44:02 2005 +0000
+
+    Replace more GNU make-ism's with more portable macros
+
+commit 52bbf03241ae94019be87858375b6e77b96ad3a6
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sat Jul 23 16:38:19 2005 +0000
+
+    fix GNU-make only app-default rule
+
+commit 4cb25771597a2e1102bf5fd91e6cabf191eeecf2
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:31:57 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit 62d4ea34f0fd64e258abb993004c8966eecc6cf7
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Tue Jul 5 22:36:58 2005 +0000
+
+    Build system for xload
+
+commit f74edc7a9e0494657c36f34208141f6a2aa3e1f9
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:54:57 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit cc45a7487b867b181a5615eef75519d22f91d4f8
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:35:37 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 89d070def1fb7c692443c9dc2aee49424193cf45
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:13:14 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 90d8b0a47218ed5a024ac3b0cde9cc6bc0bb684a
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:26 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit 9d4dadc605b80ae83864242fb3d997bd511c7205
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:24:14 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 8c79399521f61d18280f0096d77338cfc4664490
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Jan 29 08:09:16 2004 +0000
+
+    Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
+
+commit 7cc0e6a6b51025d08ec9c6a17b3f514ebaa80fdc
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Dec 19 20:56:01 2003 +0000
+
+    XFree86 4.3.99.902 (RC 2)
+
+commit 57ef7c68cb375b3361ff5381b494ff52c1e77807
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Thu Dec 4 22:03:56 2003 +0000
+
+    XFree86 4.3.99.901 (RC 1)
+
+commit c9e855362fe29db861bf847ec714f1b0ce3237a1
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:14 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 346b7376f252cbab44456541dd917489b6b25d35
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:23 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit 0f22ecbb798add2e02b586894434884765f7daae
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:23 2003 +0000
+
+    Initial revision
index e69de29..8b82ade 100644 (file)
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
index cc7b451..f7f4ee0 100644 (file)
 
 bin_PROGRAMS = xload
 
-xload_CFLAGS = $(XLOAD_CFLAGS)
+AM_CFLAGS = $(CWARNFLAGS) $(XLOAD_CFLAGS)
 xload_LDADD = $(XLOAD_LIBS)
 
+ACLOCAL_AMFLAGS = -I m4
+
 xload_SOURCES =        \
         get_load.c \
         get_rload.c \
@@ -33,53 +35,46 @@ xload_SOURCES =     \
 appman_PRE = \
         xload.man
 
-# App default files  (*.ad)
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 
 appdefaultdir = @appdefaultdir@
 
+dist_appdefault_DATA = \
+        app-defaults/XLoad
 
-APPDEFAULTFILES = \
-        XLoad
-
-SUFFIXES = .ad 
+EXTRA_DIST = xload.bit
 
-.ad:
-       cp $< $@
+appmandir = $(APP_MAN_DIR)
 
-appdefault_DATA = $(APPDEFAULTFILES)
+appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) xload.bit
+EXTRA_DIST += $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA)
 
-CLEANFILES = $(APPDEFAULTFILES)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-appmandir = $(APP_MAN_DIR)
 
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+.PHONY: ChangeLog INSTALL
 
-EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
+INSTALL:
+       $(INSTALL_CMD)
 
-SED = sed
+ChangeLog:
+       $(CHANGELOG_CMD)
 
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
+dist-hook: ChangeLog INSTALL
 
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+if USE_GETTEXT
+noinst_DATA = xload.po
 
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
+xload.po: $(xload_SOURCES:%=$(srcdir)/%)
+       $(AM_V_GEN)xgettext -d xload -n $(xload_SOURCES:%=$(srcdir)/%)
 
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+CLEANFILES += xload.po
+endif
index 7fce171..a27a81f 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 #  PERFORMANCE OF THIS SOFTWARE.
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -59,36 +57,52 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = xload$(EXEEXT)
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       compile config.guess config.sub depcomp install-sh missing
+@USE_GETTEXT_TRUE@am__append_1 = xload.po
 subdir = .
+DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(install_sh) -d
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
-       "$(DESTDIR)$(appmandir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
+       "$(DESTDIR)$(appdefaultdir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_xload_OBJECTS = xload-get_load.$(OBJEXT) xload-get_rload.$(OBJEXT) \
-       xload-xload.$(OBJEXT)
+am_xload_OBJECTS = get_load.$(OBJEXT) get_rload.$(OBJEXT) \
+       xload.$(OBJEXT)
 xload_OBJECTS = $(am_xload_OBJECTS)
 am__DEPENDENCIES_1 =
 xload_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(xload_SOURCES)
 DIST_SOURCES = $(xload_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -96,19 +110,32 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appdefaultDATA_INSTALL = $(INSTALL_DATA)
-appmanDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appdefault_DATA) $(appman_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+DATA = $(appman_DATA) $(dist_appdefault_DATA) $(noinst_DATA)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -116,9 +143,8 @@ distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
 APPDEFS_LIBS = @APPDEFS_LIBS@
 APP_MAN_DIR = @APP_MAN_DIR@
@@ -130,7 +156,10 @@ AWK = @AWK@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -139,9 +168,13 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
+EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -151,44 +184,42 @@ LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
 LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LOCALEDIR = @LOCALEDIR@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+MKDIR_P = @MKDIR_P@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@
-TMP_XAW_LIBS = @TMP_XAW_LIBS@
 VERSION = @VERSION@
-XAW_USE_XPRINT_FALSE = @XAW_USE_XPRINT_FALSE@
-XAW_USE_XPRINT_TRUE = @XAW_USE_XPRINT_TRUE@
 XLOAD_CFLAGS = @XLOAD_CFLAGS@
 XLOAD_LIBS = @XLOAD_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
-ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
-
-# App default files  (*.ad)
 appdefaultdir = @appdefaultdir@
 bindir = @bindir@
 build = @build@
@@ -196,30 +227,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-xload_CFLAGS = $(XLOAD_CFLAGS)
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = $(CWARNFLAGS) $(XLOAD_CFLAGS)
 xload_LDADD = $(XLOAD_LIBS)
+ACLOCAL_AMFLAGS = -I m4
 xload_SOURCES = \
         get_load.c \
         get_rload.c \
@@ -229,53 +273,39 @@ xload_SOURCES = \
 appman_PRE = \
         xload.man
 
-APPDEFAULTFILES = \
-        XLoad
 
-SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
-appdefault_DATA = $(APPDEFAULTFILES)
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) xload.bit $(appman_PRE)
-CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+dist_appdefault_DATA = \
+        app-defaults/XLoad
+
+EXTRA_DIST = xload.bit $(appman_PRE)
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = $(appman_DATA) $(am__append_1)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+@USE_GETTEXT_TRUE@noinst_DATA = xload.po
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
 am--refresh:
        @:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -291,21 +321,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
        @if test ! -f $@; then \
          rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
+         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
        else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -313,30 +344,44 @@ distclean-hdr:
        -rm -f config.h stamp-h1
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 xload$(EXEEXT): $(xload_OBJECTS) $(xload_DEPENDENCIES) 
        @rm -f xload$(EXEEXT)
-       $(LINK) $(xload_LDFLAGS) $(xload_OBJECTS) $(xload_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(xload_OBJECTS) $(xload_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -344,183 +389,160 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xload-get_load.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xload-get_rload.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xload-xload.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_load.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_rload.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xload.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-xload-get_load.o: get_load.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -MT xload-get_load.o -MD -MP -MF "$(DEPDIR)/xload-get_load.Tpo" -c -o xload-get_load.o `test -f 'get_load.c' || echo '$(srcdir)/'`get_load.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xload-get_load.Tpo" "$(DEPDIR)/xload-get_load.Po"; else rm -f "$(DEPDIR)/xload-get_load.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='get_load.c' object='xload-get_load.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -c -o xload-get_load.o `test -f 'get_load.c' || echo '$(srcdir)/'`get_load.c
-
-xload-get_load.obj: get_load.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -MT xload-get_load.obj -MD -MP -MF "$(DEPDIR)/xload-get_load.Tpo" -c -o xload-get_load.obj `if test -f 'get_load.c'; then $(CYGPATH_W) 'get_load.c'; else $(CYGPATH_W) '$(srcdir)/get_load.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xload-get_load.Tpo" "$(DEPDIR)/xload-get_load.Po"; else rm -f "$(DEPDIR)/xload-get_load.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='get_load.c' object='xload-get_load.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -c -o xload-get_load.obj `if test -f 'get_load.c'; then $(CYGPATH_W) 'get_load.c'; else $(CYGPATH_W) '$(srcdir)/get_load.c'; fi`
-
-xload-get_rload.o: get_rload.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -MT xload-get_rload.o -MD -MP -MF "$(DEPDIR)/xload-get_rload.Tpo" -c -o xload-get_rload.o `test -f 'get_rload.c' || echo '$(srcdir)/'`get_rload.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xload-get_rload.Tpo" "$(DEPDIR)/xload-get_rload.Po"; else rm -f "$(DEPDIR)/xload-get_rload.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='get_rload.c' object='xload-get_rload.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -c -o xload-get_rload.o `test -f 'get_rload.c' || echo '$(srcdir)/'`get_rload.c
-
-xload-get_rload.obj: get_rload.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -MT xload-get_rload.obj -MD -MP -MF "$(DEPDIR)/xload-get_rload.Tpo" -c -o xload-get_rload.obj `if test -f 'get_rload.c'; then $(CYGPATH_W) 'get_rload.c'; else $(CYGPATH_W) '$(srcdir)/get_rload.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xload-get_rload.Tpo" "$(DEPDIR)/xload-get_rload.Po"; else rm -f "$(DEPDIR)/xload-get_rload.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='get_rload.c' object='xload-get_rload.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -c -o xload-get_rload.obj `if test -f 'get_rload.c'; then $(CYGPATH_W) 'get_rload.c'; else $(CYGPATH_W) '$(srcdir)/get_rload.c'; fi`
-
-xload-xload.o: xload.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -MT xload-xload.o -MD -MP -MF "$(DEPDIR)/xload-xload.Tpo" -c -o xload-xload.o `test -f 'xload.c' || echo '$(srcdir)/'`xload.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xload-xload.Tpo" "$(DEPDIR)/xload-xload.Po"; else rm -f "$(DEPDIR)/xload-xload.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xload.c' object='xload-xload.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -c -o xload-xload.o `test -f 'xload.c' || echo '$(srcdir)/'`xload.c
-
-xload-xload.obj: xload.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -MT xload-xload.obj -MD -MP -MF "$(DEPDIR)/xload-xload.Tpo" -c -o xload-xload.obj `if test -f 'xload.c'; then $(CYGPATH_W) 'xload.c'; else $(CYGPATH_W) '$(srcdir)/xload.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xload-xload.Tpo" "$(DEPDIR)/xload-xload.Po"; else rm -f "$(DEPDIR)/xload-xload.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xload.c' object='xload-xload.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xload_CFLAGS) $(CFLAGS) -c -o xload-xload.obj `if test -f 'xload.c'; then $(CYGPATH_W) 'xload.c'; else $(CYGPATH_W) '$(srcdir)/xload.c'; fi`
-uninstall-info-am:
-install-appdefaultDATA: $(appdefault_DATA)
+install-appmanDATA: $(appman_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(appdefault_DATA)'; for p in $$list; do \
+       test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
        done
 
-uninstall-appdefaultDATA:
+uninstall-appmanDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-install-appmanDATA: $(appman_DATA)
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
+install-dist_appdefaultDATA: $(dist_appdefault_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
+       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
        done
 
-uninstall-appmanDATA:
+uninstall-dist_appdefaultDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
-       done
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       mkdir $(distdir)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
+       test -d "$(distdir)" || mkdir "$(distdir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
          if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-hook
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+         ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
@@ -528,6 +550,14 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -552,13 +582,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -566,9 +600,11 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
@@ -590,13 +626,15 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+         sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -617,8 +655,8 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS) $(DATA) config.h
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
 install-exec: install-exec-am
@@ -641,10 +679,12 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@@ -662,18 +702,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am: install-appdefaultDATA install-appmanDATA
+install-data-am: install-appmanDATA install-dist_appdefaultDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
 
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -695,30 +755,47 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
+
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
        clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-appmanDATA \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_appdefaultDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
        installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
 
 
-.ad:
-       cp $< $@
-
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+@USE_GETTEXT_TRUE@xload.po: $(xload_SOURCES:%=$(srcdir)/%)
+@USE_GETTEXT_TRUE@     $(AM_V_GEN)xgettext -d xload -n $(xload_SOURCES:%=$(srcdir)/%)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/xload/NEWS b/xload/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
index e69de29..6d10d91 100644 (file)
@@ -0,0 +1,25 @@
+xload displays a periodically updating histogram of the system load average.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/app/xload
+
+        http://cgit.freedesktop.org/xorg/app/xload
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
index 56f3af0..79ece1b 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -85,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -101,8 +126,11 @@ AC_DEFUN([AM_CONDITIONAL],
 [AC_PREREQ(2.52)dnl
  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -116,15 +144,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -152,6 +179,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                    [depcc="$$1"   am_compiler_list=])
 
@@ -180,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -197,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -207,18 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -269,61 +322,74 @@ if test "x$enable_dependency_tracking" != xno; then
   AMDEPBACKSLASH='\'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -354,14 +420,14 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -378,16 +444,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
 # test whether we have cygpath
@@ -407,6 +477,9 @@ m4_ifval([$2],
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
@@ -422,8 +495,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -431,20 +504,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -455,18 +545,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -477,7 +568,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -504,27 +602,38 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
+  AC_SUBST([MAINT])dnl
 ]
 )
 
@@ -532,13 +641,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -547,7 +656,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -557,24 +666,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -584,14 +693,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -607,7 +716,15 @@ AC_SUBST($1)])
 # If it does, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -617,7 +734,7 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -625,70 +742,33 @@ fi
 
 # AM_PROG_MKDIR_P
 # ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -705,7 +785,7 @@ AC_DEFUN([_AM_SET_OPTION],
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -715,14 +795,14 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -731,16 +811,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -765,6 +858,33 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -790,9 +910,28 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
@@ -889,231 +1028,29 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-if test $pkg_failed = yes; then
-       $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.])],
-               [$4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-dnl Copyright 2005 Red Hat, Inc
-dnl 
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl 
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl 
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl 
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl 
-
-# XAW_CHECK_XPRINT_SUPPORT()
-# --------------------------
-# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 
-# library. If neither --enable-xprint nor --disable-xprint are given, 
-# the presence of an Xaw with Xprint support will be auto detected
-
-AC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
-       AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
-                       [use_xprint=$enableval],[use_xprint=auto])
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
-
-       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
-       if [[ ! -z $TMP_CHECK2 ]] ; then
-               if test $success = no ; then
-                       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
-                       xaw_use_xprint=no
-               fi
-       fi
-
-       if test "x$success" = "xyes"; then
-               $1_CFLAGS=$TMP_XAW_CFLAGS
-               $1_LIBS=$TMP_XAW_LIBS
-
-               AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
-       else
-               AC_MSG_ERROR([No suitable version of Xaw found])
-       fi
-])
-
+m4_include([m4/ax_define_dir.m4])
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
 dnl 
 dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
 dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
 dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
 # XORG_MACROS_VERSION(required-version)
 # -------------------------------------
@@ -1123,27 +1060,24 @@ dnl of the copyright holder.
 # your configure.ac with the minimum required version, such as:
 # XORG_MACROS_VERSION(1.1)
 #
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 #
 #
 # See the "minimum version" comment for each macro you use to see what 
 # version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.1.5
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.10.1])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
 ]) # XORG_MACROS_VERSION
 
 # XORG_PROG_RAWCPP()
@@ -1168,6 +1102,10 @@ else
        if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
                RAWCPPFLAGS=-undef
                AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
        else
                AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
        fi
@@ -1198,9 +1136,12 @@ AC_SUBST(RAWCPPFLAGS)
 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 # Not sure if there's any better way than just hardcoding by OS name.
 # Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
 if test x$APP_MAN_SUFFIX = x    ; then
     APP_MAN_SUFFIX=1
@@ -1269,8 +1210,60 @@ AC_SUBST([FILE_MAN_DIR])
 AC_SUBST([MISC_MAN_DIR])
 AC_SUBST([DRIVER_MAN_DIR])
 AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
 ]) # XORG_MANPAGE_SECTIONS
 
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
 # XORG_CHECK_LINUXDOC
 # -------------------
 # Minimum version: 1.0.0
@@ -1280,17 +1273,14 @@ AC_SUBST([ADMIN_MAN_DIR])
 # Whether or not the necessary tools and files are found can be checked
 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
 AC_DEFUN([XORG_CHECK_LINUXDOC],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
 AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
 
-AC_MSG_CHECKING([Whether to build documentation])
+AC_MSG_CHECKING([whether to build documentation])
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
    BUILDDOC=yes
 else
    BUILDDOC=no
@@ -1300,9 +1290,9 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
 AC_MSG_RESULT([$BUILDDOC])
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
    BUILDPDFDOC=yes
 else
    BUILDPDFDOC=no
@@ -1312,7 +1302,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 MAKE_PDF="$PS2PDF"
 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
@@ -1332,46 +1322,44 @@ AC_SUBST(MAKE_HTML)
 # indicates whether the necessary tools and files are found and, if set,
 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
 AC_DEFUN([XORG_CHECK_DOCBOOK],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
 BUILDTXTDOC=no
 BUILDPDFDOC=no
 BUILDPSDOC=no
 BUILDHTMLDOC=no
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
    test x$BUILD_TXTDOC != xno; then
        BUILDTXTDOC=yes
 fi
 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
    test x$BUILD_PDFDOC != xno; then
        BUILDPDFDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
    test x$BUILD_PSDOC != xno; then
        BUILDPSDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 AC_MSG_RESULT([$BUILDPSDOC])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
    test x$BUILD_HTMLDOC != xno; then
        BUILDHTMLDOC=yes
 fi
@@ -1389,6 +1377,530 @@ AC_SUBST(MAKE_PDF)
 AC_SUBST(MAKE_HTML)
 ]) # XORG_CHECK_DOCBOOK
 
+# XORG_WITH_XMLTO([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION])
+# --------------------------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: yes, if installed)]),
+          [use_groff=$withval], [use_groff=auto])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: yes, if installed)]),
+          [use_fop=$withval], [use_fop=auto])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=auto])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+default=$1
+if test "x$default" = x ; then
+  default="yes"
+fi
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: yes)]),
+          [build_docs=$enableval], [build_docs=$default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+devel_default=$1
+if test "x$devel_default" = x ; then
+  devel_default="yes"
+fi
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: yes)]),
+          [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+spec_default=$1
+if test "x$spec_default" = x ; then
+  spec_default="yes"
+fi
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: yes)]),
+          [build_specs=$enableval], [build_specs=$spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
 # XORG_CHECK_MALLOC_ZERO
 # ----------------------
 # Minimum version: 1.0.0
@@ -1398,7 +1910,7 @@ AC_SUBST(MAKE_HTML)
 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
 AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
+       AS_HELP_STRING([--enable-malloc0returnsnull],
                       [malloc(0) returns NULL (default: auto)]),
        [MALLOC_ZERO_RETURNS_NULL=$enableval],
        [MALLOC_ZERO_RETURNS_NULL=auto])
@@ -1418,7 +1930,8 @@ main() {
     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 }],
                [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1441,38 +1954,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 # ----------------
 # Minimum version: 1.1.0
 #
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
 #
 AC_DEFUN([XORG_WITH_LINT],[
 
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
                [Use a lint-style source code checker (default: disabled)])],
                [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-       LINT="$use_lint"
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
 fi
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
 ]) # XORG_WITH_LINT
 
@@ -1482,33 +2026,123 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
 #
 # Sets up flags for building lint libraries for checking programs that call
 # functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
 #
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
 AC_DEFUN([XORG_LINT_LIBRARY],[
 AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
        [Create lint library (default: disabled)])],
        [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
 fi
+
 AC_SUBST(LINTLIB)
 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
 ]) # XORG_LINT_LIBRARY
 
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC_C99])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
+
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
+#
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
+
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
+
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
 dnl Copyright 2005 Red Hat, Inc
 dnl
 dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -1536,33 +2170,20 @@ dnl
 
 # XORG_RELEASE_VERSION
 # --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  
 AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
                [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
        if test "x$PVM" = "x"; then
                PVM="0"
        fi
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
                [$PVM],
                [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
        if test "x$PVP" = "x"; then
                PVP="0"
        fi
@@ -1571,3 +2192,175 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
                [Patch version of this package])
 ])
 
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
similarity index 100%
rename from xload/XLoad.ad
rename to xload/app-defaults/XLoad
diff --git a/xload/compile b/xload/compile
deleted file mode 100755 (executable)
index 1b1d232..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
old mode 100755 (executable)
new mode 100644 (file)
index da83314..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-04-27'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
        SUN_ARCH="i386"
@@ -548,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -656,7 +660,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -807,12 +811,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd | genuineintel)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -822,6 +826,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +858,20 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +894,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -882,78 +914,34 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
        exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,8 +950,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -977,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -986,66 +980,6 @@ EOF
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1074,7 +1008,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1182,7 +1116,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
index d742d3a..d516ae8 100644 (file)
@@ -1,8 +1,38 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
 /* Define to 1 if you have the `kstat' library (-lkstat). */
 #undef HAVE_LIBKSTAT
 
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Location of translated messages */
+#undef LOCALEDIR
+
 /* Name of package */
 #undef PACKAGE
 
@@ -18,6 +48,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
 
 /* Patch version of this package */
 #undef PACKAGE_VERSION_PATCHLEVEL
 
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you want to use the gettext() function. */
+#undef USE_GETTEXT
+
 /* Version number of package */
 #undef VERSION
old mode 100755 (executable)
new mode 100644 (file)
index a39437d..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-17'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-04-17'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -149,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -275,26 +283,38 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -325,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -337,7 +357,7 @@ case $basic_machine in
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -359,21 +379,24 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
+       | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -467,6 +490,19 @@ case $basic_machine in
                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
                os=-linux
                ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -719,6 +755,9 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -823,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1057,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1240,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1260,9 +1301,9 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -kopensolaris* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1275,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1283,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1416,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1456,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1613,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index 91fc63e..07cc6b3 100755 (executable)
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for xload 1.0.2.
+# Generated by GNU Autoconf 2.68 for xload 1.1.0.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
-# Copyright (C) 2003 Free Software Foundation, Inc.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 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 Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
+
+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
-  as_unset=false
+  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
+
+# 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
 
 
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+# 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 #((
+  *[\\/]* ) 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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  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
+  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.
-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
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  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
+            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
+
+
+      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 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_unset $as_var
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
   fi
-done
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+# 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"
+
+
+} # 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
+
+
+# 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
+
+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
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 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_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'`
-
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
 
-# PATH needs CR, and LINENO needs CR and PATH.
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -85,146 +429,107 @@ 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  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
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
 
-  # 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 before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, 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
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
+  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/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      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; }; }
+  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; }
 
   # 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 sensible to this).
-  . ./$as_me.lineno
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
   # Exit status is that of the last command.
   exit
 }
 
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  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; then
-  as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  as_expr=false
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
+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'
   fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+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
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -233,52 +538,225 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&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`
 
-exec 6>&1
-
 #
 # Initializations.
 #
 ac_default_prefix=/usr/local
+ac_clean_files=
 ac_config_libobj_dir=.
+LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
 
 # Identity of this package.
 PACKAGE_NAME='xload'
 PACKAGE_TARNAME='xload'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='xload 1.0.2'
+PACKAGE_VERSION='1.1.0'
+PACKAGE_STRING='xload 1.1.0'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
 
-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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG ac_pt_PKG_CONFIG TMP_XAW_CFLAGS TMP_XAW_LIBS XAW_USE_XPRINT_TRUE XAW_USE_XPRINT_FALSE XLOAD_CFLAGS XLOAD_LIBS APPDEFS_CFLAGS APPDEFS_LIBS appdefaultdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+appdefaultdir
+APPDEFS_LIBS
+APPDEFS_CFLAGS
+XLOAD_LIBS
+XLOAD_CFLAGS
+USE_GETTEXT_FALSE
+USE_GETTEXT_TRUE
+LOCALEDIR
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
+ADMIN_MAN_DIR
+DRIVER_MAN_DIR
+MISC_MAN_DIR
+FILE_MAN_DIR
+LIB_MAN_DIR
+APP_MAN_DIR
+ADMIN_MAN_SUFFIX
+DRIVER_MAN_SUFFIX
+MISC_MAN_SUFFIX
+FILE_MAN_SUFFIX
+LIB_MAN_SUFFIX
+APP_MAN_SUFFIX
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+INSTALL_CMD
+PKG_CONFIG
+CHANGELOG_CMD
+CWARNFLAGS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+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_maintainer_mode
+enable_dependency_tracking
+enable_strict_compilation
+enable_silent_rules
+with_localedir
+with_appdefaultdir
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+XLOAD_CFLAGS
+XLOAD_LIBS
+APPDEFS_CFLAGS
+APPDEFS_LIBS'
+
 
 # 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
@@ -301,34 +779,49 @@ x_libraries=NONE
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -350,33 +843,59 @@ do
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
     datadir=$ac_optarg ;;
 
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    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 ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    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'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
+    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_feature='$ac_optarg'" ;;
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -403,6 +922,12 @@ do
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -427,13 +952,16 @@ do
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -498,6 +1026,16 @@ do
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -548,26 +1086,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'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
+    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_package='$ac_optarg'" ;;
+    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.
@@ -587,27 +1135,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; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
+    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
@@ -615,31 +1162,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
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+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
-done
+fi
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
+# 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=$`echo $ac_var`
+  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
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  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'
@@ -653,8 +1205,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
@@ -666,90 +1218,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
 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 .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  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 its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$0" : 'X\(//\)[^/]' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
+  # Try the directory containing this script, then the parent directory.
+  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
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
-  fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-   { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
-ac_env_PKG_CONFIG_value=$PKG_CONFIG
-ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
-ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
-ac_env_TMP_XAW_CFLAGS_set=${TMP_XAW_CFLAGS+set}
-ac_env_TMP_XAW_CFLAGS_value=$TMP_XAW_CFLAGS
-ac_cv_env_TMP_XAW_CFLAGS_set=${TMP_XAW_CFLAGS+set}
-ac_cv_env_TMP_XAW_CFLAGS_value=$TMP_XAW_CFLAGS
-ac_env_TMP_XAW_LIBS_set=${TMP_XAW_LIBS+set}
-ac_env_TMP_XAW_LIBS_value=$TMP_XAW_LIBS
-ac_cv_env_TMP_XAW_LIBS_set=${TMP_XAW_LIBS+set}
-ac_cv_env_TMP_XAW_LIBS_value=$TMP_XAW_LIBS
-ac_env_APPDEFS_CFLAGS_set=${APPDEFS_CFLAGS+set}
-ac_env_APPDEFS_CFLAGS_value=$APPDEFS_CFLAGS
-ac_cv_env_APPDEFS_CFLAGS_set=${APPDEFS_CFLAGS+set}
-ac_cv_env_APPDEFS_CFLAGS_value=$APPDEFS_CFLAGS
-ac_env_APPDEFS_LIBS_set=${APPDEFS_LIBS+set}
-ac_env_APPDEFS_LIBS_value=$APPDEFS_LIBS
-ac_cv_env_APPDEFS_LIBS_set=${APPDEFS_LIBS+set}
-ac_cv_env_APPDEFS_LIBS_value=$APPDEFS_LIBS
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  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" || as_fn_error $? "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
 #
 # Report the --help message.
@@ -758,7 +1292,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xload 1.0.2 to adapt to many kinds of systems.
+\`configure' configures xload 1.1.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -772,20 +1306,17 @@ 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
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
-_ACEOF
-
-  cat <<_ACEOF
 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
@@ -795,18 +1326,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]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --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]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
+  --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/xload]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -824,37 +1362,46 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xload 1.0.2:";;
+     short | recursive ) echo "Configuration of xload 1.1.0:";;
    esac
   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]
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-xprint         Enable XPrint support
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
+  --with-localedir=<path> Path to install message files in (default:
+                          datadir/locale)
+  --with-appdefaultdir=<pathname>
+                          specify directory for app-defaults files (default is
+                          autodetected)
 
 Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  TMP_XAW_CFLAGS
-              C compiler flags for TMP_XAW, overriding pkg-config
-  TMP_XAW_LIBS
-              linker flags for TMP_XAW, overriding pkg-config
+  XLOAD_CFLAGS
+              C compiler flags for XLOAD, overriding pkg-config
+  XLOAD_LIBS  linker flags for XLOAD, overriding pkg-config
   APPDEFS_CFLAGS
               C compiler flags for APPDEFS, overriding pkg-config
   APPDEFS_LIBS
@@ -865,152 +1412,364 @@ it to find libraries and programs with nonstandard names/locations.
 
 Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 _ACEOF
+ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
   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=.
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$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|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-          test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
   done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xload configure 1.0.2
-generated by GNU Autoconf 2.59
+xload configure 1.1.0
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2003 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 0
+  exit
 fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
 
-It was created by xload $as_me 1.0.2, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
 
-  $ $0 $@
-
-_ACEOF
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
 {
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
+  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
 
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
+       ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
 
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+} # ac_fn_c_try_compile
 
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
 
-_ASUNAME
+  ;
+  return 0;
+}
+_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_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\""
+$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_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_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
+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 xload $as_me 1.1.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
 
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 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
 
@@ -1032,7 +1791,6 @@ _ACEOF
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
-ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1043,13 +1801,13 @@ do
     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     | -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
          -* ) ac_must_keep_next=true ;;
        esac
       fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
+      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
 # would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# 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=$?
   # Save into config.log some information that might help in debugging.
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    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;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
   (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       sed -n \
-       "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
     *)
-      sed -n \
-       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-}
+    esac |
+    sort
+)
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
-       eval ac_val=$`echo $ac_var`
-       echo "$ac_var='"'"'$ac_val'"'"'"
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
-      sed "/^$/d" confdefs.h | sort
+      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 &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
-     ' 0
+' 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 -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1170,112 +1939,137 @@ 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"
 _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.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
+# 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
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
-for ac_site_file in $CONFIG_SITE; 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;}
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+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;}
     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;;
+      [\\/]* | ?:[\\/]* ) . "$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
 
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-              sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+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"
+  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,)
-      { 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; }; }
+  { $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'
@@ -1285,55 +2079,36 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+am__api_version='1.11'
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-am__api_version="1.9"
 ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
+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
+  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
+  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
-  { { 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
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# 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),
 # so one script is as good as another.  But avoid the broken or
@@ -1348,22 +2123,23 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 # 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.
@@ -1371,7 +2147,7 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
            # AIX install.  It has an incompatible calling convention.
@@ -1381,30 +2157,43 @@ 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
     INSTALL=$ac_cv_path_install
   else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
+    # removed, or if the value is a relative name.
     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.
@@ -1414,21 +2203,34 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -1438,11 +2240,8 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
    fi
 
    test "$2" = conftest.file
@@ -1451,81 +2250,206 @@ then
    # Ok.
    :
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
 fi
-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; }
 test "$program_prefix" != NONE &&
-  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
-  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
 # By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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_STRIP="strip"
+    $as_echo "$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_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $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; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  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=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
   done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
   else
-    mkdir_p='$(install_sh) -d'
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
 for ac_prog in gawk mawk nawk awk
 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_AWK+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_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -1535,55 +2459,59 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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_AWK="$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
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&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
 
+
   test -n "$AWK" && break
 done
 
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
 all:
-       @echo 'ac_maketemp="$(MAKE)"'
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
 rm -f conftest.make
 fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
   SET_MAKE=
 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; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -1596,12 +2524,14 @@ else
 fi
 rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
 fi
 
 # test whether we have cygpath
@@ -1616,7 +2546,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xload'
- VERSION='1.0.2'
+ VERSION='1.1.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -1644,134 +2574,114 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
+  USE_MAINTAINER_MODE=no
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
 fi
 
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+  MAINT=$MAINTAINER_MODE_TRUE
 
-  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-  STRIP=$ac_ct_STRIP
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
 
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
 
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
 
 
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
-    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval="$enable_maintainer_mode"
-  USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
-fi;
-  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
 
 
-if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 
-  MAINT=$MAINTAINER_MODE_TRUE
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
 
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
 
-          ac_config_headers="$ac_config_headers config.h"
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -1782,10 +2692,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.
@@ -1795,35 +2705,37 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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
 
+
 fi
 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.
@@ -1833,39 +2745,50 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 else
   CC="$ac_cv_prog_CC"
 fi
 
 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.
+          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.
@@ -1875,77 +2798,37 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # 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_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-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: $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
 
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
 
+  fi
 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.
@@ -1956,18 +2839,19 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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
   # We found a bogon in the path, so make sure we never use it.
@@ -1985,24 +2869,25 @@ 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
 
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
+  for ac_prog in cl.exe
   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.
@@ -2012,39 +2897,41 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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
 
+
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl
+  for ac_prog in cl.exe
 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.
@@ -2054,66 +2941,78 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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
 
+
   test -n "$ac_ct_CC" && break
 done
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
 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`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&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 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); }
+  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
@@ -2125,112 +3024,108 @@ 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[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
+{ $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 | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+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_default") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+  $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,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+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 | *.o | *.obj )
-       ;;
-    conftest.$ac_ext )
-       # This is the source file.
+    *.$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;;
     *.* )
-       ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       # FIXME: I believe we export ac_cv_exeext for Libtool,
-       # but it would be cool to find out if it's true.  Does anybody
-       # maintain Libtool? --akim.
-       export ac_cv_exeext
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
        break;;
     * )
        break;;
   esac
 done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
 else
-  echo "$as_me: failed program was:" >&5
+  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
 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; }; }
+{ { $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
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check 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'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+{ $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 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
@@ -2238,38 +3133,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 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 | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         export ac_cv_exeext
          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; }; }
+  { { $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$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+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 <stdio.h>
+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
@@ -2281,45 +3228,46 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+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>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  $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 ) ;;
+    *.$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
@@ -2333,55 +3281,34 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext conftest.$ac_ext
+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
-CFLAGS="-g"
-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
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2392,39 +3319,49 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
-ac_cv_prog_cc_g=no
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+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
+{ $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
@@ -2440,18 +3377,14 @@ else
     CFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+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_stdc=no
+  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 <stdarg.h>
 #include <stdio.h>
@@ -2479,12 +3412,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
 /* 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 -std1 is added to get
+   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 -std1.  */
+   that's 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);};
@@ -2499,282 +3437,49 @@ return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   return 0;
 }
 _ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX                  -qlanglvl=ansi
-# Ultrix and OSF/1     -std1
-# HP-UX 10.20 and later        -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4                 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -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"
-  rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
 fi
-rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
 CC=$ac_save_CC
 
 fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# 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; } ;;
   *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+    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 :
 
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
 fi
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 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
-DEPDIR="${am__leading_dot}deps"
-
-          ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval="$enable_dependency_tracking"
-
-fi;
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
 
 depcc="$CC"   am_compiler_list=
 
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -2799,6 +3504,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -2816,7 +3526,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -2826,18 +3546,23 @@ else
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -2861,13 +3586,11 @@ else
 fi
 
 fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
   am__fastdepCC_TRUE=
@@ -2878,218 +3601,634 @@ else
 fi
 
 
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} 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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if $as_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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL=$ac_install_sh
-  fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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);
+}
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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[];
+};
 
-### How to check load average on various OS'es:
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
 
-# Solaris: libkstat
+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;
+}
 
-echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
-echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
-if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkstat  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+// Check varargs and va_copy.
+static void
+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;
+  float fnumber;
+
+  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);
+}
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char kstat_open ();
 int
 main ()
 {
-kstat_open ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_kstat_kstat_open=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_kstat_kstat_open=no
-fi
-rm -f 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_kstat_kstat_open" >&5
-echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
-if test $ac_cv_lib_kstat_kstat_open = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKSTAT 1
-_ACEOF
+  // Check bool.
+  _Bool success = false;
 
-  LIBS="-lkstat $LIBS"
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
 
-fi
+  // Check varargs.
+  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;
 
-# Checks for pkg-config packages
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
 
+  ni.number = 58;
 
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  int dynamic_array[ni.number];
+  dynamic_array[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
 do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
 done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-  ;;
-esac
 fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
 
-if test -n "$PKG_CONFIG"; then
-  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
 fi
 
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
+
+
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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 :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+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 <ac_nonexistent.h>
+_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"
+      { 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
+  $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"
+      { 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
+  $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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
+
+# 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
+
+done
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
   # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; 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_ac_pt_PKG_CONFIG+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_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
@@ -3101,29 +4240,39 @@ 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
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    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_ac_pt_PKG_CONFIG="$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
 
   ;;
 esac
 fi
 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-
 if test -n "$ac_pt_PKG_CONFIG"; then
-  echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&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
 
-  PKG_CONFIG=$ac_pt_PKG_CONFIG
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
 else
   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 fi
 fi
 if test -n "$PKG_CONFIG"; then
        _pkg_min_version=0.9.0
-       echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; 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" >&5
-echo "${ECHO_T}no" >&6
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
 
 fi
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-       # Check whether --enable-xprint or --disable-xprint was given.
-if test "${enable_xprint+set}" = set; then
-  enableval="$enable_xprint"
-  use_xprint=$enableval
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  use_xprint=auto
-fi;
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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
 
-pkg_failed=no
-echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
 
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK1" 2>/dev/null`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
 else
-  pkg_failed=yes
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
 fi
+
+
+
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
 else
-       pkg_failed=untried
+  STRICT_COMPILE=no
 fi
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK1" 2>/dev/null`
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
 else
-  pkg_failed=yes
+  SUNCC="no"
 fi
+
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+  INTELCC="yes"
 else
-       pkg_failed=untried
+  INTELCC="no"
 fi
 
-if test $pkg_failed = yes; then
-       TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" 1>&5
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
-       success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       success=yes
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
 fi
-       if [ ! -z $TMP_CHECK2 ] ; then
-               if test $success = no ; then
 
-pkg_failed=no
-echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
 fi
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Internationalization & localization support
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gettext" >&5
+$as_echo_n "checking for library containing gettext... " >&6; }
+if ${ac_cv_search_gettext+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-       pkg_failed=untried
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* 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 gettext ();
+int
+main ()
+{
+return gettext ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' intl; 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_gettext=$ac_res
 fi
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK2" 2>/dev/null`
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_gettext+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_gettext+:} false; then :
+
 else
-  pkg_failed=yes
+  ac_cv_search_gettext=no
 fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gettext" >&5
+$as_echo "$ac_cv_search_gettext" >&6; }
+ac_res=$ac_cv_search_gettext
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  USE_GETTEXT="yes"
 else
-       pkg_failed=untried
+  USE_GETTEXT="no"
 fi
 
-if test $pkg_failed = yes; then
-       TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" 1>&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install localized messages" >&5
+$as_echo_n "checking where to install localized messages... " >&6; }
 
-       success=no
-elif test $pkg_failed = untried; then
-       success=no
+# Check whether --with-localedir was given.
+if test "${with_localedir+set}" = set; then :
+  withval=$with_localedir; LOCALEDIR=${withval}
 else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       success=yes
+  LOCALEDIR=${datadir}/locale
 fi
-                       xaw_use_xprint=no
-               fi
-       fi
 
-       if test "x$success" = "xyes"; then
-               XLOAD_CFLAGS=$TMP_XAW_CFLAGS
-               XLOAD_LIBS=$TMP_XAW_LIBS
 
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+  eval ax_define_dir="\"$LOCALEDIR\""
+  eval ax_define_dir="\"$ax_define_dir\""
+  LOCALEDIR="$ax_define_dir"
 
 
-if test "x$xaw_use_xprint" = "xyes"; then
-  XAW_USE_XPRINT_TRUE=
-  XAW_USE_XPRINT_FALSE='#'
+cat >>confdefs.h <<_ACEOF
+#define LOCALEDIR "$ax_define_dir"
+_ACEOF
+
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+
+if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: nowhere" >&5
+$as_echo "nowhere" >&6; }
+        USE_GETTEXT="no"
 else
-  XAW_USE_XPRINT_TRUE='#'
-  XAW_USE_XPRINT_FALSE=
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCALEDIR" >&5
+$as_echo "$LOCALEDIR" >&6; }
 fi
 
-       else
-               { { echo "$as_me:$LINENO: error: No suitable version of Xaw found" >&5
-echo "$as_me: error: No suitable version of Xaw found" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
+if test "x$USE_GETTEXT" = "xyes" ; then
 
+$as_echo "#define USE_GETTEXT 1" >>confdefs.h
 
+fi
+ if test "x$USE_GETTEXT" = "xyes"; then
+  USE_GETTEXT_TRUE=
+  USE_GETTEXT_FALSE='#'
+else
+  USE_GETTEXT_TRUE='#'
+  USE_GETTEXT_FALSE=
+fi
 
 
 
+### How to check load average on various OS'es:
 
-pkg_failed=no
-echo "$as_me:$LINENO: checking for APPDEFS" >&5
-echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6
+# Solaris: libkstat
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
+$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
+if ${ac_cv_lib_kstat_kstat_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkstat  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
+/* 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 kstat_open ();
+int
+main ()
+{
+return kstat_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_kstat_kstat_open=yes
+else
+  ac_cv_lib_kstat_kstat_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
+$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
+if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBKSTAT 1
+_ACEOF
+
+  LIBS="-lkstat $LIBS"
+
+fi
+
+
+# Checks for pkg-config packages
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLOAD" >&5
+$as_echo_n "checking for XLOAD... " >&6; }
+
+if test -n "$XLOAD_CFLAGS"; then
+    pkg_cv_XLOAD_CFLAGS="$XLOAD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XLOAD_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
+if test -n "$XLOAD_LIBS"; then
+    pkg_cv_XLOAD_LIBS="$XLOAD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XLOAD_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
-else
-       pkg_failed=untried
+ else
+    pkg_failed=untried
 fi
 
+
+
 if test $pkg_failed = yes; then
-       APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               XLOAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt x11" 2>&1`
+        else
+               XLOAD_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt x11" 2>&1`
+        fi
        # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" 1>&5
+       echo "$XLOAD_PKG_ERRORS" >&5
 
-       { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+       as_fn_error $? "Package requirements (xaw7 xmu xt x11) were not met:
+
+$XLOAD_PKG_ERRORS
 
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&5
-echo "$as_me: error: Package requirements (xt) were not met.
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&2;}
-   { (exit 1); exit 1; }; }
+Alternatively, you may set the environment variables XLOAD_CFLAGS
+and XLOAD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
+Alternatively, you may set the environment variables XLOAD_CFLAGS
+and XLOAD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+       XLOAD_CFLAGS=$pkg_cv_XLOAD_CFLAGS
+       XLOAD_LIBS=$pkg_cv_XLOAD_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
        :
 fi
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
 
 
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
+$as_echo_n "checking for APPDEFS... " >&6; }
+
+if test -n "$APPDEFS_CFLAGS"; then
+    pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
 else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
+  pkg_failed=yes
 fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+ else
+    pkg_failed=untried
 fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
+if test -n "$APPDEFS_LIBS"; then
+    pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
+else
+  pkg_failed=yes
 fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+ else
+    pkg_failed=untried
 fi
 
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
 
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
 
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
+if test $pkg_failed = yes; then
 
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
+        else
+               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$APPDEFS_PKG_ERRORS" >&5
 
+       as_fn_error $? "Package requirements (xt) were not met:
 
+$APPDEFS_PKG_ERRORS
 
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+Alternatively, you may set the environment variables APPDEFS_CFLAGS
+and APPDEFS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
+Alternatively, you may set the environment variables APPDEFS_CFLAGS
+and APPDEFS_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version or --without-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval="$with_release_version"
-  RELEASE_VERSION="$withval"
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  RELEASE_VERSION=""
-fi;
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
-
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
+       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
+       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
+else
+  appdefaultdir="${xt_appdefaultdir}"
+fi
 
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
-_ACEOF
 
 
+ac_config_files="$ac_config_files Makefile"
 
-          ac_config_files="$ac_config_files Makefile"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -3563,39 +5010,70 @@ _ACEOF
 
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    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;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
   (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
+      ;; #(
     *)
       # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-} |
+    esac |
+    sort
+) |
   sed '
+     /^ac_cv_env_/b end
      t clear
-     : clear
+     :clear
      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
      t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : 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 "updating cache $cache_file"
-    cat confcache >$cache_file
+     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;}
+      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 "not updating unwritable cache $cache_file"
+    { $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
@@ -3604,73 +5082,58 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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/;
-s/:*$//;
-s/^[^=]*=[      ]*$//;
-}'
-fi
-
 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_i=`echo "$ac_i" |
-        sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  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.
+  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
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${XAW_USE_XPRINT_TRUE}" && test -z "${XAW_USE_XPRINT_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -z "${USE_GETTEXT_TRUE}" && test -z "${USE_GETTEXT_FALSE}"; then
+  as_fn_error $? "conditional \"USE_GETTEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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.
@@ -3680,81 +5143,253 @@ 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.  ##
-## --------------------- ##
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+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 :
   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+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
+
+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
-  as_unset=false
+  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
 
+# 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
+
+
+# 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 #((
+  *[\\/]* ) 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
+IFS=$as_save_IFS
 
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  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
+  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.
-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
+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
-done
+  $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; then
+
+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
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 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_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'`
-
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
 
-# PATH needs CR, and LINENO needs CR and PATH.
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -3762,148 +5397,123 @@ 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  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
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
-
-  # 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 before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, 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
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-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 sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  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; then
-  as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  as_expr=false
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
+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'
   fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+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
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -3912,31 +5522,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
 exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+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.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by xload $as_me 1.0.2, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+# values after options handling.
+ac_log="
+This file was extended by xload $as_me 1.1.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -3944,45 +5543,47 @@ generated by GNU Autoconf 2.59.  Invocation command line was
   CONFIG_COMMANDS = $CONFIG_COMMANDS
   $ $0 $@
 
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
 _ACEOF
 
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
 
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
 
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+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"
+config_commands="$ac_config_commands"
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+_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, then exit
-  -q, --quiet      do not print progress messages
+  -V, --version    print version number and configuration settings, then exit
+      --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
@@ -3993,84 +5594,92 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
 
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xload config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+xload config.status 1.1.0
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2003 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."
-srcdir=$srcdir
-INSTALL="$INSTALL"
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+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_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
     ac_shift=shift
     ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
   esac
 
   case $ac_option in
   # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $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
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $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:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-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
   shift
@@ -4084,39 +5693,51 @@ 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 $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  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 "\$@"
 fi
 
 _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
+  $as_echo "$ac_log"
+} >&5
 
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
-# INIT-COMMANDS section.
+# INIT-COMMANDS
 #
-
 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
 _ACEOF
 
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-  *) { { 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; }; };;
+  case $ac_config_target in
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
+
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
 # We use the long form for the default assignment because of an extremely
@@ -4128,841 +5749,691 @@ if $ac_need_defaults; then
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
 }
-
 # Create a (secure) tmp directory for tmp files.
 
 {
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
 }  ||
 {
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# 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
+
+
+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 2>/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
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  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
+    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
+
+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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$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 = "\a"
+
+}
 {
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
+  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
 
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
+# 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[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[      ]*$//
+}'
+fi
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CYGPATH_W@,$CYGPATH_W,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@install_sh@,$install_sh,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-s,@mkdir_p@,$mkdir_p,;t t
-s,@AWK@,$AWK,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@am__leading_dot@,$am__leading_dot,;t t
-s,@AMTAR@,$AMTAR,;t t
-s,@am__tar@,$am__tar,;t t
-s,@am__untar@,$am__untar,;t t
-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
-s,@MAINT@,$MAINT,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@DEPDIR@,$DEPDIR,;t t
-s,@am__include@,$am__include,;t t
-s,@am__quote@,$am__quote,;t t
-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s,@CCDEPMODE@,$CCDEPMODE,;t t
-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
-s,@TMP_XAW_CFLAGS@,$TMP_XAW_CFLAGS,;t t
-s,@TMP_XAW_LIBS@,$TMP_XAW_LIBS,;t t
-s,@XAW_USE_XPRINT_TRUE@,$XAW_USE_XPRINT_TRUE,;t t
-s,@XAW_USE_XPRINT_FALSE@,$XAW_USE_XPRINT_FALSE,;t t
-s,@XLOAD_CFLAGS@,$XLOAD_CFLAGS,;t t
-s,@XLOAD_LIBS@,$XLOAD_LIBS,;t t
-s,@APPDEFS_CFLAGS@,$APPDEFS_CFLAGS,;t t
-s,@APPDEFS_LIBS@,$APPDEFS_LIBS,;t t
-s,@appdefaultdir@,$appdefaultdir,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@APP_MAN_SUFFIX@,$APP_MAN_SUFFIX,;t t
-s,@LIB_MAN_SUFFIX@,$LIB_MAN_SUFFIX,;t t
-s,@FILE_MAN_SUFFIX@,$FILE_MAN_SUFFIX,;t t
-s,@MISC_MAN_SUFFIX@,$MISC_MAN_SUFFIX,;t t
-s,@DRIVER_MAN_SUFFIX@,$DRIVER_MAN_SUFFIX,;t t
-s,@ADMIN_MAN_SUFFIX@,$ADMIN_MAN_SUFFIX,;t t
-s,@APP_MAN_DIR@,$APP_MAN_DIR,;t t
-s,@LIB_MAN_DIR@,$LIB_MAN_DIR,;t t
-s,@FILE_MAN_DIR@,$FILE_MAN_DIR,;t t
-s,@MISC_MAN_DIR@,$MISC_MAN_DIR,;t t
-s,@DRIVER_MAN_DIR@,$DRIVER_MAN_DIR,;t t
-s,@ADMIN_MAN_DIR@,$ADMIN_MAN_DIR,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
+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
 
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
+# 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
-fi # test -n "$CONFIG_FILES"
+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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-       cat >$tmp/stdin
-       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+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*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) 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 `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          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
+      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 '`
+         $as_echo "$*" | 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;}
+    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 >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
   esac
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+  ac_dir=`$as_dirname -- "$ac_file" ||
 $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'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_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"; as_fn_mkdir_p
   ac_builddir=.
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$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|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
 
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
 
   case $INSTALL in
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
   esac
+_ACEOF
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-  # 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.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-                                    sed 's,.*/,,'` by configure."
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-        # Absolute (can't be DOS-style, as IFS=:)
-        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        echo "$f";;
-      *) # Relative
-        if test -f "$f"; then
-          # Build tree
-          echo "$f"
-        elif test -f "$srcdir/$f"; then
-          # Source tree
-          echo "$srcdir/$f"
-        else
-          # /dev/null tree
-          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        fi;;
-      esac
-    done` || { (exit 1); exit 1; }
+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=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+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;}
+_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' ;;
+esac
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
+
+# 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 || 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,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
-ac_dB='[        ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+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
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+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' "$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 "$ac_tmp/stdin"
   case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-       cat >$tmp/stdin
-       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
-
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-        # Absolute (can't be DOS-style, as IFS=:)
-        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        # Do quote $f, to prevent DOS paths from being IFS'd.
-        echo "$f";;
-      *) # Relative
-        if test -f "$f"; then
-          # Build tree
-          echo "$f"
-        elif test -f "$srcdir/$f"; then
-          # Source tree
-          echo "$srcdir/$f"
-        else
-          # /dev/null tree
-          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-        fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #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.
-cat >>conftest.undefs <<\_ACEOF
-s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-  # 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.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
+  -) 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
+  #
   if test x"$ac_file" != x-; then
-    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
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$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'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-      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
-    cat $tmp/config.h
-    rm -f $tmp/config.h
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $ac_file | $ac_file:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$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'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_dest" : 'X\(//\)[^/]' \| \
-        X"$ac_dest" : 'X\(//\)$' \| \
-        X"$ac_dest" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-  ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
 
 
-  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
-  case $ac_dest in
-    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`(dirname "$mf") 2>/dev/null ||
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`(dirname "$file") 2>/dev/null ||
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    { if $as_mkdir_p; then
-    mkdir -p $dirpart/$fdir
-  else
-    as_dir=$dirpart/$fdir
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
     done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
   done
-done
+}
  ;;
+
   esac
-done
-_ACEOF
+done # for ac_tag
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
-{ (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.
@@ -4982,6 +6453,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
 
index d310de8..aad0d67 100644 (file)
@@ -21,15 +21,41 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xload,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xload)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xload], [1.1.0],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xload])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+
 AM_CONFIG_HEADER(config.h)
 
-AC_PROG_CC
-AC_PROG_INSTALL
+# Internationalization & localization support
+AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
+AC_MSG_CHECKING([where to install localized messages])
+AC_ARG_WITH([localedir], AS_HELP_STRING([--with-localedir=<path>],
+        [Path to install message files in (default: datadir/locale)]),
+        [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
+AX_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages])
+if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
+        AC_MSG_RESULT([nowhere])
+        USE_GETTEXT="no"
+else
+        AC_MSG_RESULT([$LOCALEDIR])
+fi
+
+if test "x$USE_GETTEXT" = "xyes" ; then
+        AC_DEFINE([USE_GETTEXT], 1,
+                  [Define to 1 if you want to use the gettext() function.])
+fi
+AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
+
 
 ### How to check load average on various OS'es:
 
@@ -37,16 +63,15 @@ AC_PROG_INSTALL
 AC_CHECK_LIB([kstat], [kstat_open])
 
 # Checks for pkg-config packages
-XAW_CHECK_XPRINT_SUPPORT(XLOAD)
-
-AC_SUBST(XLOAD_CFLAGS)
-AC_SUBST(XLOAD_LIBS)
+PKG_CHECK_MODULES(XLOAD, xaw7 xmu xt x11)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+AC_ARG_WITH(appdefaultdir,
+       AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+         [specify directory for app-defaults files (default is autodetected)]),
+       [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
 
 AC_OUTPUT([Makefile])
index 04701da..df8eea7 100755 (executable)
@@ -1,9 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2005-07-09.11
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
 
 # 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
@@ -16,9 +17,7 @@ scriptversion=2005-07-09.11
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
    depmode=dashmstdout
 fi
 
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
 ## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
 ## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
   stat=$?
   if test $stat -eq 0; then :
   else
@@ -178,14 +199,14 @@ sgi)
 ' < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
     tr '
-' ' ' >> $depfile
-    echo >> $depfile
+' ' ' >> "$depfile"
+    echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
     tr ' ' '
 ' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+   >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -201,34 +222,39 @@ aix)
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -276,6 +302,51 @@ icc)
   rm -f "$tmpdepfile"
   ;;
 
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +359,13 @@ tru64)
 
    if test "$libtool" = yes; then
       # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
+      # static library.  This mechanism is used in libtool 1.4 series to
       # handle both shared and static libraries in a single compilation.
       # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
       #
       # With libtool 1.5 this exception was removed, and libtool now
       # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # compilations output dependencies in $dir.libs/$base.o.d and
       # in $dir$base.o.d.  We have to check for both files, because
       # one of the two compilations can be disabled.  We should prefer
       # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
@@ -345,7 +416,7 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -396,32 +467,39 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
   # X makedepend
   shift
-  cleared=no
-  for arg in "$@"; do
+  cleared=no eat=no
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
       cleared=yes ;;
     esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
     case "$arg" in
     -D*|-I*)
       set fnord "$@" "$arg"; shift ;;
     # Strip any option that makedepend may not understand.  Remove
     # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
     -*|$object)
       ;;
     *)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
@@ -441,7 +519,7 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -479,13 +557,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
@@ -498,16 +590,23 @@ msvisualcpp)
        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
   echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
@@ -526,5 +625,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 1a6a365..1439090 100644 (file)
@@ -415,15 +415,15 @@ XtPointer call_data;      /* pointer to (double) return value */
 
 #if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
 
-void InitLoadPoint()
+void InitLoadPoint(void)
 {
       return;
 }
 
-void GetLoadPoint( w, closure, call_data )
-     Widget   w;              /* unused */
-     XtPointer  closure;        /* unused */
-     XtPointer  call_data;      /* pointer to (double) return value */
+void GetLoadPoint(
+    Widget     w,              /* unused */
+    XtPointer  closure,        /* unused */
+    XtPointer  call_data)      /* pointer to (double) return value */
 {
       static int fd = -1;
       int n;
@@ -476,17 +476,17 @@ void GetLoadPoint( w, closure, call_data )
 
 static processor_set_t default_set;
 
-void InitLoadPoint()
+void InitLoadPoint(void)
 {
   if (processor_set_default (mach_host_self (), &default_set) != KERN_SUCCESS)
     xload_error("cannot get processor_set_default", "");
 }
 
 /* ARGSUSED */
-void GetLoadPoint( w, closure, call_data )
-     Widget    w;              /* unused */
-     XtPointer closure;        /* unused */
-     XtPointer call_data;      /* pointer to (double) return value */
+void GetLoadPoint(
+    Widget     w,              /* unused */
+    XtPointer  closure,        /* unused */
+    XtPointer  call_data)      /* pointer to (double) return value */
 {
   host_t host;
   struct processor_set_basic_info info;
@@ -508,22 +508,22 @@ void GetLoadPoint( w, closure, call_data )
 
 #else /* __GNU__ */
 
-#ifdef __DARWIN__
+#ifdef __APPLE__
 
 #include <mach/mach.h>
 
 static mach_port_t host_priv_port;
 
-void InitLoadPoint()
+void InitLoadPoint(void)
 {
     host_priv_port = mach_host_self();
 }
 
 /* ARGSUSED */
-void GetLoadPoint( w, closure, call_data )
-    Widget     w;              /* unused */
-    XtPointer  closure;        /* unused */
-    XtPointer  call_data;      /* pointer to (double) return value */
+void GetLoadPoint(
+    Widget     w,              /* unused */
+    XtPointer  closure,        /* unused */
+    XtPointer  call_data)      /* pointer to (double) return value */
 {
     double *loadavg = (double *)call_data;
 
@@ -540,7 +540,7 @@ void GetLoadPoint( w, closure, call_data )
     return;
 }
 
-#else /* __DARWIN__ */
+#else /* __APPLE__ */
 
 #ifdef LOADSTUB
 
@@ -591,7 +591,7 @@ static  int       nto_idle_id;
 static  struct timespec nto_now, nto_last;
 
 void
-InitLoadPoint()
+InitLoadPoint(void)
 {
   nto_idle_id = ClockId(1, 1); /* Idle thread */
   ClockTime(nto_idle_id, NULL, &nto_idle_last);
@@ -600,10 +600,10 @@ InitLoadPoint()
 
 /* ARGSUSED */
 void
-GetLoadPoint( w, closure, call_data )           /* QNX NTO version */
-Widget  w;              /* unused */
-XtPointer closure;      /* unused */
-XtPointer call_data;    /* pointer to (double) return value */
+GetLoadPoint(                  /* QNX NTO version */
+    Widget     w,              /* unused */
+    XtPointer  closure,        /* unused */
+    XtPointer  call_data)      /* pointer to (double) return value */
 {
     double *loadavg = (double *)call_data;
     double timediff;
@@ -633,7 +633,7 @@ static struct nlist nl[] = {
 static kvm_t *kd;
 static int fscale;
 
-void InitLoadPoint()
+void InitLoadPoint(void)
 {
   fixpt_t averunnable[3];  /* unused really */
 
@@ -654,10 +654,10 @@ void InitLoadPoint()
   return;
 }
 
-void GetLoadPoint(w, closure, call_data)
-     Widget w;          /* unused */
-     XtPointer closure;   /* unused */
-     XtPointer call_data; /* ptr to (double) return value */
+void GetLoadPoint(
+     Widget    w,              /* unused */
+     XtPointer closure,        /* unused */
+    XtPointer  call_data)      /* ptr to (double) return value */
 {
   double *loadavg = (double *)call_data;
   fixpt_t t;
@@ -928,7 +928,7 @@ void InitLoadPoint()
        nl[i].n_value = (int)nl[i].n_value - v.v_kvoffset;
     }
 #else /* not macII */
-#if !defined(SVR4) && !defined(sgi) && !defined(MOTOROLA) && !defined(AIXV5) && !(BSD >= 199103)
+#if !defined(SVR4) && !defined(sgi) && !defined(MOTOROLA) && !defined(AIXV5) && !(BSD >= 199103) && !defined(__APPLE__)
     extern void nlist();
 #endif
 
@@ -1132,14 +1132,13 @@ void GetLoadPoint( w, closure, call_data )
 #endif /* __QNXNTO__ else */
 #endif /* __osf__ else */
 #endif /* LOADSTUB else */
-#endif /* __DARWIN__ else */
+#endif /* __APPLE__ else */
 #endif /* __GNU__ else */
 #endif /* linux else */
 #endif /* KVM_ROUTINES else */
 #endif /* SYSV && i386 else */
 
-void xload_error(str1, str2)
-char *str1, *str2;
+void xload_error(char *str1, char *str2)
 {
     (void) fprintf(stderr,"xload: %s %s\n", str1, str2);
 #ifdef __bsdi__
index 9629d01..43d1eb3 100644 (file)
 #endif
 
 #ifdef RLOADSTUB
-void GetRLoadPoint( w, closure, call_data )
-     Widget   w;              /* unused */
-     XtPointer  closure;        /* unused */
-     XtPointer  call_data;      /* pointer to (double) return value */
+void GetRLoadPoint(
+    Widget     w,              /* unused */
+    XtPointer  closure,        /* unused */
+    XtPointer  call_data)      /* pointer to (double) return value */
 
 {
   *(double *)call_data = 1.0;
@@ -30,21 +30,12 @@ void GetRLoadPoint( w, closure, call_data )
 #define _PATH_RWHODIR "/var/spool/rwho"
 #endif
 
-typedef struct _XLoadResources {
-  Boolean show_label;
-  Boolean use_lights;
-  String remote;
-} XLoadResources;
-
-extern XLoadResources resources ;
-
 #define WHDRSIZE        ((int)(sizeof (buf) - sizeof (buf.wd_we)))
 
-void GetRLoadPoint( w, closure, call_data )
-     Widget   w;              /* unused */
-     XtPointer  closure;        /* unused */
-     XtPointer  call_data;      /* pointer to (double) return value */
-
+void GetRLoadPoint(
+    Widget     w,              /* unused */
+    XtPointer  closure,        /* unused */
+    XtPointer  call_data)      /* pointer to (double) return value */
 {
   int f;
   static char *fname = NULL;
index 4d4a951..6781b98 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,38 +39,68 @@ scriptversion=2005-05-14.22
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
 
-chmodcmd="$chmodprog 0755"
-chowncmd=
 chgrpcmd=
-stripcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
 src=
 dst=
 dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
 no_target_directory=
 
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
 In the 4th, create DIRECTORIES.
 
 Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last 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.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 "
 
-while test -n "$1"; do
+while test $# -ne 0; do
   case $1 in
-    -c) shift
-        continue;;
+    -c) ;;
+
+    -C) copy_on_change=true;;
 
-    -d) dir_arg=true
-        shift
-        continue;;
+    -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
     --help) echo "$usage"; exit $?;;
 
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
+    -s) stripcmd=$stripprog;;
 
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
+    -t) dst_arg=$2
+       shift;;
 
-    -T) no_target_directory=true
-       shift
-       continue;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    *)  # When -d is used, all remaining arguments are directories to create.
-       # When -t is used, the destination is already specified.
-       test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-       for arg
-       do
-          if test -n "$dstarg"; then
-           # $@ is not empty: it contains at least $arg.
-           set fnord "$@" "$dstarg"
-           shift # fnord
-         fi
-         shift # arg
-         dstarg=$arg
-       done
+    --)        shift
        break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
   esac
+  shift
 done
 
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
   if test -z "$dir_arg"; then
     echo "$0: no input file specified." >&2
     exit 1
@@ -164,24 +199,47 @@ if test -z "$1"; then
   exit 0
 fi
 
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
 for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src ;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
     dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
   else
+
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
     # might cause directories to be created, which would be especially bad
     # if $src (and thus $dsttmp) contains '*'.
@@ -190,71 +248,199 @@ do
       exit 1
     fi
 
-    if test -z "$dstarg"; then
+    if test -z "$dst_arg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dstarg
+    dst=$dst_arg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst ;;
+      -*) dst=./$dst;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
+       echo "$0: $dst_arg: Is a directory" >&2
        exit 1
       fi
-      dst=$dst/`basename "$src"`
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
     fi
   fi
 
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+  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
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       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-writeable 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;;
+    esac
 
-  # Make sure that the destination directory exists.
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
 
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
+      # The umask is ridiculous, or 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.
 
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
 
-    pathcomp=
+      eval "$initialize_posix_glob"
 
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
       shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (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
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
       fi
-      pathcomp=$pathcomp/
-    done
+    fi
   fi
 
   if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
   else
-    dstfile=`basename "$dst"`
 
     # Make a couple of temp file names in the proper directory.
     dsttmp=$dstdir/_inst.$$_
@@ -262,10 +448,9 @@ do
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
 
     # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -273,51 +458,63 @@ do
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-              || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-        }
-    }
-  fi || { (exit 1); exit 1; }
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
 done
 
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/xload/m4/ax_define_dir.m4 b/xload/m4/ax_define_dir.m4
new file mode 100644 (file)
index 0000000..b74d155
--- /dev/null
@@ -0,0 +1,49 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_define_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+#   This macro sets VARNAME to the expansion of the DIR variable, taking
+#   care of fixing up ${prefix} and such.
+#
+#   VARNAME is then offered as both an output variable and a C preprocessor
+#   symbol.
+#
+#   Example:
+#
+#     AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
+#   Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2008 Alexandre Oliva
+#
+#   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 6
+
+AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR])
+AC_DEFUN([AX_DEFINE_DIR], [
+  prefix_NONE=
+  exec_prefix_NONE=
+  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}.  Thus we have to use `eval' twice.
+  eval ax_define_dir="\"[$]$2\""
+  eval ax_define_dir="\"$ax_define_dir\""
+  AC_SUBST($1, "$ax_define_dir")
+  AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3])
+  test "$prefix_NONE" && prefix=NONE
+  test "$exec_prefix_NONE" && exec_prefix=NONE
+])
index 894e786..28055d2 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2005-06-08.21
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2005-06-08.21
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,6 +31,8 @@ if test $# -eq 0; then
 fi
 
 run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
 # In the cases where this matters, `missing' is being run in the
 # srcdir already.
@@ -44,7 +44,7 @@ fi
 
 msg="missing on your system"
 
-case "$1" in
+case $1 in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
@@ -77,6 +77,7 @@ Supported PROGRAM values:
   aclocal      touch file \`aclocal.m4'
   autoconf     touch file \`configure'
   autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
   automake     touch all \`Makefile.in' files
   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
   flex         create \`lex.yy.c', if possible, from existing .c
@@ -86,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -103,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -135,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case "$1" in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -145,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -154,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -164,7 +175,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
-      case "$f" in
+      case $f in
       *:*) touch_files="$touch_files "`echo "$f" |
                                       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
       *) touch_files="$touch_files $f.in";;
@@ -184,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -192,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -f "$file"; then
        touch $file
     else
@@ -207,80 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.c
            fi
            SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" y.tab.h
            fi
          ;;
        esac
     fi
-    if [ ! -f y.tab.h ]; then
+    if test ! -f y.tab.h; then
        echo >y.tab.h
     fi
-    if [ ! -f y.tab.c ]; then
+    if test ! -f y.tab.c; then
        echo 'main() { return 0; }' >y.tab.c
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
+    if test $# -ne 1; then
         eval LASTARG="\${$#}"
-       case "$LASTARG" in
+       case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
+           if test -f "$SRCFILE"; then
                 cp "$SRCFILE" lex.yy.c
            fi
          ;;
        esac
     fi
-    if [ ! -f lex.yy.c ]; then
+    if test ! -f lex.yy.c; then
        echo 'main() { return 0; }' >lex.yy.c
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
         \`Help2man' package in order for those modifications to take
         effect.  You can get \`Help2man' from any GNU archive site."
 
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
        touch $file
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -289,11 +298,17 @@ WARNING: \`$1' is $msg.  You should only need it if
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
     if test -z "$file"; then
       # ... or it is the one specified with @setfilename ...
       infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
       # ... or it is derived from the source name (dir/f.texi becomes f.info)
       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
@@ -303,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
@@ -317,13 +332,13 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     firstarg="$1"
     if shift; then
-       case "$firstarg" in
+       case $firstarg in
        *o*)
            firstarg=`echo "$firstarg" | sed s/o//`
            tar "$firstarg" "$@" && exit 0
            ;;
        esac
-       case "$firstarg" in
+       case $firstarg in
        *h*)
            firstarg=`echo "$firstarg" | sed s/h//`
            tar "$firstarg" "$@" && exit 0
@@ -356,5 +371,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/xload/mkinstalldirs b/xload/mkinstalldirs
new file mode 100755 (executable)
index 0000000..d2d5f21
--- /dev/null
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=""
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
index 2dc1cb3..17e4905 100644 (file)
@@ -29,11 +29,38 @@ other dealings in this Software without prior written authorization
 from the X Consortium.
 
 */
+/*
+ * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
 
 /*
  * xload - display system load average in a window
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <errno.h>
 #include <stdio.h> 
 #include <stdlib.h>
@@ -50,23 +77,21 @@ from the X Consortium.
 #include <X11/Xmu/SysUtil.h>
 #include "xload.h"
 
+#ifdef USE_GETTEXT
+# include <X11/Xlocale.h>
+# include <libintl.h>
+#else
+# define gettext(a) (a)
+#endif
+
 #include "xload.bit"
 
-char *ProgramName;
+static char *ProgramName;
 
 static void quit(Widget w, XEvent *event, String *params, Cardinal *num_params);
 static void ClearLights(Display *dpy);
 static void SetLights(XtPointer data, XtIntervalId *timer);
 
-/*
- * Definition of the Application resources structure.
- */
-
-typedef struct _XLoadResources {
-  Boolean show_label;
-  Boolean use_lights;
-  String remote;
-} XLoadResources;
 
 /*
  * Command line options table.  Only resources are entered here...there is a
@@ -118,32 +143,32 @@ static int light_update = 10 * 1000;
 
 static void usage(void)
 {
-    fprintf (stderr, "usage:  %s [-options ...]\n\n", ProgramName);
-    fprintf (stderr, "where options include:\n");
-    fprintf (stderr,
-      "    -display dpy            X server on which to display\n");
-    fprintf (stderr,
-      "    -geometry geom          size and location of window\n");
-    fprintf (stderr, 
-      "    -fn font                font to use in label\n");
-    fprintf (stderr, 
-      "    -scale number           minimum number of scale lines\n");
-    fprintf (stderr, 
-      "    -update seconds         interval between updates\n");
-    fprintf (stderr,
-      "    -label string           annotation text\n");
-    fprintf (stderr, 
-      "    -bg color               background color\n");
-    fprintf (stderr, 
-      "    -fg color               graph color\n");
-    fprintf (stderr, 
-      "    -hl color               scale and text color\n");
-    fprintf (stderr, 
-      "    -nolabel                removes the label from above the chart.\n");
-    fprintf (stderr, 
-      "    -jumpscroll value       number of pixels to scroll on overflow\n");
-    fprintf (stderr,
-      "    -remote host            remote host to monitor\n");
+    fprintf (stderr, gettext("usage:  %s [-options ...]\n\n"), ProgramName);
+    fprintf (stderr, gettext("where options include:\n"));
+    fprintf (stderr, "    -display %s",
+             gettext("display        X server on which to display\n"));
+    fprintf (stderr, "    -geometry %s",
+             gettext("geometry      size and location of window\n"));
+    fprintf (stderr, "    -fn %s",
+             gettext("font                font to use in label\n"));
+    fprintf (stderr, "    -scale %s",
+             gettext("number           minimum number of scale lines\n"));
+    fprintf (stderr, "    -update %s",
+             gettext("seconds         interval between updates\n"));
+    fprintf (stderr, "    -label %s",
+             gettext("string           annotation text\n"));
+    fprintf (stderr, "    -bg %s",
+             gettext("color               background color\n"));
+    fprintf (stderr, "    -fg %s",
+             gettext("color               graph color\n"));
+    fprintf (stderr, "    -hl %s",
+             gettext("color               scale and text color\n"));
+    fprintf (stderr, "    -nolabel                %s",
+             gettext("removes the label from above the chart.\n"));
+    fprintf (stderr, "    -jumpscroll %s",
+             gettext("value       number of pixels to scroll on overflow\n"));
+    fprintf (stderr, "    -lights                 %s",
+             gettext("use keyboard leds to display current load\n"));
     fprintf (stderr, "\n");
     exit(1);
 }
@@ -156,6 +181,9 @@ main(int argc, char **argv)
     Arg args[1];
     Pixmap icon_pixmap = None;
     char *label, host[256];
+    char *domaindir;
+
+    XtSetLanguageProc ( NULL, NULL, NULL );
 
     ProgramName = argv[0];
 
@@ -164,12 +192,12 @@ main(int argc, char **argv)
     InitLoadPoint();
     /* reset gid first while still (maybe) root */
     if (setgid(getgid()) == -1) {
-           fprintf(stderr, "%s: setgid failed: %s\n", 
+           fprintf(stderr, gettext("%s: setgid failed: %s\n"),
                ProgramName, strerror(errno));
            exit(1);
     }
     if (setuid(getuid()) == -1) {
-           fprintf(stderr, "%s: setuid failed: %s\n", 
+           fprintf(stderr, gettext("%s: setuid failed: %s\n"),
                ProgramName, strerror(errno));
            exit(1);
     }
@@ -178,6 +206,16 @@ main(int argc, char **argv)
 
     toplevel = XtAppInitialize(&app_con, "XLoad", options, XtNumber(options),
                               &argc, argv, NULL, NULL, (Cardinal) 0);
+
+#ifdef USE_GETTEXT
+    textdomain("xload");
+
+    if ((domaindir = getenv ( "TEXTDOMAINDIR" )) == NULL) {
+       domaindir = LOCALEDIR;
+    }
+    bindtextdomain("xload", domaindir);
+#endif
+
     if (argc != 1) usage();
 
     XtGetApplicationResources( toplevel, (XtPointer) &resources, 
@@ -270,8 +308,7 @@ main(int argc, char **argv)
 static unsigned long   current_leds;
 
 static void
-ClearLights (dpy)
-    Display *dpy;
+ClearLights (Display *dpy)
 {
     XKeyboardControl   cntrl;
 
@@ -281,9 +318,7 @@ ClearLights (dpy)
 }
 
 static void
-SetLights (data, timer)
-    XtPointer      data;
-    XtIntervalId    *timer;
+SetLights (XtPointer data, XtIntervalId *timer)
 {
     Widget             toplevel;
     Display            *dpy;
@@ -318,11 +353,7 @@ SetLights (data, timer)
                    SetLights, data);
 }
 
-static void quit (w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+static void quit (Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
     if (event->type == ClientMessage &&
         event->xclient.data.l[0] != wm_delete_window) {
index d32383c..4c58bbb 100644 (file)
@@ -5,8 +5,21 @@
 
 #include <X11/Intrinsic.h>
 
+/*
+ * Definition of the Application resources structure.
+ */
+
+typedef struct _XLoadResources {
+  Boolean show_label;
+  Boolean use_lights;
+  String remote;
+} XLoadResources;
+
+
 extern void InitLoadPoint(void);
 extern void GetLoadPoint(Widget w, XtPointer closure, XtPointer call_data);
 extern void GetRLoadPoint(Widget w, XtPointer closure, XtPointer call_data);
 
+extern XLoadResources resources;
+
 #endif
index 4da1e77..cf04999 100644 (file)
@@ -18,7 +18,7 @@ program displays a periodically updating histogram of the system load average.
 .PP
 .I Xload
 accepts all of the standard X Toolkit command line options (see \fIX(__miscmansuffix__)\fP).
-The order of the options in unimportant.  \fIxload also accepts the
+The order of the options is unimportant.  \fIxload also accepts the
 following additional options:
 .PP
 .TP 8
@@ -94,12 +94,12 @@ specifies required resources
 .SH SEE ALSO
 X(__miscmansuffix__), xrdb(1), mem(4), Athena StripChart Widget.
 .SH BUGS
-This program requires the ability to open and read the special system
-file \fI/dev/kmem\fP.  Sites that do not allow general access to this file
-should make \fIxload\fP belong to the same group as \fI/dev/kmem\fP and
-turn on the \fIset group id\fP permission flag.
+On older platforms, this program may require the ability to open and read
+the special system file \fI/dev/kmem\fP.  Sites that do not allow general 
+access to this file may need to make \fIxload\fP belong to the same group 
+as \fI/dev/kmem\fP and turn on the \fIset group id\fP permission flag.
 .PP
-Reading /dev/kmem is inherently non-portable.  Therefore, the routine
+Reading the load average is inherently non-portable.  Therefore, the routine
 used to read it (get_load.c) must be ported to each new operating system. 
 .SH COPYRIGHT
 Copyright \(co X Consortium
index 7f33cbf..1a758af 100644 (file)
@@ -1,12 +1,24 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright 1988, 1990, 1993 1994, 1998  The Open Group
+Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
index 240f198..9eda074 100644 (file)
@@ -1,3 +1,105 @@
+commit 6d8da24e45c124162b06529290366d465f1df499
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Oct 30 16:58:57 2010 -0700
+
+    xlogo 1.0.3
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b7d9388a51cc90d4ed72aa6fc28c3673c15d3a18
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 24 08:12:50 2010 -0700
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 81aec653b14836ca0588166fb826171fb118adca
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:18 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit f407f555d4ac750199be8c460e2c30228e8588ac
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 11:22:34 2010 -0700
+
+    Fill in COPYING file with copyright notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0f9f099172329dfcb254d2ce1394eae064ad88f9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 18:26:43 2010 -0700
+
+    Combine dependencies into a single call to PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit da7d99707d0ee12c583fe2b083f6ec7abaaab8fb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 18:20:01 2010 -0700
+
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9e0e31869b90f031605ca77f5645014c6de3705b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jun 30 23:25:03 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use XORG_DEFAULT_OPTIONS provided $(SED)
+    Use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f7f0ba3c8fff55c8a38b0786828a372c1dc72715
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Apr 16 15:59:54 2010 -0700
+
+    Add dependency on libSM since xlogo calls SmcCloseConnection
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5a6a92096883c1618ffb0bfc8c44509e42003044
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:07 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1ba50ffb7746f902a678865584eb1fd0c946bda5
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
 commit f826c5af5514da12ee146c61698d4545af391434
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Thu Dec 10 22:33:05 2009 -0800
index 78f68b0..fa8729e 100644 (file)
@@ -20,7 +20,7 @@
 
 bin_PROGRAMS = xlogo
 
-AM_CFLAGS = $(XLOGO_CFLAGS)
+AM_CFLAGS = $(XLOGO_CFLAGS) $(CWARNFLAGS)
 xlogo_LDADD = $(XLOGO_LIBS)
 
 xlogo_SOURCES =        \
@@ -53,27 +53,9 @@ EXTRA_DIST = $(appman_PRE)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
index ac25ee3..3d8e1b3 100644 (file)
@@ -183,6 +183,7 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -196,18 +197,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-XEXT_CFLAGS = @XEXT_CFLAGS@
-XEXT_LIBS = @XEXT_LIBS@
-XFT_CFLAGS = @XFT_CFLAGS@
-XFT_LIBS = @XFT_LIBS@
 XLOGO_CFLAGS = @XLOGO_CFLAGS@
 XLOGO_LIBS = @XLOGO_LIBS@
-XRENDER_CFLAGS = @XRENDER_CFLAGS@
-XRENDER_LIBS = @XRENDER_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -259,7 +256,7 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = $(XLOGO_CFLAGS)
+AM_CFLAGS = $(XLOGO_CFLAGS) $(CWARNFLAGS)
 xlogo_LDADD = $(XLOGO_LIBS)
 xlogo_SOURCES = \
         Logo.c \
@@ -285,24 +282,6 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 EXTRA_DIST = $(appman_PRE)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -797,6 +776,7 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
index c672817..face861 100644 (file)
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -1030,32 +1030,26 @@ AC_SUBST([am__untar])
 
 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
 dnl 
 dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
 dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
 dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
 # XORG_MACROS_VERSION(required-version)
 # -------------------------------------
@@ -1073,7 +1067,7 @@ dnl of the copyright holder.
 # See the "minimum version" comment for each macro you use to see what 
 # version you require.
 m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.3.0])
+m4_define([vers_have], [1.11.0])
 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1141,9 +1135,12 @@ AC_SUBST(RAWCPPFLAGS)
 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 # Not sure if there's any better way than just hardcoding by OS name.
 # Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
 if test x$APP_MAN_SUFFIX = x    ; then
     APP_MAN_SUFFIX=1
@@ -1212,8 +1209,60 @@ AC_SUBST([FILE_MAN_DIR])
 AC_SUBST([MISC_MAN_DIR])
 AC_SUBST([DRIVER_MAN_DIR])
 AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
 ]) # XORG_MANPAGE_SECTIONS
 
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
 # XORG_CHECK_LINUXDOC
 # -------------------
 # Minimum version: 1.0.0
@@ -1223,23 +1272,14 @@ AC_SUBST([ADMIN_MAN_DIR])
 # Whether or not the necessary tools and files are found can be checked
 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
 AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
-else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
 AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
 
-AC_MSG_CHECKING([Whether to build documentation])
+AC_MSG_CHECKING([whether to build documentation])
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
    BUILDDOC=yes
 else
    BUILDDOC=no
@@ -1249,9 +1289,9 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
 AC_MSG_RESULT([$BUILDDOC])
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
    BUILDPDFDOC=yes
 else
    BUILDPDFDOC=no
@@ -1261,7 +1301,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 MAKE_PDF="$PS2PDF"
 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
@@ -1281,48 +1321,44 @@ AC_SUBST(MAKE_HTML)
 # indicates whether the necessary tools and files are found and, if set,
 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
 AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
 BUILDTXTDOC=no
 BUILDPDFDOC=no
 BUILDPSDOC=no
 BUILDHTMLDOC=no
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
    test x$BUILD_TXTDOC != xno; then
        BUILDTXTDOC=yes
 fi
 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
    test x$BUILD_PDFDOC != xno; then
        BUILDPDFDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
    test x$BUILD_PSDOC != xno; then
        BUILDPSDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 AC_MSG_RESULT([$BUILDPSDOC])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
    test x$BUILD_HTMLDOC != xno; then
        BUILDHTMLDOC=yes
 fi
@@ -1340,6 +1376,548 @@ AC_SUBST(MAKE_PDF)
 AC_SUBST(MAKE_HTML)
 ]) # XORG_CHECK_DOCBOOK
 
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+          [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
+# --------------------------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+          [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: ]_defopt[)]),
+          [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: ]_defopt[)]),
+          [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+m4_define([default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: ]default[)]),
+          [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+m4_define([devel_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: ]devel_default[)]),
+          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+m4_define([spec_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: ]spec_default[)]),
+          [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
 # XORG_CHECK_MALLOC_ZERO
 # ----------------------
 # Minimum version: 1.0.0
@@ -1369,7 +1947,8 @@ main() {
     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 }],
                [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1392,38 +1971,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 # ----------------
 # Minimum version: 1.1.0
 #
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
 #
 AC_DEFUN([XORG_WITH_LINT],[
 
-# Allow checking code with lint, sparse, etc.
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
 AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
                [Use a lint-style source code checker (default: disabled)])],
                [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-       LINT="$use_lint"
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
 fi
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
 ]) # XORG_WITH_LINT
 
@@ -1433,28 +2043,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
 #
 # Sets up flags for building lint libraries for checking programs that call
 # functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
 #
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
 AC_DEFUN([XORG_LINT_LIBRARY],[
 AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
 AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
        [Create lint library (default: disabled)])],
        [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
 fi
+
 AC_SUBST(LINTLIB)
 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
@@ -1467,11 +2078,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 # Defines CWARNFLAGS to enable C compiler warnings.
 #
 AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -1484,7 +2095,6 @@ else
     fi
 fi
 AC_SUBST(CWARNFLAGS)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 ]) # XORG_CWARNFLAGS
 
 # XORG_STRICT_OPTION
@@ -1493,7 +2103,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 #
 # Add configure option to enable strict compilation
 AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 AC_REQUIRE([AC_PROG_CC_C99])
 AC_REQUIRE([XORG_CWARNFLAGS])
 
@@ -1523,12 +2133,15 @@ AC_SUBST([CWARNFLAGS])
 # Defines default options for X.Org modules.
 #
 AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
 XORG_CWARNFLAGS
 XORG_STRICT_OPTION
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
 XORG_INSTALL
 XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
 ]) # XORG_DEFAULT_OPTIONS
 
 # XORG_INSTALL()
@@ -1536,15 +2149,15 @@ XORG_MANPAGE_SECTIONS
 # Minimum version: 1.4.0
 #
 # Defines the variable INSTALL_CMD as the command to copy
-# INSTALL from $prefix/share/doc/util-macros.
+# INSTALL from $prefix/share/util-macros.
 #
 AC_DEFUN([XORG_INSTALL], [
 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-macros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros)
-INSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
 mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
 || (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
 AC_SUBST([INSTALL_CMD])
 ]) # XORG_INSTALL
 dnl Copyright 2005 Red Hat, Inc
@@ -1574,22 +2187,9 @@ dnl
 
 # XORG_RELEASE_VERSION
 # --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  
 AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AS_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
                [Major version of this package])
old mode 100755 (executable)
new mode 100644 (file)
index dc84c68..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-11-20'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -551,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -967,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
old mode 100755 (executable)
new mode 100644 (file)
index 2a55a50..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-11-20'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -281,6 +283,7 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
@@ -294,7 +297,7 @@ case $basic_machine in
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e \
        | we32k \
@@ -302,6 +305,15 @@ case $basic_machine in
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -333,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -367,6 +379,7 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
@@ -380,7 +393,8 @@ case $basic_machine in
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
        | ubicom32-* \
        | v850-* | v850e-* | vax-* \
@@ -480,6 +494,15 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -839,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1073,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1294,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1435,6 +1458,8 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1475,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
index babcb15..0156fd5 100755 (executable)
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for xlogo 1.0.2.
+# Generated by GNU Autoconf 2.68 for xlogo 1.0.3.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # 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
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       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 test x$as_have_required = xno; then :
@@ -320,7 +328,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -360,19 +368,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  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: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -534,7 +542,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&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`
 
@@ -553,8 +561,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='xlogo'
 PACKAGE_TARNAME='xlogo'
-PACKAGE_VERSION='1.0.2'
-PACKAGE_STRING='xlogo 1.0.2'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='xlogo 1.0.3'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
@@ -601,14 +609,12 @@ LIBOBJS
 appdefaultdir
 APPDEFS_LIBS
 APPDEFS_CFLAGS
-XEXT_LIBS
-XEXT_CFLAGS
-XFT_LIBS
-XFT_CFLAGS
-XRENDER_LIBS
-XRENDER_CFLAGS
 XLOGO_LIBS
 XLOGO_CFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
 DRIVER_MAN_DIR
 MISC_MAN_DIR
@@ -621,6 +627,7 @@ MISC_MAN_SUFFIX
 FILE_MAN_SUFFIX
 LIB_MAN_SUFFIX
 APP_MAN_SUFFIX
+SED
 host_os
 host_vendor
 host_cpu
@@ -632,8 +639,6 @@ build
 INSTALL_CMD
 PKG_CONFIG
 CHANGELOG_CMD
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
 CWARNFLAGS
 EGREP
 GREP
@@ -723,9 +728,8 @@ ac_user_opts='
 enable_option_checking
 enable_maintainer_mode
 enable_dependency_tracking
-enable_silent_rules
 enable_strict_compilation
-with_release_version
+enable_silent_rules
 with_render
 with_appdefaultdir
 '
@@ -741,12 +745,6 @@ CPP
 PKG_CONFIG
 XLOGO_CFLAGS
 XLOGO_LIBS
-XRENDER_CFLAGS
-XRENDER_LIBS
-XFT_CFLAGS
-XFT_LIBS
-XEXT_CFLAGS
-XEXT_LIBS
 APPDEFS_CFLAGS
 APPDEFS_LIBS'
 
@@ -811,8 +809,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.
@@ -857,7 +856,7 @@ do
     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'`
     case $ac_user_opts in
@@ -883,7 +882,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1087,7 +1086,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1103,7 +1102,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1133,8 +1132,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1142,7 +1141,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1152,7 +1151,7 @@ Try \`$0 --help' for more information."
     $as_echo "$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
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1160,13 +1159,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  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" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1189,7 +1188,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  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'
@@ -1203,8 +1202,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $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
+    $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
@@ -1219,9 +1218,9 @@ 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 .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1260,11 +1259,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  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" || as_fn_error "$ac_msg"
+       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
@@ -1290,7 +1289,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xlogo 1.0.2 to adapt to many kinds of systems.
+\`configure' configures xlogo 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1304,7 +1303,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
@@ -1360,7 +1359,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xlogo 1.0.2:";;
+     short | recursive ) echo "Configuration of xlogo 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1372,17 +1371,15 @@ Optional Features:
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')
   --enable-strict-compilation
                           Enable all warnings from compiler and make them
                           errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
   --with-xrender          Use Xrender & Xft2 to draw logo
   --with-appdefaultdir=<pathname>
                           specify directory for app-defaults files (default is
@@ -1401,14 +1398,6 @@ Some influential environment variables:
   XLOGO_CFLAGS
               C compiler flags for XLOGO, overriding pkg-config
   XLOGO_LIBS  linker flags for XLOGO, overriding pkg-config
-  XRENDER_CFLAGS
-              C compiler flags for XRENDER, overriding pkg-config
-  XRENDER_LIBS
-              linker flags for XRENDER, overriding pkg-config
-  XFT_CFLAGS  C compiler flags for XFT, overriding pkg-config
-  XFT_LIBS    linker flags for XFT, overriding pkg-config
-  XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config
-  XEXT_LIBS   linker flags for XEXT, overriding pkg-config
   APPDEFS_CFLAGS
               C compiler flags for APPDEFS, overriding pkg-config
   APPDEFS_LIBS
@@ -1480,10 +1469,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xlogo configure 1.0.2
-generated by GNU Autoconf 2.65
+xlogo configure 1.0.3
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2009 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
@@ -1527,20 +1516,23 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
 ac_fn_c_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1549,8 +1541,12 @@ $4
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
 #endif
 
   ;
@@ -1567,7 +1563,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 
@@ -1592,7 +1588,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
        }; then :
@@ -1603,7 +1599,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1645,7 +1641,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1659,7 +1655,7 @@ 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1677,15 +1673,15 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 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 xlogo $as_me 1.0.2, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+It was created by xlogo $as_me 1.0.3, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1795,11 +1791,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1833,11 +1827,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1850,11 +1842,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1868,11 +1858,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1927,7 +1915,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$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
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1942,7 +1935,11 @@ do
     { $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
 
@@ -2018,7 +2015,7 @@ if $ac_cache_corrupted; then
 $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
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -2035,16 +2032,22 @@ am__api_version='1.11'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  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
+  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,
@@ -2073,7 +2076,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $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 :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2160,11 +2163,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2186,7 +2189,7 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" "$LINENO" 5
    fi
 
@@ -2196,7 +2199,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2250,7 +2253,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2290,7 +2293,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2343,7 +2346,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2394,7 +2397,7 @@ do
 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 test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2434,7 +2437,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2442,7 +2445,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2476,7 +2479,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2492,7 +2495,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xlogo'
- VERSION='1.0.2'
+ VERSION='1.0.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2556,7 +2559,7 @@ fi
 
 
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 
 
 
@@ -2640,7 +2643,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2680,7 +2683,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2733,7 +2736,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2773,7 +2776,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2832,7 +2835,7 @@ if test -z "$CC"; then
 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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2876,7 +2879,7 @@ do
 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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2930,8 +2933,8 @@ 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;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -3045,9 +3048,8 @@ 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;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+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; }
@@ -3089,8 +3091,8 @@ done
 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 compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -3147,9 +3149,9 @@ $as_echo "$ac_try_echo"; } >&5
     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.
+as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3160,7 +3162,7 @@ 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 test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3200,8 +3202,8 @@ 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;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -3211,7 +3213,7 @@ 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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3248,7 +3250,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 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 test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3326,7 +3328,7 @@ else
 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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3425,7 +3427,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3548,6 +3550,183 @@ else
 fi
 
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3561,7 +3740,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -3591,7 +3770,7 @@ 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.
@@ -3607,11 +3786,11 @@ else
 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
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -3650,7 +3829,7 @@ 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.
@@ -3666,18 +3845,18 @@ else
 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
+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; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3689,7 +3868,7 @@ 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 test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -3738,7 +3917,7 @@ esac
   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
+    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
@@ -3752,7 +3931,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -3804,7 +3983,7 @@ esac
   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
+    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
@@ -3819,7 +3998,7 @@ $as_echo "$ac_cv_path_EGREP" >&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 test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3936,8 +4115,7 @@ 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
 "
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+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
 done
 
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __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
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  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 void
-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;
-  float fnumber;
-
-  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);
-}
-
-int
-main ()
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  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[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
-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
-  test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" 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_c99"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
-
-fi
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
   ;;
 esac
@@ -4175,7 +4176,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4242,27 +4243,27 @@ $as_echo "no" >&6; }
 fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4280,14 +4281,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
@@ -4295,7 +4296,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4311,13 +4312,83 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
 
 
 
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -4325,7 +4396,7 @@ if  test "x$GCC" = xyes ; then
     esac
 else
     ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
@@ -4336,21 +4407,9 @@ fi
     fi
 fi
 
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=0;;
-esac
-AM_BACKSLASH='\'
-
-
 
 
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 
 
 
@@ -4363,14 +4422,14 @@ fi
 
 if test "x$STRICT_COMPILE" = "xyes"; then
        ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
   SUNCC="yes"
 else
   SUNCC="no"
 fi
 
        ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then :
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
   INTELCC="yes"
 else
   INTELCC="no"
@@ -4389,20 +4448,6 @@ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
 
 
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then :
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { $as_echo "$as_me:${as_lineno-$LINENO}: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
 _ACEOF
@@ -4430,1089 +4475,192 @@ _ACEOF
 CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
 mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
 || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-
-
-
-
-macros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros)
-INSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-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
-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 test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-    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"
-    $as_echo "$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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-    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"
-    $as_echo "$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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  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; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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 test "${ac_cv_prog_CC+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  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
-  test -z "$as_dir" && as_dir=.
-    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"
-    $as_echo "$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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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"
-    $as_echo "$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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-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;}
-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
-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 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=$?
-  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
-
-{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  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
-{ $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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-        CFLAGS="-g"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-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
-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
-{ $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
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    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 test "${ac_cv_prog_cc_c89+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-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 :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  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 :
-
-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
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-
-
-# Checks for pkg-config packages
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLOGO" >&5
-$as_echo_n "checking for XLOGO... " >&6; }
-
-if test -n "$XLOGO_CFLAGS"; then
-    pkg_cv_XLOGO_CFLAGS="$XLOGO_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xt\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7 xt") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XLOGO_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XLOGO_LIBS"; then
-    pkg_cv_XLOGO_LIBS="$XLOGO_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xt\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7 xt") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XLOGO_LIBS=`$PKG_CONFIG --libs "xaw7 xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
 
 
 
-if test $pkg_failed = yes; then
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               XLOGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xt" 2>&1`
-        else
-               XLOGO_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xt" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XLOGO_PKG_ERRORS" >&5
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
 
-       as_fn_error "Package requirements (xaw7 xt) were not met:
 
-$XLOGO_PKG_ERRORS
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XLOGO_CFLAGS
-and XLOGO_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables XLOGO_CFLAGS
-and XLOGO_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
-else
-       XLOGO_CFLAGS=$pkg_cv_XLOGO_CFLAGS
-       XLOGO_LIBS=$pkg_cv_XLOGO_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
 fi
-
-# Use render & xft2 to draw logo?
-
-
-# Check whether --with-render was given.
-if test "${with_render+set}" = set; then :
-  withval=$with_render; USE_RENDER="$withval"
-else
-  USE_RENDER="try"
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
 fi
 
-
-if test "x$USE_RENDER" = "xtry" ; then
-       if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xrender xft\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xrender xft") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  USE_RENDER="yes"
-else
-  USE_RENDER="no"
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
 fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
 fi
 
-if test "x$USE_RENDER" = "xyes" ; then
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRENDER" >&5
-$as_echo_n "checking for XRENDER... " >&6; }
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
 
-if test -n "$XRENDER_CFLAGS"; then
-    pkg_cv_XRENDER_CFLAGS="$XRENDER_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xrender\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xrender") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XRENDER_CFLAGS=`$PKG_CONFIG --cflags "xrender" 2>/dev/null`
-else
-  pkg_failed=yes
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
 fi
- else
-    pkg_failed=untried
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
 fi
-if test -n "$XRENDER_LIBS"; then
-    pkg_cv_XRENDER_LIBS="$XRENDER_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xrender\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xrender") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XRENDER_LIBS=`$PKG_CONFIG --libs "xrender" 2>/dev/null`
-else
-  pkg_failed=yes
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
 fi
- else
-    pkg_failed=untried
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
 fi
 
 
 
-if test $pkg_failed = yes; then
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               XRENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xrender" 2>&1`
-        else
-               XRENDER_PKG_ERRORS=`$PKG_CONFIG --print-errors "xrender" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XRENDER_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xrender) were not met:
 
-$XRENDER_PKG_ERRORS
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XRENDER_CFLAGS
-and XRENDER_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables XRENDER_CFLAGS
-and XRENDER_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
-else
-       XRENDER_CFLAGS=$pkg_cv_XRENDER_CFLAGS
-       XRENDER_LIBS=$pkg_cv_XRENDER_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
-fi
 
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFT" >&5
-$as_echo_n "checking for XFT... " >&6; }
 
-if test -n "$XFT_CFLAGS"; then
-    pkg_cv_XFT_CFLAGS="$XFT_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xft\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xft") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$XFT_LIBS"; then
-    pkg_cv_XFT_LIBS="$XFT_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xft\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xft") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_XFT_LIBS=`$PKG_CONFIG --libs "xft" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
 
 
 
-if test $pkg_failed = yes; then
+XORG_MAN_PAGE="X Version 11"
 
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
 fi
-        if test $_pkg_short_errors_supported = yes; then
-               XFT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xft" 2>&1`
-        else
-               XFT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xft" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XFT_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xft) were not met:
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
 
-$XFT_PKG_ERRORS
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XFT_CFLAGS
-and XFT_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" "$LINENO" 5
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
 
-Alternatively, you may set the environment variables XFT_CFLAGS
-and XFT_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+ac_config_headers="$ac_config_headers config.h"
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+
+# Base set of required pkg-config packages
+XLOGO_DEPS="sm xaw7 xmu xt xext x11"
+
+# Use render & xft2 to draw logo?
+
+
+# Check whether --with-render was given.
+if test "${with_render+set}" = set; then :
+  withval=$with_render; USE_RENDER="$withval"
 else
-       XFT_CFLAGS=$pkg_cv_XFT_CFLAGS
-       XFT_LIBS=$pkg_cv_XFT_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
+  USE_RENDER="try"
 fi
 
 
-$as_echo "#define XRENDER 1" >>confdefs.h
+if test "x$USE_RENDER" = "xtry" ; then
+       if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xrender xft\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xrender xft") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  USE_RENDER="yes"
+else
+  USE_RENDER="no"
+fi
+fi
 
+if test "x$USE_RENDER" = "xyes" ; then
+       XLOGO_DEPS="xft xrender $XLOGO_DEPS"
+
+
+$as_echo "#define XRENDER 1" >>confdefs.h
 
-       XLOGO_CFLAGS="$XLOGO_CFLAGS $XRENDER_CFLAGS $XFT_CFLAGS"
-       XLOGO_LIBS="$XLOGO_LIBS $XRENDER_LIBS $XFT_LIBS"
 fi
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5
-$as_echo_n "checking for XEXT... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLOGO" >&5
+$as_echo_n "checking for XLOGO... " >&6; }
 
-if test -n "$XEXT_CFLAGS"; then
-    pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS"
+if test -n "$XLOGO_CFLAGS"; then
+    pkg_cv_XLOGO_CFLAGS="$XLOGO_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xext") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XLOGO_DEPS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XLOGO_DEPS") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xext" 2>/dev/null`
+  pkg_cv_XLOGO_CFLAGS=`$PKG_CONFIG --cflags "$XLOGO_DEPS" 2>/dev/null`
 else
   pkg_failed=yes
 fi
  else
     pkg_failed=untried
 fi
-if test -n "$XEXT_LIBS"; then
-    pkg_cv_XEXT_LIBS="$XEXT_LIBS"
+if test -n "$XLOGO_LIBS"; then
+    pkg_cv_XLOGO_LIBS="$XLOGO_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xext") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XLOGO_DEPS\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$XLOGO_DEPS") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xext" 2>/dev/null`
+  pkg_cv_XLOGO_LIBS=`$PKG_CONFIG --libs "$XLOGO_DEPS" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -5530,50 +4678,44 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xext" 2>&1`
+               XLOGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XLOGO_DEPS" 2>&1`
         else
-               XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xext" 2>&1`
+               XLOGO_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XLOGO_DEPS" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$XEXT_PKG_ERRORS" >&5
+       echo "$XLOGO_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xext) were not met:
+       as_fn_error $? "Package requirements ($XLOGO_DEPS) were not met:
 
-$XEXT_PKG_ERRORS
+$XLOGO_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XEXT_CFLAGS
-and XEXT_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XLOGO_CFLAGS
+and XLOGO_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 " "$LINENO" 5
 elif test $pkg_failed = untried; then
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XEXT_CFLAGS
-and XEXT_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XLOGO_CFLAGS
+and XLOGO_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
-       XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS
-       XEXT_LIBS=$pkg_cv_XEXT_LIBS
+       XLOGO_CFLAGS=$pkg_cv_XLOGO_CFLAGS
+       XLOGO_LIBS=$pkg_cv_XLOGO_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
        :
 fi
-XLOGO_CFLAGS="$XLOGO_CFLAGS $XEXT_CFLAGS"
-XLOGO_LIBS="$XLOGO_LIBS $XEXT_LIBS"
-
-XLOGO_CFLAGS="$CWARNFLAGS $XLOGO_CFLAGS"
-
-
 
 
 pkg_failed=no
@@ -5630,7 +4772,7 @@ fi
        # Put the nasty error message in config.log where it belongs
        echo "$APPDEFS_PKG_ERRORS" >&5
 
-       as_fn_error "Package requirements (xt) were not met:
+       as_fn_error $? "Package requirements (xt) were not met:
 
 $APPDEFS_PKG_ERRORS
 
@@ -5644,7 +4786,7 @@ See the pkg-config man page for more details.
 elif test $pkg_failed = untried; then
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -5653,7 +4795,7 @@ and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
        APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
        APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
@@ -5661,7 +4803,7 @@ else
 $as_echo "yes" >&6; }
        :
 fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
 # Check whether --with-appdefaultdir was given.
 if test "${with_appdefaultdir+set}" = set; then :
@@ -5738,10 +4880,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :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" &&
+    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;}
-    cat confcache >$cache_file
+      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
     { $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;}
@@ -5757,6 +4910,7 @@ 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$//'
@@ -5780,23 +4934,19 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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"
@@ -5897,6 +5047,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5942,19 +5093,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  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: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -6150,7 +5301,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -6203,8 +5354,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xlogo $as_me 1.0.2, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+This file was extended by xlogo $as_me 1.0.3, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6269,11 +5420,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xlogo config.status 1.0.2
-configured by $0, generated by GNU Autoconf 2.65,
+xlogo config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 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."
 
@@ -6291,11 +5442,16 @@ 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
@@ -6317,6 +5473,7 @@ do
     $ac_shift
     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;;
@@ -6329,7 +5486,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -6338,7 +5495,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -6396,7 +5553,7 @@ do
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -6419,9 +5576,10 @@ 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 'as_fn_exit 1' 1 2 13 15
 }
@@ -6429,12 +5587,13 @@ $debug ||
 
 {
   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")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6451,12 +5610,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -6465,18 +5624,18 @@ _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 '$'`
+  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
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   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
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -6484,7 +5643,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -6532,7 +5691,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -6564,21 +5723,29 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+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
@@ -6590,7 +5757,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -6602,11 +5769,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  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
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -6691,7 +5858,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -6704,7 +5871,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -6723,7 +5890,7 @@ do
     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 `:'.
@@ -6732,7 +5899,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -6758,8 +5925,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -6895,23 +6062,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+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"; } &&
+  { 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
+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;}
+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";;
+  -) 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
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -6920,21 +6088,21 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      && 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" \
-       || as_fn_error "could not create $ac_file" "$LINENO" 5
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -7084,7 +6252,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -7105,7 +6273,7 @@ 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 || as_fn_exit $?
+  $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
index b213a50..a3357ef 100644 (file)
@@ -20,25 +20,23 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xlogo, [1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xlogo)
+AC_PREREQ([2.60])
+AC_INIT([xlogo], [1.0.3],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xlogo])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 
 
 AM_CONFIG_HEADER(config.h)
 
-AC_PROG_CC
-AC_PROG_INSTALL
-
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XLOGO, xaw7 xt)
+# Base set of required pkg-config packages
+XLOGO_DEPS="sm xaw7 xmu xt xext x11"
 
 # Use render & xft2 to draw logo?
 
@@ -51,25 +49,15 @@ if test "x$USE_RENDER" = "xtry" ; then
 fi
 
 if test "x$USE_RENDER" = "xyes" ; then
-       PKG_CHECK_MODULES(XRENDER, xrender)
-       PKG_CHECK_MODULES(XFT, xft)
+       XLOGO_DEPS="xft xrender $XLOGO_DEPS"
 
        AC_DEFINE(XRENDER, 1, [Define to 1 to use Xrender & Xft2 to draw logo])
-
-       XLOGO_CFLAGS="$XLOGO_CFLAGS $XRENDER_CFLAGS $XFT_CFLAGS"
-       XLOGO_LIBS="$XLOGO_LIBS $XRENDER_LIBS $XFT_LIBS"
 fi
 
-PKG_CHECK_MODULES(XEXT, xext)
-XLOGO_CFLAGS="$XLOGO_CFLAGS $XEXT_CFLAGS"
-XLOGO_LIBS="$XLOGO_LIBS $XEXT_LIBS"
-
-XLOGO_CFLAGS="$CWARNFLAGS $XLOGO_CFLAGS"
-AC_SUBST(XLOGO_CFLAGS)
-AC_SUBST(XLOGO_LIBS)
+PKG_CHECK_MODULES(XLOGO, $XLOGO_DEPS)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
diff --git a/xmag/AUTHORS b/xmag/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
index 7f33cbf..d9172c5 100644 (file)
@@ -1,12 +1,48 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright 1989, 1990, 1991, 1993, 1994, 1998  The Open Group
 
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
 
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
 
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
 
-http://lists.freedesktop.org/mailman/listinfo/xorg
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+
+Copyright (C) 1999 The XFree86 Project, Inc.  All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the XFree86 Project shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from the
+XFree86 Project.
index aeb1411..dd90a25 100644 (file)
@@ -1,3 +1,155 @@
+commit 63cee7f38dc37fda89dc5aa689634bd8aeffabda
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Oct 30 17:22:41 2010 -0700
+
+    xmag 1.0.4
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d41f3ae0b0e383ba2e622e3dd9999d3c09f90091
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Oct 30 17:20:18 2010 -0700
+
+    config: Remove unnecessary calls from configure.ac
+    
+    AC_PROG_CC & AC_PROG_INSTALL are provided by XORG_DEFAULT_OPTIONS now
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9475bf19a6544f522357f59bd1b04ec7685e3eb8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Oct 30 17:19:07 2010 -0700
+
+    Purge CVS version tags
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cc7172d187ad35a1b851961cc9c588e56c3894fa
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Oct 30 17:17:49 2010 -0700
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 36ac8aaf057d0ae35d63e568667f1aebcfa2e56e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Aug 6 15:04:26 2010 -0700
+
+    Fill in COPYING file with copyright notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e9a1886d9e2a89995c2094b37000e12da4791cbf
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Jul 1 18:29:03 2010 -0700
+
+    Xmu functions are called directly, so include it in PKG_CHECK_MODULES
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b7544beaad218b5799018fe1dca84815a14bbfa4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jun 30 23:25:03 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+    Enables silent rule and use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit f7ef4087a4bf87618e9b84ff7726f3f08fd018ca
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Feb 11 10:08:07 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b20bf366aa045549221c6b0fb3aa7b7fda43b3a5
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 3e597fcfe489f9eb9057b0b8a7fe3f75925b23d2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:54 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit a060a628982782ca24e2a4cfa5654b068b935e61
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit c1642cd3036e03c8f42c833d2f321b51a62083df
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 91ce3b21ef889d857bfb898bbd85f774721bb26b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:39 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 6802cc3ec6357529605ec994c9d531f3ca9e3561
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit de39a50709190e16a6f357e0be673db04d26b4a6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:26 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
 commit f1f2af7a65d6531814a06b292a28bdc46580e590
 Author: Alan Coopersmith <alan.coopersmith@sun.com>
 Date:   Mon Aug 3 11:19:07 2009 -0700
index 30cd7dd..afdebf1 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: CutPaste.c,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1989, 1998  The Open Group
@@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
 from The Open Group.
 
 */
-/* $XFree86: xc/programs/xmag/CutPaste.c,v 1.5 2001/01/17 23:46:19 dawes Exp $ */
 /*
  * Author:  Davor Matic, MIT X Consortium
  */
index d1a61bc..bd77af8 100644 (file)
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/xmag/CutPaste.h,v 1.1 1999/03/07 11:41:12 dawes Exp $ */
 /*
  * Copyright (C) 1999 The XFree86 Project, Inc.  All Rights Reserved.
  *
index e69de29..8b82ade 100644 (file)
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
index 39de39e..b52bebc 100644 (file)
@@ -21,7 +21,7 @@
 
 bin_PROGRAMS = xmag
 
-AM_CFLAGS = $(XMAG_CFLAGS)
+AM_CFLAGS = $(XMAG_CFLAGS) $(CWARNFLAGS)
 xmag_LDADD = $(XMAG_LIBS) -lm
 
 xmag_SOURCES = \
@@ -57,38 +57,22 @@ appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
 EXTRA_DIST += $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-  XORGMANNAME = X Version 11
-
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
 
-EXTRA_DIST += ChangeLog
-MAINTAINERCLEANFILES = ChangeLog
+.PHONY: ChangeLog INSTALL
 
-.PHONY: ChangeLog
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
index 8fa0953..7127034 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -38,8 +39,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -58,9 +60,9 @@ bin_PROGRAMS = xmag$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS config.guess config.sub depcomp \
-       install-sh missing
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -70,9 +72,9 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
        "$(DESTDIR)$(appdefaultdir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_xmag_OBJECTS = CutPaste.$(OBJEXT) RootWin.$(OBJEXT) Scale.$(OBJEXT) \
        xmag.$(OBJEXT)
@@ -82,10 +84,23 @@ xmag_DEPENDENCIES = $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(xmag_SOURCES)
 DIST_SOURCES = $(xmag_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -93,9 +108,22 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appmanDATA_INSTALL = $(INSTALL_DATA)
-dist_appdefaultDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 DATA = $(appman_DATA) $(dist_appdefault_DATA)
 ETAGS = etags
 CTAGS = ctags
@@ -103,18 +131,18 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
 AMTAR = @AMTAR@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APP_MAN_DIR = @APP_MAN_DIR@
 APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
 AUTOCONF = @AUTOCONF@
@@ -142,6 +170,7 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 GREP = @GREP@
 INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -154,6 +183,7 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -163,15 +193,18 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
 XMAG_CFLAGS = @XMAG_CFLAGS@
 XMAG_LIBS = @XMAG_LIBS@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -192,7 +225,6 @@ build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
@@ -221,9 +253,10 @@ sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = $(XMAG_CFLAGS)
+AM_CFLAGS = $(XMAG_CFLAGS) $(CWARNFLAGS)
 xmag_LDADD = $(XMAG_LIBS) -lm
 xmag_SOURCES = \
         CutPaste.c \
@@ -247,30 +280,12 @@ dist_appdefault_DATA = \
 
 
 # Developer documentation for Scale widget in Scale.c
-EXTRA_DIST = Scale.txt xmag.icon $(appman_PRE) ChangeLog
+EXTRA_DIST = Scale.txt xmag.icon $(appman_PRE)
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
-MAINTAINERCLEANFILES = ChangeLog
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -282,15 +297,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -306,9 +321,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
        @if test ! -f $@; then \
@@ -320,7 +336,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -329,29 +345,43 @@ distclean-hdr:
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
        test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 xmag$(EXEEXT): $(xmag_OBJECTS) $(xmag_DEPENDENCIES) 
        @rm -f xmag$(EXEEXT)
-       $(LINK) $(xmag_OBJECTS) $(xmag_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(xmag_OBJECTS) $(xmag_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -365,104 +395,116 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmag.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
 install-appmanDATA: $(appman_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \
        done
 
 uninstall-appmanDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
-       done
+       @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appmandir)" && rm -f $$files
 install-dist_appdefaultDATA: $(dist_appdefault_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(dist_appdefault_DATA)'; for p in $$list; do \
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(dist_appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         $(dist_appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
        done
 
 uninstall-dist_appdefaultDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_appdefault_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
+       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
        list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       test -d $(distdir) || mkdir $(distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -478,24 +520,30 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
        $(MAKE) $(AM_MAKEFLAGS) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
@@ -503,6 +551,14 @@ dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
+dist-lzma: distdir
+       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+       $(am__remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -527,13 +583,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lzma*) \
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -541,9 +601,11 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
@@ -565,13 +627,15 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -616,6 +680,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -638,6 +703,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -646,18 +713,28 @@ install-data-am: install-appmanDATA install-dist_appdefaultDATA
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -682,35 +759,41 @@ ps-am:
 uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
-.MAKE: install-am install-strip
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
        clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appmanDATA install-binPROGRAMS install-data \
-       install-data-am install-dist_appdefaultDATA install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-dist_appdefaultDATA
+       dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-appmanDATA \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_appdefaultDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-dist_appdefaultDATA
 
 
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
 
-.PHONY: ChangeLog
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/xmag/NEWS b/xmag/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
index e69de29..7475d13 100644 (file)
@@ -0,0 +1,25 @@
+xmag displays a magnified snapshot of a portion of an X11 screen.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/app/xmag
+
+        http://cgit.freedesktop.org/xorg/app/xmag
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
index 2cd5f38..31bdf6e 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: RootWin.c,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1990, 1998  The Open Group
@@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
 from The Open Group.
 
 */
-/* $XFree86: xc/programs/xmag/RootWin.c,v 1.4 2001/01/17 23:46:20 dawes Exp $ */
 
 
 #include <X11/IntrinsicP.h>
index ae61794..fd33037 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: RootWin.h,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1990, 1998  The Open Group
index 363cdd9..e1b3e37 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: RootWinP.h,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1990, 1998  The Open Group
index 203d2fd..043bca4 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: Scale.c,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1989, 1998  The Open Group
@@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
 from The Open Group.
 
 */
-/* $XFree86: xc/programs/xmag/Scale.c,v 3.8 2001/07/25 15:05:26 dawes Exp $ */
 
 /*
  * Author:  Davor Matic, MIT X Consortium
index 2542886..68a2b68 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: Scale.h,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1993, 1998  The Open Group
@@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
 from The Open Group.
 
 */
-/* $XFree86: xc/programs/xmag/Scale.h,v 1.4 2001/01/17 23:46:20 dawes Exp $ */
 
 #ifndef _XawScale_h
 #define _XawScale_h
index 181ae46..6449512 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: ScaleP.h,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1989, 1998  The Open Group
index c852fa3..face861 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
-You have another version of autoconf.  If you want to use that,
-you should regenerate the build system entirely.], [63])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.2.1
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
-]) # XORG_MACROS_VERSION
-
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       # under Cygwin unix is still defined even with -undef
-       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS="-undef -ansi"
-               AC_MSG_RESULT([yes, with -ansi])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
-
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
-#
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
-else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
-
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
-
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([Whether to build pdf documentation])
-
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
-
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
-
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
-
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
-
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
-
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
-#
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
-
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
-
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
-#
-AC_DEFUN([XORG_WITH_LINT],[
-
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
-
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
-
-]) # XORG_WITH_LINT
-
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
-#
-
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
-
-]) # XORG_LINT_LIBRARY
-
-# XORG_CWARNFLAGS
-# ---------------
-# Minimum version: 1.2.0
-#
-# Defines CWARNFLAGS to enable C compiler warnings.
-#
-AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
-    case `gcc -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-]) # XORG_CWARNFLAGS
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
-
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
-])
-
-# XORG_CHANGELOG()
-# ----------------
-# Minimum version: 1.2.0
-#
-# Defines the variable CHANGELOG_CMD as the command to generate
-# ChangeLog from git.
-#
-# Arrange that distcleancheck ignores ChangeLog left over by distclean.
-#
-AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-AC_SUBST([CHANGELOG_CMD])
-AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
-]) # XORG_CHANGELOG
-
-# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -567,10 +31,10 @@ AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
+[am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10], [],
+m4_if([$1], [1.11.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -584,10 +48,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10])dnl
-_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -644,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -664,6 +130,7 @@ AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -677,14 +144,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -741,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -758,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -768,19 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -837,57 +328,68 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -919,13 +421,13 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -942,7 +444,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -993,8 +495,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -1002,24 +504,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -1030,18 +545,19 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1052,7 +568,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -1079,27 +602,38 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
+  AC_SUBST([MAINT])dnl
 ]
 )
 
@@ -1107,13 +641,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -1122,7 +656,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -1132,24 +666,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -1159,14 +693,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -1183,7 +717,14 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -1221,13 +762,13 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -1244,7 +785,7 @@ AC_DEFUN([_AM_SET_OPTION],
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -1254,14 +795,14 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -1270,16 +811,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -1304,6 +858,33 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -1332,18 +913,25 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
-# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
@@ -1442,32 +1030,26 @@ AC_SUBST([am__untar])
 
 dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
 dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
 dnl 
 dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
 dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
 dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
 # XORG_MACROS_VERSION(required-version)
 # -------------------------------------
@@ -1485,7 +1067,7 @@ dnl of the copyright holder.
 # See the "minimum version" comment for each macro you use to see what 
 # version you require.
 m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.2.2])
+m4_define([vers_have], [1.11.0])
 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1553,9 +1135,12 @@ AC_SUBST(RAWCPPFLAGS)
 # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 # Not sure if there's any better way than just hardcoding by OS name.
 # Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
 
 AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
 
 if test x$APP_MAN_SUFFIX = x    ; then
     APP_MAN_SUFFIX=1
@@ -1624,8 +1209,60 @@ AC_SUBST([FILE_MAN_DIR])
 AC_SUBST([MISC_MAN_DIR])
 AC_SUBST([DRIVER_MAN_DIR])
 AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
 ]) # XORG_MANPAGE_SECTIONS
 
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+    [m4_ifval([$1],[:],
+        [if test x"$cross_compiling" != x"yes" ; then
+            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+                          [XORG_SGML_PATH=$prefix/share/sgml])
+         fi])
+    ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+   AC_MSG_RESULT([$XORG_SGML_PATH])
+   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+   AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
 # XORG_CHECK_LINUXDOC
 # -------------------
 # Minimum version: 1.0.0
@@ -1635,23 +1272,14 @@ AC_SUBST([ADMIN_MAN_DIR])
 # Whether or not the necessary tools and files are found can be checked
 # with the AM_CONDITIONAL "BUILD_LINUXDOC"
 AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
-else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
 
 AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
 
-AC_MSG_CHECKING([Whether to build documentation])
+AC_MSG_CHECKING([whether to build documentation])
 
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
    BUILDDOC=yes
 else
    BUILDDOC=no
@@ -1661,9 +1289,9 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
 AC_MSG_RESULT([$BUILDDOC])
 
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AC_MSG_CHECKING([whether to build pdf documentation])
 
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
    BUILDPDFDOC=yes
 else
    BUILDPDFDOC=no
@@ -1673,7 +1301,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
 MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 MAKE_PDF="$PS2PDF"
 MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
@@ -1693,48 +1321,44 @@ AC_SUBST(MAKE_HTML)
 # indicates whether the necessary tools and files are found and, if set,
 # $(MAKE_XXX) blah.sgml will produce blah.xxx.
 AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
 BUILDTXTDOC=no
 BUILDPDFDOC=no
 BUILDPSDOC=no
 BUILDHTMLDOC=no
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
 AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
    test x$BUILD_TXTDOC != xno; then
        BUILDTXTDOC=yes
 fi
 AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 AC_MSG_RESULT([$BUILDTXTDOC])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
    test x$BUILD_PDFDOC != xno; then
        BUILDPDFDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 AC_MSG_RESULT([$BUILDPDFDOC])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
    test x$BUILD_PSDOC != xno; then
        BUILDPSDOC=yes
 fi
 AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 AC_MSG_RESULT([$BUILDPSDOC])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
    test x$BUILD_HTMLDOC != xno; then
        BUILDHTMLDOC=yes
 fi
@@ -1752,6 +1376,548 @@ AC_SUBST(MAKE_PDF)
 AC_SUBST(MAKE_HTML)
 ]) # XORG_CHECK_DOCBOOK
 
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+#                  xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+          [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+    # scrape the xmlto version
+    AC_MSG_CHECKING([the xmlto version])
+    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+    AC_MSG_RESULT([$xmlto_version])
+    AS_VERSION_COMPARE([$xmlto_version], [$1],
+        [if test "x$use_xmlto" = xauto; then
+            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+            have_xmlto=no
+        else
+            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+        fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+             [have_xmlto_text=yes],
+             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+          [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+    # scrape the asciidoc version
+    AC_MSG_CHECKING([the asciidoc version])
+    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+    AC_MSG_RESULT([$asciidoc_version])
+    AS_VERSION_COMPARE([$asciidoc_version], [$1],
+        [if test "x$use_asciidoc" = xauto; then
+            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+            have_asciidoc=no
+        else
+            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
+# --------------------------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+          [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+    # scrape the doxygen version
+    AC_MSG_CHECKING([the doxygen version])
+    doxygen_version=`$DOXYGEN --version 2>/dev/null`
+    AC_MSG_RESULT([$doxygen_version])
+    AS_VERSION_COMPARE([$doxygen_version], [$1],
+        [if test "x$use_doxygen" = xauto; then
+            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+            have_doxygen=no
+        else
+            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+        fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
+#
+# Interface to module:
+# HAVE_GROFF:   used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF:        returns the path of the groff program found
+#               returns the path set by the user in the environment
+# --with-groff:         'yes' user instructs the module to use groff
+#               'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+#                 pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+#                 psselect from the psutils package.
+#                 the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(groff,
+       AS_HELP_STRING([--with-groff],
+          [Use groff to regenerate documentation (default: ]_defopt[)]),
+          [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_groff" = x"auto"; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_WARN([groff not found - documentation targets will be skipped])
+       have_groff=no
+   else
+        have_groff=yes
+   fi
+elif test "x$use_groff" = x"yes" ; then
+   AC_PATH_PROG([GROFF], [groff])
+   if test "x$GROFF" = "x"; then
+        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+   fi
+   have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+   if test "x$GROFF" != "x"; then
+      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+   fi
+   have_groff=no
+else
+   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+    AC_MSG_CHECKING([for ${GROFF} -ms macros])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+    fi
+    AC_MSG_RESULT([$groff_ms_works])
+    AC_MSG_CHECKING([for ${GROFF} -mm macros])
+    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+        groff_mm_works=yes
+    else
+        groff_mm_works=no
+    fi
+    AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+   AC_PATH_PROG(PSSELECT_PATH, [psselect])
+   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+      have_groff_html=yes
+   else
+      have_groff_html=no
+      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+   fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
+#
+# Interface to module:
+# HAVE_FOP:    used in makefiles to conditionally generate documentation
+# FOP:         returns the path of the fop program found
+#              returns the path set by the user in the environment
+# --with-fop:  'yes' user instructs the module to use fop
+#              'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(fop,
+       AS_HELP_STRING([--with-fop],
+          [Use fop to regenerate documentation (default: ]_defopt[)]),
+          [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_fop" = x"auto"; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_WARN([fop not found - documentation targets will be skipped])
+       have_fop=no
+   else
+        have_fop=yes
+   fi
+elif test "x$use_fop" = x"yes" ; then
+   AC_PATH_PROG([FOP], [fop])
+   if test "x$FOP" = "x"; then
+        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+   fi
+   have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+   if test "x$FOP" != "x"; then
+      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+   fi
+   have_fop=no
+else
+   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PS2PDF:         used in makefiles to conditionally generate documentation
+# PS2PDF:      returns the path of the ps2pdf program found
+#              returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+#               'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(ps2pdf,
+       AS_HELP_STRING([--with-ps2pdf],
+          [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+          [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_ps2pdf" = x"auto"; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+       have_ps2pdf=no
+   else
+        have_ps2pdf=yes
+   fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+   AC_PATH_PROG([PS2PDF], [ps2pdf])
+   if test "x$PS2PDF" = "x"; then
+        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+   fi
+   have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+   if test "x$PS2PDF" != "x"; then
+      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+   fi
+   have_ps2pdf=no
+else
+   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS:           used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+#               'no' user instructs the module not to generate docs
+# parm1:       specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+m4_define([default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(docs,
+       AS_HELP_STRING([--enable-docs],
+          [Enable building the documentation (default: ]default[)]),
+          [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS:   used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+#                      'no' user instructs the module not to generate developer docs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+m4_define([devel_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(devel-docs,
+       AS_HELP_STRING([--enable-devel-docs],
+          [Enable building the developer documentation (default: ]devel_default[)]),
+          [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO         --with-xmlto
+# XORG_WITH_ASCIIDOC      --with-asciidoc
+# XORG_WITH_DOXYGEN       --with-doxygen
+# XORG_WITH_FOP           --with-fop
+# XORG_WITH_GROFF         --with-groff
+# XORG_WITH_PS2PDF        --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS:                used in makefiles to conditionally generate specs
+# --enable-specs:      'yes' user instructs the module to generate specs
+#                      'no' user instructs the module not to generate specs
+# parm1:               specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+m4_define([spec_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(specs,
+       AS_HELP_STRING([--enable-specs],
+          [Enable building the specs (default: ]spec_default[)]),
+          [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
 # XORG_CHECK_MALLOC_ZERO
 # ----------------------
 # Minimum version: 1.0.0
@@ -1761,7 +1927,7 @@ AC_SUBST(MAKE_HTML)
 # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
 AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
 AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
+       AS_HELP_STRING([--enable-malloc0returnsnull],
                       [malloc(0) returns NULL (default: auto)]),
        [MALLOC_ZERO_RETURNS_NULL=$enableval],
        [MALLOC_ZERO_RETURNS_NULL=auto])
@@ -1781,7 +1947,8 @@ main() {
     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 }],
                [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1804,38 +1971,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 # ----------------
 # Minimum version: 1.1.0
 #
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT:                returns the path to the tool found on the platform
+#              or the value set to LINT on the configure cmd line
+#              also an Automake conditional
+# LINT_FLAGS:  an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+#              'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
 #
 AC_DEFUN([XORG_WITH_LINT],[
 
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
                [Use a lint-style source code checker (default: disabled)])],
                [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+       lint_name=splint
+       lint_options="-badflag"
+       ;;
+  *freebsd* | *netbsd*)
+       lint_name=lint
+       lint_options="-u -b"
+       ;;
+  *solaris*)
+       lint_name=lint
+       lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+       ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+   AC_PATH_PROG([LINT], [$lint_name])
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+   fi
+elif test "x$use_lint" = x"no" ; then
+   if test "x$LINT" != "x"; then
+      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+   fi
 else
-       LINT="$use_lint"
+   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
 fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+   lint_options=$LINT_FLAGS
 fi
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
 
 ]) # XORG_WITH_LINT
 
@@ -1845,28 +2043,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
 #
 # Sets up flags for building lint libraries for checking programs that call
 # functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
 #
+# Interface to module:
+# LINTLIB              - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB                - Automake conditional
+#
+# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
+#                        - 'no' user instructs the module not to create a lint library (default)
 
 AC_DEFUN([XORG_LINT_LIBRARY],[
 AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
        [Create lint library (default: disabled)])],
        [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+   LINTLIB=llib-l$1.ln
+   if test "x$LINT" = "x"; then
+        AC_MSG_ERROR([Cannot make lint library without --with-lint])
+   fi
+elif test "x$make_lint_lib" != x"no" ; then
+   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
 fi
+
 AC_SUBST(LINTLIB)
 AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
@@ -1879,11 +2078,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 # Defines CWARNFLAGS to enable C compiler warnings.
 #
 AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -1897,6 +2096,70 @@ else
 fi
 AC_SUBST(CWARNFLAGS)
 ]) # XORG_CWARNFLAGS
+
+# XORG_STRICT_OPTION
+# -----------------------
+# Minimum version: 1.3.0
+#
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
+
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
+
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
 dnl Copyright 2005 Red Hat, Inc
 dnl
 dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -1924,22 +2187,9 @@ dnl
 
 # XORG_RELEASE_VERSION
 # --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
  
 AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
                [Major version of this package])
@@ -1966,14 +2216,13 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
 # Defines the variable CHANGELOG_CMD as the command to generate
 # ChangeLog from git.
 #
-# Arrange that distcleancheck ignores ChangeLog left over by distclean.
 #
 AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
 echo 'git directory not found: installing possibly empty changelog.' >&2)"
 AC_SUBST([CHANGELOG_CMD])
-AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
 ]) # XORG_CHANGELOG
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
@@ -2009,7 +2258,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
 if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
+       _pkg_min_version=m4_default([$1], [0.9.0])
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
                AC_MSG_RESULT([yes])
@@ -2044,15 +2293,29 @@ fi])
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-else
-       pkg_failed=untried
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
 fi[]dnl
 ])# _PKG_CONFIG
 
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 # [ACTION-IF-NOT-FOUND])
 #
@@ -2074,31 +2337,41 @@ AC_MSG_CHECKING([for $1])
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
 if test $pkg_failed = yes; then
-       $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
        # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
        ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met.
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.])],
-               [$4])
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
 elif test $pkg_failed = untried; then
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
+_PKG_TEXT
 
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
                [$4])
 else
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
index 1bc4961..3c737f4 100644 (file)
@@ -1,5 +1,3 @@
-! $Xorg: Xmag.ad,v 1.3 2000/08/17 19:54:54 cpqbld Exp $
-! $XFree86$
 *Font: fixed
 *pane2*orientation: horizontal
 *pane2*showGrip: False
old mode 100755 (executable)
new mode 100644 (file)
index 396482d..2852378
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
-timestamp='2006-07-02'
+timestamp='2010-08-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2006-07-02'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -56,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -161,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
@@ -169,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -323,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -531,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[45])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -639,7 +660,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -780,7 +801,7 @@ EOF
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
-    i*:MINGW*:*)
+    *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
     i*:windows32*:*)
@@ -790,15 +811,24 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    x86:Interix*:[3456]*)
-       echo i586-pc-interix${UNAME_RELEASE}
-       exit ;;
-    EM64T:Interix*:[3456]*)
-       echo x86_64-unknown-interix${UNAME_RELEASE}
-       exit ;;
+    *:Interix*:*)
+       case ${UNAME_MACHINE} in
+           x86)
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -828,8 +858,29 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       eval $set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo ${UNAME_MACHINE}-unknown-linux-gnu
+       else
+           echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+       fi
        exit ;;
     avr32*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -843,6 +894,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -852,74 +914,33 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
        exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
@@ -929,8 +950,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -944,75 +968,18 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
        echo x86_64-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
+    xtensa*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1041,7 +1008,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1085,8 +1052,11 @@ EOF
     pc:*:*:*)
        # Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
@@ -1124,6 +1094,16 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1136,7 +1116,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1199,6 +1179,9 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1208,6 +1191,15 @@ EOF
     SX-6:SUPER-UX:*:*)
        echo sx6-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1217,6 +1209,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1298,6 +1300,9 @@ EOF
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
        exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1458,9 +1463,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index 319be99..7a181ab 100644 (file)
@@ -51,6 +51,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
 
old mode 100755 (executable)
new mode 100644 (file)
index fab0aa3..320e303
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
-timestamp='2006-09-20'
+timestamp='2010-09-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2006-09-20'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,10 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +154,13 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -245,17 +254,20 @@ case $basic_machine in
        | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
+       | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
@@ -268,28 +280,41 @@ case $basic_machine in
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+       | ubicom32 \
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -320,23 +345,26 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
@@ -351,27 +379,34 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
+       | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
+               ;;
+       # Recognize the basic CPU types without company name, with glob match.
+       xtensa*)
+               basic_machine=$basic_machine-unknown
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -435,6 +470,10 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -443,10 +482,35 @@ case $basic_machine in
                basic_machine=ns32k-sequent
                os=-dynix
                ;;
+       blackfin)
+               basic_machine=bfin-unknown
+               os=-linux
+               ;;
+       blackfin-*)
+               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
+       bluegene*)
+               basic_machine=powerpc-ibm
+               os=-cnk
+               ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
                ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -475,8 +539,8 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16c)
-               basic_machine=cr16c-unknown
+       cr16)
+               basic_machine=cr16-unknown
                os=-elf
                ;;
        crds | unos)
@@ -514,6 +578,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -668,6 +736,14 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       m68knommu)
+               basic_machine=m68k-unknown
+               os=-linux
+               ;;
+       m68knommu-*)
+               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        m88k-omron*)
                basic_machine=m88k-omron
                ;;
@@ -679,10 +755,17 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
                ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
@@ -779,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -809,6 +898,14 @@ case $basic_machine in
                basic_machine=i860-intel
                os=-osf
                ;;
+       parisc)
+               basic_machine=hppa-unknown
+               os=-linux
+               ;;
+       parisc-*)
+               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=-linux
+               ;;
        pbd)
                basic_machine=sparc-tti
                ;;
@@ -925,6 +1022,9 @@ case $basic_machine in
                basic_machine=sh-hitachi
                os=-hms
                ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
        sh64)
                basic_machine=sh64-unknown
                ;;
@@ -1002,17 +1102,14 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+       tile*)
+               basic_machine=tile-unknown
+               os=-linux-gnu
                ;;
        tx39)
                basic_machine=mipstx39-unknown
@@ -1089,6 +1186,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1127,7 +1228,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1177,6 +1278,9 @@ case $os in
         # First match some system type aliases
         # that might get confused with valid system types.
        # -solaris* is a basic system type, with this one exception.
+        -auroraux)
+               os=-auroraux
+               ;;
        -solaris1 | -solaris1.*)
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                ;;
@@ -1197,10 +1301,11 @@ case $os in
        # Each alternative MUST END IN A *, to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1209,9 +1314,10 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1219,7 +1325,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1349,6 +1455,11 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
+        -nacl*)
+               ;;
        -none)
                ;;
        *)
@@ -1389,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1414,6 +1534,9 @@ case $basic_machine in
        m68*-cisco)
                os=-aout
                ;;
+        mep-*)
+               os=-elf
+               ;;
        mips*-cisco)
                os=-elf
                ;;
@@ -1543,7 +1666,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index 61609b5..e8fd11d 100755 (executable)
@@ -1,62 +1,85 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for xmag 1.0.3.
+# Generated by GNU Autoconf 2.68 for xmag 1.0.4.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
+#
 # 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
 
 
@@ -65,20 +88,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
 
      ;;
@@ -89,354 +111,330 @@ 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
-
+      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
 
-
-:
-_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
-
+    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 and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
 fi
+fi
+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
 
-
-:
-(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
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
 }
+as_unset=as_fn_unset
 
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-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 ()
+{
 
-if as_func_ret_success; then
-  :
+  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
+# 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
-  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_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
-  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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
+  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/=
@@ -453,8 +451,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
@@ -464,49 +461,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
-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 ||
+  mkdir conf$$.dir 2>/dev/null
+fi
+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
@@ -514,7 +502,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 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
@@ -531,12 +519,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
   '
@@ -550,11 +538,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&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`
 
@@ -569,14 +557,14 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='xmag'
 PACKAGE_TARNAME='xmag'
-PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='xmag 1.0.3'
+PACKAGE_VERSION='1.0.4'
+PACKAGE_STRING='xmag 1.0.4'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -591,142 +579,157 @@ ac_includes_default="\
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#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
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-am__isrc
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-CPP
-GREP
-EGREP
-CWARNFLAGS
-PKG_CONFIG
-XMAG_CFLAGS
-XMAG_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
 appdefaultdir
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-APP_MAN_SUFFIX
-LIB_MAN_SUFFIX
-FILE_MAN_SUFFIX
-MISC_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-ADMIN_MAN_SUFFIX
-APP_MAN_DIR
-LIB_MAN_DIR
-FILE_MAN_DIR
-MISC_MAN_DIR
-DRIVER_MAN_DIR
+XMAG_LIBS
+XMAG_CFLAGS
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+MAN_SUBSTS
+XORG_MAN_PAGE
 ADMIN_MAN_DIR
+DRIVER_MAN_DIR
+MISC_MAN_DIR
+FILE_MAN_DIR
+LIB_MAN_DIR
+APP_MAN_DIR
+ADMIN_MAN_SUFFIX
+DRIVER_MAN_SUFFIX
+MISC_MAN_SUFFIX
+FILE_MAN_SUFFIX
+LIB_MAN_SUFFIX
+APP_MAN_SUFFIX
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+INSTALL_CMD
+PKG_CONFIG
 CHANGELOG_CMD
-distcleancheck_listfiles
-LIBOBJS
-LTLIBOBJS'
+CWARNFLAGS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+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_maintainer_mode
+enable_dependency_tracking
+enable_strict_compilation
+enable_silent_rules
+with_appdefaultdir
+'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -738,14 +741,14 @@ CPPFLAGS
 CPP
 PKG_CONFIG
 XMAG_CFLAGS
-XMAG_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS'
+XMAG_LIBS'
 
 
 # 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
@@ -801,8 +804,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.
@@ -844,13 +848,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 ;;
@@ -863,13 +874,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- \
@@ -1060,22 +1078,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.
@@ -1095,26 +1127,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
@@ -1122,23 +1154,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'
@@ -1152,8 +1197,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
@@ -1168,23 +1213,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
@@ -1211,13 +1254,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
@@ -1243,7 +1284,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xmag 1.0.3 to adapt to many kinds of systems.
+\`configure' configures xmag 1.0.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1257,7 +1298,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
@@ -1265,9 +1306,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
@@ -1277,25 +1318,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/xmag]
-  --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/xmag]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1313,17 +1354,23 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xmag 1.0.3:";;
+     short | recursive ) echo "Configuration of xmag 1.0.4:";;
    esac
   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]
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1331,8 +1378,6 @@ Optional Packages:
   --with-appdefaultdir=<pathname>
                           specify directory for app-defaults files (default is
                           autodetected)
-  --with-release-version=STRING
-                          Use release version string in package name
 
 Some influential environment variables:
   CC          C compiler command
@@ -1340,16 +1385,12 @@ Some influential environment variables:
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
   XMAG_CFLAGS C compiler flags for XMAG, overriding pkg-config
   XMAG_LIBS   linker flags for XMAG, overriding pkg-config
-  APPDEFS_CFLAGS
-              C compiler flags for APPDEFS, overriding pkg-config
-  APPDEFS_LIBS
-              linker flags for APPDEFS, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1362,15 +1403,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/ ;;
@@ -1395,42 +1438,352 @@ case $srcdir in
     ac_top_srcdir=$ac_top_build_prefix$srcdir
     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+xmag configure 1.0.4
+generated by GNU Autoconf 2.68
+
+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_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_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_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\""
+$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_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_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
 
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
+       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
 
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-xmag configure 1.0.3
-generated by GNU Autoconf 2.61
+} # ac_fn_c_try_link
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
+# 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 <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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
-  exit
+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 xmag $as_me 1.0.3, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+It was created by xmag $as_me 1.0.4, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1466,8 +1819,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
@@ -1501,12 +1854,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
@@ -1522,13 +1875,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
@@ -1540,11 +1893,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1553,12 +1904,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
@@ -1577,128 +1929,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
 )
     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"
 _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
 
@@ -1712,68 +2072,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; }; }
+  { $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'
@@ -1782,7 +2130,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.10'
+am__api_version='1.11'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -1801,9 +2149,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   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,
@@ -1828,22 +2174,23 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 # 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.
@@ -1861,123 +2208,255 @@ 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
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $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.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
+  done
 IFS=$as_save_IFS
 
-
 fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
 else
-  am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
 fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+{ $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; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   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=.
-  for ac_prog in mkdir gmkdir; do
+    for ac_prog in mkdir gmkdir; do
         for ac_exec_ext in '' $ac_executable_extensions; do
           { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
           case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
@@ -1989,11 +2468,12 @@ do
           esac
         done
        done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 
+  test -d ./--version && rmdir ./--version
   if test "${ac_cv_path_mkdir+set}" = set; then
     MKDIR_P="$ac_cv_path_mkdir -p"
   else
@@ -2001,12 +2481,11 @@ fi
     # value for MKDIR_P within a source directory, because that will
     # break other packages using the cache if that directory is
     # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
     MKDIR_P="$ac_install_sh -d"
   fi
 fi
-{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-echo "${ECHO_T}$MKDIR_P" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
 
 mkdir_p="$MKDIR_P"
 case $mkdir_p in
@@ -2018,10 +2497,10 @@ for ac_prog in gawk mawk nawk awk
 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_AWK+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_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -2031,43 +2510,44 @@ 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_AWK="$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
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&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
 
 
   test -n "$AWK" && break
 done
 
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2077,12 +2557,12 @@ esac
 rm -f conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = 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; }
   SET_MAKE=
 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; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -2101,9 +2581,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2119,7 +2597,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xmag'
- VERSION='1.0.3'
+ VERSION='1.0.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2147,112 +2625,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.
@@ -2265,17 +2637,18 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 
 
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
+if test "${enable_maintainer_mode+set}" = set; then :
   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
   USE_MAINTAINER_MODE=no
 fi
 
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
    if test $USE_MAINTAINER_MODE = yes; then
   MAINTAINER_MODE_TRUE=
   MAINTAINER_MODE_FALSE='#'
@@ -2288,7 +2661,7 @@ fi
 
 
 
-# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 
 
 
@@ -2300,8 +2673,66 @@ fi
 
 
 
+DEPDIR="${am__leading_dot}deps"
 
-ac_config_headers="$ac_config_headers config.h"
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
 ac_ext=c
@@ -2312,10 +2743,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.
@@ -2325,25 +2756,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
 
 
@@ -2352,10 +2783,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.
@@ -2365,25 +2796,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
@@ -2391,12 +2822,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
@@ -2409,10 +2836,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.
@@ -2422,25 +2849,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
 
 
@@ -2449,10 +2876,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.
@@ -2463,18 +2890,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
@@ -2493,11 +2920,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
 
 
@@ -2508,10 +2935,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.
@@ -2521,25 +2948,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
 
 
@@ -2552,10 +2979,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.
@@ -2565,25 +2992,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
 
 
@@ -2595,12 +3022,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
@@ -2610,51 +3033,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"
-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); }
-{ (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); }
+  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
@@ -2666,42 +3075,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,
@@ -2711,14 +3116,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
@@ -2737,78 +3142,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 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
-
-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
+
+{ { $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
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+{ $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
 
-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
@@ -2816,37 +3184,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 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; }; }
+  { { $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$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+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 <stdio.h>
+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
@@ -2858,51 +3279,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
@@ -2916,54 +3332,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
@@ -2974,34 +3370,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
@@ -3012,35 +3385,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
@@ -3051,42 +3401,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
@@ -3102,18 +3428,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 <stdarg.h>
 #include <stdio.h>
@@ -3170,31 +3492,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -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
@@ -3205,92 +3505,32 @@ 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'
 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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
 
 depcc="$CC"   am_compiler_list=
 
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -3315,6 +3555,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3332,7 +3577,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3342,19 +3597,23 @@ else
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -3378,8 +3637,8 @@ else
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
  if
@@ -3393,85 +3652,181 @@ else
 fi
 
 
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} 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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
 
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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);
+}
 
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
 
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+fi
 
 
 
@@ -3480,15 +3835,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"
@@ -3502,11 +3857,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -3515,76 +3866,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 <ac_nonexistent.h>
 _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
 
@@ -3596,8 +3905,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
@@ -3607,11 +3916,7 @@ do
   # <limits.h> 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 <limits.h>
@@ -3620,83 +3925,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 <ac_nonexistent.h>
 _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
@@ -3706,45 +3968,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 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"
@@ -3756,546 +4013,230 @@ 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"
-      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
-
-
-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
-
-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; }
- 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
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-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
-  ac_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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
-/* end confdefs.h.  */
-#include <string.h>
-
-_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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_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 >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#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
-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
-
-( exit $ac_status )
-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
-fi
-
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# 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;;
+      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
-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
+      $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
-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
 fi
-
-done
-
-
+{ $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"
 
 
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
+{ $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
-    { echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
-echo $ECHO_N "checking whether __SUNPRO_C is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl___SUNPRO_C+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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
 int
 main ()
 {
-#ifndef __SUNPRO_C
-  (void) __SUNPRO_C;
-#endif
 
   ;
   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_have_decl___SUNPRO_C=yes
+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_have_decl___SUNPRO_C=no
+  ac_cv_header_stdc=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
-echo "${ECHO_T}$ac_cv_have_decl___SUNPRO_C" >&6; }
-if test $ac_cv_have_decl___SUNPRO_C = yes; then
-  SUNCC="yes"
+
+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 <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
 else
-  SUNCC="no"
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
 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 <stdlib.h>
 
+_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
 
-
-for ac_func in nanosleep poll select
-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
+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.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 #else
-# include <assert.h>
-#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
+# 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 ()
 {
-return $ac_func ();
-  ;
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
   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"
+if ac_fn_c_try_run "$LINENO"; then :
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  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
 
-       eval "$as_ac_var=no"
 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
 
-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
+
+# 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 `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
+
 done
 
 
-# Checks for pkg-config packages
 
 
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
        if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+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_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
@@ -4307,14 +4248,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_PKG_CONFIG="$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
 
   ;;
@@ -4322,11 +4263,11 @@ esac
 fi
 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&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
 
 
@@ -4335,10 +4276,10 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
   ac_pt_PKG_CONFIG=$PKG_CONFIG
   # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; 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_ac_pt_PKG_CONFIG+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_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
   [\\/]* | ?:[\\/]*)
@@ -4350,14 +4291,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_ac_pt_PKG_CONFIG="$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
 
   ;;
@@ -4365,11 +4306,11 @@ esac
 fi
 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 if test -n "$ac_pt_PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&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_pt_PKG_CONFIG" = x; then
   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;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               PKG_CONFIG=""
-       fi
-
-fi
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for XMAG" >&5
-echo $ECHO_N "checking for XMAG... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XMAG_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XMAG_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-else
-       pkg_failed=untried
-fi
-
-if test $pkg_failed = yes; then
-       XMAG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$XMAG_PKG_ERRORS" 1>&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (xaw7) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&5
-echo "$as_me: error: Package requirements (xaw7) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the XMAG_CFLAGS and XMAG_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-       XMAG_CFLAGS=$pkg_cv_XMAG_CFLAGS
-       XMAG_LIBS=$pkg_cv_XMAG_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
-fi
-XMAG_CFLAGS="$CWARNFLAGS $XMAG_CFLAGS"
-
-
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for APPDEFS" >&5
-echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-else
-       pkg_failed=untried
-fi
-
-if test $pkg_failed = yes; then
-       APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" 1>&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&5
-echo "$as_me: error: Package requirements (xt) were not met.
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details." >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively you may set the APPDEFS_CFLAGS and APPDEFS_LIBS environment variables
-to avoid the need to call pkg-config.  See the pkg-config man page for
-more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+{ $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
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
 else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
 
-# Check whether --with-appdefaultdir was given.
-if test "${with_appdefaultdir+set}" = set; then
-  withval=$with_appdefaultdir; appdefaultdir="$withval"
-else
-  appdefaultdir="${xt_appdefaultdir}"
 fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
 
-
-
+fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4633,28 +4381,24 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4670,6 +4414,182 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_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
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_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_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast -Wformat=2"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+
+
+
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+  STRICT_COMPILE=no
+fi
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+  INTELCC="yes"
+else
+  INTELCC="no"
+fi
+
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
 
 
 
 
 
 
+XORG_MAN_PAGE="X Version 11"
 
+MAN_SUBSTS="\
+       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|\$(prefix)|g' \
+       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
 
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
 fi
 
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
-_ACEOF
 
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_MINOR $PVM
-_ACEOF
+ac_config_headers="$ac_config_headers config.h"
 
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION_PATCHLEVEL $PVP
+for ac_func in nanosleep poll select
+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
 _ACEOF
 
+fi
+done
 
 
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
+# Checks for pkg-config packages
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMAG" >&5
+$as_echo_n "checking for XMAG... " >&6; }
+
+if test -n "$XMAG_CFLAGS"; then
+    pkg_cv_XMAG_CFLAGS="$XMAG_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XMAG_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$XMAG_LIBS"; then
+    pkg_cv_XMAG_LIBS="$XMAG_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XMAG_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               XMAG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt x11" 2>&1`
+        else
+               XMAG_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt x11" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$XMAG_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (xaw7 xmu xt x11) were not met:
+
+$XMAG_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables XMAG_CFLAGS
+and XMAG_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables XMAG_CFLAGS
+and XMAG_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       XMAG_CFLAGS=$pkg_cv_XMAG_CFLAGS
+       XMAG_LIBS=$pkg_cv_XMAG_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
+else
+  appdefaultdir="${xt_appdefaultdir}"
+fi
 
-distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
 
 
 
@@ -4818,12 +4838,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
@@ -4831,8 +4852,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
   (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 quotesdouble-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
        "s/'/'\\\\''/g;
          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -4854,13 +4875,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      :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
@@ -4873,48 +4905,50 @@ 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
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${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.
@@ -4924,59 +4958,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
 
 
@@ -4985,20 +5039,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
 
      ;;
@@ -5009,32 +5062,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
+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
-done
+  $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
@@ -5048,13 +5180,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
@@ -5069,104 +5205,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
-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 ||
+  mkdir conf$$.dir 2>/dev/null
+fi
+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
@@ -5183,12 +5318,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
   '
@@ -5203,13 +5338,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 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 xmag $as_me 1.0.3, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+This file was extended by xmag $as_me 1.0.4, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -5222,7 +5363,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
 
 _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"
@@ -5230,22 +5380,25 @@ config_commands="$ac_config_commands"
 
 _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
@@ -5256,16 +5409,17 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
 
 _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="\\
-xmag config.status 1.0.3
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+xmag config.status 1.0.4
+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."
 
@@ -5273,20 +5427,26 @@ ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
 MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+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
@@ -5299,34 +5459,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
@@ -5341,27 +5508,29 @@ 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
 #
 # INIT-COMMANDS
 #
@@ -5369,19 +5538,17 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) { { 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
 
 # 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_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
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-am__isrc!$am__isrc$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$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
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-CWARNFLAGS!$CWARNFLAGS$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-XMAG_CFLAGS!$XMAG_CFLAGS$ac_delim
-XMAG_LIBS!$XMAG_LIBS$ac_delim
-APPDEFS_CFLAGS!$APPDEFS_CFLAGS$ac_delim
-APPDEFS_LIBS!$APPDEFS_LIBS$ac_delim
-appdefaultdir!$appdefaultdir$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
 
-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`
+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 2>/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
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-_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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
+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
-LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim
-FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim
-MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim
-DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim
-ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim
-APP_MAN_DIR!$APP_MAN_DIR$ac_delim
-LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim
-FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim
-MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim
-DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim
-ADMIN_MAN_DIR!$ADMIN_MAN_DIR$ac_delim
-CHANGELOG_CMD!$CHANGELOG_CMD$ac_delim
-distcleancheck_listfiles!$distcleancheck_listfiles$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` = 15; 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 || 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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$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 = "\a"
+
+}
+{
+  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
+}
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACAWK
 _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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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    :C $CONFIG_COMMANDS
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+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
@@ -5680,7 +5885,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
     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 `:'.
@@ -5689,26 +5894,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
           [\\/$]*) 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
@@ -5718,42 +5931,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
@@ -5771,20 +5949,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/ ;;
@@ -5829,12 +6002,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   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
 }
@@ -5842,36 +6015,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
@@ -5882,135 +6056,66 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.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;}
-
-  rm -f "$tmp/stdin"
+  { 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 "$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"
-# Compute $ac_file's index in $config_headers.
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $ac_file | $ac_file:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$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 |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -6030,30 +6135,40 @@ echo X$ac_file |
          s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
         X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -6071,68 +6186,33 @@ echo X"$mf" |
            q
          }
          s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
         X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  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"$file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -6150,27 +6230,25 @@ echo X"$as_dir" |
            q
          }
          s/.*/./; q'`
-      test -d "$as_dir" && break
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
     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; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
   done
-done
+}
  ;;
 
   esac
 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.
@@ -6190,6 +6268,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
 
index 41730b9..2fd67be 100644 (file)
@@ -21,40 +21,31 @@ dnl  PERFORMANCE OF THIS SOFTWARE.
 dnl
 dnl Process this file with autoconf to create configure.
 
-AC_PREREQ([2.57])
-AC_INIT(xmag, [1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xmag)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xmag], [1.0.4],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xmag])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.2)
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
 
 AM_CONFIG_HEADER(config.h)
 
-AC_PROG_CC
-AC_PROG_INSTALL
-
-XORG_CWARNFLAGS
-
 AC_CHECK_FUNCS([nanosleep poll select])
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XMAG, xaw7)
-XMAG_CFLAGS="$CWARNFLAGS $XMAG_CFLAGS"
-AC_SUBST(XMAG_CFLAGS)
-AC_SUBST(XMAG_LIBS)
+PKG_CHECK_MODULES(XMAG, xaw7 xmu xt x11)
 
-PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
        [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
 AC_SUBST(appdefaultdir)
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
 
 AC_OUTPUT([Makefile])
index ca5ea4e..df8eea7 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2006-10-15.18
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
 
 # 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
@@ -17,9 +17,7 @@ scriptversion=2006-10-15.18
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
    depmode=dashmstdout
 fi
 
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -192,14 +199,14 @@ sgi)
 ' < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
     tr '
-' ' ' >> $depfile
-    echo >> $depfile
+' ' ' >> "$depfile"
+    echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
     tr ' ' '
 ' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+   >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -215,34 +222,39 @@ aix)
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -323,7 +335,12 @@ hp2)
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
     # Add `dependent.h:' lines.
-    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
   else
     echo "#dummy" > "$depfile"
   fi
@@ -399,7 +416,7 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -450,32 +467,39 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
   # X makedepend
   shift
-  cleared=no
-  for arg in "$@"; do
+  cleared=no eat=no
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
       cleared=yes ;;
     esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
     case "$arg" in
     -D*|-I*)
       set fnord "$@" "$arg"; shift ;;
     # Strip any option that makedepend may not understand.  Remove
     # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
     -*|$object)
       ;;
     *)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
@@ -495,7 +519,7 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -533,13 +557,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
@@ -552,16 +590,23 @@ msvisualcpp)
        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
   echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
@@ -580,5 +625,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 4fbbae7..6781b98 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-10-14.15
+scriptversion=2009-04-28.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -48,7 +48,7 @@ IFS=" ""      $nl"
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
 if test -z "$doit"; then
   doit_exec=exec
 else
@@ -58,34 +58,49 @@ fi
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
 
-posix_glob=
 posix_mkdir=
 
 # Desired mode of installed file.
 mode=0755
 
+chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
-chgrpcmd=
-stripcmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
 src=
 dst=
 dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
 no_target_directory=
 
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
 In the 4th, create DIRECTORIES.
 
 Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last 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.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 "
 
 while test $# -ne 0; do
   case $1 in
-    -c) shift
-        continue;;
+    -c) ;;
+
+    -C) copy_on_change=true;;
 
-    -d) dir_arg=true
-        shift
-        continue;;
+    -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-        shift
-        shift
        case $mode in
          *' '* | *'    '* | *'
 '*       | *'*'* | *'?'* | *'['*)
            echo "$0: invalid mode: $mode" >&2
            exit 1;;
        esac
-        continue;;
+       shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
+    -s) stripcmd=$stripprog;;
 
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
+    -t) dst_arg=$2
+       shift;;
 
-    -T) no_target_directory=true
-       shift
-       continue;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
@@ -165,21 +170,22 @@ while test $# -ne 0; do
 
     *)  break;;
   esac
+  shift
 done
 
-if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
   # Otherwise, the last argument is the destination.  Remove it from $@.
   for arg
   do
-    if test -n "$dstarg"; then
+    if test -n "$dst_arg"; then
       # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dstarg"
+      set fnord "$@" "$dst_arg"
       shift # fnord
     fi
     shift # arg
-    dstarg=$arg
+    dst_arg=$arg
   done
 fi
 
@@ -224,7 +230,7 @@ for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src ;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -242,22 +248,22 @@ do
       exit 1
     fi
 
-    if test -z "$dstarg"; then
+    if test -z "$dst_arg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dstarg
+    dst=$dst_arg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst ;;
+      -*) dst=./$dst;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
+       echo "$0: $dst_arg: Is a directory" >&2
        exit 1
       fi
       dstdir=$dst
@@ -378,26 +384,19 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix=;;
-       -*) prefix=./ ;;
-       *)  prefix= ;;
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
       esac
 
-      case $posix_glob in
-        '')
-         if (set -f) 2>/dev/null; then
-           posix_glob=true
-         else
-           posix_glob=false
-         fi ;;
-      esac
+      eval "$initialize_posix_glob"
 
       oIFS=$IFS
       IFS=/
-      $posix_glob && set -f
+      $posix_glob set -f
       set fnord $dstdir
       shift
-      $posix_glob && set +f
+      $posix_glob set +f
       IFS=$oIFS
 
       prefixes=
@@ -459,41 +458,54 @@ do
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dst"; then
-              $doit $rmcmd -f "$dst" 2>/dev/null \
-              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
-                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
-              || {
-                echo "$0: cannot unlink or rename $dst" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dst"
-        }
-    } || exit 1
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
     trap '' 0
   fi
@@ -503,5 +515,6 @@ done
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 1c8ff70..28055d2 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2006-05-10.23
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2006-05-10.23
 # 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -89,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -106,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
 case $1 in
-  lex|yacc)
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -138,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case $1 in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -148,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -157,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -187,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -210,7 +218,7 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
@@ -240,7 +248,7 @@ WARNING: \`$1' $msg.  You should only need it if
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
@@ -263,7 +271,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
@@ -277,11 +285,11 @@ WARNING: \`$1' is $msg.  You should only need it if
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -310,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
@@ -363,5 +371,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index cbcf399..7b92a3a 100644 (file)
@@ -1,4 +1,3 @@
-/* $Xorg: xmag.c,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
 /*
 
 Copyright 1991, 1998  The Open Group
@@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
 from The Open Group.
 
 */
-/* $XFree86: xmag.c,v 1.13 2003/05/27 22:27:07 tsi Exp $ */
 
 #include "config.h"
 
index 0f96f77..a396092 100644 (file)
@@ -1,4 +1,3 @@
-.\" $Xorg: xmag.man,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $
 .\" Copyright 1991, 1994, 1998  The Open Group
 .\" 
 .\" Permission to use, copy, modify, distribute, and sell this software and its
@@ -23,7 +22,6 @@
 .\" other dealings in this Software without prior written authorization
 .\" from The Open Group.
 .\"
-.\" $XFree86: xc/programs/xmag/xmag.man,v 1.6 2001/01/27 18:21:18 dawes Exp $
 .\"
 .TH XMAG 1 __xorgversion__
 .SH NAME
diff --git a/xman/AUTHORS b/xman/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xman/COPYING b/xman/COPYING
deleted file mode 100644 (file)
index 7f33cbf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-This is a stub file.  This package has not yet had its complete licensing
-information compiled.  Please see the individual source files for details on
-your rights to use and modify this software.
-
-Please submit updated COPYING files to the Xorg bugzilla:
-
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
-
-http://lists.freedesktop.org/mailman/listinfo/xorg
diff --git a/xman/ChangeLog b/xman/ChangeLog
deleted file mode 100644 (file)
index 7d45bc1..0000000
+++ /dev/null
@@ -1,578 +0,0 @@
-commit b82eb1279acc60f9ebb93730ac002dfde2118a4b
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Fri Oct 16 14:10:04 2009 -0700
-
-    xman 1.1.0
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 2983ab485ff3fd68ff33d81f9fa46977ec724ac6
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Oct 15 18:20:41 2009 -0700
-
-    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 6c4d017430014699b5e108f10765e89bcc3f41cf
-Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-Date:   Thu Oct 15 16:09:44 2009 -0500
-
-    Cygwin uses Linux-style man
-    
-    Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
-commit 44334f70b6623395bbef78513f712dbbf5cbfba0
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Thu Oct 1 14:54:27 2009 -0700
-
-    Add README with pointers to mailing lists, bugzilla, & git
-    
-    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-
-commit 86e63ab1821387f6fcf3fce506357f76ad8dd194
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Thu Jan 17 17:42:12 2008 -0200
-
-    Add lzma manpage extension support.
-    
-    This should really be handled by the existing code to handle multiple
-    extension formats...
-
-commit e4b0097161ec84b288ca480149ed0185e742d7a3
-Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
-Date:   Tue Jan 13 18:16:03 2009 -0200
-
-    Ansification and compile warning fixes.
-    
-      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, and corrects
-    make distcheck.
-
-commit 3afab6ff3cd896514d3bb733244e3bb9640d1e7c
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Sat Nov 8 15:03:18 2008 -0800
-
-    Apple: Added Tiger's man.conf location to the search path
-
-commit 5722ca728763e7ec57088593e76ba84db61a726c
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Thu Aug 21 00:38:27 2008 +0200
-
-    Remove xprint remnants
-
-commit f3579250f8aa332f2015cb1352ed8b7373eb10db
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Wed Aug 20 10:32:52 2008 -0400
-
-    xaw8 is gone, use xaw7
-
-commit 74dbdc66607017cd9ba3c2c3dba4a5536332fabb
-Author: Julien Cristau <jcristau@debian.org>
-Date:   Fri Mar 28 11:53:13 2008 +0100
-
-    Use AM_CFLAGS instead of xman_CFLAGS and remove AM_PROG_CC_C_O
-
-commit 6c9f3307ba95604654d0f0227b7e0457ef4bc47f
-Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
-Date:   Thu Mar 27 20:15:54 2008 -0700
-
-    Build fix for case insensitive file systems
-    Also added AM_PROG_CC_C_O
-
-commit dbfa16889ae66d5880e23c9a63f8385896512020
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Sat Feb 9 21:53:14 2008 -0500
-
-    Allow xman to use bzip2 to decompress man pages
-    
-    Patch is from Mandriva as posted to bugzilla bug 14400.
-    
-    Use bunzip2(1) to decompress man pages, akin to the current
-    support for gzip(1)ed pages.
-
-commit 2d03acacffae87865201991fc9ef44a7208ccb8f
-Author: James Cloos <cloos@jhcloos.com>
-Date:   Thu Dec 6 16:37:24 2007 -0500
-
-    Replace static ChangeLog with dist-hook to generate from git log
-
-commit 137a0fd2e258d9337049263895b1d6142af3a464
-Author: Jeremy C. Reed <reed@glacier.reedmedia.net>
-Date:   Thu Aug 16 11:45:37 2007 -0500
-
-    Allow xman to be cross build by adding a ./configure
-    --with-manconfig=<filename> option.
-    (Based on discussion on xorg list at end of July.)
-
-commit 8077ab96dbb30ec5b5b4bbc67124fc6f2681cdb5
-Author: Matthieu Herrb <matthieu@localhost.localdomain>
-Date:   Fri Aug 10 16:19:58 2007 +0200
-
-    Bump version for release
-
-commit 112a1b17708c8213cb19f31934458c19dd31f360
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Jan 3 20:26:26 2007 -0800
-
-    renamed: .cvsignore -> .gitignore
-
-commit bede0f3651f51ce5bc99a2d6543664e3817d14f4
-Author: Alan Coopersmith <alan.coopersmith@sun.com>
-Date:   Wed Jan 3 20:25:54 2007 -0800
-
-    Sun Bug 6504978: xman on Solaris x86 does not render correctly, nroff visible
-    
-    <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6504978>
-
-commit 7e0441a748aa62459bc74b08196e48e89860123e
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Sun Apr 2 01:13:58 2006 +0000
-
-    Bump to 1.0.2.
-
-commit d76e42586ff3032b1427b9c130ed65c09078f4e4
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Jan 6 22:39:24 2006 +0000
-
-    <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6240826> Sun
-        bug 6240826: xman typo: 'geometery' in usage message (Sam Lau)
-
-commit d0b90cd56262986a6b8a57d91f1f833d3039bc9e
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 21 02:29:52 2005 +0000
-
-    Update package version for X11R7 release.
-
-commit e8eb7902e02e7ccad9ddd32eb517d989f90b3fa3
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 20 21:54:20 2005 +0000
-
-    Bump hardcoded version number.
-
-commit cf34c7ba82f1aa7d25d1d7e9ad70aea39c05d780
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Mon Dec 19 16:22:46 2005 +0000
-
-    Stub COPYING files
-
-commit 4676f39901599df979f6a5da84234e76a713b583
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 15 00:24:09 2005 +0000
-
-    Update package version number for final X11R7 release candidate.
-
-commit 28b5296571c67d70d8808e2f80d2c3f51fba15b6
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Dec 8 17:55:17 2005 +0000
-
-    Add configure options to allow hard-coded paths to be changed.
-
-commit 898dc25befe1d90e36e3735b011039745176e861
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Dec 7 16:18:01 2005 +0000
-
-    Change to use the app-defaults default dir configured in libXt.
-
-commit 60093efc850bea280c2931f81b90ee8d83a21df6
-Author: Kevin E Martin <kem@kem.org>
-Date:   Tue Dec 6 22:48:24 2005 +0000
-
-    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-commit 3863a37b310d213e58732d6a5c9c7c878cdf1a8d
-Author: Kevin E Martin <kem@kem.org>
-Date:   Sat Dec 3 05:49:26 2005 +0000
-
-    Update package version number for X11R7 RC3 release.
-
-commit e0dfbe139da41143cdfc3c222110db790f160f3e
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Nov 28 22:01:44 2005 +0000
-
-    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
-        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
-
-commit e4156c926662a13bea5c59ecfc128dfd5b5f988c
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Mon Nov 21 10:35:02 2005 +0000
-
-    Another pass at .cvsignores for apps.
-
-commit 1a530f943936c8fe145e00567406a6c321dd9176
-Author: Eric Anholt <anholt@freebsd.org>
-Date:   Sun Nov 20 22:08:54 2005 +0000
-
-    Add/improve .cvsignore files for apps.
-
-commit d373967af861fb2c97dde15e56f13f575acc48da
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sun Nov 20 04:13:45 2005 +0000
-
-    Add dependency on xp module when building with Xprint support.
-
-commit 4b7d00e52f22d0c98152bc47f47a317619175ae9
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Nov 9 21:09:22 2005 +0000
-
-    Update package version number for X11R7 RC2 release.
-
-commit aaca206527e4fe4e3a825daae4261554681cec58
-Author: Kean Johnson <kean@armory.com>
-Date:   Tue Nov 8 06:33:33 2005 +0000
-
-    See ChangeLog entry 2005-11-07 for details.
-
-commit 61785b3b0421ab82f88671dd5d515579cd5d8243
-Author: Kevin E Martin <kem@kem.org>
-Date:   Wed Oct 19 02:47:56 2005 +0000
-
-    Update package version number for RC1 release.
-
-commit 4c5fda0874b94edf9189eb84839e9ae46df99df6
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Tue Oct 18 00:32:54 2005 +0000
-
-    Change default install dir for app-default files from
-        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
-        the monolith & allow localization
-
-commit 009cf19ab0940f771eb5967a8f6528f20333b597
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Oct 17 23:56:24 2005 +0000
-
-    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
-        work better with BSD make
-
-commit 58076d1a51b69c6ef84258b2e3c4361fd6ac30e8
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Fri Oct 14 00:25:47 2005 +0000
-
-    Use sed to fill in variables in man page
-
-commit 41f684bf50fea4b96ebea38e728bb771b83dc736
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Mon Aug 1 20:25:30 2005 +0000
-
-    Install man pages to section 1 instead of section m (Patch from Donnie
-        Berkholz)
-
-commit f1b20d6d1578c6c57eed9fb81fd8d28282fc8bcc
-Author: Kevin E Martin <kem@kem.org>
-Date:   Fri Jul 29 21:22:36 2005 +0000
-
-    Various changes preparing packages for RC0:
-    - Verify and update package version numbers as needed
-    - Implement versioning scheme
-    - Change bug address to point to bugzilla bug entry form
-    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
-        reenable it)
-    - Fix makedepend to use pkgconfig and pass distcheck
-    - Update build script to build macros first
-    - Update modular Xorg version
-
-commit c42be410ac62efc0252fae37b4ed1fb9d30bd457
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Thu Jul 28 23:16:55 2005 +0000
-
-    Set default man path for Solaris.
-
-commit f4f185f8700de48dcb5b888cd113dcb9aff91829
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Thu Jul 28 22:47:57 2005 +0000
-
-    Install xman.help Attempt to determine man page configuration file location
-        and format (based on Imake MANCONFIGSTYLE and MANCONF settings - needs
-        testing on various Linux & BSD flavors to see if I translated
-        correctly)
-
-commit 7a3bd9a41a227ad0590d4104fd8ecc21e2099cd0
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Sat Jul 23 16:48:10 2005 +0000
-
-    fix remainig DEP_{CFLAGS,LIBS} references
-
-commit caa0a44964149cdbe1e3585b7799540e0827b4fc
-Author: Adam Jackson <ajax@nwnk.net>
-Date:   Wed Jul 20 19:32:02 2005 +0000
-
-    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
-        configure cache, you cache it, and the cached value is probably wrong.
-
-commit 0423e9c256b9fd808e09f306e9b7b668c799ed45
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 16 22:07:13 2005 +0000
-
-    Add #ifdef HAVE_CONFIG_H/#include "config.h" to files that need it to get
-        HAS_MKSTEMP defined in modular builds.
-
-commit eb70952e2e8c3d103f8fcb3012328e542337c87a
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat Jul 16 21:59:14 2005 +0000
-
-    Define HAS_MKSTEMP if mkstemp() is present (needed for improved protection
-        against tempfile race conditions in many places)
-
-commit 622dfb510ce2896a79418a6227a8af634827b796
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Thu Jul 14 22:40:16 2005 +0000
-
-    Add _BSD_SOURCE to lots of applications - patch from Stefan Dirsch
-
-commit 6698505ac69196e38e1187c54204fb84ff6effe2
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Wed Jul 6 14:14:10 2005 +0000
-
-    Make Xman build again.
-    - Use $xaw_use_xprint instead of $XAW_USE_XPRINT
-    - Generate Xman by linking from either Xman-xprint.ad or Xman-noxprint.ad
-        Both pointed out by Stefan Dirsch.
-
-commit fb0ffe45044025c82e1597b9cff7f8e1b2f216e6
-Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
-Date:   Tue Jul 5 22:51:11 2005 +0000
-
-    Add build systems for xlogo, xlsatoms, xlsclients, xmag, xman, xmessage,
-        xmh, xmore. lib/Xaw/xaw.m4: Add an AM_CONDITIONAL and a shell variable
-        xaw_use_xprint symlink.sh: add some extra files for xgc, xinit,
-        xkbcomp, xlogo, xmb, and xmodmap xc/programs/xmore/xmore.c:
-        Conditionalize use of xprint
-
-commit feaa900afe02312131f4f6f503fe6efa85a41eba
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Mon Apr 11 01:06:15 2005 +0000
-
-    xc/programs/Xserver/Xprint/attributes.c
-    xc/programs/glxgears/glxgears.c
-    xc/programs/xdbedizzy/xdbedizzy.c
-    xc/programs/xedit/Imakefile
-    xc/programs/xedit/Xedit-xprint.ad
-    xc/programs/xedit/util.c
-    xc/programs/xedit/xedit.h
-    xc/programs/xlogo/print.c
-    xc/programs/xlogo/xlogo.c
-    xc/programs/xlogo/xlogo.h
-    xc/programs/xman/Imakefile
-    xc/programs/xman/print.h
-    xc/programs/xmore/Imakefile
-    xc/programs/xmore/print.c
-    xc/programs/xmore/print.h
-    xc/programs/xmore/printdialog.c
-    xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
-    xc/programs/xphelloworld/xphelloworld/xphelloworld.c
-    xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c
-    xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c
-    //bugs.freedesktop.org/show_bug.cgi?id=790) attachment #2379
-        (https://bugs.freedesktop.org/attachment.cgi?id=2379) Implement support
-        client+Xserver support for passing output (stdout+stderr) of the
-        spooler command started by the Xprint server back to the application
-        using the "xp-spooler-command-results" XPJobAttr attribute
-        (applications can fetch the attribute value after the XPEndJobNotify
-        event was received; more details can be found in
-        http://xprint.mozdev.org/docs/dtprint_fspec.ps).
-
-commit 821677f646bcaee8b5e4759d97909d05120de4d2
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Sat Apr 9 06:42:15 2005 +0000
-
-    //bugs.freedesktop.org/show_bug.cgi?id=2942) attachment #2360
-        (https://bugs.freedesktop.org/attachment.cgi?id=2360) Fix possible
-        crash due uninitalised structure when "xman" opens the print dialog.
-
-commit a42a211aba369513bf31d6d34c966c36c1ccc714
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Mon Jan 3 01:06:35 2005 +0000
-
-    xc/lib/XprintAppUtil/xpapputil.c
-    xc/lib/XprintAppUtil/xpapputil.h
-    xc/lib/XprintUtil/xprintutil.c
-    xc/lib/XprintUtil/xprintutil.h
-    xc/programs/glxgears/glxgears.c
-    xc/programs/xdbedizzy/xdbedizzy.c
-    xc/programs/xedit/Xedit-xprint.ad
-    xc/programs/xedit/commands.c
-    xc/programs/xlogo/print.c
-    xc/programs/xlsfonts/xlsfonts.c
-    xc/programs/xlsfonts/xlsfonts.man
-    xc/programs/xlsfonts/xlsfonts.sgml
-    xc/programs/xman/Xman-xprint.ad
-    xc/programs/xman/handler.c
-    xc/programs/xman/print.c
-    xc/programs/xman/print.h
-    xc/programs/xmore/XMore.ad
-    xc/programs/xmore/print.c
-    xc/programs/xmore/print.h
-    xc/programs/xmore/printdialog.c
-    xc/programs/xmore/printdialog.h
-    xc/programs/xmore/printdialogprivates.h
-    xc/programs/xmore/xmore.c
-    xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c
-    xc/programs/xphelloworld/xphelloworld/xphelloworld.c
-    xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c
-    xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c
-    xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.c
-    xc/programs/xplsprinters/xplsprinters.c
-    //bugs.freedesktop.org/show_bug.cgi?id=1706) attachment #1615
-        (https://bugs.freedesktop.org/attachment.cgi?id=1615): XprintUtils
-        2004/Q3 update. This adds various new features to the XprintUtils
-        library including support for page resolutions where
-        X_resolution!=Y_resolution, listfonts-mode control and initial
-        framework for the COLORSPACE extension. Patch by Roland Mainz
-        <roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>.
-
-commit 6abedd2bce33d244546a3efed44beb95c6571157
-Author: Egbert Eich <eich@suse.de>
-Date:   Mon Oct 18 14:21:47 2004 +0000
-
-    Made handling of DevelDrivers for x86-64 more conformant to other
-        platforms.
-    Compress all font encodings (Stefan Dirsch).
-    Fixed warnings.
-    Turn on forwarding XNSpotLocation event to XIM server in OffTheSpot and
-        Root mode (bugzilla #1580, James Su).
-    Added another compose key combination for the Euro symbol (Stefan Dirsch).
-    Added support for UTF-8 in ja_JP, ko_KR and zh_TW locales (Mike Fabian).
-    Changed default encoding for ru from KOI8-R to ISO8859-5 (Mike Fabian).
-        This is the encoding that is also used by glibc. We may break other
-        libcs - lets see who complains.
-    Added explanation for DESTDIR to install to a different directory than /.
-    Added some early bailouts to atiprobe if PCI structure pointer is NULL to
-        prevent sig11.
-    XV support doesn't depend on 2D acceleration any more. This patch removes
-        this limitation from the NSC driver. This is a patch that I have
-        committed to XFree86 a while ago but never ported over to X.Org.
-        Matthieu Herrb contributed some build fixes.
-    Fixing SetDPMSTimers() so that DPMS*Time == 0 disables the appropriate
-        timer. This takes advantage of the fact that TimerSet() with a timeout
-        argument 0 behaves like TimerCanel().
-    Use /dev/xconsole (named pipe) or devpts for system logger (Werner Fink).
-    Create missing links for backward compatibility to XFree86 (Stefan Dirsch).
-    Changed comment to mention xorg.
-    Changed cursor for the 'kill' action from XC_draped_box to XC_Pirate. If
-        you don't like it we can change it back (original author unkown).
-    Added 'pic' to the man page rendering command pipeline (Werner Fink).
-    Added missing return value (Stefan Dirsch, Roland Mainz)
-
-commit 4cf1c874d8ea1eb2222e10ca92c2c5afa30e1326
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Tue Oct 12 22:46:40 2004 +0000
-
-    Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1601 - Fix
-        problems with wrong page counts in xedit&co. when a global "*geometry"
-        resource was overriding the internal geometry management used by
-        XawPrintShell(=usually adjust to current page size, the resource was
-        turning this into a static value). (Original patch by Felix Schulte
-        <felix.schulte@gmail.com>)
-
-commit b9b8f24095964cdfe21b52a5f2667a42fdc6220d
-Author: Matthieu Herrb <matthieu.herrb@laas.fr>
-Date:   Wed Sep 29 20:04:57 2004 +0000
-
-    Avoid several buffer overflows if search string is too long. Bugzilla
-        #1481.
-
-commit 545064318591f8c27701da0af0ebc5d9fd1b2ec5
-Author: Kevin E Martin <kem@kem.org>
-Date:   Thu Sep 2 08:40:33 2004 +0000
-
-    Restore xman and xedit changes that were previously reverted, and make
-        Xprint support optional (Bug #1273, Roland Mainz).
-
-commit 50a3e1e4269fe2ef6c97ff40a6dc02d074e7ba95
-Author: Kristian Høgsberg <krh@redhat.com>
-Date:   Mon Aug 16 16:36:26 2004 +0000
-
-    As discussed and agreed on on the release-wranglers meeting of August 16,
-        I'm committing the patch from bug #1060 to back out unconditional
-        Xprint functionality.
-    Back out Xprint changes.
-    Revert xman to CVS of June 5, revert xlogo to CVS of May 8, revert xedit to
-        CVS of April 25, to back out unconditional Xprint support.
-    Fix up Xprint config logic to be like the rest of the extensions:
-        BuildXprint is a one-stop option for disabling everything Xprint
-        related. XprtServer controls building Xprt, BuildXprintLib controls
-        building Xprint libs and BuildXprintClients controls building clients
-        related to Xprint. BuiltXprint defaults to YES and the other options
-        respects relevant settings, i.e. BuildServer and BuildServersOnly.
-    Build Xaw regardless of BuildXprintLib setting.
-    Only build xphelloworld, xplsprinters and xprehashprinterlist when
-        BuildXprintClients it YES. Disable building xmore, it has always
-        supported XawPrintShell.
-    Make Xprint support depend on BuildXprintLib.
-
-commit 6b0d9917116797e38b554397b815c555bf55a721
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Thu Jul 29 00:40:35 2004 +0000
-
-    Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=938 - Update
-        XawPrintShell per feedback and review comments.
-
-commit 24ffc96e3347125c213090d9c9550fbf48756459
-Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
-Date:   Thu Jul 1 13:54:46 2004 +0000
-
-    DoSearch is defined in search.c
-
-commit 7cf0973ed5076c513b3a970a8250066a05b0473e
-Author: Roland Mainz <roland.mainz@nrubsig.org>
-Date:   Tue Jun 8 02:44:35 2004 +0000
-
-    Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=668 - Add print
-        support to xman
-
-commit 113139a1b202d0b94dcd24facc7b2c584faf294e
-Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
-Date:   Sat May 22 19:20:06 2004 +0000
-
-    Set HasMkstemp to YES on Solaris
-    xc/programs/xman/man.c
-    xc/programs/xman/man.h
-    xc/programs/xman/misc.c
-    xman cannot display SGML man pages on Solaris
-
-commit 313f95249e4621b9002bdd054106b8b743ff64ae
-Author: Egbert Eich <eich@suse.de>
-Date:   Fri Apr 23 19:54:58 2004 +0000
-
-    Merging XORG-CURRENT into trunk
-
-commit 0b24854cbc017733d4e782db65912a473ec053be
-Author: Egbert Eich <eich@suse.de>
-Date:   Sun Mar 14 08:35:40 2004 +0000
-
-    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
-
-commit 7093a5ad5e15f7c2a7bb8feb6f3255f9a4f8983a
-Author: Egbert Eich <eich@suse.de>
-Date:   Wed Mar 3 12:13:15 2004 +0000
-
-    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
-
-commit 471b69d7053fb225fee8a2ff987c789d421aedfa
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 13:36:26 2004 +0000
-
-    readding XFree86's cvs IDs
-
-commit 31f5f6a32ae09278b3bb6f8aecc18793d66b3437
-Author: Egbert Eich <eich@suse.de>
-Date:   Thu Feb 26 09:24:14 2004 +0000
-
-    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
-
-commit 06d8bbebd1daa587dc5509d9d464646a9ae07c45
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Tue Nov 25 19:29:15 2003 +0000
-
-    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
-
-commit 1504e01d61c573156fe82c2395362f0567102d8a
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:23 2003 +0000
-
-    XFree86 4.3.0.1
-
-commit 36fca7804971e1b209138fcf82aee2d74cb2583e
-Author: Kaleb Keithley <kaleb@freedesktop.org>
-Date:   Fri Nov 14 16:49:23 2003 +0000
-
-    Initial revision
diff --git a/xman/NEWS b/xman/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xman/ScrollByL.c b/xman/ScrollByL.c
deleted file mode 100644 (file)
index 911f494..0000000
+++ /dev/null
@@ -1,1211 +0,0 @@
-/* $XConsortium: ScrollByL.c,v 1.30 94/04/17 20:43:46 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/ScrollByL.c,v 1.6tsi Exp $ */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <X11/Xos.h>
-#include <stdlib.h>
-
-#include <X11/IntrinsicP.h>
-#include <sys/stat.h>          /* depends on IntrinsicP.h */
-#include <X11/StringDefs.h>
-
-#include <X11/Xaw/Scrollbar.h>
-#include <X11/Xmu/Misc.h>
-
-#include "ScrollByLP.h"
-
-/* Default Translation Table */
-
-static char defaultTranslations[] = 
-  "<Key>f:      Page(Forward) \n\
-   <Key>b:      Page(Back) \n\
-   <Key>1:      Page(Line, 1) \n\
-   <Key>2:      Page(Line, 2) \n\
-   <Key>3:      Page(Line, 3) \n\
-   <Key>4:      Page(Line, 4) \n\
-   <Key>\\ :    Page(Forward)";
-
-      
-/****************************************************************
- *
- * ScrollByLine Resources
- *
- ****************************************************************/
-
-#define Offset(field) XtOffset(ScrollByLineWidget, scroll.field)
-#define CoreOffset(field) XtOffset(ScrollByLineWidget, core.field)
-
-static XtResource resources[] = {
-    {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
-       CoreOffset(width), XtRImmediate, (caddr_t) 500},
-    {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
-       CoreOffset(height), XtRImmediate, (caddr_t) 700},
-
-    {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
-       Offset(foreground), XtRString, "XtDefaultForeground"},
-    {XtNforceVert, XtCBoolean, XtRBoolean, sizeof(Boolean),
-       Offset(force_vert), XtRImmediate, (caddr_t) FALSE},
-    {XtNindent, XtCIndent, XtRDimension, sizeof(Dimension),
-       Offset(indent), XtRImmediate, (caddr_t) 15},
-    {XtNuseRight, XtCBoolean, XtRBoolean, sizeof(Boolean),
-       Offset(use_right), XtRImmediate, (caddr_t) FALSE},
-    {XtNmanualFontNormal, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
-       Offset(normal_font), XtRString, MANPAGE_NORMAL},
-    {XtNmanualFontBold, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
-       Offset(bold_font), XtRString, MANPAGE_BOLD},
-    {XtNmanualFontItalic, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
-       Offset(italic_font), XtRString, MANPAGE_ITALIC},
-    {XtNmanualFontSymbol, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
-       Offset(symbol_font), XtRString, MANPAGE_SYMBOL},
-    {XtNfile, XtCFile, XtRFile, sizeof(FILE *),
-       Offset(file), XtRImmediate, (caddr_t) NULL},
-    {XtNNumTotalLines, XtCNumTotalLines, XtRInt, sizeof(int),
-       Offset(lines), XtRImmediate, (caddr_t) 0},
-    {XtNNumVisibleLines, XtCNumVisibleLines, XtRInt, sizeof(int),
-       Offset(num_visible_lines), XtRImmediate, (caddr_t) 0},
-};
-
-#undef Offset
-#undef CoreOffset
-
-/****************************************************************
- *
- * Full class record constant
- *
- ****************************************************************/
-
-static void CreateScrollbar(Widget w);
-static Boolean ScrollVerticalText(Widget w, int new_line, Boolean force_redisp);
-static void Layout(Widget w);
-static void LoadFile(Widget w);
-static void MoveAndClearText(Widget w, int old_y, int height, int new_y);
-static void PaintText(Widget w, int y_loc, int height);
-static void PrintText(Widget w, int start_line, int num_lines, int location);
-static void SetThumbHeight(Widget w);
-static void VerticalJump(Widget w, XtPointer junk, XtPointer percent_ptr);
-static void VerticalScroll(Widget w, XtPointer client_data, XtPointer call_data);
-
-/* semi - public functions. */
-
-static void Realize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes);
-static void Initialize(Widget req, Widget new, ArgList args, Cardinal *num_args);
-static void Destroy(Widget w);
-static void Redisplay(Widget w, XEvent *event, Region region);
-static void Page(Widget w, XEvent * event, String * params, Cardinal *num_params);
-static Boolean SetValuesHook(Widget w, ArgList args, Cardinal *num_args);
-
-static XtActionsRec actions[] = {
-  { "Page",   Page},
-};
-
-#define superclass             (&simpleClassRec)
-#define SuperClass             simpleWidgetClass
-
-ScrollByLineClassRec scrollByLineClassRec = {
-  {
-/* core_class fields      */
-    /* superclass         */    (WidgetClass) superclass,
-    /* class_name         */    "ScrollByLine",
-    /* widget_size        */    sizeof(ScrollByLineRec),
-    /* class_initialize   */    NULL,
-    /* class_part_init    */    NULL,
-    /* class_inited       */   FALSE,
-    /* initialize         */    Initialize,
-    /* initialize_hook    */    NULL,
-    /* realize            */    Realize,
-    /* actions            */    actions,
-    /* num_actions       */    XtNumber(actions),
-    /* resources          */    resources,
-    /* num_resources      */    XtNumber(resources),
-    /* xrm_class          */    NULLQUARK,
-    /* compress_motion   */    TRUE,
-    /* compress_exposure  */   FALSE,
-    /* compress_enterleave*/    TRUE,
-    /* visible_interest   */    FALSE,
-    /* destroy            */    Destroy,
-    /* resize             */    Layout,
-    /* expose             */    Redisplay,
-    /* set_values         */    NULL,
-    /* set_values_hook    */    SetValuesHook,
-    /* set_values_almost  */    XtInheritSetValuesAlmost,
-    /* get_values_hook    */    NULL,
-    /* accept_focus       */    NULL,
-    /* version            */    XtVersion,
-    /* callback_private   */    NULL,
-    /* tm_table           */    defaultTranslations,
-    /* query_geometry    */    XtInheritQueryGeometry,
-    /* display_accelerator*/   XtInheritDisplayAccelerator,
-    /* extension         */    NULL,
-  },
-  { /* simple fields */
-    /* change_sensitive                */      XtInheritChangeSensitive
-  }
-};
-
-WidgetClass scrollByLineWidgetClass = 
-            (WidgetClass) &scrollByLineClassRec;
-
-
-/****************************************************************
- *
- * Private Routines
- *
- ****************************************************************/
-
-/*     Function Name: Layout
- *     Description: This function lays out the scroll widget.
- *     Arguments: w - the scroll widget.
- *                 key - a boolean: if true then resize the widget to the child
- *                                  if false the resize children to fit widget.
- *     Returns: TRUE if successful.
- */
-
-static void
-Layout(Widget w)
-{    
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  Dimension width, height;
-  Widget bar;
-  Position bar_bw;
-
-  CreateScrollbar(w);
-
-/* 
- * For now always show the bar.
- */
-
-  bar = sblw->scroll.bar;
-  height = sblw->core.height;
-  width = sblw->core.width;
-  bar_bw = bar->core.border_width;
-
-  /* Move child and v_bar to correct location. */
-
-  if (sblw->scroll.use_right) {
-    XtMoveWidget(bar, width - (bar->core.width + bar_bw), - bar_bw);
-    sblw->scroll.offset = 0;
-  }
-  else {
-    XtMoveWidget(bar, - bar_bw, - bar_bw);
-    sblw->scroll.offset = bar->core.width + bar_bw;
-  }
-
-  /* resize the scrollbar to be the correct height or width. */
-
-  XtResizeWidget(bar, bar->core.width, height, bar->core.border_width);
-
-  SetThumbHeight(w);
-  
-  sblw->scroll.num_visible_lines = height / sblw->scroll.font_height + 1;
-}
-
-/* ARGSUSED */
-static void 
-GExpose(Widget w, XtPointer junk, XEvent *event, Boolean *cont)
-{
-
-/*
- * Graphics exposure events are not currently sent to exposure proc.
- */
-
-  if (event->type == GraphicsExpose)
-    Redisplay(w, event, NULL);
-
-} /* ChildExpose */
-
-/*
- * Repaint the widget's child Window Widget.
- */
-
-/* ARGSUSED */
-static void
-Redisplay(Widget w, XEvent *event, Region region)
-{
-  int top, height;             /* the locations of the top and height
-                                  of the region that needs to be repainted. */
-  
-/*
- * This routine tells the client which sections of the window to 
- * repaint in his callback function which does the actual repainting.
- */
-
-  if (event->type == Expose) {
-    top = event->xexpose.y;
-    height = event->xexpose.height;
-  }
-  else {
-    top = event->xgraphicsexpose.y;
-    height  = event->xgraphicsexpose.height;
-  }
-  
-  PaintText(w, top, height);
-} /* redisplay (expose) */
-
-/*     Function Name: PaintText
- *     Description: paints the text at the give location for a given height.
- *     Arguments: w - the sbl widget.
- *                 y_loc, height - location and size of area to paint.
- *     Returns: none
- */
-
-static void
-PaintText(Widget w, int y_loc, int height)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  int start_line, location;
-
-  start_line = y_loc / sblw->scroll.font_height + sblw->scroll.line_pointer;
-
-  if (start_line >= sblw->scroll.lines)
-    return;
-  
-/*
- * Only integer arithmetic makes this possible. 
- */
-
-  location =  y_loc / sblw->scroll.font_height * sblw->scroll.font_height;
-
-  PrintText(w, start_line, sblw->scroll.num_visible_lines, location);
-} 
-
-/*     Function Name: Page
- *     Description: This function pages the widget, by the amount it recieves
- *                   from the translation Manager.
- *     Arguments: w - the ScrollByLineWidget.
- *                 event - the event that caused this return.
- *                 params - the parameters passed to it.
- *                 num_params - the number of parameters.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-static void 
-Page(Widget w, XEvent * event, String * params, Cardinal *num_params)
-{
-   ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-   Widget bar = sblw->scroll.bar;
-
-   if (*num_params < 1)
-     return;
-/*
- * If no scroll bar is visible then do not page, as the entire window is shown,
- * of scrolling has been turned off. 
- */
-
-   if (bar == (Widget) NULL)
-     return;
-
-   switch ( params[0][0] ) {
-   case 'f':
-   case 'F':
-     /* move one page forward */
-     VerticalScroll(bar, NULL, (XtPointer)((long) bar->core.height));
-     break;
-   case 'b':
-   case 'B':
-     /* move one page backward */
-     VerticalScroll(bar, NULL,  (XtPointer)(- (long) bar->core.height));
-     break;
-   case 'L':
-   case 'l':
-     /* move one line forward */
-     VerticalScroll(bar, NULL, 
-               (XtPointer)((long) atoi(params[1]) * sblw->scroll.font_height));
-     break;
-   default:
-     return;
-   }
-}
-
-/*     Function Name: CreateScrollbar
- *     Description: createst the scrollbar for us.
- *     Arguments: w - sblw widget.
- *     Returns: none.
- */
-
-static void
-CreateScrollbar(Widget w)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  Arg args[5];
-  Cardinal num_args = 0;
-
-  if (sblw->scroll.bar != NULL) 
-    return;
-
-  XtSetArg(args[num_args], XtNorientation, XtorientVertical); num_args++;
-  
-  sblw->scroll.bar = XtCreateWidget("scrollbar", scrollbarWidgetClass, w, 
-                                   args, num_args);
-  XtAddCallback(sblw->scroll.bar, XtNscrollProc, VerticalScroll, NULL);
-  XtAddCallback(sblw->scroll.bar, XtNjumpProc, VerticalJump, NULL); 
-}
-
-/*     Function Name: ScrollVerticalText
- *     Description: This accomplished the actual movement of the text.
- *     Arguments: w - the ScrollByLine Widget.
- *                 new_line - the new location for the line pointer
- *                 force_redisplay - should we force this window to get 
- *                                   redisplayed?
- *     Returns: True if the thumb needs to be moved.
- */
-
-static Boolean
-ScrollVerticalText(
-Widget w,
-int new_line,
-Boolean force_redisp)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  int num_lines = sblw->scroll.num_visible_lines;
-  int max_lines, old_line;
-  Boolean move_thumb = FALSE;
-
-/*
- * Do not let the window extend out of bounds.
- */
-
-  if ( new_line < 0) {
-    new_line = 0;
-    move_thumb = TRUE;
-  }
-  else {
-    max_lines = sblw->scroll.lines - (int)w->core.height / sblw->scroll.font_height;
-    AssignMax(max_lines, 0);
-
-    if ( new_line > max_lines ) {
-      new_line = max_lines;
-      move_thumb = TRUE;
-    }
-  }
-
-/* 
- * If forced to redisplay then do a full redisplay and return.
- */
-
-  old_line = sblw->scroll.line_pointer;        
-  sblw->scroll.line_pointer = new_line;        /* Set current top of page. */
-
-  if (force_redisp) 
-    MoveAndClearText(w, 0, /* cause a full redisplay */ 0, 0);
-
-  if (new_line == old_line)
-    return(move_thumb);
-
-/*
- * Scroll forward.
- */
-
-  else if (new_line < old_line) {
-    int lines_to_scroll = old_line - new_line;
-    MoveAndClearText(w, 0, num_lines - lines_to_scroll, lines_to_scroll);
-  }
-
-/* 
- * Scroll back.
- */
-
-  else {
-    int lines_to_scroll = new_line - old_line;
-    MoveAndClearText(w, lines_to_scroll, num_lines - lines_to_scroll, 0);
-  }
-
-  return(move_thumb);
-}
-
-/*     Function Name: MoveAndClearText
- *     Description: Blits as much text as it can and clear the
- *                   remaining area with generate exposures TRUE.
- *     Arguments: w - the sbl widget.
- *                 old_y - the old y position.
- *                 height - height of area to move.
- *                 new_y - new y position.
- *     Returns: none
- */
-          
-static void
-MoveAndClearText(Widget w, int old_y, int height, int new_y)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  int from_left = sblw->scroll.indent + sblw->scroll.offset - 1;
-  int y_clear;
-
-  old_y *= sblw->scroll.font_height;
-  new_y *= sblw->scroll.font_height;
-  height *= sblw->scroll.font_height;
-
-/*
- * If we are already at the right location then do nothing.
- * (height == 0).
- *
- * If we have scrolled more than a screen height then just clear
- * the window.
- */
-
-  if (height <= sblw->scroll.font_height) { /* avoid rounding errors. */
-    XClearArea( XtDisplay(w), XtWindow(w), from_left, 0, 
-              (unsigned int) 0, (unsigned int) 0, FALSE);    
-    PaintText(w, 0, (int) sblw->core.height);
-    return;
-  }
-
-  if ((int)height + (int)old_y > (int)w->core.height)
-    height = w->core.height - old_y;
-
-  XCopyArea(XtDisplay(w), XtWindow(w), XtWindow(w), sblw->scroll.move_gc,
-           from_left, old_y, 
-           (unsigned int) w->core.width - from_left, (unsigned int) height,
-           from_left, new_y);
-
-  if (old_y > new_y)
-    height -= sblw->scroll.font_height/2;  /* clear 1/2 font of extra space,
-                                             to make sure we don't lose or
-                                             gain decenders. */
-  else
-    height -= sblw->scroll.font_height;  /* clear 1 font of extra space,
-                                           to make sure we don't overwrite
-                                           with a last line in buffer. */
-
-  if (old_y > new_y)
-    y_clear = height;
-  else
-    y_clear = 0;
-  
-/*
- * We cannot use generate exposures, since that may allow another move and
- * clear before the area get repainted, this would be bad.
- */
-
-  XClearArea( XtDisplay(w), XtWindow(w), from_left, y_clear,
-            (unsigned int) 0, (unsigned int) (w->core.height - height),
-            FALSE);
-  PaintText(w, (int) y_clear, (int) (w->core.height - height));
-}
-
-/*     Function Name: SetThumbHeight
- *     Description: Set the height of the thumb.
- *     Arguments: w - the sblw widget.
- *     Returns: none
- */
-
-static void
-SetThumbHeight(Widget w)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  float shown;
-
-  if (sblw->scroll.bar == NULL)
-    return;
-
-  if (sblw->scroll.lines == 0) 
-    shown = 1.0;
-  else
-    shown = (float) w->core.height / (float) (sblw->scroll.lines *
-                                             sblw->scroll.font_height);
-  if (shown > 1.0)
-    shown = 1.0;
-
-  XawScrollbarSetThumb( sblw->scroll.bar, (float) -1, shown );
-}
-
-/*     Function Name: SetThumb
- *     Description: Set the thumb location.
- *     Arguments: w - the sblw.
- *     Returns: none
- */
-
-static void
-SetThumb(Widget w)
-{
-  float location;
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-
-  if ( (sblw->scroll.lines == 0) || (sblw->scroll.bar == NULL) )
-    return;
-
-  location = (float) sblw->scroll.line_pointer / (float) sblw->scroll.lines; 
-  XawScrollbarSetThumb( sblw->scroll.bar, location , (float) -1 );
-}
-
-/*     Function Name: VerticalJump.
- *     Description: This function moves the test
- *                   as the vertical scroll bar is moved.
- *     Arguments: w - the scrollbar widget.
- *                 junk - not used.
- *                 percent - the position of the scrollbar.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-static void
-VerticalJump(Widget w, XtPointer junk, XtPointer percent_ptr)
-{
-  float percent = *((float *) percent_ptr);
-  int new_line;                        /* The new location for the line pointer. */
-  ScrollByLineWidget sblw = (ScrollByLineWidget) XtParent(w);
-
-  new_line = (int) ((float) sblw->scroll.lines * percent);
-  if (ScrollVerticalText( (Widget) sblw, new_line, FALSE))
-    SetThumb((Widget) sblw);
-}
-
-/*     Function Name: VerticalScroll
- *     Description: This function moves the postition of the interior window
- *                   as the vertical scroll bar is moved.
- *     Arguments: w - the scrollbar widget.
- *                 junk - not used.
- *                 pos - the position of the cursor.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-static void
-VerticalScroll(Widget w, XtPointer client_data, XtPointer call_data)
-{
-  int pos = (int)(long) call_data;
-  int new_line;                        /* The new location for the line pointer. */
-  ScrollByLineWidget sblw = (ScrollByLineWidget) XtParent(w);
-
-  new_line = sblw->scroll.line_pointer + (pos / sblw->scroll.font_height);
-  (void) ScrollVerticalText( (Widget) sblw, new_line, FALSE);
-  SetThumb( (Widget) sblw);
-}
-
-/* ARGSUSED */
-static void 
-Initialize(Widget req, Widget new, ArgList args, Cardinal *num_args)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) new;
-  unsigned long figWidth;
-  Atom atomNum;
-
-  sblw->scroll.top_line = NULL;
-  sblw->scroll.line_pointer = 0;
-  LoadFile(new);
-  sblw->scroll.bar = (Widget) NULL;
-
-  sblw->scroll.font_height = (sblw->scroll.normal_font->max_bounds.ascent + 
-                             sblw->scroll.normal_font->max_bounds.descent); 
-
-  atomNum = XInternAtom(XtDisplay(req), "FIGURE_WIDTH", False);
-
-  if (XGetFontProperty(sblw->scroll.normal_font, atomNum, &figWidth))
-    sblw->scroll.h_width = figWidth;
-  else
-    sblw->scroll.h_width = XTextWidth(sblw->scroll.normal_font, "$", 1);
-} /* Initialize. */
-
-/*     Function Name: CreateGCs
- *     Description: Creates the graphics contexts that we need. 
- *     Arguments: w - the sblw.
- *     Returns: none
- */
-
-static void
-CreateGCs(Widget w)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-
-  XtGCMask mask;
-  XGCValues values;
-
-  values.graphics_exposures = TRUE;
-  sblw->scroll.move_gc = XtGetGC(w, GCGraphicsExposures, &values);
-
-  mask = GCForeground | GCFont;
-  values.foreground = sblw->scroll.foreground;
-  
-  values.font = sblw->scroll.normal_font->fid;
-  sblw->scroll.normal_gc = XtGetGC(w, mask, &values);
-
-  values.font = sblw->scroll.italic_font->fid;
-  sblw->scroll.italic_gc = XtGetGC(w, mask, &values);
-
-  values.font = sblw->scroll.bold_font->fid;
-  sblw->scroll.bold_gc = XtGetGC(w, mask, &values);
-
-  values.font = sblw->scroll.symbol_font->fid;
-  sblw->scroll.symbol_gc = XtGetGC(w, mask, &values);
-}
-
-/*     Function Name: DestroyGCs
- *     Description: removes all gcs for this widget.
- *     Arguments: w - the widget.
- *     Returns: none
- */
-
-static void
-DestroyGCs(Widget w)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-
-  XtReleaseGC(w, sblw->scroll.normal_gc);
-  XtReleaseGC(w, sblw->scroll.bold_gc);
-  XtReleaseGC(w, sblw->scroll.italic_gc);
-  XtReleaseGC(w, sblw->scroll.move_gc);
-}
-
-static void
-Realize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-
-  CreateScrollbar(w);
-  CreateGCs(w);
-  Layout(w);
-  (*SuperClass->core_class.realize) (w, valueMask, attributes);
-  XtRealizeWidget(sblw->scroll.bar); /* realize scrollbar. */
-  XtMapWidget(sblw->scroll.bar); /* map scrollbar. */
-
-  XtAddEventHandler(w, 0, TRUE, GExpose, NULL); /* Get Graphics Exposures */
-} /* Realize */
-
-/*     Function Name: Destroy
- *     Description: Cleans up when we are killed.
- *     Arguments: w - the widget.
- *     Returns: none
- */
-
-static void
-Destroy(Widget w)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-
-  if (sblw->scroll.bar != NULL)
-    XtDestroyWidget(sblw->scroll.bar); /* Destroy scrollbar. */
-  if (sblw->scroll.file != NULL)
-    fclose(sblw->scroll.file);
-  DestroyGCs(w);
-}
-
-/*
- *
- * Set Values
- *
- */
-
-/* ARGSUSED */
-static Boolean 
-SetValuesHook(Widget w, ArgList args, Cardinal *num_args)
-{
-  Boolean ret = TRUE;
-  Cardinal i;
-
-  for (i = 0; i < *num_args; i++) {
-    if (strcmp(XtNfile, args[i].name) == 0) {
-      LoadFile(w);
-      ret = TRUE;
-    }
-  }
-
-/*
- * Changing anthing else will have strange effects, I don't need it so
- * I didn't code it.
- */
-
-  return(ret);
-
-} /* Set Values */
-
-/* 
- * A little design philosophy is probabally wise to include at this point.
- *
- * One of the things that I has hoped to achieve with xman is to make the
- * viewing of manpage not only easy for the nieve user, but also fast for
- * the experienced user, I wanted to be able to use it too.  To achieve this
- * I end up sacrificing a bit of start up time for the manual data structure.
- * As well as, the overhead of reading the entire file before putting it up 
- * on the display.  This is actually hardly even noticeable since most manual
- * pages are shots, one to two pages - the notable exception is of course csh,
- * but then that should be broken up anyway. 
- *
- * METHOD:
- *
- * I allocate a chunk of space that is the size of the file, plus a null for
- * debugging.  Then copiesthe file into this chunk of memory.  I then allocate
- * an array of char*'s that are assigned to the beginning of each line.  Yes,
- * this means that I have to read the file twice, and could probabally be more
- * clever about it, but once it is in memory the second read is damn fast.
- * There are a few obsucrities here about guessing the number of lines and
- * reallocing if I guess wrong, but other than that it is pretty straight 
- * forward.
- *
- *                                         Chris Peterson
- *                                         1/27/88
- */
-
-#define ADD_MORE_MEM 100       /* first guesses for allocations. */
-#define CHAR_PER_LINE 40
-
-/*     Function Name: LoadFile
- *     Description: Loads the current file into the internal memory.
- *     Arguments: w - the sblw.
- *     Returns: none
- */
-
-static void
-LoadFile(Widget w)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  FILE * file = sblw->scroll.file;
-
-  char *page;
-  char **line_pointer,**top_line; /* pointers to beginnings of the 
-                                    lines of the file. */
-  int nlines;                  /* the current number of allocated lines. */
-  struct stat fileinfo;                /* file information from fstat. */
-
-  if ( sblw->scroll.top_line != NULL) {
-    XtFree(*(sblw->scroll.top_line)); /* free characters. */
-    XtFree((char *)(sblw->scroll.top_line)); /* free lines. */
-  }
-  sblw->scroll.top_line = NULL;
-
-  if (file == NULL)
-    return;
-
-/*
- * Get file size and allocate a chunk of memory for the file to be 
- * copied into.
- */
-
-  if (fstat(fileno(file), &fileinfo))
-    XtAppError(XtWidgetToApplicationContext(w), 
-              "SBLW LoadFile: Failure in fstat.");
-
-/* 
- * Allocate a space for a list of pointer to the beginning of each line.
- */
-
-  if ( (nlines = fileinfo.st_size/CHAR_PER_LINE) == 0)
-    return;
-
-  page = XtMalloc(fileinfo.st_size + 1); /* leave space for the NULL */
-  top_line = line_pointer = (char**) XtMalloc( nlines * sizeof(char *) );
-
-/*
- * Copy the file into memory. 
- */
-
-  fseek(file, 0L, SEEK_SET);
-  if (fread(page, sizeof(char), fileinfo.st_size, file) == 0)
-    XtAppError(XtWidgetToApplicationContext(w), 
-              "SBLW LoadFile: Failure in fread.");
-
-
-/* put NULL at end of buffer. */
-
-  *(page + fileinfo.st_size) = '\0';
-
-/*
- * Go through the file setting a line pointer to the character after each 
- * new line.  If we run out of line pointer space then realloc that space
- * with space for more lines.
- */
-
-  *line_pointer++ = page;      /* first line points to first char in buffer.*/
-  while (*page != '\0') {
-
-    if ( *page == '\n' ) {
-      *line_pointer++ = page + 1;
-
-      if (line_pointer >= top_line + nlines) {
-       top_line = (char **) XtRealloc( (char *)top_line, (nlines +
-                                         ADD_MORE_MEM) * sizeof(char *) );
-       line_pointer = top_line + nlines;
-       nlines += ADD_MORE_MEM;
-      }
-    }
-    page++;
-  }
-   
-/*
- *  Realloc the line pointer space to take only the minimum amount of memory
- */
-
-  sblw->scroll.lines = nlines = line_pointer - top_line - 1;
-  top_line = (char **) XtRealloc((char *)top_line, nlines * sizeof(char *));
-
-/*
- * Store the memory pointers
- */
-
-  sblw->scroll.top_line = top_line;
-  sblw->scroll.line_pointer = 0;
-  SetThumbHeight(w);
-  SetThumb(w);
-}
-
-#define NLINES  66             /* This is the number of lines to wait until
-                                  we boldify the line again, this allows 
-                                  me to bold the first line of each page.*/
-#define BACKSPACE 010          /* I doubt you would want to change this. */
-
-#define NORMAL 0
-#define BOLD   1
-#define ITALIC 2
-#define SYMBOL 3
-#define WHICH(italic, bold)    ((bold) ? BOLD : ((italic) ? ITALIC : NORMAL))
-                               /* Choose BOLD over ITALICS.  If neither */
-                               /* is chosen, use NORMAL. */
-
-static int DumpText(Widget w, int x_loc, int y_loc, char * buf, int len, int format);
-static Boolean Boldify(char *);
-
-/*     Function Name: PrintText
- *     Description: This function actually prints the text.
- *     Arguments: w - the ScrollByLine widget.
- *                 start_line - line to start printing,
- *                 num_lines - the number of lines to print.
- *                 location - the location to print the text.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-
-static void
-PrintText(Widget w, int start_line, int num_lines, int location)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-
-  register char *bufp, *c;     /* Generic char pointers */
-  int current_line;            /* the number of the currrent line */
-  char buf[BUFSIZ];            /* Misc. characters */
-  Boolean italicflag = FALSE;  /* Print text in italics?? */
-  Boolean first = TRUE;                /* First line of a manual page??? */
-  int x_loc, y_loc;            /* x and y location of text. */
-
-/*
- * For table hack
- * To get columns to line up reasonably in most cases, make the
- * assumption that they were lined up using lots of spaces, where
- * lots is greater than two. Use a space width of 70% of the
- * widest character in the font.
- */
-  int h_col, h_fix;
-  char * h_c;
-
-/*
- * Nothing loaded, take no action.
- */
-
-  if (sblw->scroll.top_line == NULL || num_lines == 0)
-    return;
-
-  current_line = start_line;
-
-/* Set the first character to print at the first line. */
-
-  c = *(sblw->scroll.top_line + start_line);
-
-/*
- * Because XDrawString uses the bottom of the text as a position
- * reference, add the height from the top of the font to the baseline
- * to the ScollByLine position reference.
- */
-
-  y_loc = location + sblw->scroll.normal_font->max_bounds.ascent;
-
-/*
- * Ok, here's the more than mildly heuristic man page formatter.
- * We put chars into buf until either a font change or newline
- * occurs (at which time we flush it to the screen.)
- */
-
-
-  bufp = buf;
-  x_loc = sblw->scroll.offset + sblw->scroll.indent;
-  h_col = 0;
-  
-/*
- * A fix:
- * Assume that we are always starting to print on or before the
- * first line of a page, and then prove it if we aren't.
- */
-  for (h_fix = 1; h_fix <= (start_line % NLINES); h_fix++)
-    if (**(sblw->scroll.top_line + start_line - h_fix) != '\n')
-      {
-       first = FALSE;
-       break;
-      }
-
-  while(TRUE) {
-    if (current_line % NLINES == 0)
-      first = TRUE;
-
-/* 
- * Lets make sure that we do not run out of space in our buffer, making full
- * use of it is not critical since no window will be wide enough to display
- * nearly BUFSIZ characters.
- */
-
-    if ( (bufp - buf) > (BUFSIZ - 10) )
-      /* Toss everything until we find a <CR> or the end of the buffer. */
-      while ( (*c != '\n') && (*c != '\0') ) c++;
-
-    switch(*c) {
-
-    case '\0':               /* If we reach the end of the file then return */
-      DumpText(w, x_loc, y_loc, buf, bufp - buf, WHICH(italicflag, first));
-      return;
-
-    case '\n':
-      if (bufp != buf) {
-       Boolean bold;
-       *bufp = '\0';           /* for Boldify. */
-       bold = ( (first) || ((x_loc == (sblw->scroll.offset +
-                             sblw->scroll.indent)) && Boldify(buf)) );
-
-       (void) DumpText(w, x_loc, y_loc, buf, bufp - buf,
-                       WHICH(italicflag, bold));
-
-       if (bold)
-         first = FALSE;
-      }
-
-/* 
- * If we have painted the required number of lines then we should now return.
- */
-      if (++current_line == start_line + num_lines ) 
-       return;
-
-      bufp = buf;
-      italicflag = FALSE;
-      x_loc = sblw->scroll.offset + sblw->scroll.indent;
-      h_col = 0;
-      y_loc += sblw->scroll.font_height;
-      break;
-
-/*
- * This tab handling code is not very clever it moves the cursor over
- * to the next boundry of eight (8) spaces, as calculated in width just
- * before the printing loop started.
- */
-
-    case '\t':                 /* TAB */
-      x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf,
-                      WHICH(italicflag, first));
-      h_col += bufp - buf;
-      bufp = buf; 
-      italicflag = FALSE;
-      x_loc = sblw->scroll.offset + sblw->scroll.indent;
-      h_col = h_col + 8 - (h_col%8);
-      x_loc += sblw->scroll.h_width * h_col;
-      break;
-
-    case ' ':
-      h_c = c + 1;
-      while (*h_c == ' ') h_c++;
-
-      if (h_c - c < 4)
-       {
-         *bufp++ = *c;
-         break;
-       }
-
-      x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf,
-                      WHICH(italicflag, first));
-      h_col += bufp - buf;
-      bufp = buf; 
-      italicflag = FALSE;
-
-      x_loc = sblw->scroll.offset + sblw->scroll.indent; 
-      h_col += (h_c - c);
-      x_loc += sblw->scroll.h_width * h_col; 
-      c = h_c - 1;
-      break;
-
-    case '\033':               /* ignore esc sequences for now */
-      c++;                     /* should always be esc-x */
-      break;
-
-/* 
- * Overstrike code supplied by: cs.utexas.edu!ut-emx!clyde@rutgers.edu 
- * Since my manual pages do not have overstrike I couldn't test this.
- */
-
-    case BACKSPACE:            /* Backspacing for nroff bolding */
-      if (c[-1] == c[1] && c[1] != BACKSPACE) {        /* overstriking one char */
-        if (bufp > buf) {
-         bufp--;               /* Zap 1st instance of char to bolden */
-         x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf,
-                          WHICH(italicflag, FALSE));
-         h_col += bufp - buf;
-       }
-       bufp = buf;
-       *bufp++ = c[1];
-       x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf, BOLD);
-       h_col += bufp - buf;
-       bufp = buf;
-       first = FALSE;
-
-       /*
-        *     Nroff bolding looks like:
-        *               C\bC\bC\bCN...
-        * c points to ----^      ^
-        * it needs to point to --^
-        */
-       while (*c == BACKSPACE && c[-1] == c[1])
-         c += 2;
-       c--;            /* Back up to previous char */
-      }
-      else {
-       if ((c[-1] == 'o' && c[1] == '+')          /* Nroff bullet */
-           || (c[-1] == '+' && c[1] == 'o')) {    /* Nroff bullet */
-                               /* If we run into a bullet, print out */
-                               /* everything that's accumulated to this */
-                               /* point, then the bullet, then resume. */
-         if (bufp>buf) {
-           bufp--;
-           x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf,
-                            WHICH(italicflag, FALSE));
-           h_col += bufp - buf;
-         }
-         bufp = buf;
-         *bufp = (char)183;
-         x_loc = DumpText(w, x_loc, y_loc, buf, 1, SYMBOL);
-         h_col++;
-         c++;
-       }
-       else {          /* 'real' backspace - back up output ptr */
-         if (bufp>buf)
-           bufp--;
-       }
-      }
-      break;
-
-/* End of contributed overstrike code. */
-  
-   case '_':                   /* look for underlining [italicize] */
-      if(*(c + 1) == BACKSPACE) {
-       if(!italicflag) {       /* font change? */
-         if (bufp != buf) {
-           x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf, NORMAL);
-           h_col += bufp - buf;
-           bufp = buf;
-         }
-         italicflag = TRUE;
-       }
-       c += 2;
-       *bufp++ = *c;
-       break;
-      }
-      /* else fall through to default, because this was a real underscore. */
-
-    default:
-      if(italicflag) {                         /* font change? */
-       if (bufp != buf) {
-         x_loc = DumpText(w, x_loc, y_loc, buf, bufp - buf,
-                          WHICH(italicflag, FALSE));
-         h_col += bufp - buf;
-         bufp = buf;
-       }
-       italicflag = FALSE;
-      }
-      *bufp++ = *c;
-      break;
-    }
-    c++;
-  }
-}
-
-/*     Function Name: DumpText
- *     Description: Dumps text to the screen.
- *     Arguments: w - the widget.
- *                 x_loc - to dump text at.
- *                 y_loc - the y_location to draw_text.
- *                 buf - buffer to dump.
- *                 italic, bold, boolean that tells us which gc to use.
- *     Returns: x_location of the end of the text.
- */
-
-static int
-DumpText(Widget w, int x_loc, int y_loc, char * buf, int len, int format)
-{
-  ScrollByLineWidget sblw = (ScrollByLineWidget) w;
-  GC gc;
-  XFontStruct * font;
-
-  switch(format) {
-
-  case ITALIC:
-    gc = sblw->scroll.italic_gc;
-    font = sblw->scroll.italic_font;
-    break;
-
-  case BOLD:
-      gc = sblw->scroll.bold_gc;
-      font = sblw->scroll.bold_font;
-    break;
-
-  case SYMBOL:
-    gc = sblw->scroll.symbol_gc;
-    font = sblw->scroll.symbol_font;
-    break;
-
-  default:
-      gc = sblw->scroll.normal_gc;
-      font = sblw->scroll.normal_font;
-    break;
-    }
-
-  XDrawString(XtDisplay(w), XtWindow(w), gc, x_loc, y_loc, buf, len);
-  return(x_loc + XTextWidth(font, buf, len));
-}
-
-/*     Function Name: Boldify
- *     Description: look for keyword.
- *     Arguments: sp - string pointer.
- *     Returns: 1 if keyword else 0.
- */
-
-static Boolean
-Boldify(register char *sp)
-{
-  register char *sp_pointer;
-  int length,count;
-
-/* 
- * If there are not lower case letters in the line the assume it is a
- * keyword and boldify it in PrintManpage.
- */
-
-  length = strlen(sp);
-  for (sp_pointer = sp, count = 0; count < length; sp_pointer++,count++) 
-    if ( !isupper(*sp_pointer) && !isspace(*sp_pointer) )
-      return(0);
-  return(1);
-}
-
-#undef superclass
-#undef SuperClass
diff --git a/xman/ScrollByL.h b/xman/ScrollByL.h
deleted file mode 100644 (file)
index 0283893..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $XConsortium: ScrollByL.h,v 1.7 94/04/17 20:43:48 dave Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-#ifndef _XtScrollByLine_h
-#define _XtScrollByLine_h
-
-/***********************************************************************
- *
- * ScrollByLine Widget (subclass of Simple)
- *
- ***********************************************************************/
-
-/*
- * The default fonts.
- */
-
-#ifdef ATHENA
-#define MANPAGE_NORMAL   "fixed"
-#define MANPAGE_BOLD     "helvetica-bold12"
-#define MANPAGE_ITALIC   "helvetica-boldoblique12"
-#define MANPAGE_SYMBOL   "symbol-medium12"
-#else
-#define MANPAGE_NORMAL   "*-new century schoolbook-medium-r-normal--*-120-*"
-#define MANPAGE_BOLD     "*-new century schoolbook-bold-r-normal--*-120-*"
-#define MANPAGE_ITALIC   "*-new century schoolbook-bold-i-normal--*-120-*"
-#define MANPAGE_SYMBOL   "*-symbol-medium-r-normal--*-120-*"
-#endif /* ATHENA */
-
-#define XtNindent           "indent"
-#define XtNforceVert        "forceVert"
-#define XtNmanualFontNormal "manualFontNormal"
-#define XtNmanualFontBold   "manualFontBold"
-#define XtNmanualFontItalic "manualFontItalic"
-#define XtNmanualFontSymbol "manualFontSymbol"
-#define XtNNumTotalLines    "numTotalLines"
-#define XtNNumVisibleLines  "numVisibleLines"
-
-#define XtCIndent           "Indent"
-#define XtCNumTotalLines    "NumTotalLines"
-#define XtCNumVisibleLines  "NumVisibleLines"
-
-/* Class record constants */
-
-extern WidgetClass scrollByLineWidgetClass;
-
-typedef struct _ScrollByLineClassRec *ScrollByLineWidgetClass;
-typedef struct _ScrollByLineRec      *ScrollByLineWidget;
-
-#endif /* _XtScrollByLine_h --- DON'T ADD STUFF AFTER THIS LINE */
diff --git a/xman/ScrollByLP.h b/xman/ScrollByLP.h
deleted file mode 100644 (file)
index 25402d7..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/* $XConsortium: ScrollByLP.h,v 1.9 94/04/17 20:43:49 keith Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-
-#ifndef _XtScrollByLinePrivate_h
-#define _XtScrollByLinePrivate_h
-
-#include <X11/Xaw/SimpleP.h>
-
-#include "ScrollByL.h"
-
-/***********************************************************************
- *
- * ScrollByLine Widget Private Data
- *
- ***********************************************************************/
-
-/* New fields for the ScrollByLine widget class record */
-typedef struct {
-     int mumble;   /* No new procedures */
-} ScrollByLineClassPart;
-
-/* Full class record declaration */
-typedef struct _ScrollByLineClassRec {
-    CoreClassPart        core_class;
-    SimpleClassPart       simple_class;
-    ScrollByLineClassPart scrolled_widget_class;
-} ScrollByLineClassRec;
-
-extern ScrollByLineClassRec scrollByLineClassRec;
-
-/* New fields for the ScrollByLine widget record */
-typedef struct _ScrollByLinePart {
-  Pixel foreground;            /* The color for the forground of the text. */
-  Boolean force_vert,          /* Must have scrollbar visable */
-    use_right;                 /* put scroll bar on right side of window. */
-  FILE * file;                 /* The file to display. */
-  Dimension indent;            /* amount to indent the file. */
-  XFontStruct * bold_font,     /* The four fonts. */
-    * normal_font,
-    * italic_font,
-    * symbol_font;
-  int h_width;                 /* Main font width */
-  
-/* variables not in resource list. */
-
-  Widget bar;                  /* The scrollbar. */
-  int font_height;             /* the height of the font. */
-  int line_pointer;            /* The line that currently is at the top 
-                                  of the window being displayed. */
-  Dimension offset;            /* Drawing offset because of scrollbar. */
-  GC move_gc;                  /* GC to use when moving the text. */
-  GC bold_gc, normal_gc, italic_gc, symbol_gc; /* gc for drawing. */
-
-  char ** top_line;            /* The top line of the file. */
-  int lines;           /* Total number of line in the file. */
-  int num_visible_lines;  /* Number of lines visible */
-} ScrollByLinePart;
-
-/****************************************************************
- *
- * Full instance record declaration
- *
- ****************************************************************/
-
-typedef struct _ScrollByLineRec {
-    CorePart         core;
-    SimplePart        simple;
-    ScrollByLinePart  scroll;
-} ScrollByLineRec;
-
-#endif /* _XtScrollByLinePrivate_h --- DON'T ADD STUFF AFTER THIS LINE */
diff --git a/xman/app-defaults/Xman b/xman/app-defaults/Xman
deleted file mode 100644 (file)
index 3f08b02..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-*input:                                True
-
-*topBox:                       True
-*topBox.Title:                 Xman
-*topBox.IconName:              Xman
-
-*manualBrowser.Title:          Manual Page
-*manualBrowser.IconName:       Manual Page
-*manualBrowser.geometry:       600x600
-
-*manualFontBold:               -*-courier-bold-r-*-*-*-120-*-*-*-*-*-*
-*manualFontItalic:             -*-courier-medium-o-*-*-*-120-*-*-*-*-*-*
-*manualFontNormal:             -*-courier-medium-r-*-*-*-120-*-*-*-*-*-*
-*manualFontSymbol:             -*-symbol-*-*-*-*-*-120-*-*-*-*-*-*
-!*directoryFontNormal:         -*-courier-medium-r-*-*-*-120-*-*-*-*-*-*
-*directoryFontNormal:          -*-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*
-!*directoryFontNormal:         -*-lucida-bold-r-*-*-*-120-*-*-*-*-*-*
-
-!*SimpleMenu.BackingStore:     Always
-!*SimpleMenu.SaveUnder:                Off
-
-*horizPane.orientation:        horizontal
-*horizPane*showGrip:           False
-*horizPane.min:                        22
-*horizPane.max:                        22
-*topLabel.BorderWidth:         0
-*search*label.BorderWidth:     0
-
-*search*dialog*value:          Xman
-
-!*optionMenu.Label:            Options
-!*sectionMenu.Label:           Sections
-
-*horizPane*options.Label:      Options
-*horizPane*sections.Label:     Sections
-
-*helpButton.Label:             Help
-*helpButton.Tip:               Open help browser
-
-*quitButton.Label:             Quit
-*quitButton.Tip:               Quit Xman
-
-*manpageButton.Label:          Manual Page
-*manpageButton.Tip:            Open new manpage browser
-
-*topLabel.Label:               Manual Browser
-
-!*SimpleMenu*menuLabel*vertSpace: 100
-!*SimpleMenu*menuLabel*leftMargin: 20
-
-*displayDirectory.Label:       Display Directory 
-*displayManualPage.Label:      Display Manual Page
-*help.Label:                   Help
-*help.geometry:                        600x600
-*search.Label:                 Search
-*removeThisManpage.Label:      Remove This Manpage
-*help*removeThisManpage.Label: Remove Help
-*openNewManpage.Label:         Open New Manpage
-*showVersion.Label:            Show Version
-*quit.Label:                   Quit
-
-*pleaseStandBy*Label:          Formatting Manual Page, Please Stand By...
-
-*search*dialog.Label:          Type string to search for:
-*search*apropos.Label:         Apropos
-*search*manualPage.Label:      Manual Page
-*search*cancel.Label:          Cancel
-
-*likeToSave*dialog.Label:      Would you like to save this formatted Manual Page?
-*likeToSave*yes.Label:         Yes
-*likeToSave*no.Label:          No
-
-*translations:                 #override \
-               Ctrl<Key>q: Quit() \n\
-               Ctrl<Key>c: Quit() \n\
-               Ctrl<Key>n: CreateNewManpage() \n\
-               Ctrl<Key>h: PopupHelp() \n\
-               Ctrl<Key>s: PopupSearch()
-
-*help*Paned.manualPage.translations:#override \
-               Ctrl<Btn1Down>: \
-                       XawPositionSimpleMenu(optionMenu) \
-                       MenuPopup(optionMenu) \n\
-               Ctrl<Key>q: Quit() \n\
-               Ctrl<Key>c: Quit() \n\
-               Ctrl<Key>r: RemoveThisManpage() \n\
-               Ctrl<Key>n: CreateNewManpage() \n\
-               Ctrl<Key>h: PopupHelp() \n\
-               Ctrl<Key>d: GotoPage(Directory) \n\
-               Ctrl<Key>m: GotoPage(ManualPage) \n\
-               Ctrl<Key>v: ShowVersion() \n\
-               <Key>Prior: Page(Back) \n\
-               <Key>Next : Page(Forward) \n\
-               Shift<Btn4Down>,<Btn4Up>: Page(Line,-1) \n\
-               Shift<Btn5Down>,<Btn5Up>: Page(Line,1) \n\
-               Ctrl<Btn4Down>,<Btn4Up>: Page(Back) \n\
-               Ctrl<Btn5Down>,<Btn5Up>: Page(Forward) \n\
-               None<Btn4Down>,<Btn4Up>: Page(Line,-5) \n\
-               None<Btn5Down>,<Btn5Up>: Page(Line,5)
-
-*manualBrowser*manualPage.translations:  #override \
-               Ctrl<Btn1Down>: \
-                       XawPositionSimpleMenu(optionMenu) \
-                       MenuPopup(optionMenu) \n\
-               Ctrl<Btn2Down>: \
-                       XawPositionSimpleMenu(sectionMenu) \
-                       MenuPopup(sectionMenu) \n\
-               Shift<Btn2Down>,<Btn2Up>:GotoPage(Directory)\n\
-               Ctrl<Key>q: Quit() \n\
-               Ctrl<Key>c: Quit() \n\
-               Ctrl<Key>r: RemoveThisManpage() \n\
-               Ctrl<Key>n: CreateNewManpage() \n\
-               Ctrl<Key>h: PopupHelp() \n\
-               Ctrl<Key>d: GotoPage(Directory) \n\
-               Ctrl<Key>m: GotoPage(ManualPage) \n\
-               Ctrl<Key>v: ShowVersion() \n\
-               <Key>Prior: Page(Back) \n\
-               <Key>Next : Page(Forward) \n\
-               Shift<Btn4Down>,<Btn4Up>: Page(Line,-1) \n\
-               Shift<Btn5Down>,<Btn5Up>: Page(Line,1) \n\
-               Ctrl<Btn4Down>,<Btn4Up>: Page(Back) \n\
-               Ctrl<Btn5Down>,<Btn5Up>: Page(Forward) \n\
-               None<Btn4Down>,<Btn4Up>: Page(Line,-5) \n\
-               None<Btn5Down>,<Btn5Up>: Page(Line,5) \n\
-               Ctrl<Key>s: PopupSearch()
-
-!*manualBrowser*directory.background: Grey80
-*manualBrowser*directory.translations:   #override \
-               Ctrl<Btn1Down>: \
-                       XawPositionSimpleMenu(optionMenu) \
-                       MenuPopup(optionMenu) \n\
-               Ctrl<Btn2Down>: \
-                       XawPositionSimpleMenu(sectionMenu) \
-                       MenuPopup(sectionMenu) \n\
-               Shift<Btn2Down>,<Btn2Up>: GotoPage(Manpage) \n\
-               Ctrl<Key>q: Quit() \n\
-               Ctrl<Key>c: Quit() \n\
-               Ctrl<Key>r: RemoveThisManpage() \n\
-               Ctrl<Key>n: CreateNewManpage() \n\
-               Ctrl<Key>h: PopupHelp() \n\
-               Ctrl<Key>d: GotoPage(Directory) \n\
-               Ctrl<Key>m: GotoPage(ManualPage) \n\
-               Ctrl<Key>v: ShowVersion() \n\
-               Ctrl<Key>s: PopupSearch()
-
-*manualBrowser*search*manualPage.translations:         #augment \
-               <Btn1Down>,<Btn1Up>: Search(Manpage) reset()
-
-*manualBrowser*search*apropos.translations:            #augment \
-               <Btn1Down>,<Btn1Up>: Search(Apropos) reset()
-
-*manualBrowser*search*cancel*translations:     #augment \
-               <Btn1Down>,<Btn1Up>: Search(Cancel) reset()
-
-*manualBrowser*search*value*translations:              #override \
-               <Key>Return: Search(Manpage) \n\
-               Ctrl<Key>m:  Search(Manpage)
-
-*topBox*search*manualPage.translations:                #augment \
-               <Btn1Down>,<Btn1Up>: Search(Manpage, Open) reset()
-
-*topBox*search*apropos.translations:           #augment \
-               <Btn1Down>,<Btn1Up>: Search(Apropos, Open) reset()
-
-*topBox*search*cancel*translations:            #augment \
-               <Btn1Down>,<Btn1Up>: Search(Cancel, Open) reset()
-
-*topBox*search*value*translations:                     #override \
-               <Key>Return: Search(Manpage, Open) \n\
-               Ctrl<Key>m:  Search(Manpage, Open)
-
-*manualBrowser*likeToSave*yes.translations:    #override \
-               <Btn1Down>,<Btn1Up>: SaveFormattedPage(Save) reset() \n\
-               <Key>y:   SaveFormattedPage(Save) \n\
-               <Key>n:   SaveFormattedPage(Cancel) 
-
-*manualBrowser*likeToSave*no.translations:     #override \
-               <Btn1Down>,<Btn1Up>: SaveFormattedPage(Cancel) reset() \n\
-               <Key>y:   SaveFormattedPage(Save) \n\
-               <Key>n:   SaveFormattedPage(Cancel) 
-
-*manualBrowser*likeToSave*translations:        #override \
-               <Key>y:   SaveFormattedPage(Save) \n\
-               <Key>n:   SaveFormattedPage(Cancel) 
-
-*helpButton.translations:      #augment \
-               <Btn1Down>,<Btn1Up>: PopupHelp() reset()
-
-*quitButton.translations:      #augment \
-               <Btn1Down>,<Btn1Up>: Quit() reset()
-
-*manpageButton.translations: #augment \
-               <Btn1Down>,<Btn1Up>: CreateNewManpage() reset()
-
-! EOF.
diff --git a/xman/buttons.c b/xman/buttons.c
deleted file mode 100644 (file)
index ee251d3..0000000
+++ /dev/null
@@ -1,757 +0,0 @@
-/* $XConsortium: buttons.c,v 1.33 94/04/17 20:43:50 dave Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/buttons.c,v 1.3 2000/03/03 23:16:26 dawes Exp $ */
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   October 27, 1987
- */
-
-#include "globals.h"
-#include "vendor.h"
-
-/* The files with the icon bits in them. */
-
-#include "icon_open.h"
-#include "icon_help.h"
-#include "iconclosed.h"
-
-static void CreateOptionMenu(ManpageGlobals * man_globals, Widget parent);
-static void CreateSectionMenu(ManpageGlobals * man_globals, Widget parent);
-static void StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page);
-static Widget * ConvertNamesToWidgets(Widget parent, char ** names);
-
-/*     Function Name: MakeTopBox
- *     Description: This funtion creates the top menu, in a shell widget.
- *     Arguments: none.
- *     Returns: the top level widget
- */
-
-#define TOPARGS 5
-
-Widget top;                    /* needed in PopupWarning, misc.c */
-
-void
-MakeTopBox(void)
-{
-  Widget form, command, label; /* widgets. */
-  Arg arglist[TOPARGS];                /* An argument list */
-  Cardinal num_args = 0;       /* The number of arguments. */
-  ManpageGlobals * man_globals;
-  static char * full_size[] = {
-    "topLabel", MANPAGE_BUTTON, NULL
-  };
-  static char * half_size[] = {
-    HELP_BUTTON, QUIT_BUTTON, NULL
-  };
-  
-/* create the top icon. */
-
-  num_args = 0;
-  XtSetArg(arglist[num_args], XtNiconPixmap,
-          XCreateBitmapFromData( XtDisplay(initial_widget), 
-                                XtScreen(initial_widget)->root,
-                                (char *)iconclosed_bits, iconclosed_width,
-                                iconclosed_height));
-  num_args++;
-  XtSetArg(arglist[num_args], XtNtitle, resources.title);
-  num_args++;
-  XtSetArg(arglist[num_args], XtNiconic, resources.iconic);
-  num_args++;
-  top = XtCreatePopupShell(TOPBOXNAME, topLevelShellWidgetClass, 
-                          initial_widget, arglist, num_args);
-
-  form = XtCreateManagedWidget("form", formWidgetClass, top, 
-                              NULL, (Cardinal) 0);
-
-  label = XtCreateManagedWidget("topLabel", labelWidgetClass, form, 
-                              NULL, (Cardinal) 0);
-
-  num_args = 0;
-  XtSetArg(arglist[num_args], XtNfromVert, label); num_args++;
-  command = XtCreateManagedWidget(HELP_BUTTON, commandWidgetClass, form, 
-                                 arglist, num_args);
-
-  /* use same vertical as help widget. */
-  XtSetArg(arglist[num_args], XtNfromHoriz, command); num_args++;
-  command = XtCreateManagedWidget(QUIT_BUTTON, commandWidgetClass, form, 
-                                 arglist, num_args);
-
-  num_args = 0;
-  XtSetArg(arglist[num_args], XtNfromVert, command); num_args++;
-  command = XtCreateManagedWidget(MANPAGE_BUTTON, commandWidgetClass, form, 
-                                 arglist, num_args);
-
-  help_widget = NULL;          /* We have not seen the help yet. */
-
-  FormUpWidgets(form, full_size, half_size);
-
-  XtRealizeWidget(top);
-                               /* add WM_COMMAND property */
-  XSetCommand(XtDisplay(top), XtWindow(top), saved_argv, saved_argc);
-
-  man_globals = (ManpageGlobals*) XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals));
-  MakeSearchWidget(man_globals, top);
-  MakeSaveWidgets(man_globals, top);
-
-  SaveGlobals( (man_globals->This_Manpage = top), man_globals);
-  XtMapWidget(top);
-  AddCursor(top, resources.cursors.top);
-
-/*
- * Set up ICCCM delete window.
- */
-  XtOverrideTranslations
-      (top, XtParseTranslationTable ("<Message>WM_PROTOCOLS: Quit()"));
-  (void) XSetWMProtocols (XtDisplay(top), XtWindow(top),
-                         &wm_delete_window, 1);
-  
-
-}
-
-/*     Function Name: CreateManpage
- *     Description: Creates a new manpage.
- *     Arguments: none.
- *     Returns: none.
- */
-
-Widget
-CreateManpage(FILE * file)
-{
-  ManpageGlobals * man_globals;        /* The psuedo global structure. */
-
-  man_globals = InitPsuedoGlobals();
-  CreateManpageWidget(man_globals, MANNAME, TRUE);
-  
-  if (file == NULL)
-    StartManpage( man_globals, OpenHelpfile(man_globals), FALSE );
-  else {
-    OpenFile(man_globals, file);
-    StartManpage( man_globals, FALSE, TRUE);
-  }
-  return(man_globals->This_Manpage);
-}
-
-/*     Function Name: InitPsuedoGlobals
- *     Description: Initializes the psuedo global variables.
- *     Arguments: none.
- *     Returns: a pointer to a new pseudo globals structure.
- */
-
-ManpageGlobals * 
-InitPsuedoGlobals(void)
-{
-  ManpageGlobals * man_globals;
-
-  /*
-   * Allocate necessary memory. 
-   */
-
-  man_globals = (ManpageGlobals *)XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals));
-  if(!man_globals)
-    return NULL;
-
-  man_globals->search_widget = NULL;
-  man_globals->section_name = (char **) XtMalloc( (Cardinal) (sections *
-                                                             sizeof(char *)));
-  man_globals->manpagewidgets.box = (Widget *) XtCalloc( (Cardinal) sections,
-                                                   (Cardinal) sizeof(Widget));
-  
-  /* Initialize the number of screens that will be shown */
-
-  man_globals->both_shown = resources.both_shown_initial;
-  
-  return(man_globals);
-}
-  
-/*     Function Name: CreateManpageWidget
- *     Description: Creates a new manual page widget.
- *     Arguments: man_globals - a new man_globals structure.
- *                 name         - name of this shell widget instance.
- *                 full_instance - if true then create a full manpage,
- *                                 otherwise create stripped down version
- *                                 used for help.
- *     Returns: none
- */
-
-#define MANPAGEARGS 10
-
-void
-CreateManpageWidget(
-ManpageGlobals * man_globals,
-char * name,
-Boolean full_instance)
-{
-  Arg arglist[MANPAGEARGS];    /* An argument list for widget creation */
-  Cardinal num_args;           /* The number of arguments in the list. */
-  Widget mytop, pane, hpane, mysections;       /* Widgets */
-  ManPageWidgets * mpw = &(man_globals->manpagewidgets);
-
-  num_args = (Cardinal) 0;
-  XtSetArg(arglist[num_args], XtNwidth, default_width);
-  num_args++; 
-  XtSetArg(arglist[num_args], XtNheight, default_height);
-  num_args++; 
-
-  mytop = XtCreatePopupShell(name, topLevelShellWidgetClass, initial_widget,
-                          arglist, num_args);
-
-  man_globals->This_Manpage = mytop; /* pointer to root widget of Manualpage. */
-  num_args = 0;
-  if (full_instance)
-    XtSetArg(arglist[num_args], XtNiconPixmap,
-            XCreateBitmapFromData( XtDisplay(mytop), XtScreen(mytop)->root,
-                                  (char *)icon_open_bits, icon_open_width,
-                                  icon_open_height));
-  else 
-    XtSetArg(arglist[num_args], XtNiconPixmap,
-            XCreateBitmapFromData( XtDisplay(mytop), XtScreen(mytop)->root,
-                                  (char *)icon_help_bits, icon_help_width,
-                                  icon_help_height));
-  num_args++;
-  XtSetValues(mytop, arglist, num_args);
-
-  pane = XtCreateManagedWidget("vertPane", panedWidgetClass, mytop, NULL, 
-                              (Cardinal) 0);
-
-/* Create menu bar. */
-
-  hpane = XtCreateManagedWidget("horizPane", panedWidgetClass,
-                                 pane, NULL, (Cardinal) 0);
-  num_args = 0;
-  XtSetArg(arglist[num_args], XtNmenuName, OPTION_MENU); num_args++;
-  (void) XtCreateManagedWidget("options", menuButtonWidgetClass,
-                                 hpane, arglist, num_args);
-
-  CreateOptionMenu(man_globals, mytop);
-
-  num_args = 0;
-  XtSetArg(arglist[num_args], XtNmenuName, SECTION_MENU); num_args++;
-  mysections = XtCreateManagedWidget("sections", menuButtonWidgetClass,
-                                  hpane, arglist, num_args);
-
-  XtSetArg(arglist[0], XtNlabel, SHOW_BOTH);
-  XtSetValues(man_globals->both_screens_entry, arglist, (Cardinal) 1);
-
-  if (full_instance) {
-    MakeSearchWidget(man_globals, mytop);
-    CreateSectionMenu(man_globals, mytop);
-    MakeSaveWidgets(man_globals, mytop);
-  } else {
-    XtSetSensitive(mysections, FALSE);       
-    XtSetArg(arglist[0], XtNsensitive, FALSE);
-    XtSetValues(man_globals->dir_entry, arglist, ONE);
-    XtSetValues(man_globals->manpage_entry, arglist, ONE);
-    XtSetValues(man_globals->help_entry, arglist, ONE);
-    XtSetValues(man_globals->search_entry, arglist, ONE);
-    XtSetValues(man_globals->both_screens_entry, arglist, ONE);
-  }
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-  XtSetArg(arglist[0], XtNsensitive, True);
-  XtSetValues(man_globals->print_entry, arglist, ONE);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
-  man_globals->label = XtCreateManagedWidget("manualTitle", labelWidgetClass,
-                                            hpane, NULL, (Cardinal) 0);
-
-/* Create Directory */
-
-  if (full_instance) {
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNallowVert, TRUE);
-    num_args++;
-    
-    mpw->directory = XtCreateWidget(DIRECTORY_NAME, viewportWidgetClass,
-                                   pane, arglist, num_args);
-    
-    man_globals->current_directory = INITIAL_DIR;
-    MakeDirectoryBox(man_globals, mpw->directory,
-                    mpw->box + man_globals->current_directory, 
-                    man_globals->current_directory );
-    XtManageChild(mpw->box[man_globals->current_directory]);
-  }
-
-/* Create Manpage */
-
-  mpw->manpage = XtCreateWidget(MANUALPAGE, scrollByLineWidgetClass,
-                               pane, NULL, (Cardinal) 0);
-
-}
-
-/*     Function Name: StartManpage
- *     Description: Starts up a new manpage.
- *     Arguments: man_globals - the psuedo globals variable.
- *                 help - is this a help file?
- *                 page - Is there a page to display?
- *     Returns: none.
- */
-
-static void
-StartManpage(ManpageGlobals * man_globals, Boolean help, Boolean page)
-{
-  Widget dir = man_globals->manpagewidgets.directory;
-  Widget manpage = man_globals->manpagewidgets.manpage;
-  Widget label = man_globals->label;
-  Arg arglist[1];
-
-/* 
- * If there is a helpfile then put up both screens if both_show is set.
- */
-
-  if (page || help) {
-    if (help) 
-      strcpy(man_globals->manpage_title, "Xman Help");
-
-    if (man_globals->both_shown) {
-      XtManageChild(dir);
-      man_globals->dir_shown = TRUE;
-
-      XtSetArg(arglist[0], XtNpreferredPaneSize, resources.directory_height);
-      XtSetValues(dir, arglist, (Cardinal) 1);
-
-      XtSetArg(arglist[0], XtNsensitive, FALSE);
-      XtSetValues(man_globals->manpage_entry, arglist, ONE);
-      XtSetValues(man_globals->dir_entry, arglist, ONE);
-
-      XtSetArg(arglist[0], XtNlabel, SHOW_ONE);
-      XtSetValues(man_globals->both_screens_entry, arglist, ONE);
-      ChangeLabel(label,
-                 man_globals->section_name[man_globals->current_directory]);
-    }
-    else {
-      ChangeLabel(label,man_globals->manpage_title);
-    }
-    XtManageChild(manpage);
-    man_globals->dir_shown = FALSE;
-  }
-/*
- * Since There is file to display, put up directory and do not allow change
- * to manpage, show both, or help.
- */
-  else {                       
-    XtManageChild(dir);
-    man_globals->dir_shown = TRUE;
-    XtSetArg(arglist[0], XtNsensitive, FALSE);
-    XtSetValues(man_globals->manpage_entry,        arglist, ONE);
-    XtSetValues(man_globals->help_entry,           arglist, ONE);
-    XtSetValues(man_globals->both_screens_entry,   arglist, ONE);
-    man_globals->both_shown = FALSE;
-    ChangeLabel(label,
-               man_globals->section_name[man_globals->current_directory]);
-  }
-
-/*
- * Start 'er up, and change the cursor.
- */
-
-  XtRealizeWidget( man_globals->This_Manpage );
-  SaveGlobals( man_globals->This_Manpage, man_globals);
-  XtMapWidget( man_globals->This_Manpage );
-  AddCursor( man_globals->This_Manpage, resources.cursors.manpage);
-  XtSetArg(arglist[0], XtNtransientFor, man_globals->This_Manpage);
-  XtSetValues(XtParent(man_globals->standby), arglist, (Cardinal)1);
-  XtSetValues(XtParent(man_globals->save), arglist, (Cardinal) 1);
-  XtRealizeWidget(XtParent(man_globals->standby));
-  XtRealizeWidget(XtParent(man_globals->save));
-  AddCursor( XtParent(man_globals->standby), resources.cursors.top);
-  AddCursor( XtParent(man_globals->save), resources.cursors.top);
-
-/*
- * Set up ICCCM delete window.
- */
-  XtOverrideTranslations
-      (man_globals->This_Manpage, 
-       XtParseTranslationTable ("<Message>WM_PROTOCOLS: RemoveThisManpage()"));
-  (void) XSetWMProtocols (XtDisplay(man_globals->This_Manpage),
-                         XtWindow(man_globals->This_Manpage),
-                         &wm_delete_window, 1);
-
-}
-
-/*      Function Name: MenuDestroy
- *      Description: free's data associated with menu when it is destroyed.
- *      Arguments: w - menu widget.
- *                 free_me - data to free.
- *                 junk - not used.
- *      Returns: none.
- */
-
-/* ARGSUSED */
-static void
-MenuDestroy(Widget w, XtPointer free_me, XtPointer junk)
-{
-  XtFree( (char *) free_me);
-}
-
-/*      Function Name:   CreateOptionMenu
- *      Description: Create the option menu.
- *      Arguments: man_globals - the manual page globals.
- *                 parent - the button that activates the menu.
- *      Returns: none.
- */
-
-static void
-CreateOptionMenu(ManpageGlobals * man_globals, Widget parent)
-{
-  Widget menu, entry;
-  int i;
-  static char * option_names[] = {     /* Names of the buttons. */
-    DIRECTORY,
-    MANPAGE,
-    HELP,
-    SEARCH,
-    BOTH_SCREENS, 
-    REMOVE_MANPAGE,
-    OPEN_MANPAGE,
-#ifdef INCLUDE_XPRINT_SUPPORT
-    PRINT_MANPAGE,
-#endif /* INCLUDE_XPRINT_SUPPORT */
-    SHOW_VERSION,
-    QUIT
-  };
-
-  menu = XtCreatePopupShell(OPTION_MENU, simpleMenuWidgetClass, parent,
-                           NULL, (Cardinal) 0);
-  man_globals->option_menu = menu;
-  
-  for (i = 0 ; i < NUM_OPTIONS ; i++) {
-    entry = XtCreateManagedWidget(option_names[i], smeBSBObjectClass,
-                                 menu, NULL, ZERO);
-    XtAddCallback(entry, XtNcallback, OptionCallback, (caddr_t) man_globals);
-    switch (i) {
-    case 0:
-       man_globals->dir_entry = entry;
-       break;
-    case 1:
-       man_globals->manpage_entry = entry;
-       break;
-    case 2:
-       man_globals->help_entry = entry;
-       break;
-    case 3:
-       man_globals->search_entry = entry;
-       break;
-    case 4:
-       man_globals->both_screens_entry = entry;
-       break;
-    case 5:
-       man_globals->remove_entry = entry;
-       break;
-    case 6:
-       man_globals->open_entry = entry;
-       break;
-#ifdef INCLUDE_XPRINT_SUPPORT
-    case 7:
-       man_globals->print_entry = entry;
-       break;
-    case 8:
-       man_globals->version_entry = entry;
-       break;
-    case 9:
-       man_globals->quit_entry = entry;
-       break;
-#else /* !INCLUDE_XPRINT_SUPPORT */
-    case 7:
-       man_globals->version_entry = entry;
-       break;
-    case 8:
-       man_globals->quit_entry = entry;
-       break;
-#endif /* !INCLUDE_XPRINT_SUPPORT */
-    default:
-        Error(("CreateOptionMenu: Unknown id=%d\n", i));
-       break;
-    }
-  }
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-  XtVaSetValues(man_globals->print_entry, XtNsensitive, FALSE, NULL);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-}
-
-/*      Function Name: CreateSectionMenu
- *      Description: Create the Section menu.
- *      Arguments: man_globals - the manual page globals.
- *                 parent - the button that activates the menu.
- *      Returns: none.
- */
-
-static void
-CreateSectionMenu(ManpageGlobals * man_globals, Widget parent)
-{
-  Widget menu, entry;
-  int i;
-  MenuStruct * menu_struct;
-  Arg args[1];
-  Cardinal num_args;
-  char entry_name[BUFSIZ];
-
-  menu = XtCreatePopupShell(SECTION_MENU, simpleMenuWidgetClass, parent,
-                           NULL, (Cardinal) 0);
-
-  for (i = 0 ; i < sections ; i ++) {
-    num_args = 0;
-    XtSetArg(args[num_args], XtNlabel, manual[i].blabel); num_args++;
-    sprintf(entry_name, "section%d", i);
-      
-    entry = XtCreateManagedWidget(entry_name, smeBSBObjectClass,
-                                 menu, args, num_args);
-    menu_struct = (MenuStruct *) XtMalloc(sizeof(MenuStruct));
-    menu_struct->data = (caddr_t) man_globals;
-    menu_struct->number = i;
-    XtAddCallback(entry, XtNcallback, DirPopupCallback, (caddr_t) menu_struct);
-    XtAddCallback(entry, XtNdestroyCallback,MenuDestroy, (caddr_t)menu_struct);
-
-  }
-}
-
-/*     Function Name: CreateList
- *     Description: this function prints a label in the directory list
- *     Arguments: section - the manual section.
- *     Returns: none
- */
-
-static char **
-CreateList(int section)
-{
-  char ** ret_list, **current;
-  int count;
-
-  ret_list = (char **) XtMalloc( (manual[section].nentries + 1) * 
-                                  sizeof (char *));
-
-  for (current = ret_list, count = 0 ; count < manual[section].nentries ;
-       count++, current++)
-    *current = CreateManpageName(manual[section].entries[count], section,
-                                manual[section].flags);
-  *current = NULL;             /* NULL terminate the list. */
-  return(ret_list);
-}
-
-/*     Function Name: MakeDirectoryBox
- *     Description: make a directory box.
- *     Arguments: man_globals - the psuedo global structure for each manpage.
- *                 parent - this guys parent widget.
- *                 dir_disp - the directory display widget.
- *                 section - the section number.
- *     Returns: none.
- */
-
-void
-MakeDirectoryBox(ManpageGlobals *man_globals, Widget parent, Widget *dir_disp, int section)
-{
-  Arg arglist[10];
-  Cardinal num_args;
-  char * name, label_name[BUFSIZ];
-
-  if (*dir_disp != NULL)       /* If we have one, don't make another. */
-    return;
-
-  name = manual[section].blabel;   /* Set the section name */
-  sprintf(label_name,"Directory of: %s",name);
-  man_globals->section_name[section] = StrAlloc(label_name);
-
-  num_args = 0;
-  XtSetArg(arglist[num_args], XtNlist, CreateList(section));
-  num_args++;
-  XtSetArg(arglist[num_args], XtNfont, resources.fonts.directory);
-  num_args++;
-  
-  *dir_disp = XtCreateWidget(DIRECTORY_NAME, listWidgetClass, parent,
-                            arglist, num_args);
-  
-  XtAddCallback(*dir_disp, XtNcallback,
-               DirectoryHandler, (caddr_t) man_globals);
-}
-
-/*     Function Name: MakeSaveWidgets.
- *     Description: This functions creates two popup widgets, the please 
- *                   standby widget and the would you like to save widget.
- *     Arguments: man_globals - the psuedo globals structure for each man page
- *                 parent - the realized parent for both popups.
- *     Returns: none.
- */
-
-void
-MakeSaveWidgets(ManpageGlobals *man_globals, Widget parent)
-{
-  Widget shell, dialog; /* misc. widgets. */
-  Arg warg[1];
-  Cardinal n = 0;
-
-/* make the please stand by popup widget. */
-  if (XtIsRealized(parent)) {
-      XtSetArg(warg[0], XtNtransientFor, parent);      n++;
-  }
-  shell = XtCreatePopupShell( "pleaseStandBy", transientShellWidgetClass,
-                             parent, warg, (Cardinal) n);
-
-  man_globals->standby = XtCreateManagedWidget("label", labelWidgetClass, 
-                                              shell, NULL, (Cardinal) 0);
-
-  man_globals->save = XtCreatePopupShell("likeToSave",
-                                        transientShellWidgetClass,
-                                        parent, warg, n);
-
-  dialog = XtCreateManagedWidget("dialog", dialogWidgetClass, 
-                                man_globals->save, NULL, (Cardinal) 0);
-
-  XawDialogAddButton(dialog, FILE_SAVE, NULL, NULL);
-  XawDialogAddButton(dialog, CANCEL_FILE_SAVE, NULL, NULL);
-
-  if (XtIsRealized(parent)) {
-      XtRealizeWidget(shell);
-      AddCursor(shell,resources.cursors.top);
-      XtRealizeWidget(man_globals->save);
-      AddCursor(man_globals->save, resources.cursors.top);
-  }
-}
-
-/*      Function Name: FormUpWidgets
- *      Description: Sizes widgets to look nice.
- *      Arguments: parent - the common parent of all the widgets.
- *                 full_size - array of widget names that will he full size.
- *                 half_size - array of widget names that will he half size.
- *      Returns: none
- */
-
-void
-FormUpWidgets(Widget parent, char ** full_size, char ** half_size)
-{
-  Widget * full_widgets, * half_widgets, *temp, long_widget;
-  Dimension longest, length, b_width;
-  int interior_dist;
-  Arg arglist[2];
-    
-  full_widgets = ConvertNamesToWidgets(parent, full_size);
-  half_widgets = ConvertNamesToWidgets(parent, half_size);
-  
-  long_widget = NULL;
-  longest = 0;
-  XtSetArg(arglist[0], XtNwidth, &length);
-  XtSetArg(arglist[1], XtNborderWidth, &b_width);
-
-/*
- * Find Longest widget.
- */
-
-  for ( temp = full_widgets ; *temp != (Widget) NULL ; temp++) {
-    XtGetValues(*temp, arglist, (Cardinal) 2);
-    length += 2 * b_width;
-    if (length > longest) {
-      longest = length;
-      long_widget = *temp;
-    }
-  }
-
-  if (long_widget == (Widget) NULL) {          /* Make sure we found one. */
-    PopupWarning(GetGlobals(parent), 
-                "Could not find longest widget, aborting...");
-    XtFree((char *)full_widgets);
-    XtFree((char *)half_widgets);
-    return;
-  }
-
-/*
- * Set all other full_widgets to this length.
- */
-
-  for ( temp = full_widgets ; *temp != (Widget) NULL ; temp++ )
-    if ( long_widget != *temp) {
-      Dimension width, border_width;
-
-      XtSetArg(arglist[0], XtNborderWidth, &border_width);
-      XtGetValues(*temp, arglist, (Cardinal) 1);
-    
-      width = longest - 2 * border_width;
-      XtSetArg(arglist[0], XtNwidth, width);
-      XtSetValues(*temp, arglist, (Cardinal) 1);
-    }
-
-/*
- * Set all the half widgets to the right length.
- */
-
-  XtSetArg(arglist[0], XtNdefaultDistance, &interior_dist);
-  XtGetValues(parent, arglist, (Cardinal) 1);
-  
-  for ( temp = half_widgets ; *temp != (Widget) NULL ; temp++) {
-    Dimension width, border_width;
-
-    XtSetArg(arglist[0], XtNborderWidth, &border_width);
-    XtGetValues(*temp, arglist, (Cardinal) 1);
-    
-    width = (int)(longest - interior_dist)/2 - 2 * border_width;
-    XtSetArg(arglist[0], XtNwidth, width);
-    XtSetValues(*temp, arglist, (Cardinal) 1);
-  }
-
-  XtFree((char *)full_widgets);
-  XtFree((char *)half_widgets);
-}
-  
-/*      Function Name: ConvertNamesToWidgets
- *      Description: Convers a list of names into a list of widgets.
- *      Arguments: parent - the common parent of these widgets.
- *                 names - an array of widget names.
- *      Returns: an array of widget id's.
- */
-
-static Widget *
-ConvertNamesToWidgets(Widget parent, char ** names)
-{
-  char ** temp;
-  Widget * ids, * temp_ids;
-  int count;
-
-  for (count = 0, temp = names; *temp != NULL ; count++, temp++);
-
-  ids = (Widget *) XtMalloc( (count + 1) * sizeof(Widget));
-
-  
-  for ( temp_ids = ids; *names != NULL ; names++, temp_ids++) {
-    *temp_ids = XtNameToWidget(parent, *names);
-    if (*temp_ids == NULL) {
-      char error_buf[BUFSIZ];
-    
-      sprintf(error_buf, "Could not find widget named '%s'", *names);
-      PrintError(error_buf);
-      XtFree((char *)ids);
-      return(NULL);
-    }
-  }
-  
-  *temp_ids = (Widget) NULL;
-  return(ids);
-}
diff --git a/xman/configure.ac b/xman/configure.ac
deleted file mode 100644 (file)
index 619b033..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-
-dnl  Copyright 2005 Red Hat, Inc.
-dnl 
-dnl  Permission to use, copy, modify, distribute, and sell this software and its
-dnl  documentation for any purpose is hereby granted without fee, provided that
-dnl  the above copyright notice appear in all copies and that both that
-dnl  copyright notice and this permission notice appear in supporting
-dnl  documentation, and that the name of Red Hat not be used in
-dnl  advertising or publicity pertaining to distribution of the software without
-dnl  specific, written prior permission.  Red Hat makes no
-dnl  representations about the suitability of this software for any purpose.  It
-dnl  is provided "as is" without express or implied warranty.
-dnl 
-dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-dnl  PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Process this file with autoconf to create configure.
-
-AC_PREREQ([2.57])
-AC_INIT(xman, [1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xman)
-AM_INIT_AUTOMAKE([dist-bzip2])
-AM_MAINTAINER_MODE
-
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
-m4_ifndef([XORG_MACROS_VERSION],
-         [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
-
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_CANONICAL_HOST
-
-XORG_DEFAULT_OPTIONS
-
-AC_CHECK_FUNC([mkstemp], 
-   AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.]))
-
-AC_ARG_WITH(helpdir,
-        AC_HELP_STRING([--with-helpdir=<path>],
-                       [Set default directory for xman.help (default: ${datadir}/X11)]),
-        [HELPDIR="$withval"],
-        [HELPDIR=${datadir}/X11])
-AC_SUBST([HELPDIR])
-
-AC_ARG_WITH(sysmanpath,
-        AC_HELP_STRING([--with-sysmanpath=<path>],
-                       [Set default system man page search path]),
-        [SYSMANPATH="$withval"], [])
-if test x$SYSMANPATH != x; then
-    AC_DEFINE_UNQUOTED(SYSMANPATH, "$SYSMANPATH", 
-       [Default system man page search path (default: none)])
-fi
-
-AC_ARG_WITH(localmanpath,
-        AC_HELP_STRING([--with-localmanpath=<path>],
-                       [Set default local man page search path]),
-        [LOCALMANPATH="$withval"], [])
-if test x$LOCALMANPATH != x; then
-    AC_DEFINE_UNQUOTED(LOCALMANPATH, "$LOCALMANPATH", 
-       [Default local man page search path (default: none)])
-fi
-
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XMAN, xaw7)
-
-AC_ARG_WITH(manconfig,
-        AC_HELP_STRING([--with-manconfig=<filename>],
-                       [Set default system man configuration file]),
-        [MANCONF="$withval"], [])
-if test x$MANCONF = x; then
-# Check for man page config files
-    AC_CHECK_FILE([/etc/man.conf], [MANCONF="/etc/man.conf"], 
-                  AC_CHECK_FILE([/etc/man.config], [MANCONF="/etc/man.config"], 
-                                AC_CHECK_FILE([/etc/manpath.config], [MANCONF="/etc/manpath.config"],
-                                              AC_CHECK_FILE([/usr/share/misc/man.conf], [MANCONF="/usr/share/misc/man.conf"]))))
-fi
-
-if test x$MANCONF != x ; then
-    AC_DEFINE_UNQUOTED(MANCONF, "$MANCONF", 
-       [Define to path to man config file if you have one])
-
-    # Try to determine format of config file
-    # would be better to somehow determine from the files themselves, but
-    # we'll guess based on pathname and OS for now (mirrors old Imake tests)
-    AC_MSG_CHECKING([man config file format])
-    if test x$MANCONF = x/etc/manpath.config ; then
-       MAN_CONFIG_STYLE="FreeBSD"
-    else
-       case $host_os in
-       *darwin* | *openbsd* | *netbsd* )
-           MAN_CONFIG_STYLE="OpenBSD"
-           ;;
-       *linux* | cygwin* )
-           MAN_CONFIG_STYLE="Linux"
-           ;;
-       *bsd* )
-           MAN_CONFIG_STYLE="BSD"
-           ;;
-       *)
-           ;;
-       esac
-    fi
-    AC_MSG_RESULT($MAN_CONFIG_STYLE)
-
-    case $MAN_CONFIG_STYLE in
-       FreeBSD)
-           AC_DEFINE([MANCONFIGSTYLE_FreeBSD],1,
-               [Define to 1 if you have FreeBSD format manpath.config])
-           ;;
-       OpenBSD)
-           AC_DEFINE([MANCONFIGSTYLE_OpenBSD],1,
-               [Define to 1 if you have OpenBSD format manpath.config])
-           ;;
-       BSD)
-           AC_DEFINE([MANCONFIGSTYLE_BSD],1,
-               [Define to 1 if you have BSD format manpath.config])
-           ;;
-       Linux)
-           AC_DEFINE([MANCONFIGSTYLE_Linux],1,
-               [Define to 1 if you have Linux format man.conf or man.config])
-           ;;
-       *)
-           AC_MSG_ERROR([Could not determine man page file config format.])
-    esac
-fi
-AC_SUBST(XMAN_CFLAGS)
-AC_SUBST(XMAN_LIBS)
-
-PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-AC_ARG_WITH(appdefaultdir,
-       AC_HELP_STRING([--with-appdefaultdir=<pathname>],
-         [specify directory for app-defaults files (default is autodetected)]),
-       [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
-AC_SUBST(appdefaultdir)
-
-AC_OUTPUT([Makefile])
diff --git a/xman/defs.h b/xman/defs.h
deleted file mode 100644 (file)
index ec4d068..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/* $XConsortium: defs.h,v 1.25 94/04/17 20:43:50 converse Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/defs.h,v 1.2 2000/03/03 23:16:26 dawes Exp $ */
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   October 22, 1987
- */
-
-#ifndef HELPFILE
-#define HELPFILE "/usr/lib/X11/xman.help" /* name of the default helpfile. */ 
-#endif
-
-/* The default cursors */
-
-#define XMAN_CURSOR "left_ptr"         /* Top level cursor. */
-#define HELP_CURSOR "left_ptr"         /* The help cursor. */
-#define MANPAGE_CURSOR "left_ptr"      /* The manpage cursor. */
-#define SEARCH_ENTRY_CURSOR "question_arrow"   /* The search text widget
-                                                  cursor. */
-#define DIRECTORY_NORMAL "fixed" /* The default dir font */
-
-#define OPTION_MENU "optionMenu" /* Name of the Option Menu. */
-#define SECTION_MENU "sectionMenu" /* Name of the Section Menu. */
-
-#define HELP_BUTTON "helpButton" /* Name of top help button */
-#define QUIT_BUTTON "quitButton" /* Name of top quit button */
-#define MANPAGE_BUTTON "manpageButton" /* Name of top manpage button */
-
-#define TOPBOXNAME  "topBox"   /* Name of the Top Box. */
-#define MANNAME "manualBrowser"        /* name for each manual page widget. */
-#define SEARCHNAME "search" /* The name for the search widget. */
-#define HELPNAME  "help"       /* The name of the help widget. */
-#define DIRECTORY_NAME "directory" /* name of the directory widget. */
-#define MANUALPAGE "manualPage"        /* name of the Scrollbyline widget that
-                                contains the man page. */
-#define DIALOG         "dialog"
-
-/* Names of the menu buttons */
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-#define NUM_OPTIONS 10         /* Number of menu options. */
-#else /* !INCLUDE_XPRINT_SUPPORT */
-#define NUM_OPTIONS 9          /* Number of menu options. */
-#endif /* !INCLUDE_XPRINT_SUPPORT */
-
-#define DIRECTORY      "displayDirectory"
-#define MANPAGE        "displayManualPage"
-#define HELP           "help"
-#define SEARCH         "search"
-#define BOTH_SCREENS   "showBothScreens"
-#define REMOVE_MANPAGE "removeThisManpage"
-#define OPEN_MANPAGE   "openNewManpage"
-#ifdef INCLUDE_XPRINT_SUPPORT
-#define PRINT_MANPAGE  "printManualPage"
-#endif /* INCLUDE_XPRINT_SUPPORT */
-#define SHOW_VERSION   "showVersion"
-#define QUIT           "quit"
-
-/* definitions of string to use for show both and show one. */
-
-#define SHOW_BOTH "Show Both Screens"
-#define SHOW_ONE "Show One Screen"
-
-/* 
- * Things will not look right if you change these names to make 
- * MANUALSEARCH longer APROPOSSEARCH, see search.c for details.
- */
-
-#define MANUALSEARCH "manualPage"
-#define APROPOSSEARCH "apropos"
-#define CANCEL "cancel"
-
-#define MANUAL 0
-#define APROPOS 1
-
-#define NO_SECTION_DEFAULTS ("no default sections")
-
-/*
- * Define HANDLE_ROFFSEQ to enable parsing of '\" <string>
- * sequences in source files to set the format pipeline.
- * This is necessary because the default pipeline causes incorrect
- * display of ascii(7) on Linux.
- * This depends on GNU roff.
- */
-#ifdef HAS_GROFF
-#define HANDLE_ROFFSEQ
-#endif
-
-#define DEFAULT_WIDTH 500      /* The default width of xman. */
-#define SECTALLOC  8           /* The number of entries allocated
-                                  at a time for the manual structures. */
-#define ENTRYALLOC 100         /* The number of entries allocated
-                                  at a time for a section. */
-
-#define INITIAL_DIR 0          /* The Initial Directory displayed. */
-
-#define COPY "cp"              /* copy command */
-#define CHMOD_MODE 00666       /* permissions set on saved formatted files */
-#define MANDESC "mandesc"      /* name of the mandesc files */
-
-#define INDENT 15
-#define TYP20STR "MMMMMMMMMMMMMMMMMMMM"
-
-#define FILE_SAVE "yes"
-#define CANCEL_FILE_SAVE "no"
-#define MANTEMP "/tmp/xmanXXXXXX"
-
-/*
- * Macro Definitions.
- */
-
-#define streq(a, b)        ( strcmp((a), (b)) == 0 )
-
-/* 
- * Function definitions moved to man.h
- */
diff --git a/xman/globals.h b/xman/globals.h
deleted file mode 100644 (file)
index abbf66d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $XConsortium: globals.h,v 1.9 94/04/17 20:43:51 dave Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86$ */
-
-#ifndef _globals_h
-#define _globals_h
-
-#include "man.h"
-
-extern Xman_Resources resources;       /* Resource manager sets these. */
-
-/* bookkeeping global variables. */
-
-extern Widget help_widget;             /* The help widget. */
-
-extern int default_height,default_width; /* Approximately the default with and
-                                           height, of the manpage when shown,
-                                           the the top level manual page 
-                                           window */
-extern int man_pages_shown;            /* The current number of manual
-                                          pages being shown, if 0 we exit. */
-
-extern Manual * manual;                        /* The manual structure. */
-extern int sections;                   /* The number of manual sections. */
-
-extern XContext manglobals_context;    /* The context for man_globals. */
-
-extern Widget initial_widget;        /* The initial widget, never realized. */
-
-extern char **saved_argv;
-extern int saved_argc;
-
-extern Atom wm_delete_window;
-
-extern Widget top;
-
-#endif /* _globals_h */
diff --git a/xman/handler.c b/xman/handler.c
deleted file mode 100644 (file)
index 497a768..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
-/* $XConsortium: handler.c,v 1.22 94/12/16 21:36:53 gildea Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/handler.c,v 1.6 2003/01/19 04:44:45 paulo Exp $ */
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   October 29, 1987
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "globals.h"
-#include "vendor.h"
-#ifdef INCLUDE_XPRINT_SUPPORT
-#include "printdialog.h"
-#include "print.h"
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
-static void PutUpManpage(ManpageGlobals * man_globals, FILE * file);
-static void ToggleBothShownState(ManpageGlobals * man_globals);
-
-/*     Function Name: OptionCallback
- *     Description: This is the callback function for the callback menu.
- *     Arguments: w - the widget we are calling back from. 
- *                 globals_pointer - a pointer to the psuedo globals structure
- *                                  for this manpage.
- *                 junk - (call data) not used.
- *     Returns: none.
- */
-
-/*ARGSUSED*/
-void
-OptionCallback(Widget w, XtPointer pointer, XtPointer junk)
-{
-  ManpageGlobals * man_globals = (ManpageGlobals *) pointer;
-  String params;
-  Cardinal num_params = 1;
-
-  if ( w == man_globals->search_entry )
-    PopupSearch(XtParent(w), NULL, NULL, NULL);
-  else if (w == man_globals->dir_entry) {       /* Put Up Directory */
-    params = "Directory";
-    GotoPage(XtParent(w), NULL, &params, &num_params);
-  }
-  else if (w == man_globals->manpage_entry ) {  /* Put Up Man Page */
-    params = "ManualPage";
-    GotoPage(XtParent(w), NULL, &params, &num_params);
-  }
-  else if ( w == man_globals->help_entry )      /* Help */
-    PopupHelp(XtParent(w), NULL, NULL, NULL);
-  else if ( w == man_globals->both_screens_entry ) /*Toggle Both_Shown State.*/
-    ToggleBothShownState(man_globals);
-  else if ( w == man_globals->remove_entry)     /* Kill the manpage */
-    RemoveThisManpage(XtParent(w), NULL, NULL, NULL);
-  else if ( w == man_globals->open_entry)       /* Open new manpage */
-    CreateNewManpage(XtParent(w), NULL, NULL, NULL);
-#ifdef INCLUDE_XPRINT_SUPPORT
-  else if ( w == man_globals->print_entry)    /* Print current manpage */
-    PrintThisManpage(XtParent(w), NULL, NULL, NULL);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-  else if ( w == man_globals->version_entry)    /* Get version */
-    ShowVersion(XtParent(w), NULL, NULL, NULL);
-  else if ( w == man_globals->quit_entry)      /* Quit. */
-    Quit(XtParent(w), NULL, NULL, NULL);
-}
-
-/*      Function Name: ToggleBothShownState;
- *      Description: toggles the state of the both shown feature.
- *      Arguments: man_globals - the man globals structure.
- *      Returns: none.
- */
-
-/*
- * I did not have a two state widget, which is the way this
- * should really be done.  1/22/88 - CDP.
- */
-
-static void
-ToggleBothShownState(ManpageGlobals * man_globals)
-{
-  char * label_str;
-  Arg arglist[1];
-
-  if (man_globals->both_shown == TRUE) {
-    label_str = SHOW_BOTH;
-    if (man_globals->dir_shown)
-      XtUnmanageChild(man_globals->manpagewidgets.manpage);
-    else
-      XtUnmanageChild(man_globals->manpagewidgets.directory);
-  }
-  else {
-    Widget manpage = man_globals->manpagewidgets.manpage;
-    Widget dir = man_globals->manpagewidgets.directory;
-    
-    label_str = SHOW_ONE;
-
-    XtSetArg(arglist[0], XtNpreferredPaneSize, resources.directory_height);
-    XtSetValues(dir, arglist, (Cardinal) 1);
-
-    if (!man_globals->dir_shown) {
-      XtUnmanageChild(manpage);
-      XtManageChild(dir);
-    }
-    XtManageChild(manpage);
-  }
-  man_globals->both_shown = !man_globals->both_shown;
-  
-  if (man_globals->dir_shown)
-    ChangeLabel(man_globals->label,
-               man_globals->section_name[man_globals->current_directory]);
-  else
-    ChangeLabel(man_globals->label, man_globals->manpage_title);
-  
-  XtSetArg(arglist[0], XtNlabel, label_str);
-  XtSetValues(man_globals->both_screens_entry, arglist, ONE);
-  
-  /* if both are shown there is no need to switch between the two. */
-
-  XtSetArg(arglist[0], XtNsensitive, !man_globals->both_shown);
-  XtSetValues(man_globals->manpage_entry, arglist, ONE);
-  XtSetValues(man_globals->dir_entry, arglist, ONE);
-}
-
-/*     Function Name: Popup
- *     Description: This function pops up the given widget under the cursor.
- *     Arguments: w - the widget to popup.
- *                 grab_kind - the kind of grab to register.
- *     Returns: none
- */
-
-/* How far off the top of the widget to have the initial cursor postion. */
-
-#define OFF_OF_TOP 25
-
-void
-Popup(Widget w, XtGrabKind grab_kind)
-{
-  int x_root,y_root,y_pos,garbage;
-  unsigned int mask;
-  Window junk_window;
-
-  XQueryPointer(XtDisplay(w), XtWindow(w), &junk_window, &junk_window,
-               &x_root, &y_root, &garbage, &garbage, &mask);
-
-  y_pos = OFF_OF_TOP - Height(w)/2 - BorderWidth(w);
-  PositionCenter(w, x_root, y_root, y_pos, 0, 2, 2);
-  XtPopup(w, grab_kind);
-}
-
-/*     Function Name: PutUpManpage
- *     Description: Puts the manpage on the display.
- *     Arguments: man_globals - a pointer to the psuedo globals structure
- *                                  for this manpage.
- *                 file - the file to display.
- *     Returns: none.
- */
-
-static void
-PutUpManpage(ManpageGlobals * man_globals, FILE * file)
-{
-  String params = "ManualPage";
-  Cardinal num_params = 1;
-  
-  if (file == NULL)
-    return;
-
-  OpenFile(man_globals, file);
-
-  if (!man_globals->both_shown) {
-    Arg arglist[1];
-    XtSetArg(arglist[0], XtNsensitive, TRUE);
-    XtSetValues(man_globals->manpage_entry, arglist, ONE);
-    XtSetValues(man_globals->both_screens_entry, arglist, ONE);
-  }
-  GotoPage(man_globals->manpagewidgets.manpage, NULL, &params, &num_params);
-}
-
-/*     Function Name: DirectoryHandler
- *     Description: This is the callback function for the directory listings.
- *     Arguments: w - the widget we are calling back from. 
- *                 global_pointer - the pointer to the psuedo global structure
- *                                  associated with this manpage.
- *                 ret_val - return value from the list widget.
- *     Returns: none.
- */
-
-void
-DirectoryHandler(Widget w, XtPointer global_pointer, XtPointer ret_val)
-{
-  FILE * file;                 /* The manpage file. */
-  ManpageGlobals * man_globals = (ManpageGlobals *) global_pointer;
-  XawListReturnStruct * ret_struct = (XawListReturnStruct *) ret_val;
-
-  file = FindManualFile(man_globals, man_globals->current_directory,
-                       ret_struct->list_index);
-  PutUpManpage(man_globals, file);
-  if ((file != NULL) && (file != man_globals->curr_file)) {
-    fclose(file);
-  }
-}
-
-/*     Function Name: DirPopupCallback
- *     Description: This is the callback function for the callback menu.
- *     Arguments: w - the widget we are calling back from. 
- *                 pointer - a pointer to the psuedo globals structure
- *                                  for this manpage.
- *                 junk - (call data) not used.
- *     Returns: none.
- */
-
-/*ARGSUSED*/
-void
-DirPopupCallback(Widget w, XtPointer pointer, XtPointer junk)
-{
-  ManpageGlobals * man_globals; 
-  MenuStruct * menu_struct;
-  Widget parent;
-  int number;
-  int current_box;
-
-  menu_struct = (MenuStruct *) pointer;
-  man_globals = (ManpageGlobals *) menu_struct->data;
-
-  number = menu_struct->number;
-  current_box = man_globals->current_directory;
-
-  /* We have used this guy, pop down the menu. */
-  
-  if (number != current_box) {
-    /* This is the only one that we know has a parent. */
-    parent = XtParent(man_globals->manpagewidgets.box[INITIAL_DIR]);
-
-    MakeDirectoryBox(man_globals, parent,
-                    man_globals->manpagewidgets.box + number, number);
-    XtUnmanageChild(man_globals->manpagewidgets.box[current_box]);
-    XtManageChild(man_globals->manpagewidgets.box[number]);
-
-    XawListUnhighlight(man_globals->manpagewidgets.box[current_box]);
-    ChangeLabel(man_globals->label, man_globals->section_name[number]);
-    man_globals->current_directory = number;
-  }
-
-  /* put up directory. */
-  if (!man_globals->both_shown) {
-    XtUnmanageChild(man_globals->manpagewidgets.manpage);
-    XtManageChild(man_globals->manpagewidgets.directory);
-  }
-}
-    
-/************************************************************
- *
- * Action Routines.
- *
- ************************************************************/
-
-/*     Function Name: SaveFormattedPage
- *     Description: This is the action routine may save the manpage.
- *      Arguments: w - any widget in the widget tree.
- *                 event - NOT USED.
- *                 params, num_params - the parameters paseed to the action
- *                                      routine, can be either Manpage or
- *                                      Directory.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void
-SaveFormattedPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals * man_globals;
-  char cmdbuf[BUFSIZ], error_buf[BUFSIZ];
-
-  if (*num_params != 1) {
-    XtAppWarning(XtWidgetToApplicationContext(w), 
-       "Xman - SaveFormattedPage: This action routine requires one argument.");
-    return;
-  }
-
-  man_globals = GetGlobals(w);
-
-/*
- * If we are not active then take no action.
- */
-
-  if (man_globals->tempfile == NULL) return;
-
-  switch (params[0][0]) {
-  case 'S':
-  case 's':
-
-#ifndef NO_COMPRESS
-    if (!man_globals->compress)
-#endif
-
-      sprintf(cmdbuf, "%s %s %s", COPY, man_globals->tempfile, 
-             man_globals->save_file);
-
-#ifndef NO_COMPRESS
-    else
-      if (man_globals->gzip)
-       sprintf(cmdbuf, "%s < %s > %s", GZIP_COMPRESS, man_globals->tempfile,
-               man_globals->save_file);
-      else
-       sprintf(cmdbuf, "%s < %s > %s", COMPRESS, man_globals->tempfile, 
-               man_globals->save_file);
-#endif
-
-    if(! system(cmdbuf)) {
-       /* make sure the formatted man page is fully accessible by the world */
-       if (chmod(man_globals->save_file, CHMOD_MODE) != 0) {
-           sprintf(error_buf,
-                   "Couldn't set permissions on formatted man page '%s'.\n",
-                   man_globals->save_file);
-           PopupWarning( man_globals, error_buf);
-       }
-    } else {
-       sprintf(error_buf, "Error while executing the command '%s'.\n",
-               cmdbuf);
-       PopupWarning( man_globals, error_buf);
-    }
-    break;
-  case 'C':
-  case 'c':
-    break;
-  default:
-    sprintf(error_buf,"%s %s", "Xman - SaveFormattedPagee:",
-           "Unknown argument must be either 'Save' or 'Cancel'.");
-    PopupWarning(man_globals, error_buf);
-    return;
-  }
-    
-/*
- * We do not need the filename anymore, and have the fd open.
- * We will unlink it.     
- */
-
-  unlink(man_globals->tempfile);
-  XtPopdown( XtParent(XtParent(w)) );
-}
-
-/*      Function Name: GotoPage
- *      Description: The Action routine that switches over to the manpage
- *                   or directory.
- *      Arguments: w - any widget in the widget tree.
- *                 event - NOT USED.
- *                 params, num_params - the parameters paseed to the action
- *                                      routine, can be either Manpage or
- *                                      Directory.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void
-GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals * man_globals;
-  char error_buf[BUFSIZ];
-  Arg arglist[1];
-  Boolean sensitive;
-
-  if (*num_params != 1) {
-    XtAppWarning(XtWidgetToApplicationContext(w), 
-               "Xman - GotoPage: This action routine requires one argument.");
-    return;
-  }
-
-  man_globals = GetGlobals(w);
-
-  if (man_globals->both_shown) {
-    ChangeLabel(man_globals->label, 
-               man_globals->section_name[man_globals->current_directory]);
-    return;
-  }
-
-  switch (params[0][0]) {
-  case 'M':
-  case 'm':
-    XtSetArg(arglist[0], XtNsensitive, &sensitive);
-    XtGetValues(man_globals->manpage_entry, arglist, ONE);
-    if (sensitive) {
-      ChangeLabel(man_globals->label,man_globals->manpage_title);
-      XtUnmanageChild(man_globals->manpagewidgets.directory);
-      XtManageChild(man_globals->manpagewidgets.manpage);
-      man_globals->dir_shown = FALSE;
-    }
-    break;
-  case 'D':
-  case 'd':
-    ChangeLabel(man_globals->label,
-               man_globals->section_name[man_globals->current_directory]);
-    XtUnmanageChild(man_globals->manpagewidgets.manpage);
-    XtManageChild(man_globals->manpagewidgets.directory);  
-    man_globals->dir_shown = TRUE;
-    break;
-  default:
-    sprintf(error_buf,"%s %s", "Xman - GotoPage: Unknown argument must be",
-           "either Manpage or Directory.");
-    XtAppWarning(XtWidgetToApplicationContext(w), error_buf);
-    return;
-  }
-}
-
-/*      Function Name: Quit.
- *      Description: Quits Xman.
- *      Arguments: w - any widget.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-Quit(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  XtAppSetExitFlag(XtWidgetToApplicationContext(w));
-}
-
-/*      Function Name: PopupHelp
- *      Description: Pops up xman's help.
- *      Arguments: w - NOT USED.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-PopupHelp(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  if (MakeHelpWidget())
-    XtPopup(help_widget,XtGrabNone);
-}
-
-/*      Function Name: PopupSearch
- *      Description: Pops up this manual pages search widget.
- *      Arguments: w - any widget in this manpage.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-PopupSearch(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals * man_globals = GetGlobals(w);
-
-  if (man_globals->search_widget) {
-    if (!XtIsRealized(man_globals->search_widget)) {
-      XtRealizeWidget(man_globals->search_widget);
-      AddCursor(man_globals->search_widget, resources.cursors.search_entry);
-    }
-    Popup(man_globals->search_widget, XtGrabNone);
-  }
-}
-
-/*      Function Name: CreateNewManpage
- *      Description: Creates A New Manual Page.
- *      Arguments: w - NOT USED.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-CreateNewManpage(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  (void) CreateManpage(NULL);
-  man_pages_shown++;
-}
-
-/*      Function Name: RemoveThisManpage
- *      Description: Removes a manual page.
- *      Arguments: w - any widget in the manpage.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-RemoveThisManpage(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals * man_globals = GetGlobals(w);
-  
-  if (man_globals->This_Manpage != help_widget) {
-    RemoveGlobals(man_globals->This_Manpage);
-    XtDestroyWidget(man_globals->This_Manpage);
-
-    XtFree( (char *) man_globals->section_name);
-    XtFree( (char *) man_globals->manpagewidgets.box);
-    XtFree( (char *) man_globals);
-
-    if ( (--man_pages_shown) == 0)
-      Quit(w, NULL, NULL, NULL);  
-  }
-  else
-    XtPopdown(help_widget);
-}
-
-/*      Function Name: Search
- *      Description: Actually performs a search.
- *      Arguments: w - any widget in the manpage.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-Search(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals * man_globals = GetGlobals(w);
-  FILE * file = NULL;
-
-  XtPopdown(  XtParent(XtParent(w)) );       /* popdown the search widget */
-
-  if ( (*num_params < 1) || (*num_params > 2) ) {
-    XtAppWarning(XtWidgetToApplicationContext(w), 
-      "Xman - Search: This action routine requires one or two arguments.");
-    return;
-  }
-
-  switch(params[0][0]) {
-  case 'a':
-  case 'A':
-    file = DoSearch(man_globals,APROPOS);
-    break;
-  case 'm':
-  case 'M':
-    file = DoSearch(man_globals,MANUAL);
-    break;
-  case 'c':
-  case 'C':
-    file = NULL;
-    break;
-  default:
-    XtAppWarning(XtWidgetToApplicationContext(w), 
-                "Xman - Search: First parameter unknown.");
-    file = NULL;
-    break;
-  }
-
-  if ( *num_params == 2 ) 
-    switch (params[1][0]) {
-    case 'O':
-    case 'o':
-      if (file != NULL) {
-       Widget w;
-       char * label;
-
-       w = CreateManpage(file);
-       man_pages_shown++;
-
-       /* Put title into new manual page. */
-
-       label = man_globals->manpage_title;
-       man_globals = GetGlobals(w);
-       strcpy(man_globals->manpage_title, label);
-       ChangeLabel(man_globals->label, label);
-      }
-      break;
-    default:
-      XtAppWarning(XtWidgetToApplicationContext(w), 
-                  "Xman - Search: Second parameter unknown.");
-      break;
-    }
-  else {
-    PutUpManpage(man_globals, file);
-  }
-  if ((file != NULL) && (file != man_globals->curr_file)) {
-    fclose(file);
-  }
-}
-
-#ifdef INCLUDE_XPRINT_SUPPORT
-static void
-printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-  ManpageGlobals *mg = GetGlobals(w);
-  XawPrintDialogClosePrinterConnection(mg->printdialog, False);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-  XawPrintDialogCallbackStruct *pdcs = (XawPrintDialogCallbackStruct *)callData;
-  Cardinal                      n;
-  Arg                           args[2];
-  ManpageGlobals               *mg = GetGlobals(w);
-  Widget                        topwindow = mg->This_Manpage;
-  FILE                         *file;
-
-  Log(("printOKXtProc: OK.\n"));
-  
-  /* Get file object */
-  n = 0;
-  XtSetArg(args[n], XtNfile, &file); n++;
-  XtGetValues(mg->manpagewidgets.manpage, args, n);
-  Assertion(file != NULL, (("printOKXtProc: file == NULL.\n")));
-  
-  DoPrintManpage("Xman",
-                 file, topwindow,
-                 pdcs->pdpy, pdcs->pcontext, pdcs->colorspace,
-                 printshellDestroyXtProc,
-                 mg->manpage_title,
-                 pdcs->printToFile?pdcs->printToFileName:NULL);
-
-  XtPopdown(mg->printdialog_shell);
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    ManpageGlobals * mg = GetGlobals(w);
-
-    Log(("printCancelXtProc: cancel.\n"));
-    XtPopdown(mg->printdialog_shell);
-    
-    Log(("destroying print dialog shell...\n"));
-    XtDestroyWidget(mg->printdialog_shell);
-    mg->printdialog_shell = NULL;
-    mg->printdialog       = NULL;
-    Log(("... done\n"));
-}
-
-/*      Function Name: PrintThisManpage
- *      Description: Print the current manual page.
- *      Arguments: mg - manpage globals
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-PrintThisManpage(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals *mg = GetGlobals(w);
-  Dimension       width, height;
-  Position        x, y;
-  Widget          parent    = mg->This_Manpage;
-  Widget          topwindow = mg->This_Manpage;
-  Log(("print!\n"));
-  
-  if (!mg->printdialog) {
-    int n;
-    Arg args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    mg->printdialog_shell = XtCreatePopupShell("printdialogshell",
-                                               transientShellWidgetClass,
-                                               topwindow, args, n);
-    n = 0;
-    mg->printdialog = XtCreateManagedWidget("printdialog", printDialogWidgetClass,
-                                            mg->printdialog_shell, args, n);
-    XtAddCallback(mg->printdialog, XawNOkCallback,     printOKXtProc,     NULL);
-    XtAddCallback(mg->printdialog, XawNCancelCallback, printCancelXtProc, NULL);
-
-    XtRealizeWidget(mg->printdialog_shell);
-  }
-
-  /* Center dialog */
-  XtVaGetValues(mg->printdialog_shell,
-      XtNwidth,  &width,
-      XtNheight, &height,
-      NULL);
-
-  x = (Position)(XWidthOfScreen( XtScreen(parent)) - width)  / 2;
-  y = (Position)(XHeightOfScreen(XtScreen(parent)) - height) / 3;
-
-  XtVaSetValues(mg->printdialog_shell,
-      XtNx, x,
-      XtNy, y,
-      NULL);
-        
-  XtPopup(mg->printdialog_shell, XtGrabNonexclusive);
-}
-#endif /* INCLUDE_XPRINT_SUPPORT */
-
-/*      Function Name: ShowVersion
- *      Description: Show current version.
- *      Arguments: w - any widget in the manpage.
- *                 event - NOT USED.
- *                 params, num_params - NOT USED.
- *      Returns: none.
- */
-
-/*ARGSUSED*/
-void 
-ShowVersion(Widget w, XEvent * event, String * params, Cardinal * num_params)
-{
-  ManpageGlobals * man_globals = GetGlobals(w);
-  ChangeLabel(man_globals->label, XMAN_VERSION);
-}
diff --git a/xman/help.c b/xman/help.c
deleted file mode 100644 (file)
index c9d9aa9..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $XConsortium: help.c,v 1.10 94/04/17 20:43:53 dave Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86$ */
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   January 19, 1988
- */
-
-#include "globals.h"
-
-/*     Function Name: MakeHelpWidget.
- *     Description: This function creates the help widget so that it will be
- *                   ready to be displayed.
- *     Arguments: none.
- *     Returns: none.
- */
-
-Boolean
-MakeHelpWidget(void)
-{
-
-  ManpageGlobals * man_globals;        /* The psuedo global structure. */
-  
-  if (help_widget != NULL)     /* If we already have a help widget. 
-                                  then do not create one. */
-    return(TRUE);
-
-  man_globals = InitPsuedoGlobals();
-
-  CreateManpageWidget(man_globals, HELPNAME, FALSE);
-  help_widget = man_globals->This_Manpage;
-
-  if (OpenHelpfile(man_globals) == FALSE) {
-    XtDestroyWidget(help_widget);
-    help_widget = NULL;
-    return(FALSE);
-  }
-
-  ChangeLabel(man_globals->label, "Xman Help");
-
-  XtManageChild( man_globals->manpagewidgets.manpage );
-  XtRealizeWidget(  help_widget );
-  SaveGlobals( man_globals->This_Manpage, man_globals );
-  AddCursor( help_widget, resources.cursors.manpage);
-
-/*
- * Set up ICCCM delete window.
- */
-  XtOverrideTranslations
-      (man_globals->This_Manpage, 
-       XtParseTranslationTable ("<Message>WM_PROTOCOLS: RemoveThisManpage()"));
-  (void) XSetWMProtocols (XtDisplay(man_globals->This_Manpage),
-                         XtWindow(man_globals->This_Manpage),
-                         &wm_delete_window, 1);
-
-  return(TRUE);
-}
-
-/*     Function Name: OpenHelpfile
- *     Description: opens the helpfile.
- *     Arguments: man_globals - the psuedo globals structure.
- *     Returns: False if no helpfile was found.
- */
-
-Boolean
-OpenHelpfile(ManpageGlobals * man_globals)
-{
-  FILE * help_file_ptr;
-
-  if( (help_file_ptr = fopen(resources.help_file, "r")) == NULL ) {
-    PopupWarning(man_globals,
-                "Could not open help file, NO HELP WILL BE AVALIABLE.");
-    return(FALSE);
-  }
-    
-  OpenFile(man_globals, help_file_ptr);
-  return(TRUE);
-}
diff --git a/xman/icon_help.h b/xman/icon_help.h
deleted file mode 100644 (file)
index 228c3c7..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $XConsortium: icon_help.h,v 1.5 94/04/17 20:43:54 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   August 15, 1988
- */
-
-#define icon_help_width 30
-#define icon_help_height 30
-static unsigned char icon_help_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xf8, 0xdf, 0xfe, 0x07,
-   0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
-   0x06, 0xe0, 0x03, 0x18, 0x06, 0xf0, 0x07, 0x18, 0x06, 0x18, 0x0c, 0x18,
-   0x06, 0x0c, 0x18, 0x18, 0x06, 0x0c, 0x18, 0x18, 0x06, 0x0c, 0x18, 0x18,
-   0x06, 0x00, 0x18, 0x18, 0x06, 0x00, 0x18, 0x18, 0x06, 0x00, 0x0c, 0x18,
-   0x06, 0x80, 0x07, 0x18, 0x06, 0xc0, 0x03, 0x18, 0x06, 0xc0, 0x00, 0x18,
-   0x06, 0xc0, 0x00, 0x18, 0x06, 0xc0, 0x00, 0x18, 0x06, 0xc0, 0x00, 0x18,
-   0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0xc0, 0x00, 0x18,
-   0x06, 0xc0, 0x00, 0x18, 0xc6, 0x03, 0xf0, 0x18, 0xfe, 0x1f, 0xfe, 0x1f,
-   0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00};
diff --git a/xman/icon_open.h b/xman/icon_open.h
deleted file mode 100644 (file)
index b47b1d1..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $XConsortium: icon_open.h,v 1.5 94/04/17 20:43:54 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   January 29, 1988
- */
-
-#define icon_open_width 30
-#define icon_open_height 30
-static unsigned char icon_open_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0xf0, 0x00, 0xf8, 0xdf, 0xfe, 0x07,
-   0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0x00, 0x00, 0x18, 0x06, 0x30, 0x03, 0x18,
-   0xc6, 0x31, 0xe3, 0x18, 0x36, 0x32, 0x13, 0x1b, 0x06, 0x30, 0x03, 0x18,
-   0xc6, 0xf1, 0xe3, 0x18, 0x36, 0xe2, 0x11, 0x1b, 0x06, 0x00, 0x00, 0x18,
-   0xc6, 0xf1, 0xe3, 0x18, 0x36, 0x32, 0x13, 0x1b, 0x06, 0x30, 0x03, 0x18,
-   0xc6, 0xf1, 0xe3, 0x18, 0x36, 0x32, 0x10, 0x1b, 0x06, 0x30, 0x00, 0x18,
-   0xc6, 0x01, 0xe0, 0x18, 0x36, 0x3a, 0x17, 0x1b, 0x06, 0xf8, 0x07, 0x18,
-   0xc6, 0xd9, 0xe6, 0x18, 0x36, 0xda, 0x16, 0x1b, 0x06, 0x18, 0x06, 0x18,
-   0x06, 0x18, 0x06, 0x18, 0xc6, 0x03, 0xf0, 0x18, 0xfe, 0x1f, 0xfe, 0x1f,
-   0x3e, 0xfc, 0x0f, 0x1f, 0x06, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00};
diff --git a/xman/iconclosed.h b/xman/iconclosed.h
deleted file mode 100644 (file)
index 106068c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $XConsortium: iconclosed.h,v 1.5 94/04/17 20:43:55 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-/*
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   January 29, 1988
- */
-
-#define iconclosed_width 20
-#define iconclosed_height 30
-static unsigned char iconclosed_bits[] = {
-   0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x0e, 0xf8, 0x07, 0x06, 0x00, 0x05,
-   0xfe, 0xff, 0x04, 0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04,
-   0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04, 0x3e, 0xf8, 0x04, 0xfe, 0xff, 0x04,
-   0xfe, 0xff, 0x04, 0x3e, 0xf8, 0x04, 0xbe, 0xfb, 0x04, 0xbe, 0xfb, 0x04,
-   0x3e, 0xf8, 0x04, 0xbe, 0xff, 0x04, 0xbe, 0xff, 0x04, 0xfe, 0xff, 0x04,
-   0xfe, 0xff, 0x04, 0x3e, 0xf9, 0x04, 0x3e, 0xf9, 0x04, 0xbe, 0xfa, 0x04,
-   0xbe, 0xfa, 0x04, 0xbe, 0xfb, 0x06, 0xbe, 0xfb, 0x05, 0xfe, 0xff, 0x00,
-   0xfe, 0xff, 0x00, 0x00, 0x00, 0x00};
diff --git a/xman/main.c b/xman/main.c
deleted file mode 100644 (file)
index c709d5e..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-/* $XConsortium: main.c,v 1.23 94/04/17 20:43:55 rws Exp $ */
-/* $XdotOrg: $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/main.c,v 1.3 2000/03/03 23:16:27 dawes Exp $ */
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   October 22, 1987
- */
-
-#include "globals.h"
-#ifndef ZERO
-#include <X11/Xaw/Cardinals.h>
-#endif /* ZERO */
-
-static void ArgError(int argc, char ** argv);
-static void AdjustDefResources(void);
-
-#define Offset(field) (XtOffsetOf(Xman_Resources , field))
-
-static XtResource my_resources[] = {
-  {"directoryFontNormal", XtCFont, XtRFontStruct, sizeof(XFontStruct *),
-     Offset(fonts.directory), XtRString, DIRECTORY_NORMAL},
-  {"bothShown", XtCBoolean, XtRBoolean, sizeof(Boolean),
-     Offset(both_shown_initial), XtRString, "False"},
-  {"directoryHeight", "DirectoryHeight", XtRInt, sizeof(int),
-     Offset(directory_height), XtRString, "150"},  
-  {"topCursor", XtCCursor, XtRCursor, sizeof(Cursor), 
-     Offset(cursors.top), XtRString, XMAN_CURSOR},
-  {"helpCursor", XtCCursor, XtRCursor, sizeof(Cursor),
-     Offset(cursors.help), XtRString, HELP_CURSOR},
-  {"manpageCursor", XtCCursor, XtRCursor, sizeof(Cursor),
-     Offset(cursors.manpage), XtRString, MANPAGE_CURSOR},
-  {"searchEntryCursor", XtCCursor, XtRCursor, sizeof(Cursor),
-     Offset(cursors.search_entry), XtRString, SEARCH_ENTRY_CURSOR},
-  {"pointerColor", XtCForeground, XtRPixel, sizeof(Pixel),
-     Offset(cursors.fg_color), XtRString, "XtDefaultForeground"},
-  {"pointerColorBackground", XtCBackground, XtRPixel, sizeof(Pixel),
-     Offset(cursors.bg_color), XtRString, "XtDefaultBackground"},
-  {"help", XtCBoolean, XtRBoolean, sizeof(Boolean),
-     Offset(show_help_syntax), XtRImmediate, NULL},
-  {"helpFile", XtCFile, XtRString, sizeof(char *),
-     Offset(help_file), XtRString, HELPFILE},
-  {"topBox", XtCBoolean, XtRBoolean, sizeof(Boolean),
-     Offset(top_box_active), XtRString, "True"},
-  {"clearSearchString", "ClearSearchString", XtRBoolean, sizeof(Boolean),
-     Offset(clear_search_string), XtRImmediate, (caddr_t) TRUE},
-  {"title", XtCString, XtRString, sizeof(char *),
-     Offset(title), XtRString, "xman"},
-  {"iconic", XtCBoolean, XtRBoolean, sizeof(Boolean),
-     Offset(iconic), XtRString, "False"},
-};
-
-#undef Offset
-
-/*
- * The resource that we absolutely need.
- */
-
-static char * fallback_resources[] = { "Xman*quitButton.translations:  #override \\n   <Btn1Up>: Quit() reset()",
- "Xman*helpButton.sensitive:                    FALSE",
- "Xman*manpageButton.sensitive:                 FALSE",
- "Xman*helpButton.Label:                       Help",
- "Xman*quitButton.Label:                       Quit",
- "Xman*manpageButton.Label:                    Manual Page",
- "Xman*topLabel.label:                                 No App-Defaults File",
- NULL,
-};
-
-/*
- * This is necessary to keep all TopLevel shells from becoming
- * the size that is specified on the command line.
- */
-
-static XrmOptionDescRec xman_options[] = {
-{"-geometry", "*topBox.geometry",        XrmoptionSepArg, (caddr_t) NULL},
-{"-help",     "help",                    XrmoptionNoArg,  (caddr_t) "True"},
-{"=",         "*topBox.geometry",        XrmoptionIsArg,  (caddr_t) NULL},
-{"-pagesize", "*manualBrowser.geometry", XrmoptionSepArg, (caddr_t) NULL},
-{"-notopbox", "topBox",                  XrmoptionNoArg,  (caddr_t) "False"},
-{"-helpfile", "helpFile",                XrmoptionSepArg, (caddr_t) NULL},
-{"-bothshown","bothShown",               XrmoptionNoArg,  (caddr_t) "True"},
-{"-title",    "title",                   XrmoptionSepArg, (caddr_t) "xman"}, 
-{"-iconic",   "iconic",                  XrmoptionNoArg,  (caddr_t) "True"},
-};
-
-static XtActionsRec xman_actions[] = {
-  {"GotoPage",          GotoPage},
-  {"Quit",              Quit},
-  {"Search",            Search},
-  {"PopupHelp",         PopupHelp},
-  {"PopupSearch",       PopupSearch},
-  {"CreateNewManpage",  CreateNewManpage},
-  {"RemoveThisManpage", RemoveThisManpage},
-  {"SaveFormattedPage", SaveFormattedPage},
-#ifdef INCLUDE_XPRINT_SUPPORT
-  {"PrintThisManpage",  PrintThisManpage},
-#endif /* INCLUDE_XPRINT_SUPPORT */
-  {"ShowVersion",       ShowVersion},
-};
-
-char **saved_argv;
-int saved_argc;
-
-/*
- * This atom is used to make the application ICCCM compliant.
- */
-Atom wm_delete_window;
-
-/*     Function Name: main
- *     Description: This is the main driver for Xman.
- *     Arguments: argc, argv - the command line arguments.
- *     Returns: return, what return.
- */
-
-int main(int argc, char ** argv)
-{
-  XtAppContext app_con;
-
-  saved_argc = argc;
-  saved_argv = (char **)XtMalloc(argc * sizeof(char *));
-  bcopy(argv, saved_argv, argc * sizeof(char *));
-
-  XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
-
-  initial_widget = XtAppInitialize(&app_con, "Xman", xman_options,
-                                  XtNumber(xman_options), &argc, argv,
-                                  fallback_resources, NULL, ZERO);
-  wm_delete_window = XInternAtom(XtDisplay(initial_widget), "WM_DELETE_WINDOW",
-                                False);
-
-  manglobals_context = XStringToContext(MANNAME);
-
-  AdjustDefResources();
-
-  XtGetApplicationResources( initial_widget, (caddr_t) &resources, 
-                           my_resources, XtNumber(my_resources),
-                           NULL, (Cardinal) 0);
-
-  if ( (argc != 1) || (resources.show_help_syntax) ) {
-    ArgError(argc, argv);
-    return EXIT_FAILURE;
-  }
-
-  XtAppAddActions(app_con, xman_actions, XtNumber(xman_actions));
-
-  if (!resources.fonts.directory)
-       PrintError("Failed to get the directory font.");
-
-#ifdef DEBUG
-  printf("debugging mode\n");
-#endif
-
-/*
- * Set the default width and height.
- * I am not real happy with this method, but it will usually do something
- * reasonable, if not the "right" thing.  It is not a real big issue since
- * it is easy to change the values with resources or command line options.
- * NOTE: if you are in a 100 dpi display you will lose.
- */
-
-  default_width = DEFAULT_WIDTH;
-  default_height=DisplayHeight(XtDisplay(initial_widget), 
-                              DefaultScreen(XtDisplay(initial_widget)));
-  default_height *= 3;
-  default_height /= 4;
-
-  if ( (sections = Man()) == 0 )
-    PrintError("There are no manual sections to display, check your MANPATH.");
-
-  if (resources.top_box_active) 
-    MakeTopBox();      
-  else
-    (void) CreateManpage(NULL);
-
-/*
- * We need to keep track of the number of manual pages that are shown on
- * the screen so that if this user does not have a top box then when he
- * removes all his manual pages we can kill off the xman process.
- * To make things easier we will consider the top box a shown manual page
- * here, but since you cannot remove it, man_page_shown only goes to zero when
- * no top box is present.
- */
-
-  man_pages_shown = 1;         
-
-  XtAppMainLoop(app_con);
-
-  return EXIT_SUCCESS;
-}
-
-/*     Function Name: ArgError
- *     Description:  Prints error message about unknow arguments.
- *     Arguments: argc, argv - args not understood.
- *     Returns: none.
- */
-
-static void 
-ArgError(int argc, char ** argv)
-{
-  int i;
-
-  static char **syntax, *syntax_def[] = {
-  "-help",                   "Print this message",
-  "-helpfile <filename>",    "Specifies the helpfile to use.",
-  "-bothshown",              "Show both the directory and manpage at once.",
-  "-notopbox",               "Starts with manpage rather than topbox.",
-  "-geometry <geom>",        "Specifies the geometry of the top box.",
-  "=<geom>",                 "Specifies the geometry of the top box.",
-  "-pagesize <geom>",        "Specifies the geometry of the manual page.",
-  "-bw <pixels>",            "Width of all window borders.",
-  "-borderwidth <pixels>",   "Width of all window borders.",
-  "-bd <color>",             "Color of all window borders.",
-  "-bordercolor <color>",    "Color of all window borders.",
-  "-fg <color>",             "Foreground color for the application.",
-  "-foreground <color>",     "Foreground color for the application.",
-  "-bg <color>",             "Background color for the application.",
-  "-background <color>",     "Background color for the application.",
-  "-display <display name>", "Specify a display that is not the default",
-  "-fn <font>",              "Font to be used for button and label text.",
-  "-font <font>",            "Font to be used for button and label text.",
-  "-name <name>",            "Change the name used for retrieving resources.",
-  "-title <name>",           "Change the name without affecting resources.",
-  "-xrm <resource>",         "Specifies a resource on the command line.",
-  NULL, NULL,
-  };
-  
-  syntax = syntax_def;
-
-  for (i = 1; i < argc ; i++) 
-    (void) printf("This argument is unknown to Xman: %s\n", argv[i]);
-  
-  (void) printf("\nKnown arguments are:\n");
-
-  while ( *syntax != NULL ) {
-    printf("%-30s - %s\n", syntax[0], syntax[1]);
-    syntax += 2;
-  }
-}
-
-/*    Function Name: AdjustDefResources
- *    Description: Changes default resources which contain paths when
- *            XWINHOME is set
- *    Arguments: none
- *    Returns: nothing
- */
-
-static void
-AdjustDefResources(void)
-{
-  char        *xwinhome = NULL;
-  int i;
-
-  if (!(xwinhome = getenv("XWINHOME")))
-    return;
-
-  for (i = 0; i < sizeof(my_resources)/sizeof(XtResource); i++) {
-    if (!strcmp(my_resources[i].resource_name, "helpFile")) {
-      if (!(my_resources[i].default_addr =
-              malloc(strlen(xwinhome) + sizeof("/lib/X11/xman.help")))) {
-        fprintf(stderr, "malloc failure\n");
-        exit(EXIT_FAILURE);
-      }
-      sprintf(my_resources[i].default_addr, "%s/lib/X11/xman.help", xwinhome);
-    }
-  }
-}
diff --git a/xman/man.c b/xman/man.c
deleted file mode 100644 (file)
index ad2b3f0..0000000
+++ /dev/null
@@ -1,1184 +0,0 @@
-/* $XConsortium: man.c,v 1.30 94/04/17 20:43:56 rws Exp $ */
-/* $XdotOrg: $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/man.c,v 1.8 2003/04/09 20:31:31 herrb Exp $ */
-
-
-#include "globals.h"
-#include "vendor.h"            /* vendor-specific defines and data */
-
-#ifndef X_NOT_POSIX
-#include <dirent.h>
-#else
-#ifdef SYSV
-#include <dirent.h>
-#else
-#ifdef USG
-#include <dirent.h>
-#else
-#include <sys/dir.h>
-#ifndef dirent
-#define dirent direct
-#endif
-#endif
-#endif
-#endif
-
-#ifdef DEBUG
-static char error_buf[BUFSIZ];         /* The buffer for error messages. */
-#endif /* DEBUG */
-
-static void AddToCurrentSection(Manual * local_manual, char * path);
-static void InitManual(Manual * l_manual, char * label);
-static void ReadCurrentSection(Manual * local_manual, char * path);
-static void ReadMandescFile(SectionList ** section_list, char * path);
-static void SortAndRemove(Manual *man, int number);
-static void SortList(SectionList ** list);
-
-#define SECT_ERROR -1
-
-#ifndef       Byte
-#define       Byte    unsigned char
-#endif
-#ifndef       reg
-#define       reg     register
-#endif
-static void sortstrs (Byte *data[], int size, Byte *otherdata[]);
-static void sortstrs_block (Byte **, Byte **, int, Byte, Byte **, Byte **);
-static void sortstrs_block_oo (Byte **, Byte **, int, Byte, int *, int *, Byte **, Byte **);
-/*     Function Name: Man
- *     Description: Builds a list of all manual directories and files.
- *     Arguments: none. 
- *     Returns: the number of manual sections.
- */
-
-int
-Man(void)
-{
-  SectionList *list = NULL;
-  char *ptr, *lang = NULL, manpath[BUFSIZ], buf[BUFSIZ], *path, *current_label;
-  int sect, num_alloced;
-
-/* 
- * Get the environment variable MANPATH, and if it doesn't exist then use
- * SYSMANPATH and LOCALMANPATH.
- */
-
-  /* if MANPATH variable ends in ':'. So, should extend it's value to the
-   * default search path.
-   */
-
-  *manpath = '\0';
-  if ((ptr = getenv("MANPATH")) != NULL)
-    strcpy(manpath, ptr);
-  if (ptr == NULL || streq(ptr , "") || ptr[strlen(ptr) - 1] == ':') {
-    lang = getenv("LANG");
-#ifdef MANCONF
-    if (!ReadManConfig(manpath + strlen(manpath)))
-#endif
-    {
-#ifdef MANCONF
-      if (manpath[strlen(manpath) - 1] != ':')
-       strcat(manpath, ":");
-#endif
-      strcat(manpath, SYSMANPATH);
-#ifdef LOCALMANPATH
-      strcat(manpath, ":");
-      strcat(manpath, LOCALMANPATH);
-#endif
-    }
-  }
-
-/*
- * Get the list of manual directories in the users MANPATH that we should
- * open to look for manual pages.  The ``mandesc'' file is read here.
- */
-
-  for ( path = manpath ; (ptr = index(path , ':')) != NULL ; path = ++ptr) { 
-    *ptr = '\0';
-    if (lang != NULL) {
-      strcpy(buf, path);
-      strcat(buf, "/");
-      strncat(buf, lang, sizeof(buf) - strlen(path) + 1);
-      buf[sizeof(buf) - strlen(path) + 1] = '\0';
-      ReadMandescFile(&list, buf);
-    }
-    ReadMandescFile(&list, path);
-  }
-  if (lang != NULL) {
-    strcpy(buf, path);
-    strcat(buf, "/");
-    strncat(buf, lang, sizeof(buf) - strlen(path) + 1);
-    buf[sizeof(buf) - strlen(path) + 1] = '\0';
-    ReadMandescFile(&list, buf);
-  }
-  ReadMandescFile(&list, path);
-
-  SortList(&list);
-  
-  sect = 0;
-  num_alloced = SECTALLOC;
-  manual = (Manual *) XtMalloc( sizeof(Manual) * num_alloced );
-  InitManual( manual, list->label );
-  manual[sect].flags = list->flags;
-  current_label = NULL;
-
-  while ( list != NULL ) {
-    SectionList * old_list;
-
-    if ( current_label == NULL || streq(list->label, current_label) )
-      AddToCurrentSection( manual + sect, list->directory);
-    else {
-      if (manual[sect].nentries == 0) {        /* empty section, re-use it. */
-       XtFree(manual[sect].blabel);
-       manual[sect].blabel = list->label;
-       manual[sect].flags = list->flags;
-      }
-      else {
-       if ( ++sect >= num_alloced ) {
-         num_alloced += SECTALLOC;
-         manual = (Manual *) XtRealloc ( (char *) manual,
-                                       (sizeof(Manual) * num_alloced));
-         if (manual == NULL) 
-           PrintError("Could not allocate memory for manual sections.");
-       }
-       InitManual( manual + sect, list->label );
-       manual[sect].flags = list->flags;
-      }
-      AddToCurrentSection( manual + sect, list->directory);
-    }
-    /* Save label to see if it matches next entry. */
-    current_label = list->label; 
-    old_list = list;
-    list = list->next;
-    XtFree((char *) old_list);         /* free what you allocate. */
-  }
-  if (manual[sect].nentries != 0)
-    sect++;                    /* don't forget that last section. */
-  
-  SortAndRemove(manual, sect);
-
-#ifdef notdef                  /* dump info. */
-  DumpManual(sect);
-#endif
-  
-/*
- * realloc manual to be minimum space necessary.
- */
-
-  if (sect == 0)
-    PrintError("No manual pages found.");
-  manual = (Manual *) XtRealloc( (char *) manual, (sizeof(Manual) * sect));
-  if (manual == NULL) 
-    PrintError("Could not allocate memory for manual sections.");
-
-  return(sect);                /* return the number of man sections. */
-}    
-
-/*     Function Name: SortList
- *     Description: Sorts the list of sections to search.
- *     Arguments: list - a pointer to the list to sort.
- *     Returns: a sorted list.
- *
- * This is the most complicated part of the entire operation.
- * all sections with the same label must by right next to each other,
- * but the sections that are in the standard list have to come first.
- */
-
-static void
-SortList(SectionList ** list)
-{
-  SectionList * local;
-  SectionList *head, *last, *inner, *old;
-  
-  if (*list == NULL)
-    PrintError("No manual sections to read, exiting.");
-
-/* 
- * First step 
- * 
- * Look for standard list items, and more them to the top of the list.
- */
-
-  last = NULL;                 /* keep Saber happy. */
-  for ( local = *list ; local->next != NULL ; local = local->next) {
-    if ( local->flags ) {
-      if ( local == *list )    /* top element is already standard. */
-       break;
-      head = local;
-
-      /* Find end of standard block */
-      for (old = NULL ; (local->next != NULL) && (local->flags) 
-          ; old = local, local = local->next); 
-
-      if (old != NULL) {
-          last->next = old->next; /* Move the block. */
-          old->next = *list;
-          *list = head;
-      }
-
-      break;                   /* First step accomplished. */
-    }
-    last = local;
-  }
-
-/*
- *  Second step
- *
- *  Move items with duplicate labels right next to each other.
- *
- *  Changed to keep the order of the list entries unchanged.
- */
-
-  for (local = *list; local->next != NULL; local = local->next) {
-    head = local;
-    old = inner = local->next;
-    while (inner != NULL) {
-      if (streq(inner->label, local->label)) {
-       if (old != inner) {
-         old->next = inner->next;
-         last = inner->next;
-         inner->next = head->next;
-         head->next = inner;
-         head = inner;
-         old = inner = last;
-         continue;
-       }
-       else
-         head = inner;
-      }
-      old = inner;
-      inner = inner->next;
-    }
-  }
-}      
-
-/*     Function Name: ReadMandescFile
- *     Description: Reads the mandesc file, and adds more sections as 
- *                   necessary.
- *     Arguments: path - path name if the current search directory.
- *                 section_list - pointer to the list of sections.
- *     Returns: TRUE in we should use default sections
- */
-  
-static void
-ReadMandescFile(SectionList ** section_list, char * path)
-{
-  char mandesc_file[BUFSIZ];   /* full path to the mandesc file. */
-  FILE * descfile;
-  char string[BUFSIZ], local_file[BUFSIZ];
-  Boolean use_defaults = TRUE;
-  char *cp;
-
-  snprintf(mandesc_file, sizeof(mandesc_file), "%s/%s", path, MANDESC);
-  if ( (descfile = fopen(mandesc_file, "r")) != NULL) {
-    while ( fgets(string, BUFSIZ, descfile) != NULL) {
-      string[strlen(string)-1] = '\0';        /* Strip off the CR. */
-
-      if ( streq(string, NO_SECTION_DEFAULTS) ) {
-       use_defaults = FALSE;
-       continue;
-      }
-
-      if ((cp = index(string,'\t')) != NULL) {
-       char *s;
-       *cp++ = '\0';
-       strcpy(local_file, MAN);
-       strcat(local_file, string);
-       if ((s = index(cp,'\t')) != NULL) {
-         *s++ = '\0';
-         if (streq(s, SUFFIX))
-           AddNewSection(section_list, path, local_file, cp, MSUFFIX);
-         else if (streq(s, FOLD))
-           AddNewSection(section_list, path, local_file, cp, MFOLD);
-         else if (streq(s, FOLDSUFFIX))
-           AddNewSection(section_list, path, local_file, cp, MFOLDSUFFIX);
-         else
-           AddNewSection(section_list, path, local_file, cp, MNULL);
-        } else
-           AddNewSection(section_list, path, local_file, cp, MNULL);
-      } else {
-       snprintf(local_file, sizeof(local_file), "%s%c", MAN, string[0]);
-       AddNewSection(section_list, path, local_file, (string + 1), FALSE );
-#ifdef SEARCHOTHER
-       snprintf(local_file, sizeof(local_file), "%s%c", SEARCHOTHER, string[0]);
-       AddNewSection(section_list, path, local_file, (string + 1), FALSE);
-#endif
-      }
-    }
-
-    fclose(descfile);
-  }
-  if (use_defaults)
-    AddStandardSections(section_list, path);
-}
-
-/*     Function Name: AddNewSection
- *     Description: Adds the new section onto the current section list.
- *     Arguments: list - pointer to the section list.
- *                 path - the path to the current manual section.
- *                 file - the file to save.
- *                 label - the current section label.
- *                 flags = 1 - add a suffix
- *                      = 2 - fold to lower case
- *     Returns: none.
- */
-
-void
-AddNewSection(
-SectionList **list,
-char * path, char * file, char * label, 
-int flags)
-{
-  SectionList * local_list, * end;
-  char full_path[BUFSIZ];
-
-/* Allocate a new list element */
-
-  local_list = (SectionList *) XtMalloc(sizeof(SectionList));
-
-  if (*list != NULL) {
-    for ( end = *list ; end->next != NULL ; end = end->next );
-    end->next = local_list;
-  }
-  else 
-    *list = local_list;
-
-  local_list->next = NULL;
-  local_list->label = StrAlloc(label);
-  snprintf(full_path, sizeof(full_path), "%s/%s", path, file);
-  local_list->directory = StrAlloc(full_path);
-  local_list->flags = flags;
-}  
-
-/*     Function Name: AddToCurrentSection
- *     Description: This function gets the names of the manual page
- *                   directories, then closes the directory.
- *     Arguments:  local_manual - a pointer to a manual pages structure.
- *                  path - the path to this directory.
- *     Returns: none.
- */
-
-static void
-AddToCurrentSection(Manual * local_manual, char * path)
-{
-  char temp_path[BUFSIZ];
-
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-  snprintf(temp_path, sizeof(temp_path), "%s/%s", path, MACHINE);
-  ReadCurrentSection(local_manual, temp_path);
-#endif
-  ReadCurrentSection(local_manual, path);
-  snprintf(temp_path, sizeof(temp_path), "%s.%s", path, COMPRESSION_EXTENSION);
-  ReadCurrentSection(local_manual, temp_path);
-}
-
-/*     Function Name: ReadCurrentSection
- *     Description: Actually does the work of adding entries to the 
- *                   new section
- *     Arguments:  local_manual - a pointer to a manual pages structure.
- *                  path - the path to this directory.
- *                  compressed - Is this a compressed directory?
- *     Returns: TRUE if any entries are found.
- */
-
-static void
-ReadCurrentSection(Manual * local_manual, char * path)
-{
-  DIR * dir;
-
-  register struct dirent *dp;
-
-  register int nentries;
-  register int nalloc;
-  char full_name[BUFSIZ], *ptr;
-
-  if((dir = opendir(path)) == NULL) {
-#ifdef DEBUG
-    snprintf(error_buf, sizeof(error_buf), "Can't open directory %s", path);
-    PopupWarning(NULL, error_buf);
-#endif /* DEBUG */
-    return;
-  }
-
-/*
- * Remove the compression extension from the path name.
- */
-
-  if ( (ptr = rindex(path, '.')) != NULL) {
-#if !defined(__SCO__) && !defined(ISC)
-    if (streq(ptr + 1, COMPRESSION_EXTENSION)) 
-#else
-    if (strpbrk(ptr + 1, COMPRESSION_EXTENSIONS) != NULL)
-#endif
-      *ptr = '\0';
-#ifdef GZIP_EXTENSION
-    else if (streq(ptr + 1, GZIP_EXTENSION))
-      *ptr = '\0';
-#endif
-#ifdef BZIP2_EXTENSION
-    else if (streq(ptr + 1, BZIP2_EXTENSION))
-      *ptr = '\0';
-#endif
-#ifdef LZMA_EXTENSION
-    else if (streq(ptr + 1, LZMA_EXTENSION))
-      *ptr = '\0';
-#endif
-  }
-  
-  nentries = local_manual->nentries;
-  nalloc = local_manual->nalloc;
-
-  while( (dp = readdir(dir)) != NULL ) {
-    char * name = dp->d_name;
-    if (name[0] == '.')
-      continue;
-#ifndef CRAY
-    if (index(name, '.') == NULL)
-      continue;
-#endif
-    if( nentries >= nalloc ) {
-      nalloc += ENTRYALLOC;
-      local_manual->entries =(char **) XtRealloc((char *)local_manual->entries,
-                                                nalloc * sizeof(char *));
-      local_manual->entries_less_paths =
-       (char **) XtRealloc((char *)local_manual->entries_less_paths,
-                           nalloc * sizeof(char *));
-    }
-
-    snprintf(full_name, sizeof(full_name), "%s/%s", path, name);
-/*
- * Remove the compression extension from the entry name.
- */
-
-    if ( (ptr = rindex(full_name, '.')) != NULL) {
-#if !defined(__SCO__) && !defined(ISC)
-      if (streq(ptr + 1, COMPRESSION_EXTENSION)) 
-#else
-      if (strpbrk(ptr + 1, COMPRESSION_EXTENSIONS) != NULL)
-#endif
-       *ptr = '\0';
-#ifdef GZIP_EXTENSION
-      else if (streq(ptr + 1, GZIP_EXTENSION))
-       *ptr = '\0';
-#endif
-#ifdef BZIP2_EXTENSION
-      else if (streq(ptr + 1, BZIP2_EXTENSION))
-       *ptr = '\0';
-#endif
-#ifdef LZMA_EXTENSION
-      else if (streq(ptr + 1, LZMA_EXTENSION))
-       *ptr = '\0';
-#endif
-#ifdef IGNORE_EXTENSION
-      /* skip files with specified extension - they're not real man pages */
-      else if (streq(ptr + 1, IGNORE_EXTENSION)) {
-       continue;
-      }
-#endif /* IGNORE_EXTENSION */
-    }
-    local_manual->entries[nentries] = StrAlloc(full_name);
-    local_manual->entries_less_paths[nentries] = 
-      rindex(local_manual->entries[nentries], '/');
-    if ( local_manual->entries_less_paths[nentries] == NULL )
-      PrintError("Internal error while cataloging manual pages.");
-    ++ nentries;
-  }
-  
-  local_manual->nentries = nentries;
-  local_manual->nalloc = nalloc;
-
-  closedir(dir);
-}
-
-/*     Function Name: SortAndRemove
- *     Description: This function sorts all the entry names and
- *                   then removes all the duplicate entries.
- *     Arguments: man - a pointer to the manual structure.
- *                 number - the number of manual sections.
- *     Returns: an improved manual stucure
- */
-
-static void
-SortAndRemove(Manual *man, int number)
-{
-  int i;
-  char *l1, *l2, **s1;
-  
-  for ( i = 0; i < number; man++, i++) { /* sort each section */
-    register int i2 = 0;      
-    
-#ifdef DEBUG
-    printf("sorting section %d - %s\n", i, man->blabel);
-#endif /* DEBUG */
-
-    s1 = (char **)malloc(man->nentries * sizeof(char *));
-    
-    /* temporarily remove suffixes of entries, preventing them from */
-    /* being used in alpabetic comparison ie sccs-delta.1 vs sccs.1 */
-    for (i2=0; i2<man->nentries; i2++)
-      if ((s1[i2] = rindex(man->entries_less_paths[i2], '.')) != NULL)
-       *s1[i2] = '\0';  
-
-    sortstrs ( (Byte **)man->entries_less_paths, man->nentries, (Byte **)man->entries );
-
-    /* put back suffixes */
-    for (i2=0; i2<man->nentries; i2++) 
-      if (s1[i2] != NULL) *s1[i2] = '.';      
-
-    free(s1); 
-    
-#ifdef DEBUG
-    printf("removing from section %d.\n", i);
-#endif /* DEBUG */
-    
-    {
-      register int   j, k, nent, nentm1;
-      int     j2;
-      nent   = man -> nentries;
-      nentm1 = nent - 1;
-      j = 0;
-      l2 = man->entries_less_paths[j++];
-      if ( l2 == NULL )
-        PrintError("Internal error while removing duplicate manual pages.");
-      while ( j < nentm1 )
-       {
-         l1 = l2;
-         l2 = man->entries_less_paths[j++];
-         if ( l2 == NULL )
-           PrintError("Internal error while removing duplicate manual pages."
-                      );
-         if ( streq(l1,l2) )
-           {
-             j2 = j-1;
-             k  = j2;
-             while ( j < nent )
-                {
-                 man -> entries_less_paths[k] = man -> entries_less_paths[j];
-                man -> entries[k++] = man -> entries[j++];
-                }
-             j = j2;
-             -- man -> nentries;
-             -- nent;
-             -- nentm1;
-           }
-       }
-    }
-  }
-}
-
- /*
-       *******  Replacement for qsort to keep
-       *******  identical entries in order
-       A somewhat ugly hack of something that was once simpler...
- */
- /*
-       Sort an array of pointers to strings, keeping it
-       in ascending order by (1) string comparison and
-       (2) original entry order in the pointer array.
-       This is a modified radix exchange algorithm.
-       In case there's insufficient memory for a temporary copy
-       of the pointer array, the original order of identical strings
-       isn't preserved.
- */
-static void 
-sortstrs (Byte *data[], int size, Byte *otherdata[])
-{
-       Byte   **sp, **ep;
-       Byte   **othersp, **otherep;
-       int     *origorder;
- origorder = (int *) calloc (size, sizeof(int));
- if ( origorder )
-    {
-    reg int     i;
-    for ( i=0; i < size; ++i )
-       origorder[i] = i;
-    }
- sp = data;
- ep = &data[size-1];
- othersp = otherdata;
- otherep = &otherdata[size-1];
- if ( origorder )
-    {
-    sortstrs_block_oo ( sp, ep, 0, 0x80, origorder, &origorder[size-1],
-       othersp, otherep );
-    free (origorder);
-    }
- else
-    sortstrs_block ( sp, ep, 0, 0x80, othersp, otherep );
-}
-
- /*---------------------------------*/
- /*  Sort 1 block of data on 1 bit  */
- /*---------------------------------*/
-static void
-sortstrs_block (  
-       Byte   **start,
-       Byte   **end,
-       int      offset,
-       Byte     mask,
-       Byte   **otherstart,
-       Byte   **otherend)
-{
- reg   Byte   **sp, **ep;
- reg   Byte     m;
- reg   int      off;
- reg   Byte    *t;
- reg   int      curstrlen;
-       int      maxstrlen;
-       Byte   **othersp, **otherep;
-#define       newstring(ptr) \
- { \
- t = *ptr; \
- curstrlen = 0; \
- while ( *t++ ) ++ curstrlen; \
- if ( curstrlen > maxstrlen ) maxstrlen = curstrlen; \
- t = *ptr; \
- }
- maxstrlen = 0;
- sp  = start;
- ep  = end;
- off = offset;
- m   = mask;
- othersp = otherstart;
- otherep = otherend;
- while (1)
-     {
-     newstring(sp)
-     while (((sp != ep) && ((curstrlen < off) || ((t[off] & m) == 0))))
-       {
-       ++ sp;
-       ++ othersp;
-       newstring(sp)
-       }
-     if ( sp == ep )
-       break;
-     newstring(ep);
-     while (((sp != ep) && (curstrlen >= off) && ((t[off] & m) != 0)))
-       {
-       -- ep;
-       -- otherep;
-       newstring(ep)
-       }
-     if ( sp == ep )
-       break;
-     t = *sp;
-     *sp = *ep;
-     *ep = t;
-     t      = *othersp;
-     *othersp = *otherep;
-     *otherep = t;
-     }
- t = *sp;
- if ((curstrlen < off) || ((t[off] & m) == 0))
-    {
-    if ( ep != end )
-       {
-       ++ ep;
-       ++ otherep;
-       }
-    }
- else
-    {
-    if ( sp != start )
-       {
-       -- sp;
-       -- othersp;
-       }
-    }
- m >>= 1;
- if ( m == 0 )
-    {
-    m = 0x80;
-    if ( ++off >= maxstrlen )
-       return;
-    }
- if ( sp != start )
-    sortstrs_block ( start, sp, off, m, otherstart, othersp );
- if ( ep != end )
-    sortstrs_block ( ep, end, off, m, otherep, otherend );
-}
-
- /*-----------------------------------------------------------------*/
- /*  Sort 1 block of data on 1 bit; check for out-of-order entries  */
- /*-----------------------------------------------------------------*/
-static void
- sortstrs_block_oo (
-       Byte   **start,
-       Byte   **end,
-       int      offset,
-       Byte     mask,
-       int     *ostart,
-       int     *oend,
-       Byte   **otherstart,
-       Byte   **otherend)
-{
- reg   Byte   **sp, **ep;
- reg   int     *osp, *oep;
- reg   Byte     m;
- reg   int      off;
- reg   Byte    *t;
- reg   int      u;
- reg   int      curstrlen;
-       int      maxstrlen;
-       Byte   **othersp, **otherep;
-#define       newstring(ptr) \
- { \
- t = *ptr; \
- curstrlen = 0; \
- while ( *t++ ) ++ curstrlen; \
- if ( curstrlen > maxstrlen ) maxstrlen = curstrlen; \
- t = *ptr; \
- }
- maxstrlen = 0;
- sp  = start;
- ep  = end;
- osp = ostart;
- oep = oend;
- off = offset;
- m   = mask;
- othersp = otherstart;
- otherep = otherend;
- while (1)
-     {
-     newstring(sp)
-     while (((sp != ep) && ((curstrlen < off) || ((t[off] & m) == 0))))
-       {
-       ++ sp;
-       ++ osp;
-       ++ othersp;
-       newstring(sp)
-       }
-     if ( sp == ep )
-       break;
-     newstring(ep);
-     while (((sp != ep) && (curstrlen >= off) && ((t[off] & m) != 0)))
-       {
-       -- ep;
-       -- oep;
-       -- otherep;
-       newstring(ep)
-       }
-     if ( sp == ep )
-       break;
-     t   = *sp;
-     *sp = *ep;
-     *ep = t;
-     t      = *othersp;
-     *othersp = *otherep;
-     *otherep = t;
-     u    = *osp;
-     *osp = *oep;
-     *oep = u;
-     }
- t = *sp;
- if ((curstrlen < off) || ((t[off] & m) == 0))
-    {
-    if ( ep != end )
-       {
-       ++ ep;
-       ++ oep;
-       ++ otherep;
-       }
-    }
- else
-    {
-    if ( sp != start )
-       {
-       -- sp;
-       -- osp;
-       -- othersp;
-       }
-    }
- m >>= 1;
- if ( m == 0 )
-    {
-    m = 0x80;
-    if ( ++off >= maxstrlen )  /*  Finished sorting block of strings:    */
-       {                               /*  Restore duplicates to
-riginal order  */
-       reg Byte **cp;
-       reg int *ocp;
-         Byte **othercp;
-       if ( sp != start )
-        {
-        cp  = start;
-        ocp = ostart;
-        othercp = otherstart;
-        while ( cp != sp )
-           {
-           if ( *ocp > *(ocp+1) )
-               {
-               t       = *(cp+1);
-               *(cp+1) = *cp;
-               *cp     = t;
-               t               = *(othercp+1);
-               *(othercp+1)    = *othercp;
-               *othercp        = t;
-               u        = *(ocp+1);
-               *(ocp+1) = *ocp;
-               *ocp     = u;
-               if ( cp != start )
-                  {
-                  -- cp;
-                  -- ocp;
-                  -- othercp;
-                  continue;
-                  }
-               }
-           ++ cp;
-           ++ ocp;
-           ++ othercp;
-           }
-        }
-       if ( ep != end )
-        {
-        cp  = ep;
-        ocp = oep;
-        othercp = otherep;
-        while ( cp != end )
-           {
-           if ( *ocp > *(ocp+1) )
-               {
-               t       = *(cp+1);
-               *(cp+1) = *cp;
-               *cp     = t;
-               t               = *(othercp+1);
-               *(othercp+1)    = *othercp;
-               *othercp        = t;
-               u        = *(ocp+1);
-               *(ocp+1) = *ocp;
-               *ocp     = u;
-               if ( cp != ep )
-                  {
-                  -- cp;
-                  -- ocp;
-                  -- othercp;
-                  continue;
-                  }
-               }
-           ++ cp;
-           ++ ocp;
-           ++ othercp;
-           }
-        }
-       return;
-       }
-    }
- if ( sp != start )
-    sortstrs_block_oo ( start, sp, off, m, ostart, osp, otherstart, othersp );
- if ( ep != end )
-    sortstrs_block_oo ( ep, end, off, m, oep, oend, otherep, otherend );
-}
-
-
-/*     Function Name: InitManual
- *     Description: Initializes this manual section.
- *     Arguments: l_manual - local copy of the manual structure.
- *                 label - the button label for this section.
- *     Returns: none.
- */
-
-static void
-InitManual(Manual * l_manual, char * label)
-{
-  bzero( l_manual, sizeof(Manual) );           /* clear it. */
-  l_manual->blabel = label;                    /* set label. */
-}
-  
-#if defined(DEBUG)
-
-/*     Function Name: DumpManual
- *     Description: Debugging function that dumps the entire manual page
- *                   structure.
- *     Arguments: number - the number of sections.
- *     Returns: none.
- */
-
-void
-DumpManual(int number)
-{
-  register int i,j;
-  
-  for ( i = 0; i < number; i++) {
-    printf("label: %s\n", manual[i].blabel);
-    for (j = 0; j < manual[i].nentries; j++) 
-      printf("%s\n", manual[i].entries[j]);
-  }
-}
-
-#endif /* DEBUG */
-
-
-
-#ifdef MANCONF
-
-#if defined(MANCONFIGSTYLE_FreeBSD)
-
-/*    Function Name: ReadManConfig
- *    Description: Reads man.conf file used by FreeBSD man
- *      Argument: manpath - char array to return path in.
- *    Returns: TRUE if read was successful.
- */
-
-Bool
-ReadManConfig(char manpath[])
-{
-  FILE        *fp;
-  char        line[BUFSIZ];
-  char        *path;
-  Bool  firstpath = TRUE;
-
-  if (!(fp = fopen(MANCONF, "r")))
-    return(FALSE);
-
-  while (fgets(line, sizeof(line), fp)) {
-    path = strtok(line, " \t\n");
-    if (!path || *path == '#')
-      continue;
-    if (strcmp(path, "MANPATH_MAP") == 0)
-      path = strtok((char *)NULL, " \t\n");
-    else if (strcmp(path, "MANDATORY_MANPATH") != 0 &&
-            strcmp(path, "OPTIONAL_MANPATH") != 0)
-      return(FALSE);
-    path = strtok((char *)NULL, " \t\n");
-    if (!path || *path == '#')
-      return FALSE;
-    if (firstpath) {
-      strcpy(manpath, path);
-      firstpath = FALSE;
-    }
-    else if (!strstr(manpath,path)) {
-      strcat(manpath, ":");
-      strcat(manpath, path);
-    }
-  }
-  fclose(fp);
-  return(!firstpath);
-}
-
-
-#elif defined(MANCONFIGSTYLE_Linux) /* not FreeBSD */
-
-/*    Function Name: ReadManConfig
- *    Description: Reads man.conf file used by Linux man
- *      Argument: manpath - char array to return path in.
- *    Returns: TRUE if read was successful.
- */
-
-
-Bool
-ReadManConfig(char manpath[])
-{
-  FILE        *fp;
-  char        line[BUFSIZ];
-  char        *path;
-  Bool  firstpath = TRUE;
-
-  if (!(fp = fopen(MANCONF, "r")))
-    return(FALSE);
-
-  while (fgets(line, sizeof(line), fp)) {
-    path = strtok(line, " \t\n");
-    if (!path || *path == '#' || (strcmp(path, "MANPATH") != 0))
-      continue;
-    path = strtok((char *)NULL, " \t\n");
-    if (!path || *path == '#')
-      return FALSE;
-    if (firstpath) {
-      strcpy(manpath, path);
-      firstpath = FALSE;
-    }
-    else {
-      strcat(manpath, ":");
-      strcat(manpath, path);
-    }
-  }
-  fclose(fp);
-  return(!firstpath);
-}
-
-#elif defined(MANCONFIGSTYLE_OpenBSD) /* not FreeBSD or Linux */
-
-/*    Function Name: ReadManConfig
- *    Description: Reads man.conf file used by Open/NetBSD
- *      Argument: manpath - char array to return path in.
- *    Returns: TRUE if read was successful.
- *
- *     This version expands the glob pattern that can be found 
- *     in man.conf
- */
-#include <glob.h>
-
-Bool
-ReadManConfig(char manpath[])
-{
-    FILE        *fp;
-    char        line[BUFSIZ];
-    char        *path;
-    Bool        firstpath = TRUE;
-    glob_t      gs;
-    int         i;
-    
-    if (!(fp = fopen(MANCONF, "r")))
-       return(FALSE);
-    
-    while (fgets(line, sizeof(line), fp)) {
-       path = strtok(line, " \t\n");
-       if (!path || *path == '#')
-           continue;
-       if (strcmp(path, "_default")) {
-           /* for now */
-           continue;
-       }
-       memset(&gs, 0, sizeof(glob_t));
-       while ((path = strtok((char *)NULL, " \t\n"))) {
-           if (glob(path, GLOB_BRACE, NULL, &gs) < 0) {
-               fclose(fp);
-               return FALSE;
-           }
-       } /* while */
-       for (i = 0; i < gs.gl_pathc; i++) {
-           
-           if (firstpath) {
-               strcpy(manpath, gs.gl_pathv[i]);
-               firstpath = FALSE;
-           }
-           else {
-               strcat(manpath, ":");
-               strcat(manpath, gs.gl_pathv[i]);
-           }
-       } /* for */
-       globfree(&gs);
-    }
-    fclose(fp);
-    return(!firstpath);
-}
-
-#elif defined(MANCONFIGSTYLE_BSD) /* not FreeBSD, Linux, or OpenBSD */
-
-/*    Function Name: ReadManConfig
- *    Description: Reads man.conf file used by BSD 4.4
- *      Argument: manpath - char array to return path in.
- *    Returns: TRUE if read was successful.
- */
-
-Bool
-ReadManConfig(manpath)
-
-char  manpath[];
-
-{
-  FILE        *fp;
-  char        line[BUFSIZ];
-  char        *path;
-  Bool  firstpath = TRUE;
-
-  if (!(fp = fopen(MANCONF, "r")))
-    return(FALSE);
-
-  while (fgets(line, sizeof(line), fp)) {
-    path = strtok(line, " \t\n");
-    if (!path || *path == '#' || strcmp(path, "_default"))
-      continue;
-    while ((path = strtok((char *)NULL, " \t\n"))) {
-      if (firstpath) {
-        strcpy(manpath, path);
-        firstpath = FALSE;
-      }
-      else {
-        strcat(manpath, ":");
-        strcat(manpath, path);
-      }
-    }
-  }
-  fclose(fp);
-  return(!firstpath);
-}
-
-#else /* not BSD */
-
-#error "MANCONF defined (in vendor.h) for unknown operating system."
-
-#endif /* MANCONFIGSTYLE == FreeBSD ... BSD */
-
-#endif /* MANCONF */
diff --git a/xman/man.h b/xman/man.h
deleted file mode 100644 (file)
index f7f04b4..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-/* $XConsortium: man.h,v 1.31 94/12/16 21:36:53 gildea Exp $ */
-/* $XdotOrg: xc/programs/xman/man.h,v 1.6 2004/07/29 00:40:35 gisburn Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/man.h,v 1.4 2001/07/25 15:05:27 dawes Exp $ */
-
-
-/* X toolkit header files */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-
-#include <X11/Xaw/Cardinals.h>
-
-/* Std system and C header files */
-
-#include <stdio.h>
-#include <limits.h>
-
-#include <X11/Xfuncs.h>
-#include <X11/Xos.h>
-
-/* X include files */
-
-#include <X11/Xatom.h>
-
-/* Widget header files. */
-
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/MenuButton.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/Paned.h>
-#include <X11/Xaw/Viewport.h>
-
-/* program specific header files. */
-
-#include "ScrollByL.h"
-
-#include "version.h"
-#include "defs.h"
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#ifdef DEBUG
-#  define Log(x)   { if(True)  printf x; }
-#else
-#  define Log(x)   { if(False) printf x; }
-#endif /* DEBUG */
-
-/* 
- * Assigning values here allows the user of Bitwise Or.
- */
-
-typedef struct _XmanFonts {
-  XFontStruct * directory;             /* The font for the directory.  */
-} XmanFonts;
-
-typedef struct _XmanCursors {
-  Cursor top,                  /* The top Cursor, default for xman. */
-    help,                      /* The top cursor for the help menu. */
-    manpage,                   /* The cursor for the Manpage. */
-    search_entry;              /* The cursor for the text widget in the
-                                  search box.*/
-  Pixel fg_color;              /* foreground color of cursors. */
-  Pixel bg_color;              /* background color of cursors. */
-} XmanCursors;
-
-typedef struct _ManPageWidgets {
-  Widget manpage,              /* The manual page window (scrolled) */
-    directory,                 /* The widget in which all directories will
-                                  appear. */
-    *box;                      /* The boxes containing the sections. */
-} ManPageWidgets;
-
-typedef struct _MenuStruct {
-  caddr_t data;
-  int number;
-  XrmQuark quark;
-} MenuStruct;
-
-/*
- * The manual sections and entries
- */
-
-typedef struct tManual {
-  char * blabel;               /* The button label. */
-  char ** entries;             /* The individual man page file names. */
-  char ** entries_less_paths;   /* Entry names only */
-  int nentries;                        /* how many (TOTAL)*/
-  int nalloc;                  /* how much space allocated */
-  int flags;                   /* suffix, fold */
-} Manual;
-   
-/* psuedo Globals that are specific to each manpage created. */
-
-typedef struct _ManpageGlobals{
-  int current_directory;       /* The directory currently being shown 
-                                  on this manpage. */
-  Boolean dir_shown,           /* True if the directory is then current
-                                  visable screen */
-    both_shown;                        /* If true then both the manpage and
-                                  the directory are to be shown.*/
-  Widget label,                        /* The label widget at the top of the page. */
-    standby,                   /* The please standby widget. */
-    save,                      /* The "would you like to save?" widget. */
-    search_widget,             /* The search widget popup. */
-    help_button,               /* The help button. */
-    option_menu,               /* The option menu. */
-    text_widget;               /* text widget containing search string. */
-  /* Widgets (Objects really) for the command menu entries. */ 
-  Widget dir_entry, manpage_entry, help_entry, 
-    search_entry, both_screens_entry, remove_entry, 
-    open_entry, print_entry, version_entry, quit_entry; 
-#ifdef INCLUDE_XPRINT_SUPPORT
-  /* Print objects and data */
-  Widget printdialog_shell;     /* Shell for the print dialog */
-  Widget printdialog;           /* Print dialog */
-#endif /*INCLUDE_XPRINT_SUPPORT */
-  /* Misc. */
-
-  char manpage_title[80];       /* The label to use for the current manpage. */
-
-  char save_file[80];          /* the name of the file to save fomatted 
-                                  page into. */
-  char tempfile[80];           /* the name of the file to copy the formatted
-                                  page from. */
-  Boolean compress;            /* Compress file on save? */
-  Boolean gzip;                        /* Gzip file on save? */
-  Boolean bzip2;               /* Bzip2 file on save? */
-  Boolean lzma;
-  Boolean deletetempfile;      /* Need to delete tempfile when done? */
-  char ** section_name;                /* The name of each of the sections */
-
-  ManPageWidgets manpagewidgets; /* The manpage widgets. */
-
-  /* Things to remember when cleaning up when killing manpage. */
-
-  Widget This_Manpage;         /* a pointer to the root of
-                                  this manpage. */
-
-  FILE  *curr_file;             /* Current file shown in manpage widget */
-} ManpageGlobals;
-
-
-/* Resource manager sets these. */
-
-typedef struct _Xman_Resources {
-  XmanFonts fonts;             /* The fonts used for the man pages. */
-  XmanCursors cursors;         /* The cursors for xman. */
-  Boolean show_help_syntax;    /* True if syntax message should be dumped to
-                                  stdout. */
-  Boolean both_shown_initial;  /* The initial state of the manual pages
-                                  show two screens or only one. */
-  Boolean top_box_active;      /* Put up the Top Box. */
-  Boolean clear_search_string; /* clear the search string each time it
-                                  is popped down? */
-  int directory_height;                /* The default height of directory in 
-                                  both_shown mode. */
-  char * help_file;            /* The name of the help file. */
-  char * title;                        /* The title for topBox */
-  Boolean iconic;              /* Should topBox come up in an iconic state */
-} Xman_Resources;
-
-/************************************************************
- *
- * Function Defintions 
- * 
- ************************************************************/
-
-/*
- * This is easier than trying to find all calls to StrAlloc().
- */
-
-#define StrAlloc(ptr) XtNewString(ptr)
-
-/* Standard library function definitions. */
-#include <stdlib.h>
-
-/* buttons.c */
-
-ManpageGlobals * InitPsuedoGlobals(void);
-Widget CreateManpage(FILE * file);
-void CreateManpageWidget(ManpageGlobals * man_globals, char * name, Boolean full_instance);
-void FormUpWidgets(Widget parent, char ** full_size, char ** half_size);
-void MakeDirectoryBox(ManpageGlobals *man_globals, Widget parent, Widget *dir_disp, int section);
-void MakeSaveWidgets(ManpageGlobals *man_globals, Widget parent);
-void MakeTopBox(void);
-
-/* handler.c */
-
-void DirPopupCallback(Widget w, XtPointer pointer, XtPointer junk);
-void DirectoryHandler(Widget w, XtPointer global_pointer, XtPointer ret_val);
-void OptionCallback(Widget w, XtPointer pointer, XtPointer junk);
-void Popup(Widget w, XtGrabKind grab_kind);
-
-/* Action Routines. */
-
-void CreateNewManpage(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void GotoPage(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void PopupHelp(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void PopupSearch(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void Quit(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void RemoveThisManpage(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void SaveFormattedPage(Widget w, XEvent * event, String * params, Cardinal * num_params);
-void Search(Widget w, XEvent * event, String * params, Cardinal * num_params);
-#ifdef INCLUDE_XPRINT_SUPPORT
-void PrintThisManpage(Widget w, XEvent * event, String * params, Cardinal * num_params);
-#endif /* INCLUDE_XPRINT_SUPPORT */
-void ShowVersion(Widget w, XEvent * event, String * params, Cardinal * num_params);
-
-/* help.c */
-
-Boolean MakeHelpWidget(void);
-Boolean OpenHelpfile(ManpageGlobals * man_globals);
-
-/* man.c */
-Bool ReadManConfig(char manpath[]);
-int Man(void);
-
-/* misc.c */
-FILE * FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num);
-ManpageGlobals * GetGlobals(Widget w);
-void AddCursor(Widget w, Cursor cursor);
-void ChangeLabel(Widget w, char * str);
-void OpenFile(ManpageGlobals * man_globals, FILE * file);
-void PopupWarning(ManpageGlobals * man_globals, char * string);
-void PositionCenter(Widget widget, int x, int y, int above, int left, int v_space, int h_space);
-void PrintError(char * string);
-void RemoveGlobals(Widget w);
-void SaveGlobals(Widget w, ManpageGlobals * globals);
-void ParseEntry(char *entry, char *path, char *sect, char *page);
-FILE * Format(ManpageGlobals * man_globals, char * entry);
-
-/* search */
-FILE * DoSearch(ManpageGlobals * man_globals, int type);
-void MakeSearchWidget(ManpageGlobals * man_globals, Widget parent);
-
-/* tkfunctions.c */
-
-int Width(Widget);
-int Height(Widget);
-int BorderWidth(Widget);
-char * Name(Widget);
diff --git a/xman/misc.c b/xman/misc.c
deleted file mode 100644 (file)
index b5b9f07..0000000
+++ /dev/null
@@ -1,1285 +0,0 @@
-/* $XConsortium: misc.c,v 1.31 94/12/16 21:36:53 gildea Exp $ */
-/* $XdotOrg: xc/programs/xman/misc.c,v 1.6 2004/09/02 08:40:33 kem Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/misc.c,v 1.10 2003/08/02 17:35:48 herrb Exp $ */
-
-/*
- * xman - X window system manual page display program.
- * Author:    Chris D. Peterson, MIT Project Athena
- * Created:   October 27, 1987
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "globals.h"
-#include "vendor.h"
-#include <X11/Xos.h>           /* sys/types.h and unistd.h included in here */
-#include <sys/stat.h>
-#include <errno.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Shell.h>
-
-static FILE * Uncompress(ManpageGlobals * man_globals, char * filename);
-#ifndef HAS_MKSTEMP
-static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename,
-                              char * output);
-static Boolean UncompressUnformatted(ManpageGlobals * man_globals,
-                                    char * entry, char * filename);
-#else
-static Boolean UncompressNamed(ManpageGlobals * man_globals, char * filename,
-                              char * output, FILE ** output_fd);
-static Boolean UncompressUnformatted(ManpageGlobals * man_globals,
-                                    char * entry, char * filename,
-                                    FILE **file);
-#endif
-#ifdef HANDLE_ROFFSEQ
-static Boolean ConstructCommand(char * cmdbuf, char * path, char * filename, char * tempfile);
-#endif
-
-#if defined(ISC) || defined(__SCO__) || defined(__UNIXWARE__)
-static char *uncompress_format = NULL;
-static char *uncompress_formats[] =
-      {  UNCOMPRESS_FORMAT_1,
-         UNCOMPRESS_FORMAT_2,
-         UNCOMPRESS_FORMAT_3
-      };
-#endif
-
-/*     Function Name: PopupWarning
- *     Description: This function pops upa warning message.
- *     Arguments: string - the specific warning string.
- *     Returns: none
- */
-
-static Widget warnShell, warnDialog;
-
-static void
-PopdownWarning(Widget w, XtPointer client, XtPointer call)
-{
-  XtPopdown((Widget)client);
-}
-
-void
-PopupWarning(ManpageGlobals * man_globals, char * string)
-{
-  int n;
-  Arg wargs[3];
-  Dimension topX, topY;
-  char buffer[BUFSIZ];
-  Boolean hasPosition;
-
-  snprintf( buffer, sizeof(buffer), "Xman Warning: %s", string);
-  hasPosition = FALSE;
-  if (top)
-  {
-    n=0;
-    XtSetArg(wargs[n], XtNx, &topX); n++;
-    XtSetArg(wargs[n], XtNy, &topY); n++;
-    XtGetValues(top, wargs, n);
-    hasPosition = TRUE;
-  }
-
-  if (man_globals != NULL)
-    ChangeLabel(man_globals->label, buffer);
-  if (man_globals->label == NULL) {
-    n=0;
-    if (hasPosition)
-    {
-      XtSetArg(wargs[n], XtNx, topX); n++;
-      XtSetArg(wargs[n], XtNy, topY); n++;
-    }
-    XtSetArg(wargs[n], XtNtransientFor, top); n++;
-    warnShell = XtCreatePopupShell("warnShell", transientShellWidgetClass,
-                                  initial_widget, wargs, n);
-    XtSetArg(wargs[0], XtNlabel, buffer);
-    warnDialog = XtCreateManagedWidget("warnDialog", dialogWidgetClass,
-                                      warnShell, wargs, 1);
-    XawDialogAddButton(warnDialog, "dismiss", PopdownWarning,
-                      (XtPointer)warnShell);
-    XtRealizeWidget(warnShell);
-    Popup(warnShell, XtGrabNone);
-  }
-}
-
-/*     Function Name: PrintError
- *     Description: This Function prints an error message and exits.
- *     Arguments: string - the specific message.
- *     Returns: none. - exits tho.
- */
-
-void
-PrintError(char * string)
-{
-  fprintf(stderr,"Xman Error: %s\n",string);
-  exit(EXIT_FAILURE);
-}
-
-/*     Function Name: OpenFile
- *     Description: Assignes a file to the manpage.
- *     Arguments: man_globals - global structure.
- *                 file        - the file pointer.
- *     Returns: none
- */
-
-void
-OpenFile(ManpageGlobals * man_globals, FILE * file)
-{
-  Arg arglist[1];
-  Cardinal num_args = 0;
-  
-  if (man_globals->curr_file) {
-#if 0 /* Ownership rules need to be fixed first */
-    fclose(man_globals->curr_file);
-#endif
-  }
-  man_globals->curr_file = file;
-
-  XtSetArg(arglist[num_args], XtNfile, man_globals->curr_file); num_args++;
-  XtSetValues(man_globals->manpagewidgets.manpage, arglist, num_args);
-}
-
-
-/*     Function Name: FindManualFile
- *     Description: Opens the manual page file given the entry information.
- *     Arguments: man_globals - the globals info for this manpage.
- *                 section_num - section number of the man page.
- *                 entry_num   - entry number of the man page.
- *     Returns: fp - the file pointer
- *
- * NOTES:
- *
- * If there is a uncompressed section it will look there for uncompresed
- * manual pages first and then for individually compressed file in the
- * uncompressed section.
- *
- * If there is a compressed directory then it will also look there for
- * the manual pages.
- *
- * If both of these fail then it will attempt to format the manual page.
- */
-
-FILE *
-FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num)
-{
-  FILE * file;
-  char path[BUFSIZ], page[BUFSIZ], section[BUFSIZ], *temp;
-  char filename[BUFSIZ];
-  char * entry = manual[section_num].entries[entry_num];
-  int len_cat = strlen(CAT);
-#if defined(ISC) || defined(__SCO__) || defined(__UNIXWARE__)
-  int i;
-#endif
-
-  temp = CreateManpageName(entry, 0, 0);
-  snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title),
-    "The current manual page is: %s.", temp);
-  XtFree(temp);
-
-  ParseEntry(entry, path, section, page);
-
-/*
- * Look for uncompressed files first.
- */
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-  /* look in machine subdir first */
-  snprintf(filename, sizeof(filename), "%s/%s%s/%s/%s", path, CAT,
-         section + len_cat, MACHINE, page);
-  if ( (file = fopen(filename,"r")) != NULL)
-    return(file);
-#endif
-
-  snprintf(filename, sizeof(filename), "%s/%s%s/%s", 
-    path, CAT, section + len_cat, page);
-  if ( (file = fopen(filename,"r")) != NULL)
-    return(file);
-
-/*
- * Then for compressed files in an uncompressed directory.
- */
-
-#if !defined(ISC) && !defined(__UNIXWARE__)
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-  /* look in machine subdir first */
-  snprintf(filename, sizeof(filename), "%s/%s%s/%s/%s.%s", path, CAT,
-         section + len_cat, MACHINE, page, COMPRESSION_EXTENSION);
-  if ( (file = Uncompress(man_globals, filename)) != NULL)
-    return(file);
-#endif
-  snprintf(filename, sizeof(filename), "%s/%s%s/%s.%s", path, CAT,
-         section + len_cat, page, COMPRESSION_EXTENSION);
-  if ( (file = Uncompress(man_globals, filename)) != NULL)
-    return(file);
-#ifdef GZIP_EXTENSION
-  else {
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-      /* look in machine subdir first */
-      snprintf(filename, sizeof(filename), "%s/%s%s/%s/%s.%s", path, CAT,
-             section + len_cat, MACHINE, page, GZIP_EXTENSION);
-      if ( (file = Uncompress(man_globals, filename)) != NULL)
-         return(file);
-#endif
-    snprintf(filename, sizeof(filename), "%s/%s%s/%s.%s", path, CAT,
-           section + len_cat, page, GZIP_EXTENSION);
-    if ( (file = Uncompress(man_globals, filename)) != NULL)
-      return(file);
-  }
-#endif
-#ifdef BZIP2_EXTENSION
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-      /* look in machine subdir first */
-      snprintf(filename, sizeof(filename), "%s/%s%s/%s/%s.%s", path, CAT,
-             section + len_cat, MACHINE, page, BZIP2_EXTENSION);
-      if ( (file = Uncompress(man_globals, filename)) != NULL)
-         return(file);
-#endif
-  {
-    sprintf(filename, "%s/%s%s/%s.%s", path, CAT,
-           section + len_cat, page, BZIP2_EXTENSION);
-    if ( (file = Uncompress(man_globals, filename)) != NULL)
-      return(file);
-  }
-#endif
-#ifdef LZMA_EXTENSION
-  {
-    sprintf(filename, "%s/%s%s/%s.%s", path, CAT,
-           section + len_cat, page, LZMA_EXTENSION);
-    if ( (file = Uncompress(man_globals, filename)) != NULL)
-      return(file);
-  }
-#endif
-#else
-  for(i = 0; i < strlen(COMPRESSION_EXTENSIONS); i++) {
-      snprintf(filename, sizeof(filename), "%s/%s%s/%s.%c", path, CAT,
-            section + len_cat, page, COMPRESSION_EXTENSIONS[i]);
-      uncompress_format = uncompress_formats[i];
-#ifdef DEBUG
-      printf("Trying .%c ...\n", COMPRESSION_EXTENSIONS[i]);
-#endif
-      if ( (file = Uncompress(man_globals, filename)) != NULL)
-       return(file);
-  }
-#endif
-
-/*
- * And lastly files in a compressed directory.
- *
- * The directory is not actually compressed it is just named man#.Z
- * and all files in it are compressed without the .Z extension.
- * HP does it this way (really :-).
- */
-
-  snprintf(filename, sizeof(filename), "%s/%s%s.%s/%s", path, CAT, 
-          section + len_cat, COMPRESSION_EXTENSION, page);
-  if ( (file = Uncompress(man_globals, filename)) != NULL)
-    return(file);
-/*
- * We did not find any preformatted manual pages, try to format it.
- */
-
-  return(Format(man_globals, entry));
-}
-
-/*     Function Namecompress
- *     Description: This function will attempt to find a compressed man
- *                   page and uncompress it.
- *     Arguments: man_globals - the psuedo global info.
- *                 filename - name of file to uncompress.
- *     Returns:; a pointer to the file or NULL.
- */
-
-static FILE *
-Uncompress(ManpageGlobals * man_globals, char * filename)
-{
-  char tmp_file[BUFSIZ], error_buf[BUFSIZ];
-  FILE * file;
-
-#ifndef HAS_MKSTEMP
-  if ( !UncompressNamed(man_globals, filename, tmp_file) )
-    return(NULL);
-
-  else if ((file = fopen(tmp_file, "r")) == NULL) {
-      sprintf(error_buf, "Something went wrong in retrieving the %s",
-             "uncompressed manual page try cleaning up /tmp.");
-      PopupWarning(man_globals, error_buf);
-  }
-#else
-  if (!UncompressNamed(man_globals, filename, tmp_file, &file)) {
-      sprintf(error_buf, "Something went wrong in retrieving the %s",
-             "uncompressed manual page try cleaning up /tmp.");
-      PopupWarning(man_globals, error_buf);
-      return(NULL);
-  }
-#endif
-
-  unlink(tmp_file);            /* remove name in tree, it will remain
-                                  until we close the fd, however. */
-  return(file);
-}
-
-/*     Function Name: UncompressNamed
- *     Description: This function will attempt to find a compressed man
- *                   page and uncompress it.
- *     Arguments: man_globals - the psuedo global info.
- *                 filename - name of file to uncompress.
- * RETURNED        output - the file name output (must be an allocated string).
- *     Returns:; TRUE if the file was found.
- */
-
-#ifndef HAS_MKSTEMP
-static Boolean
-UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output)
-#else
-static Boolean
-UncompressNamed(ManpageGlobals * man_globals, char * filename, char * output,
-               FILE ** output_fd)
-#endif
-{
-  char tmp[BUFSIZ], cmdbuf[BUFSIZ], error_buf[BUFSIZ];
-  struct stat junk;
-#ifdef HAS_MKSTEMP
-  int fd;
-#endif
-
-  if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
-    if (errno != ENOENT) {
-      snprintf(error_buf, sizeof(error_buf),
-              "Error while stating file %s, errno = %d", filename, errno);
-      PopupWarning(man_globals, error_buf);
-    }
-    return(FALSE);
-  }
-
-/*
- * Using stdin is necessary to fool zcat since we cannot guarentee
- * the .Z extension.
- */
-
-  strcpy(tmp, MANTEMP);                /* get a temp file. */
-#ifndef HAS_MKSTEMP
-  (void) mktemp(tmp);
-#else
-  fd = mkstemp(tmp);
-  if (fd < 0) {
-      PopupWarning(man_globals, "Error creating a temp file");
-      return FALSE;
-  }
-  *output_fd = fdopen(fd, "r");
-#endif
-  strcpy(output, tmp);
-
-#ifdef GZIP_EXTENSION
-  if (streq(filename + strlen(filename) - strlen(GZIP_EXTENSION),
-           GZIP_EXTENSION))
-    snprintf(cmdbuf, sizeof(cmdbuf), GUNZIP_FORMAT, filename, output);
-  else
-#endif
-#ifdef BZIP2_EXTENSION
-  if (streq(filename + strlen(filename) - strlen(BZIP2_EXTENSION),
-           BZIP2_EXTENSION))
-    sprintf(cmdbuf, BUNZIP2_FORMAT, filename, output);
-  else
-#endif
-#ifdef LZMA_EXTENSION
-  if (streq(filename + strlen(filename) - strlen(LZMA_EXTENSION),
-           LZMA_EXTENSION))
-    sprintf(cmdbuf, UNLZMA_FORMAT, filename, output);
-  else
-#endif
-  snprintf(cmdbuf, sizeof(cmdbuf), UNCOMPRESS_FORMAT, filename, output);
-  if(system(cmdbuf) == 0)      /* execute search. */
-    return(TRUE);
-
-  snprintf(error_buf, sizeof(error_buf),
-          "Error while uncompressing, command was: %s", cmdbuf);
-  PopupWarning(man_globals, error_buf);
-  return(FALSE);
-}
-
-#if defined(SMAN) && defined(SFORMAT)
-/*     Function Name: SgmlToRoffNamed
- *     Description: This function will attempt to find an SGML man
- *                   page and convert it to roff format.
- *     Arguments: man_globals - the psuedo global info.
- *                 filename - name of file to uncompress.
- * RETURNED        output - the file name output (must be an allocated string).
- *     Returns:; TRUE if the file was found.
- */
-
-#ifndef HAS_MKSTEMP
-static Boolean
-SgmlToRoffNamed(ManpageGlobals * man_globals, char * filename, char * output)
-#else
-static Boolean
-SgmlToRoffNamed(ManpageGlobals * man_globals, char * filename, char * output,
-               FILE ** output_fd)
-#endif
-{
-  char tmp[BUFSIZ], cmdbuf[BUFSIZ], error_buf[BUFSIZ];
-  struct stat junk;
-#ifdef HAS_MKSTEMP
-  int fd;
-#endif
-
-  if (stat(filename, &junk) != 0) { /* Check for existance of the file. */
-    if (errno != ENOENT) {
-      snprintf(error_buf, sizeof(error_buf),
-              "Error while stating file %s, errno = %d", filename, errno);
-      PopupWarning(man_globals, error_buf);
-    }
-    return(FALSE);
-  }
-
-  strcpy(tmp, MANTEMP);                /* get a temp file. */
-#ifndef HAS_MKSTEMP
-  (void) mktemp(tmp);
-#else
-  fd = mkstemp(tmp);
-  if (fd < 0) {
-      PopupWarning(man_globals, "Error creating a temp file");
-      return FALSE;
-  }
-  *output_fd = fdopen(fd, "r");
-#endif
-  strcpy(output, tmp);
-
-  snprintf(cmdbuf, sizeof(cmdbuf), "%s %s > %s", SFORMAT, filename, output);
-  if(system(cmdbuf) == 0)      /* execute search. */
-    return(TRUE);
-
-  snprintf(error_buf, sizeof(error_buf),
-          "Error while converting from sgml, command was: %s", cmdbuf);
-  PopupWarning(man_globals, error_buf);
-  return(FALSE);
-}
-#endif /* defined (SMAN) && defined(SFORMAT) */
-
-/*     Function Name: Format
- *     Description: This funtion formats the manual pages and interfaces
- *                   with the user.
- *     Arguments: man_globals - the psuedo globals
- *                 file - the file pointer to use and return
- *                 entry - the current entry struct.
- *                 current_box - The current directory being displayed.
- *     Returns: none.
- */
-
-/* ARGSUSED */
-
-FILE *
-Format(ManpageGlobals * man_globals, char * entry)
-{
-  FILE * file = NULL;
-#ifdef HAS_MKSTEMP
-  int fd;
-#endif
-  Widget manpage = man_globals->manpagewidgets.manpage;
-  char cmdbuf[BUFSIZ], tmp[BUFSIZ], filename[BUFSIZ], error_buf[BUFSIZ];
-  char path[BUFSIZ], sect[BUFSIZ];
-  XEvent event;
-  Position x,y;                        /* location to pop up the
-                                  "would you like to save" widget. */
-
-#ifndef HAS_MKSTEMP
-  if ( !UncompressUnformatted(man_globals, entry, filename) ) {
-#else
-  if ( !UncompressUnformatted(man_globals, entry, filename, &file) ) {
-#endif
-    /* We Really could not find it, this should never happen, yea right. */
-    snprintf(error_buf, sizeof(error_buf),
-            "Could not open manual page, %s", entry);
-    PopupWarning(man_globals, error_buf);
-    XtPopdown( XtParent(man_globals->standby) );
-    return(NULL);
-  }
-
-#ifndef HAS_MKSTEMP
-  if ((file = fopen(filename, "r")) != NULL) {
-#else
-  if (file != NULL) {
-#endif
-    char line[BUFSIZ];
-
-    if (fgets(line, sizeof(line), file) != NULL) {
-       if (strncmp(line, ".so ", 4) == 0) {
-         line[strlen(line) - 1] = '\0';
-         fclose(file);
-         unlink(filename);
-         if (line[4] != '/') {
-           char *ptr = NULL;
-
-           strcpy(tmp, entry);
-           if ((ptr = rindex(tmp, '/')) != NULL) {
-             *ptr = '\0';
-             if ((ptr = rindex(tmp, '/')) != NULL)
-               ptr[1] = '\0';
-           }
-         }
-         else
-           *tmp = '\0';
-         snprintf(filename, sizeof(filename), "%s%s", tmp, line + 4);
-
-         return (Format(man_globals, filename));
-       }
-    }
-    fclose(file);
-  }
-
-  Popup(XtParent(man_globals->standby), XtGrabExclusive);
-  while ( !XCheckTypedWindowEvent(XtDisplay(man_globals->standby),
-                                 XtWindow(man_globals->standby),
-                                 Expose, &event) );
-  XtDispatchEvent( &event );
-  XFlush(XtDisplay(man_globals->standby));
-
-  strcpy(tmp,MANTEMP);                   /* Get a temp file. */
-#ifndef HAS_MKSTEMP
-  (void) mktemp(tmp);
-#else
-  fd = mkstemp(tmp);
-  file = fdopen(fd, "r");
-#endif
-  strcpy(man_globals->tempfile, tmp);
-
-  ParseEntry(entry, path, sect, NULL);
-
-#ifndef HANDLE_ROFFSEQ
-#ifndef HAS_MKSTEMP
-  snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s > %s %s", path, TBL,
-         filename, FORMAT, man_globals->tempfile, "2> /dev/null");
-#else
-  snprintf(cmdbuf, sizeof(cmdbuf), "cd %s ; %s %s %s >> %s %s", path, TBL,
-         filename, FORMAT, man_globals->tempfile, "2> /dev/null");
-#endif
-#else
-  /* Handle more flexible way of specifying the formatting pipeline */
-  if (! ConstructCommand(cmdbuf, path, filename, man_globals->tempfile)) {
-     sprintf(error_buf, "Constructed command was too long!");
-     PopupWarning(man_globals, error_buf);
-     file = NULL;
-  }
-  else
-#endif /* HANDLE_ROFFSEQ */
-
-  if(system(cmdbuf) != 0) {    /* execute search. */
-    snprintf(error_buf, sizeof(error_buf),
-           "Something went wrong trying to run the command: %s", cmdbuf);
-    PopupWarning(man_globals, error_buf);
-    file = NULL;
-  }
-  else {
-#ifndef HAS_MKSTEMP
-    if ((file = fopen(man_globals->tempfile,"r")) == NULL) {
-      sprintf(error_buf, "Something went wrong in retrieving the %s",
-             "temp file, try cleaning up /tmp");
-      PopupWarning(man_globals, error_buf);
-    }
-    else {
-#endif
-
-      XtPopdown( XtParent(man_globals->standby) );
-
-      if ( (man_globals->save == NULL) ||
-          (man_globals->manpagewidgets.manpage == NULL) )
-       unlink(man_globals->tempfile);
-      else {
-       char * ptr, catdir[BUFSIZ];
-
-       /*
-        * If the catdir is writeable then ask the user if he/she wants to
-        * write the man page to it.
-        */
-
-       strcpy(catdir, man_globals->save_file);
-       if ( (ptr = rindex(catdir, '/')) != NULL) {
-         *ptr = '\0';
-
-         if ( access(catdir, W_OK) != 0 )
-           unlink(man_globals->tempfile);
-         else {
-           x = (Position) Width(man_globals->manpagewidgets.manpage)/2;
-           y = (Position) Height(man_globals->manpagewidgets.manpage)/2;
-           XtTranslateCoords(manpage, x, y, &x, &y);
-           PositionCenter( man_globals->save, (int) x, (int) y, 0, 0, 0, 0);
-           XtPopup( man_globals->save, XtGrabExclusive);
-         }
-       }
-       else
-         unlink(man_globals->tempfile);
-      }
-#ifndef HAS_MKSTEMP
-    }
-#endif
-  }
-
- /*
-  * If the original was compressed or in another format, delete temporary file.
-  */
-  if (man_globals->deletetempfile) 
-    unlink(filename);
-
-  return(file);
-}
-
-#ifdef HANDLE_ROFFSEQ
-/*      Function Name: ConstructCommand
- *      Description: Constructs the pipeline of commands necessary to format
- *                   a manual page.
- *      Arguments: cmdbuf - the buffer into which to write the command
- *                 path - the directory in which the original man page resides
- *                 filename - the (uncompressed) manpage source file
- *                 tempfile - the name of a temporary file to direct the final
- *                  output of the pipeline into
- *      Returns: TRUE if the command fit into the buffer, FALSE if it would
- *               be too long (more than BUFSIZ characters)
- */
-static Boolean
-ConstructCommand(cmdbuf, path, filename, tempfile)
-   char *cmdbuf, *path, *filename, *tempfile;
-{
-   /* The original code did the following to produce a command line:
-    *   sprintf(cmdbuf,"cd %s ; %s %s %s > %s %s", path, TBL,
-    *      filename, FORMAT, man_globals->tempfile, "2> /dev/null");
-    * We are more flexible and follow more or less the algorithm used
-    * by the Linux man command:
-    *  + Obtain a string of letters from the following sources in order
-    *    of preference:
-    *    + a command line option (not implemented in xman; it's probably not
-    *      useful)
-    *    + the first line of the manpage source, if it is of the form:
-    *      '\" <string>
-    *    + the MANROFFSEQ environment variable
-    *    + a default string; this is "".
-    *  + Interpret the string as a pipeline of filters:
-    *    + e = eqn   g = grap   p = pic   t = tbl   v = vgrind   r = refer
-    *  + zsoelim is always run as the first preprocessor in any case.
-    *
-    * Strictly speaking we should save a catpage iff the string comes
-    * from the file or is the default.
-    *
-    * You'll notice that we format a man page into ASCII text output and then
-    * attempt to interpret things like L^HL as bold and so forth. This
-    * is so obviously the Wrong Thing it's untrue.
-    */
-   char *c = cmdbuf;           /* current posn in buffer */
-   int left = BUFSIZ;          /* space left in buffer */
-   int used;
-   char *fmt;
-   FILE *file;
-   char fmtbuf[128];
-   int gotfmt = 0;             /* set to 1 if we got a directive from source */
-   char *fname = NULL;
-#ifdef __UNIXOS2__
-   int i;
-#endif
-
-   fmt = NULL;
-   /* If you have a command line option that gives a setting for fmt,
-      set it here. */
-
-   if (!fmt) {
-      /* This is the tricky bit: extract a format string from the source file
-       * Annoyingly, filename might be relative or absolute. We cheat and
-       * use system to get the thing to a known absoute filename.
-       */
-      if (filename[0] == '/') {
-         fname = filename;
-      } else {
-         fname = malloc(strlen(path) + 1 + strlen(filename) + 1);
-         if (!fname)
-            return FALSE;
-         sprintf(fname, "%s/%s", path, filename);
-      }
-      if ((file = fopen(fname, "r")) &&
-          (fgets(fmtbuf, sizeof(fmtbuf), file)) &&
-          (!memcmp(fmtbuf, "'\\\" ", 4))) {
-                              /* that's squote-backslash-dquote-space */
-         int len;
-         fmt = fmtbuf + 3;
-         len = strlen(fmt);
-         if (len && (fmt[len-1] == '\n')) {
-            fmt[len-1] = 0;
-            gotfmt++;
-         }
-      }
-      if (fname && fname != filename)
-         free(fname);
-      if (!gotfmt)                                /* not there or some error */
-      {
-         fmt = getenv("MANROFFSEQ");
-      }
-   }
-
-   if (!fmt)
-   {
-      fmt = DEFAULT_MANROFFSEQ;
-   }
-
-
-   /* Start with the first fixed part of the command line */
-#ifdef __UNIXOS2__
-   for (i = 0; i < strlen(path); i++) {
-     if (path[i] == '/')
-       path[i] = '\\';
-   }
-   used = snprintf(c, left, "cd %s & %s %s ", path, ZSOELIM, filename);
-#else
-   used = snprintf(c, left, "cd %s; %s %s ", path, ZSOELIM, filename);
-#endif
-   left -= used;
-   c += used;
-   if (left <= 1)
-      return (FALSE);
-
-   /* Now add preprocessors of the form '| processor' */
-   for ( ; *fmt; fmt++)
-   {
-      char *filter;
-      switch (*fmt)
-      {
-         case 'e':
-            filter = EQN;
-            break;
-         case 'g':
-            filter = GRAP;
-            break;
-         case 'p':
-            filter = PIC;
-            break;
-         case 't':
-            filter = TBL;
-            break;
-         case 'v':
-            filter = VGRIND;
-            break;
-         case 'r':
-            filter = REFER;
-            break;
-         default:
-            filter = NULL;
-            break;
-      }
-      if (filter)
-      {
-         used = snprintf(c, left, " | %s ", filter);
-         left -= used;
-         c += used;
-         if (left <= 1)
-            return (FALSE);
-      }
-   }
-
-   /* Now add the fixed trailing part 'formatprog > tempfile 2> /dev/null' */
-#ifdef __UNIXOS2__
-   used = snprintf(c, left, " | %s > %s 2>NUL", FORMAT, tempfile);
-#else
-#ifndef HAS_MKSTEMP
-   used = snprintf(c, left, " | %s > %s 2>/dev/null", FORMAT, tempfile);
-#else
-   used = snprintf(c, left, " | %s >> %s 2>/dev/null", FORMAT, tempfile);
-#endif
-#endif /* __UNIXOS2__ */
-   left -= used;
-   if (left <= 1)
-      return (FALSE);
-
-   return (TRUE);
-}
-#endif /* HANDLE_ROFFSEQ */
-
-/*     Function Name: UncompressUnformatted
- *     Description: Finds an uncompressed unformatted manual page.
- *     Arguments: man_globals - the psuedo global structure.
- *                 entry - the manual page entry.
- * RETURNED        filename - location to put the name of the file.
- *     Returns: TRUE if the file was found.
- */
-
-static Boolean
-#ifndef HAS_MKSTEMP
-UncompressUnformatted(ManpageGlobals * man_globals, char * entry,
-                     char * filename)
-#else
-UncompressUnformatted(ManpageGlobals * man_globals, char * entry,
-                     char * filename, FILE **file)
-#endif
-{
-  char path[BUFSIZ], page[BUFSIZ], section[BUFSIZ], input[BUFSIZ];
-  int len_cat = strlen(CAT), len_man = strlen(MAN);
-#if defined(SMAN) && defined(SFORMAT)
-  int len_sman = strlen(SMAN);
-#endif
-
-  ParseEntry(entry, path, section, page);
-
-  man_globals->bzip2 = FALSE;
-  man_globals->lzma = FALSE;
-
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-  /*
-   * look for uncompressed file in machine subdir first
-   */
-  snprintf(filename, BUFSIZ, "%s/%s%s/%s/%s", path, MAN,
-         section + len_cat, MACHINE, page);
-  if ( access( filename, R_OK ) == 0 ) {
-    man_globals->compress = FALSE;
-    man_globals->gzip = FALSE;
-    man_globals->deletetempfile = FALSE;
-    snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-            "%s/%s%s/%s/%s", path, CAT, section + len_cat, MACHINE, page);
-    return(TRUE);
-  }
- /*
-  * Then for compressed files in an uncompressed directory.
-  */
-  snprintf(input, sizeof(input), "%s.%s", filename, COMPRESSION_EXTENSION);
-#ifndef HAS_MKSTEMP
-  if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-  if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif
-    man_globals->compress = TRUE;
-    man_globals->deletetempfile = TRUE;
-    snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-            "%s/%s%s/%s.%s", path, CAT, section + len_cat, page, 
-            COMPRESSION_EXTENSION);
-    return(TRUE);
-  }
-#ifdef GZIP_EXTENSION
-  else {
-    snprintf(input, sizeof(input), "%s.%s", filename, GZIP_EXTENSION);
-#ifndef HAS_MKSTEMP
-    if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-    if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif
-      man_globals->compress = TRUE;
-      man_globals->gzip = TRUE;
-      man_globals->deletetempfile = TRUE;
-      snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-              "%s/%s%s/%s.%s", path, CAT, section + len_cat, page,
-              GZIP_EXTENSION);
-      return(TRUE);
-    }
-  }
-#endif /* GZIP_EXTENSION */
-#endif /* __OpenBSD__ || __NetBSD__ */
-
-#ifdef BZIP2_EXTENSION
- {
-    sprintf(input, "%s.%s", filename, BZIP2_EXTENSION);
-#ifndef HAS_MKSTEMP
-    if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-    if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif
-      man_globals->compress = TRUE;
-      man_globals->gzip = FALSE;
-      man_globals->bzip2 = TRUE;
-      sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
-             CAT, section + len_cat, page, BZIP2_EXTENSION);
-      return(TRUE);
-    }
-  }
-#endif /* BZIP2_EXTENSION */
-
-#ifdef LZMA_EXTENSION
- {
-    sprintf(input, "%s.%s", filename, LZMA_EXTENSION);
-#ifndef HAS_MKSTEMP
-    if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-    if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif
-      man_globals->compress = TRUE;
-      man_globals->gzip = FALSE;
-      man_globals->lzma = TRUE;
-      sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
-             CAT, section + len_cat, page, LZMA_EXTENSION);
-      return(TRUE);
-    }
-  }
-#endif /* LZMA_EXTENSION */
-
-/*
- * Look for uncompressed file first.
- */
-
-  snprintf(filename, BUFSIZ, "%s/%s%s/%s", path, MAN, section + len_man, page);
-  if ( access( filename, R_OK ) == 0 ) {
-    man_globals->compress = FALSE;
-    man_globals->gzip = FALSE;
-    man_globals->deletetempfile = FALSE;
-    snprintf(man_globals->save_file, sizeof(man_globals->save_file), 
-            "%s/%s%s/%s", path, CAT, section + len_cat, page);
-    return(TRUE);
-  }
-
-#if defined(SMAN) && defined(SFORMAT)
- /*
-  * Look for uncompressed sgml file next.
-  */
-
-  snprintf(input, BUFSIZ, "%s/%s%s/%s", path, SMAN, section + len_sman, page);
-#ifndef HAS_MKSTEMP
-  if ( SgmlToRoffNamed(man_globals, input, filename) ) {
-#else
-  if ( SgmlToRoffNamed(man_globals, input, filename, file) ) {
-#endif
-    man_globals->compress = FALSE;
-    man_globals->gzip = FALSE;
-    man_globals->deletetempfile = TRUE;
-    snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-            "%s/%s%s/%s", path, CAT, section + len_cat, page);
-    return(TRUE);
-  }
-#endif
-
-/*
- * Then for compressed files in an uncompressed directory.
- */
-
-  snprintf(input, sizeof(input), "%s.%s", filename, COMPRESSION_EXTENSION);
-#ifndef HAS_MKSTEMP
-  if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-  if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif
-    man_globals->compress = TRUE;
-    man_globals->deletetempfile = TRUE;
-    snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-            "%s/%s%s/%s.%s", path, CAT, section + len_cat, page, 
-            COMPRESSION_EXTENSION);
-    return(TRUE);
-  }
-#ifdef GZIP_EXTENSION
-  else {
-    snprintf(input, sizeof(input), "%s.%s", filename, GZIP_EXTENSION);
-#ifndef HAS_MKSTEMP
-    if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-    if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif 
-      man_globals->compress = TRUE;
-      man_globals->gzip = TRUE;
-      man_globals->deletetempfile = TRUE;
-      snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-              "%s/%s%s/%s.%s", path, CAT, section + len_cat, page, 
-              GZIP_EXTENSION);
-      return(TRUE);
-    }
-  }
-#endif
-
-#ifdef BZIP2_EXTENSION
-  {
-    sprintf(input, "%s.%s", filename, BZIP2_EXTENSION);
-#ifndef HAS_MKSTEMP
-    if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-    if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif 
-      man_globals->compress = TRUE;
-      man_globals->gzip = TRUE;
-      sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
-             CAT, section + len_cat, page, BZIP2_EXTENSION);
-      return(TRUE);
-    }
-  }
-#endif
-
-#ifdef LZMA_EXTENSION
-  {
-    sprintf(input, "%s.%s", filename, LZMA_EXTENSION);
-#ifndef HAS_MKSTEMP
-    if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-    if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif 
-      man_globals->compress = TRUE;
-      man_globals->lzma = TRUE;
-      sprintf(man_globals->save_file, "%s/%s%s/%s.%s", path,
-             CAT, section + len_cat, page, LZMA_EXTENSION);
-      return(TRUE);
-    }
-  }
-#endif
-
-/*
- * And lastly files in a compressed directory.
- */
-
-  snprintf(input, sizeof(input), "%s/%s%s.%s/%s", path,
-         MAN, section + len_man, COMPRESSION_EXTENSION, page);
-#ifndef HAS_MKSTEMP
-  if ( UncompressNamed(man_globals, input, filename) ) {
-#else
-  if ( UncompressNamed(man_globals, input, filename, file) ) {
-#endif
-    man_globals->compress = TRUE;
-    man_globals->deletetempfile = TRUE;
-    snprintf(man_globals->save_file, sizeof(man_globals->save_file),
-            "%s/%s%s.%s/%s", path, CAT, section + len_cat, 
-            COMPRESSION_EXTENSION, page);
-    return(TRUE);
-  }
-  return(FALSE);
-}
-
-/*     Function Name: AddCursor
- *     Description: This function adds the cursor to the window.
- *     Arguments: w - the widget to add the cursor to.
- *                 cursor - the cursor to add to this widget.
- *     Returns: none
- */
-
-void
-AddCursor(Widget w, Cursor cursor)
-{
-  XColor colors[2];
-  Arg args[10];
-  Cardinal num_args = 0;
-  Colormap c_map;
-
-  if (!XtIsRealized(w)) {
-    PopupWarning(NULL, "Widget is not realized, no cursor added.\n");
-    return;
-  }
-
-  XtSetArg( args[num_args], XtNcolormap, &c_map); num_args++;
-  XtGetValues( w, args, num_args);
-
-  colors[0].pixel = resources.cursors.fg_color;
-  colors[1].pixel = resources.cursors.bg_color;
-
-  XQueryColors (XtDisplay(w), c_map, colors, 2);
-  XRecolorCursor(XtDisplay(w), cursor, colors, colors+1);
-  XDefineCursor(XtDisplay(w),XtWindow(w),cursor);
-}
-
-/*     Function Name: ChangeLabel
- *     Description: This function changes the label field of the
- *                   given widget to the string in str.
- *     Arguments: w - the widget.
- *                 str - the string to change the label to.
- *     Returns: none
- */
-
-void
-ChangeLabel(Widget w, char * str)
-{
-  Arg arglist[3];              /* An argument list. */
-
-  if (w == NULL) return;
-
-  XtSetArg(arglist[0], XtNlabel, str);
-
-/* shouldn't really have to do this. */
-  XtSetArg(arglist[1], XtNwidth, 0);
-  XtSetArg(arglist[2], XtNheight, 0);
-
-  XtSetValues(w, arglist, (Cardinal) 1);
-}
-
-/*
- * In an ideal world this would be part of the XToolkit, and I would not
- * have to do it, but such is life sometimes.  Perhaps in X11R3.
- */
-
-/*     Function Name: PositionCenter
- *     Description: This function positions the given widgets center
- *                   in the following location.
- *     Arguments: widget - the widget widget to postion
- *                 x,y - The location for the center of the widget
- *                 above - number of pixels above center to locate this widget
- *                 left - number of pixels left of center to locate this widget
- *                 h_space, v_space - how close to get to the edges of the
- *                                    parent window.
- *     Returns: none
- *      Note:  This should only be used with a popup widget that has override
- *             redirect set.
- */
-
-void
-PositionCenter(Widget widget, int x, int y, int above, int left, int v_space, int h_space)
-{
-  Arg wargs[2];
-  int x_temp,y_temp;           /* location of the new window. */
-  int parent_height,parent_width; /* Height and width of the parent widget or
-                                  the root window if it has no parent. */
-
-  x_temp = x - left - Width(widget) / 2 + BorderWidth(widget);
-  y_temp = y - above -  Height(widget) / 2 + BorderWidth(widget);
-
-  parent_height = HeightOfScreen(XtScreen(widget));
-  parent_width = WidthOfScreen(XtScreen(widget));
-
-/*
- * Check to make sure that all edges are within the viewable part of the
- * root window, and if not then force them to be.
- */
-
-  if (x_temp < h_space)
-    x_temp = v_space;
-  if (y_temp < v_space)
-    (y_temp = 2);
-
-  if ( y_temp + Height(widget) + v_space > parent_height )
-      y_temp = parent_height - Height(widget) - v_space;
-
-  if ( x_temp + Width(widget) + h_space > parent_width )
-      x_temp = parent_width - Width(widget) - h_space;
-
-  XtSetArg(wargs[0], XtNx, x_temp);
-  XtSetArg(wargs[1], XtNy, y_temp);
-  XtSetValues(widget, wargs, 2);
-}
-
-/*     Function Name: ParseEntry(entry, path, sect, page)
- *     Description: Parses the manual pages entry filenames.
- *     Arguments: str - the full path name.
- *                 path - the path name.      RETURNED
- *                 sect - the section name.   RETURNED
- *                 page - the page name.      RETURNED
- *     Returns: none.
- */
-
-void
-ParseEntry(char *entry, char *path, char *sect, char *page)
-{
-  char *c, temp[BUFSIZ];
-
-  strcpy(temp, entry);
-
-  c = rindex(temp, '/');
-  if (c == NULL)
-    PrintError("index failure in ParseEntry.");
-  *c++ = '\0';
-  if (page != NULL)
-    strcpy(page, c);
-
-  c = rindex(temp, '/');
-  if (c == NULL)
-    PrintError("index failure in ParseEntry.");
-  *c++ = '\0';
-#if defined(SFORMAT) && defined(SMAN)
-  /* sgmltoroff sometimes puts an extra ./ in the path to .so entries */
-  if (strcmp(c, ".") == 0) {
-      c = rindex(temp, '/');
-      if (c == NULL)
-         PrintError("index failure in ParseEntry.");
-      *c++ = '\0';
-  }
-#endif      
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-  /* Skip machine subdirectory if present */
-  if (strcmp(c, MACHINE) == 0) {
-      c = rindex(temp, '/');
-      if (c == NULL)
-         PrintError("index failure in ParseEntry.");
-      *c++ = '\0';
-  }
-#endif
-  if (sect != NULL)
-    strcpy(sect, c);
-
-  if (path != NULL)
-    strcpy(path, temp);
-}
-
-/*      Function Name: GetGlobals
- *      Description: Gets the psuedo globals associated with the
- *                   manpage associated with this widget.
- *      Arguments: w - a widget in the manpage.
- *      Returns: the psuedo globals.
- *      Notes: initial_widget is a globals variable.
- *             manglobals_context is a global variable.
- */
-
-ManpageGlobals *
-GetGlobals(Widget w)
-{
-  Widget temp;
-  caddr_t data;
-
-  while ( (temp = XtParent(w)) != initial_widget && (temp != NULL))
-    w = temp;
-
-  if (temp == NULL)
-    XtAppError(XtWidgetToApplicationContext(w),
-              "Xman: Could not locate widget in tree, exiting");
-
-  if (XFindContext(XtDisplay(w), XtWindow(w),
-                  manglobals_context, &data) != XCSUCCESS)
-    XtAppError(XtWidgetToApplicationContext(w),
-              "Xman: Could not find global data, exiting");
-
-  return( (ManpageGlobals *) data);
-}
-
-/*      Function Name: SaveGlobals
- *      Description: Saves the psuedo globals on the widget passed
- *                   to this function, although GetGlobals assumes that
- *                   the data is associated with the popup child of topBox.
- *      Arguments: w - the widget to associate the data with.
- *                 globals - data to associate with this widget.
- *      Returns: none.
- *      Notes: WIDGET MUST BE REALIZED.
- *             manglobals_context is a global variable.
- */
-
-void
-SaveGlobals(Widget w, ManpageGlobals * globals)
-{
-  if (XSaveContext(XtDisplay(w), XtWindow(w), manglobals_context,
-                  (caddr_t) globals) != XCSUCCESS)
-    XtAppError(XtWidgetToApplicationContext(w),
-              "Xman: Could not save global data, are you out of memory?");
-}
-
-/*      Function Name: RemoveGlobals
- *      Description: Removes the psuedo globals from the widget passed
- *                   to this function.
- *      Arguments: w - the widget to remove the data from.
- *      Returns: none.
- *      Notes: WIDGET MUST BE REALIZED.
- *             manglobals_context is a global variable.
- */
-
-void
-RemoveGlobals(Widget w)
-{
-  if (XDeleteContext(XtDisplay(w), XtWindow(w),
-                    manglobals_context) != XCSUCCESS)
-    XtAppError(XtWidgetToApplicationContext(w),
-              "Xman: Could not remove global data?");
-}
diff --git a/xman/search.c b/xman/search.c
deleted file mode 100644 (file)
index 48c4efe..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/* $XConsortium: search.c,v 1.21 94/04/17 20:43:58 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/search.c,v 1.5 2001/01/27 17:24:27 herrb Exp $ */
-
-
-#include "globals.h"
-#include "vendor.h"
-
-/* Map <CR> and control-M to goto begining of file. */
-
-#define SEARCHARGS 10
-
-static FILE * DoManualSearch(ManpageGlobals *man_globals, char * string);
-static int BEntrySearch(char * string, char ** first, int number);
-
-/*     Function Name: MakeSearchWidget
- *     Description: This Function Creates the Search Widget.
- *     Arguments: man_globals - the pseudo globas for this manpage.
- *                 w - the widgets parent
- *     Returns: the search widget.
- */
-
-void
-MakeSearchWidget(ManpageGlobals * man_globals, Widget parent)
-{
-  Widget dialog, command, text, cancel;
-  Arg arglist[2];
-  Cardinal num_args = 0;
-
-  XtSetArg(arglist[0], XtNtransientFor, parent); 
-  man_globals->search_widget = XtCreatePopupShell(SEARCHNAME, 
-                                                 transientShellWidgetClass, 
-                                                 parent,
-                                                 arglist, 1);
-
-  if (resources.clear_search_string) {
-    XtSetArg(arglist[0], XtNvalue, ""); num_args++;  
-  }
-
-  dialog = XtCreateManagedWidget(DIALOG, dialogWidgetClass,
-                                man_globals->search_widget, 
-                                arglist, num_args);
-
-  if ( (text = XtNameToWidget(dialog, "value")) == (Widget) NULL)
-    PopupWarning(NULL, "Could not find text widget in MakeSearchWidget.");
-  else
-    XtSetKeyboardFocus(dialog, text);
-
-  XawDialogAddButton(dialog, MANUALSEARCH, NULL, NULL);
-  XawDialogAddButton(dialog, APROPOSSEARCH, NULL, NULL);
-  XawDialogAddButton(dialog, CANCEL, NULL, NULL);
-
-/*
- * This is a bit gross, but it get the cancel button underneath the 
- * others, and forms them up to the right size..
- */
-
-  if ( ((command = XtNameToWidget(dialog, MANUALSEARCH)) == (Widget) NULL) ||
-       ((cancel = XtNameToWidget(dialog, CANCEL)) == (Widget) NULL) )
-    PopupWarning(NULL,
-                "Could not find manual search widget in MakeSearchWidget.");
-  else {
-    static char * half_size[] = {
-      MANUALSEARCH, APROPOSSEARCH, NULL
-    };
-    static char * full_size[] = {
-      "label", "value", CANCEL, NULL
-    };
-
-    num_args = 0;
-    XtSetArg(arglist[num_args], XtNfromVert, command); num_args++;
-    XtSetArg(arglist[num_args], XtNfromHoriz, NULL); num_args++;
-    XtSetValues(cancel, arglist, num_args);
-    FormUpWidgets(dialog, full_size, half_size);
-  }
-
-}
-
-/*      Function Name: SearchString
- *      Description: Returns the search string.
- *      Arguments: man_globals - the globals.
- *      Returns: the search string.
- */
-
-static char *
-SearchString(
-ManpageGlobals * man_globals)
-{
-  Widget dialog;
-
-  dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
-  if (dialog != NULL) 
-    return(XawDialogGetValueString(dialog));
-
-  PopupWarning(man_globals,
-             "Could not get the search string, no search will be preformed.");
-  return(NULL);
-}
-
-  
-/*     Function Name: DoSearch
- *     Description: This function performs a search for a man page or apropos
- *                   search upon search string.
- *     Arguments: man_globals - the pseudo globas for this manpage.
- *                 type - the type of search.
- *     Returns: none.
- */
-
-#define LOOKLINES 6
-
-/* 
- * Manual searches look through the list of manual pages for the right one
- * with a binary search.
- *
- * Apropos searches still exec man -k.
- *
- * If nothing is found then I send a warning message to the user, and do
- * nothing.
- */
-
-FILE *
-DoSearch(ManpageGlobals * man_globals, int type)
-{
-  char cmdbuf[BUFSIZ],*mantmp, *manpath;
-  char tmp[BUFSIZ],path[BUFSIZ];
-  char string_buf[BUFSIZ], cmp_str[BUFSIZ], error_buf[BUFSIZ];
-  char * search_string = SearchString(man_globals);
-  FILE * file;
-#ifdef HAS_MKSTEMP
-  int fd;
-#endif
-  int count;
-  Boolean flag;
-
-  if (search_string == NULL) return(NULL);
-
-  /* If the string is empty or starts with a space then do not search */
-
-  if ( streq(search_string,"") ) {
-    PopupWarning(man_globals, "Search string is empty.");
-    return(NULL);
-  }
-
-  if (strlen(search_string) >= BUFSIZ) {
-    PopupWarning(man_globals, "Search string too long.");
-    return(NULL);
-  }
-  if (search_string[0] == ' ') {
-    PopupWarning(man_globals, "First character cannot be a space.");
-    return(NULL);
-  }
-
-  if (type == APROPOS) {
-    char label[BUFSIZ];
-
-    strcpy(tmp, MANTEMP);              /* get a temp file. */
-#ifdef HAS_MKSTEMP
-    fd = mkstemp(tmp);
-    if (fd < 0) {
-      PopupWarning(man_globals, "Cant create temp file");
-      return NULL;
-    }
-#else
-    (void)mktemp(tmp);
-#endif
-    mantmp = tmp;
-
-    manpath=getenv("MANPATH");
-    if (manpath == NULL || streq(manpath,"") ) {
-#ifdef MANCONF
-      if (!ReadManConfig(path))
-#endif
-      {
-       strcpy(path,SYSMANPATH);
-#ifdef LOCALMANPATH
-       strcat(path,":");
-       strcat(path,LOCALMANPATH);
-#endif
-      }
-    } else {
-      strcpy(path,manpath);
-    }
-
-    snprintf(label, sizeof(label), 
-       "Results of apropos search on: %s", search_string);
-
-#ifdef NO_MANPATH_SUPPORT      /* not quite correct, but the best I can do. */
-    snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, search_string, mantmp);
-#else
-    snprintf(cmdbuf, sizeof(cmdbuf), APROPOS_FORMAT, path, search_string, mantmp);
-#endif
-
-    if(system(cmdbuf) != 0) {  /* execute search. */
-       snprintf(error_buf, sizeof(error_buf), "Something went wrong trying to run %s\n",cmdbuf);
-      PopupWarning(man_globals, error_buf);
-    }
-
-#ifdef HAS_MKSTEMP
-    if ((file = fdopen(fd, "r")) == NULL) 
-#else
-    if((file = fopen(mantmp,"r")) == NULL)
-#endif
-      PrintError("lost temp file? out of temp space?");
-
-/* 
- * Since we keep the FD open we can unlink the file safely, this
- * will keep extra files out of /tmp. 
- */
-
-    unlink(mantmp);
-
-    snprintf(string_buf, sizeof(string_buf), "%s: nothing appropriate", search_string);
-
-    /*
-     * Check first LOOKLINES lines for "nothing appropriate".
-     */
-  
-    count = 0;
-    flag = FALSE;
-    while ( (fgets(cmp_str, BUFSIZ, file) != NULL) && (count < LOOKLINES) ) {
-      if ( cmp_str[strlen(cmp_str) - 1] == '\n') /* strip off the '\n' */
-         cmp_str[strlen(cmp_str) - 1] = '\0';
-
-      if (streq(cmp_str, string_buf)) {
-       flag = TRUE;
-       break;
-      }
-      count++;
-    }
-
-    /*
-     * If the file is less than this number of lines then assume that there is
-     * nothing apropriate found. This does not confuse the apropos filter.
-     */
-
-    if (flag) {
-      fclose(file);
-      file = NULL;
-      ChangeLabel(man_globals->label,string_buf);
-      return(NULL);
-    }
-  
-    snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title), 
-            "%s", label);
-    ChangeLabel(man_globals->label,label);
-    fseek(file, 0L, SEEK_SET);         /* reset file to point at top. */
-  }
-  else {                       /* MANUAL SEACH */
-    file = DoManualSearch(man_globals, search_string);
-    if (file == NULL) {
-      snprintf(string_buf, sizeof(string_buf), "No manual entry for %s.", search_string);
-      ChangeLabel(man_globals->label, string_buf);
-      if (man_globals->label == NULL)
-       PopupWarning(man_globals, string_buf);
-      return(NULL);
-    }
-  }
-
-  if (resources.clear_search_string) {
-    Arg arglist[1];
-    Widget dialog;
-
-    dialog = XtNameToWidget(man_globals->search_widget, DIALOG);
-    if (dialog == NULL) 
-      PopupWarning(man_globals, "Could not clear the search string.");
-
-    XtSetArg(arglist[0], XtNvalue, "");
-    XtSetValues(dialog, arglist, (Cardinal) 1);
-  }
-
-  return(file);
-}
-
-/*     Function Name: DoManualSearch
- *     Description: performs a manual search.
- *     Arguments: man_globals - the manual page specific globals.
- *     Returns: the filename of the man page.
- */
-
-#define NO_ENTRY -100
-
-static FILE * 
-DoManualSearch(ManpageGlobals *man_globals, char * string)
-{
-  int e_num = NO_ENTRY;
-  int i;
-
-/* search current section first. */
-  
-  i = man_globals->current_directory;
-  e_num = BEntrySearch(string, manual[i].entries, manual[i].nentries);
-
-/* search other sections. */
-
-  if (e_num == NO_ENTRY) {
-    i = 0;                     /* At the exit of the loop i needs to
-                                  be the one we used. */
-    while ( TRUE ) {
-      if (i == man_globals->current_directory)
-       if (++i >= sections) return(NULL);
-      e_num = BEntrySearch(string, manual[i].entries, manual[i].nentries);
-      if (e_num != NO_ENTRY) break;
-      if (++i >= sections) return(NULL);
-    }
-
-/*
- * Manual page found in some other section, unhighlight the current one.
- */
-    if ( man_globals->manpagewidgets.box != NULL)
-      XawListUnhighlight(
-       man_globals->manpagewidgets.box[man_globals->current_directory]);
-  }
-  else {
-    /* 
-     * Highlight the element we are searching for if it is in the directory
-     * listing currently being shown.
-     */
-    if ( man_globals->manpagewidgets.box != NULL)
-      XawListHighlight(man_globals->manpagewidgets.box[i], e_num);
-  }
-  return(FindManualFile(man_globals, i, e_num));
-}
-
-/*     Function Name: BEntrySearch
- *     Description: binary search through entries.
- *     Arguments: string - the string to match.
- *                 first - the first entry in the list.
- *                 number - the number of entries.
- *     Returns: a pointer to the entry found.
- */
-
-static int
-BEntrySearch(
-char * string,
-char ** first,
-int number)
-{
-  int check, cmp, len_cmp, global_number;
-  char *head, *tail;
-  
-  global_number = 0;
-  while (TRUE) {
-
-    if (number == 0) {
-      return(NO_ENTRY);                /* didn't find it. */
-    }
-
-    check = number/2;
-
-    head = rindex(first[ global_number + check ], '/');
-    if (head == NULL) 
-      PrintError("index failure in BEntrySearch");
-    head++;
-
-    tail = rindex(head, '.');
-    if (tail == NULL) 
-      /* not an error, some systems (e.g. sgi) have only a .z suffix */
-      tail = head + strlen(head);
-
-    cmp = strncmp(string, head, (tail - head));
-    len_cmp = strlen(string) - (int) (tail - head);
-
-    if ( cmp == 0 && len_cmp == 0) {
-      return(global_number + check);
-    }
-    else if ( cmp < 0 || ((cmp == 0) && (len_cmp < 0)) ) 
-      number = check;
-    else /* cmp > 0 || ((cmp == 0) && (len_cmp > 0)) */ {
-      global_number += (check + 1);
-      number -= ( check + 1 );
-    }
-  }
-}
diff --git a/xman/tkfuncs.c b/xman/tkfuncs.c
deleted file mode 100644 (file)
index 0222e7c..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/* $XConsortium: tkfuncs.c,v 1.6 94/04/17 20:43:59 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86$ */
-
-#include <X11/X.h>
-#include <X11/Xos.h>
-#include <X11/Xlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/IntrinsicP.h>
-
-#include "globals.h"
-
-/* 
- * I am doing the "wrong" thing here by looking in the core field for the
- * widget to get this info, the "right" thing to do is to do a XtGetValues
- * to get this information.
- */
-
-/*     Function Name: Width
- *     Description: finds the width of a widget.
- *     Arguments: w - the widget.
- *     Returns: the width of that widget.
- */
-
-int
-Width(Widget w)
-{
-  return( (int) w->core.width );
-}
-
-/*     Function Name: Height
- *     Description: finds the height of a widget.
- *     Arguments: w - the widget.
- *     Returns: the height of that widget.
- */
-
-int
-Height(Widget w)
-{
-  return( (int) w->core.height );
-}
-
-/*     Function Name: BorderWidth
- *     Description: finds the BorderWidth of a widget.
- *     Arguments: w - the widget.
- *     Returns: the BorderWidth of that widget.
- */
-
-int
-BorderWidth(Widget w)
-{
-  return( (int) w->core.border_width );
-}
-
-/* 
- * These functions have got to be able to get at the widget tree, I don't see
- * any way around this one.
- */
-
-/*     Function Name: Name
- *     Description: This function returns the correct popup child
- *     Arguments: w - widget
- *     Returns: the popup child.
- */
-
-char * 
-Name(Widget w)
-{
-  return( w->core.name);
-}
diff --git a/xman/vendor.c b/xman/vendor.c
deleted file mode 100644 (file)
index 6ba5b0e..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-/* $XConsortium: vendor.c,v 1.10 94/04/17 20:43:59 rws Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/vendor.c,v 1.2 2000/03/03 20:02:25 dawes Exp $ */
-
-/* Vendor-specific data structures and operations */
-
-#include "globals.h"
-#include "vendor.h"
-
-typedef struct sectionName {
-    char *     name;
-    char *     suffix;
-} SectionNameRec;
-
-#if (defined(SYSV) || defined(__osf__) || defined(SVR4)) && !defined(sun)
-
-static SectionNameRec SectionNames[] = {
-    {"(1) User Commands",              "1"},
-    {"(1m) Sys, Administration",       "1m"},
-    {"(2) System Calls",               "2"},
-    {"(3) Subroutines",                        "3"},
-    {"(4) File Formats",               "4"},
-    {"(5) Miscellaneous",              "5"},
-    {"(6) Games",                      "6"},
-    {"(7) Devices",                    "7"},
-    {"(8) Sys. Administration",                "8"},
-    {"(l) Local",                      "l"},
-    {"(n) New",                                "n"},
-    {"(o) Old",                                "o"}
-#ifdef __SCO__
-      ,
-      { "(ADM) System Administration", "ADM" },
-      { "(ADMN) Network Administration", "ADMN" },
-      { "(ADMP) Protocol Administration", "ADMP" },
-      { "(C) Commands", "C" },
-      { "(CMD) DOS Commands", "CMD" },
-      { "(CP) Programming Commands", "CP" },
-      { "(DOS) DOS Subroutines and Libraries", "DOS" },
-      { "(F) File Formats", "F" },
-      { "(HW) Hardware Dependant", "HW" },
-      { "(K) Kernel Subroutines", "K" },
-      { "(LOCAL) Local utilities for your system", "LOCAL" },
-      { "(M) Miscellaneous", "M" },
-      { "(NADM) NFS Administration", "NADM" },
-      { "(NC) Network Commands", "NC" },
-      { "(NF) Network File Formats", "NF" },
-      { "(NS) Network Subroutines", "NS" },
-      { "(NSL) Network Services", "NSL" },
-      { "(S) Subroutines and Libraries", "S" },
-      { "(SCO) Product Engineering Toolkit", "SCO" },
-      { "(SFF) Socket File Formats", "SFF" },
-      { "(STR) Streams", "STR" },
-      { "(TC) Transport Layer Commands", "TC" },
-      { "(X) X Man pages", "X" },
-      { "(XNX) Xenix Subroutines, Commands and Libs", "XNX" },
-      { "(XS) X11 Subroutines and Libraries", "XS" },
-      { "(Xm) Motif Commands and Subroutines", "Xm" },
-      { "(Xt) X Intrinsics", "Xt" }
-#endif
-};
-
-#else
-
-#if defined(sun) && defined(SVR4)
-/* losing man.cf is useless because it has no section names */
-
-static SectionNameRec SectionNames[] = {
-    {"(1)  User Commands",                     "1"},
-    {"(1b) SunOS/BSD Compatibility Commands",  "1b"},
-    {"(1c) Communication Commands",            "1c"},
-    {"(1f) FMLI Commands",                     "1f"},
-    {"(1m) Maintenance Commands",              "1m"},
-    {"(1s) SunOS Specific Commands",           "1s"},
-    {"(2)  System Calls",                      "2"},
-    {"(3)  C Library Functions",               "3"},
-    {"(3b) SunOS/BSD Compatibility Functions", "3b"},
-    {"(3c) C Library Functions",               "3c"},
-    {"(3e) ELF Library Functions",             "3e"},
-    {"(3g) C Library Functions",               "3g"},
-    {"(3i) Wid Character Functions",           "3i"},
-    {"(3k) Kernel VM Library Functions",       "3k"},
-    {"(3m) Mathematical Library",              "3m"},
-    {"(3n) Network Functions",                 "3n"},
-    {"(3r) RPC Services Library",              "3r"},
-    {"(3s) Standard I/O Functions",            "3s"},
-#if OSMINORVERSION == 5
-    {"(3t) Threads Library",                   "3t"},
-#endif
-    {"(3x) Miscellaneous Library Functions",   "3x"},
-    {"(4)  File Formats",                      "4"},
-    {"(4b) Misc. Reference Manual Pages",      "4b"},
-    {"(5)  Environments, Tables, and TROFF Macros", "5"},
-    {"(6)  Games and Demos",                   "6"},
-    {"(7)  Special Files",                     "7"},
-#if OSMINORVERSION == 5
-    {"(7d)  Devices",                          "7d"},
-    {"(7fs) File Systems",                     "7fs"},
-    {"(7i)  Ioctl Requests",                   "7i"},
-    {"(7m)  STREAMS Modules",                  "7m"},
-    {"(7p)  Protocols",                                "7p"},
-#endif
-    {"(9)  Device Driver Information",         "9"},
-    {"(9e) DDI and DKI Driver Entry Points",   "9e"},
-    {"(9f) DDI and DKI Kernel Functions",      "9f"},
-    {"(9s) DDI and DKI Data Structures",       "9s"},
-    {"(l)  Local",                             "l"},
-    {"(n)  New",                               "n"},
-};
-
-#else
-
-static SectionNameRec SectionNames[] = {
-    {"(1) User Commands",              "1"},
-    {"(2) System Calls",               "2"},
-    {"(3) Subroutines",                        "3"},
-    {"(4) Devices",                    "4"},
-    {"(5) File Formats",               "5"},
-    {"(6) Games",                      "6"},
-    {"(7) Miscellaneous",              "7"},
-    {"(8) Sys. Administration",                "8"},
-#ifdef Lynx
-    {"(9) Device driver service calls",        "9"},
-#endif
-#if defined(__OpenBSD__) || defined(__NetBSD__)
-    {"(9) Kernel Manual",              "9"},
-#endif
-#if defined(__FreeBSD__)
-    {"(9) Kernel Interfaces",          "9"},
-#endif
-    {"(l) Local",                      "l"},
-    {"(n) New",                                "n"},
-    {"(o) Old",                                "o"},
-#ifdef sony
-    {"(p) Public Domain",              "p"},
-    {"(s) Sony Specific",              "s"},
-#endif
-};
-
-#endif
-#endif
-
-/*     Function Name: AddStandardSections
- *     Description: Adds all the standard sections to the list for this path.
- *     Arguments: list - a pointer to the section list.
- *                 path - the path to these standard sections.
- *     Returns: none.
- */
-
-void AddStandardSections(
-SectionList **list,
-char * path)
-{
-#ifdef CRAY
-    AddStandardCraySections(list, path);
-    return;
-#else
-  register int i;
-  char file[BUFSIZ];
-  int numSections = sizeof(SectionNames) / sizeof(SectionNames[0]);
-
-  for (i=0; i < numSections; i++) {
-    sprintf(file, "%s%s", SEARCHDIR, SectionNames[i].suffix);
-    AddNewSection(list, path, file, SectionNames[i].name, TRUE);
-#ifdef SEARCHOTHER
-    sprintf(file, "%s%s", SEARCHOTHER, SectionNames[i].suffix);
-    AddNewSection(list, path, file, SectionNames[i].name, TRUE);
-#endif
-  }
-#endif
-}
-
-#ifdef CRAY
-/*     Function Name: AddStandardCraySections
- *     Description: Add sections specific to the Cray.
- *     Arguments: list - a pointer to the section list.
- *                 path - the path to these standard sections.
- *                 names - standard section names.
- *     Returns: none.
- */
-
-void AddStandardCraySections(
-SectionList **list,
-char *path)
-{
-  char file[BUFSIZ];
-  int i;
-#define NoSuf  (char *)0
-#define Suffix (char *)1
-#define Fold (char *)2
-#define FoldSuffix (char *)3
-  static char *cname[] = {
-    "(1) User Commands",       Suffix, "1",    "1bsd", NULL,
-    "(1) User Commands (instant)",     NoSuf,  "1r",   "1rb",  NULL,
-    "(1m) System Administration",      NoSuf,  "1m",   NULL,
-    "(2) System Calls",                Suffix, "2",    NULL,
-    "(3) Subroutines",         FoldSuffix,     "3",    "3bsd", "3c",   "3m",   "3mt",  "3s",   "3sl",  "3z",   NULL,
-    "(3) Subroutines (FORTRAN)", Fold, "3f",   NULL,
-    "(3) Subroutines (I/O)",   Fold,   "3io",  NULL,
-    "(3) Subroutines (X11)",   NoSuf,  "3X11", NULL,
-    "(3) Subroutines (Xt)",    NoSuf,  "3Xt",  NULL,
-    "(3) Subroutines (misc.)", Suffix, "3q",   NULL,
-    "(3) Subroutines (misc.)", Fold,   "3x",   NULL,
-    "(3) Subroutines (networking)",    Suffix, "3n",   "3rpc", "3svc", "3w",   "3yp",  NULL,
-    "(3) Subroutines (scientific)",    Fold,   "3sci", NULL,
-    "(3) Subroutines (utilities)",     FoldSuffix,     "3db",  "3u",   NULL,
-    "(4) Devices",             Suffix, "4",    "4d",   "4f",   "4n",   "4p",   "4s",   NULL,
-    "(5) File Formats",                Suffix, "5",    NULL,
-    "(6) Games",               Suffix, "6",    NULL,
-    "(7) Miscellaneous",       Suffix, "7",    NULL,
-    "(8) Sys. Administration", NoSuf,  "8",    NULL,
-    "(l) Local",               Suffix, "l",    NULL,
-    "(n) New",                 Suffix, "n",    NULL,
-    "(o) Old",                 Suffix, "o",    NULL,
-    "(info) Information",      NoSuf,  "info", NULL,
-    "(osi) Miscellaneous",     NoSuf,  "osi",  NULL,
-    "(sl) Miscellaneous",      NoSuf,  "sl",   NULL,
-    "(ultra) Miscellaneous",   NoSuf,  "ultra",        NULL,
-    NULL
-  };
-  char **p = cname;
-
-  while (*p != NULL) {
-    char *message = *p++;
-    int flags = (int) *p++;
-    while (*p != NULL) {
-      sprintf(file, "%s%s", SEARCHDIR, *p++);
-      AddNewSection(list, path, file, message, flags);
-    }
-    p++;
-  }
-}
-#endif /* CRAY */
-
-
-/*     Function Name: CreateManpageName
- *     Description: Creates the manual page name for a given item.
- *     Arguments: entry - the entry to convert.
- *     Returns: the manual page properly allocated.
- */
-
-/*
- * If the filename is foo.3     - Create an entry of the form:  foo
- * If the filename is foo.3X11  - Create an entry of the form:  foo(X11)
- * IF the filename is a.out.1   - Create an entry of the form:  a.out
- */
-
-char *
-CreateManpageName(
-char * entry,
-int section,   /* FIXME: unused */
-int flags)
-{
-  char * cp;
-  char page[BUFSIZ];
-  char sect[BUFSIZ];
-
-  ParseEntry(entry, NULL, sect, page);
-
-#ifndef CRAY
-  if ( (cp = rindex(page, '.')) != NULL) {
-    if ( (int)strlen(cp) > 2 ) {
-      *cp++ = '(';
-      while( (cp[1] != '\0') ) {
-       *cp = *(cp + 1); 
-       cp++;
-      }
-      *cp++ = ')';
-      *cp = '\0';
-    }
-    else
-      *cp = '\0';
-  }
-
-#else  /* CRAY - pick up the Cray name from the section */
-
-  if ( (cp = rindex(page, '.')) == NULL)
-    cp = page + strlen(page);
-  if ((flags & MSUFFIX) && strlen(sect) > 4) {
-    char *p = sect + 4;
-    *cp++ = '(';
-    while (*p)
-      *cp++ = *p++;
-    *cp++ = ')';
-  }
-  *cp = '\0';  
-
-#endif /* CRAY */
-  
-  return(StrAlloc(page));
-}
diff --git a/xman/vendor.h b/xman/vendor.h
deleted file mode 100644 (file)
index 21ff3ec..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/* $XConsortium: vendor.h,v 1.12 94/04/17 20:44:00 rws Exp $ */
-/* $XdotOrg: xc/programs/xman/vendor.h,v 1.4 2004/10/18 14:21:47 eich Exp $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/* $XFree86: xc/programs/xman/vendor.h,v 1.13 2003/07/29 21:16:56 dawes Exp $ */
-
-/* Vendor-specific definitions */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#ifdef CSRG_BASED
-#include <sys/param.h>
-#endif
-
-#define SUFFIX "suffix"
-#define FOLD "fold"
-#define FOLDSUFFIX "foldsuffix"
-#define MNULL 0
-#define MSUFFIX 1
-#define MFOLD 2
-#define MFOLDSUFFIX 3
-
-/*
- * The directories to search.  Assume that the manual directories are more
- * complete than the cat directories.
- */
-
-#if ( defined(UTEK) || defined(apollo) || defined(Lynx) )
-#  define SEARCHDIR  CAT
-#else
-#  define SEARCHDIR  MAN
-#endif
-
-#if ( defined(sgi) || (defined(i386) && (defined(SYSV) || defined(SVR4))  && !defined(sun)) || (defined(BSD) && (BSD >= 199103)) || defined(linux) || defined(__CYGWIN__) )
-# define SEARCHOTHER CAT
-#endif
-
-/*
- * The default manual page directory.
- *
- * The MANPATH enviornment variable will override this.
- */
-
-#ifndef SYSMANPATH
-
-#if defined(macII)
-#  define SYSMANPATH "/usr/catman/u_man:/usr/catman/a_man"
-#elif defined(__bsdi__)
-#  define SYSMANPATH "/usr/share/man:/usr/contrib/man:/usr/contrib/isode/man:/usr/local/man"
-#elif defined(__OpenBSD__) || defined(__DARWIN__)
-#  define SYSMANPATH "/usr/share/man:/usr/local/man:/usr/X11R6/man"
-#elif defined(SVR4) && defined(sun)
-#  define SYSMANPATH "/usr/share/man:/usr/X11/man:/usr/openwin/share/man:/usr/dt/share/man:/usr/sfw/share/man"
-#elif defined(SVR4) || defined(__osf__) || (defined(BSD) && (BSD >= 199103))
-#  define SYSMANPATH "/usr/share/man"
-#elif defined(hcx)
-#  define SYSMANPATH "/usr/catman/local_man:/usr/catman/u_man:/usr/catman/a_man:/usr/catman/p_man:/usr/catman/ada_man"
-#elif defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)
-#  define SYSMANPATH "/usr/catman/u_man:/usr/catman/p_man"
-#elif defined(sgi)
-#  define SYSMANPATH "/usr/catman/a_man:/usr/catman/g_man:/usr/catman/p_man:/usr/catman/u_man:/usr/man/p_man:/usr/man/u_man:/usr/man"
-#endif
-
-#ifndef SYSMANPATH
-#  define SYSMANPATH "/usr/man"
-#endif
-
-#endif
-
-/*
- * Compression Definitions.
- */
-
-#if defined( macII ) || defined( hcx ) || \
-       (defined(SYSV) && defined(i386) && !defined(ISC) && \
-       !defined(__UNIXWARE__) && !defined(__SCO__) && !defined(sun)) || defined(sgi)
-#  define COMPRESSION_EXTENSION   "z"
-#  define UNCOMPRESS_FORMAT       "pcat %s > %s"
-#  define NO_COMPRESS          /* mac can't handle using pack as a filter and
-                                  xman needs it to be done that way. */
-#elif defined(UTEK)
-#  define COMPRESSION_EXTENSION "C"
-#  define UNCOMPRESS_FORMAT     "ccat < %s > %s"
-#  define COMPRESS              "compact"
-#elif defined (ISC) || defined(__SCO__) || defined(__UNIXWARE__)
-#  define COMPRESSION_EXTENSION   "Z"     /* dummy */
-#  if !defined(__SCO__) && !defined(__UNIXWARE__)
-#    define COMPRESSION_EXTENSIONS  "zZF" /* pack, compress, freeze */
-#  else
-#    define COMPRESSION_EXTENSIONS  "zZ"  /* pack, compress */
-#  endif
-#  define UNCOMPRESS_FORMAT       uncompress_format
-#  define UNCOMPRESS_FORMAT_1     "pcat %s > %s"
-#  define UNCOMPRESS_FORMAT_2     "zcat < %s > %s"
-#  define UNCOMPRESS_FORMAT_3     "fcat < %s > %s"
-#  define NO_COMPRESS
-#else
-#  define COMPRESSION_EXTENSION "Z"
-#  ifndef HAS_MKSTEMP
-#    define UNCOMPRESS_FORMAT     "zcat < %s > %s"
-#  else
-#    define UNCOMPRESS_FORMAT     "zcat < %s >> %s"
-#  endif
-#  define COMPRESS              "compress"
-#  define GZIP_EXTENSION "gz"
-#  ifndef HAS_MKSTEMP
-#    define GUNZIP_FORMAT "gzip -c -d < %s > %s"
-#  else
-#    define GUNZIP_FORMAT "gzip -c -d < %s >> %s"
-#  endif
-#  define GZIP_COMPRESS "gzip"
-#  define BZIP2_EXTENSION "bz2"
-#  define LZMA_EXTENSION "lzma"
-#  ifndef HAS_MKSTEMP
-#    define BUNZIP2_FORMAT "bunzip2 -c -d < %s > %s"
-#    define UNLZMA_FORMAT "unlzma -c -d < %s > %s"
-#  else
-#    define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s"
-#    define UNLZMA_FORMAT "unlzma -c -d < %s >> %s"
-#  endif
-#  define BZIP2_COMPRESS "bzip2"
-#  define LZMA_COMPRESS "lzma"
-#endif
-
-
-
-/*
- * The command filters for the manual and apropos searches.
- */
-
-#if (defined(hpux) || defined(macII) || defined(CRAY) || defined(ultrix) || \
-       defined(hcx) )
-#  define NO_MANPATH_SUPPORT
-#endif
-
-#ifndef HAS_MKSTEMP
-#  ifdef NO_MANPATH_SUPPORT
-#    define APROPOS_FORMAT ("man -k %s | pr -h Apropos > %s")
-#  else
-#    define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos > %s")
-#  endif
-#else
-/* with mkstemp the temp output file is already created */
-#  ifdef NO_MANPATH_SUPPORT
-#    define APROPOS_FORMAT ("man -k %s | pr -h Apropos >> %s")
-#  else
-#    define APROPOS_FORMAT ("man -M %s -k %s | pr -h Apropos >> %s")
-#  endif
-#endif
-
-#ifndef HANDLE_ROFFSEQ
-# if defined(ultrix)
-#  define FORMAT "| nroff -man"             /* The format command. */
-# elif defined(CSRG_BASED)
-#  define FORMAT "| eqn | tbl | nroff -mandoc"
-# elif defined(BSD) && (BSD >= 199103)
-#  define FORMAT "| eqn | tbl | nroff -man"
-# elif defined(linux) || defined(__CYGWIN__)
-#  define FORMAT "| pic | eqn | tbl -Tlatin1 | GROFF_NO_SGR= groff -Tlatin1 -mandoc"
-# else
-#  define FORMAT "| neqn | nroff -man"      /* The format command. */
-# endif
-# define TBL "tbl"
-#else /* HANDLE_ROFFSEQ */
-# if defined(linux)
-#  define ZSOELIM      "zsoelim"
-# else
-#  define ZSOELIM      "soelim"
-#endif
-# define EQN           "eqn"
-# define TBL           "tbl"
-# define GRAP          "grap"
-# define PIC           "pic"
-# define VGRIND                "vgrind"
-# define REFER         "refer"
-# if defined(CSRG_BASED)
-#  define FORMAT       "nroff -mandoc"
-# elif defined(linux)
-#  define FORMAT       "GROFF_NO_SGR= groff -Tlatin1 -mandoc"
-# elif defined(__DARWIN__)
-#  define FORMAT       "nroff -man"
-# else
-#  define FORMAT       "groff -man"
-# endif
-# define DEFAULT_MANROFFSEQ "et"
-#endif /*HANDLE_ROFFSEQ */
-
-/*
- * Names of the man and cat dirs.
- */
-
-#ifdef __bsdi__
-#define MAN "cat"
-#else
-#define MAN "man"
-#endif
-
-/*
- * The Apple, Cray,, SYSV386, and HCX folks put the preformatted pages in the
- * "man" directories.
- */
-#if (defined(macII) || defined(CRAY) || defined(hcx) || \
-       (defined(SYSV) && defined(i386))) && !defined(SCO) && !defined(sun)
-#  define CAT MAN
-#elif defined(SCO)
-#  define CAT "cat."
-#else
-#  define CAT "cat"
-#endif
-
-/* Solaris has nroff man pages in "man" and sgml man pages in "sman" */
-#if defined(sun) && defined(SVR4)
-#  define SFORMAT              "/usr/lib/sgml/sgml2roff"
-#  define SMAN                 "sman"
-#  undef SEARCHOTHER
-#  define SEARCHOTHER          SMAN
-#  define SGMLENT_EXTENSION    "ent"   /* SGML entity files end in ".ent" */
-#endif
-
-
-typedef struct _SectionList {
-  struct _SectionList * next;
-  char * label;                        /* section label */
-  char * directory;            /* section directory */
-  int flags;
-} SectionList;
-
-extern char * CreateManpageName(char * entry, int section, int flags);
-extern void AddStandardSections(SectionList **list, char * path);
-extern void AddNewSection(SectionList **list, char * path, char * file, char * label, int flags);
diff --git a/xman/version.h b/xman/version.h
deleted file mode 100644 (file)
index f10367d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* $XConsortium: version.h,v 1.11 94/04/17 20:44:00 gildea Exp $ */
-/*
-
-Copyright (c) 1987, 1988  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-#define XMAN_VERSION "Xman Version 3.2.0 - X11R7.0"
diff --git a/xman/xman.help b/xman/xman.help
deleted file mode 100644 (file)
index 247ed7c..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-XMAN is an X Window System manual browsing tool.
-
-
-
-GETTING STARTED
-
-By default, xman starts by creating a small window that contains three
-"buttons" (places on which to click a pointer button).  Two of these
-buttons, Help and Quit, are self-explanatory.  The third, Manual Page,
-creates a new manual page browser window; you may use this button to
-open a new manual page any time xman is running.
-
-A new manual page starts up displaying this help information.  The
-manual page contains three sections.  In the upper left corner are two
-menu buttons.  When the mouse is clicked on either of these buttons a
-menu is popped up.  The contents of these menus is described below.
-Directly to the right of the menu buttons is an informational display.
-This display usually contains the name of the directory or manual page
-being displayed.  It is also used to display warning messages and the
-current version of xman.  The last and largest section is the
-information display.  This section of the application contains either a
-list of manual pages to choose from or the text of a manual page.
-
-To use xman pull down the Sections menu to select a manual section.
-When the section is displayed, click the left pointer button on the name
-of the manual page that you would like to see.  Xman will replace the
-directory listing with the manual page you selected.
-
-That should be enough to get you started.  Once you understand the
-basics of how to use xman, take a look at the rest of this file to see
-the advanced features that are available to make using xman fast and
-efficient.
-
-
-SCROLLING TEXT
-
-The scroll bars are similar to xterm and xmh scroll bars; clicking the
-left or right pointer button with the pointer at the bottom of the
-scroll bar will scroll the text down or up one page, respectively.
-Clicking with the pointer farther up the scroll bar scrolls
-proportionally less than one page.  Clicking the middle button a portion
-of the way down the scroll bar will move the text window that portion of
-the way down the text.  Holding the middle button and moving the pointer
-up and down allows the text to be scrolled dynamically.
-
-You may also type 'f' or <space bar> to scroll down one page, and 'b' to
-scroll up one page.
-
-
-RESIZING WINDOWS
-
-You can resize any of the windows in xman with your window manager, and
-xman will do the best it can to resize everything internally into a
-useful configuration.  The only control over the internal arrangement
-that you have is moving the border between the manual page and directory
-when both are displayed.  This is done by clicking and holding the any
-pointer button when the cursor is over the small square (grip) on the
-right side of the screen.  The grip is located on the horizontal line
-which separates the panes.  The grip may be moved up and down to resize
-the panes of the screen, and when the pointer button is released xman
-will move the pane boundary to the newly specified location.
-
-
-MENU COMMANDS
-
-There are two ways to activate the menus.  The first is to click any
-pointer button in the menu button corresponding to the menu you want to
-activate.  The second method is to hold down the "Control" key and click
-the left pointer button for the Options menu or the middle pointer
-button for the Sections menu.  Reguardless of how the menu was
-activated, selecting items is the same.
-
-Once a menu is activated, continue to hold down the pointer button and
-drag the pointer cursor over the item that you would like to activate.
-Once the item that you want to select is highlighted, select it by
-releasing the pointer button.  To avoid making a menu selection, move
-the pointer cursor outside the menu and release the button.
-
-Selecting one of the items in the Sections menu will display the named
-directory.
-
-The following commands are available through the Options menu:
-
-Display Directory      Show the current section directory.
-
-Display Manual Page    Show the current manual page.
-
-Help                   Create a help window with this text displayed.
-
-Search                 Pop up a dialogue box that allows the entire
-                       tree of manual pages to be searched for a
-                       specific name.  A keyword (apropos) search is
-                       also available through this dialogue box.
-
-Show Both Screens      Split the manual page display window to display
-                       both the current manual page and the directory. 
-Show One Screen                Return to a single screen display of either a 
-                       manual page or directory listing.
-
-Remove This Man Page   Remove this manual page, do not quit.
-
-Open New Man Page      Pop up a new manual page browser window.
-
-Show Version           Print the current version of xman to the
-                       information display window.  Please include the
-                       version number when reporting bugs.
-Quit                   Close all xman windows and quit xman.
-
-
-SUMMARY OF BASIC ACTIONS
-
-In a menu button:
-
-       CLICK:                  Pop up a menu
-
-In a directory, manual page, or scroll bar:
-
-       <CONTROL> CLICK LEFT:   Pop up the Options menu.
-       <CONTROL> CLICK MIDDLE: Pop up the Sections menu.
-
-In a  directory:
-
-       CLICK LEFT:             Bring up named manual page
-       <SHIFT> CLICK MIDDLE:   Go to manual page previously chosen.
-
-In a manual page or apropos listing:
-
-       <SHIFT> CLICK MIDDLE:   Go to directory of manual pages.
-
-In scroll bars:
-
-       CLICK LEFT:     Move down - more if pointer is near bottom
-                                   of window, less if at top.
-       CLICK MIDDLE:   Move top of page to current pointer position.
-       CLICK RIGHT:    Move up - more if pointer is near bottom
-                                 of window, less if at top.
-
-SEARCHING
-
-Xman has a built-in searching utility that allows the user to search the
-entire manual page tree for a specific topic (manual page search) or a
-keyword (apropos search).  The search dialogue box can be activated from
-the Options menu, or by the key Control-s.  If the search is started
-from the small initial topbox xman will open a new manual page if the
-search was successful, and fail silently if the search was unsuccessful.
-
-Manual page searches are performed starting in the currently displayed
-section.  If no match is found then the remaining sections are searched
-in the order that the sections appear in the Sections menu, starting at
-the top.  The current version of xman immediately displays the first
-manual page that it finds.  If the manual page cannot be found that fact
-is noted in the informational display.
-
-An apropos search will search a list of short descriptions for all
-manual pages on the system and return a list of all descriptions which
-contain the keyword specified.
-
-
-KEYBOARD ACCELERATORS
-
-Xman contains a set of preinstalled keyboard accelerators.  These are a
-set of key bindings that perform many of the same operations as the menu
-items.  Since it is not necessary to pull down the menu,  these actions
-can be performed more quickly, hence the name accelerators.  
-
-The default key bindings for xman are:
-
-Anywhere:
-
-       Control - c             Exit xman
-       Control - h             Create the help window
-       Control - n             Create a new man page
-       Control - q             Exit xman
-       Control - s             Create a search popup 
-
-In a manual page, directory, or help window:
-
-       Control - r             Remove this manual page or help display
-       Control - v             Show the current version of xman
-
-In a manual page or directory:
-
-       Control - d             Display Directory
-       Control - m             Display Man Page
-
-In a manual page only:
-
-       b                       Page Back
-       f                       Page forward
-       <Space>                 Page forward
-       1                       One line forward
-       2                       Two lines forward
-       3                       Three lines forward
-       4                       Four lines forward
-
-Note: Control-s does not have any effect in the help window.
-
-
-FURTHER INFORMATION
-
-Xman is highly customizable.  Through the X resource database a user can
-customize the look and feel of this application so that it meets a
-preferred style of interaction.  Almost any configuration that is
-available dynamically can be specified through resources.  This includes
-changing the size, color, and fonts, starting with no topbox, showing
-both screens, and rebinding the keyboard accelerators.
-
-The information on customizing xman is contained in the xman manual
-page, I will leave it to you to figure out how to find and display that
-information :-)
-
-
-                                       Chris D. Peterson MIT X
-                                       Consortium
-
-CREDITS
-
-Version:       Use 'Show Version' menu item.
-Written By:    Chris D. Peterson - formerly MIT X Consortium
-Based Upon:    Xman for X10 by Barry Shein - Boston University
-
-Copyright 1988, 1989 X Consortium
-Edited by Donna Converse and Dave Sternlicht
-
-
diff --git a/xman/xman.man b/xman/xman.man
deleted file mode 100644 (file)
index 4aaabc0..0000000
+++ /dev/null
@@ -1,387 +0,0 @@
-.\" $XConsortium: xman.man,v 1.23 94/04/17 20:44:02 matt Exp $
-.\"
-.\" $XFree86: xc/programs/xman/xman.man,v 1.3 2001/01/27 18:21:18 dawes Exp $
-.\"
-.TH XMAN 1 __xorgversion__
-.SH NAME
-xman \- Manual page display program for the X Window System
-.SH SYNOPSIS
-.B xman
-[
-.I \-options
-\&.\|.\|. ]
-.SH DESCRIPTION
-.I Xman
-is a manual page browser.  The default size of the initial \fIxman\fP
-window is small so that you can leave it running throughout your entire login
-session.  In the initial window there are three options:
-\fIHelp\fP will pop up a window with on-line help, \fIQuit\fP will
-exit, and \fIManual Page\fP will pop up a window with a manual page
-browser in it.
-Typing Control-S will pop up a window prompting for a specific manual
-page to display.
-You may display more than one manual page browser window at a time
-from a single execution of \fIxman\fP.
-.PP
-For further information on using \fIxman\fP, please read the on-line
-help information.  Most of this manual will discuss
-customization of \fIxman\fP.
-.SH "OPTIONS"
-.PP
-Xman supports all standard Toolkit command line arguments (see
-\fIX\fP(1)).  The following additional arguments are supported.
-.sp
-.IP "\fB\-helpfile\fP \fIfilename\fP"
-Specifies a helpfile to use other than the default.
-.IP \fB\-bothshown\fP
-Allows both the manual page and manual directory to be on the screen at
-the same time.
-.IP \fB\-notopbox\fP
-Starts without the Top Menu with the three buttons in it.
-.IP "\fB\-geometry\fP \fIWxH+X+Y\fP"
-Sets the size and location of the Top Menu with the three buttons in it.
-.IP "\fB\-pagesize\fP \fIWxH+X+Y\fP"
-Sets the size and location of all the Manual Pages.
-.SH "CUSTOMIZING XMAN"
-.PP
-.I Xman
-allows customization of both the directories to be searched for manual pages,
-and the name that each directory will map to in the \fISections\fP
-menu.  Xman determines which directories it will
-search by reading the \fIMANPATH\fP environment variable.  If no
-\fIMANPATH\fP is found then the directory is /usr/man is searched on
-POSIX systems.  This environment
-is expected to be a colon-separated list of directories for xman to search.
-.sp
-.nf
-setenv MANPATH /mit/kit/man:/usr/man
-.fi
-.PP
-By default,
-.I xman
-will search each of the following directories (in each of the directories 
-specified in the users MANPATH) for manual pages.  If manual pages exist
-in that directory then they are added to list of manual pages for 
-the corresponding menu item.
-A menu item is only displayed for those sections that actually contain
-manual pages.
-.ta 1.5i
-.nf
-
-Directory      Section Name
----------      ------------
-man1   (1) User Commands
-man2   (2) System Calls
-man3   (3) Subroutines
-man4   (4) Devices
-man5   (5) File Formats
-man6   (6) Games       
-man7   (7) Miscellaneous
-man8   (8) Sys. Administration
-manl   (l) Local
-mann   (n) New
-mano   (o) Old
-
-.fi     
-For instance, a user has three directories in her manual path and each
-contain a directory called \fIman3\fP.  All these manual pages will appear
-alphabetically sorted when the user selects the menu item called
-\fI(3) Subroutines\fP.  If there is no directory called \fImano\fP in
-any of the directories in her MANPATH, or there are no manual pages
-in any of the directories called \fImano\fP then no menu item will be
-displayed for the section called \fI(o) Old\fP.
-.SH "BSD AND LINUX SYSTEMS"        
-.PP
-In newer BSD and Linux systems, \fIXman\fP will search for a file named
-\fI/etc/man.conf\fP which will contain the list of directories containing
-manual pages. See \fIman.conf\fP(5) for a complete description of the file
-format.
-.SH "THE MANDESC FILE"        
-.PP
-By using the \fImandesc\fP file a user or system manager is able to 
-more closely control which manual pages will appear in each of the sections
-represented by menu items in the \fISections\fP menu.  This 
-functionality is only available on a section by section basis, and individual
-manual pages may not be handled in this manner.
-(Although generous use of 
-symbolic links \(em see \fIln\fP(1) \(em will allow
-almost any configuration you can imagine.)
-.PP
-The format of the mandesc file is a character followed by a label.  The
-character determines which of the sections will be added under this label.
-For instance suppose that you would like to create an extra menu item that 
-contains all programmer subroutines.  This label should contain all manual
-pages in both sections two and three.  The \fImandesc\fP file
-would look like this:
-.nf     
-        
-2Programmer Subroutines
-3Programmer Subroutines
-
-.fi
-This will add a menu item to the \fISections\fP menu that would
-bring up a listing of all manual pages in sections two and three of
-the Programmers Manual.  Since the label names are \fIexactly\fP the
-same they will be added to the same section. Note, however, that the
-original sections still exist.
-.PP
-If you want to completely ignore the default sections in a manual directory
-then add the line:
-.nf
-
-no default sections
-
-.fi
-anywhere in your mandesc file.  This keeps xman from searching
-the default manual sections \fIIn that directory only\fP.  As an example,
-suppose you want to do the same thing as above, but you don't think that
-it is useful to have the \fISystem Calls\fP or \fISubroutines\fP sections
-any longer.  You would need to duplicate the default entries, as well as
-adding your new one.
-.nf
-
-no default sections
-1(1) User Commands
-2Programmer Subroutines
-3Programmer Subroutines
-4(4) Devices
-5(5) File Formats
-6(6) Games
-7(7) Miscellaneous
-8(8) Sys. Administration
-l(l) Local
-n(n) New
-o(o) Old
-
-.fi
-Xman will read any section that is of the from \fIman<character>\fP, where
-<character> is an upper or lower case letter (they are treated distinctly) or
-a numeral (0-9).  Be warned, however, that man(1) and catman(8) will 
-not search directories that are non-standard.
-.SH WIDGETS
-In order to specify resources, it is useful to know the hierarchy of
-the widgets which compose \fIxman\fR.  In the notation below,
-indentation indicates hierarchical structure.  The widget class name
-is given first, followed by the widget instance name.
-.sp
-.nf
-.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i
-Xman xman      \fI(This widget is never used)\fP
-       TopLevelShell  topBox
-               Form  form
-                       Label  topLabel
-                       Command  helpButton
-                       Command  quitButton
-                       Command  manpageButton
-               TransientShell  search
-                       DialogWidgetClass  dialog
-                               Label  label
-                               Text  value
-                               Command  manualPage
-                               Command  apropos
-                               Command  cancel
-               TransientShell  pleaseStandBy
-                       Label  label
-       TopLevelShell  manualBrowser
-               Paned  Manpage_Vpane
-                       Paned  horizPane
-                               MenuButton  options
-                               MenuButton  sections
-                               Label  manualBrowser
-                       Viewport  directory
-                               List  directory 
-                               List  directory 
-                               .
-                               . (one for each section, 
-                               .  created on the fly)
-                               .
-                       ScrollByLine  manualPage
-               SimpleMenu  optionMenu
-                       SmeBSB  displayDirectory
-                       SmeBSB  displayManualPage
-                       SmeBSB  help
-                       SmeBSB  search
-                       SmeBSB  showBothScreens
-                       SmeBSB  removeThisManpage
-                       SmeBSB  openNewManpage
-                       SmeBSB  showVersion
-                       SmeBSB  quit
-               SimpleMenu  sectionMenu
-                       SmeBSB  <name of section>
-                               .
-                               . (one for each section)
-                               .
-               TransientShell  search
-                       DialogWidgetClass  dialog
-                               Label  label
-                               Text  value
-                               Command  manualPage
-                               Command  apropos
-                               Command  cancel
-               TransientShell  pleaseStandBy
-                       Label  label
-               TransientShell  likeToSave
-                       Dialog  dialog
-                               Label  label
-                               Text  value
-                               Command  yes
-                               Command  no
-       TopLevelShell  help
-               Paned  Manpage_Vpane
-                       Paned  horizPane
-                               MenuButton  options
-                               MenuButton  sections
-                               Label  manualBrowser
-                       ScrollByLine  manualPage
-               SimpleMenu  optionMenu
-                       SmeBSB  displayDirectory
-                       SmeBSB  displayManualPage
-                       SmeBSB  help
-                       SmeBSB  search
-                       SmeBSB  showBothScreens
-                       SmeBSB  removeThisManpage
-                       SmeBSB  openNewManpage
-                       SmeBSB  showVersion
-                       SmeBSB  quit
-
-.fi
-.SH "APPLICATION RESOURCES"
-\fIxman\fP has the following application-specific resources which allow
-customizations unique to \fIxman\fP.
-.PP
-.TP 18
-\fBmanualFontNormal\fP (Class \fBFont\fP)
-The font to use for normal text in the manual pages.
-.TP 18
-\fBmanualFontBold\fP (Class \fBFont\fP)
-The font to use for bold text in the manual pages.
-.TP 18
-\fBmanualFontItalic\fP (Class \fBFont\fP)
-The font to use for italic text in the manual pages.
-.TP 18
-\fBdirectoryFontNormal\fP (Class \fBFont\fP)
-The font to use for the directory text.
-.TP 18
-\fBbothShown\fP (Class \fBBoolean\fP)
-Either `true' or `false,' specifies whether or not you want both the
-directory and the manual page shown at start up.
-.TP 18
-\fBdirectoryHeight\fP (Class \fBDirectoryHeight\fP)
-The height in pixels of the directory, when the directory and the manual page
-are shown simultaneously.
-.TP 18
-\fBtopCursor\fP (Class \fBCursor\fP)
-The cursor to use in the top box.
-.TP 18
-\fBhelpCursor\fP (Class \fBCursor\fP)
-The cursor to use in the help window.
-.TP 18
-\fBmanpageCursor\fP (Class \fBCursor\fP)
-The cursor to use in the manual page window.
-.TP 18
-\fBsearchEntryCursor\fP (Class \fBCursor\fP)
-The cursor to use in the search entry text widget.
-.TP 18
-\fBpointerColor\fP (Class \fBForeground\fP)
-This is the color of all the cursors (pointers) specified above.  The
-name was chosen to be compatible with xterm.
-.TP 18 
-\fBhelpFile\fP  (Class \fBFile\fP)
-Use this rather than the system default helpfile.
-.TP 18
-\fBtopBox\fP (Class \fBBoolean\fP)
-Either `true' or `false,' determines whether the top box (containing
-the help, quit and manual page buttons) or a manual page is put on the screen
-at start-up.  The default is true.
-.TP 18
-\fBverticalList\fP (Class \fBBoolean\fP)
-Either `true' or `false,' determines whether the directory listing is 
-vertically or horizontally organized.  The default is horizontal (false).
-.SH "GLOBAL ACTIONS"
-\fIXman\fP defines all user interaction through global actions.  This allows
-the user to modify the translation table of any widget, and bind any event
-to the new user action.  The list of actions supported by \fIxman\fP are:
-.TP 1.5i
-.B GotoPage(\fIpage\fB) 
-When used in a manual page display window this will allow the user to
-move between a directory and manual page display.  The \fIpage\fP argument can
-be either \fBDirectory\fP or \fBManualPage\fP.
-.TP 1.5i
-.B Quit()
-This action may be used anywhere, and will exit xman.
-.TP 1.5i
-.B Search(\fItype\fB, \fIaction\fB)
-Only useful when used in a search popup, this action will cause the search
-widget to perform the named search type on the string in the search popup's
-value widget. This action will also pop down the search widget. The
-\fItype\fP argument can be either \fBApropos\fP, \fBManpage\fP or
-\fBCancel\fP.  If an \fIaction\fP of \fBOpen\fP is specified then xman
-will open a new manual page to display the results of the search, otherwise
-xman will attempt to display the results in the parent of the search popup.
-.TP 1.5i
-.B PopupHelp()
-This action may be used anywhere, and will popup the help widget.
-.TP 1.5i
-.B PopupSearch()
-This action may be used anywhere except in a help window.  It will cause
-the search popup to become active and visible on the screen, allowing
-the user search for a manual page.
-.TP 1.5i
-.B CreateNewManpage()
-This action may be used anywhere, and will create a new manual page
-display window.
-.TP 1.5i
-.B RemoveThisManpage()
-This action may be used in any manual page or help display window.  When
-called it will remove the window, and clean up all resources
-associated with it.
-.TP 1.5i
-.B SaveFormattedPage(\fIaction\fP)
-This action can only be used in the \fBlikeToSave\fP popup widget, and
-tells xman whether to \fBSave\fP or \fBCancel\fP a save of the 
-manual page that has just been formatted.
-.TP 1.5i
-.B ShowVersion()
-This action may be called from any manual page or help display window, and
-will cause the informational display line to show the current version
-of xman.
-.SH FILES
-.IP "\fI<manpath directory>\fP/man<\fIcharacter\fP>" 2.5i
-.IP "\fI<manpath directory>\fP/cat<\fIcharacter\fP>"
-.IP "\fI<manpath directory>\fP/mandesc"
-.IP __apploaddir__/Xman
-specifies required resources.
-.IP /tmp
-.I Xman
-creates temporary files in /tmp for all unformatted man pages and all apropos
-searches.
-.SH "SEE ALSO"
-.IR X (__miscmansuffix__),
-.IR man (1),
-.IR apropos (1),
-.IR catman (8),
-.I "Athena Widget Set"
-.SH ENVIRONMENT
-.TP 1.5i
-.B DISPLAY 
-the default host and display to use.
-.TP 1.5i
-.B MANPATH
-the search path for manual pages.  Directories are separated by
-colons (e.g. /usr/man:/mit/kit/man:/foo/bar/man).
-.TP 1.5i
-.B XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-.TP 1.5i
-.B XAPPLRESDIR
-A string that will have ``Xman'' appended to it.  This string will be
-the full path name of a user app-defaults file to be merged into the
-resource database after the system app-defaults file, and before
-the resources that are attached to the display.
-.br
-See \fIX(__miscmansuffix__)\fP for a full statement of rights and permissions.
-.SH AUTHORS
-Chris Peterson, MIT X Consortium from the V10 version written by Barry
-Shein formerly of Boston University.
-Bug fixes and Linux support by Carlos A M dos Santos, for The XFree86 Project.
diff --git a/xmessage/COPYING b/xmessage/COPYING
new file mode 100644 (file)
index 0000000..67cbc0c
--- /dev/null
@@ -0,0 +1,53 @@
+Copyright (c) 1988, 1991, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+       ----------------------------------------------------
+
+Copyright (C) 2003 The XFree86 Project, Inc.  All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use, copy,
+modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT.  IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the XFree86 Project
+shall not be used in advertising or otherwise to promote the sale,
+use or other dealings in this Software without prior written
+authorization from the XFree86 Project.
diff --git a/xmessage/ChangeLog b/xmessage/ChangeLog
new file mode 100644 (file)
index 0000000..40033de
--- /dev/null
@@ -0,0 +1,380 @@
+commit ad5f249bf731ee06958e0948f0898ac3f3e26352
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 23:14:56 2010 -0800
+
+    xmessage 1.0.3
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit ac722e899333482e96de163eadfed1a540209dce
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 23:14:24 2010 -0800
+
+    Rely on PKG_CHECK_MODULES to AC_SUBST XMESSAGE_CFLAGS & _LIBS
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 529f0f2125a1f5e7d6382f918af955616a35d657
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 23:10:13 2010 -0800
+
+    Fill in COPYING file with notices from source code
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 72014bab094682621a206958bb7c62f83d789cde
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 23:06:47 2010 -0800
+
+    Use AM_V_GEN to silence manpage generation too
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit d351d89dd97e8b90e2b6a0421d8e976d22c8fb14
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 29 23:03:51 2010 -0800
+
+    Bump xorg-macros requirement to 1.4 for XORG_INSTALL changes
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 093a45093e98b08763c398fc36955ea4c9350edc
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 7fd49423ac4497443f0e5b53588bc064f9096e7e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:54 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit 3ff203878ca5361fb7d11a9589739a2cc1e2e312
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:08 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit bf0f065f4d92c9c8e9a04863fad1fff7885d60bb
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 726f220cbd1a9a795c57c6b8e9d2bcc7ba25de65
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:39 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit bdd48bb136f3c7aa27845f5478c81579c39011eb
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:15 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit f4f59348603fffd2fd3249f272eeeaa72f819b9a
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Thu Jan 22 16:05:29 2009 -0200
+
+    Correct make distcheck and sparse warnings.
+
+commit 17bb13a8280da865ecc1be940a8313e65c178a35
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Sun Mar 16 18:15:54 2008 -0300
+
+    Compile warning fixes.
+    
+      Declare xmessage.c:detab as static to avoid warning about missing prototype.
+      Also remove CVS id variable, and the printing of it in "xmessage -help".
+
+commit 1c6e1c795774e80c8fac489671906be2a3d8641d
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Wed Aug 20 10:32:52 2008 -0400
+
+    xaw8 is gone, use xaw7
+
+commit 985f825a94723f9f4b876af790ce92634d1129af
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sat Aug 2 17:40:05 2008 +0200
+
+    Create the app-defaults dir when using a build dir (build fix)
+    
+    Also use AM_CFLAGS instead of xmessage_CFLAGS, making AM_PROG_CC_C_O
+    unnecessary.
+
+commit c87a9f9e90158ce3afe4986c6d3e85a7b24a7230
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:34:54 2008 -0700
+
+    Added missing AM_PROG_CC_C_O
+
+commit 0b12bb902e42ad3922f6ea6448f183dfd450d982
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Mar 27 20:08:08 2008 -0700
+
+    Build fix for file systems that are not case sensitive
+
+commit d904b9e532da45d1b31621f51e5d45553ae83d89
+Author: Brice Goglin <bgoglin@debian.org>
+Date:   Tue Sep 4 00:45:50 2007 +0200
+
+    unquote_pairs() really unquotes all pairs
+    
+    Fix unquote_pairs() to unquote every pair in br instead only
+    the first one n times.
+    
+    Reported by Viktor Horvath in Debian bug #440734.
+
+commit 24f1760790a9d2f73cac94bc00d8137fefac9f38
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date:   Fri Aug 10 11:18:12 2007 +0200
+
+    Bump version
+
+commit db559a38a8bc954c6fd54866193a683d5c78bffa
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Tue Apr 24 22:07:48 2007 +0200
+
+    fill in this generated file.
+
+commit aabd047545359c82eb0035f8aa77864b362e7f0e
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Tue Apr 24 22:04:09 2007 +0200
+
+    Add rules to generate ChangeLog.
+    
+    (this file was missed in a previous commit - sorry).
+
+commit 821d4603d701efcb09fcbdd246d6f7d9c3a24f28
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Apr 15 19:13:36 2007 +0200
+
+    Untabify message before inserting it.
+    
+    From Kevin Ryde in Debian BTS, via bugzilla #10575, Brice Goglin.
+
+commit ed3f8aa0b66e5829836b576e6096bd645e87c50e
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Apr 15 19:05:45 2007 +0200
+
+    Add emacs droppings to the list of ignored files.
+
+commit 1635803a5f719b0f8b5af8208819d63166990c5b
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Apr 15 19:04:51 2007 +0200
+
+    Modernize build
+    
+    - replace ChangeLog by a generated file
+    - rename .cvsignore -> .gitignore
+
+commit 238767cb31e02d75bb7880f0b9c79e27992c3155
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:52 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit 6b7b94f799c71278065bbf589108f1e2f7b25671
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:46 2005 +0000
+
+    Stub COPYING files
+
+commit ffde028f5a2f865a411b6b63c9785e339c4d9a3c
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:09 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit ff03086d9069fcd5f2b952709737dae7d51d80ef
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 7 16:18:01 2005 +0000
+
+    Change to use the app-defaults default dir configured in libXt.
+
+commit c3dddcf94c8ec3c4d483e1d568ea8fb69aa468a0
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:24 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit bab54eda6bb0b6680580b27ee0b5e268b97cb8ad
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:26 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 94622fedb20d9454d728628f190cf5280ed9a066
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:44 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 5464c0f2adf34213f21137d1f819254ed50626e5
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:35:05 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit 4d5dfb99f50bd1d9577d17426d1cabe8ea29a2a0
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:54 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit b71de113e311e10e59c3b6fbdc1ff63c90c8324d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:56 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit b70f6692231e994bb57b4e51c09ab5535241713c
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:32:55 2005 +0000
+
+    Change default install dir for app-default files from
+        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
+        the monolith & allow localization
+
+commit 630e728f987a8fcd53d1a0076bca0834d45e132f
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:24 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 557c649ffb5bbfed8533b3d93ea1dbedaa0fc0ac
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:47 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit eb77492515f7944b530550950a0143c8fb5b45cf
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:30 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit 28253816f0a35c12ba6e5eea660e6d89424a78be
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:36 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit fa1d1593fe790d08a2e6e1f4e16f86f923b7aeb5
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Jul 26 15:44:03 2005 +0000
+
+    Replace more GNU make-ism's with more portable macros
+
+commit a4ea5c92e64b3cf7a0df17705c27e8a7abdb2f8b
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Jul 24 10:26:39 2005 +0000
+
+    fix GNU-make only app-defaults rule
+
+commit 48a77ca80a31851bf02cec6ab510d9f1458311a5
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:32:02 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit 665ba4b9cf9a7c94782637051eb8e0d735bbaf7c
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Tue Jul 5 22:51:11 2005 +0000
+
+    Add build systems for xlogo, xlsatoms, xlsclients, xmag, xman, xmessage,
+        xmh, xmore. lib/Xaw/xaw.m4: Add an AM_CONDITIONAL and a shell variable
+        xaw_use_xprint symlink.sh: add some extra files for xgc, xinit,
+        xkbcomp, xlogo, xmb, and xmodmap xc/programs/xmore/xmore.c:
+        Conditionalize use of xprint
+
+commit 78f5d29fcde2813dfed4474a3cce4ef77c592580
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:54:58 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit e5660a70027feb61532e8ab84d41ea6eed085cab
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:35:40 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 39acb07c37ed1df6d3ee3f332c9d817018b2c2e5
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:13:15 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 7879a743821a3984c29c0172450c1eedf6a4d730
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:26 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit 795b4a0de2c473b11901107585f7d8a85abfd193
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:24:14 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 9ba02b5d7b34eba8356dfcb83694698dbc550073
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:15 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 6dcad3b7ba5983633e4303c22446c3de8922c003
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:15 2003 +0000
+
+    Initial revision
+
+commit 0e47985a1de54c6ac4f09831a7a81c83c43fc577
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:23 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit e87b0d408c8bef387afb069e25028d9a52c58a62
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:23 2003 +0000
+
+    Initial revision
diff --git a/xmessage/INSTALL b/xmessage/INSTALL
new file mode 100644 (file)
index 0000000..8b82ade
--- /dev/null
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
similarity index 86%
rename from xcalc/Makefile.am
rename to xmessage/Makefile.am
index 46a0d1d..8ce9c63 100644 (file)
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-bin_PROGRAMS = xcalc
+bin_PROGRAMS = xmessage
 
-AM_CFLAGS = $(XCALC_CFLAGS)
-xcalc_LDADD = $(XCALC_LIBS) -lm
+AM_CFLAGS = $(CWARNFLAGS) $(XMESSAGE_CFLAGS)
+xmessage_LDADD = $(XMESSAGE_LIBS)
 
-xcalc_SOURCES =        \
-        actions.c \
-        math.c \
-        xcalc.c \
-        xcalc.h
+xmessage_SOURCES =     \
+        makeform.c \
+        readfile.c \
+        readfile.h \
+        xmessage.c \
+        xmessage.h
 
 appman_PRE = \
-        xcalc.man
-
-# App default files  (*.ad)
+        xmessage.man
 
+# App default files
 DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 
 appdefaultdir = @appdefaultdir@
 
 dist_appdefault_DATA = \
-        app-defaults/XCalc \
-        app-defaults/XCalc-color
-
-
-
-.PHONY: ChangeLog INSTALL
-
-INSTALL:
-       $(INSTALL_CMD)
-
-ChangeLog:
-       $(CHANGELOG_CMD)
-
-dist-hook: ChangeLog INSTALL
+        app-defaults/Xmessage \
+        app-defaults/Xmessage-color
 
 appmandir = $(APP_MAN_DIR)
 
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
-EXTRA_DIST = $(appman_PRE) autogen.sh
+EXTRA_DIST = $(appman_PRE)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
 
@@ -86,3 +74,13 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
similarity index 96%
rename from xcalc/Makefile.in
rename to xmessage/Makefile.in
index df1b164..00ffd5f 100644 (file)
@@ -56,7 +56,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-bin_PROGRAMS = xcalc$(EXEEXT)
+bin_PROGRAMS = xmessage$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
@@ -76,10 +76,11 @@ CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
        "$(DESTDIR)$(appdefaultdir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_xcalc_OBJECTS = actions.$(OBJEXT) math.$(OBJEXT) xcalc.$(OBJEXT)
-xcalc_OBJECTS = $(am_xcalc_OBJECTS)
+am_xmessage_OBJECTS = makeform.$(OBJEXT) readfile.$(OBJEXT) \
+       xmessage.$(OBJEXT)
+xmessage_OBJECTS = $(am_xmessage_OBJECTS)
 am__DEPENDENCIES_1 =
-xcalc_DEPENDENCIES = $(am__DEPENDENCIES_1)
+xmessage_DEPENDENCIES = $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -100,8 +101,8 @@ am__v_CCLD_0 = @echo "  CCLD  " $@;
 AM_V_GEN = $(am__v_GEN_$(V))
 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
 am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(xcalc_SOURCES)
-DIST_SOURCES = $(xcalc_SOURCES)
+SOURCES = $(xmessage_SOURCES)
+DIST_SOURCES = $(xmessage_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -184,19 +185,6 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
 LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
 MISC_MAN_DIR = @MISC_MAN_DIR@
 MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
 MKDIR_P = @MKDIR_P@
@@ -210,16 +198,12 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-SED = sed
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-XCALC_CFLAGS = @XCALC_CFLAGS@
-XCALC_LIBS = @XCALC_LIBS@
-XORG_MAN_PAGE = @XORG_MAN_PAGE@
+XMESSAGE_CFLAGS = @XMESSAGE_CFLAGS@
+XMESSAGE_LIBS = @XMESSAGE_LIBS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -271,33 +255,48 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = $(XCALC_CFLAGS)
-xcalc_LDADD = $(XCALC_LIBS) -lm
-xcalc_SOURCES = \
-        actions.c \
-        math.c \
-        xcalc.c \
-        xcalc.h
+AM_CFLAGS = $(CWARNFLAGS) $(XMESSAGE_CFLAGS)
+xmessage_LDADD = $(XMESSAGE_LIBS)
+xmessage_SOURCES = \
+        makeform.c \
+        readfile.c \
+        readfile.h \
+        xmessage.c \
+        xmessage.h
 
 appman_PRE = \
-        xcalc.man
+        xmessage.man
 
 
-# App default files  (*.ad)
+# App default files
 DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
 dist_appdefault_DATA = \
-        app-defaults/XCalc \
-        app-defaults/XCalc-color
+        app-defaults/Xmessage \
+        app-defaults/Xmessage-color
 
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-EXTRA_DIST = $(appman_PRE) autogen.sh
+EXTRA_DIST = $(appman_PRE)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 CLEANFILES = $(appman_DATA)
+SED = sed
 
 # Strings to replace in man pages
 XORGRELSTRING = @PACKAGE_STRING@
 XORGMANNAME = X Version 11
+MAN_SUBSTS = \
+       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+       -e 's|__xservername__|Xorg|g' \
+       -e 's|__xconfigfile__|xorg.conf|g' \
+       -e 's|__projectroot__|$(prefix)|g' \
+       -e 's|__apploaddir__|$(appdefaultdir)|' \
+       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
+       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
+       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -392,9 +391,9 @@ uninstall-binPROGRAMS:
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-xcalc$(EXEEXT): $(xcalc_OBJECTS) $(xcalc_DEPENDENCIES) 
-       @rm -f xcalc$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(xcalc_OBJECTS) $(xcalc_LDADD) $(LIBS)
+xmessage$(EXEEXT): $(xmessage_OBJECTS) $(xmessage_DEPENDENCIES) 
+       @rm -f xmessage$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(xmessage_OBJECTS) $(xmessage_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -402,9 +401,9 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/actions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcalc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makeform.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmessage.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -792,6 +791,9 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
 
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
 .PHONY: ChangeLog INSTALL
 
 INSTALL:
@@ -802,9 +804,6 @@ ChangeLog:
 
 dist-hook: ChangeLog INSTALL
 
-.man.$(APP_MAN_SUFFIX):
-       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/xmessage/README b/xmessage/README
new file mode 100644 (file)
index 0000000..b60df14
--- /dev/null
@@ -0,0 +1,17 @@
+xmessage displays a message or query in a window.  The user can click
+on an "okay" button to dismiss it or can select one of several buttons
+to answer a question.  xmessage can also exit after a specified time.
+
+
+This is the X11R6 version.  Here is what's new since R5:
+
+maxWidth (used in auto geom calc, ignored if geometry explicitly given)
+maxHeight
+-center
+-timeout
+-nearmouse
+scrollbars
+
+
+Stephen Gildea
+gildea@x.org
similarity index 97%
rename from xedit/aclocal.m4
rename to xmessage/aclocal.m4
index e3e9a3e..ab52c12 100644 (file)
@@ -19,1923 +19,1913 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
 
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
 #
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
 #
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
 #
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
 #
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
 
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+# AM_CONDITIONAL                                            -*- Autoconf -*-
 
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
+# serial 9
 
-$$1_PKG_ERRORS
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
 
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+# serial 10
 
-_PKG_TEXT
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
 
-dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the "Software"),
-dnl to deal in the Software without restriction, including without limitation
-dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
-dnl and/or sell copies of the Software, and to permit persons to whom the
-dnl Software is furnished to do so, subject to the following conditions:
-dnl
-dnl The above copyright notice and this permission notice (including the next
-dnl paragraph) shall be included in all copies or substantial portions of the
-dnl Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-dnl DEALINGS IN THE SOFTWARE.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To ensure that this macro is defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION],
-#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.5.0])
-m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
-m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
-m4_if(m4_cmp(maj_have, maj_needed), 0,,
-    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
-m4_if(m4_version_compare(vers_have, [$1]), -1,
-    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
-m4_undefine([vers_have])
-m4_undefine([maj_have])
-m4_undefine([maj_needed])
-]) # XORG_MACROS_VERSION
-
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       # under Cygwin unix is still defined even with -undef
-       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS="-undef -ansi"
-               AC_MSG_RESULT([yes, with -ansi])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
-
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
 #
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
-  HAVE_DEFS_ENT=no
-else
-  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
-
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
-
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([Whether to build pdf documentation])
-
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-
-AC_MSG_RESULT([$BUILDPDFDOC])
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
-    XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
 
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
 
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
 fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
 
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
 
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
 
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
 
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
 
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# XORG_WITH_XMLTO
-# ----------------
-# Minimum version: 1.5.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package.
-#
-# Interface to module:
-# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
-# XMLTO:       returns the path of the xmlto program found
-#              returns the path set by the user in the environment
-# --with-xmlto:        'yes' user instructs the module to use xmlto
-#              'no' user instructs the module not to use xmlto
-#
-# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_XMLTO],[
-AC_ARG_VAR([XMLTO], [Path to xmlto command])
-AC_ARG_WITH(xmlto,
-       AS_HELP_STRING([--with-xmlto],
-          [Use xmlto to regenerate documentation (default: yes, if installed)]),
-          [use_xmlto=$withval], [use_xmlto=auto])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-if test "x$use_xmlto" = x"auto"; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
-       have_xmlto=no
-   else
-        have_xmlto=yes
-   fi
-elif test "x$use_xmlto" = x"yes" ; then
-   AC_PATH_PROG([XMLTO], [xmlto])
-   if test "x$XMLTO" = "x"; then
-        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
-   fi
-   have_xmlto=yes
-elif test "x$use_xmlto" = x"no" ; then
-   if test "x$XMLTO" != "x"; then
-      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
-   fi
-   have_xmlto=no
-else
-   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
-fi
-AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
-]) # XORG_CHECK_XMLTO
+#serial 5
 
-# XORG_WITH_ASCIIDOC
-# ----------------
-# Minimum version: 1.5.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package.
-#
-# Interface to module:
-# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
-# ASCIIDOC:     returns the path of the asciidoc program found
-#               returns the path set by the user in the environment
-# --with-asciidoc: 'yes' user instructs the module to use asciidoc
-#                'no' user instructs the module not to use asciidoc
-#
-# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
-#
-AC_DEFUN([XORG_WITH_ASCIIDOC],[
-AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
-AC_ARG_WITH(asciidoc,
-       AS_HELP_STRING([--with-asciidoc],
-          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
-          [use_asciidoc=$withval], [use_asciidoc=auto])
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
-if test "x$use_asciidoc" = x"auto"; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
-       have_asciidoc=no
-   else
-        have_asciidoc=yes
-   fi
-elif test "x$use_asciidoc" = x"yes" ; then
-   AC_PATH_PROG([ASCIIDOC], [asciidoc])
-   if test "x$ASCIIDOC" = "x"; then
-        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
-   fi
-   have_asciidoc=yes
-elif test "x$use_asciidoc" = x"no" ; then
-   if test "x$ASCIIDOC" != "x"; then
-      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
-   fi
-   have_asciidoc=no
-else
-   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
-fi
-AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
-]) # XORG_CHECK_ASCIIDOC
 
-# XORG_WITH_DOXYGEN
-# ----------------
-# Minimum version: 1.5.0
-#
-# Documentation tools are not always available on all platforms and sometimes
-# not at the appropriate level. This macro enables a module to test for the
-# presence of the tool and obtain it's path in separate variables. Coupled with
-# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package.
-#
-# Interface to module:
-# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
-# DOXYGEN:      returns the path of the doxygen program found
-#               returns the path set by the user in the environment
-# --with-doxygen: 'yes' user instructs the module to use doxygen
-#                'no' user instructs the module not to use doxygen
-#
-# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
 #
-AC_DEFUN([XORG_WITH_DOXYGEN],[
-AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
-AC_ARG_WITH(doxygen,
-       AS_HELP_STRING([--with-doxygen],
-          [Use doxygen to regenerate documentation (default: yes, if installed)]),
-          [use_doxygen=$withval], [use_doxygen=auto])
-
-if test "x$use_doxygen" = x"auto"; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
-       have_doxygen=no
-   else
-        have_doxygen=yes
-   fi
-elif test "x$use_doxygen" = x"yes" ; then
-   AC_PATH_PROG([DOXYGEN], [doxygen])
-   if test "x$DOXYGEN" = "x"; then
-        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
-   fi
-   have_doxygen=yes
-elif test "x$use_doxygen" = x"no" ; then
-   if test "x$DOXYGEN" != "x"; then
-      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
-   fi
-   have_doxygen=no
-else
-   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
-fi
-AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
-]) # XORG_CHECK_DOXYGEN
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
 
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
 #
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AS_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no],
-               [MALLOC_ZERO_RETURNS_NULL=yes])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
+# serial 8
 
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
+# Do all the work for Automake.                             -*- Autoconf -*-
 
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_WITH_LINT],[
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
+AC_SUBST([CYGPATH_W])
 
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
-]) # XORG_WITH_LINT
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
 
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
-#
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-]) # XORG_LINT_LIBRARY
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
 
-# XORG_CWARNFLAGS
-# ---------------
-# Minimum version: 1.2.0
-#
-# Defines CWARNFLAGS to enable C compiler warnings.
-#
-AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
-    case `$CC -dumpversion` in
-    3.4.* | 4.*)
-       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
-       ;;
-    esac
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-       CWARNFLAGS="-v"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-]) # XORG_CWARNFLAGS
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# XORG_STRICT_OPTION
-# -----------------------
-# Minimum version: 1.3.0
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
-# Add configure option to enable strict compilation
-AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_CC_C99])
-AC_REQUIRE([XORG_CWARNFLAGS])
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_ARG_ENABLE(strict-compilation,
-                         AS_HELP_STRING([--enable-strict-compilation],
-                         [Enable all warnings from compiler and make them errors (default: disabled)]),
-                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
-if test "x$STRICT_COMPILE" = "xyes"; then
-       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
-       if test "x$GCC" = xyes ; then
-               STRICT_CFLAGS="-pedantic -Werror"
-       elif test "x$SUNCC" = "xyes"; then
-               STRICT_CFLAGS="-errwarn"
-    elif test "x$INTELCC" = "xyes"; then
-               STRICT_CFLAGS="-Werror"
-       fi
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
 fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
-]) # XORG_STRICT_OPTION
+AC_SUBST(install_sh)])
 
-# XORG_DEFAULT_OPTIONS
-# --------------------
-# Minimum version: 1.3.0
-#
-# Defines default options for X.Org modules.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
-AC_DEFUN([XORG_DEFAULT_OPTIONS], [
-XORG_CWARNFLAGS
-XORG_STRICT_OPTION
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-XORG_INSTALL
-XORG_MANPAGE_SECTIONS
-]) # XORG_DEFAULT_OPTIONS
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# XORG_INSTALL()
-# ----------------
-# Minimum version: 1.4.0
-#
-# Defines the variable INSTALL_CMD as the command to copy
-# INSTALL from $prefix/share/util-macros.
-#
-AC_DEFUN([XORG_INSTALL], [
-AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
-INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
-mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
-AC_SUBST([INSTALL_CMD])
-]) # XORG_INSTALL
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+# serial 2
 
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AS_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
-               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
-               [Major version of this package])
-       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
-       if test "x$PVM" = "x"; then
-               PVM="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
-               [$PVM],
-               [Minor version of this package])
-       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
-       if test "x$PVP" = "x"; then
-               PVP="0"
-       fi
-       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
-               [$PVP],
-               [Patch version of this package])
-])
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
 
-# XORG_CHANGELOG()
-# ----------------
-# Minimum version: 1.2.0
-#
-# Defines the variable CHANGELOG_CMD as the command to generate
-# ChangeLog from git.
-#
-#
-AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
-mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
-AC_SUBST([CHANGELOG_CMD])
-]) # XORG_CHANGELOG
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
+# serial 5
 
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
 
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 ])
 
-# AM_CONDITIONAL                                            -*- Autoconf -*-
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 5
 
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-  $1_TRUE='#'
-  $1_FALSE=
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
 fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
+AC_MSG_RESULT(yes)])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+# serial 1
 
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
 
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+# serial 2
 
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
 
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
+# Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 5
+# serial 2
 
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
     done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
+dnl
+dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+
+# XORG_MACROS_VERSION(required-version)
+# -------------------------------------
+# Minimum version: 1.1.0
+#
+# If you're using a macro added in Version 1.1 or newer, include this in
+# your configure.ac with the minimum required version, such as:
+# XORG_MACROS_VERSION(1.1)
+#
+# To ensure that this macro is defined, also add:
+# m4_ifndef([XORG_MACROS_VERSION],
+#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
+#
+#
+# See the "minimum version" comment for each macro you use to see what 
+# version you require.
+m4_defun([XORG_MACROS_VERSION],[
+m4_define([vers_have], [1.5.0])
+m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
+m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
+m4_if(m4_cmp(maj_have, maj_needed), 0,,
+    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
+m4_if(m4_version_compare(vers_have, [$1]), -1,
+    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
+m4_undefine([vers_have])
+m4_undefine([maj_have])
+m4_undefine([maj_needed])
+]) # XORG_MACROS_VERSION
+
+# XORG_PROG_RAWCPP()
+# ------------------
+# Minimum version: 1.0.0
+#
+# Find cpp program and necessary flags for use in pre-processing text files
+# such as man pages and config files
+AC_DEFUN([XORG_PROG_RAWCPP],[
+AC_REQUIRE([AC_PROG_CPP])
+AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
+   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
+
+# Check for flag to avoid builtin definitions - assumes unix is predefined,
+# which is not the best choice for supporting other OS'es, but covers most
+# of the ones we need for now.
+AC_MSG_CHECKING([if $RAWCPP requires -undef])
+AC_LANG_CONFTEST([Does cpp redefine unix ?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS=-undef
+               AC_MSG_RESULT([yes])
+       # under Cygwin unix is still defined even with -undef
+       elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+               RAWCPPFLAGS="-undef -ansi"
+               AC_MSG_RESULT([yes, with -ansi])
+       else
+               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
 
+AC_MSG_CHECKING([if $RAWCPP requires -traditional])
+AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
+if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+       AC_MSG_RESULT([no])
+else
+       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
+               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
+       fi
+fi
+rm -f conftest.$ac_ext
+AC_SUBST(RAWCPPFLAGS)
+]) # XORG_PROG_RAWCPP
 
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
+# XORG_MANPAGE_SECTIONS()
+# -----------------------
+# Minimum version: 1.0.0
 #
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+# Determine which sections man pages go in for the different man page types
+# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
+# Not sure if there's any better way than just hardcoding by OS name.
+# Override default settings by setting environment variables
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_DEFUN([XORG_MANPAGE_SECTIONS],[
+AC_REQUIRE([AC_CANONICAL_HOST])
 
-# serial 8
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
 
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
 
-# Do all the work for Automake.                             -*- Autoconf -*-
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
 
-# serial 16
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
 
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
+
+AC_SUBST([APP_MAN_SUFFIX])
+AC_SUBST([LIB_MAN_SUFFIX])
+AC_SUBST([FILE_MAN_SUFFIX])
+AC_SUBST([MISC_MAN_SUFFIX])
+AC_SUBST([DRIVER_MAN_SUFFIX])
+AC_SUBST([ADMIN_MAN_SUFFIX])
+AC_SUBST([APP_MAN_DIR])
+AC_SUBST([LIB_MAN_DIR])
+AC_SUBST([FILE_MAN_DIR])
+AC_SUBST([MISC_MAN_DIR])
+AC_SUBST([DRIVER_MAN_DIR])
+AC_SUBST([ADMIN_MAN_DIR])
+]) # XORG_MANPAGE_SECTIONS
+
+# XORG_CHECK_LINUXDOC
+# -------------------
+# Minimum version: 1.0.0
+#
+# Defines the variable MAKE_TEXT if the necessary tools and
+# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
+# Whether or not the necessary tools and files are found can be checked
+# with the AM_CONDITIONAL "BUILD_LINUXDOC"
+AC_DEFUN([XORG_CHECK_LINUXDOC],[
+if test x$XORG_SGML_PATH = x ; then
+    XORG_SGML_PATH=$prefix/share/sgml
 fi
+HAVE_DEFS_ENT=
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
+if test x"$cross_compiling" = x"yes" ; then
+  HAVE_DEFS_ENT=no
+else
+  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 fi
-AC_SUBST([CYGPATH_W])
 
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+AC_PATH_PROG(LINUXDOC, linuxdoc)
+AC_PATH_PROG(PS2PDF, ps2pdf)
 
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+AC_MSG_CHECKING([Whether to build documentation])
 
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES(CC)],
-                 [define([AC_PROG_CC],
-                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES(CXX)],
-                 [define([AC_PROG_CXX],
-                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES(OBJC)],
-                 [define([AC_PROG_OBJC],
-                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
+if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+   BUILDDOC=yes
+else
+   BUILDDOC=no
+fi
+
+AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
+
+AC_MSG_RESULT([$BUILDDOC])
+
+AC_MSG_CHECKING([Whether to build pdf documentation])
+
+if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+   BUILDPDFDOC=yes
+else
+   BUILDPDFDOC=no
+fi
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_LINUXDOC
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_CHECK_DOCBOOK
+# -------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for the ability to build output formats from SGML DocBook source.
+# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
+# indicates whether the necessary tools and files are found and, if set,
+# $(MAKE_XXX) blah.sgml will produce blah.xxx.
+AC_DEFUN([XORG_CHECK_DOCBOOK],[
+if test x$XORG_SGML_PATH = x ; then
+    XORG_SGML_PATH=$prefix/share/sgml
+fi
+HAVE_DEFS_ENT=
+BUILDTXTDOC=no
+BUILDPDFDOC=no
+BUILDPSDOC=no
+BUILDHTMLDOC=no
 
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
+AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
+
+AC_PATH_PROG(DOCBOOKPS, docbook2ps)
+AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
+AC_PATH_PROG(DOCBOOKHTML, docbook2html)
+AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
+
+AC_MSG_CHECKING([Whether to build text documentation])
+if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+   test x$BUILD_TXTDOC != xno; then
+       BUILDTXTDOC=yes
 fi
-AC_SUBST(install_sh)])
+AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
+AC_MSG_RESULT([$BUILDTXTDOC])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_MSG_CHECKING([Whether to build PDF documentation])
+if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+   test x$BUILD_PDFDOC != xno; then
+       BUILDPDFDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+AC_MSG_RESULT([$BUILDPDFDOC])
 
-# serial 2
+AC_MSG_CHECKING([Whether to build PostScript documentation])
+if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+   test x$BUILD_PSDOC != xno; then
+       BUILDPSDOC=yes
+fi
+AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
+AC_MSG_RESULT([$BUILDPSDOC])
 
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
+AC_MSG_CHECKING([Whether to build HTML documentation])
+if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+   test x$BUILD_HTMLDOC != xno; then
+       BUILDHTMLDOC=yes
 fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
+AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
+AC_MSG_RESULT([$BUILDHTMLDOC])
 
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
+MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
+MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
+MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
+]) # XORG_CHECK_DOCBOOK
 
-# serial 5
+# XORG_WITH_XMLTO
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO:  used in makefiles to conditionally generate documentation
+# XMLTO:       returns the path of the xmlto program found
+#              returns the path set by the user in the environment
+# --with-xmlto:        'yes' user instructs the module to use xmlto
+#              'no' user instructs the module not to use xmlto
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+       AS_HELP_STRING([--with-xmlto],
+          [Use xmlto to regenerate documentation (default: yes, if installed)]),
+          [use_xmlto=$withval], [use_xmlto=auto])
 
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
+if test "x$use_xmlto" = x"auto"; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+       have_xmlto=no
+   else
+        have_xmlto=yes
+   fi
+elif test "x$use_xmlto" = x"yes" ; then
+   AC_PATH_PROG([XMLTO], [xmlto])
+   if test "x$XMLTO" = "x"; then
+        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+   fi
+   have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+   if test "x$XMLTO" != "x"; then
+      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+   fi
+   have_xmlto=no
+else
+   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_CHECK_XMLTO
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+# XORG_WITH_ASCIIDOC
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC:     returns the path of the asciidoc program found
+#               returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+#                'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+AC_ARG_WITH(asciidoc,
+       AS_HELP_STRING([--with-asciidoc],
+          [Use asciidoc to regenerate documentation (default: yes, if installed)]),
+          [use_asciidoc=$withval], [use_asciidoc=auto])
 
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+if test "x$use_asciidoc" = x"auto"; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+       have_asciidoc=no
+   else
+        have_asciidoc=yes
+   fi
+elif test "x$use_asciidoc" = x"yes" ; then
+   AC_PATH_PROG([ASCIIDOC], [asciidoc])
+   if test "x$ASCIIDOC" = "x"; then
+        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+   fi
+   have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+   if test "x$ASCIIDOC" != "x"; then
+      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+   fi
+   have_asciidoc=no
+else
+   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_CHECK_ASCIIDOC
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# XORG_WITH_DOXYGEN
+# ----------------
+# Minimum version: 1.5.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN:      returns the path of the doxygen program found
+#               returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+#                'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+AC_ARG_WITH(doxygen,
+       AS_HELP_STRING([--with-doxygen],
+          [Use doxygen to regenerate documentation (default: yes, if installed)]),
+          [use_doxygen=$withval], [use_doxygen=auto])
 
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
+if test "x$use_doxygen" = x"auto"; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+       have_doxygen=no
+   else
+        have_doxygen=yes
+   fi
+elif test "x$use_doxygen" = x"yes" ; then
+   AC_PATH_PROG([DOXYGEN], [doxygen])
+   if test "x$DOXYGEN" = "x"; then
+        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+   fi
+   have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+   if test "x$DOXYGEN" != "x"; then
+      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+   fi
+   have_doxygen=no
+else
+   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
 fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_CHECK_DOXYGEN
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_CHECK_MALLOC_ZERO
+# ----------------------
+# Minimum version: 1.0.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
+# malloc(0) returns NULL.  Packages should add one of these cflags to
+# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
+AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
+AC_ARG_ENABLE(malloc0returnsnull,
+       AS_HELP_STRING([--enable-malloc0returnsnull],
+                      [malloc(0) returns NULL (default: auto)]),
+       [MALLOC_ZERO_RETURNS_NULL=$enableval],
+       [MALLOC_ZERO_RETURNS_NULL=auto])
 
-# serial 6
+AC_MSG_CHECKING([whether malloc(0) returns NULL])
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
+       AC_RUN_IFELSE([
+char *malloc();
+char *realloc();
+char *calloc();
+main() {
+    char *m0, *r0, *c0, *p;
+    m0 = malloc(0);
+    p = malloc(10);
+    r0 = realloc(p,0);
+    c0 = calloc(0);
+    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
+}],
+               [MALLOC_ZERO_RETURNS_NULL=yes],
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
+fi
+AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
+if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
+       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
+       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
+       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
+else
+       MALLOC_ZERO_CFLAGS=""
+       XMALLOC_ZERO_CFLAGS=""
+       XTMALLOC_ZERO_CFLAGS=""
 fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
-          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+AC_SUBST([MALLOC_ZERO_CFLAGS])
+AC_SUBST([XMALLOC_ZERO_CFLAGS])
+AC_SUBST([XTMALLOC_ZERO_CFLAGS])
+]) # XORG_CHECK_MALLOC_ZERO
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# XORG_WITH_LINT()
+# ----------------
+# Minimum version: 1.1.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
+# Sets up flags for source checkers such as lint and sparse if --with-lint
+# is specified.   (Use --with-lint=sparse for sparse.)
+# Sets $LINT to name of source checker passed with --with-lint (default: lint)
+# Sets $LINT_FLAGS to flags to pass to source checker
+# Sets LINT automake conditional if enabled (default: disabled)
+#
+AC_DEFUN([XORG_WITH_LINT],[
 
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+# Allow checking code with lint, sparse, etc.
+AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
+               [Use a lint-style source code checker (default: disabled)])],
+               [use_lint=$withval], [use_lint=no])
+if test "x$use_lint" = "xyes" ; then
+       LINT="lint"
 else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+       LINT="$use_lint"
+fi
+if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
+    case $LINT in
+       lint|*/lint)
+           case $host_os in
+               solaris*)
+                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+                       ;;
+           esac
+           ;;
+    esac
 fi
-])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+AC_SUBST(LINT)
+AC_SUBST(LINT_FLAGS)
+AM_CONDITIONAL(LINT, [test x$LINT != xno])
+
+]) # XORG_WITH_LINT
+
+# XORG_LINT_LIBRARY(LIBNAME)
+# --------------------------
+# Minimum version: 1.1.0
+#
+# Sets up flags for building lint libraries for checking programs that call
+# functions in the library.
+# Disabled by default, enable with --enable-lint-library
+# Sets: 
+#      @LINTLIB@               - name of lint library file to make
+#      MAKE_LINT_LIB           - automake conditional
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
+AC_DEFUN([XORG_LINT_LIBRARY],[
+AC_REQUIRE([XORG_WITH_LINT])
+# Build lint "library" for more indepth checks of programs calling this library
+AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
+       [Create lint library (default: disabled)])],
+       [make_lint_lib=$enableval], [make_lint_lib=no])
+if test "x$make_lint_lib" != "xno" ; then
+       if test "x$LINT" = "xno" ; then
+               AC_MSG_ERROR([Cannot make lint library without --with-lint])
+       fi
+       if test "x$make_lint_lib" = "xyes" ; then
+               LINTLIB=llib-l$1.ln
+       else
+               LINTLIB=$make_lint_lib
+       fi
+fi
+AC_SUBST(LINTLIB)
+AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
-# Helper functions for option handling.                     -*- Autoconf -*-
+]) # XORG_LINT_LIBRARY
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC])
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+AC_SUBST(CWARNFLAGS)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+]) # XORG_CWARNFLAGS
 
-# _AM_MANGLE_OPTION(NAME)
+# XORG_STRICT_OPTION
 # -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# Minimum version: 1.3.0
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Add configure option to enable strict compilation
+AC_DEFUN([XORG_STRICT_OPTION], [
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_CWARNFLAGS])
 
-# serial 5
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$STRICT_COMPILE" = "xyes"; then
+       AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+       AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([CWARNFLAGS])
+]) # XORG_STRICT_OPTION
 
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
+# XORG_DEFAULT_OPTIONS
+# --------------------
+# Minimum version: 1.3.0
+#
+# Defines default options for X.Org modules.
+#
+AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+XORG_CWARNFLAGS
+XORG_STRICT_OPTION
+XORG_RELEASE_VERSION
+XORG_CHANGELOG
+XORG_INSTALL
+XORG_MANPAGE_SECTIONS
+]) # XORG_DEFAULT_OPTIONS
 
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
+dnl Copyright 2005 Red Hat, Inc
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation.
+dnl
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+dnl OTHER DEALINGS IN THE SOFTWARE.
+dnl
+dnl Except as contained in this notice, the name of the copyright holders shall
+dnl not be used in advertising or otherwise to promote the sale, use or
+dnl other dealings in this Software without prior written authorization
+dnl from the copyright holders.
+dnl
 
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
+# XORG_RELEASE_VERSION
+# --------------------
+# Adds --with/without-release-string and changes the PACKAGE and
+# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
+# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+AC_DEFUN([XORG_RELEASE_VERSION],[
+       AC_ARG_WITH(release-version,
+                       AS_HELP_STRING([--with-release-version=STRING],
+                               [Use release version string in package name]),
+                       [RELEASE_VERSION="$withval"],
+                       [RELEASE_VERSION=""])
+       if test "x$RELEASE_VERSION" != "x"; then
+               PACKAGE="$PACKAGE-$RELEASE_VERSION"
+               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+               [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+               [Major version of this package])
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+               [$PVM],
+               [Minor version of this package])
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+       AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+               [$PVP],
+               [Patch version of this package])
+])
 
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
+# XORG_CHANGELOG()
+# ----------------
+# Minimum version: 1.2.0
+#
+# Defines the variable CHANGELOG_CMD as the command to generate
+# ChangeLog from git.
+#
+#
+AC_DEFUN([XORG_CHANGELOG], [
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+AC_SUBST([CHANGELOG_CMD])
+]) # XORG_CHANGELOG
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
 
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+               
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
 
-# serial 2
 
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
 
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
 
-# Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
 #
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 #
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+               [AC_MSG_RESULT([no])
+                $4])
+elif test $pkg_failed = untried; then
+       ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+               [$4])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
 
diff --git a/xmessage/app-defaults/Xmessage b/xmessage/app-defaults/Xmessage
new file mode 100644 (file)
index 0000000..1028ed2
--- /dev/null
@@ -0,0 +1,6 @@
+! $XConsortium: Xmessage.ad,v 1.3 94/07/26 20:23:17 gildea Exp $
+*baseTranslations:             #override :<Key>Return: default-exit()
+*message.scrollVertical:       Always
+*message.scrollHorizontal:     Never
+*Command.shapeStyle:           oval
+*Command.highlightThickness:   1
diff --git a/xmessage/app-defaults/Xmessage-color b/xmessage/app-defaults/Xmessage-color
new file mode 100644 (file)
index 0000000..8d5f433
--- /dev/null
@@ -0,0 +1,44 @@
+! $XFree86$
+
+#include "Xmessage"
+
+*background:                   gray85
+*foreground:                   gray15
+
+*Scrollbar.thumb:              vlines2
+*Scrollbar.width:              14
+*Scrollbar.foreground:         rgb:a/5/5
+*Scrollbar.borderWidth:                0
+*Scrollbar.displayList:\
+foreground     gray90;\
+lines          1,-1,-1,-1,-1,1;\
+foreground     gray60;\
+lines          -1,0,0,0,0,-1
+
+*Text.?.cursorColor:           rgb:d/5/5
+*Text.borderColor:             gray80
+*Text*background:              gray96
+*Text*Scrollbar.background:    gray80
+*Text.displayList:\
+foreground     gray90;\
+lines          1,-1,-1,-1,-1,1;\
+foreground     gray60;\
+lines          -1,0,0,0,0,-1
+
+*Command.highlightThickness:   2
+*Command.internalWidth:                5
+*Command.internalHeight:       3
+*Command.borderColor:          gray40
+*Command.shapeStyle:           Rectangle
+*Command.background:           gray80
+*Command.displayList:\
+foreground     gray60;\
+lines          1,-1,-1,-1,-1,1;\
+foreground     gray90;\
+lines          -1,0,0,0,0,-1
+
+*Form.displayList:\
+foreground     gray60;\
+lines          1,-1,-1,-1,-1,1;\
+foreground     gray90;\
+lines          -1,0,0,0,0,-1
similarity index 100%
rename from xcalc/config.guess
rename to xmessage/config.guess
similarity index 93%
rename from xgc/config.h.in
rename to xmessage/config.h.in
index c74df8b..7c9cfb1 100644 (file)
@@ -42,6 +42,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
 
@@ -59,7 +62,3 @@
 
 /* Version number of package */
 #undef VERSION
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
-   `char[]'. */
-#undef YYTEXT_POINTER
similarity index 100%
rename from xcalc/config.sub
rename to xmessage/config.sub
similarity index 92%
rename from xcalc/configure
rename to xmessage/configure
index e46f125..be61195 100755 (executable)
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for xcalc 1.0.3.
+# Generated by GNU Autoconf 2.65 for xmessage 1.0.3.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -320,7 +320,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -360,19 +360,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
+# as_fn_error 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.
+# 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
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
   fi
-  $as_echo "$as_me: error: $2" >&2
+  $as_echo "$as_me: error: $1" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -534,7 +534,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -551,10 +551,10 @@ MFLAGS=
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME='xcalc'
-PACKAGE_TARNAME='xcalc'
+PACKAGE_NAME='xmessage'
+PACKAGE_TARNAME='xmessage'
 PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='xcalc 1.0.3'
+PACKAGE_STRING='xmessage 1.0.3'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 PACKAGE_URL=''
 
@@ -601,12 +601,8 @@ LIBOBJS
 appdefaultdir
 APPDEFS_LIBS
 APPDEFS_CFLAGS
-XCALC_LIBS
-XCALC_CFLAGS
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-MAN_SUBSTS
-XORG_MAN_PAGE
+XMESSAGE_LIBS
+XMESSAGE_CFLAGS
 ADMIN_MAN_DIR
 DRIVER_MAN_DIR
 MISC_MAN_DIR
@@ -619,7 +615,6 @@ MISC_MAN_SUFFIX
 FILE_MAN_SUFFIX
 LIB_MAN_SUFFIX
 APP_MAN_SUFFIX
-SED
 host_os
 host_vendor
 host_cpu
@@ -629,10 +624,10 @@ build_vendor
 build_cpu
 build
 INSTALL_CMD
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
 PKG_CONFIG
 CHANGELOG_CMD
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
 CWARNFLAGS
 EGREP
 GREP
@@ -722,8 +717,9 @@ ac_user_opts='
 enable_option_checking
 enable_maintainer_mode
 enable_dependency_tracking
-enable_strict_compilation
 enable_silent_rules
+enable_strict_compilation
+with_release_version
 with_appdefaultdir
 '
       ac_precious_vars='build_alias
@@ -736,10 +732,8 @@ LIBS
 CPPFLAGS
 CPP
 PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-XCALC_CFLAGS
-XCALC_LIBS
+XMESSAGE_CFLAGS
+XMESSAGE_LIBS
 APPDEFS_CFLAGS
 APPDEFS_LIBS'
 
@@ -804,9 +798,8 @@ do
   fi
 
   case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
+  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)   ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -851,7 +844,7 @@ do
     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'`
     case $ac_user_opts in
@@ -877,7 +870,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1081,7 +1074,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1097,7 +1090,7 @@ do
     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'`
     case $ac_user_opts in
@@ -1127,8 +1120,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+  -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
     ;;
 
   *=*)
@@ -1136,7 +1129,7 @@ Try \`$0 --help' for more information"
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1154,13 +1147,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
+  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" ;;
+    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1183,7 +1176,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+  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'
@@ -1197,8 +1190,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $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
+    $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
@@ -1213,9 +1206,9 @@ 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 .` ||
-  as_fn_error $? "working directory cannot be determined"
+  as_fn_error "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
+  as_fn_error "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1254,11 +1247,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+  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" || as_fn_error $? "$ac_msg"
+       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
@@ -1284,7 +1277,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xcalc 1.0.3 to adapt to many kinds of systems.
+\`configure' configures xmessage 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1298,7 +1291,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
@@ -1332,7 +1325,7 @@ Fine tuning of the installation directories:
   --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/xcalc]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/xmessage]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1354,7 +1347,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xcalc 1.0.3:";;
+     short | recursive ) echo "Configuration of xmessage 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1366,15 +1359,17 @@ Optional Features:
                          (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
   --enable-strict-compilation
                           Enable all warnings from compiler and make them
                           errors (default: disabled)
-  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-release-version=STRING
+                          Use release version string in package name
   --with-appdefaultdir=<pathname>
                           specify directory for app-defaults files (default is
                           autodetected)
@@ -1389,13 +1384,10 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  XCALC_CFLAGS
-              C compiler flags for XCALC, overriding pkg-config
-  XCALC_LIBS  linker flags for XCALC, overriding pkg-config
+  XMESSAGE_CFLAGS
+              C compiler flags for XMESSAGE, overriding pkg-config
+  XMESSAGE_LIBS
+              linker flags for XMESSAGE, overriding pkg-config
   APPDEFS_CFLAGS
               C compiler flags for APPDEFS, overriding pkg-config
   APPDEFS_LIBS
@@ -1467,10 +1459,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xcalc configure 1.0.3
-generated by GNU Autoconf 2.67
+xmessage configure 1.0.3
+generated by GNU Autoconf 2.65
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1519,18 +1511,15 @@ fi
 
 } # ac_fn_c_try_compile
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR
+# ------------------------------------
+# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
 ac_fn_c_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  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 "test \"\${$3+set}\"" = set; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
+$as_echo_n "checking whether $2 is declared... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1539,12 +1528,8 @@ $4
 int
 main ()
 {
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
+#ifndef $2
+  (void) $2;
 #endif
 
   ;
@@ -1586,7 +1571,7 @@ $as_echo "$ac_try_echo"; } >&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 $ac_status = 0; } >/dev/null && {
         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
        }; then :
@@ -1653,7 +1638,7 @@ 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 "test \"\${$3+set}\"" = set; then :
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1678,8 +1663,8 @@ 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 xcalc $as_me 1.0.3, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by xmessage $as_me 1.0.3, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
 
@@ -1789,9 +1774,11 @@ trap 'exit_status=$?
   {
     echo
 
-    $as_echo "## ---------------- ##
+    cat <<\_ASBOX
+## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##"
+## ---------------- ##
+_ASBOX
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1825,9 +1812,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    $as_echo "## ----------------- ##
+    cat <<\_ASBOX
+## ----------------- ##
 ## Output variables. ##
-## ----------------- ##"
+## ----------------- ##
+_ASBOX
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1840,9 +1829,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     echo
 
     if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
+      cat <<\_ASBOX
+## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##"
+## ------------------- ##
+_ASBOX
       echo
       for ac_var in $ac_subst_files
       do
@@ -1856,9 +1847,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
     fi
 
     if test -s confdefs.h; then
-      $as_echo "## ----------- ##
+      cat <<\_ASBOX
+## ----------- ##
 ## confdefs.h. ##
-## ----------- ##"
+## ----------- ##
+_ASBOX
       echo
       cat confdefs.h
       echo
@@ -1913,12 +1906,7 @@ _ACEOF
 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_file1=$CONFIG_SITE
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1933,11 +1921,7 @@ do
     { $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" \
-      || { { $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 ; }
+    . "$ac_site_file"
   fi
 done
 
@@ -2013,7 +1997,7 @@ if $ac_cache_corrupted; then
 $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
+  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -2030,22 +2014,16 @@ am__api_version='1.11'
 
 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
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
 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
+  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,
@@ -2161,11 +2139,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2187,7 +2165,7 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" "$LINENO" 5
    fi
 
@@ -2197,7 +2175,7 @@ then
    # Ok.
    :
 else
-   as_fn_error $? "newly created file is older than distributed files!
+   as_fn_error "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2435,7 +2413,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2443,7 +2421,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2477,7 +2455,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2492,7 +2470,7 @@ fi
 
 
 # Define the identity of the package.
- PACKAGE='xcalc'
+ PACKAGE='xmessage'
  VERSION='1.0.3'
 
 
@@ -2931,8 +2909,8 @@ 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;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3046,8 +3024,9 @@ 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;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+{ as_fn_set_status 77
+as_fn_error "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; }
@@ -3089,8 +3068,8 @@ done
 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 compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3147,9 +3126,9 @@ $as_echo "$ac_try_echo"; } >&5
     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.
+as_fn_error "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details." "$LINENO" 5; }
     fi
   fi
 fi
@@ -3200,8 +3179,8 @@ 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;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -3548,183 +3527,6 @@ else
 fi
 
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __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
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  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 void
-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;
-  float fnumber;
-
-  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);
-}
-
-int
-main ()
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  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[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
-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
-  test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" 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_c99"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
-
-fi
-
-
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3768,7 +3570,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -3784,11 +3586,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -3827,7 +3629,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -3843,18 +3645,18 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
+rm -f 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 ; }
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3915,7 +3717,7 @@ esac
   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
+    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
@@ -3981,7 +3783,7 @@ esac
   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
+    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
@@ -4113,7 +3915,8 @@ 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 :
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -4123,8 +3926,181 @@ fi
 done
 
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
 
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
 
 
 
@@ -4241,10 +4217,11 @@ $as_echo "yes" >&6; }
 $as_echo "no" >&6; }
                PKG_CONFIG=""
        fi
+
 fi
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
@@ -4255,16 +4232,16 @@ else
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -4289,7 +4266,7 @@ else
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
@@ -4297,7 +4274,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -4313,83 +4290,13 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     { ac_script=; unset ac_script;}
-     if test -z "$SED"; then
-  ac_path_SED_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
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_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_SED_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
-
-
 
 
 
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
+-Wbad-function-cast"
     case `$CC -dumpversion` in
     3.4.* | 4.*)
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -4408,9 +4315,21 @@ fi
     fi
 fi
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
 
 
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 
 
 
@@ -4449,6 +4368,20 @@ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
 
 
+# Check whether --with-release-version was given.
+if test "${with_release_version+set}" = set; then :
+  withval=$with_release_version; RELEASE_VERSION="$withval"
+else
+  RELEASE_VERSION=""
+fi
+
+       if test "x$RELEASE_VERSION" != "x"; then
+               PACKAGE="$PACKAGE-$RELEASE_VERSION"
+               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: Building with package name set to $PACKAGE" >&5
+$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+       fi
+
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
 _ACEOF
@@ -4491,7 +4424,6 @@ echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possi
 
 
 
-
 if test x$APP_MAN_SUFFIX = x    ; then
     APP_MAN_SUFFIX=1
 fi
@@ -4560,36 +4492,6 @@ fi
 
 
 
-XORG_MAN_PAGE="X Version 11"
-
-MAN_SUBSTS="\
-       -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|\$(prefix)|g' \
-       -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-       -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-       -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
-
-
-
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=0;;
-esac
-AM_BACKSLASH='\'
-
 
 
 ac_config_headers="$ac_config_headers config.h"
@@ -4895,8 +4797,8 @@ 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;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+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
@@ -5265,37 +5167,38 @@ fi
 
 
 
+# Checks for pkg-config packages
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCALC" >&5
-$as_echo_n "checking for XCALC... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMESSAGE" >&5
+$as_echo_n "checking for XMESSAGE... " >&6; }
 
-if test -n "$XCALC_CFLAGS"; then
-    pkg_cv_XCALC_CFLAGS="$XCALC_CFLAGS"
+if test -n "$XMESSAGE_CFLAGS"; then
+    pkg_cv_XMESSAGE_CFLAGS="$XMESSAGE_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7 x11") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XCALC_CFLAGS=`$PKG_CONFIG --cflags "xaw7 x11" 2>/dev/null`
+  pkg_cv_XMESSAGE_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
 else
   pkg_failed=yes
 fi
  else
     pkg_failed=untried
 fi
-if test -n "$XCALC_LIBS"; then
-    pkg_cv_XCALC_LIBS="$XCALC_LIBS"
+if test -n "$XMESSAGE_LIBS"; then
+    pkg_cv_XMESSAGE_LIBS="$XMESSAGE_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 x11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7 x11") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_XCALC_LIBS=`$PKG_CONFIG --libs "xaw7 x11" 2>/dev/null`
+  pkg_cv_XMESSAGE_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -5306,8 +5209,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5315,48 +5216,44 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               XCALC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 x11" 2>&1`
+               XMESSAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7" 2>&1`
         else
-               XCALC_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 x11" 2>&1`
+               XMESSAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$XCALC_PKG_ERRORS" >&5
+       echo "$XMESSAGE_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (xaw7 x11) were not met:
+       as_fn_error "Package requirements (xaw7) were not met:
 
-$XCALC_PKG_ERRORS
+$XMESSAGE_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XCALC_CFLAGS
-and XCALC_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+Alternatively, you may set the environment variables XMESSAGE_CFLAGS
+and XMESSAGE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XCALC_CFLAGS
-and XCALC_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XMESSAGE_CFLAGS
+and XMESSAGE_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details." "$LINENO" 5; }
 else
-       XCALC_CFLAGS=$pkg_cv_XCALC_CFLAGS
-       XCALC_LIBS=$pkg_cv_XCALC_LIBS
+       XMESSAGE_CFLAGS=$pkg_cv_XMESSAGE_CFLAGS
+       XMESSAGE_LIBS=$pkg_cv_XMESSAGE_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
-XCALC_CFLAGS="$CWARNFLAGS $XCALC_CFLAGS"
-
-
 
 
 pkg_failed=no
@@ -5399,8 +5296,6 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -5415,7 +5310,7 @@ fi
        # Put the nasty error message in config.log where it belongs
        echo "$APPDEFS_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (xt) were not met:
+       as_fn_error "Package requirements (xt) were not met:
 
 $APPDEFS_PKG_ERRORS
 
@@ -5424,13 +5319,12 @@ installed software in a non-standard prefix.
 
 Alternatively, you may set the environment variables APPDEFS_CFLAGS
 and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+See the pkg-config man page for more details.
+" "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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 $? "The pkg-config script could not be found or is too old.  Make sure it
+as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
@@ -5439,15 +5333,15 @@ and APPDEFS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details." "$LINENO" 5; }
 else
        APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
        APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
+       :
 fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 
 # Check whether --with-appdefaultdir was given.
 if test "${with_appdefaultdir+set}" = set; then :
@@ -5544,7 +5438,6 @@ 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$//'
@@ -5568,19 +5461,19 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error $? "conditional \"AMDEP\" was never defined.
+  as_fn_error "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
@@ -5730,19 +5623,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
+# as_fn_error 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.
+# 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
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
   fi
-  $as_echo "$as_me: error: $2" >&2
+  $as_echo "$as_me: error: $1" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -5938,7 +5831,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -5991,8 +5884,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xcalc $as_me 1.0.3, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by xmessage $as_me 1.0.3, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6057,11 +5950,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xcalc config.status 1.0.3
-configured by $0, generated by GNU Autoconf 2.67,
+xmessage config.status 1.0.3
+configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -6079,16 +5972,11 @@ 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
@@ -6110,7 +5998,6 @@ do
     $ac_shift
     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;;
@@ -6123,7 +6010,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error $? "ambiguous option: \`$1'
+    as_fn_error "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -6132,7 +6019,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
+  -*) as_fn_error "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -6190,7 +6077,7 @@ do
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -6228,7 +6115,7 @@ $debug ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6245,7 +6132,7 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
+  ac_cs_awk_cr='\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
@@ -6259,18 +6146,18 @@ _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 '^'`
+  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
   . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
 
   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
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -6359,28 +6246,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
 else
   cat
 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ 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[        ]*=[    ]*/{
-h
-s///
-s/^/:/
-s/[     ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
+  ac_vpsub='/^[         ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[    ]*\):*/\1/
 s/:*$//
-x
-s/\(=[  ]*\).*/\1/
-G
-s/\n//
 s/^[^=]*=[      ]*$//
 }'
 fi
@@ -6408,7 +6287,7 @@ for ac_last_try in false false :; do
   if test -z "$ac_t"; then
     break
   elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -6493,7 +6372,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -6506,7 +6385,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -6534,7 +6413,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -6561,7 +6440,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -6698,22 +6577,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+  || 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"; } &&
   { $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
+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;}
+which seems to be undefined.  Please make sure it is defined." >&2;}
 
   rm -f "$tmp/stdin"
   case $ac_file in
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -6724,19 +6603,19 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
       $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+      || as_fn_error "could not create $ac_file" "$LINENO" 5
     if diff "$ac_file" "$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" \
-       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+       || as_fn_error "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error $? "could not create -" "$LINENO" 5
+      || as_fn_error "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -6886,7 +6765,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -6907,7 +6786,7 @@ 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 || as_fn_exit 1
+  $ac_cs_success || as_fn_exit $?
 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
similarity index 83%
rename from xcalc/configure.ac
rename to xmessage/configure.ac
index 3009c2d..e898cef 100644 (file)
@@ -22,15 +22,15 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
-AC_INIT(xcalc, [1.0.3],
-       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xcalc)
+AC_INIT(xmessage, [1.0.3],
+       [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xmessage)
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
 # Require xorg-macros: XORG_DEFAULT_OPTIONS
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+          [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.4)
 XORG_DEFAULT_OPTIONS
 
 AM_CONFIG_HEADER(config.h)
@@ -39,13 +39,11 @@ AC_PROG_CC
 AC_PROG_INSTALL
 
 
-PKG_CHECK_MODULES(XCALC, xaw7 x11)
-XCALC_CFLAGS="$CWARNFLAGS $XCALC_CFLAGS"
-AC_SUBST(XCALC_CFLAGS)
-AC_SUBST(XCALC_LIBS)
+# Checks for pkg-config packages
+PKG_CHECK_MODULES(XMESSAGE, xaw7)
 
 PKG_CHECK_MODULES(APPDEFS, xt)
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
 AC_ARG_WITH(appdefaultdir,
        AC_HELP_STRING([--with-appdefaultdir=<pathname>],
          [specify directory for app-defaults files (default is autodetected)]),
similarity index 100%
rename from xcalc/depcomp
rename to xmessage/depcomp
similarity index 100%
rename from xcalc/install-sh
rename to xmessage/install-sh
diff --git a/xmessage/makeform.c b/xmessage/makeform.c
new file mode 100644 (file)
index 0000000..0899771
--- /dev/null
@@ -0,0 +1,341 @@
+/* $XConsortium: makeform.c,v 1.6 95/01/04 16:28:51 gildea Exp $ */
+/*
+
+Copyright (c) 1988, 1991  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+*/
+/* $XFree86: xc/programs/xmessage/makeform.c,v 1.6 2002/11/22 03:56:39 paulo Exp $ */
+
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <X11/Shell.h>
+#include <X11/Xaw/Form.h>
+#include <X11/Xaw/AsciiText.h>
+#include <X11/Xaw/Command.h>
+#include <X11/Xaw/Label.h>
+#include <X11/Xaw/Scrollbar.h>
+
+#include "xmessage.h"
+
+typedef struct _ButtonRecord {
+    char *name;
+    int exitstatus;
+    Boolean print_value;
+    Widget widget;
+} ButtonRecord;
+
+static void 
+unquote_pairs (ButtonRecord *br, int n)
+{
+    int i;
+
+    for (i = 0; i < n; i++, br++) {
+       char *dst, *src;
+       int quoted = 0;
+
+       for (src = dst = br->name; *src; src++) {
+           if (quoted) {
+               *dst++ = *src;
+               quoted = 0;
+           } else if (src[0] == '\\') {
+               quoted = 1;
+           } else {
+               *dst++ = *src;
+           }
+       }
+       *dst = '\0';
+    }
+    return;
+}
+
+/*
+ * parses string of form "yes:11,no:12, ..."
+ * sets brptr to point to parsed table
+ * returns 0 if successful, -1 if not
+ */
+static int 
+parse_name_and_exit_code_list (char *buttonlist, ButtonRecord **brptr)
+{
+    char *cp;
+    int shouldfind = 0, npairs = 0;
+    int default_exitcode = 100;
+    int quoted = 0;
+    ButtonRecord *br;
+    int len;
+    char *copy;
+
+    *brptr = NULL;
+    if (!buttonlist) return 0;
+
+    /*
+     * Figure out how many matches we will find so that we can preallocate
+     * space for button structures.  If you add stripping of white space,
+     * make sure that you update this as well as the walking algorithm below.
+     */
+    if (buttonlist[0]) shouldfind++;
+    for (cp = buttonlist; *cp; cp++) {
+       if (quoted == 1) quoted = 0;
+       else if (*cp == '\\') quoted = 1;
+       else if (*cp == ',') shouldfind++;
+    }
+    len = (cp - buttonlist);
+
+    /*
+     * allocate space for button record
+     */
+    br = (ButtonRecord *) malloc (sizeof(ButtonRecord) * shouldfind);
+    if (!br) return -1;
+
+    cp = malloc (len + 1);
+    if (!cp) {
+       (void) free ((char *) br);
+       return -1;
+    }
+    copy = cp;
+    strcpy (copy, buttonlist);
+
+
+    /*
+     * walk down list separating into name:exitcode pairs
+     */
+    while (*cp) {
+       char *start, *colon, *comma;
+       int exitcode;
+
+       start = cp;
+       colon = comma = NULL;
+       exitcode = ++default_exitcode;
+       quoted = 0;
+
+       /* find the next name and exit code */
+       for (; *cp; cp++) {
+           if (quoted) quoted = 0;
+           else if (*cp == '\\') quoted = 1;
+           else if (*cp == ':') colon = cp;
+           else if (*cp == ',') {
+               comma = cp;
+               break;
+           }
+       }
+
+       /*
+        * If comma is NULL then we are at the end of the string.  If colon
+        * is NULL, then there was no exit code given, so default to zero.
+        */
+
+       if (comma) *comma = '\0';
+
+       if (colon) {
+           exitcode = atoi (colon+1);
+           *colon = '\0';
+       }
+
+       /*
+        * make sure that we aren't about to stomp on memory
+        */
+       if (npairs >= shouldfind) {
+           fprintf (stderr,
+                    "%s:  internal error, found extra pairs (should be %d)\n",
+                    ProgramName, shouldfind);
+           (void) free ((char *) br);
+           (void) free (copy);
+           return -1;
+       }
+
+       /*
+        * got it!  start and exitcode contain the right values
+        */
+       br[npairs].name = start;
+       br[npairs].exitstatus = exitcode;
+       npairs++;
+
+       if (comma) cp++;
+    }
+
+
+    if (npairs != shouldfind) {
+       fprintf (stderr, "%s:  internal error found %d instead of %d pairs\n",
+                ProgramName, npairs, shouldfind);
+       (void) free ((char *) br);
+       (void) free (copy);
+       return -1;
+    }
+
+    /*
+     * now, strip any quoted characters
+     */
+    unquote_pairs (br, npairs);
+    *brptr = br;
+    return npairs;
+}
+
+/* ARGSUSED */
+static void 
+handle_button (Widget w, XtPointer closure, XtPointer client_data)
+{
+    ButtonRecord *br = (ButtonRecord *) closure;
+
+    if (br->print_value)
+       puts (br->name);
+    exit (br->exitstatus);
+}
+
+Widget 
+make_queryform(Widget parent,  /* into whom widget should be placed */
+    char *msgstr,              /* message string */
+    int msglen,                        /* characters in msgstr */
+    char *button_list,         /* list of button title:status */
+    Boolean print_value,       /* print button string on stdout? */
+    char *default_button,      /* button activated by Return */
+    Dimension max_width,
+    Dimension max_height)
+{
+    ButtonRecord *br;
+    int npairs, i;
+    Widget form, text, prev;
+    Arg args[10];
+    Cardinal n, thisn;
+    char *shell_geom;
+    int x, y, geom_flags;
+    unsigned int shell_w, shell_h;
+
+    npairs = parse_name_and_exit_code_list (button_list, &br);
+
+    form = XtCreateManagedWidget ("form", formWidgetClass, parent, NULL, 0);
+
+    text = XtVaCreateManagedWidget
+       ("message", asciiTextWidgetClass, form,
+        XtNleft, XtChainLeft,
+        XtNright, XtChainRight,
+        XtNtop, XtChainTop,
+        XtNbottom, XtChainBottom,
+        XtNdisplayCaret, False,
+        XtNlength, msglen,
+        XtNstring, msgstr,
+        NULL);
+    /*
+     * Did the user specify our geometry?
+     * If so, don't bother computing it ourselves, since we will be overridden.
+     */
+    XtVaGetValues(parent, XtNgeometry, &shell_geom, NULL);
+    geom_flags = XParseGeometry(shell_geom, &x, &y, &shell_w, &shell_h);
+    if (!(geom_flags & WidthValue && geom_flags & HeightValue)) {
+       Dimension width, height, height_addons = 0;
+       Dimension scroll_size, border_width;
+       Widget label, scroll;
+       Position left, right, top, bottom;
+       char *tmp;
+       /*
+        * A Text widget is used for the automatic scroll bars.
+        * But Text widget doesn't automatically compute its size.
+        * The Label widget does that nicely, so we create one and examine it.
+        * This widget is never visible.
+        */
+       XtVaGetValues(text, XtNtopMargin, &top, XtNbottomMargin, &bottom,
+                     XtNleftMargin, &left, XtNrightMargin, &right, NULL);
+       label = XtVaCreateWidget("message", labelWidgetClass, form,
+                                XtNlabel, msgstr,
+                                XtNinternalWidth, (left+right+1)/2,
+                                XtNinternalHeight, (top+bottom+1)/2,
+                                NULL);
+       XtVaGetValues(label, XtNwidth, &width, XtNheight, &height, NULL);
+       XtDestroyWidget(label);
+       if (max_width == 0)
+           max_width = .7 * WidthOfScreen(XtScreen(text));
+       if (max_height == 0)
+           max_height = .7 * HeightOfScreen(XtScreen(text));
+       if (width > max_width) {
+           width = max_width;
+           /* add in the height of any horizontal scroll bar */
+           scroll = XtVaCreateWidget("hScrollbar", scrollbarWidgetClass, text,
+                                     XtNorientation, XtorientHorizontal,
+                                     NULL);
+           XtVaGetValues(scroll, XtNheight, &scroll_size,
+                         XtNborderWidth, &border_width, NULL);
+           XtDestroyWidget(scroll);
+           height_addons = scroll_size + border_width;
+       }
+
+       /* This fixes the xmessage assumption that the label widget and the
+        * text widget have the same size. In Xaw 7, the text widget has
+        * one extra pixel between lines.
+        * Xmessage is not internationalized, so the code bellow is harmless.
+        */
+       tmp = msgstr;
+       while (tmp != NULL && *tmp) {
+           ++tmp;
+           ++height;
+           tmp = strchr(tmp, '\n');
+       }
+
+       if (height > max_height) {
+           height = max_height;
+           /* add in the width of any vertical scroll bar */
+           scroll = XtVaCreateWidget("vScrollbar", scrollbarWidgetClass, text,
+                                     XtNorientation, XtorientVertical, NULL);
+           XtVaGetValues(scroll, XtNwidth, &scroll_size,
+                         XtNborderWidth, &border_width, NULL);
+           XtDestroyWidget(scroll);
+           width += scroll_size + border_width;
+       }
+       height += height_addons;
+       XtVaSetValues(text, XtNwidth, width, XtNheight, height, NULL);
+    }
+    /*
+     * Create the buttons
+     */
+    n = 0;
+    XtSetArg (args[n], XtNleft, XtChainLeft); n++;
+    XtSetArg (args[n], XtNright, XtChainLeft); n++;
+    XtSetArg (args[n], XtNtop, XtChainBottom); n++;
+    XtSetArg (args[n], XtNbottom, XtChainBottom); n++;
+    XtSetArg (args[n], XtNfromVert, text); n++;
+    XtSetArg (args[n], XtNvertDistance, 5); n++;
+
+    prev = NULL;
+    for (i = 0; i < npairs; i++) {
+       thisn = n;
+       XtSetArg (args[thisn], XtNfromHoriz, prev); thisn++;
+       prev = XtCreateManagedWidget (br[i].name, commandWidgetClass,
+                                     form, args, thisn);
+       br[i].widget = prev;
+       br[i].print_value = print_value;
+       XtAddCallback (prev, XtNcallback, handle_button, (XtPointer) &br[i]);
+       if (default_button && !strcmp(default_button, br[i].name)) {
+           Dimension border;
+
+           default_exitstatus = br[i].exitstatus;
+           XtVaGetValues(br[i].widget, XtNborderWidth, &border, NULL);
+           border *= 2;
+           XtVaSetValues(br[i].widget, XtNborderWidth, border, NULL);
+       }
+    }
+    return form;
+}
similarity index 100%
rename from xcalc/missing
rename to xmessage/missing
diff --git a/xmessage/readfile.c b/xmessage/readfile.c
new file mode 100644 (file)
index 0000000..9729854
--- /dev/null
@@ -0,0 +1,134 @@
+/* $XConsortium: readfile.c,v 1.5 94/12/11 14:25:48 gildea Exp $ */
+/*
+
+Copyright (c) 1988, 1991  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+*/
+/* $XFree86: xc/programs/xmessage/readfile.c,v 1.2 2000/02/14 19:21:04 dawes Exp $ */
+
+#include <X11/Xos.h>                   /* for types.h */
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "readfile.h"
+
+/*
+ * get_data_from_file - read data from a file into a single buffer; meant 
+ * for small files containing messages.
+ */
+static char *
+get_data_from_file (char *filename, int *len_return)
+{
+    FILE *fp;
+    struct stat statbuf;
+    char *cp;
+    int count;
+
+    if (stat (filename, &statbuf) != 0 || statbuf.st_size < 0) {
+       perror(filename);
+       return NULL;
+    }
+
+    cp = malloc (statbuf.st_size + 1);
+    if (!cp) {
+       fprintf(stderr, "cannot get memory for message file\n");
+       return NULL;
+    }
+
+    fp = fopen (filename, "r");
+    if (!fp) {
+       perror(filename);
+       (void) free (cp);
+       return NULL;
+    }
+
+    count = fread (cp, 1, statbuf.st_size, fp);
+    if (count == 0 && statbuf.st_size != 0) {
+       perror(filename);
+       (void) free (cp);
+       (void) fclose (fp);
+       return NULL;
+    }
+
+    cp[count] = '\0';          /* since we allocated one extra */
+    *len_return = count;
+    (void) fclose (fp);
+    return cp;
+}
+
+/*
+ * get_data_from_stdin - read data from stdin into a single buffer.
+ */
+static char *
+get_data_from_stdin (int *len_return)
+{
+    char *cp;
+    int count;
+    int allocated;
+    int n;
+
+    allocated = BUFSIZ;
+    cp = malloc (allocated + 1);
+    if (!cp) {
+       fprintf(stderr, "cannot get memory for message file\n");
+       return NULL;
+    }
+    count = 0;
+
+    while ((n = fread (cp + count, 1, BUFSIZ, stdin)) > 0) {
+       count += n;
+       /* Here count <= allocated. Prepare for next round. */
+       if (count + BUFSIZ > allocated) {
+           allocated = 2 * allocated;
+           cp = realloc (cp, allocated + 1);
+           if (!cp) {
+               fprintf(stderr, "cannot get memory for message file\n");
+               return NULL;
+           }
+       }
+    }
+
+    cp[count] = '\0';          /* since we allocated one extra */
+    *len_return = count;
+    return cp;
+}
+
+
+/*
+ * read_file - read data from indicated file and return pointer to malloced
+ * buffer.  Returns NULL on error or if no such file.
+ */
+char *
+read_file (char *filename, int *len /* returned */)
+{
+    if (filename[0] == '-' && filename[1] == '\0') {
+       return (get_data_from_stdin (len));
+    } else {
+       return (get_data_from_file (filename, len));
+    }
+}
diff --git a/xmessage/readfile.h b/xmessage/readfile.h
new file mode 100644 (file)
index 0000000..d78d439
--- /dev/null
@@ -0,0 +1,34 @@
+/* $XFree86: xc/programs/xmessage/readfile.h,v 1.1 2003/04/14 23:03:13 herrb Exp $ */
+/*
+ * Copyright (C) 2003 The XFree86 Project, Inc.  All Rights Reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ * Except as contained in this notice, the name of the XFree86 Project
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written
+ * authorization from the XFree86 Project.
+ */
+#ifndef _READFILE_H
+#define _READFILE_H
+
+extern char *read_file (char *, int *);
+
+#endif
diff --git a/xmessage/xmessage.c b/xmessage/xmessage.c
new file mode 100644 (file)
index 0000000..6f31007
--- /dev/null
@@ -0,0 +1,395 @@
+/*
+
+Copyright (c) 1988, 1991, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+*/
+/* $XFree86: xc/programs/xmessage/xmessage.c,v 1.4 2000/02/17 16:53:03 dawes Exp $ */
+
+#include <assert.h>
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#include <X11/Shell.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "xmessage.h"
+#include "readfile.h"
+
+/*
+ * data used by xmessage
+ */
+
+const char *ProgramName;
+
+static struct _QueryResources {
+    char *file;
+    char *button_list;
+    char *default_button;
+    Boolean print_value;
+    Boolean center;
+    Boolean nearmouse;
+    int timeout_secs;
+    Dimension maxHeight;
+    Dimension maxWidth;
+} qres;                                /* initialized by resources below */
+
+#define offset(field) XtOffsetOf(struct _QueryResources, field)
+static XtResource resources[] = {
+    { "file", "File", XtRString, sizeof (char *), 
+      offset(file), XtRString, (XtPointer) NULL },
+    { "buttons", "Buttons", XtRString, sizeof (char *),
+      offset(button_list), XtRString, (XtPointer) "okay:0" },
+    { "defaultButton", "DefaultButton", XtRString, sizeof (char *),
+      offset(default_button), XtRString, (XtPointer) NULL },
+    { "printValue", "PrintValue", XtRBoolean, sizeof (Boolean),
+      offset(print_value), XtRString, "false" },
+    { "center", "Center", XtRBoolean, sizeof (Boolean),
+      offset(center), XtRString, "false" },
+    { "nearMouse", "NearMouse", XtRBoolean, sizeof (Boolean),
+      offset(nearmouse), XtRString, "false" },
+    { "timeout", "Timeout", XtRInt, sizeof (int),
+      offset(timeout_secs), XtRInt, NULL },
+    { "maxHeight", "Maximum", XtRDimension, sizeof (Dimension),
+      offset(maxHeight), XtRDimension, NULL },
+    { "maxWidth", "Maximum", XtRDimension, sizeof (Dimension),
+      offset(maxWidth), XtRDimension, NULL },
+};
+#undef offset
+
+static XrmOptionDescRec optionList[] =  {
+    { "-file",    ".file", XrmoptionSepArg, (XPointer) NULL },
+    { "-buttons", ".buttons", XrmoptionSepArg, (XPointer) NULL },
+    { "-default", ".defaultButton", XrmoptionSepArg, (XPointer) NULL },
+    { "-print",   ".printValue", XrmoptionNoArg, (XPointer) "on" },
+    { "-center",  ".center", XrmoptionNoArg, (XPointer) "on" },
+    { "-nearmouse", ".nearMouse", XrmoptionNoArg, (XPointer) "on" },
+    { "-timeout", ".timeout", XrmoptionSepArg, (XPointer) NULL },
+};
+
+static String fallback_resources[] = {
+    "*baseTranslations: #override :<Key>Return: default-exit()",
+    "*message.Scroll: whenNeeded",
+    NULL};
+
+
+/*
+ * usage
+ */
+
+static void 
+usage (FILE *outf)
+{
+    static const char *options[] = {
+"    -file filename              file to read message from, \"-\" for stdin",
+"    -buttons string             comma-separated list of label:exitcode",
+"    -default button             button to activate if Return is pressed",
+"    -print                      print the button label when selected",
+"    -center                     pop up at center of screen",
+"    -nearmouse                  pop up near the mouse cursor",
+"    -timeout secs               exit with status 0 after \"secs\" seconds",
+"",
+NULL};
+    const char **cpp;
+
+    fprintf (outf, "usage: %s [-options] [message ...]\n\n",
+            ProgramName);
+    fprintf (outf, "where options include:\n");
+    for (cpp = options; *cpp; cpp++)
+       fprintf (outf, "%s\n", *cpp);
+}
+
+/*
+ * Action to implement ICCCM delete_window and other translations.
+ * Takes one argument, the exit status.
+ */
+static Atom wm_delete_window;
+/* ARGSUSED */
+static void
+exit_action(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+    int exit_status = 0;
+
+    if(event->type == ClientMessage
+       && event->xclient.data.l[0] != wm_delete_window)
+       return;
+    
+    if (*num_params == 1)
+       exit_status = atoi(params[0]);
+    exit(exit_status);
+}
+
+int default_exitstatus = -1;           /* value of button named by -default */
+
+/* ARGSUSED */
+static void
+default_exit_action(Widget w, XEvent *event, String *params, 
+    Cardinal *num_params)
+{
+    if (default_exitstatus >= 0)
+       exit(default_exitstatus);
+}
+
+/* Convert tabs to spaces in *messagep,*lengthp, copying to a new block of
+   memory.  */
+static void
+detab (char **messagep, int *lengthp)
+{
+  int   i, n, col, psize;
+  char  *p;
+  
+  /* count how many tabs there are */
+  n = 0;
+  for (i = 0; i < *lengthp; i++)
+    if ((*messagep)[i] == '\t')
+      n++;
+
+  /* length increases by at most seven extra spaces for each tab */
+  psize = *lengthp + n*7 + 1;
+  p = XtMalloc (psize);
+
+  /* convert tabs to spaces, copying into p */
+  n = 0;
+  col = 0;
+  for (i = 0; i < *lengthp; i++)
+    {
+      switch ((*messagep)[i]) {
+      case '\n':
+        p[n++] = '\n';
+        col = 0;
+        break;
+      case '\t':
+        do
+          {
+            p[n++] = ' ';
+            col++;
+          }
+        while ((col % 8) != 0);
+        break;
+      default:
+        p[n++] = (*messagep)[i];
+        col++;
+        break;
+      }
+    }
+
+  assert (n < psize);
+
+  /* null-terminator needed by Label widget */
+  p[n] = '\0';
+
+  free (*messagep);
+
+  *messagep = p;
+  *lengthp = n;
+}
+
+static XtActionsRec actions_list[] = {
+    {"exit", exit_action},
+    {"default-exit", default_exit_action},
+};
+
+static String top_trans =
+    "<ClientMessage>WM_PROTOCOLS: exit(1)\n";
+
+/* assumes shell widget has already been realized */
+
+static void
+position_near(Widget shell, int x, int y)
+{
+    int max_x, max_y;
+    Dimension width, height, border;
+    int gravity;
+
+    /* some of this is copied from CenterWidgetOnPoint in Xaw/TextPop.c */
+
+    XtVaGetValues(shell,
+                 XtNwidth, &width,
+                 XtNheight, &height,
+                 XtNborderWidth, &border,
+                 NULL);
+
+    width += 2 * border;
+    height += 2 * border;
+
+    max_x = WidthOfScreen(XtScreen(shell));
+    max_y = HeightOfScreen(XtScreen(shell));
+
+    /* set gravity hint based on position on screen */
+    gravity = 1;
+    if (x > max_x/3) gravity += 1;
+    if (x > max_x*2/3) gravity += 1;
+    if (y > max_y/3) gravity += 3;
+    if (y > max_y*2/3) gravity += 3;
+
+    max_x -= width;
+    max_y -= height;
+
+    x -= ( (Position) width/2 );
+    if (x < 0) x = 0;
+    if (x > max_x) x = max_x;
+
+    y -= ( (Position) height/2 );
+    if (y < 0) y = 0;
+    if ( y > max_y ) y = max_y;
+
+    XtVaSetValues(shell,
+                 XtNx, (Position)x,
+                 XtNy, (Position)y,
+                 XtNwinGravity, gravity,
+                 NULL);
+}
+
+static void
+position_near_mouse(Widget shell)
+{
+    int x, y;
+    Window root, child;
+    int winx, winy;
+    unsigned int mask;
+
+    XQueryPointer(XtDisplay(shell), XtWindow(shell),
+                 &root, &child, &x, &y, &winx, &winy, &mask);
+    position_near(shell, x, y);
+}
+
+static void
+position_near_center(Widget shell)
+{
+    position_near(shell,
+                 WidthOfScreen(XtScreen(shell))/2,
+                 HeightOfScreen(XtScreen(shell))/2);
+}
+
+/* ARGSUSED */
+static void
+time_out(XtPointer client_data, XtIntervalId *iid)
+{
+    exit(0);
+}
+
+/*
+ * xmessage main program - make sure that there is a message,
+ * then create the query box and go.  Callbacks take care of exiting.
+ */
+int
+main (int argc, char *argv[])
+{
+    Widget top, queryform;
+    XtAppContext app_con;
+    char *message_str;
+    int message_len;
+
+    ProgramName = argv[0];
+
+    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
+
+    top = XtAppInitialize (&app_con, "Xmessage",
+                          optionList, XtNumber(optionList), &argc, argv,
+                          fallback_resources, NULL, 0);
+
+    XtGetApplicationResources (top, (XtPointer) &qres, resources,
+                              XtNumber(resources), NULL, 0);
+
+    if (argc > 1 && !strcmp(argv[1], "-help")) {
+       usage(stdout);
+       exit(0);
+    }
+    if (argc == 1 && qres.file != NULL) {
+       message_str = read_file (qres.file, &message_len);
+       if (message_str == NULL) {
+           fprintf (stderr, "%s: problems reading message file\n",
+                    ProgramName);
+           exit (1);
+       }
+    } else if (argc > 1 && qres.file == NULL) {
+       int i, len;
+       char *cp;
+
+       len = argc - 1;         /* spaces between words and final NULL */
+       for (i=1; i<argc; i++)
+           len += strlen(argv[i]);
+       message_str = malloc(len);
+       if (!message_str) {
+           fprintf (stderr, "%s: cannot get memory for message string\n",
+                    ProgramName);
+           exit (1);
+       }
+       cp = message_str;
+       for (i=1; i<argc; i++) {
+           strcpy(cp, argv[i]);
+           cp += strlen(argv[i]);
+           if (i != argc-1)
+               *cp++ = ' ';
+           else
+               *cp = '\0';
+       }
+       message_len = len;
+    } else {
+       usage(stderr);
+       exit(1);
+    }
+
+    wm_delete_window = XInternAtom(XtDisplay(top), "WM_DELETE_WINDOW", False);
+    XtAppAddActions(app_con, actions_list, XtNumber(actions_list));
+    XtOverrideTranslations(top, XtParseTranslationTable(top_trans));
+
+    detab (&message_str, &message_len);
+
+    /*
+     * create the query form; this is where most of the real work is done
+     */
+    queryform = make_queryform (top, message_str, message_len,
+                               qres.button_list,
+                               qres.print_value, qres.default_button,
+                               qres.maxWidth, qres.maxHeight);
+    if (!queryform) {
+       fprintf (stderr,
+                "%s: unable to create query form with buttons: %s\n",
+                ProgramName, qres.button_list);
+       exit (1);
+    }
+
+    XtSetMappedWhenManaged(top, FALSE);
+    XtRealizeWidget(top);
+
+    /* do WM_DELETE_WINDOW before map */
+    XSetWMProtocols(XtDisplay(top), XtWindow(top), &wm_delete_window, 1);
+
+    if (qres.center)
+       position_near_center(top);
+    else if (qres.nearmouse)
+       position_near_mouse(top);
+
+    XtMapWidget(top);
+
+    if (qres.timeout_secs)
+       XtAppAddTimeOut(app_con, 1000*qres.timeout_secs, time_out, NULL);
+
+    XtAppMainLoop(app_con);
+
+    exit (0);
+}
diff --git a/xmessage/xmessage.h b/xmessage/xmessage.h
new file mode 100644 (file)
index 0000000..c46ce0d
--- /dev/null
@@ -0,0 +1,38 @@
+/* $XFree86: xc/programs/xmessage/xmessage.h,v 1.2 2003/09/13 21:33:11 dawes Exp $ */
+/*
+ * Copyright (C) 2003 The XFree86 Project, Inc.  All Rights Reserved.
+ * 
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * 
+ * Except as contained in this notice, the name of the XFree86 Project
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written
+ * authorization from the XFree86 Project.
+ */
+#ifndef _XMESSAGE_H
+#define _XMESSAGE_H
+
+extern const char *ProgramName;
+extern int default_exitstatus;
+
+extern Widget make_queryform(Widget, char *, int, char *, Boolean, char *,
+    Dimension, Dimension);
+
+#endif
diff --git a/xmessage/xmessage.man b/xmessage/xmessage.man
new file mode 100644 (file)
index 0000000..016ba88
--- /dev/null
@@ -0,0 +1,178 @@
+.\" $XConsortium: xmessage.man,v 1.8 95/03/08 22:28:48 gildea Exp $
+.\"
+.\" $XFree86$
+.\"
+.TH XMESSAGE 1 __xorgversion__
+.SH NAME
+xmessage \- display a message or query in a window (X-based /bin/echo)
+.SH SYNOPSIS
+.B xmessage
+[
+.B \-buttons
+.I label1\fR[\fP\fB:\fPvalue1\fR]\fP\fB,\fPlabel2\fR[\fP\fB:\fPvalue2\fR]\fP\fB,\fP
+\&\|.\|.\|.
+] [
+.I options
+]
+.B \-file
+.I filename
+.br
+.B xmessage
+[
+.B \-buttons
+.I label1\fR[\fP\fB:\fPvalue1\fR]\fP\fB,\fPlabel2\fR[\fP\fB:\fPvalue2\fR]\fP\fB,\fP
+\&\|.\|.\|.
+] [
+.I options
+]
+.I message
+\&.\|.\|.
+.SH DESCRIPTION
+The 
+.I xmessage
+program
+displays a window containing a message from the command line, a file,
+or standard input.
+Along the lower edge of the message is row
+of buttons; clicking the left mouse button
+on any of these buttons will cause \fIxmessage\fP to exit.
+Which button was pressed is returned in the exit status and,
+optionally, by writing the label of the button to standard output.
+.PP
+The program
+is typically used by shell scripts to display information to the user
+or to ask the user to make a choice.
+.PP
+Unless a size is specified, \fIxmessage\fP
+sizes itself to fit the message, up to a maximum size.
+If the message is too big for the window, \fIxmessage\fP will display
+scroll bars.
+.SH OPTIONS
+These are the command line options that \fIxmessage\fP understands.
+.TP 8
+.B \-buttons \fIbutton,button,.\|.\|.\fP
+This option will cause \fIxmessage\fP to create one button for each
+comma-separated \fIbutton\fP argument.
+The corresponding resource is \fBbuttons\fP.
+Each \fIbutton\fP consists of a label optionally followed by a colon
+and an exit value.
+The label is the name of the Command button widget created and will be the 
+default text displayed to the user.  Since this is the name of the widget
+it may be used to change any of the resources associated with that button.
+The exit value will be returned by \fIxmessage\fP
+if that button is selected.  The default exit value is 100 plus the
+button number.  Buttons are numbered from the left starting with one.
+The default string if no \fB\-buttons\fP option is given is \fBokay:0\fP.
+.TP 8
+.B \-default \fIlabel\fP
+Defines the button with a matching \fIlabel\fP to be the default.
+If not specified there is no default.
+The corresponding resource is \fBdefaultButton\fP.
+Pressing Return anywhere in the \fIxmessage\fP window will activate
+the default button.
+The default button has a wider border than the others.
+.TP 8
+.B \-file \fIfilename\fP
+File to display.
+The corresponding resource is \fBfile\fP.
+A \fIfilename\fP of `\fB\-\fP' reads from standard input.
+If this option is not supplied, \fIxmessage\fP will
+display all non-option arguments in the style of \fIecho\fP.
+Either \fB\-file\fP or a message on the command line
+should be provided, but not both.
+.TP 8
+.B \-print
+This will cause the program to write the label of the button pressed to
+standard output.  Equivalent to setting the \fBprintValue\fP resource
+to TRUE.
+This is one way to get feedback as to which button was pressed.
+.TP 8
+.B \-center
+Pop up the window at the center of the screen.
+Equivalent to setting the \fBcenter\fP resource to TRUE.
+.TP 8
+.B \-nearmouse
+Pop up the window near the mouse cursor.
+Equivalent to setting the \fBnearMouse\fP resource to TRUE.
+.TP 8
+.B \-timeout \fIsecs\fP
+Exit with status 0 after \fIsecs\fP seconds if the user has not
+clicked on a button yet.
+The corresponding resource is \fBtimeout\fP.
+.SH "WIDGET HIERARCHY"
+Knowing the name and position in the hierarchy of each widget is
+useful when specifying resources for them.  In the following chart, the
+class and name of each widget is given.
+.LP
+.nf
+Xmessage (xmessage)
+       Form form
+               Text message
+               Command (label1)
+               Command (label2)
+               .
+               .
+               .
+.fi
+.SH RESOURCES
+The program has a few top-level application resources that allow
+customizations that are specific to \fIxmessage\fP. 
+.TP 8
+.B file
+A String specifying the file to display.
+.TP 8
+.B buttons
+A String specifying the buttons to display.
+See the \fB\-buttons\fP command-line option.
+.TP 8
+.B defaultButton
+A String specifying a default button by label.
+.TP 8
+.B printValue
+A Boolean value specifying whether the label of the 
+button pressed to exit the program is written to standard output.
+The default is FALSE.
+.TP 8
+.B center
+A Boolean value specifying whether to pop up the window at the center
+of the screen.  The default is FALSE.
+.TP 8
+.B nearMouse
+A Boolean value specifying whether to pop up the window near the mouse
+cursor.  The default is FALSE.
+.TP 8
+.B timeout
+The number of seconds after which to exit with
+status 0.  The default is 0, which means never time out.
+.TP 8
+.B "maxHeight (\fPclass\fB Maximum)
+The maximum height of the text part of the window in pixels,
+used if no size was specified in the geometry.
+The default is 0, which means use 70% of the height of the screen.
+.TP 8
+.B "maxWidth (\fPclass\fB Maximum)
+The maximum width of the text part of the window in pixels,
+used if no size was specified in the geometry.
+The default is 0, which means use 70% of the width of the screen.
+.SH ACTIONS
+.TP 8
+.B exit(\fIvalue\fP)
+exit immediately with an exit status of \fIvalue\fP (default 0).  This
+action can be used with translations to provide alternate ways of
+exiting \fIxmessage\fP.
+.TP 8
+.B default-exit()
+exit immediately with the exit status specified by the default button.
+If there is no default button, this action has no effect.
+.SH "EXIT STATUS"
+If it detects an error, \fIxmessage\fP returns 1, so this value should
+not be used with a button.
+.SH "SEE ALSO"
+.IR X (__miscmansuffix__),
+.IR echo (1),
+.IR cat (1)
+.br
+.SH AUTHORS
+Chris Peterson, MIT Project Athena 
+.br
+Stephen Gildea, X Consortium
diff --git a/xmore/AUTHORS b/xmore/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xmore/ChangeLog b/xmore/ChangeLog
deleted file mode 100644 (file)
index 186d566..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version number for final X11R7 release candidate.
-
-2005-12-07  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * Makefile.am:
-       * configure.ac:
-       Change to use the app-defaults default dir configured in libXt.
-
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * Makefile.am:
-       Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version number for X11R7 RC3 release.
-
-2005-11-19  Alan Coopersmith  <alan.coopersmith@sun.com>
-
-       * configure.ac: 
-       Add dependency on xp module when building with Xprint support.
-
-2005-10-18  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * configure.ac:
-       Update package version number for RC1 release.
-
-2005-10-05  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-       * Makefile.am: Add xmore.sgml to EXTRA_DIST
diff --git a/xmore/Makefile.in b/xmore/Makefile.in
deleted file mode 100644 (file)
index 55b11e1..0000000
+++ /dev/null
@@ -1,738 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# 
-#  Copyright 2005  Red Hat, Inc.
-# 
-#  Permission to use, copy, modify, distribute, and sell this software and its
-#  documentation for any purpose is hereby granted without fee, provided that
-#  the above copyright notice appear in all copies and that both that
-#  copyright notice and this permission notice appear in supporting
-#  documentation, and that the name of Red Hat not be used in
-#  advertising or publicity pertaining to distribution of the software without
-#  specific, written prior permission.  Red Hat makes no
-#  representations about the suitability of this software for any purpose.  It
-#  is provided "as is" without express or implied warranty.
-# 
-#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-#  PERFORMANCE OF THIS SOFTWARE.
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-bin_PROGRAMS = xmore$(EXEEXT)
-@XAW_USE_XPRINT_TRUE@am__append_1 = -DUSE_XPRINT
-@XAW_USE_XPRINT_TRUE@am__append_2 = \
-@XAW_USE_XPRINT_TRUE@        print.c \
-@XAW_USE_XPRINT_TRUE@        printdialog.c \
-@XAW_USE_XPRINT_TRUE@        printdialog.h \
-@XAW_USE_XPRINT_TRUE@        printdialogprivates.h \
-@XAW_USE_XPRINT_TRUE@        print.h
-
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-       compile config.guess config.sub depcomp install-sh missing \
-       mkinstalldirs
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" \
-       "$(DESTDIR)$(appmandir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
-am__xmore_SOURCES_DIST = xmore.c xmore.h print.c printdialog.c \
-       printdialog.h printdialogprivates.h print.h
-@XAW_USE_XPRINT_TRUE@am__objects_1 = xmore-print.$(OBJEXT) \
-@XAW_USE_XPRINT_TRUE@  xmore-printdialog.$(OBJEXT)
-am_xmore_OBJECTS = xmore-xmore.$(OBJEXT) $(am__objects_1)
-xmore_OBJECTS = $(am_xmore_OBJECTS)
-am__DEPENDENCIES_1 =
-xmore_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(xmore_SOURCES)
-DIST_SOURCES = $(am__xmore_SOURCES_DIST)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-appdefaultDATA_INSTALL = $(INSTALL_DATA)
-appmanDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appdefault_DATA) $(appman_DATA)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
-ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
-APP_MAN_DIR = @APP_MAN_DIR@
-APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
-DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EXEEXT = @EXEEXT@
-FILE_MAN_DIR = @FILE_MAN_DIR@
-FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_MAN_DIR = @LIB_MAN_DIR@
-LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MISC_MAN_DIR = @MISC_MAN_DIR@
-MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@
-TMP_XAW_LIBS = @TMP_XAW_LIBS@
-VERSION = @VERSION@
-XAW_USE_XPRINT_FALSE = @XAW_USE_XPRINT_FALSE@
-XAW_USE_XPRINT_TRUE = @XAW_USE_XPRINT_TRUE@
-XMORE_CFLAGS = @XMORE_CFLAGS@
-XMORE_LIBS = @XMORE_LIBS@
-XPRINT_UTIL_CFLAGS = @XPRINT_UTIL_CFLAGS@
-XPRINT_UTIL_LIBS = @XPRINT_UTIL_LIBS@
-ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-
-# App default files  (*.ad)
-appdefaultdir = @appdefaultdir@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-xmore_CFLAGS = $(XMORE_CFLAGS) -DXMORE $(am__append_1)
-xmore_LDADD = $(XMORE_LIBS)
-xmore_SOURCES = xmore.c xmore.h $(am__append_2)
-appman_PRE = \
-        xmore.man
-
-APPDEFAULTFILES = \
-        XMore
-
-SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
-appdefault_DATA = $(APPDEFAULTFILES)
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) xmore.sgml $(appman_PRE)
-CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
-appmandir = $(APP_MAN_DIR)
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-SED = sed
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
-XORGMANNAME = X Version 11
-MAN_SUBSTS = \
-       -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-       -e 's|__xservername__|Xorg|g' \
-       -e 's|__xconfigfile__|xorg.conf|g' \
-       -e 's|__projectroot__|$(prefix)|g' \
-       -e 's|__apploaddir__|$(appdefaultdir)|' \
-       -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-       -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-       -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-       -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-       -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
-
-all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
-am--refresh:
-       @:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             cd $(srcdir) && $(AUTOMAKE) --gnu  \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           echo ' $(SHELL) ./config.status'; \
-           $(SHELL) ./config.status;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) stamp-h1; \
-       else :; fi
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h1
-       cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
-       rm -f stamp-h1
-       touch $@
-
-distclean-hdr:
-       -rm -f config.h stamp-h1
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
-
-clean-binPROGRAMS:
-       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-xmore$(EXEEXT): $(xmore_OBJECTS) $(xmore_DEPENDENCIES) 
-       @rm -f xmore$(EXEEXT)
-       $(LINK) $(xmore_LDFLAGS) $(xmore_OBJECTS) $(xmore_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmore-print.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmore-printdialog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmore-xmore.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-xmore-xmore.o: xmore.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -MT xmore-xmore.o -MD -MP -MF "$(DEPDIR)/xmore-xmore.Tpo" -c -o xmore-xmore.o `test -f 'xmore.c' || echo '$(srcdir)/'`xmore.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xmore-xmore.Tpo" "$(DEPDIR)/xmore-xmore.Po"; else rm -f "$(DEPDIR)/xmore-xmore.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xmore.c' object='xmore-xmore.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -c -o xmore-xmore.o `test -f 'xmore.c' || echo '$(srcdir)/'`xmore.c
-
-xmore-xmore.obj: xmore.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -MT xmore-xmore.obj -MD -MP -MF "$(DEPDIR)/xmore-xmore.Tpo" -c -o xmore-xmore.obj `if test -f 'xmore.c'; then $(CYGPATH_W) 'xmore.c'; else $(CYGPATH_W) '$(srcdir)/xmore.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xmore-xmore.Tpo" "$(DEPDIR)/xmore-xmore.Po"; else rm -f "$(DEPDIR)/xmore-xmore.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='xmore.c' object='xmore-xmore.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -c -o xmore-xmore.obj `if test -f 'xmore.c'; then $(CYGPATH_W) 'xmore.c'; else $(CYGPATH_W) '$(srcdir)/xmore.c'; fi`
-
-xmore-print.o: print.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -MT xmore-print.o -MD -MP -MF "$(DEPDIR)/xmore-print.Tpo" -c -o xmore-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xmore-print.Tpo" "$(DEPDIR)/xmore-print.Po"; else rm -f "$(DEPDIR)/xmore-print.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='print.c' object='xmore-print.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -c -o xmore-print.o `test -f 'print.c' || echo '$(srcdir)/'`print.c
-
-xmore-print.obj: print.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -MT xmore-print.obj -MD -MP -MF "$(DEPDIR)/xmore-print.Tpo" -c -o xmore-print.obj `if test -f 'print.c'; then $(CYGPATH_W) 'print.c'; else $(CYGPATH_W) '$(srcdir)/print.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xmore-print.Tpo" "$(DEPDIR)/xmore-print.Po"; else rm -f "$(DEPDIR)/xmore-print.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='print.c' object='xmore-print.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -c -o xmore-print.obj `if test -f 'print.c'; then $(CYGPATH_W) 'print.c'; else $(CYGPATH_W) '$(srcdir)/print.c'; fi`
-
-xmore-printdialog.o: printdialog.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -MT xmore-printdialog.o -MD -MP -MF "$(DEPDIR)/xmore-printdialog.Tpo" -c -o xmore-printdialog.o `test -f 'printdialog.c' || echo '$(srcdir)/'`printdialog.c; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xmore-printdialog.Tpo" "$(DEPDIR)/xmore-printdialog.Po"; else rm -f "$(DEPDIR)/xmore-printdialog.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='printdialog.c' object='xmore-printdialog.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -c -o xmore-printdialog.o `test -f 'printdialog.c' || echo '$(srcdir)/'`printdialog.c
-
-xmore-printdialog.obj: printdialog.c
-@am__fastdepCC_TRUE@   if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -MT xmore-printdialog.obj -MD -MP -MF "$(DEPDIR)/xmore-printdialog.Tpo" -c -o xmore-printdialog.obj `if test -f 'printdialog.c'; then $(CYGPATH_W) 'printdialog.c'; else $(CYGPATH_W) '$(srcdir)/printdialog.c'; fi`; \
-@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/xmore-printdialog.Tpo" "$(DEPDIR)/xmore-printdialog.Po"; else rm -f "$(DEPDIR)/xmore-printdialog.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='printdialog.c' object='xmore-printdialog.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmore_CFLAGS) $(CFLAGS) -c -o xmore-printdialog.obj `if test -f 'printdialog.c'; then $(CYGPATH_W) 'printdialog.c'; else $(CYGPATH_W) '$(srcdir)/printdialog.c'; fi`
-uninstall-info-am:
-install-appdefaultDATA: $(appdefault_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(mkdir_p) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-
-uninstall-appdefaultDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appdefault_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \
-       done
-install-appmanDATA: $(appman_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)"
-       @list='$(appman_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \
-         $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \
-       done
-
-uninstall-appmanDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(appman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(appmandir)/$$f"; \
-       done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-         test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
-       fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
-         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
-
-GTAGS:
-       here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-       $(am__remove_distdir)
-       mkdir $(distdir)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
-
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
-
-dist-zip: distdir
-       -rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
-
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       case '$(DIST_ARCHIVES)' in \
-       *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
-       *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
-       *.zip*) \
-         unzip $(distdir).zip ;;\
-       esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
-       chmod a-w $(distdir)
-       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-           $(DISTCHECK_CONFIGURE_FLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
-         && $(MAKE) $(AM_MAKEFLAGS) check \
-         && $(MAKE) $(AM_MAKEFLAGS) install \
-         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-               distuninstallcheck \
-         && chmod -R a-w "$$dc_install_base" \
-         && ({ \
-              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-             } || { rm -rf "$$dc_destdir"; exit 1; }) \
-         && rm -rf "$$dc_destdir" \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-       $(am__remove_distdir)
-       @(echo "$(distdir) archives ready for distribution: "; \
-         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-          || { echo "ERROR: files left after uninstall:" ; \
-               if test -n "$(DESTDIR)"; then \
-                 echo "  (check DESTDIR support)"; \
-               fi ; \
-               $(distuninstallcheck_listfiles) ; \
-               exit 1; } >&2
-distcleancheck: distclean
-       @if test '$(srcdir)' = . ; then \
-         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-         exit 1 ; \
-       fi
-       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-         || { echo "ERROR: files left in build directory after distclean:" ; \
-              $(distcleancheck_listfiles) ; \
-              exit 1; } >&2
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA) config.h
-installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \
-         test -z "$$dir" || $(mkdir_p) "$$dir"; \
-       done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-appdefaultDATA install-appmanDATA
-
-install-exec-am: install-binPROGRAMS
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf ./$(DEPDIR)
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-       clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-       dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
-       install-data install-data-am install-exec install-exec-am \
-       install-info install-info-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-       uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-info-am
-
-
-.ad:
-       cp $< $@
-
-.man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/xmore/NEWS b/xmore/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xmore/README b/xmore/README
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/xmore/XMore.ad b/xmore/XMore.ad
deleted file mode 100644 (file)
index 98704d9..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-! XMore.ad
-
-! keyboard translations
-*text.Translations: #override\n\
-        Ctrl<Key>S:     no-op(RingBell)\n\
-        Ctrl<Key>R:     no-op(RingBell)\n\
-        <Key>space:     next-page()\n\
-        <Key>F:         next-page()\n\
-        Ctrl<Key>B:     previous-page()\n\
-        <Key>B:         previous-page()\n\
-        <Key>K:         scroll-one-line-down()\n\
-        <Key>Y:         scroll-one-line-down()\n\
-        <Key>Return:    scroll-one-line-up()\n\
-        <Key>J:         scroll-one-line-up()\n\
-        <Key>E:         scroll-one-line-up()\n\
-        <Key>p:         print()\n\
-        <Key>q:         quit()\n
-*text.baseTranslations: #override\n\
-        <Key>space:     next-page()\n\
-        <Key>F:         next-page()\n\
-        Ctrl<Key>B:     previous-page()\n\
-        <Key>K:         scroll-one-line-down()\n\
-        <Key>Y:         scroll-one-line-down()\n\
-        <Key>Return:    scroll-one-line-up()\n\
-        <Key>J:         scroll-one-line-up()\n\
-        <Key>E:         scroll-one-line-up()\n\
-        <Key>p:         print()\n\
-        <Key>q:         quit()\n
-
-! tip messages
-*quit.tip:  Quit application
-*print.tip: Print file
-
-! Use "white" as background for printing
-*printshell*background:   white
-
-! Print dialog
-*printdialogshell*geometry:                       600x120
-*printdialogshell*title:                          Print
-*printdialogshell*main*ok.fromVert:               innerform
-*printdialogshell*main*ok.label:                  Print
-*printdialogshell*main*ok.tip:                    Print
-*printdialogshell*main*setup.fromHoriz:           ok
-*printdialogshell*main*setup.fromVert:            innerform
-*printdialogshell*main*setup.label:               Setup...
-*printdialogshell*main*setup.tip:                 Configure print job options (page size, orientation, etc.)
-*printdialogshell*main*cancel.fromHoriz:          setup
-*printdialogshell*main*cancel.fromVert:           innerform
-*printdialogshell*main*cancel.label:              Cancel
-*printdialogshell*main*cancel.tip:                Cancel printing
-*printdialogshell*main*desclabel.label:           Printer Description:
-*printdialogshell*main*desclabel.tip:             Short description of printer
-*printdialogshell*main*desc.fromHoriz:            desclabel
-*printdialogshell*main*desc.tip:                  Short description of printer
-*printdialogshell*main*info.fromHoriz:            desc
-*printdialogshell*main*info.label:                Printer info...
-*printdialogshell*main*info.tip:                  Display additional information about this printer
-*printdialogshell*main*namelabel.fromVert:        desclabel
-*printdialogshell*main*namelabel.label:           Printer Name:
-*printdialogshell*main*namelabel.tip:             Name of selected printer
-*printdialogshell*main*name.fromHoriz:            namelabel
-*printdialogshell*main*name.fromVert:             desclabel
-*printdialogshell*main*name.tip:                  Name of selected printer
-*printdialogshell*main*selectprinter.fromHoriz:   name
-*printdialogshell*main*selectprinter.fromVert:    desclabel
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.label:       Select Printer...
-*printdialogshell*main*selectprinter.tip:         Select a different printer
-*printdialogshell*main*filenamelabel.fromVert:    namelabel
-*printdialogshell*main*filenamelabel.label:       File Name:
-*printdialogshell*main*filenamelabel.tip:         File where the output should be stored
-*printdialogshell*main*filename.fromHoriz:        filenamelabel
-*printdialogshell*main*filename.fromVert:         namelabel
-*printdialogshell*main*filename.tip:              File where the output should be stored
-*printdialogshell*main*selectfile.fromHoriz:      filename
-*printdialogshell*main*selectfile.fromVert:       namelabel
-*printdialogshell*main*selectfile.label:          Select File...
-*printdialogshell*main*selectfile.tip:            Select file where the output should be stored
-*printdialogshell*main*printtoprinter.fromVert:   filenamelabel
-*printdialogshell*main*printtoprinter.label:      Print to Printer
-*printdialogshell*main*printtoprinter.tip:        Send print job to printer
-*printdialogshell*main*printtofile.fromVert:      filenamelabel
-*printdialogshell*main*printtofile.fromHoriz:     printtoprinter
-*printdialogshell*main*printtofile.label:         Print to File
-*printdialogshell*main*printtofile.tip:           Save print job in a file
-
-! Print job options dialog
-*printdialogshell*setup*geometry:                     600x400
-*printdialogshell*setup*title:                        Print: Print job options
-*printdialogshell*setup*ok.fromVert:                  list
-*printdialogshell*setup*ok.label:                     OK
-*printdialogshell*setup*ok.tip:                       Commit changes
-*printdialogshell*setup*cancel.fromHoriz:             ok
-*printdialogshell*setup*cancel.fromVert:              list
-*printdialogshell*setup*cancel.label:                 Cancel
-*printdialogshell*setup*cancel.tip:                   Cancel and reset to defaults
-*printdialogshell*setup*paperlist.tip:                Select paper size
-*printdialogshell*setup*resolutionlist.fromHoriz:     paperlist
-*printdialogshell*setup*resolutionlist.tip:           Select page resolution
-*printdialogshell*setup*orientationlist.fromHoriz:    resolutionlist
-*printdialogshell*setup*orientationlist.tip:          Select page orientation
-*printdialogshell*setup*plexlist.fromHoriz:           orientationlist
-*printdialogshell*setup*plexlist.tip:                 Select page plex mode (simplex, duplex, etc.)
-*printdialogshell*setup*colorspacelist.fromHoriz:     plexlist
-*printdialogshell*setup*colorspacelist.tip:           Select color space (color, grayscale, CYMK, etc.)
-*printdialogshell*setup*jobcopieslabel.fromVert:      paperlist
-*printdialogshell*setup*jobcopieslabel.tip:           Set number of job copies
-*printdialogshell*setup*jobcopieslabel.label:         Job Copies:
-*printdialogshell*setup*jobcopies.fromHoriz:          jobcopieslabel
-*printdialogshell*setup*jobcopies.fromVert:           paperlist
-*printdialogshell*setup*jobcopies.tip:                Set number of job copies
-
-! Printer selection
-*printdialogshell*printerselection*geometry:          400x150
-*printdialogshell*printerselection*title:             Print: Select printer
-*printdialogshell*printerselection*ok.fromVert:       list
-*printdialogshell*printerselection*ok.label:          OK
-*printdialogshell*printerselection*ok.tip:            Switch printer
-*printdialogshell*printerselection*cancel.fromHoriz:  ok
-*printdialogshell*printerselection*cancel.fromVert:   list
-*printdialogshell*printerselection*cancel.label:      Cancel
-*printdialogshell*printerselection*cancel.tip:        Cancel printer selection
-*printdialogshell*printerselection*list.tip:          Select printer name from list
-
-! Select job file
-*printdialogshell*selectfile*geometry:          400x80
-*printdialogshell*selectfile*title:             Print: Select job file
-*printdialogshell*selectfile*dialog.label:      Select Filename:
-
-! EOF.
diff --git a/xmore/aclocal.m4 b/xmore/aclocal.m4
deleted file mode 100644 (file)
index 103df10..0000000
+++ /dev/null
@@ -1,1581 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-               
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                        [pkg_failed=yes])
-    fi
-else
-       pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-dnl Copyright 2005 Red Hat, Inc
-dnl 
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl 
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl 
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl 
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl 
-
-# XAW_CHECK_XPRINT_SUPPORT()
-# --------------------------
-# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 
-# library. If neither --enable-xprint nor --disable-xprint are given, 
-# the presence of an Xaw with Xprint support will be auto detected
-
-AC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
-       AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
-                       [use_xprint=$enableval],[use_xprint=auto])
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
-
-       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
-       if [[ ! -z $TMP_CHECK2 ]] ; then
-               if test $success = no ; then
-                       PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
-                       xaw_use_xprint=no
-               fi
-       fi
-
-       if test "x$success" = "xyes"; then
-               $1_CFLAGS=$TMP_XAW_CFLAGS
-               $1_LIBS=$TMP_XAW_LIBS
-
-               AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
-       else
-               AC_MSG_ERROR([No suitable version of Xaw found])
-       fi
-])
-
-dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
-dnl 
-dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
-
-# XORG_MACROS_VERSION(required-version)
-# -------------------------------------
-# Minimum version: 1.1.0
-#
-# If you're using a macro added in Version 1.1 or newer, include this in
-# your configure.ac with the minimum required version, such as:
-# XORG_MACROS_VERSION(1.1)
-#
-# To force at least a version with this macro defined, also add:
-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
-#
-#
-# See the "minimum version" comment for each macro you use to see what 
-# version you require.
-AC_DEFUN([XORG_MACROS_VERSION],[
-       [XORG_MACROS_needed_version=$1
-       XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
-       XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
-       [XORG_MACROS_version=1.1.2
-       XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
-       XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
-       if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
-               AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
-       fi
-       if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
-               AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
-       fi
-       AC_MSG_RESULT([yes, $XORG_MACROS_version])
-]) # XORG_MACROS_VERSION
-
-# XORG_PROG_RAWCPP()
-# ------------------
-# Minimum version: 1.0.0
-#
-# Find cpp program and necessary flags for use in pre-processing text files
-# such as man pages and config files
-AC_DEFUN([XORG_PROG_RAWCPP],[
-AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
-   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
-
-# Check for flag to avoid builtin definitions - assumes unix is predefined,
-# which is not the best choice for supporting other OS'es, but covers most
-# of the ones we need for now.
-AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
-               RAWCPPFLAGS=-undef
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-
-AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-       AC_MSG_RESULT([no])
-else
-       if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
-               RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
-       fi
-fi
-rm -f conftest.$ac_ext
-AC_SUBST(RAWCPPFLAGS)
-]) # XORG_PROG_RAWCPP
-
-# XORG_MANPAGE_SECTIONS()
-# -----------------------
-# Minimum version: 1.0.0
-#
-# Determine which sections man pages go in for the different man page types
-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
-# Not sure if there's any better way than just hardcoding by OS name.
-# Override default settings by setting environment variables
-
-AC_DEFUN([XORG_MANPAGE_SECTIONS],[
-AC_REQUIRE([AC_CANONICAL_HOST])
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-AC_SUBST([APP_MAN_SUFFIX])
-AC_SUBST([LIB_MAN_SUFFIX])
-AC_SUBST([FILE_MAN_SUFFIX])
-AC_SUBST([MISC_MAN_SUFFIX])
-AC_SUBST([DRIVER_MAN_SUFFIX])
-AC_SUBST([ADMIN_MAN_SUFFIX])
-AC_SUBST([APP_MAN_DIR])
-AC_SUBST([LIB_MAN_DIR])
-AC_SUBST([FILE_MAN_DIR])
-AC_SUBST([MISC_MAN_DIR])
-AC_SUBST([DRIVER_MAN_DIR])
-AC_SUBST([ADMIN_MAN_DIR])
-]) # XORG_MANPAGE_SECTIONS
-
-# XORG_CHECK_LINUXDOC
-# -------------------
-# Minimum version: 1.0.0
-#
-# Defines the variable MAKE_TEXT if the necessary tools and
-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
-# Whether or not the necessary tools and files are found can be checked
-# with the AM_CONDITIONAL "BUILD_LINUXDOC"
-AC_DEFUN([XORG_CHECK_LINUXDOC],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-
-AC_MSG_CHECKING([Whether to build documentation])
-
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
-   BUILDDOC=yes
-else
-   BUILDDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
-
-AC_MSG_RESULT([$BUILDDOC])
-
-AC_MSG_CHECKING([Whether to build pdf documentation])
-
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
-   BUILDPDFDOC=yes
-else
-   BUILDPDFDOC=no
-fi
-
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
-MAKE_PDF="$PS2PDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_LINUXDOC
-
-# XORG_CHECK_DOCBOOK
-# -------------------
-# Minimum version: 1.0.0
-#
-# Checks for the ability to build output formats from SGML DocBook source.
-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
-# indicates whether the necessary tools and files are found and, if set,
-# $(MAKE_XXX) blah.sgml will produce blah.xxx.
-AC_DEFUN([XORG_CHECK_DOCBOOK],[
-XORG_SGML_PATH=$prefix/share/sgml
-HAVE_DEFS_ENT=
-BUILDTXTDOC=no
-BUILDPDFDOC=no
-BUILDPSDOC=no
-BUILDHTMLDOC=no
-
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
-AC_PATH_PROG(DOCBOOKPS, docbook2ps)
-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
-AC_PATH_PROG(DOCBOOKHTML, docbook2html)
-AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
-
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
-   test x$BUILD_TXTDOC != xno; then
-       BUILDTXTDOC=yes
-fi
-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
-AC_MSG_RESULT([$BUILDTXTDOC])
-
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
-   test x$BUILD_PDFDOC != xno; then
-       BUILDPDFDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
-AC_MSG_RESULT([$BUILDPDFDOC])
-
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
-   test x$BUILD_PSDOC != xno; then
-       BUILDPSDOC=yes
-fi
-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
-AC_MSG_RESULT([$BUILDPSDOC])
-
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
-   test x$BUILD_HTMLDOC != xno; then
-       BUILDHTMLDOC=yes
-fi
-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
-AC_MSG_RESULT([$BUILDHTMLDOC])
-
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
-
-AC_SUBST(MAKE_TEXT)
-AC_SUBST(MAKE_PS)
-AC_SUBST(MAKE_PDF)
-AC_SUBST(MAKE_HTML)
-]) # XORG_CHECK_DOCBOOK
-
-# XORG_CHECK_MALLOC_ZERO
-# ----------------------
-# Minimum version: 1.0.0
-#
-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
-# malloc(0) returns NULL.  Packages should add one of these cflags to
-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
-AC_ARG_ENABLE(malloc0returnsnull,
-       AC_HELP_STRING([--enable-malloc0returnsnull],
-                      [malloc(0) returns NULL (default: auto)]),
-       [MALLOC_ZERO_RETURNS_NULL=$enableval],
-       [MALLOC_ZERO_RETURNS_NULL=auto])
-
-AC_MSG_CHECKING([whether malloc(0) returns NULL])
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
-       AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
-    char *m0, *r0, *c0, *p;
-    m0 = malloc(0);
-    p = malloc(10);
-    r0 = realloc(p,0);
-    c0 = calloc(0);
-    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
-               [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
-fi
-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
-
-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
-       MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
-       XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
-       XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
-else
-       MALLOC_ZERO_CFLAGS=""
-       XMALLOC_ZERO_CFLAGS=""
-       XTMALLOC_ZERO_CFLAGS=""
-fi
-
-AC_SUBST([MALLOC_ZERO_CFLAGS])
-AC_SUBST([XMALLOC_ZERO_CFLAGS])
-AC_SUBST([XTMALLOC_ZERO_CFLAGS])
-]) # XORG_CHECK_MALLOC_ZERO
-
-# XORG_WITH_LINT()
-# ----------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified.   (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
-#
-AC_DEFUN([XORG_WITH_LINT],[
-
-# Allow checking code with lint, sparse, etc.
-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
-               [Use a lint-style source code checker (default: disabled)])],
-               [use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
-       LINT="lint"
-else
-       LINT="$use_lint"
-fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
-    case $LINT in
-       lint|*/lint)
-           case $host_os in
-               solaris*)
-                       LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
-                       ;;
-           esac
-           ;;
-    esac
-fi
-
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
-
-]) # XORG_WITH_LINT
-
-# XORG_LINT_LIBRARY(LIBNAME)
-# --------------------------
-# Minimum version: 1.1.0
-#
-# Sets up flags for building lint libraries for checking programs that call
-# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets: 
-#      @LINTLIB@               - name of lint library file to make
-#      MAKE_LINT_LIB           - automake conditional
-#
-
-AC_DEFUN([XORG_LINT_LIBRARY],[
-AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
-       [Create lint library (default: disabled)])],
-       [make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
-       if test "x$LINT" = "xno" ; then
-               AC_MSG_ERROR([Cannot make lint library without --with-lint])
-       fi
-       if test "x$make_lint_lib" = "xyes" ; then
-               LINTLIB=llib-l$1.ln
-       else
-               LINTLIB=$make_lint_lib
-       fi
-fi
-AC_SUBST(LINTLIB)
-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
-
-]) # XORG_LINT_LIBRARY
-
-dnl Copyright 2005 Red Hat, Inc
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
-
-# XORG_RELEASE_VERSION
-# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
-AC_DEFUN([XORG_RELEASE_VERSION],[
-       AC_ARG_WITH(release-version,
-                       AC_HELP_STRING([--with-release-version=STRING],
-                               [Use release version string in package name]),
-                       [RELEASE_VERSION="$withval"],
-                       [RELEASE_VERSION=""])
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               AC_MSG_NOTICE([Building with package name set to $PACKAGE])
-       fi
-])
-
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.6])])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 7
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-#serial 3
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 12
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-])
-])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $1 | $1:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
-AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
diff --git a/xmore/compile b/xmore/compile
deleted file mode 100755 (executable)
index 1b1d232..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
-       eat=1
-       case $2 in
-         *.o | *.obj)
-           ofile=$2
-           ;;
-         *)
-           set x "$@" -o "$2"
-           shift
-           ;;
-       esac
-       ;;
-      *.c)
-       cfile=$1
-       set x "$@" "$1"
-       shift
-       ;;
-      *)
-       set x "$@" "$1"
-       shift
-       ;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xmore/config.guess b/xmore/config.guess
deleted file mode 100755 (executable)
index 396482d..0000000
+++ /dev/null
@@ -1,1500 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-07-02'
-
-# This file 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[45])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-               {
-               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-               case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-                   switch (bits)
-                       {
-                       case 64: puts ("hppa2.0w"); break;
-                       case 32: puts ("hppa2.0n"); break;
-                       default: puts ("hppa2.0"); break;
-                       } break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-                   puts ("hppa2.0"); break;
-              #endif
-               default: puts ("hppa1.0"); break;
-               }
-                  exit (0);
-              }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    i*:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    x86:Interix*:[3456]*)
-       echo i586-pc-interix${UNAME_RELEASE}
-       exit ;;
-    EM64T:Interix*:[3456]*)
-       echo x86_64-unknown-interix${UNAME_RELEASE}
-       exit ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    arm*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    cris:Linux:*:*)
-       echo cris-axis-linux-gnu
-       exit ;;
-    crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
-       exit ;;
-    frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips64
-       #undef mips64el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
-       esac
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
-       exit ;;
-    x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
-       exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/xmore/config.h.in b/xmore/config.h.in
deleted file mode 100644 (file)
index c364eda..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Version number of package */
-#undef VERSION
diff --git a/xmore/config.sub b/xmore/config.sub
deleted file mode 100755 (executable)
index 387c18d..0000000
+++ /dev/null
@@ -1,1608 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2006-07-02'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray)
-               os=
-               basic_machine=$1
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-       | bfin \
-       | c4x | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64vr | mips64vrel \
-       | mips64orion | mips64orionel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | mt \
-       | msp430 \
-       | nios | nios2 \
-       | ns16k | ns32k \
-       | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-       | pyramid \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
-       | v850 | v850e \
-       | we32k \
-       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
-               basic_machine=$basic_machine-unknown
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
-               # Motorola 68HC11/12.
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nios-* | nios2-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-       | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-       | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tron-* \
-       | v850-* | v850e-* | vax-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-       | xstormy16-* | xtensa-* \
-       | ymp-* \
-       | z8k-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16c)
-               basic_machine=cr16c-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       mingw32)
-               basic_machine=i386-pc
-               os=-mingw32
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-        -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-        -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -kaos*)
-               os=-kaos
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/xmore/configure b/xmore/configure
deleted file mode 100755 (executable)
index f535d80..0000000
+++ /dev/null
@@ -1,5534 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for xmore 1.0.1.
-#
-# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 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.  ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-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
-
-
-
-
-# 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-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; }
-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
-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'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-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
-}
-
-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
-  :
-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; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-        /*)
-          for as_base in sh bash ksh sh5; do
-            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-          done;;
-       esac
-done
-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.
-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
-  :
-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
-
-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
-
-
-    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
-
-
-fi
-
-fi
-
-
-
-(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
-}
-
-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
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-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_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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='xmore'
-PACKAGE_TARNAME='xmore'
-PACKAGE_VERSION='1.0.1'
-PACKAGE_STRING='xmore 1.0.1'
-PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
-
-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
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CYGPATH_W
-PACKAGE
-VERSION
-ACLOCAL
-AUTOCONF
-AUTOMAKE
-AUTOHEADER
-MAKEINFO
-install_sh
-STRIP
-INSTALL_STRIP_PROGRAM
-mkdir_p
-AWK
-SET_MAKE
-am__leading_dot
-AMTAR
-am__tar
-am__untar
-MAINTAINER_MODE_TRUE
-MAINTAINER_MODE_FALSE
-MAINT
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-PKG_CONFIG
-TMP_XAW_CFLAGS
-TMP_XAW_LIBS
-XAW_USE_XPRINT_TRUE
-XAW_USE_XPRINT_FALSE
-XPRINT_UTIL_CFLAGS
-XPRINT_UTIL_LIBS
-XMORE_CFLAGS
-XMORE_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS
-appdefaultdir
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-APP_MAN_SUFFIX
-LIB_MAN_SUFFIX
-FILE_MAN_SUFFIX
-MISC_MAN_SUFFIX
-DRIVER_MAN_SUFFIX
-ADMIN_MAN_SUFFIX
-APP_MAN_DIR
-LIB_MAN_DIR
-FILE_MAN_DIR
-MISC_MAN_DIR
-DRIVER_MAN_DIR
-ADMIN_MAN_DIR
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-PKG_CONFIG
-TMP_XAW_CFLAGS
-TMP_XAW_LIBS
-XPRINT_UTIL_CFLAGS
-XPRINT_UTIL_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`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 ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`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 ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_package=`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 ;;
-
-  -without-* | --without-*)
-    ac_package=`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 ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --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; }; }
-    ;;
-
-  *=*)
-    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; }; }
-    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
-    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}
-    ;;
-
-  esac
-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; }; }
-fi
-
-# Be sure to have absolute directory names.
-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
-  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; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-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
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-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; }; }
-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; }; }
-
-
-# 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" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-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; }; }
-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; }; }
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # 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 xmore 1.0.1 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --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
-      --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
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                         [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                         [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-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/xmore]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of xmore 1.0.1:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-                         (and sometimes confusing) to the casual installer
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-  --enable-xprint         Enable XPrint support
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-release-version=STRING
-                          Use release version string in package name
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  PKG_CONFIG  path to pkg-config utility
-  TMP_XAW_CFLAGS
-              C compiler flags for TMP_XAW, overriding pkg-config
-  TMP_XAW_LIBS
-              linker flags for TMP_XAW, overriding pkg-config
-  XPRINT_UTIL_CFLAGS
-              C compiler flags for XPRINT_UTIL, overriding pkg-config
-  XPRINT_UTIL_LIBS
-              linker flags for XPRINT_UTIL, overriding pkg-config
-  APPDEFS_CFLAGS
-              C compiler flags for APPDEFS, overriding pkg-config
-  APPDEFS_LIBS
-              linker flags for APPDEFS, overriding pkg-config
-
-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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
-_ACEOF
-ac_status=$?
-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
-    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,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`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/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-xmore configure 1.0.1
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 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
-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 xmore $as_me 1.0.1, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      ac_configure_args="$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; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# 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=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    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;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## 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"`;;
-      esac
-      echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
-## 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"`;;
-       esac
-       echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## 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"
-  } >&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
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* 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"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
-  set x "$ac_default_prefix/share/config.site" \
-       "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-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;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  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;}
-    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;}
-  >$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,)
-      { 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;}
-      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;}
-      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=:
-      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=$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'" ;;
-    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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-
-
-am__api_version="1.9"
-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
-  { { 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; }; }
-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),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
-# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-
-for ac_prog in gawk mawk nawk awk
-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_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-  SET_MAKE=
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='xmore'
- VERSION='1.0.1'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  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;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
-fi
-
-  { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
-
-
-if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
-fi
-
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-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
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    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
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  fi
-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
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-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
-  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
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # 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+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    break 2
-  fi
-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; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-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
-else
-  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
-  test -z "$as_dir" && as_dir=.
-  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
-    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
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-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; }; }
-
-# 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"
-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); }
-{ (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); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out 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.
-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_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-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_link_default") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-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 )
-       ;;
-    [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;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-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
-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
-
-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
-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"
-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); }; 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
-# `rm'.
-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_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; }
-
-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.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; 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_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  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; }; }
-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; }
-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
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  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_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       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`
-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
-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
-/* end confdefs.h.  */
-
-int
-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
-  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
-/* end confdefs.h.  */
-
-int
-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
-
-       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
-/* end confdefs.h.  */
-
-int
-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
-  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; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  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
-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
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
-
-/* 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 **, 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;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -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
-  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
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-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; } ;;
-  xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}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; } ;;
-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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
-fi
-
-
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-
-
-depcc="$CC"   am_compiler_list=
-
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-
-if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-# 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
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&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/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
-           # 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
-           # 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
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-done
-IFS=$as_save_IFS
-
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Checks for pkg-config packages
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; 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_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; 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_ac_pt_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
-  test -z "$as_dir" && as_dir=.
-  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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  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;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       else
-               { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-               PKG_CONFIG=""
-       fi
-
-fi
-
-       # Check whether --enable-xprint was given.
-if test "${enable_xprint+set}" = set; then
-  enableval=$enable_xprint; use_xprint=$enableval
-else
-  use_xprint=auto
-fi
-
-       if test "x$use_xprint" = "xyes"; then
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=
-               xaw_use_xprint=yes
-       elif test "x$use_xprint" = "xno"; then
-               TMP_CHECK1=xaw7
-               TMP_CHECK2=
-               xaw_use_xprint=no
-       else
-               TMP_CHECK1=xaw8
-               TMP_CHECK2=xaw7
-               xaw_use_xprint=yes
-       fi
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_CFLAGS"; then
-        pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_LIBS"; then
-        pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK1\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK1") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK1" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK1"`
-        else
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK1"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       success=yes
-fi
-       if [ ! -z $TMP_CHECK2 ] ; then
-               if test $success = no ; then
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for TMP_XAW" >&5
-echo $ECHO_N "checking for TMP_XAW... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_CFLAGS"; then
-        pkg_cv_TMP_XAW_CFLAGS="$TMP_XAW_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_CFLAGS=`$PKG_CONFIG --cflags "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$TMP_XAW_LIBS"; then
-        pkg_cv_TMP_XAW_LIBS="$TMP_XAW_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$TMP_CHECK2\"") >&5
-  ($PKG_CONFIG --exists --print-errors "$TMP_CHECK2") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_TMP_XAW_LIBS=`$PKG_CONFIG --libs "$TMP_CHECK2" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$TMP_CHECK2"`
-        else
-               TMP_XAW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$TMP_CHECK2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$TMP_XAW_PKG_ERRORS" >&5
-
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-                success=no
-elif test $pkg_failed = untried; then
-       success=no
-else
-       TMP_XAW_CFLAGS=$pkg_cv_TMP_XAW_CFLAGS
-       TMP_XAW_LIBS=$pkg_cv_TMP_XAW_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       success=yes
-fi
-                       xaw_use_xprint=no
-               fi
-       fi
-
-       if test "x$success" = "xyes"; then
-               XMORE_CFLAGS=$TMP_XAW_CFLAGS
-               XMORE_LIBS=$TMP_XAW_LIBS
-
-
-
-if test "x$xaw_use_xprint" = "xyes"; then
-  XAW_USE_XPRINT_TRUE=
-  XAW_USE_XPRINT_FALSE='#'
-else
-  XAW_USE_XPRINT_TRUE='#'
-  XAW_USE_XPRINT_FALSE=
-fi
-
-       else
-               { { echo "$as_me:$LINENO: error: No suitable version of Xaw found" >&5
-echo "$as_me: error: No suitable version of Xaw found" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-
-if test "x$xaw_use_xprint" = "xyes" ; then
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for XPRINT_UTIL" >&5
-echo $ECHO_N "checking for XPRINT_UTIL... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XPRINT_UTIL_CFLAGS"; then
-        pkg_cv_XPRINT_UTIL_CFLAGS="$XPRINT_UTIL_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XPRINT_UTIL_CFLAGS=`$PKG_CONFIG --cflags "xprintutil xp" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$XPRINT_UTIL_LIBS"; then
-        pkg_cv_XPRINT_UTIL_LIBS="$XPRINT_UTIL_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xprintutil xp\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xprintutil xp") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_XPRINT_UTIL_LIBS=`$PKG_CONFIG --libs "xprintutil xp" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xprintutil xp"`
-        else
-               XPRINT_UTIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xprintutil xp"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$XPRINT_UTIL_PKG_ERRORS" >&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (xprintutil xp) were not met:
-
-$XPRINT_UTIL_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS
-and XPRINT_UTIL_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (xprintutil xp) were not met:
-
-$XPRINT_UTIL_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS
-and XPRINT_UTIL_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS
-and XPRINT_UTIL_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XPRINT_UTIL_CFLAGS
-and XPRINT_UTIL_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-       XPRINT_UTIL_CFLAGS=$pkg_cv_XPRINT_UTIL_CFLAGS
-       XPRINT_UTIL_LIBS=$pkg_cv_XPRINT_UTIL_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
-fi
-
-   XMORE_CFLAGS="$XMORE_CFLAGS $XPRINT_UTIL_CFLAGS"
-   XMORE_LIBS="$XMORE_LIBS $XPRINT_UTIL_LIBS"
-fi
-
-
-
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for APPDEFS" >&5
-echo $ECHO_N "checking for APPDEFS... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_CFLAGS"; then
-        pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$APPDEFS_LIBS"; then
-        pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-       pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
-        else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" >&5
-
-       { { echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       :
-fi
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-
-
-
-if test x$APP_MAN_SUFFIX = x    ; then
-    APP_MAN_SUFFIX=1
-fi
-if test x$APP_MAN_DIR = x    ; then
-    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
-fi
-
-if test x$LIB_MAN_SUFFIX = x    ; then
-    LIB_MAN_SUFFIX=3
-fi
-if test x$LIB_MAN_DIR = x    ; then
-    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
-fi
-
-if test x$FILE_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       FILE_MAN_SUFFIX=4  ;;
-       *)              FILE_MAN_SUFFIX=5  ;;
-    esac
-fi
-if test x$FILE_MAN_DIR = x    ; then
-    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
-fi
-
-if test x$MISC_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       MISC_MAN_SUFFIX=5  ;;
-       *)              MISC_MAN_SUFFIX=7  ;;
-    esac
-fi
-if test x$MISC_MAN_DIR = x    ; then
-    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
-fi
-
-if test x$DRIVER_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
-       *)              DRIVER_MAN_SUFFIX=4  ;;
-    esac
-fi
-if test x$DRIVER_MAN_DIR = x    ; then
-    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
-fi
-
-if test x$ADMIN_MAN_SUFFIX = x    ; then
-    case $host_os in
-       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
-       *)              ADMIN_MAN_SUFFIX=8  ;;
-    esac
-fi
-if test x$ADMIN_MAN_DIR = x    ; then
-    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
-  withval=$with_release_version; RELEASE_VERSION="$withval"
-else
-  RELEASE_VERSION=""
-fi
-
-       if test "x$RELEASE_VERSION" != "x"; then
-               PACKAGE="$PACKAGE-$RELEASE_VERSION"
-               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
-               { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-echo "$as_me: Building with package name set to $PACKAGE" >&6;}
-       fi
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    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;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
-      esac ;;
-    esac
-  done
-
-  (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 \).
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     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
-    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
-  else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-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"`
-  # 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'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${XAW_USE_XPRINT_TRUE}" && test -z "${XAW_USE_XPRINT_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"XAW_USE_XPRINT\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-: ${CONFIG_STATUS=./config.status}
-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
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## 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
-  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
-
-
-
-
-# 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=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-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.)
-as_nl='
-'
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-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
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-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; }
-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
-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'`
-
-# 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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
-  case `echo 'x\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
-  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
-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 ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-       case $1 in
-        -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&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 xmore $as_me 1.0.1, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      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
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-xmore config.status 1.0.1
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2006 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'
-_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.
-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=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$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; }; };;
-  --help | --hel | -h )
-    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; }; } ;;
-
-  *) ac_config_targets="$ac_config_targets $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-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
-  export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
-  *) { { 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; }; };;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp=
-  trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
-  trap '{ (exit 1); 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"
-}  ||
-{
-  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.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-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
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CYGPATH_W!$CYGPATH_W$ac_delim
-PACKAGE!$PACKAGE$ac_delim
-VERSION!$VERSION$ac_delim
-ACLOCAL!$ACLOCAL$ac_delim
-AUTOCONF!$AUTOCONF$ac_delim
-AUTOMAKE!$AUTOMAKE$ac_delim
-AUTOHEADER!$AUTOHEADER$ac_delim
-MAKEINFO!$MAKEINFO$ac_delim
-install_sh!$install_sh$ac_delim
-STRIP!$STRIP$ac_delim
-INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
-mkdir_p!$mkdir_p$ac_delim
-AWK!$AWK$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-AMTAR!$AMTAR$ac_delim
-am__tar!$am__tar$ac_delim
-am__untar!$am__untar$ac_delim
-MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
-MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
-MAINT!$MAINT$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
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-PKG_CONFIG!$PKG_CONFIG$ac_delim
-TMP_XAW_CFLAGS!$TMP_XAW_CFLAGS$ac_delim
-TMP_XAW_LIBS!$TMP_XAW_LIBS$ac_delim
-XAW_USE_XPRINT_TRUE!$XAW_USE_XPRINT_TRUE$ac_delim
-XAW_USE_XPRINT_FALSE!$XAW_USE_XPRINT_FALSE$ac_delim
-XPRINT_UTIL_CFLAGS!$XPRINT_UTIL_CFLAGS$ac_delim
-XPRINT_UTIL_LIBS!$XPRINT_UTIL_LIBS$ac_delim
-XMORE_CFLAGS!$XMORE_CFLAGS$ac_delim
-XMORE_LIBS!$XMORE_LIBS$ac_delim
-APPDEFS_CFLAGS!$APPDEFS_CFLAGS$ac_delim
-APPDEFS_LIBS!$APPDEFS_LIBS$ac_delim
-appdefaultdir!$appdefaultdir$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-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
-_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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-CEOF$ac_eof
-_ACEOF
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
-LIB_MAN_SUFFIX!$LIB_MAN_SUFFIX$ac_delim
-FILE_MAN_SUFFIX!$FILE_MAN_SUFFIX$ac_delim
-MISC_MAN_SUFFIX!$MISC_MAN_SUFFIX$ac_delim
-DRIVER_MAN_SUFFIX!$DRIVER_MAN_SUFFIX$ac_delim
-ADMIN_MAN_SUFFIX!$ADMIN_MAN_SUFFIX$ac_delim
-APP_MAN_DIR!$APP_MAN_DIR$ac_delim
-LIB_MAN_DIR!$LIB_MAN_DIR$ac_delim
-FILE_MAN_DIR!$FILE_MAN_DIR$ac_delim
-MISC_MAN_DIR!$MISC_MAN_DIR$ac_delim
-DRIVER_MAN_DIR!$DRIVER_MAN_DIR$ac_delim
-ADMIN_MAN_DIR!$ADMIN_MAN_DIR$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 14; 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; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-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-2.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 <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ 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/
-s/:*$//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
-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; }; };;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$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 `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) 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; }; };;
-      esac
-      ac_file_inputs="$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."
-    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;}
-    fi
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$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" |
-    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" || { { 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; }; }; }
-  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,^\.[\\/],,'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`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/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# 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/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $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;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  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' ;;
-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
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-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" | sed -f "$tmp/subs-2.sed" >$tmp/out
-
-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;}
-
-  rm -f "$tmp/stdin"
-  case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
- ;;
-  :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;}
-    else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
-    fi
-  else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
-  fi
-  rm -f "$tmp/out12"
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $ac_file | $ac_file:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$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'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
-  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" |
-    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" || { { 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; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
- ;;
-
-  esac
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  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; }
-fi
-
diff --git a/xmore/configure.ac b/xmore/configure.ac
deleted file mode 100644 (file)
index 5c233b6..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-dnl  Copyright 2005 Red Hat, Inc.
-dnl 
-dnl  Permission to use, copy, modify, distribute, and sell this software and its
-dnl  documentation for any purpose is hereby granted without fee, provided that
-dnl  the above copyright notice appear in all copies and that both that
-dnl  copyright notice and this permission notice appear in supporting
-dnl  documentation, and that the name of Red Hat not be used in
-dnl  advertising or publicity pertaining to distribution of the software without
-dnl  specific, written prior permission.  Red Hat makes no
-dnl  representations about the suitability of this software for any purpose.  It
-dnl  is provided "as is" without express or implied warranty.
-dnl 
-dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-dnl  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-dnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-dnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-dnl  PERFORMANCE OF THIS SOFTWARE.
-dnl
-dnl Process this file with autoconf to create configure.
-
-AC_PREREQ([2.57])
-AC_INIT(xmore,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xmore)
-AM_INIT_AUTOMAKE([dist-bzip2])
-AM_MAINTAINER_MODE
-
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
-AC_PROG_INSTALL
-
-# Checks for pkg-config packages
-XAW_CHECK_XPRINT_SUPPORT(XMORE)
-if test "x$xaw_use_xprint" = "xyes" ; then
-   PKG_CHECK_MODULES(XPRINT_UTIL, xprintutil xp)
-
-   XMORE_CFLAGS="$XMORE_CFLAGS $XPRINT_UTIL_CFLAGS"
-   XMORE_LIBS="$XMORE_LIBS $XPRINT_UTIL_LIBS"
-fi
-
-AC_SUBST(XMORE_CFLAGS)
-AC_SUBST(XMORE_LIBS)
-
-PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-AC_SUBST(appdefaultdir)
-
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-
-AC_OUTPUT([Makefile])
diff --git a/xmore/depcomp b/xmore/depcomp
deleted file mode 100755 (executable)
index 04701da..0000000
+++ /dev/null
@@ -1,530 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2005-07-09.11
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
-  depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
-  DEPDIR      directory where to store dependencies.
-  depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
-  libtool     Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "depcomp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
-  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
-  # start of each line; $object doesn't have directory information.
-  # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-  stat=$?
-
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
-  # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mecanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
-  # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
-  "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # Remove any Libtool call
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    # Strip any option that makedepend may not understand.  Remove
-    # the object too, otherwise makedepend will parse it as a source file.
-    -*|$object)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
-    *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xmore/install-sh b/xmore/install-sh
deleted file mode 100755 (executable)
index 4d4a951..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--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.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
-
-    -T) no_target_directory=true
-       shift
-       continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    *)  # When -d is used, all remaining arguments are directories to create.
-       # When -t is used, the destination is already specified.
-       test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-       for arg
-       do
-          if test -n "$dstarg"; then
-           # $@ is not empty: it contains at least $arg.
-           set fnord "$@" "$dstarg"
-           shift # fnord
-         fi
-         shift # arg
-         dstarg=$arg
-       done
-       break;;
-  esac
-done
-
-if test -z "$1"; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
-       exit 1
-      fi
-      dst=$dst/`basename "$src"`
-    fi
-  fi
-
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-        '
-    IFS="${IFS-$defaultIFS}"
-
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
-
-    pathcomp=
-
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-       # mkdir can fail with a `File exist' error in case several
-       # install-sh are creating the directory concurrently.  This
-       # is OK.
-       test -d "$pathcomp" || exit
-      fi
-      pathcomp=$pathcomp/
-    done
-  fi
-
-  if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-  else
-    dstfile=`basename "$dst"`
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
-
-    # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dstdir/$dstfile"; then
-              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-              || {
-                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-        }
-    }
-  fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xmore/missing b/xmore/missing
deleted file mode 100755 (executable)
index 894e786..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# 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, 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f y.tab.h ]; then
-       echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case "$firstarg" in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case "$firstarg" in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xmore/mkinstalldirs b/xmore/mkinstalldirs
deleted file mode 100755 (executable)
index 259dbfc..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2005-06-29.22
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-errstatus=0
-dirmode=
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage"
-      exit $?
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --version)
-      echo "$0 $scriptversion"
-      exit $?
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error.  This is a problem when calling mkinstalldirs
-# from a parallel make.  We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
-  '')
-    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    else
-      # On NextStep and OpenStep, the `mkdir' command does not
-      # recognize any option.  It will interpret all options as
-      # directories to create, and then abort because `.' already
-      # exists.
-      test -d ./-p && rmdir ./-p
-      test -d ./--version && rmdir ./--version
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-       test ! -d ./--version; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    else
-      # Clean up after NextStep and OpenStep mkdir.
-      for d in ./-m ./-p ./--version "./$dirmode";
-      do
-        test -d $d && rmdir $d
-      done
-    fi
-    ;;
-esac
-
-for file
-do
-  case $file in
-    /*) pathcomp=/ ;;
-    *)  pathcomp= ;;
-  esac
-  oIFS=$IFS
-  IFS=/
-  set fnord $file
-  shift
-  IFS=$oIFS
-
-  for d
-  do
-    test "x$d" = x && continue
-
-    pathcomp=$pathcomp$d
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-       errstatus=$lasterr
-      else
-       if test ! -z "$dirmode"; then
-         echo "chmod $dirmode $pathcomp"
-         lasterr=
-         chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-         if test ! -z "$lasterr"; then
-           errstatus=$lasterr
-         fi
-       fi
-      fi
-    fi
-
-    pathcomp=$pathcomp/
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/xmore/print.c b/xmore/print.c
deleted file mode 100644 (file)
index fbb260b..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * $Xorg: print.c,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#define Log(x)   { if(True) printf x; }
-
-#ifdef XEDIT
-#include "xedit.h"
-#endif /* XEDIT */
-#include "print.h"
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/AsciiText.h> 
-#include <stdio.h>
-#include <stdlib.h>
-
-static Widget
-CreatePrintShell(Widget    videoshell,
-                 Screen   *pscreen,
-                 Visual   *pvisual,
-                 String    printshell_name,
-                 ArgList   args,
-                 Cardinal  numargs)
-{
-    String   videoname,
-             videoclass;
-    Widget   pappshell,
-             printshell;
-    Display *pdpy = XDisplayOfScreen(pscreen);
-    int      dummyc = 0;
-    String   dummys = "";
-    Cardinal shell_n;
-    Arg      shell_args[5];
-
-    XtGetApplicationNameAndClass(XtDisplay(videoshell), 
-                                 &videoname, &videoclass);
-
-    /* XXX: Why is the |dummyc|&&|dummys| stuff needed here ? */
-    XtDisplayInitialize(XtWidgetToApplicationContext(videoshell), pdpy,
-                        videoname, videoclass,
-                        NULL, 0,
-                        &dummyc, &dummys);
-
-    shell_n = 0;
-    XtSetArg(shell_args[shell_n], XtNscreen, pscreen); shell_n++;
-    if (pvisual) {
-        XtSetArg(shell_args[shell_n], XtNvisual, pvisual); shell_n++;
-    }
-    pappshell = XtAppCreateShell(videoname, videoclass,
-                                   applicationShellWidgetClass,
-                                   pdpy,
-                                   shell_args, shell_n);
-    printshell = XtCreatePopupShell(printshell_name,
-                                    xawPrintShellWidgetClass,
-                                    pappshell, args, numargs);
-                                
-
-    /* we're mapping/unmapping at start/end page time */
-    XtSetMappedWhenManaged(printshell, False);
-
-    /* We realise the widget when we're done with building the widget tree... */
-    
-    return printshell;
-}
-
-typedef struct
-{
-  const char       *programname;
-  Widget            toplevel;
-  Bool              isPrinting;
-  Widget            printshell;
-  struct
-  {
-      Widget  form;
-      Widget  pageheaderlabel;
-      Widget  text;
-  } content; /* content to print */
-  int               numpages;
-  Display          *pdpy;
-  Screen           *pscreen;
-  XPContext         pcontext;
-  XtCallbackProc    pdpyDestroyCallback;
-  void             *printtofile_handle;
-  const char       *jobtitle;
-} AppPrintData;
-
-static AppPrintData  apdx;
-static AppPrintData *apd = &apdx;
-
-/* Count pages in a text widget
- * WARNING: This will reset the current position of the text widget
- * back to the beginning */
-static
-long CountPages(Widget textWidget)
-{
-    long numpages = 0;
-
-    XawTextPosition prevpagepos = -1,
-                    currpos = 0;        
-
-    /* Move to the top of the file... */
-    XtCallActionProc(textWidget, "beginning-of-file", NULL, NULL, 0);
-    
-    /* ... count pages ...*/
-    do
-    {
-        prevpagepos = XawTextTopPosition(textWidget);
-        XtCallActionProc(textWidget, "next-page", NULL, NULL, 0);        
-        currpos     = XawTextTopPosition(textWidget);
-        numpages++;
-    } while(prevpagepos != currpos);            
-
-    /* ... and move to the top of the file... */
-    XtCallActionProc(textWidget, "beginning-of-file", NULL, NULL, 0);
-    
-    Log(("CountPages() found %ld pages.\n", numpages))
-
-    return numpages;
-}
-
-static void 
-PageSetupCB(Widget widget, XtPointer client_data, XtPointer call_data)
-{
-    Widget                       pshell = widget;
-    XawPrintShellCallbackStruct *psp    = (XawPrintShellCallbackStruct *)call_data;
-    AppPrintData                *p      = (AppPrintData *)client_data;
-   
-    Log(("--> PageSetupCB\n"));
-
-    if (!psp->last_page_in_job) {
-        int  currpage;
-        char buffer[256];
-
-        XtVaGetValues(pshell, XawNcurrPageNumInJob, &currpage, NULL);
-
-        sprintf(buffer, "Title: %s / Page: %d/%d", p->jobtitle, currpage, p->numpages);
-        XtVaSetValues(apd->content.pageheaderlabel, XtNlabel, buffer, NULL);
-
-        /* Note: XawPrintShell's pagecount starts with '1'
-         * (=first page is page no. '1') */
-        if (currpage > 1) {
-            Log(("pagedown %d\n", currpage));
-            XtCallActionProc(p->content.text, "next-page", NULL, NULL, 0);
-        }
-        else
-        {
-            Log(("first page\n"));
-        }              
-      
-        if (currpage >= p->numpages) {
-            psp->last_page_in_job = True;
-        }
-    }
-}
-
-static
-void FinishPrinting(AppPrintData *p)
-{
-    char *scr;
-
-    if (p->printtofile_handle) {
-        if (XpuWaitForPrintFileChild(p->printtofile_handle) != XPGetDocFinished) {
-            PrintMsg(("Error while printing to file.\n"));
-        }
-        p->printtofile_handle = NULL;
-    }
-    
-    /* Job completed, check if there are any messages from the spooler command */
-    scr = XpGetOneAttribute(p->pdpy, p->pcontext, XPJobAttr, "xp-spooler-command-results");
-    if( scr )
-    {
-      if( strlen(scr) > 0 )
-      {
-        const char *msg = XpuCompoundTextToXmb(p->pdpy, scr);
-        if( msg )
-        {
-          PrintMsg(("Spooler command returned:\n%s", msg));
-          XpuFreeXmbString(msg);
-        }
-        else
-        {
-          PrintMsg(("Spooler command returned (unconverted):\n%s", scr));
-        }
-      }
-
-      XFree((void *)scr);
-    }
-    
-    if (p->printshell) {
-        XtDestroyWidget(p->printshell);
-        p->printshell = NULL;
-    }
-  
-    /* Two issues here:
-     * 1. The print display connection is owned by the print dialog
-     *    To avoid any problems with that use a callback back to the main
-     *    application which calls
-     *    |XawPrintDialogClosePrinterConnection(w, False)| to ask the
-     *    print dialog widget to close all print display resources and
-     *    disown the object.
-     * 2. We have to use XpDestroyContext() and XtCloseDisplay()
-     *    instead of XpuClosePrinterDisplay() to make libXt happy...
-     *
-     * Call callback... */
-    (*apd->pdpyDestroyCallback)(NULL, NULL, NULL); /* HACK! */
-
-    /* ... and then get rid of the display */
-    if (p->pcontext != None) {
-        XpDestroyContext(p->pdpy, p->pcontext);
-    }
-    XtCloseDisplay(p->pdpy);
-
-    p->toplevel   = NULL;
-    p->isPrinting = False;
-    p->pdpy       = NULL;
-    p->pscreen    = NULL;
-    p->pcontext   = None;
-}
-
-static
-void PrintEndJobCB(Widget pshell, XtPointer client_data, XtPointer call_data)
-{
-    AppPrintData *p = (AppPrintData *)client_data;
-
-    Log(("--> PrintEndJobCB\n"));
-
-    /* Finish printing and destroy print shell (it's legal to destroy Xt
-     * widgets from within it's own callbacks) */
-    FinishPrinting(p);
-}
-
-static
-XFontSet GetPrintTextFontSet(const char *appname, Display *pdpy, long dpi_x, long dpi_y)
-{
-    XFontSet     fontset;
-    char         fontname[1024];
-    char       **missing_charset_list_return;
-    int          missing_charset_count_return;
-    char        *def_string_return;
-    int          i;
-    
-    sprintf(fontname, /* Default font for CDE */
-                      "-dt-interface user-medium-r-normal-s*-*-120-%ld-%ld-*-*,"
-                      /* Default font */
-                      "-adobe-courier-medium-r-normal--*-120-%ld-%ld-*-*,"
-                      /* Default font for Linux/Japanese locales (ja_JP.SJIS) */
-                      "-watanabe-mincho-medium-r-normal--*-120-%ld-%ld-*-*,"
-                      "-wadalab-gothic-medium-r-normal--*-120-%ld-%ld-*-*,"
-                      /* Fallback */
-                      "-*-*-*-*-*--*-120-%ld-%ld-*-*",
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y,
-                      dpi_x, dpi_y);
-    fontset = XCreateFontSet(pdpy, fontname,
-                             &missing_charset_list_return,
-                             &missing_charset_count_return,
-                             &def_string_return);
-
-    for( i=0 ; i < missing_charset_count_return ; i++ ) {
-        fprintf(stderr, "%s: warning: font for charset %s is lacking.\n",
-                appname, missing_charset_list_return[i]);
-    }
-
-    if (!fontset)
-        Error(("GetPrintTextFontSet: XCreateFontSet() failure.\n"));
-    return fontset;
-}
-
-void DoPrintTextSource(const char *programname,
-                       Widget textsource, Widget toplevel,
-                       Display *pdpy, XPContext pcontext,
-                       XpuColorspaceRec *colorspace,
-                       XtCallbackProc pdpyDestroyCB,
-                       const char *jobtitle, const char *toFile)
-{
-    long               dpi_x = 0L,
-                       dpi_y = 0L;
-    int                n;
-    Arg                args[20];
-    XFontSet           textfontset = NULL;
-    XFontSetExtents   *font_extents;
-    
-    apd->programname         = programname;
-    apd->pdpyDestroyCallback = pdpyDestroyCB;
-  
-    if (apd->isPrinting) {
-        PrintMsg(("Already busy with printing.\n"));
-        return;
-    } 
-        
-    /* Configure the print context (paper size, title etc.)
-     * We must do this before creating any Xt widgets - otherwise they will
-     * make wrong assuptions about fonts, resultions etc. ...
-     */
-    XpuSetJobTitle(pdpy, pcontext, jobtitle);
-    
-    /* Configuration done, set the context */
-    XpSetContext(pdpy, pcontext);   
-
-    /* Get default printer resolution */   
-    if (XpuGetResolution(pdpy, pcontext, &dpi_x, &dpi_y) != 1) {
-        PrintMsg(("No default resolution for printer.\n"));
-        XpuClosePrinterDisplay(pdpy, pcontext);
-        return;
-    }
-    
-    apd->toplevel = toplevel;
-    apd->pdpy     = pdpy;
-    apd->pcontext = pcontext;
-    apd->pscreen  = XpGetScreenOfContext(pdpy, pcontext);
-    apd->jobtitle = jobtitle;
-
-    n = 0;
-    /* Override any geometry resource settings as XawPrintShell adjusts it's size
-     * to the current page siue when |XawPrintLAYOUTMODE_DRAWABLEAREA| or
-     * |XawPrintLAYOUTMODE_PAGESIZE| are used. */
-    XtSetArg(args[n], XtNgeometry,    "+0+0");                          n++;
-    XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
-    if (colorspace) {
-        printf("Setting visual to id=0x%lx.\n", colorspace->visualinfo.visualid);
-    }
-    apd->printshell = CreatePrintShell(toplevel, apd->pscreen, 
-                                       (colorspace?(colorspace->visualinfo.visual):(NULL)),
-                                       "printshell", args, n);
-    n = 0;
-    XtSetArg(args[n], XtNresizable,            True);            n++;
-    XtSetArg(args[n], XtNright,                XtChainRight);    n++;
-    apd->content.form = XtCreateManagedWidget("form", formWidgetClass, apd->printshell, args, n);
-
-    textfontset = GetPrintTextFontSet(apd->programname, pdpy, dpi_x, dpi_y);
-
-    n = 0;
-    XtSetArg(args[n], XtNinternational,        True);            n++;
-    XtSetArg(args[n], XtNfromHoriz,            NULL);            n++;
-    XtSetArg(args[n], XtNfromVert,             NULL);            n++;
-    XtSetArg(args[n], XtNtop,                  XtChainTop);      n++;
-    XtSetArg(args[n], XtNright,                XtChainRight);    n++;
-    XtSetArg(args[n], XtNresizable,            True);            n++;
-    XtSetArg(args[n], XtNfontSet,              textfontset);     n++;
-    XtSetArg(args[n], XtNlabel,                "Page: n/n");     n++;
-    XtSetArg(args[n], XtNjustify,              XtJustifyRight);  n++;
-    apd->content.pageheaderlabel = XtCreateManagedWidget("pageinfo", labelWidgetClass, apd->content.form, args, n);
-
-    font_extents = XExtentsOfFontSet(textfontset);
-
-    n = 0;
-    XtSetArg(args[n], XtNinternational,    True);                         n++;
-    XtSetArg(args[n], XtNtextSource,       textsource);                   n++;
-    XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollNever);           n++;
-    XtSetArg(args[n], XtNscrollVertical,   XawtextScrollNever);           n++;
-
-/* Usually I would expect that using |XtNfromVert, apd->content.pageheaderlabel|
- * would be the correct way to place the text widget with the main content below
- * the page header widget - but for an unknown reason this doesn not work: The
- * text widget squishes itself into the bottom half of the page and only occupies
- * 1/2 of the page's with... ;-(( */
-#define WORKAROUND_FOR_SOMETHING_IS_WRONG 1
-#ifdef WORKAROUND_FOR_SOMETHING_IS_WRONG
-    XtSetArg(args[n], XtNtop,              XtChainTop);                   n++;
-    XtSetArg(args[n], XtNright,            XtChainRight);                 n++;
-    XtSetArg(args[n], XtNvertDistance,     (font_extents->max_logical_extent.height+2)*2); n++;    
-#else
-    XtSetArg(args[n], XtNfromHoriz,        NULL);                         n++;
-    XtSetArg(args[n], XtNfromVert,         apd->content.pageheaderlabel); n++;
-#endif
-    XtSetArg(args[n], XtNfontSet,          textfontset);                  n++;
-    apd->content.text = XtCreateManagedWidget("text", asciiTextWidgetClass, apd->content.form, args, n);
-
-    /* Disable the caret - that is not needed for printing */
-    XawTextDisplayCaret(apd->content.text, False);
-    
-    XtAddCallback(apd->printshell, XawNpageSetupCallback, PageSetupCB,   (XtPointer)apd);
-    XtAddCallback(apd->printshell, XawNendJobCallback,    PrintEndJobCB, (XtPointer)apd);
-
-    /* Realise print shell (which will set position+size of the child
-     * widgets based on the current page size) */
-    XtRealizeWidget(apd->printshell);
-    
-    /* Count number of pages in the text widget */
-    apd->numpages = CountPages(apd->content.text);
-
-    /* Make sure that the Xt machinery is really using the right screen (assertion) */
-    if (XpGetScreenOfContext(XtDisplay(apd->printshell), apd->pcontext) != XtScreen(apd->printshell))
-        Error(("Widget's screen != print screen. BAD.\n"));
-
-    apd->isPrinting = True;
-
-    if (toFile) {
-        PrintMsg(("Printing to file '%s'...\n", toFile));
-        apd->printtofile_handle = XpuStartJobToFile(pdpy, pcontext, toFile);
-        if (!apd->printtofile_handle) {
-            perror("XpuStartJobToFile failure");
-            PrintMsg(("Printing failed: XpuStartJobToFile\n"));
-            apd->isPrinting = False;
-            return;
-        }
-    }
-    else
-    {
-        PrintMsg(("Printing to printer...\n"));
-        XpuStartJobToSpooler(pdpy);
-    }
-}
-
-
diff --git a/xmore/print.h b/xmore/print.h
deleted file mode 100644 (file)
index a87779c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * $Xorg: print.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef XMORE_PRINT_H
-#define XMORE_PRINT_H 1
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Print.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/XprintUtil/xprintutil.h>
-
-#if defined(XMORE)
-#define PrintMsg(x) { printf("xmore: "); printf x ; }
-#elif defined(XEDIT)
-#define PrintMsg(x) { XeditPrintf x ; }
-#else
-#error unknown application
-#endif 
-
-/* Prototypes */
-void DoPrintTextSource(const char *programname,
-                       Widget textsource,
-                       Widget toplevel, 
-                       Display *pdpy, XPContext pcontext,
-                       XpuColorspaceRec *colorspace,
-                       XtCallbackProc printDisplayDestroyCallback,
-                       const char *jobTitle,
-                       const char *toFile);
-
-#endif /* !XMORE_PRINT_H */
diff --git a/xmore/printdialog.c b/xmore/printdialog.c
deleted file mode 100644 (file)
index 50d2a88..0000000
+++ /dev/null
@@ -1,1396 +0,0 @@
-/*
- * $Xorg: printdialog.c,v 1.1 2004/05/12 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-/* Force ANSI C prototypes from X11 headers */
-#ifndef FUNCPROTO 
-#define FUNCPROTO 15
-#endif /* !FUNCPROTO */
-
-#include <X11/StringDefs.h> 
-#include <X11/Intrinsic.h> 
-#include <X11/Shell.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Dialog.h>
-
-#ifdef XKB
-#include <X11/extensions/XKBbells.h>
-#endif /* XKB */
-
-#ifdef XEDIT
-#include "xedit.h"
-#endif /* XEDIT */
-#include "printdialog.h"
-#include "printdialogprivates.h"
-#include "print.h"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdio.h>
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#ifdef DEBUG
-#  define Log(x)   { if(True)  printf x; }
-#else
-#  define Log(x)   { if(False) printf x; }
-#endif /* DEBUG */
-
-/* Local prototypes */
-static void     do_beep(PrintDialogWidget pdw);
-static void     center_popup(Widget parent, Widget popup);
-static void     updateWidgetStates(PrintDialogWidget pdw);
-static void     printSetupClose(PrintDialogWidget pdw);
-static void     printSetupOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSetupCancelXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSetupJobCopiesXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printDialogDestXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSelectFileXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSetupXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printFileSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     buildFileDialog(PrintDialogWidget pdw);
-static void     closePrinterConnection(PrintDialogWidget  pdw, Bool closeDisplay);
-static Bool     openPrinterConnection(PrintDialogWidget  pdw);
-static void     destroyPrintSetupDialog(PrintDialogWidget pdw);
-static Widget   buildPrintSetupDialog(PrintDialogWidget pdw);
-static String  *xpprinterlist_to_widget_printerlist(XPPrinterList printerlist, int num_printers);
-static String  *xppaperlist_to_widget_paperlist(XpuMediumSourceSizeList paperlist, int num_papers);
-static String  *xpresolutionlist_to_widget_resolutionlist(XpuResolutionList reslist, int num_resolutions);
-static String  *xporientationlist_to_widget_orientationlist(XpuOrientationList orientationlist, int num_orientations);
-static String  *xpplexlist_to_widget_plexlist(XpuPlexList plexlist, int num_plex);
-static String  *xpcolorspacelist_to_widget_colorspacelist(XpuColorspaceList colorspacelist, int num_colorspaces);
-static void     printerSelectionPrinterSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printSelectPrinterXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printerSelectionClose(PrintDialogWidget  pdw);
-static void     printerSelectionOKXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static void     printerSelectionCancelXtProc(Widget w, XtPointer client_data, XtPointer callData);
-static Bool     buildPrinterSelectionDialog(PrintDialogWidget  pdw);
-static void     destroyPrinterSelectionDialog(PrintDialogWidget pdw);
-static void     createprintdialogchildren(Widget w);
-
-static
-void do_beep(PrintDialogWidget pdw)
-{
-    Log(("*** Beep!\n"));
-#ifdef XKB
-    XkbStdBell(XtDisplay((Widget)pdw), XtWindow((Widget)pdw), 0, XkbBI_MinorError);
-#else
-    XBell(XtDisplay((Widget)pdw), 0);
-#endif /* XKB */
-}
-
-/* Center popup (on parent, not on screen - which would be a bad idea
- * in the Xinerama case) */
-static
-void center_popup(Widget parent, Widget popup)
-{
-    Dimension width,
-              height;
-    Position  x,
-              y;
-
-    XtVaGetValues(parent,
-        XtNx,  &x,
-        XtNy,  &y,
-        NULL);
-    XtVaGetValues(popup,
-        XtNwidth,  &width,
-        XtNheight, &height,
-        NULL);
-
-    x += (Position)width  / 2;
-    y += (Position)height / 3;
-
-    XtVaSetValues(popup,
-        XtNx, x,
-        XtNy, y,
-        NULL);
-}
-
-static
-void updateWidgetStates(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-    
-    /* Do not update anything if we will be destroyed */
-    if (pdw->core.being_destroyed)
-        return;
-
-    if (pdp->printToFile == False) {  
-        XtVaSetValues(pdp->main.printtoprinter, XtNstate,     True,  NULL);
-        XtVaSetValues(pdp->main.printtofile,    XtNstate,     False, NULL);
-        /* Disable the widgets which depend on print-to-file */
-        XtVaSetValues(pdp->main.filenamelabel,  XtNsensitive, False, NULL);
-        XtVaSetValues(pdp->main.filename,       XtNsensitive, False, NULL);
-        XtVaSetValues(pdp->main.selectfile,     XtNsensitive, False, NULL);
-    }
-    else
-    {
-        XtVaSetValues(pdp->main.printtoprinter, XtNstate, False, NULL);
-        XtVaSetValues(pdp->main.printtofile,    XtNstate, True,  NULL);
-        /* Enable the widgets which depend on print-to-file */
-        XtVaSetValues(pdp->main.filenamelabel,  XtNsensitive, True, NULL);
-        XtVaSetValues(pdp->main.filename,       XtNsensitive, True, NULL);
-        XtVaSetValues(pdp->main.selectfile,     XtNsensitive, True, NULL);
-    }
-
-    /* Update file name */
-    XtVaSetValues(pdp->main.filename, XtNlabel, pdp->filename?pdp->filename:"-", NULL);
-    
-    /* General check whether we can print... */
-    pdp->canPrint = True;
-    if (pdp->printer_name == NULL) {
-        pdp->canPrint = False;
-    }
-    else if (strlen(pdp->printer_name) == 0) {
-        pdp->canPrint = False;
-    }
-
-    pdp->canReallyPrint = pdp->canPrint;
-
-    /* Some extra checks for print-to-file */
-    if (pdp->printToFile) {
-        if (pdp->filename == NULL) {
-            pdp->canReallyPrint = False;
-        }
-        else if (strlen(pdp->filename) == 0) {
-            pdp->canReallyPrint = False;
-        }
-    }
-
-    XtVaSetValues(pdp->main.ok,    XtNsensitive, pdp->canReallyPrint, NULL);
-    XtVaSetValues(pdp->main.setup, XtNsensitive, pdp->canPrint,       NULL);
-}
-
-static void
-printSetupClose(PrintDialogWidget pdw)
-{ 
-    PrintDialogPart *pdp = &pdw->printdialog;
-    if (pdp->setup.popup) {
-        XtPopdown(pdp->setup.popup);
-    }
-}
-
-static void
-printSetupOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget    pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart     *pdp = &pdw->printdialog;
-    char                *s;
-    XawListReturnStruct *lrs;    
-    Log(("## printSetupOK: closing print setup!\n"));
-    
-    /* Set copy count (if the value is invalid beep and return to the user ) */
-    XtVaGetValues(pdp->setup.jobcopies, XtNstring, &s, NULL);
-    if (s) {
-        int c = atoi(s);
-        if (c < 1 || c > 999) {
-            do_beep(pdw);
-            XtVaSetValues(pdp->setup.jobcopies, XtNstring, "1", NULL);
-            Log(("## printSetupOKXtProc: not a valid copy count value\n"));
-            return;
-        }
-        
-        /* Fix me: We should set the number of _job_ copies here, not _doc_ copies */
-        XpuSetDocumentCopies(pdp->pdpy, pdp->pcontext, c);
-    }
-    
-    /* Set paper size */
-    lrs = XawListShowCurrent(pdp->setup.paperlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected paper is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_papers, (("Error: lrs->list_index < pdp->num_papers\n")));
-        XpuSetDocMediumSourceSize(pdp->pdpy, pdp->pcontext, &pdp->paperlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set resolution */
-    lrs = XawListShowCurrent(pdp->setup.resolutionlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected resolution is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_resolutions, (("Error: lrs->list_index < pdp->num_resolutions\n")));
-        XpuSetDocResolution(pdp->pdpy, pdp->pcontext, &pdp->resolutionlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set orientation */
-    lrs = XawListShowCurrent(pdp->setup.orientationlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected orientation is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_orientations, (("Error: lrs->list_index < pdp->num_orientations\n")));
-        XpuSetDocOrientation(pdp->pdpy, pdp->pcontext, &pdp->orientationlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set plex mode */
-    lrs = XawListShowCurrent(pdp->setup.plexlist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected plex is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_plex, (("Error: lrs->list_index < pdp->num_plex\n")));
-        XpuSetDocPlex(pdp->pdpy, pdp->pcontext, &pdp->plexlist[lrs->list_index]);
-    }
-    XtFree((char *)lrs);
-
-    /* Set colorspace */
-    lrs = XawListShowCurrent(pdp->setup.colorspacelist);
-    if (lrs->list_index != XAW_LIST_NONE) {
-        Log(("selected colorspace is '%s'/'%d'\n", lrs->string, lrs->list_index));
-        Assertion(lrs->list_index < pdp->num_colorspaces, (("Error: lrs->list_index < pdp->num_colorspaces\n")));
-        pdp->selected_colorspace = &pdp->colorspacelist[lrs->list_index];
-    }
-    XtFree((char *)lrs);
-    
-    printSetupClose(pdw);
-}
-
-static void
-printSetupCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    Log(("## printSetupCancel: closing print setup!\n"));
-
-    printSetupClose(pdw);
-}
-
-static void
-printSetupJobCopiesXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget pdw    = (PrintDialogWidget)client_data;
-    PrintDialogPart  *pdp    = &pdw->printdialog;
-    char             *string = NULL;
-    
-    Log(("## printSetupJobCopiesXtProc!\n"));
-
-    /* Check whether the input is a valid number - and in the case of invalid input reset the value */    
-    XtVaGetValues(pdp->setup.jobcopies, XtNstring, &string, NULL);
-    if (string) {
-        char *s;
-        int   i;
-        Bool  isValidNumber = True;
-
-        /* First check for invalid characters... */
-        for( s = string ; *s != '\0' ; s++ ) {
-            if (!isdigit(*s)) {
-                isValidNumber = False;
-                break;
-            }
-        }
-        
-        /* .. and the do a range check... */
-        i = atoi(string);
-        if (i < 1 || i > 999) {
-            isValidNumber = False;
-        }
-        
-        if (!isValidNumber) {
-            do_beep(pdw);
-            XtVaSetValues(pdp->setup.jobcopies, XtNstring, "1", NULL);
-            Log(("## printSetupJobCopiesXtProc: not a valid number\n"));
-        }
-    }
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart  *pdp = &pdw->printdialog;
-
-    printSetupClose(pdw);
-
-    if (pdp->cancel_callback) {
-        Log(("printCancelXtProc: calling callback\n"));
-        XtCallCallbackList((Widget)pdw, pdp->cancel_callback, NULL);
-    }
-}
-
-static void
-printDialogDestXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-
-    if (w == pdp->main.printtoprinter) {  
-        pdp->printToFile = False;
-    }
-    else if (w == pdp->main.printtofile) {
-        pdp->printToFile = True;
-    }
-    else
-    {
-        Log(("printDialogDestXtProc: ERROR: Unknown widget.\n"));
-    }
-
-    updateWidgetStates(pdw);
-}
-
-static void
-printSelectFileXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget   pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart    *pdp = &pdw->printdialog;
-
-    Log(("## printSelectFileXtProc!\n"));
-
-    if (!pdp->selectFile.shell) {
-        buildFileDialog(pdw);
-    }
-    
-    center_popup((Widget)pdw, pdp->selectFile.shell);
-
-    XtPopup(pdp->selectFile.shell, XtGrabExclusive);
-}
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-    Log(("## printing!\n"));
-    
-    if (!pdp->pdpy) {
-        Log(("printOKXtProc: no printer connection, opening one....\n"));
-        openPrinterConnection(pdw);
-
-        if (!pdp->pdpy) {
-            Log(("printOKXtProc: still no printer connection - BAD (this should never happen).\n"));
-            do_beep(pdw);
-            return;
-        }
-    }    
-
-    if (pdp->ok_callback) {
-        XawPrintDialogCallbackStruct pdcs;
-
-        Log(("printOKXtProc: calling callbacks...\n"));
-        memset(&pdcs, 0, sizeof(pdcs));
-        pdcs.pdpy            = pdp->pdpy;
-        pdcs.pcontext        = pdp->pcontext;
-        pdcs.printToFile     = pdp->printToFile;
-        pdcs.printToFileName = (const char *)pdp->filename;
-        pdcs.colorspace      = pdp->selected_colorspace;
-        XtCallCallbackList((Widget)pdw, pdp->ok_callback, &pdcs);
-    }
-
-    printSetupClose(pdw);
-}
-
-static void
-printSetupXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget   pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart    *pdp = &pdw->printdialog;
-
-    Log(("## setup!\n"));
-
-    if (!pdp->setup.popup) {
-        if (buildPrintSetupDialog(pdw) == NULL) {
-            Log(("printSetupXtProc: buildPrintSetupDialog failure.\n"));
-            return;
-        }
-    }
-
-    center_popup((Widget)pdw, pdp->setup.popup);
-
-    XtPopup(pdp->setup.popup, XtGrabExclusive);
-}
-
-static void
-printFileSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-    const char        *filename;
-    
-    Log(("printFileSelectedXtProc: User selected file.\n"));
-    filename = XawDialogGetValueString(pdp->selectFile.dialog);
-    
-    if (pdp->filename)
-        free(pdp->filename);
-    pdp->filename = strdup(filename);
-    
-    XtPopdown(pdp->selectFile.shell);
-    
-    updateWidgetStates(pdw);
-}
-
-static
-void buildFileDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-    int              n;
-    Arg              args[20];
-
-    pdp->selectFile.shell = XtCreatePopupShell("selectfile",
-                                               transientShellWidgetClass,
-                                               (Widget)pdw, NULL, 0);
-    n = 0;
-    XtSetArg(args[n], XtNvalue, pdp->filename?pdp->filename:""); n++;  
-    pdp->selectFile.dialog = XtCreateManagedWidget("dialog", dialogWidgetClass,
-                                                   pdp->selectFile.shell, args, n);
-    XawDialogAddButton(pdp->selectFile.dialog, "Accept", printFileSelectedXtProc, pdw);
-
-    XtRealizeWidget(pdp->selectFile.shell);
-}
-
-static
-void closePrinterConnection(PrintDialogWidget pdw, Bool closeDisplay)
-{ 
-    PrintDialogPart *pdp = &pdw->printdialog;
-    
-    Log(("# closePrinterConnection\n"));
-
-    destroyPrintSetupDialog(pdw);
-
-    if (pdp->paperlist) {
-        XpuFreeMediumSourceSizeList(pdp->paperlist);
-        pdp->paperlist = NULL;
-    }
-
-    if (pdp->widget_paperlist) {
-        free(pdp->widget_paperlist);
-        pdp->widget_paperlist = NULL;
-    }
-
-    if (pdp->resolutionlist) {
-        XpuFreeResolutionList(pdp->resolutionlist);
-        pdp->resolutionlist = NULL;
-    }
-
-    if (pdp->widget_resolutionlist) {
-        free(pdp->widget_resolutionlist);
-        pdp->widget_resolutionlist = NULL;
-    }
-
-
-    if (pdp->orientationlist) {
-        XpuFreeOrientationList(pdp->orientationlist);
-        pdp->orientationlist = NULL;
-    }  
-
-    if (pdp->widget_orientationlist) {
-        free(pdp->widget_orientationlist);
-        pdp->widget_orientationlist = NULL;
-    }
-
-    if (pdp->plexlist) {
-        XpuFreePlexList(pdp->plexlist);
-        pdp->plexlist = NULL;
-    }  
-
-    if (pdp->widget_plexlist) {
-        free(pdp->widget_plexlist);
-        pdp->widget_plexlist = NULL;
-    }
-
-    if (pdp->colorspacelist) {
-        XpuFreeColorspaceList(pdp->colorspacelist);
-        pdp->colorspacelist = NULL;
-    }  
-
-    if (pdp->widget_colorspacelist) {
-        free(pdp->widget_colorspacelist);
-        pdp->widget_colorspacelist = NULL;
-    }
-    pdp->selected_colorspace = NULL;
-
-    if (pdp->pdpy) {
-        if (closeDisplay) {
-            XpuClosePrinterDisplay(pdp->pdpy, pdp->pcontext);
-        }
-        pdp->pdpy     = NULL;
-        pdp->pcontext = None;
-    }
-
-    updateWidgetStates(pdw);
-}
-
-static
-Bool openPrinterConnection(PrintDialogWidget pdw)
-{
-    PrintDialogPart   *pdp = &pdw->printdialog;
-
-    Log(("# openPrinterConnection\n"));
-
-    /* Close any outstanding connection first... */
-    closePrinterConnection(pdw, True);
-
-    if (!pdp->printer_name) {
-        Log(("# error: openPrinterConnection: No printer name.\n"));
-        return False;
-    }
-
-    if (XpuGetPrinter(pdp->printer_name, &pdp->pdpy, &pdp->pcontext) == False) {
-        Log(("openPrinterConnection: could not open printer.\n"));
-        return False;
-    }
-
-    pdp->paperlist       = XpuGetMediumSourceSizeList(pdp->pdpy, pdp->pcontext, &pdp->num_papers);
-    pdp->resolutionlist  =       XpuGetResolutionList(pdp->pdpy, pdp->pcontext, &pdp->num_resolutions);
-    pdp->orientationlist =      XpuGetOrientationList(pdp->pdpy, pdp->pcontext, &pdp->num_orientations);
-    pdp->plexlist        =             XpuGetPlexList(pdp->pdpy, pdp->pcontext, &pdp->num_plex);  
-    pdp->colorspacelist  =       XpuGetColorspaceList(pdp->pdpy, pdp->pcontext, &pdp->num_colorspaces);  
-
-    pdp->widget_paperlist       = xppaperlist_to_widget_paperlist(pdp->paperlist, pdp->num_papers);
-    pdp->widget_resolutionlist  = xpresolutionlist_to_widget_resolutionlist(pdp->resolutionlist, pdp->num_resolutions);
-    pdp->widget_orientationlist = xporientationlist_to_widget_orientationlist(pdp->orientationlist, pdp->num_orientations);
-    pdp->widget_plexlist        = xpplexlist_to_widget_plexlist(pdp->plexlist, pdp->num_plex);
-    pdp->widget_colorspacelist  = xpcolorspacelist_to_widget_colorspacelist(pdp->colorspacelist, pdp->num_colorspaces);
-
-    updateWidgetStates(pdw);
-
-    return True;
-}
-
-#undef DEFAULT_WIDTH
-#define DEFAULT_WIDTH 120
-#undef DEFAULT_INFOLABEL_WIDTH
-#define DEFAULT_INFOLABEL_WIDTH 250
-
-static
-void destroyPrintSetupDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-
-    if (pdp->setup.popup) {
-        XtDestroyWidget(pdp->setup.popup);
-    }
-
-    /* |XtDestroyWidget(pdp->setup.popup);| above will recursively destroy
-     * all children so we only have to reset the pointers here... */
-    pdp->setup.popup            = NULL;
-    pdp->setup.form             = NULL;
-    pdp->setup.paperlist        = NULL;
-    pdp->setup.resolutionlist   = NULL;
-    pdp->setup.orientationlist  = NULL;
-    pdp->setup.plexlist         = NULL;
-    pdp->setup.colorspacelist   = NULL;
-    pdp->setup.ok               = NULL;
-    pdp->setup.cancel           = NULL;
-}
-
-static
-Widget buildPrintSetupDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart  *pdp = &pdw->printdialog;
-    int               n;
-    Arg               args[20];
-    Widget            listform;
-    XpuSupportedFlags jobflags,
-                      docflags;
-    Bool              canChangeJobCopies,
-                      canChangePaperSize,
-                      canChangeResolution,
-                      canChangeOrientation,
-                      canChangePlex;
-
-    if (!pdp->pdpy) {
-        Log(("buildPrintSetupDialog: no printer connection, opening one....\n"));
-        openPrinterConnection(pdw);
-
-        if (!pdp->pdpy) {
-            Log(("buildPrintSetupDialog: still no printer connection - BAD.\n"));
-            do_beep(pdw);
-            return NULL;
-        }
-    }
-
-    /* Get flags which types of attributes can be modified */
-    jobflags = XpuGetSupportedDocAttributes(pdp->pdpy, pdp->pcontext);
-    docflags = XpuGetSupportedDocAttributes(pdp->pdpy, pdp->pcontext);
-    canChangeJobCopies   = (jobflags & XPUATTRIBUTESUPPORTED_COPY_COUNT) == XPUATTRIBUTESUPPORTED_COPY_COUNT;
-    canChangePaperSize   = (docflags & XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM) == XPUATTRIBUTESUPPORTED_DEFAULT_MEDIUM;
-    canChangeResolution  = (docflags & XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION) == XPUATTRIBUTESUPPORTED_DEFAULT_PRINTER_RESOLUTION;
-    canChangeOrientation = (docflags & XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION) == XPUATTRIBUTESUPPORTED_CONTENT_ORIENTATION;
-    canChangePlex        = (docflags & XPUATTRIBUTESUPPORTED_PLEX) == XPUATTRIBUTESUPPORTED_PLEX;
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    pdp->setup.popup = XtCreatePopupShell("setup", transientShellWidgetClass, (Widget)pdw, args, n);
-
-    n = 0;
-    pdp->setup.form = XtCreateManagedWidget("form", formWidgetClass, pdp->setup.popup, args, n);
-
-    n = 0;
-    listform = XtCreateManagedWidget("list", formWidgetClass, pdp->setup.form, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangePaperSize);          n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_paperlist);       n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.paperlist = XtCreateManagedWidget("paperlist", listWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeResolution);         n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_resolutionlist);  n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.resolutionlist = XtCreateManagedWidget("resolutionlist", listWidgetClass, listform, args, n);
-    
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeOrientation);        n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_orientationlist); n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.orientationlist = XtCreateManagedWidget("orientationlist", listWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           canChangePlex);               n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_plexlist);        n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.plexlist = XtCreateManagedWidget("plexlist", listWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNforceColumns,        True);                        n++;
-    XtSetArg(args[n], XtNdefaultColumns,      1);                           n++;
-    XtSetArg(args[n], XtNsensitive,           True);                        n++;
-    XtSetArg(args[n], XtNlist,                pdp->widget_colorspacelist);  n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    pdp->setup.colorspacelist = XtCreateManagedWidget("colorspacelist", listWidgetClass, listform, args, n);
-    
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,         0);                           n++;
-    XtSetArg(args[n], XtNresizable,           False);                       n++;
-    XtSetArg(args[n], XtNjustify,             XtJustifyRight);              n++;
-    XtSetArg(args[n], XtNwidth,               DEFAULT_WIDTH);               n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeJobCopies);          n++;
-    pdp->setup.jobcopieslabel = XtCreateManagedWidget("jobcopieslabel", labelWidgetClass, listform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNstring,              "1");                         n++;
-    XtSetArg(args[n], XtNresizable,           True);                        n++;
-    XtSetArg(args[n], XtNeditType,            XawtextEdit);                 n++;
-    XtSetArg(args[n], XtNsensitive,           canChangeJobCopies);          n++;
-    pdp->setup.jobcopies = XtCreateManagedWidget("jobcopies", asciiTextWidgetClass, listform, args, n);
-    XtAddCallback(pdp->setup.jobcopies, XtNpositionCallback, printSetupJobCopiesXtProc, pdw);
-
-    n = 0;
-    pdp->setup.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->setup.form, args, n);
-    XtAddCallback(pdp->setup.ok, XtNcallback, printSetupOKXtProc, pdw);
-
-    n = 0;
-    pdp->setup.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->setup.form, args, n);
-    XtAddCallback(pdp->setup.cancel, XtNcallback, printSetupCancelXtProc, pdw);
-
-    XtRealizeWidget(pdp->setup.popup); 
-
-    return pdp->setup.popup;
-}
-
-#undef DEFAULT_WIDTH
-#define DEFAULT_WIDTH 150
-
-static
-String *xpprinterlist_to_widget_printerlist(XPPrinterList printerlist, int num_printers)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_printers+1));
-    if(!names)
-      return NULL;
-
-    for(i = 0 ; i < num_printers ; i++)
-        names[i] = printerlist[i].name;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xppaperlist_to_widget_paperlist(XpuMediumSourceSizeList paperlist, int num_papers)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_papers+1));
-    if (!names)
-      return NULL;
-
-    for(i = 0 ; i < num_papers ; i++)
-        names[i] = (char *)paperlist[i].medium_name; /* FixMe: tray selection missing */
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xpresolutionlist_to_widget_resolutionlist(XpuResolutionList reslist, int num_resolutions)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_resolutions+1));
-    if (!names)
-        return NULL;
-
-    for(i = 0 ; i < num_resolutions ; i++)
-        names[i] = (char *)reslist[i].name;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xporientationlist_to_widget_orientationlist(XpuOrientationList orientationlist, int num_orientations)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_orientations+1));
-    if (!names)
-        return NULL;
-
-    for(i = 0 ; i < num_orientations ; i++)
-        names[i] = (char *)orientationlist[i].orientation;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xpplexlist_to_widget_plexlist(XpuPlexList plexlist, int num_plex)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_plex+1));
-    if(!names)
-      return NULL;
-
-    for(i = 0 ; i < num_plex ; i++)
-      names[i] = (char *)plexlist[i].plex;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static
-String *xpcolorspacelist_to_widget_colorspacelist(XpuColorspaceList colorspacelist, int num_colorspaces)
-{
-    int     i;
-    String *names;
-
-    names = malloc(sizeof(String *) * (num_colorspaces+1));
-    if(!names)
-      return NULL;
-
-    for(i = 0 ; i < num_colorspaces ; i++)
-      names[i] = (char *)colorspacelist[i].name;
-
-    names[i] = NULL; /* Terminate the list */
-
-    return names;
-}
-
-static void
-printerSelectionPrinterSelectedXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget    pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart     *pdp = &pdw->printdialog;
-    XawListReturnStruct *lrs = (XawListReturnStruct *)callData;
-    int                  list_index;
-
-    Log(("## user selected a printer\n"));
-
-    list_index = lrs->list_index;
-    if (list_index == XAW_LIST_NONE) {
-        Log(("printerSelectionPrinterSelectedXtProc: Nothing selected.\n"));
-        return;
-    }
-    
-    Log(("selected printer is '%d'/'%s'/'%s'\n", 
-        list_index, lrs->string, NULLSTR(pdp->printerlist[list_index].name)));
-
-    /* Enable OK button */
-    XtVaSetValues(pdp->selectPrinter.ok, XtNsensitive, True, NULL);
-}
-
-static void
-printSelectPrinterXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget   pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart    *pdp = &pdw->printdialog;
-
-    Log(("## select printer!\n"));
-
-    if (!pdp->selectPrinter.popup) {
-        if (!buildPrinterSelectionDialog(pdw)) {
-            Log(("printSelectPrinterXtProc: buildPrinterSelectionDialog failure.\n"));
-            return;
-        }
-    }
-
-    center_popup((Widget)pdw, pdp->selectPrinter.popup);
-
-    XtPopup(pdp->selectPrinter.popup, XtGrabExclusive);
-}
-
-static void
-printerSelectionClose(PrintDialogWidget  pdw)
-{ 
-    PrintDialogPart *pdp = &pdw->printdialog;
-
-    if (pdp->selectPrinter.popup) {
-        XtPopdown(pdp->selectPrinter.popup);
-    }
-}
-
-static void
-printerSelectionOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget    pdw = (PrintDialogWidget)client_data;
-    PrintDialogPart     *pdp = &pdw->printdialog;
-    XawListReturnStruct *lrs;
-    int                  list_index;
-
-    Log(("## printerSelectionOKXtProc: closing printer selection!\n"));
-
-    /* Copy current selection in printer list widget and open a printer connection */
-    lrs = XawListShowCurrent(pdp->selectPrinter.list);
-    if (!lrs) {
-        Log(("printerSelectionOKXtProc: |lrs|==NULL\n"));
-        return;
-    }
-
-    list_index = lrs->list_index;
-    if (lrs->list_index == XAW_LIST_NONE) {
-        Log(("printerSelectionOKXtProc: rs->list_index == XAW_LIST_NONE\n"));
-        XtFree((char *)lrs);
-        return;
-    }
-
-    /* Set printer name and description in main dialog */
-    XtVaSetValues(pdp->main.name, XtNlabel, NULLSTR(pdp->printerlist[list_index].name), NULL);
-    XtVaSetValues(pdp->main.desc, XtNlabel, NULLSTR(pdp->printerlist[list_index].desc), NULL);
-
-    if (pdp->printer_name)
-        free(pdp->printer_name);
-    pdp->printer_name = strdup(lrs->string);
-
-    /* Close any outstanding printer connection since user has selected
-     * a different printer */
-    closePrinterConnection(pdw, True);
-
-    printerSelectionClose(pdw);
-    
-    XtFree((char *)lrs);
-}
-
-static void
-printerSelectionCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    PrintDialogWidget  pdw = (PrintDialogWidget)client_data;
-    Log(("## printerSelectionCancelXtProc: closing printer selection!\n"));
-
-    printerSelectionClose(pdw);
-}
-
-static
-Bool buildPrinterSelectionDialog(PrintDialogWidget  pdw)
-{
-    PrintDialogPart   *pdp = &pdw->printdialog;
-
-    int  n;
-    Arg  args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True);                    n++;
-    pdp->selectPrinter.popup = XtCreatePopupShell("printerselection", transientShellWidgetClass, (Widget)pdw, args, n);
-
-    n = 0;
-    pdp->selectPrinter.form = XtCreateManagedWidget("form", formWidgetClass, pdp->selectPrinter.popup, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNresizable,        True);                    n++;
-    XtSetArg(args[n], XtNforceColumns,     True);                    n++;
-    XtSetArg(args[n], XtNdefaultColumns,   1);                       n++;
-    XtSetArg(args[n], XtNlist,             pdp->widget_printerlist); n++;
-    XtSetArg(args[n], XtNwidth,            DEFAULT_WIDTH);           n++;
-    pdp->selectPrinter.list = XtCreateManagedWidget("list", listWidgetClass, pdp->selectPrinter.form, args, n);
-    XtAddCallback(pdp->selectPrinter.list, XtNcallback, printerSelectionPrinterSelectedXtProc, pdw);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,        False);                   n++;
-    pdp->selectPrinter.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->selectPrinter.form, args, n);
-    XtAddCallback(pdp->selectPrinter.ok, XtNcallback, printerSelectionOKXtProc, pdw);
-
-    n = 0;
-    pdp->selectPrinter.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->selectPrinter.form, args, n);
-    XtAddCallback(pdp->selectPrinter.cancel, XtNcallback, printerSelectionCancelXtProc, pdw);
-
-    XtRealizeWidget(pdp->selectPrinter.popup);
-
-    return True;
-}
-
-static
-void destroyPrinterSelectionDialog(PrintDialogWidget pdw)
-{
-    PrintDialogPart *pdp = &pdw->printdialog;
-
-    if (pdp->selectPrinter.popup) {
-        XtDestroyWidget(pdp->selectPrinter.popup);
-    }
-
-    /* |XtDestroyWidget(pdp->setup.popup);| above will recursively destroy
-     * all children so we only have to reset the pointers here... */
-    pdp->selectPrinter.popup   = NULL;
-    pdp->selectPrinter.form    = NULL;
-    pdp->selectPrinter.list    = NULL;
-    pdp->selectPrinter.popup   = NULL;
-    pdp->selectPrinter.cancel  = NULL;
-}
-
-/*
- * Function:
- *      createprintdialogchildren
- *
- * Parameters:
- *      w - print dialog widget
- *
- * Description:
- *      Creates the print dialog widgets.
- *
- * Note
- *      -
- */
-static void
-createprintdialogchildren(Widget w)
-{
-    int                n;
-    Arg                args[20];
-    PrintDialogWidget  pdw = (PrintDialogWidget)w;
-    PrintDialogPart   *pdp = &pdw->printdialog;
-    const char        *default_printername = NULL,
-                      *default_printerdesc = NULL;
-    Bool               has_default_printer = False;
-
-    pdp->printerlist = XpuGetPrinterList(NULL, &pdp->num_printers);
-    pdp->widget_printerlist = xpprinterlist_to_widget_printerlist(pdp->printerlist, pdp->num_printers);
-
-    if (pdp->num_printers > 0) {
-        if (pdp->printerlist[0].name && strlen(pdp->printerlist[0].name)) {
-            /* XprintUtils moves the default printer to the top */
-            default_printername = pdp->printerlist[0].name;
-            default_printerdesc = pdp->printerlist[0].desc;
-            pdp->printer_name   = strdup(pdp->printerlist[0].name);
-            has_default_printer = True;
-        }
-    }
-    else
-    {
-      PrintMsg(("No Xprint servers could be found.\n"
-                "Check whether the XPSERVERLIST environment variable contains any valid Xprint server(s).\n"));
-    }
-    
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    pdp->main.form = XtCreateManagedWidget("main", formWidgetClass, (Widget)pdw, args, n);
-
-    n = 0;
-    pdp->main.innerform = XtCreateManagedWidget("innerform", formWidgetClass, pdp->main.form, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyRight);           n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_WIDTH);            n++;
-    pdp->main.desclabel = XtCreateManagedWidget("desclabel", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyLeft);            n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_INFOLABEL_WIDTH);  n++;
-    XtSetArg(args[n], XtNlabel,           default_printerdesc?default_printerdesc:"-"); n++;
-    pdp->main.desc = XtCreateManagedWidget("desc", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       has_default_printer);      n++;
-    pdp->main.info = XtCreateManagedWidget("info", commandWidgetClass, pdp->main.innerform, args, n);
-  /*
-    XtAddCallback(pdp->main.info, XtNcallback, printerInfoXtProc, pdw);
-  */
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyRight);           n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_WIDTH);            n++;
-    pdp->main.namelabel = XtCreateManagedWidget("namelabel", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyLeft);            n++;
-    XtSetArg(args[n], XtNlabel,           default_printername?default_printername:"-"); n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_INFOLABEL_WIDTH);  n++;
-    pdp->main.name = XtCreateManagedWidget("name", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    pdp->main.selectprinter = XtCreateManagedWidget("selectprinter", commandWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.selectprinter, XtNcallback, printSelectPrinterXtProc, pdw);
-
-    /* Line: "File selection" */
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyRight);           n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_WIDTH);            n++;
-    XtSetArg(args[n], XtNsensitive,       False);                    n++;
-    pdp->main.filenamelabel = XtCreateManagedWidget("filenamelabel", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNborderWidth,     0);                        n++;
-    XtSetArg(args[n], XtNresizable,       False);                    n++;
-    XtSetArg(args[n], XtNjustify,         XtJustifyLeft);            n++;
-    XtSetArg(args[n], XtNlabel,           "-");                      n++;
-    XtSetArg(args[n], XtNwidth,           DEFAULT_INFOLABEL_WIDTH);  n++;
-    XtSetArg(args[n], XtNsensitive,       False);                    n++;
-    pdp->main.filename = XtCreateManagedWidget("filename", labelWidgetClass, pdp->main.innerform, args, n);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       False);                    n++;
-    pdp->main.selectfile = XtCreateManagedWidget("selectfile", commandWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.selectfile, XtNcallback, printSelectFileXtProc, pdw);
-
-    /* Line: Misc (Print destination toggles, copy-count etc.)*/
-    n = 0;
-    XtSetArg(args[n], XtNstate,           True);                     n++;
-    pdp->main.printtoprinter = XtCreateManagedWidget("printtoprinter", toggleWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.printtoprinter, XtNcallback, printDialogDestXtProc, pdw);
-
-    n = 0;
-    XtSetArg(args[n], XtNstate,           False);                    n++;
-    pdp->main.printtofile = XtCreateManagedWidget("printtofile", toggleWidgetClass, pdp->main.innerform, args, n);
-    XtAddCallback(pdp->main.printtofile, XtNcallback, printDialogDestXtProc, pdw);
-
-    /* End-of-Inner-Form-Content */
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       has_default_printer);       n++;
-    pdp->main.ok = XtCreateManagedWidget("ok", commandWidgetClass, pdp->main.form, args, n);
-    XtAddCallback(pdp->main.ok, XtNcallback, printOKXtProc, pdw);
-
-    n = 0;
-    XtSetArg(args[n], XtNsensitive,       has_default_printer);       n++;
-    pdp->main.setup = XtCreateManagedWidget("setup", commandWidgetClass, pdp->main.form, args, n);
-    XtAddCallback(pdp->main.setup, XtNcallback, printSetupXtProc, pdw);
-
-    n = 0;
-    pdp->main.cancel = XtCreateManagedWidget("cancel", commandWidgetClass, pdp->main.form, args, n);
-    XtAddCallback(pdp->main.cancel, XtNcallback, printCancelXtProc, pdw);
-}
-
-/*
- * Class Methods
- */
-static void    XawPrintDialogConstraintInitialize(Widget, Widget, ArgList, Cardinal *);
-static void    XawPrintDialogGetValuesHook(Widget, ArgList, Cardinal*);
-static void    XawPrintDialogInitialize(Widget, Widget, ArgList, Cardinal*);
-static void    XawPrintDialogDestroy(Widget);
-static Boolean XawPrintDialogSetValues(Widget, Widget, Widget, ArgList, Cardinal *);
-
-/*
- * Initialization
- */
-static XtResource resources[] = {
-  {
-    XtNicon,
-    XtCIcon,
-    XtRBitmap,
-    sizeof(Pixmap),
-    XtOffsetOf(PrintDialogRec, printdialog.icon),
-    XtRImmediate,
-    0
-  },
-  {
-    XawNOkCallback, XtCCallback, XtRCallback,
-    sizeof(XtCallbackList), XtOffsetOf(PrintDialogRec, printdialog.ok_callback),
-    XtRImmediate, (XtPointer)NULL
-  },
-  {
-    XawNCancelCallback, XtCCallback, XtRCallback,
-    sizeof(XtCallbackList), XtOffsetOf(PrintDialogRec, printdialog.cancel_callback),
-    XtRImmediate, (XtPointer)NULL
-  },
-};
-
-PrintDialogClassRec printdialogClassRec = {
-  /* core */
-  {
-    (WidgetClass)&formClassRec,         /* superclass */
-    "PrintDialog",                      /* class_name */
-    sizeof(PrintDialogRec),             /* widget_size */
-    XawInitializeWidgetSet,             /* class_initialize */
-    NULL,                               /* class_part init */
-    False,                              /* class_inited */
-    XawPrintDialogInitialize,           /* initialize */
-    NULL,                               /* initialize_hook */
-    XtInheritRealize,                   /* realize */
-    NULL,                               /* actions */
-    0,                                  /* num_actions */
-    resources,                          /* resources */
-    XtNumber(resources),                /* num_resources */
-    NULLQUARK,                          /* xrm_class */
-    True,                               /* compress_motion */
-    True,                               /* compress_exposure */
-    True,                               /* compress_enterleave */
-    False,                              /* visible_interest */
-    XawPrintDialogDestroy,              /* destroy */
-    XtInheritResize,                    /* resize */
-    XtInheritExpose,                    /* expose */
-    XawPrintDialogSetValues,            /* set_values */
-    NULL,                               /* set_values_hook */
-    XtInheritSetValuesAlmost,           /* set_values_almost */
-    XawPrintDialogGetValuesHook,        /* get_values_hook */
-    NULL,                               /* accept_focus */
-    XtVersion,                          /* version */
-    NULL,                               /* callback_private */
-    NULL,                               /* tm_table */
-    XtInheritQueryGeometry,             /* query_geometry */
-    XtInheritDisplayAccelerator,        /* display_accelerator */
-    NULL,                               /* extension */
-  },
-  /* composite */
-  {
-    XtInheritGeometryManager,           /* geometry_manager */
-    XtInheritChangeManaged,             /* change_managed */
-    XtInheritInsertChild,               /* insert_child */
-    XtInheritDeleteChild,               /* delete_child */
-    NULL,                               /* extension */
-  },
-  /* constraint */
-  {
-    NULL,                               /* subresourses */
-    0,                                  /* subresource_count */
-    sizeof(PrintDialogConstraintsRec),  /* constraint_size */
-    XawPrintDialogConstraintInitialize, /* initialize */
-    NULL,                               /* destroy */
-    NULL,                               /* set_values */
-    NULL,                               /* extension */
-  },
-  /* form */
-  {
-    XtInheritLayout,                    /* layout */
-  },
-  /* printdialog */
-  {
-    NULL,                               /* extension */
-  }
-};
-
-WidgetClass printDialogWidgetClass = (WidgetClass)&printdialogClassRec;
-
-/*
- * Implementation
- */
-/*ARGSUSED*/
-static void
-XawPrintDialogInitialize(Widget request, Widget cnew, ArgList args, Cardinal *num_args)
-{
-    PrintDialogWidget dw = (PrintDialogWidget)cnew;
-    Arg               arglist[9];
-    Cardinal          arg_cnt = 0;
-
-    XtSetArg(arglist[arg_cnt], XtNborderWidth, 0);     arg_cnt++;
-    XtSetArg(arglist[arg_cnt], XtNleft, XtChainLeft);  arg_cnt++;
-
-    if (dw->printdialog.icon != (Pixmap)0) {
-        XtSetArg(arglist[arg_cnt], XtNbitmap, dw->printdialog.icon);     arg_cnt++;
-        XtSetArg(arglist[arg_cnt], XtNright, XtChainLeft);               arg_cnt++;
-        dw->printdialog.iconW = XtCreateManagedWidget("icon", labelWidgetClass,
-                                                      cnew, arglist, arg_cnt);
-        arg_cnt = 2;
-        XtSetArg(arglist[arg_cnt], XtNfromHoriz, dw->printdialog.iconW); arg_cnt++;
-    }
-    else {
-        dw->printdialog.iconW = NULL;
-    }
-    
-    createprintdialogchildren((Widget)dw);
-}
-
-/*ARGSUSED*/
-static void
-XawPrintDialogConstraintInitialize(Widget request, Widget cnew,
-                                   ArgList args, Cardinal *num_args)
-{
-    PrintDialogWidget dw = (PrintDialogWidget)cnew->core.parent;
-    PrintDialogConstraints constraint = (PrintDialogConstraints)cnew->core.constraints;
-
-    if (!XtIsSubclass(cnew, commandWidgetClass)) /* if not a button */
-        return;                                  /* then just use defaults */
-
-    constraint->form.left = constraint->form.right = XtChainLeft;
-    constraint->form.vert_base = dw->printdialog.main.form;
-
-    if (dw->composite.num_children > 1) {
-        WidgetList  children = dw->composite.children;
-        Widget     *childP;
-
-        for (childP = children + dw->composite.num_children - 1;
-           childP >= children; childP-- ) {
-            if (*childP == dw->printdialog.main.form)
-                break;
-            if (XtIsManaged(*childP) &&
-                XtIsSubclass(*childP, commandWidgetClass)) {
-                constraint->form.horiz_base = *childP;
-                break;
-            }
-        }
-    }
-}
-
-#define ICON       0
-#define NUM_CHECKS 1
-/*ARGSUSED*/
-static Boolean
-XawPrintDialogSetValues(Widget current, Widget request, Widget cnew,
-                        ArgList in_args, Cardinal *in_num_args)
-{
-    PrintDialogWidget w   = (PrintDialogWidget)cnew;
-    PrintDialogWidget old = (PrintDialogWidget)current;
-    Arg               args[5];
-    unsigned int      i;
-    Bool              checks[NUM_CHECKS];
-
-    for (i = 0; i < NUM_CHECKS; i++)
-        checks[i] = False;
-
-    for (i = 0; i < *in_num_args; i++) {
-        if (!strcmp(XtNicon, in_args[i].name))
-            checks[ICON]  = True;
-    }
-
-    if (checks[ICON]) {
-        if (w->printdialog.icon != 0) {
-            XtSetArg(args[0], XtNbitmap, w->printdialog.icon);
-            if (old->printdialog.iconW != NULL) {
-                XtSetValues(old->printdialog.iconW, args, 1);
-            }
-            else {
-                XtSetArg(args[1], XtNborderWidth, 0);
-                XtSetArg(args[2], XtNleft,        XtChainLeft);
-                XtSetArg(args[3], XtNright,       XtChainLeft);
-                w->printdialog.iconW = XtCreateWidget("icon", labelWidgetClass,
-                                                      cnew, args, 4);
-                XtManageChild(w->printdialog.iconW);
-            }
-        }
-        else if (old->printdialog.icon != 0) {
-            XtDestroyWidget(old->printdialog.iconW);
-            w->printdialog.iconW = NULL;
-        }
-    }
-
-    return True;
-}
-
-/*
- * Function:
- *      XawPrintDialogGetValuesHook
- *
- * Parameters:
- *      w        - Print Dialog Widget
- *      args     - argument list
- *      num_args - number of args
- *
- * Description:
- *      This is a get values hook routine that gets the values in the dialog.
- */
-static void
-XawPrintDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args)
-{
-    /* NO-OP for now */
-}
-
-static void 
-XawPrintDialogDestroy(Widget w)
-{
-    PrintDialogWidget pdw = (PrintDialogWidget)w;
-    Log(("# XawPrintDialogDestroy: start.\n"));
-
-    destroyPrintSetupDialog(pdw);
-    destroyPrinterSelectionDialog(pdw);
-    closePrinterConnection(pdw, True);
-    
-    Log(("# XawPrintDialogDestroy: done.\n"));
-}
-
-/*
- * Function:
- *      XawPrintDialogClosePrinterConnection
- *
- * Parameters:
- *      w            - Print Dialog Widget
- *      closeDisplay - Boolean which decides whether |Display *|
- *                     and |XPContext| should be disposed, too.
- *
- * Description:
- *      The print display connection is owned by the print dialog
- *      by default.
- *      If the application wishes to close the display connection
- *      to the print server, either to close it itself or force
- *      a disconnection for other reasons this function can be used.
- *
- * Notes
- *      1. PUBLIC API
- *      2. After this function returns all resources returned by the
- *         print dialog which are related to the status of the printer
- *         connection are stale.
- */
-void
-XawPrintDialogClosePrinterConnection(Widget w, Bool closeDisplay)
-{
-    closePrinterConnection((PrintDialogWidget)w, closeDisplay);
-}
-
diff --git a/xmore/printdialog.h b/xmore/printdialog.h
deleted file mode 100644 (file)
index f166a27..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * $Xorg: printdialog.h,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef XMORE_PRINTDIALOG_H
-#define XMORE_PRINTDIALOG_H 1
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Print.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Form.h>
-#include <X11/XprintUtil/xprintutil.h>
-
-/* Resources:
-   NOT WRITTEN YET
-*/
-
-#define XtCIcon "Icon"
-#define XtNicon "icon"
-
-#define XawNOkCallback             "okCallback"
-#define XawNCancelCallback         "cancelCallback"
-
-typedef struct
-{
-    Display            *pdpy;
-    XPContext           pcontext;
-    const char         *printToFileName;
-    Boolean             printToFile;
-    XpuColorspaceRec   *colorspace;
-} XawPrintDialogCallbackStruct;
-
-typedef struct _PrintDialogClassRec *PrintDialogWidgetClass;
-typedef struct _PrintDialogRec      *PrintDialogWidget;
-
-extern WidgetClass printDialogWidgetClass;
-
-_XFUNCPROTOBEGIN
-
-/* Prototypes */
-void XawPrintDialogClosePrinterConnection(Widget w, Bool closeDisplay);
-
-_XFUNCPROTOEND
-
-#endif /* !XMORE_PRINTDIALOG_H */
diff --git a/xmore/printdialogprivates.h b/xmore/printdialogprivates.h
deleted file mode 100644 (file)
index 1e66eb8..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * $Xorg: printdialogprivates.h,v 1.1 2004/05/12 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-#ifndef _XawPrintDialogP_h
-#define _XawPrintDialogP_h 1
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xos.h>
-#include <X11/Xmu/Misc.h>
-#include <X11/CoreP.h>
-#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/Cardinals.h>
-#include <X11/Xaw/Command.h>    
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/DialogP.h>
-#include <X11/Xaw/XawInit.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/FormP.h>
-
-/* From Xaw/Privates.h */
-#ifndef XtWidth
-#define XtWidth(w)        (((RectObj)w)->rectangle.width)
-#endif
-#ifndef XtHeight
-#define XtHeight(w)       (((RectObj)w)->rectangle.height)
-#endif
-
-
-typedef struct {
-    XtPointer extension;
-} PrintDialogClassPart;
-
-typedef struct _PrintDialogClassRec {
-    CoreClassPart         core_class;
-    CompositeClassPart    composite_class;
-    ConstraintClassPart   constraint_class;
-    FormClassPart         form_class;
-    PrintDialogClassPart  print_dialog_class;
-} PrintDialogClassRec;
-
-extern PrintDialogClassRec printDialogClassRec;
-
-typedef struct _PrintDialogPart {
-    /* resources */
-    String        label;               /* description of the dialog     */
-    String        value;               /* for the user response         */
-    Pixmap        icon;                /* icon bitmap                   */
-    XtCallbackList ok_callback,
-                   cancel_callback;
-        
-    /* private */
-    Widget     iconW;          /* widget to display the icon    */
-    
-    struct
-    {
-        Widget form,
-               innerform,
-               desclabel,
-               desc,
-               info,
-               namelabel,
-               name,
-               selectprinter,
-               filenamelabel,
-               filename,
-               selectfile,
-               printtoprinter,
-               printtofile,
-               ok,
-               setup,
-               cancel;
-    } main;
-
-    Bool   printToFile;
-    char  *filename;
-    Bool   canPrint,       /* can we print ? */
-           canReallyPrint; /* is it really save to print ? */
-    XpuColorspaceRec *selected_colorspace;
-
-    struct
-    {
-        Widget popup,
-               form,
-               list,
-               ok,
-               cancel;
-    } selectPrinter;
-
-    struct
-    {
-      Widget popup,
-             form,
-             paperlist,
-             resolutionlist,
-             orientationlist,
-             plexlist,
-             colorspacelist,
-             jobcopieslabel,
-             jobcopies,
-             ok,
-             cancel;
-    } setup;
-
-    struct
-    {
-        Widget dialog,
-               shell;
-    } selectFile;
-
-    XPPrinterList  printerlist;
-    int            num_printers;
-    String        *widget_printerlist;
-
-    String     printer_name;
-    Display   *pdpy;
-    XPContext  pcontext;
-
-    XpuMediumSourceSizeList  paperlist;
-    int                      num_papers;
-    String                  *widget_paperlist;
-    
-    XpuResolutionList        resolutionlist;
-    int                      num_resolutions;
-    String                  *widget_resolutionlist;
-
-    XpuOrientationList       orientationlist;
-    int                      num_orientations;
-    String                  *widget_orientationlist;
-
-    XpuPlexList              plexlist;
-    int                      num_plex;
-    String                  *widget_plexlist;
-
-    XpuColorspaceList        colorspacelist;
-    int                      num_colorspaces;
-    String                  *widget_colorspacelist;
-} PrintDialogPart;
-
-typedef struct _PrintDialogRec {
-    CorePart            core;
-    CompositePart       composite;
-    ConstraintPart      constraint;
-    FormPart            form;
-    PrintDialogPart     printdialog;
-} PrintDialogRec;
-
-typedef struct {
-    XtPointer extension;
-} PrintDialogConstraintsPart;
-
-typedef struct _PrintDialogConstraintsRec {
-    FormConstraintsPart        form;
-    PrintDialogConstraintsPart printdialog;
-} PrintDialogConstraintsRec, *PrintDialogConstraints;
-
-#endif /* !_XawPrintDialogP_h */
-
diff --git a/xmore/xmore.c b/xmore/xmore.c
deleted file mode 100644 (file)
index 4ed6e23..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * $Xorg: xmore.c,v 1.1 2004/04/30 02:05:54 gisburn Exp $
- *
-Copyright 2004 Roland Mainz <roland.mainz@nrubsig.org>
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
- *
- */
-
-/* Force ANSI C prototypes from X11 headers */
-#ifndef FUNCPROTO 
-#define FUNCPROTO 15
-#endif /* !FUNCPROTO */
-
-#include <X11/StringDefs.h> 
-#include <X11/Intrinsic.h> 
-#include <X11/Shell.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/AsciiText.h> 
-#include <X11/Xaw/Cardinals.h>
-
-#include "xmore.h"
-
-#ifdef USE_XPRINT
-
-#include "printdialog.h"
-#include "print.h"
-
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
-
-/* Turn a NULL pointer string into an empty string */
-#define NULLSTR(x) (((x)!=NULL)?(x):(""))
-
-#define Error(x) { printf x ; exit(EXIT_FAILURE); }
-#define Assertion(expr, msg) { if (!(expr)) { Error msg } }
-#define Log(x)   { if (userOptions.verbose) printf x; }
-
-/* Global vars */
-static Widget        printdialog_shell = NULL;
-static Widget        printdialog       = NULL;
-static Widget        toplevel          = NULL;
-static Widget        text              = NULL;
-static char          printJobNameBuffer[PATH_MAX+256];
-static const char   *ProgramName;  /* program name   (from argv[0]) */
-static const char   *viewFileName; /* file to browse (from argv[1]) */
-
-/* prototypes */
-static void quitAction(Widget w,  XEvent *event, String *params, Cardinal *num_params);
-static void quitXtProc(Widget w, XtPointer client_data, XtPointer callData);
-#ifdef USE_XPRINT
-static void printAction(Widget w, XEvent *event, String *params, Cardinal *num_params);
-static void printXtProc(Widget w, XtPointer client_data, XtPointer callData);
-#endif
-
-static XrmOptionDescRec options[] = {
-{
-  "-v", "*verbose", XrmoptionNoArg, (XPointer) "on" },
-};
-
-
-static XtActionsRec actions[] = {
-    { "quit",          quitAction      },
-#ifdef USE_XPRINT
-    { "print",         printAction     }
-#endif
-};
-
-/* See xmore.h */
-XMoreResourceData userOptions;
-
-#define Offset(field) XtOffsetOf(XMoreResourceData, field)
-
-XtResource resources[] = {
-  {"verbose", "Verbose", XtRBoolean, sizeof(Boolean),  Offset(verbose),  XtRImmediate, (XtPointer)False},
-  {"textfont", XtCFont,  XtRFontSet, sizeof(XFontSet), Offset(textfont), XtRString,    STANDARDFONT},
-};
-
-
-String fallback_resources[] = {
-#ifdef NOTYET
-    "*iconPixmap:    xmore32",
-    "*iconMask:      xmore32",
-#endif /* NOTYET */
-    "*textfont: " STANDARDFONT,
-    "*international: True", /* set this globally for ALL widgets to avoid wiered crashes */
-    "*text.Translations: #override \\n\\"
-        "\tCtrl<Key>S:     no-op(RingBell)\\n\\"
-        "\tCtrl<Key>R:     no-op(RingBell)\\n\\"
-        "\t<Key>space:     next-page()\\n\\"
-        "\t<Key>F:         next-page()\\n\\"
-        "\tCtrl<Key>B:     previous-page()\\n\\"
-        "\t<Key>B:         previous-page()\\n\\"
-        "\t<Key>K:         scroll-one-line-down()\\n\\"
-        "\t<Key>Y:         scroll-one-line-down()\\n\\"
-        "\t<Key>Return:    scroll-one-line-up()\\n\\"
-        "\t<Key>J:         scroll-one-line-up()\\n\\"
-        "\t<Key>E:         scroll-one-line-up()\\n\\"
-        "\t<Key>p:         print()\\n\\"
-        "\t<Key>q:         quit()\\n",
-    "*text.baseTranslations: #override \\n\\"
-        "\t<Key>space:     next-page()\\n\\"
-        "\t<Key>F:         next-page()\\n\\"
-        "\tCtrl<Key>B:     previous-page()\\n\\"
-        "\t<Key>K:         scroll-one-line-down()\\n\\"
-        "\t<Key>Y:         scroll-one-line-down()\\n\\"
-        "\t<Key>Return:    scroll-one-line-up()\\n\\"
-        "\t<Key>J:         scroll-one-line-up()\\n\\"
-        "\t<Key>E:         scroll-one-line-up()\\n\\"
-        "\t<Key>p:         print()\\n\\"
-        "\t<Key>q:         quit()\\n",
-    NULL,
-};
-
-static void
-quitAction(Widget w,  XEvent *event, String *params, Cardinal *num_params)
-{
-    XtAppSetExitFlag(XtWidgetToApplicationContext(w));
-}
-
-static void
-quitXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XtCallActionProc(w, "quit", NULL, NULL, 0);
-}
-
-static void
-printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XawPrintDialogClosePrinterConnection(printdialog, False);
-}
-
-#ifdef USE_XPRINT
-
-static void
-printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XawPrintDialogCallbackStruct *pdcs = (XawPrintDialogCallbackStruct *)callData;
-    Cardinal                      n;
-    Arg                           args[2];
-    Widget                        textsource;
-
-    Log(("printOKXtProc: OK.\n"));
-    
-    /* Get TextSource object */
-    n = 0;
-    XtSetArg(args[n], XtNtextSource, &textsource); n++;
-    XtGetValues(text, args, n);
-    
-    Assertion(textsource != NULL, (("printOKXtProc: textsource == NULL.\n")));
-   
-    /* ||printJobNameBuffer| must live as long the print job prints
-     * because it is used for the job title AND the page headers... */
-    sprintf(printJobNameBuffer, "XMore print job %s", viewFileName);
-
-    DoPrintTextSource(ProgramName,
-                      textsource, toplevel,
-                      pdcs->pdpy, pdcs->pcontext, pdcs->colorspace,
-                      printshellDestroyXtProc,
-                      printJobNameBuffer,
-                      pdcs->printToFile?pdcs->printToFileName:NULL);
-
-    XtPopdown(printdialog_shell);
-}
-
-static void
-printCancelXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    Log(("printCancelXtProc: cancel.\n"));
-    XtPopdown(printdialog_shell);
-    
-    Log(("destroying print dialog shell...\n"));
-    XtDestroyWidget(printdialog_shell);
-    printdialog_shell = NULL;
-    printdialog       = NULL;
-    Log(("... done\n"));
-}
-
-static void
-printXtProc(Widget w, XtPointer client_data, XtPointer callData)
-{
-    XtCallActionProc(toplevel, "print", NULL, NULL, 0);
-}
-
-static void
-printAction(Widget w,  XEvent *event, String *params, Cardinal *num_params)
-{
-  Dimension   width, height;
-  Position    x, y;
-  Widget      parent = toplevel;
-  Log(("print!\n"));
-  
-  if (!printdialog) {
-    int n;
-    Arg args[20];
-
-    n = 0;
-    XtSetArg(args[n], XtNallowShellResize, True); n++;
-    printdialog_shell = XtCreatePopupShell("printdialogshell",
-                                           transientShellWidgetClass,
-                                           toplevel, args, n);
-    n = 0;
-    printdialog = XtCreateManagedWidget("printdialog", printDialogWidgetClass,
-                                        printdialog_shell, args, n);
-    XtAddCallback(printdialog, XawNOkCallback,     printOKXtProc,     NULL);
-    XtAddCallback(printdialog, XawNCancelCallback, printCancelXtProc, NULL);
-
-    XtRealizeWidget(printdialog_shell);
-  }
-
-  /* Center dialog */
-  XtVaGetValues(printdialog_shell,
-      XtNwidth,  &width,
-      XtNheight, &height,
-      NULL);
-
-  x = (Position)(XWidthOfScreen( XtScreen(parent)) - width)  / 2;
-  y = (Position)(XHeightOfScreen(XtScreen(parent)) - height) / 3;
-
-  XtVaSetValues(printdialog_shell,
-      XtNx, x,
-      XtNy, y,
-      NULL);
-        
-  XtPopup(printdialog_shell, XtGrabNonexclusive);
-}
-
-#endif
-
-int main( int argc, char *argv[] )
-{
-  XtAppContext app;
-  Widget       form;
-  Widget       printbutton;
-  Widget       quitbutton;
-  int          n;
-  Arg          args[8];
-
-  ProgramName = argv[0];
-
-  XtSetLanguageProc(NULL, NULL, NULL);
-  toplevel = XtOpenApplication(&app, "XMore",
-                               options, XtNumber(options), 
-                               &argc, argv, fallback_resources,
-                               sessionShellWidgetClass, NULL, ZERO);
-
-  if (argc != 2)
-  {
-    printf("usage: %s [ x options ] filename\n", argv[0]);
-    exit(EXIT_FAILURE);
-  }
-
-  XtGetApplicationResources(toplevel, (XtPointer)&userOptions, resources, 
-                            XtNumber(resources), NULL, 0);
-  XtAppAddActions(app, actions, XtNumber(actions));
-
-  viewFileName = argv[1];
-
-  form = XtCreateManagedWidget("form", formWidgetClass, toplevel, NULL, 0);
-
-  n = 0;
-  XtSetArg(args[n], XtNtype,             XawAsciiFile);            n++;
-  XtSetArg(args[n], XtNstring,           viewFileName);            n++;
-  XtSetArg(args[n], XtNwidth,            700);                     n++;
-  XtSetArg(args[n], XtNheight,           300);                     n++;
-  XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollAlways);     n++;
-  XtSetArg(args[n], XtNscrollVertical,   XawtextScrollAlways);     n++;
-  XtSetArg(args[n], XtNfontSet,          userOptions.textfont);    n++;
-  text = XtCreateManagedWidget("text", asciiTextWidgetClass, form, args, n);
-
-#ifdef USE_XPRINT
-  n = 0;
-  XtSetArg(args[n], XtNfromHoriz,       NULL);            n++;
-  XtSetArg(args[n], XtNfromVert,        text);            n++;
-  XtSetArg(args[n], XtNlabel,           "Print...");      n++;
-  printbutton = XtCreateManagedWidget("print", commandWidgetClass, form, args, n);
-  XtAddCallback(printbutton, XtNcallback, printXtProc, 0);        
-#endif
-  
-  n = 0;
-  XtSetArg(args[n], XtNfromHoriz,       printbutton);            n++;
-  XtSetArg(args[n], XtNfromVert,        text);                   n++;
-  XtSetArg(args[n], XtNlabel,           "Quit");      n++;
-  quitbutton = XtCreateManagedWidget("quit", commandWidgetClass, form, args, n);
-  XtAddCallback(quitbutton, XtNcallback, quitXtProc, 0);
-  
-  printdialog_shell = NULL;
-  printdialog       = NULL;
-
-  XtRealizeWidget(toplevel);
-  
-  XtAppMainLoop(app);
-
-  return EXIT_SUCCESS;
-}
-         
diff --git a/xmore/xmore.man b/xmore/xmore.man
deleted file mode 100644 (file)
index 2936397..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-.\" -*- coding: us-ascii -*-
-.TH xmore __appmansuffix__ "1 February 2005"  
-.SH NAME
-xmore \- plain text display program for the X Window System
-.SH SYNOPSIS
-.ad l
-\fBxmore\fR \kx
-.if (\nxu > (\n(.lu / 2)) .nr x (\n(.lu / 5)
-'in \n(.iu+\nxu
-[\fB\fBfilename\fR\fR]
-'in \n(.iu-\nxu
-.ad b
-.SH DESCRIPTION
-xmore is a plain text browser.
-.SH ENVIRONMENT
-.TP 
-\fBXPSERVERLIST\fR 
-\fB${XPSERVERLIST}\fR must be set,
-identifying the available Xprint servers.
-See \fBXprint\fR(__miscmansuffix__)
-for more details.
-.SH "SEE ALSO"
-\fBX11\fR(__miscmansuffix__), \fBxman\fR(__appmansuffix__)
diff --git a/xmore/xmore.sgml b/xmore/xmore.sgml
deleted file mode 100644 (file)
index ec766c0..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" 'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>
-
-<!-- Process this file with DocBook tools to generate the output format
-(such as manual pages or HTML documents).
-
-Note that strings like __appmansuffix__, __filemansuffix__, __libmansuffix__,
-__miscmansuffix__ etc. have to be replaced first (in theory that's the
-job of ENTITIES but some XML tools are highly allergic to such stuff... ;-().
-A quick way to do that is to filter this document via
-/usr/bin/sed "s/__appmansuffix__/${MANSUFFIX}/g;s/__filemansuffix__/${FILEMANSUFFIX}/g;s/__libmansuffix__/${LIBMANSUFFIX}/g;s/__misc
-mansuffix__/${MISCMANSUFFIX}/g"
-assuming that env vars like MANSUFFIX etc. have been set to the matching
-manual volume numbers.
-  -->
-
-<refentry>
-  <refmeta>
-    <refentrytitle>xmore</refentrytitle>
-    <manvolnum>__appmansuffix__</manvolnum>
-  </refmeta>
-  <refnamediv>
-    <refname>xmore</refname>
-
-    <refpurpose>plain text display program for the X Window System</refpurpose>
-  </refnamediv>
-  <refsynopsisdiv>
-    <cmdsynopsis>
-      <command>xmore</command>
-
-      <arg><option><replaceable>filename</replaceable></option></arg>     
-    </cmdsynopsis>
-  </refsynopsisdiv>
-  <refsect1>
-    <title>DESCRIPTION</title>
-
-    <para><command>xmore</command> is a plain text browser.
-    </para>
-
-  </refsect1>
-
-  <refsect1>
-    <title>ENVIRONMENT</title>
-    <variablelist>
-      <varlistentry>
-        <term><envar>XPSERVERLIST</envar>
-        </term>
-        <listitem>
-           <para>
-              <envar>${XPSERVERLIST}</envar> must be set,
-             identifying the available Xprint servers.
-              See <citerefentry><refentrytitle>Xprint</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry>
-             for more details.
-         </para>
-       </listitem>
-      </varlistentry>
-    </variablelist>
-  </refsect1>
-
-<!-- not yet
-  <refsect1>
-    <title>KNOWN BUGS</title>
-    <para>
-    </para>
-  </refsect1>
--->
-
-  <refsect1>
-    <title>SEE ALSO</title>
-    <para>
-      <simplelist type="inline">
-        <!-- specific references -->
-        <!-- none -->
-        
-        <!-- Xprint general references -->
-        <member><citerefentry><refentrytitle>X11</refentrytitle><manvolnum>__miscmansuffix__</manvolnum></citerefentry></member>
-        <member><citerefentry><refentrytitle>xman</refentrytitle><manvolnum>__appmansuffix__</manvolnum></citerefentry></member>
-      </simplelist>
-    </para>
-  </refsect1>
-
-</refentry>
-
-
similarity index 100%
rename from xwud/AUTHORS
rename to xpr/AUTHORS
similarity index 100%
rename from xmore/COPYING
rename to xpr/COPYING
diff --git a/xpr/ChangeLog b/xpr/ChangeLog
new file mode 100644 (file)
index 0000000..c234c1f
--- /dev/null
@@ -0,0 +1,205 @@
+commit ae7e1530f9e60e9a8747a1d4c38579510675f023
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Oct 16 19:13:21 2009 -0700
+
+    xpr 1.0.3
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit b4d488d7586892cfb8199b82a27f982a1717be66
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Oct 16 19:12:22 2009 -0700
+
+    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 304cd93438d75fe8b6964fe5a7bb077f031cac9e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:29 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit f53142c6882f08b646ebe6d614bb6f14d5dcdb57
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Thu Jan 22 17:34:02 2009 -0200
+
+    Correct make distcheck and most gcc/sparse warnings.
+    
+      Remaining warnings are due to bit/shift operations mixed with
+    addition/multiplication/etc. "1<<2-1" should be read as
+    "1 << (2 - 1)", and not "(1 << 2) - 1". The first 2 warnings
+    appear to be for a confusing case, as a few lines bellow
+    it is adding parenthesis to the shift operation, but should be
+    being parsed correctly (not added parenthesis to avoid the
+    adding them wrong, and "hiding" the warning...)
+
+commit bee786458655a081487f2caff112f85aa0c3c8de
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 15:51:08 2007 -0500
+
+    Add missing PHONY line for automatic ChangeLog generation
+
+commit cceb5d7387f8dcc39000f8e27b82230e9a8f5019
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Sat Jan 27 23:50:00 2007 -0800
+
+    Version bump: 1.0.2
+
+commit b3e250641a02791204a24ee955a41ce9371e35c3
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Sat Jan 27 23:47:11 2007 -0800
+
+    Replace static ChangeLog with dist-hook to generate from git
+
+commit 028ed782e7a3e502e54f1343d66b1311cb00a900
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Tue Jan 2 19:03:44 2007 -0800
+
+    renamed: .cvsignore -> .gitignore
+
+commit 9049071794e0cdf8d72851f52481e053f6d21ca4
+Author: Eric S. Raymond <esr@thyrsus.com>
+Date:   Tue Jan 2 19:03:09 2007 -0800
+
+    Bug 9518: Markup problems on the xdpr.1 page
+    
+    <https://bugs.freedesktop.org/show_bug.cgi?id=9518>
+
+commit c7d48ec1d3206d6eb250072fe5eb1511b43f0af2
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:53 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit b5b4935d49c92babb1ff57d25f2e4ecb5491f80f
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:46 2005 +0000
+
+    Stub COPYING files
+
+commit d3840fd1c4ee62bb3c556fec71e17fe59740ecc3
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:10 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit bd9c0b849104aeb68b297171246cc30bfdb6ddaa
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:24 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 5597c26daba5072fd9a0c6f943a424946af98875
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:27 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 9402168a108ff81c81a8137ed5882b928d9960bc
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:46 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit dfc64376daec039f564b023acc136af34a6f71ad
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:35:07 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit 84f2c29fd400a4d484622ac8b2eb7e7e90fda9b3
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 21 03:14:16 2005 +0000
+
+    Change dependency from xmu to xmuu since the full xmu (with all its baggage
+        like Xt) is not needed here.
+
+commit a1e58da278e8ff4105d96c4e8068ac27e62eb13b
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:55 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit e3857fb739d8f4aaa871e64585a48bff0d6537a4
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:56 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit fa885773b5b96ec051bbc477da5b0eaff28edb3a
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:24 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 0cb5e946c3bdfb49101a6f018734a5cfe0db8f48
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 00:25:47 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit 67e02555f85d8c6374bb2618391e200aa5165cea
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:32 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit ab0d5822ee12d003c1797f78dceec00c68c06be5
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:37 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit 869f3a1bc4ff378d2c0437518b91154c43c16e87
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:32:03 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit e3928f9b676c1054790b5ef69b8a568e80482189
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Fri Jul 1 21:10:15 2005 +0000
+
+    symlink.sh: add xplsprinters.sgml xprehashprinterlist.sgml xdpr.script
+    Check in build systems for xpr, xprehashprinterlist, xplsprinters
+
+commit 5e2412e58e798657ae36bfddf643ff7da7b98e15
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date:   Mon Nov 8 21:38:56 2004 +0000
+
+    xc/programs/xpr/x2jet.c
+    //freedesktop.org/bugzilla/show_bug.cgi?id=1795): Fix build bustage caused
+        by bug 1779, patch by Bernhard Rosenkraenzer <bero@arklinux.org>.
+
+commit aa81cc55645093145f346aa8ec490df00299c8fb
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date:   Mon Nov 8 07:22:50 2004 +0000
+
+    xc/programs/xpr/x2jet.c
+    xc/programs/xpr/x2pmp.c
+    xc/programs/xpr/xpr.c
+    Fix various warnings, build problems in "xpr" and convert the whole source
+        from K&R style to ANSI-C.
+
+commit 9a961d11bea6be64c6f51b4f0829ff4fe2999c4a
+Author: Roland Mainz <roland.mainz@nrubsig.org>
+Date:   Sun Oct 31 02:14:06 2004 +0000
+
+    Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=631 - Uploading
+        "xpr" and "pclcomp" as they are needed for the RASTER and PCL drivers
+        on some platforms.
similarity index 100%
rename from xman/INSTALL
rename to xpr/INSTALL
similarity index 76%
rename from ico/Makefile.am
rename to xpr/Makefile.am
index a03cffd..77f60fc 100644 (file)
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-bin_PROGRAMS = ico
+bin_PROGRAMS = xpr
 
-AM_CFLAGS = $(ICO_CFLAGS)
-ico_LDADD = $(ICO_LIBS) $(XTHREADLIB) -lm
+AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE
+xpr_LDADD = $(XPR_LIBS) -lm
 
-ico_SOURCES =  \
-        allobjs.h \
-        ico.c \
-        objcube.h \
-        objico.h \
-        objocta.h \
-        objplane.h \
-        objpyr.h \
-        polyinfo.h
+xpr_SOURCES =  \
+        lncmd.h \
+        pmp.h \
+        x2jet.c \
+        x2pmp.c \
+        xpr.c \
+        xpr.h
 
 appman_PRE = \
-        ico.man
+        xdpr.man \
+        xpr.man
 
 
+bin_SCRIPTS = xdpr
 
-appmandir = $(APP_MAN_DIR)
+xdpr: xdpr.script
+       $(AM_V_GEN)cp $(top_srcdir)/xdpr.script xdpr
 
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+CLEANFILES = xdpr
 
-EXTRA_DIST = $(appman_PRE) ChangeLog
-CLEANFILES = $(appman_DATA)
-MAINTAINERCLEANFILES = ChangeLog
+EXTRA_DIST = xdpr.script ChangeLog autogen.sh
+
+MAINTAINERCLEANFILES=ChangeLog
 
 .PHONY: ChangeLog
 
 ChangeLog:
-       (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+       $(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
 
+appmandir = $(APP_MAN_DIR)
+
+appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+
+EXTRA_DIST += $(appman_PRE)
+CLEANFILES += $(appman_DATA)
+
 SED = sed
 
 # Strings to replace in man pages
@@ -76,4 +84,4 @@ MAN_SUBSTS = \
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
similarity index 82%
rename from xman/Makefile.in
rename to xpr/Makefile.in
index 591ff21..23c3f54 100644 (file)
@@ -37,6 +37,7 @@
 #  PERFORMANCE OF THIS SOFTWARE.
 
 
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -56,13 +57,12 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-bin_PROGRAMS = xman$(EXEEXT)
+bin_PROGRAMS = xpr$(EXEEXT)
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
-       $(dist_help_DATA) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS config.guess config.sub depcomp \
-       install-sh missing
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+       config.guess config.sub depcomp install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -73,38 +73,13 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
-       "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(helpdir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
+       "$(DESTDIR)$(appmandir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_xman_OBJECTS = buttons.$(OBJEXT) globals.$(OBJEXT) \
-       handler.$(OBJEXT) help.$(OBJEXT) main.$(OBJEXT) man.$(OBJEXT) \
-       misc.$(OBJEXT) ScrollByL.$(OBJEXT) search.$(OBJEXT) \
-       tkfuncs.$(OBJEXT) vendor.$(OBJEXT)
-xman_OBJECTS = $(am_xman_OBJECTS)
+am_xpr_OBJECTS = x2jet.$(OBJEXT) x2pmp.$(OBJEXT) xpr.$(OBJEXT)
+xpr_OBJECTS = $(am_xpr_OBJECTS)
 am__DEPENDENCIES_1 =
-xman_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(xman_SOURCES)
-DIST_SOURCES = $(xman_SOURCES)
+xpr_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -126,7 +101,30 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-DATA = $(appman_DATA) $(dist_appdefault_DATA) $(dist_help_DATA)
+SCRIPTS = $(bin_SCRIPTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(xpr_SOURCES)
+DIST_SOURCES = $(xpr_SOURCES)
+DATA = $(appman_DATA)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -144,8 +142,6 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
 APP_MAN_DIR = @APP_MAN_DIR@
 APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
 AUTOCONF = @AUTOCONF@
@@ -172,7 +168,6 @@ EXEEXT = @EXEEXT@
 FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 GREP = @GREP@
-HELPDIR = @HELPDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -202,8 +197,8 @@ SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-XMAN_CFLAGS = @XMAN_CFLAGS@
-XMAN_LIBS = @XMAN_LIBS@
+XPR_CFLAGS = @XPR_CFLAGS@
+XPR_LIBS = @XPR_LIBS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -214,7 +209,6 @@ am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
-appdefaultdir = @appdefaultdir@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -256,46 +250,26 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-helpdir = @HELPDIR@
-dist_help_DATA = xman.help
-AM_CFLAGS = $(CWARNFLAGS) $(XMAN_CFLAGS) \
-       -D_BSD_SOURCE -DHELPFILE=\"$(helpdir)/xman.help\"
-
-xman_LDADD = $(XMAN_LIBS)
-xman_SOURCES = \
-        buttons.c \
-        defs.h \
-        globals.c \
-        globals.h \
-        handler.c \
-        help.c \
-        iconclosed.h \
-        icon_help.h \
-        icon_open.h \
-        main.c \
-        man.c \
-        man.h \
-        misc.c \
-        ScrollByL.c \
-        ScrollByL.h \
-        ScrollByLP.h \
-        search.c \
-        tkfuncs.c \
-        vendor.c \
-        vendor.h \
-        version.h
+AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE
+xpr_LDADD = $(XPR_LIBS) -lm
+xpr_SOURCES = \
+        lncmd.h \
+        pmp.h \
+        x2jet.c \
+        x2pmp.c \
+        xpr.c \
+        xpr.h
 
 appman_PRE = \
-        xman.man
+        xdpr.man \
+        xpr.man
 
-
-# App default files
-DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
-dist_appdefault_DATA = app-defaults/Xman
+bin_SCRIPTS = xdpr
+CLEANFILES = xdpr $(appman_DATA)
+EXTRA_DIST = xdpr.script ChangeLog autogen.sh $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog
 appmandir = $(APP_MAN_DIR)
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-EXTRA_DIST = $(appman_PRE) ChangeLog
-CLEANFILES = $(appman_DATA)
 SED = sed
 
 # Strings to replace in man pages
@@ -315,7 +289,6 @@ MAN_SUBSTS = \
        -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
 
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
-MAINTAINERCLEANFILES = ChangeLog
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -409,9 +382,43 @@ uninstall-binPROGRAMS:
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-xman$(EXEEXT): $(xman_OBJECTS) $(xman_DEPENDENCIES) 
-       @rm -f xman$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(xman_OBJECTS) $(xman_LDADD) $(LIBS)
+xpr$(EXEEXT): $(xpr_OBJECTS) $(xpr_DEPENDENCIES) 
+       @rm -f xpr$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(xpr_OBJECTS) $(xpr_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+            } \
+       ; done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -419,17 +426,9 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ScrollByL.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buttons.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handler.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/man.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tkfuncs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vendor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x2jet.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x2pmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpr.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -466,46 +465,6 @@ uninstall-appmanDATA:
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(appmandir)' && rm -f" $$files ")"; \
        cd "$(DESTDIR)$(appmandir)" && rm -f $$files
-install-dist_appdefaultDATA: $(dist_appdefault_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)"
-       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdefaultdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(appdefaultdir)" || exit $$?; \
-       done
-
-uninstall-dist_appdefaultDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_appdefault_DATA)'; test -n "$(appdefaultdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(appdefaultdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(appdefaultdir)" && rm -f $$files
-install-dist_helpDATA: $(dist_help_DATA)
-       @$(NORMAL_INSTALL)
-       test -z "$(helpdir)" || $(MKDIR_P) "$(DESTDIR)$(helpdir)"
-       @list='$(dist_help_DATA)'; test -n "$(helpdir)" || list=; \
-       for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; \
-       done | $(am__base_list) | \
-       while read files; do \
-         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(helpdir)'"; \
-         $(INSTALL_DATA) $$files "$(DESTDIR)$(helpdir)" || exit $$?; \
-       done
-
-uninstall-dist_helpDATA:
-       @$(NORMAL_UNINSTALL)
-       @list='$(dist_help_DATA)'; test -n "$(helpdir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(helpdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(helpdir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -710,9 +669,9 @@ distcleancheck: distclean
               exit 1; } >&2
 check-am: all-am
 check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA) config.h
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(helpdir)"; do \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
@@ -765,14 +724,13 @@ info: info-am
 
 info-am:
 
-install-data-am: install-appmanDATA install-dist_appdefaultDATA \
-       install-dist_helpDATA
+install-data-am: install-appmanDATA
 
 install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am: install-binPROGRAMS
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
 
 install-html: install-html-am
 
@@ -814,7 +772,7 @@ ps: ps-am
 ps-am:
 
 uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
-       uninstall-dist_appdefaultDATA uninstall-dist_helpDATA
+       uninstall-binSCRIPTS
 
 .MAKE: all install-am install-strip
 
@@ -825,21 +783,20 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        distclean-generic distclean-hdr distclean-tags distcleancheck \
        distdir distuninstallcheck dvi dvi-am html html-am info \
        info-am install install-am install-appmanDATA \
-       install-binPROGRAMS install-data install-data-am \
-       install-dist_appdefaultDATA install-dist_helpDATA install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-appmanDATA \
-       uninstall-binPROGRAMS uninstall-dist_appdefaultDATA \
-       uninstall-dist_helpDATA
+       install-binPROGRAMS install-binSCRIPTS install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+       uninstall-binSCRIPTS
 
 
-.man.$(APP_MAN_SUFFIX):
-       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+xdpr: xdpr.script
+       $(AM_V_GEN)cp $(top_srcdir)/xdpr.script xdpr
 
 .PHONY: ChangeLog
 
@@ -848,6 +805,9 @@ ChangeLog:
 
 dist-hook: ChangeLog
 
+.man.$(APP_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
similarity index 100%
rename from xwud/NEWS
rename to xpr/NEWS
similarity index 70%
rename from xgc/README
rename to xpr/README
index 696305b..2d9ee54 100644 (file)
@@ -1,5 +1,5 @@
-xgc is an X11 graphics demo that shows various features of the X11
-core protocol graphics primitives.
+xpr takes as input a window dump file produced by xwd
+and formats it for output on various types of printers.
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
@@ -12,9 +12,9 @@ Please submit bug reports to the Xorg bugzilla:
 
 The master development code repository can be found at:
 
-        git://anongit.freedesktop.org/git/xorg/app/xgc
+        git://anongit.freedesktop.org/git/xorg/app/xpr
 
-        http://cgit.freedesktop.org/xorg/app/xgc
+        http://cgit.freedesktop.org/xorg/app/xpr
 
 For patch submission instructions, see:
 
similarity index 100%
rename from xman/aclocal.m4
rename to xpr/aclocal.m4
similarity index 100%
rename from xcalc/autogen.sh
rename to xpr/autogen.sh
similarity index 100%
rename from xman/config.guess
rename to xpr/config.guess
diff --git a/xpr/config.h.in b/xpr/config.h.in
new file mode 100644 (file)
index 0000000..b12a10e
--- /dev/null
@@ -0,0 +1,61 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
similarity index 100%
rename from xman/config.sub
rename to xpr/config.sub
similarity index 92%
rename from xman/configure
rename to xpr/configure
index a764eed..3d94da0 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for xman 1.1.0.
+# Generated by GNU Autoconf 2.63 for xpr 1.0.3.
 #
 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
 #
@@ -594,10 +594,10 @@ MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
-PACKAGE_NAME='xman'
-PACKAGE_TARNAME='xman'
-PACKAGE_VERSION='1.1.0'
-PACKAGE_STRING='xman 1.1.0'
+PACKAGE_NAME='xpr'
+PACKAGE_TARNAME='xpr'
+PACKAGE_VERSION='1.0.3'
+PACKAGE_STRING='xpr 1.0.3'
 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
 
 # Factoring default headers for most tests.
@@ -640,13 +640,9 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-appdefaultdir
-APPDEFS_LIBS
-APPDEFS_CFLAGS
-XMAN_LIBS
-XMAN_CFLAGS
+XPR_LIBS
+XPR_CFLAGS
 PKG_CONFIG
-HELPDIR
 ADMIN_MAN_DIR
 DRIVER_MAN_DIR
 MISC_MAN_DIR
@@ -659,14 +655,6 @@ MISC_MAN_SUFFIX
 FILE_MAN_SUFFIX
 LIB_MAN_SUFFIX
 APP_MAN_SUFFIX
-distcleancheck_listfiles
-CHANGELOG_CMD
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-CWARNFLAGS
-EGREP
-GREP
-CPP
 host_os
 host_vendor
 host_cpu
@@ -675,6 +663,14 @@ build_os
 build_vendor
 build_cpu
 build
+distcleancheck_listfiles
+CHANGELOG_CMD
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+CWARNFLAGS
+EGREP
+GREP
+CPP
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -762,11 +758,6 @@ enable_dependency_tracking
 enable_silent_rules
 enable_strict_compilation
 with_release_version
-with_helpdir
-with_sysmanpath
-with_localmanpath
-with_manconfig
-with_appdefaultdir
 '
       ac_precious_vars='build_alias
 host_alias
@@ -778,10 +769,8 @@ LIBS
 CPPFLAGS
 CPP
 PKG_CONFIG
-XMAN_CFLAGS
-XMAN_LIBS
-APPDEFS_CFLAGS
-APPDEFS_LIBS'
+XPR_CFLAGS
+XPR_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1334,7 +1323,7 @@ if test "$ac_init_help" = "long"; then
   # 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 xman 1.1.0 to adapt to many kinds of systems.
+\`configure' configures xpr 1.0.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1382,7 +1371,7 @@ Fine tuning of the installation directories:
   --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/xman]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/xpr]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1404,7 +1393,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xman 1.1.0:";;
+     short | recursive ) echo "Configuration of xpr 1.0.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1427,17 +1416,6 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-release-version=STRING
                           Use release version string in package name
-  --with-helpdir=<path>   Set default directory for xman.help (default:
-                          ${datadir}/X11)
-  --with-sysmanpath=<path>
-                          Set default system man page search path
-  --with-localmanpath=<path>
-                          Set default local man page search path
-  --with-manconfig=<filename>
-                          Set default system man configuration file
-  --with-appdefaultdir=<pathname>
-                          specify directory for app-defaults files (default is
-                          autodetected)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1449,12 +1427,8 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   PKG_CONFIG  path to pkg-config utility
-  XMAN_CFLAGS C compiler flags for XMAN, overriding pkg-config
-  XMAN_LIBS   linker flags for XMAN, overriding pkg-config
-  APPDEFS_CFLAGS
-              C compiler flags for APPDEFS, overriding pkg-config
-  APPDEFS_LIBS
-              linker flags for APPDEFS, overriding pkg-config
+  XPR_CFLAGS  C compiler flags for XPR, overriding pkg-config
+  XPR_LIBS    linker flags for XPR, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1522,7 +1496,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xman configure 1.1.0
+xpr configure 1.0.3
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1536,7 +1510,7 @@ 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 xman $as_me 1.1.0, which was
+It was created by xpr $as_me 1.0.3, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2384,8 +2358,8 @@ fi
 
 
 # Define the identity of the package.
- PACKAGE='xman'
- VERSION='1.1.0'
+ PACKAGE='xpr'
+ VERSION='1.0.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3680,89 +3654,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
 
 
 ac_ext=c
@@ -4589,6 +4480,89 @@ esac
 
 
 
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
 
 
 
@@ -4941,138 +4915,6 @@ fi
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for mkstemp" >&5
-$as_echo_n "checking for mkstemp... " >&6; }
-if test "${ac_cv_func_mkstemp+set}" = set; 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
-/* end confdefs.h.  */
-/* Define mkstemp to an innocuous variant, in case <limits.h> declares mkstemp.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define mkstemp innocuous_mkstemp
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char mkstemp (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef mkstemp
-
-/* 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 mkstemp ();
-/* 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_mkstemp || defined __stub___mkstemp
-choke me
-#endif
-
-int
-main ()
-{
-return mkstemp ();
-  ;
-  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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$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
-  $as_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 && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_mkstemp=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_mkstemp=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mkstemp" >&5
-$as_echo "$ac_cv_func_mkstemp" >&6; }
-if test "x$ac_cv_func_mkstemp" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAS_MKSTEMP 1
-_ACEOF
-
-fi
-
-
-
-# Check whether --with-helpdir was given.
-if test "${with_helpdir+set}" = set; then
-  withval=$with_helpdir; HELPDIR="$withval"
-else
-  HELPDIR=${datadir}/X11
-fi
-
-
-
-
-# Check whether --with-sysmanpath was given.
-if test "${with_sysmanpath+set}" = set; then
-  withval=$with_sysmanpath; SYSMANPATH="$withval"
-fi
-
-if test x$SYSMANPATH != x; then
-
-cat >>confdefs.h <<_ACEOF
-#define SYSMANPATH "$SYSMANPATH"
-_ACEOF
-
-fi
-
-
-# Check whether --with-localmanpath was given.
-if test "${with_localmanpath+set}" = set; then
-  withval=$with_localmanpath; LOCALMANPATH="$withval"
-fi
-
-if test x$LOCALMANPATH != x; then
-
-cat >>confdefs.h <<_ACEOF
-#define LOCALMANPATH "$LOCALMANPATH"
-_ACEOF
-
-fi
-
 # Checks for pkg-config packages
 
 
@@ -5192,35 +5034,35 @@ $as_echo "no" >&6; }
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for XMAN" >&5
-$as_echo_n "checking for XMAN... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking for XPR" >&5
+$as_echo_n "checking for XPR... " >&6; }
 
-if test -n "$XMAN_CFLAGS"; then
-    pkg_cv_XMAN_CFLAGS="$XMAN_CFLAGS"
+if test -n "$XPR_CFLAGS"; then
+    pkg_cv_XPR_CFLAGS="$XPR_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5
+  ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_XMAN_CFLAGS=`$PKG_CONFIG --cflags "xaw7" 2>/dev/null`
+  pkg_cv_XPR_CFLAGS=`$PKG_CONFIG --cflags "xmuu x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
  else
     pkg_failed=untried
 fi
-if test -n "$XMAN_LIBS"; then
-    pkg_cv_XMAN_LIBS="$XMAN_LIBS"
+if test -n "$XPR_LIBS"; then
+    pkg_cv_XPR_LIBS="$XPR_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xaw7") 2>&5
+    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu x11\"") >&5
+  ($PKG_CONFIG --exists --print-errors "xmuu x11") 2>&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  pkg_cv_XMAN_LIBS=`$PKG_CONFIG --libs "xaw7" 2>/dev/null`
+  pkg_cv_XPR_LIBS=`$PKG_CONFIG --libs "xmuu x11" 2>/dev/null`
 else
   pkg_failed=yes
 fi
@@ -5238,33 +5080,33 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               XMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7" 2>&1`
+               XPR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu x11" 2>&1`
         else
-               XMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7" 2>&1`
+               XPR_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu x11" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
-       echo "$XMAN_PKG_ERRORS" >&5
+       echo "$XPR_PKG_ERRORS" >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xaw7) were not met:
+       { { $as_echo "$as_me:$LINENO: error: Package requirements (xmuu x11) were not met:
 
-$XMAN_PKG_ERRORS
+$XPR_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XMAN_CFLAGS
-and XMAN_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XPR_CFLAGS
+and XPR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 " >&5
-$as_echo "$as_me: error: Package requirements (xaw7) were not met:
+$as_echo "$as_me: error: Package requirements (xmuu x11) were not met:
 
-$XMAN_PKG_ERRORS
+$XPR_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables XMAN_CFLAGS
-and XMAN_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XPR_CFLAGS
+and XPR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 " >&2;}
    { (exit 1); exit 1; }; }
@@ -5275,8 +5117,8 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XMAN_CFLAGS
-and XMAN_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XPR_CFLAGS
+and XPR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
@@ -5285,307 +5127,22 @@ $as_echo "$as_me: error: The pkg-config script could not be found or is too old.
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables XMAN_CFLAGS
-and XMAN_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XPR_CFLAGS
+and XPR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
 else
-       XMAN_CFLAGS=$pkg_cv_XMAN_CFLAGS
-       XMAN_LIBS=$pkg_cv_XMAN_LIBS
+       XPR_CFLAGS=$pkg_cv_XPR_CFLAGS
+       XPR_LIBS=$pkg_cv_XPR_LIBS
         { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
        :
 fi
 
 
-# Check whether --with-manconfig was given.
-if test "${with_manconfig+set}" = set; then
-  withval=$with_manconfig; MANCONF="$withval"
-fi
-
-if test x$MANCONF = x; then
-# Check for man page config files
-    { $as_echo "$as_me:$LINENO: checking for /etc/man.conf" >&5
-$as_echo_n "checking for /etc/man.conf... " >&6; }
-if test "${ac_cv_file__etc_man_conf+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/etc/man.conf"; then
-  ac_cv_file__etc_man_conf=yes
-else
-  ac_cv_file__etc_man_conf=no
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__etc_man_conf" >&5
-$as_echo "$ac_cv_file__etc_man_conf" >&6; }
-if test "x$ac_cv_file__etc_man_conf" = x""yes; then
-  MANCONF="/etc/man.conf"
-else
-  { $as_echo "$as_me:$LINENO: checking for /etc/man.config" >&5
-$as_echo_n "checking for /etc/man.config... " >&6; }
-if test "${ac_cv_file__etc_man_config+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/etc/man.config"; then
-  ac_cv_file__etc_man_config=yes
-else
-  ac_cv_file__etc_man_config=no
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__etc_man_config" >&5
-$as_echo "$ac_cv_file__etc_man_config" >&6; }
-if test "x$ac_cv_file__etc_man_config" = x""yes; then
-  MANCONF="/etc/man.config"
-else
-  { $as_echo "$as_me:$LINENO: checking for /etc/manpath.config" >&5
-$as_echo_n "checking for /etc/manpath.config... " >&6; }
-if test "${ac_cv_file__etc_manpath_config+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/etc/manpath.config"; then
-  ac_cv_file__etc_manpath_config=yes
-else
-  ac_cv_file__etc_manpath_config=no
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__etc_manpath_config" >&5
-$as_echo "$ac_cv_file__etc_manpath_config" >&6; }
-if test "x$ac_cv_file__etc_manpath_config" = x""yes; then
-  MANCONF="/etc/manpath.config"
-else
-  { $as_echo "$as_me:$LINENO: checking for /usr/share/misc/man.conf" >&5
-$as_echo_n "checking for /usr/share/misc/man.conf... " >&6; }
-if test "${ac_cv_file__usr_share_misc_man_conf+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/share/misc/man.conf"; then
-  ac_cv_file__usr_share_misc_man_conf=yes
-else
-  ac_cv_file__usr_share_misc_man_conf=no
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_misc_man_conf" >&5
-$as_echo "$ac_cv_file__usr_share_misc_man_conf" >&6; }
-if test "x$ac_cv_file__usr_share_misc_man_conf" = x""yes; then
-  MANCONF="/usr/share/misc/man.conf"
-fi
-
-fi
-
-fi
-
-fi
-
-fi
-
-if test x$MANCONF != x ; then
-
-cat >>confdefs.h <<_ACEOF
-#define MANCONF "$MANCONF"
-_ACEOF
-
-
-    # Try to determine format of config file
-    # would be better to somehow determine from the files themselves, but
-    # we'll guess based on pathname and OS for now (mirrors old Imake tests)
-    { $as_echo "$as_me:$LINENO: checking man config file format" >&5
-$as_echo_n "checking man config file format... " >&6; }
-    if test x$MANCONF = x/etc/manpath.config ; then
-       MAN_CONFIG_STYLE="FreeBSD"
-    else
-       case $host_os in
-       *darwin* | *openbsd* | *netbsd* )
-           MAN_CONFIG_STYLE="OpenBSD"
-           ;;
-       *linux* | cygwin* )
-           MAN_CONFIG_STYLE="Linux"
-           ;;
-       *bsd* )
-           MAN_CONFIG_STYLE="BSD"
-           ;;
-       *)
-           ;;
-       esac
-    fi
-    { $as_echo "$as_me:$LINENO: result: $MAN_CONFIG_STYLE" >&5
-$as_echo "$MAN_CONFIG_STYLE" >&6; }
-
-    case $MAN_CONFIG_STYLE in
-       FreeBSD)
-
-cat >>confdefs.h <<\_ACEOF
-#define MANCONFIGSTYLE_FreeBSD 1
-_ACEOF
-
-           ;;
-       OpenBSD)
-
-cat >>confdefs.h <<\_ACEOF
-#define MANCONFIGSTYLE_OpenBSD 1
-_ACEOF
-
-           ;;
-       BSD)
-
-cat >>confdefs.h <<\_ACEOF
-#define MANCONFIGSTYLE_BSD 1
-_ACEOF
-
-           ;;
-       Linux)
-
-cat >>confdefs.h <<\_ACEOF
-#define MANCONFIGSTYLE_Linux 1
-_ACEOF
-
-           ;;
-       *)
-           { { $as_echo "$as_me:$LINENO: error: Could not determine man page file config format." >&5
-$as_echo "$as_me: error: Could not determine man page file config format." >&2;}
-   { (exit 1); exit 1; }; }
-    esac
-fi
-
-
-
-
-pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for APPDEFS" >&5
-$as_echo_n "checking for APPDEFS... " >&6; }
-
-if test -n "$APPDEFS_CFLAGS"; then
-    pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$APPDEFS_LIBS"; then
-    pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xt\"") >&5
-  ($PKG_CONFIG --exists --print-errors "xt") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1`
-        else
-               APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPDEFS_PKG_ERRORS" >&5
-
-       { { $as_echo "$as_me:$LINENO: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-$as_echo "$as_me: error: Package requirements (xt) were not met:
-
-$APPDEFS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables APPDEFS_CFLAGS
-and APPDEFS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-else
-       APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
-       APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-       :
-fi
-xt_appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
-
-# Check whether --with-appdefaultdir was given.
-if test "${with_appdefaultdir+set}" = set; then
-  withval=$with_appdefaultdir; appdefaultdir="$withval"
-else
-  appdefaultdir="${xt_appdefaultdir}"
-fi
-
-
 
 ac_config_files="$ac_config_files Makefile"
 
@@ -6037,7 +5594,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xman $as_me 1.1.0, which was
+This file was extended by xpr $as_me 1.0.3, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6100,7 +5657,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-xman config.status 1.1.0
+xpr config.status 1.0.3
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
similarity index 78%
rename from ico/configure.ac
rename to xpr/configure.ac
index e8a433f..c040ffb 100644 (file)
@@ -22,23 +22,25 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
-AC_INIT(ico,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],ico)
+AC_INIT(xpr,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xpr)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+         [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AC_PROG_INSTALL
 
+XORG_DEFAULT_OPTIONS
+
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(ICO, x11 >= 0.99.1)
-AC_SUBST(ICO_CFLAGS)
-AC_SUBST(ICO_LIBS)
-XTHREADLIB=`$PKG_CONFIG --variable=xthreadlib x11`
-AC_SUBST(XTHREADLIB)
-
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
+PKG_CHECK_MODULES(XPR, xmuu x11)
+AC_SUBST(XPR_CFLAGS)
+AC_SUBST(XPR_LIBS)
 
 AC_OUTPUT([Makefile])
similarity index 100%
rename from bitmap/depcomp
rename to xpr/depcomp
similarity index 100%
rename from bitmap/install-sh
rename to xpr/install-sh
similarity index 61%
rename from xman/globals.c
rename to xpr/lncmd.h
index e880953..ac8a344 100644 (file)
@@ -1,7 +1,7 @@
-/* $XConsortium: globals.c,v 1.9 94/04/17 20:43:51 rws Exp $ */
+/* $XConsortium: lncmd.h,v 10.8 94/04/17 20:44:03 rws Exp $ */
 /*
 
-Copyright (c) 1987, 1988  X Consortium
+Copyright (c) 1985  X Consortium
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
@@ -30,25 +30,23 @@ from the X Consortium.
 */
 
 
-#include "man.h"
+/* lncmd.h - Command sequences DEC printers, in particular LN0x laser
+   printers */
 
-Xman_Resources resources;      /* Resource manager sets these. */
-
-/* bookkeeping global variables. */
-
-Widget help_widget;            /* The help widget. */
-
-int default_height,default_width; /* Approximately the default with and
-                                           height, of the manpage when shown,
-                                           the the top level manual page 
-                                           window */
-
-Manual * manual;               /* The manual structure. */
-int sections;                  /* The number of manual sections. */
-
-int man_pages_shown;           /* The current number of manual
-                                  pages being shown, if 0 we exit. */
-
-Widget initial_widget;         /* The initial widget, never realized. */
-
-XContext manglobals_context;   /* The context for man_globals. */
+/*
+#define LN_RIS             "\033c"  Obsolete; causes LN03+ problems
+*/
+#define LN_STR             "\033[!p"
+#define LN_SSU             "\033[%d I"
+#define LN_PUM_SET         "\033[11h"
+#define LN_PFS             "\033[%s J"
+#define LN_DECSLRM         "\033[%d;%ds"
+#define LN_HPA             "\033[%d`"
+#define LN_VPA             "\033[%dd"
+#define LN_SIXEL_GRAPHICS  "\033P%d;%d;%dq"
+#define LN_ST              "\033\\"
+#define LN_DECOPM_SET      "\033[?52h"
+#define LN_DECOPM_RESET    "\033[?52I"
+#define LN_SGR             "\033[1%dm"
+#define LN_PUM             "\033[11I"
+#define LN_LNM             "\033[20h"
similarity index 100%
rename from bitmap/missing
rename to xpr/missing
diff --git a/xpr/pmp.h b/xpr/pmp.h
new file mode 100644 (file)
index 0000000..09b1a32
--- /dev/null
+++ b/xpr/pmp.h
@@ -0,0 +1,66 @@
+/*
+ *     $XConsortium: pmp.h,v 1.5 91/02/19 22:13:33 converse Exp $
+ */
+
+/* Written by Jose' J. Capo' */
+/* (jjc@comet.lcs.mit.edu), June 1987 */
+
+/* WARNING!!!:  Include this header after the standard headers (like */
+ /* <stdio.h>) of  the following might cause another header to */
+ /* redefine BUFSIZ */
+#ifndef BUFSIZ
+#define BUFSIZ 1024
+#endif
+
+#define MAX_FRAME_LEN  512
+#define MAX_VECTOR_LEN 65535
+
+#define DBG(cond)      if (dbg cond)
+#define DEBUG(cond)    if (debug cond)
+#define min(a,b)       ((a) < (b)? (a) : (b))
+
+#define pel2inch(pels)         ((float) ((pels) / PPI))
+#define ppmask(rounded,thickness)      (0x20 * (rounded) + (thickness))
+
+
+#define min(a,b)       ((a) < (b)? (a) : (b))
+#define lo(x)  ((x) & 0xFF)
+#define hi(x)  (((x) & 0xFF00) >>8)
+#define hi2(x) (((x) & 0xFF0000) >>16)
+#define p_wput(w, f)   {\
+                          (void) putc(hi(w), (f)); \
+                          (void) putc(lo(w), (f));\
+                      }
+#define PMP(f, len)    { fprintf(f, "\033[C"); \
+                           p_putlh(f, len);\
+                     }
+#define p_putlh(f, w)  {\
+                          (void) putc(lo(w), (f));\
+                          (void) putc(hi(w), (f)); \
+                      }
+
+/* hi-lo 2-byte integer */
+/* int hl2int(unsigned char *) */
+#define hl2int(hl2)    ((int) (0x100 * *(hl2) + *((hl2)+1)))
+
+/* putlh2(FILE *, int) */
+#define puthl2(i, f) { (void) putc(hi((i)), (f));\
+                      (void) putc(lo((i)), (f));\
+                    }
+
+/* hi-lo 3-byte integer */
+/* long hl3long(unsigned char *) */
+#define hl3long(hl3)   ((long) (0x10000 * *(hl3) + \
+                                0x100 * *((hl3)+1) + *((hl3)+2)))
+
+/* puthl3(FILE *, long) */
+#define puthl3(l, f) { (void) putc(hi2((l)), (f));\
+                      (void) putc(hi((l)), (f));\
+                      (void) putc(lo((l)), (f));\
+                    }
+
+/* int int2sgn(int) */
+#define int2sgn(i)     (((i) > 0x8000 - 1)? (i)- 0x10000: (i))
+
+/* int long3sgn(long) */
+#define long3sgn(l)    (((l) > 0x800000 - 1)? (l) - 0x1000000 : (l))
diff --git a/xpr/x2jet.c b/xpr/x2jet.c
new file mode 100644 (file)
index 0000000..63e3430
--- /dev/null
@@ -0,0 +1,1707 @@
+/* $XConsortium: x2jet.c,v 1.6 94/04/17 20:44:03 rws Exp $ */
+
+/* -*-C-*-
+********************************************************************************
+*
+* File:         x2jet.c
+* RCS:          x2jet.c,v 1.23 89/07/17 12:02:51 lori Exp
+* Description:  xpr support for HP LaserJet and PaintJet printers
+* Author:       Larry Rupp, HP Graphics Technology Division
+* Created:      Fri Jul 15 15:22:26 1988
+* Modified:     Thu Sep 15 11:59:34 1988 (Larry Rupp) ler@hpfcler
+*               Tue Dec  6 10:04:43 PST 1988 (Marc Ayotte) marca@hp-pcd
+* Language:     C
+* Package:      N/A
+* Status:       Released to MIT
+*
+* (c) Copyright 1988, Hewlett-Packard Company.
+*
+********************************************************************************
+*/
+
+
+
+
+
+/********************************************************
+
+Copyright (c) 1988 by Hewlett-Packard Company
+
+Permission to use, copy, modify, and distribute this software 
+and its documentation for any purpose and without fee is hereby 
+granted, provided that the above copyright notice appear in all 
+copies and that both that copyright notice and this permission 
+notice appear in supporting documentation, and that 
+Hewlett-Packard not be used in advertising or publicity 
+pertaining to distribution of the software without specific, written 
+prior permission.
+
+********************************************************/
+/*
+
+Copyright (c) 1988  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+*/
+
+\f
+#include <stdio.h>
+#include <stdarg.h>
+#include <X11/Xlib.h>
+#include <X11/XWDFile.h>
+
+#include "xpr.h"
+
+#ifdef  NLS16
+#ifndef NLS
+#define        NLS
+#endif
+#endif
+
+#ifndef NLS
+#define catgets(i, sn,mn,s) (s)
+#else /* NLS */
+#define NL_SETN 2      /* set number */
+#include <nl_types.h>
+
+extern nl_catd nlmsg_fd;
+
+#endif /* NLS */
+
+#ifndef        TRUE
+#  define      FALSE   0
+#  define      TRUE    1
+#endif
+
+/* default printable page area (inches) */
+#define STDWIDTH 8.0
+#define STDHEIGHT 10.5
+
+/* header & trailer character cell size (centipoints) */
+#define CHARWIDTH 720
+#define CHARHEIGHT 1200
+
+#define XWDHEADERSIZE  (sizeof(XWDFileHeader))
+#define XCOLORSIZE     (sizeof(XColor))
+
+
+typedef struct { long width, height; } Area;
+typedef struct { long x, y; } Location;
+
+
+static Area limit;     /* image clip limits (dots) */
+static Area page;      /* printable page size (centipoints) */
+
+static Location headerloc;     /* centipoint location of header string */
+static Location trailerloc;    /* centipoint location of trailer string */
+static Location imageloc;      /* centipoint location of image */
+
+static int headerlimit;                /* number of chars which will printed for */
+static int trailerlimit;       /*  the image's header/trailer strings    */
+
+static XWDFileHeader xwd_header;
+
+static XColor *xwd_colors;
+
+static char *xwd_image;
+
+static unsigned long Z_pixel_mask;
+
+static int true_scale;
+
+typedef struct {
+  unsigned long Rmask, Gmask, Bmask;
+  int Rshift, Gshift, Bshift;
+} RGBshiftmask;
+
+/* Local prototypes */
+static void set_image_limits (  int scale, int density,  enum orientation orient,  Area print_area);
+static void set_header_trailer_limits (char *header, char *trailer, long printwidth);
+static void set_print_locations (  int scale, int density,  int top, int left,  const char *header, const char *trailer,  enum orientation orient,  int position_on_page);
+static int scale_raster (
+  int density,
+  enum orientation orient,
+  Area print_area);
+static void scale_and_orient_image (
+  int *scale, int *density,
+  int width, int height, int left, int top,  /* in 300ths of an inch */
+  const char *header, const char *trailer,
+  enum orientation *orient,
+  int position_on_page,
+  enum device device);
+static void setup_RGBshiftmask (RGBshiftmask *sm, unsigned long rmask, unsigned long gmask, unsigned long bmask);
+static void swap_black_and_white (void);
+static void reset_color_mapping (void);
+static void prepare_color_mapping (
+  int invert, int paintjet,
+  unsigned int cutoff,
+  FILE *out);
+static
+void select_grey (int level, int *r, int *g, int *b);
+static int load_printer_color (
+  long index,
+  int nearmatch,
+  enum device device);
+static int lookup_color_index (long i);
+static void select_printer_color (
+  long index,
+  int *red, int *green, int *blue,
+  long *compositeRGB,
+  enum device device);
+static int color_already_in_printer (long compositeRGB, long *pindex);
+static int program_new_printer_color (
+  int red, int green, int blue,
+  long compositeRGB,
+  long *pindex);
+static long composite_diff (long x, long y);
+static long find_nearest_programmed_color (long compositeRGB);
+static void add_index_to_chain (
+  long cindex,
+  long pindex);
+static int load_printer_color_DT (
+  long index,
+  int nearmatch,
+  enum device device);
+static int load_line_colors (
+  long *line,
+  int length, int nearmatch,
+  enum device device);
+static void download_colors (
+  long *line,
+  int length,
+  enum device device);
+static void validate_visual(void);
+static void read_xwd_data (FILE *in);
+static void write_image_prefix (
+  FILE *out,
+  int scale, int density,
+  const char *header,
+  enum device device,
+  int position_on_page, int initial_formfeed,
+  enum orientation orient,
+  float gamma,
+  int render,
+  int slide);
+static void write_image_suffix (
+  FILE *out,
+  const char *trailer,
+  int position_on_page,
+  int slide, int render,
+  enum device device);
+static unsigned long Z_image_pixel (int x, int y);
+static unsigned long XY_image_pixel (int x, int y);
+static void direct_by_pixel(
+  FILE *out,
+  long *line,
+  int length,
+  enum device device);
+static void index_by_pixel(
+  FILE *out,
+  long *line,
+  int length);
+static void write_raster_line (
+  FILE *out,
+  int scale,
+  enum device device,
+  long *line,
+  int length);
+static void write_portrait_Z_image (
+  FILE *out,
+  int scale,
+  enum device device);
+static void write_landscape_Z_image (
+  FILE *out,
+  int scale,
+  enum device device);
+static void write_portrait_XY_image (
+  FILE *out,
+  int scale,
+  enum device device);
+static void write_landscape_XY_image (
+  FILE *out,
+  int scale,
+  enum device device);
+static void write_Z_image (
+  FILE *out,
+  int scale,
+  enum orientation orient,
+  enum device device);
+static void write_XY_image (
+  FILE *out,
+  int scale,
+  enum orientation orient,
+  enum device device);
+static void write_image (
+  FILE *out,
+  int scale,
+  enum orientation orient,
+  enum device device);
+static void fatal_err (const char *s, ...)
+#if defined(__GNUC__) && (__GNUC__ > 2)
+__attribute__((noreturn, format(printf, 1, 2)))
+#endif
+    ;
+
+\f
+/* Computes the centipoint width of one printer dot. */
+#define dot_centipoints(s,d)   ((7200.0 * (s)) / (d))
+
+static
+void set_image_limits (
+  int scale, int density,
+  enum orientation orient,
+  Area print_area)
+{
+  Area print_dots;
+  double dotsize;
+
+  /* Set dotsize to the centipoint width of one printer dot. */
+  dotsize = dot_centipoints(scale, density);
+
+  if (orient == PORTRAIT) {
+    print_dots.width = print_area.width / dotsize;
+    print_dots.height = print_area.height / dotsize;
+  } else {
+    print_dots.height = print_area.width / dotsize;
+    print_dots.width = print_area.height / dotsize;
+  }
+
+  limit.width = (print_dots.width < xwd_header.pixmap_width)
+               ? print_dots.width : xwd_header.pixmap_width;
+  limit.height = (print_dots.height < xwd_header.pixmap_height)
+               ? print_dots.height : xwd_header.pixmap_height;
+
+  if ((limit.width != xwd_header.pixmap_width)
+      || (limit.height != xwd_header.pixmap_height))
+    fprintf(stderr,(catgets(nlmsg_fd,NL_SETN,1, "%s: Warning: %ld x %ld image clipped to %ld x %ld.\n")),
+           progname,
+           xwd_header.pixmap_width, xwd_header.pixmap_height,
+           limit.width, limit.height);
+}
+
+
+static
+void set_header_trailer_limits (char *header, char *trailer, long printwidth)
+{
+  /* Determine the number of header and trailer characters
+   * that will fit into the available printing area.
+   */
+  headerlimit = header ? (((strlen(header) * CHARWIDTH) <= printwidth)
+                         ? strlen(header) : (printwidth / CHARWIDTH))
+                      : 0;
+  if (header && headerlimit != strlen(header)) {
+    fprintf(stderr,(catgets(nlmsg_fd,NL_SETN,2,
+               "%s: Warning: Header string clipped to %d characters.\n")),
+               progname, headerlimit);
+    header[headerlimit] = '\0';
+  }
+
+  trailerlimit = trailer ? (((strlen(trailer) * CHARWIDTH) <= printwidth)
+                           ? strlen(trailer) : (printwidth / CHARWIDTH))
+                        : 0;
+  if (trailer && trailerlimit != strlen(trailer)) {
+    fprintf(stderr,(catgets(nlmsg_fd,NL_SETN,3,
+               "%s: Warning: Trailer string clipped to %d characters.\n")),
+               progname, trailerlimit);
+    trailer[headerlimit] = '\0';
+  }
+}
+
+\f
+static
+void set_print_locations (
+  int scale, int density,
+  int top, int left,
+  const char *header, const char *trailer,
+  enum orientation orient,
+  int position_on_page)
+{
+  Area image;
+  double dotsize;
+
+  /* Set dotsize to the centipoint width of one printer dot. */
+  dotsize = dot_centipoints(scale, density);
+
+  /* Compute the centipoint size of the clipped image area. */
+  if (orient == PORTRAIT) {
+    image.width = limit.width * dotsize;
+    image.height = limit.height * dotsize;
+  } else {
+    image.height = limit.width * dotsize;
+    image.width = limit.height * dotsize;
+  }
+
+  if (position_on_page) {
+    /* set vertical positions */
+    imageloc.y = (top >= 0)
+             ? top * 24 + ((header) ? CHARHEIGHT : 0)
+             : ((page.height - ((header) ? CHARHEIGHT : 0)
+                 - image.height - ((trailer) ? CHARHEIGHT : 0)) / 2)
+               + ((header) ? CHARHEIGHT : 0);
+    headerloc.y = imageloc.y - CHARHEIGHT / 4;
+    trailerloc.y = imageloc.y + image.height + (3 * CHARHEIGHT) / 4;
+
+    /* set horizontal positions */
+    if (left >= 0)
+      headerloc.x = imageloc.x = trailerloc.x = left * 24;
+    else {
+      headerloc.x = (page.width - headerlimit * CHARWIDTH) / 2;
+      imageloc.x = (page.width - image.width) / 2;
+      trailerloc.x = (page.width - trailerlimit * CHARWIDTH) / 2;
+    }
+  }
+}
+
+\f
+static
+int scale_raster (
+  int density,
+  enum orientation orient,
+  Area print_area)
+{
+  Area image;
+  int h_scale, v_scale;
+
+  /* Set the image dimensions to the number of centipoints that would be
+   * required for printing at the selected density.
+   */
+  if (orient == PORTRAIT) {
+    image.width = xwd_header.pixmap_width * 7200 / density;
+    image.height = xwd_header.pixmap_height * 7200 / density;
+  } else {
+    image.height = xwd_header.pixmap_width * 7200 / density;
+    image.width = xwd_header.pixmap_height * 7200 / density;
+  }
+
+  /* Calculate the maximum image multiplier along
+   * the horizontal and vertical dimensions.
+   */
+  h_scale = print_area.width / image.width;
+  v_scale = print_area.height / image.height;
+
+  /* If the image can be expanded, return the lesser of the horizontal and
+   * vertical multipliers.  Otherwise, the image will not completely fit
+   * the available print area, so just return 1 as the expansion factor.
+   */
+  return (((h_scale > 0) && (v_scale > 0))
+         ? ((h_scale<v_scale) ? h_scale : v_scale)
+         : 1);
+}
+
+\f
+static
+void scale_and_orient_image (
+  int *scale, int *density,
+  int width, int height, int left, int top,  /* in 300ths of an inch */
+  const char *header, const char *trailer,
+  enum orientation *orient,
+  int position_on_page,
+  enum device device)
+{
+  Area usable;
+
+  /* Determine printable area expressed in centipoints.  There are 7200
+   * centipoints to the inch.  The width and height parameters passed in
+   * are expressed in 300ths of an inch, therefore a 24x conversion factor
+   * is used on the parameter values.  The default page dimensions STDWIDTH
+   * and STDHEIGHT are expressed in inches so must be multiplied by 7200
+   * to convert to centipoints.
+   */
+  page.width = (width >= 0) ? width * 24 : STDWIDTH * 7200;
+  page.height = (height >= 0) ? height * 24 : STDHEIGHT * 7200;
+
+  /* Paintjet Xl has a mechanical form feed, not a strip feed. It has
+   * a slop of about 1/4 to 1/2 of an inch at the top and bottom.
+   * deduct it from the page height.
+   */
+  if (device == PJETXL)
+     page.height = page.height - 7200;
+
+  /* Determine the area usable for the image.  This area will be smaller
+   * than the total printable area if margins or header/trailer strings
+   * have been specified.  Margins, like width and height discussed above,
+   * are expressed in 300ths of an inch and must be converted to centipoints.
+   * Header and trailer strings each reduce the available image height
+   * by 1/6 inch, or 1200 centipoints (aka CHARHEIGHT).
+   */
+  usable.width = page.width - ((left > 0) ? (left * 24) : 0);
+  usable.height = page.height - ((top > 0) ? (top * 24) : 0)
+                 - ((header) ? CHARHEIGHT : 0)
+                 - ((trailer) ? CHARHEIGHT : 0);
+
+  /* Quit here if there is no usable image space. */
+  if ((usable.width <= 0) || (usable.height <= 0)) {
+    fatal_err((catgets(nlmsg_fd,NL_SETN,4,
+                               "No space available on page for image.")));
+  }
+
+  /* Determine image orientation.  The orientation will only be changed if
+   * it was not specified by a command line option.  Portrait mode will be
+   * used if either the usable printing area or the image area are square.
+   * Portrait mode will also be used if the long dimensions of the usable
+   * printing area and the image area match, otherwise landscape mode is
+   * used.  Portrait mode really means "don't rotate" and landscape mode
+   * means "rotate".
+   */
+  if (*orient == UNSPECIFIED) {
+    if ((usable.width == usable.height)
+       || (xwd_header.pixmap_width == xwd_header.pixmap_height))
+      *orient = PORTRAIT;
+    else
+      *orient = ((usable.width < usable.height)
+                == (xwd_header.pixmap_width < xwd_header.pixmap_height))
+       ? PORTRAIT : LANDSCAPE;
+  }
+
+  /* Set the dots-per-inch print density if it was not specified */
+  if (*density <= 0) {
+    switch(device) {
+       case   LJET: *density = 300;
+                    break;
+       case   PJET: *density = 90;
+                    break;
+       case PJETXL:
+       default:            *density = 180;
+                    break;
+    }
+  }
+
+  /* Fit image to available area if scale was not specified */
+  if (*scale <= 0)
+    *scale = scale_raster(*density, *orient, usable);
+
+  /* Determine image clipping limits */
+  set_image_limits(*scale, *density, *orient, usable);
+
+  /* Determine header/trailer string length clipping */
+  set_header_trailer_limits((char *)header, (char *)trailer, usable.width);
+
+  /* Calculate locations for page layout */
+  set_print_locations(*scale, *density, top, left,
+                     header, trailer, *orient, position_on_page);
+
+}
+
+\f
+static unsigned short fullintensity;
+
+#define BLACK 1
+#define WHITE 0
+#define EMPTY -1
+#define MAX_PJ_COLOR 16
+
+#define RGBmatch(r,g,b,i)      (r == i) && (g == i) && (b == i)
+
+
+/* Colormap array is used to map from the Xcolor array (xwd_colors) index
+ * numbers into a pjcolor index number.  This style of mapping is done when
+ * interpreting non-Direct/TrueColor visual types.
+ */
+static long *colormap;
+
+
+/* Pjcolor array is used to hold the scaled RGB triple values 
+ * programmed into the printer.
+ */
+static long pjcolor[MAX_PJ_COLOR];
+
+
+static int color_warning_given = FALSE;
+
+
+/* Global visual type indicator, used to select color interpretation method. */
+static char Direct_or_TrueColor;
+
+
+/* Color index element definition, these are linked into a circular list
+ * for interpretation of DirectColor or TrueColor visual types.
+ */
+typedef struct colorindex {
+  long index;
+  long pjcolor_index;
+  struct colorindex *next;
+} COLORINDEX;
+
+
+/* Global data for color interpretation.  This structure serves as a home
+ * for the color index lists (only used when processing DirectColor or
+ * TrueColor visual types).  It also holds color processing switches and a     
+ * pointer to the output file to reduce parameter passing overhead.
+ */
+static struct {
+  int PaintJet;
+  int Invert;
+  unsigned int CutOff;
+  FILE *OutFile;
+  COLORINDEX *indexchain, *freechain;
+  RGBshiftmask sm;
+} color;
+
+\f
+static
+void setup_RGBshiftmask (
+  RGBshiftmask *sm,
+  unsigned long rmask, unsigned long gmask, unsigned long bmask)
+{
+  sm->Rmask = rmask;  sm->Gmask = gmask;  sm->Bmask = bmask;
+  sm->Rshift = 0;     sm->Gshift = 0;     sm->Bshift = 0;
+
+  if (!rmask)
+    fatal_err((catgets(nlmsg_fd,NL_SETN,5, "red mask for visual is zero.")));
+  if (!gmask)
+    fatal_err((catgets(nlmsg_fd,NL_SETN,6, "green mask for visual is zero.")));
+  if (!bmask)
+    fatal_err((catgets(nlmsg_fd,NL_SETN,7, "blue mask for visual is zero.")));
+
+  for (; !(rmask & 1); sm->Rshift++)
+    rmask >>= 1;
+  for (; !(gmask & 1); sm->Gshift++)
+    gmask >>= 1;
+  for (; !(bmask & 1); sm->Bshift++)
+    bmask >>= 1;
+}
+
+
+static
+void swap_black_and_white (void)
+{
+  /* Reverse black and white in the Xcolor structure array. */
+
+  XColor *color;
+  int n;
+
+  for (n=xwd_header.ncolors, color=xwd_colors;  n>0;  n--, color++)
+    if (RGBmatch((color->red & fullintensity), (color->green & fullintensity),
+                               (color->blue & fullintensity), fullintensity))
+      color->red = color->green = color->blue = 0;
+    else if (RGBmatch(color->red, color->green, color->blue, 0))
+      color->red = color->green = color->blue = fullintensity;
+}
+
+\f
+static
+void reset_color_mapping (void)
+{
+  int n;
+  long *cmap;
+  COLORINDEX *splice;
+
+  for (n=0; n<MAX_PJ_COLOR; n++)
+    pjcolor[n] = EMPTY;
+
+  if (!color.PaintJet) {
+    /* preload for monochrome output */
+    pjcolor[0] = WHITE;
+    pjcolor[1] = BLACK;
+  }    
+
+  if (Direct_or_TrueColor) {
+    /* move color index chain cells onto the free list */
+    if (color.indexchain != NULL) {
+      splice = color.indexchain->next;
+      color.indexchain->next = color.freechain;
+      color.freechain = splice;
+      color.indexchain = NULL;
+    }
+  } else if (color.PaintJet)
+    for (n=xwd_header.ncolors, cmap=colormap;  n>0;  n--, cmap++)
+      *cmap = EMPTY;
+}
+
+\f
+#define Intensity(r,g,b)       ((r) * 0.30 + (g) * 0.59 + (b) * 0.11)
+
+static
+void prepare_color_mapping (
+  int invert, int paintjet,
+  unsigned int cutoff,
+  FILE *out)
+{
+  int n;
+  long *cmap;
+  XColor *xcolor;
+
+  for (n = xwd_header.bits_per_rgb, fullintensity = 0; n > 0; n--)
+     fullintensity = (fullintensity << 1) | 1;
+  for (n = sizeof(short) * 8 - xwd_header.bits_per_rgb; n > 0; n--)
+     fullintensity = (fullintensity << 1);
+     
+  Direct_or_TrueColor =  (xwd_header.visual_class == DirectColor
+                         || xwd_header.visual_class == TrueColor);
+  color.PaintJet = paintjet;
+  color.Invert = invert;
+  color.CutOff = cutoff;
+  color.OutFile = out;
+  color.indexchain = NULL;
+  color.freechain = NULL;
+
+  if (Direct_or_TrueColor)
+    setup_RGBshiftmask(&color.sm, xwd_header.red_mask,
+                      xwd_header.green_mask, xwd_header.blue_mask);
+  else {
+    if (!(colormap = (long *) malloc(xwd_header.ncolors * sizeof(long))))
+      fatal_err((catgets(nlmsg_fd,NL_SETN,24,
+               "Could not allocate memory for X-to-printer colormap.")));
+
+    /* For PaintJet, color map assignment will be done one line at a time.
+     * So for now just interchange the Xcolor structure's black and white
+     * if the -rv command line option was specified.
+     */
+    if (paintjet && invert)
+      swap_black_and_white();
+
+    /* For LaserJet, map each color to black or white based upon the
+     * combined intensity of the RGB components.  Note that the normal
+     * non-reversed (-rv) LaserJet mapping will represent light areas
+     * of the screen as black on the paper.
+     */
+    if (!paintjet)
+      for (n=xwd_header.ncolors, xcolor=xwd_colors, cmap=colormap;  n>0;
+          n--, xcolor++, cmap++)
+       *cmap = (Intensity(xcolor->red, xcolor->green, xcolor->blue) < cutoff)
+               ? (invert ? BLACK : WHITE)
+               : (invert ? WHITE : BLACK);
+  }
+  reset_color_mapping();
+}
+
+\f
+/* On a PaintJet printer, the programmable color intensity ranges are:
+ *
+ *     red:    4..90           green:  4..88           blue:   6..85
+ *
+ * The following macros map the 0..65535 intensity ranges of X colors
+ * into the PaintJet's ranges.
+ */
+
+#define fixred(x)      (x / 762 + 4)
+#define fixgreen(x)    (x / 780 + 4)
+#define fixblue(x)     (x / 829 + 6)
+
+#define is_grey(r,g,b) ((r == g) && (r == b))
+
+
+static
+void select_grey (int level, int *r, int *g, int *b)
+{
+  /* Forced selection of a grey.  This is done since the PaintJet does
+   * not do very well when picking greys, they tend to become pink!
+   */
+  if (level > 66) {  /* white */
+    *r = 90;    *g = 88;    *b = 85;
+  } else if (level > 35) {
+    *r = 43;    *g = 43;    *b = 45;
+  } else if (level > 21) {
+    *r = 25;    *g = 25;    *b = 33;
+  } else if (level > 15) {
+    *r = 15;    *g = 16;    *b = 18;
+  } else if (level > 11) {
+    *r = 14;    *g = 14;    *b = 18;
+  } else if (level > 6) {
+    *r =  6;    *g =  7;    *b =  8;
+  } else {  /* black */
+    *r =  4;    *g =  4;    *b =  6;
+  }
+}
+
+\f
+static
+int load_printer_color (
+  long index,
+  int nearmatch,
+  enum device device) /* for non Direct/TrueColor */
+{
+  int n, red, blue, green, xred, xgreen, xblue;
+  long compositeRGB;
+    
+  if (colormap[index] != EMPTY)
+    /* printer has already been programmed for this color index */
+    return(1); /* "success" */
+  else {
+    xred   = xwd_colors[index].red;
+    xgreen = xwd_colors[index].green;
+    xblue  = xwd_colors[index].blue;
+    /* determine the scaled RGB PaintJet color values */
+    if (device == PJET) {
+       red   = fixred(xred);
+       green = fixgreen(xgreen);
+       blue  = fixblue(xblue);
+       if (is_grey(xred, xgreen, xblue))  /* assist grey selection */
+          select_grey(red, &red, &green, &blue);
+    }
+    compositeRGB = (red << 16) | (green << 8) | blue;
+    /* search for a matching or unused PaintJet mapping entry */
+    for (n=0; n<MAX_PJ_COLOR; n++) {
+      if (pjcolor[n] == compositeRGB) {
+       /* record mapping for this index */
+       colormap[index] = n;
+       /* return "success" */
+       return(1);
+      } else if (pjcolor[n] == EMPTY) {
+       /* download color to printer */
+       fprintf(color.OutFile,"\033*v%dA", red);
+       fprintf(color.OutFile,"\033*v%dB", green);
+       fprintf(color.OutFile,"\033*v%dC", blue);
+       fprintf(color.OutFile,"\033*v%dI", n);
+       /* record that this is now programmed */
+       pjcolor[n] = compositeRGB;
+       colormap[index] = n;
+       /* return "success" */
+       return(1);
+      }
+    }
+    /* unable to find or program this color */
+    if (nearmatch)
+      colormap[index] = find_nearest_programmed_color(compositeRGB);
+  }
+  return(0);  /* "failure" */
+}
+
+\f
+/* Lookup the image color index on the color.indexchain list.  If found
+ * return the corresponding printer color index, otherwise -1.  The index
+ * chain is a singly linked circular list.  Its head pointer is left at
+ * the last cell matched on the theory that this will allow faster lookup
+ * for runs of color.
+ */
+static
+int lookup_color_index (long i)
+{
+  COLORINDEX *start, *current;
+
+  start = current = color.indexchain;
+
+  if (current == NULL)
+    return(-1);  /* not found */
+
+  do {
+    if (current->index == i) {
+      color.indexchain = current;
+      return(current->pjcolor_index);  /* found */
+    }
+    current = current->next;
+  } while (current != start);
+
+  return(-1);  /* not found */
+}
+
+\f
+/* Calculate the individual and composite printer RGB values.  (Only the
+ * composite value is set for monochrome output.)
+ */
+static
+void select_printer_color (
+  long index,
+  int *red, int *green, int *blue,
+  long *compositeRGB,
+  enum device device)
+{
+  int xred, xgreen, xblue;
+
+  xred   = xwd_colors[((index & color.sm.Rmask) >> color.sm.Rshift)].red;
+  xgreen = xwd_colors[((index & color.sm.Gmask) >> color.sm.Gshift)].green;
+  xblue  = xwd_colors[((index & color.sm.Bmask) >> color.sm.Bshift)].blue;
+
+  if (color.PaintJet) {
+    if (color.Invert) {
+      if (RGBmatch((xred & fullintensity), (xgreen & fullintensity),
+                               (xblue & fullintensity), fullintensity))
+       xred = xgreen = xblue = 0;
+      else if (RGBmatch(xred, xgreen, xblue, 0))
+       xred = xgreen = xblue = fullintensity;
+    }
+    /* determine the scaled RGB PaintJet color values */
+    if (device == PJET) {
+       *red   = fixred(xred);
+       *green = fixgreen(xgreen);
+       *blue  = fixblue(xblue);
+       if (is_grey(xred, xgreen, xblue))  /* assist grey selection */
+         select_grey(*red, red, green, blue);
+    }
+    if (device == PJETXL) {
+       *red   = xred >> 8;
+       *green = xgreen >> 8;
+       *blue  = xblue >> 8;
+    }
+    *compositeRGB = (*red << 16) | (*green << 8) | *blue;
+  } else  /* monochrome */
+    *compositeRGB = (Intensity(xred, xgreen, xblue) < color.CutOff)
+                   ? (color.Invert ? BLACK : WHITE)
+                   : (color.Invert ? WHITE : BLACK);
+}
+
+
+
+/* Search for a color matching the compositeRGB value in the array of
+ * colors already programmed into the printer.  Returns 1 if found,
+ * 0 otherwise.  The matching array index is returned in pindex.
+ */
+static
+int color_already_in_printer (long compositeRGB, long *pindex)
+{
+  int n;
+
+  for (n=0; n<MAX_PJ_COLOR; n++)
+    if (pjcolor[n] == EMPTY)
+      return(0);  /* not found */
+    else if (pjcolor[n] == compositeRGB) {
+      *pindex = n;
+      return(1);  /* found */
+    }
+  return(0);  /* not found */
+}
+
+\f
+static
+int program_new_printer_color (
+  int red, int green, int blue,
+  long compositeRGB,
+  long *pindex)
+{
+  int n;
+
+  for (n=0; n<MAX_PJ_COLOR; n++)
+    if (pjcolor[n] == EMPTY) {
+      /* download color to printer */
+      fprintf(color.OutFile,"\033*v%dA", red);
+      fprintf(color.OutFile,"\033*v%dB", green);
+      fprintf(color.OutFile,"\033*v%dC", blue);
+      fprintf(color.OutFile,"\033*v%dI", n);
+      /* record that this is now programmed */
+      pjcolor[n] = compositeRGB;
+      *pindex = n;
+      /* return "success" */
+      return(1);
+    }
+  /* unable to program this color, return "failure" */
+  return(0);
+}
+
+
+static
+long composite_diff (long x, long y)
+{
+  long r = (x >> 16 & 0xFF) - (y >> 16 & 0xFF);
+  long g = (x >> 8 & 0xFF) - (y >> 8 & 0xFF);
+  long b = (x & 0xFF) - (y & 0xFF);
+
+  return(r*r + g*g + b*b);
+}
+
+
+static
+long find_nearest_programmed_color (long compositeRGB)
+{
+  int n, nearest = 0;
+  long neardiff = composite_diff(pjcolor[0], compositeRGB);
+  long diff;
+
+  for (n=1; n<MAX_PJ_COLOR; n++) {
+    diff = composite_diff(pjcolor[n], compositeRGB);
+    if (diff < neardiff) {
+      neardiff = diff;
+      nearest = n;
+    }
+  }
+  return(nearest);
+}
+
+\f
+static
+void add_index_to_chain (
+  long cindex,
+  long pindex)
+{
+  COLORINDEX *new;
+
+  /* Get a new cell for the color index chain.  Take it from the free list
+   * if possible, otherwise malloc space.
+   */
+  if (color.freechain == NULL) {
+    if (!(new = (COLORINDEX *) malloc(sizeof(COLORINDEX))))
+      fatal_err((catgets(nlmsg_fd,NL_SETN,8,
+                       "Could not allocate memory for color translation.")));
+  } else {
+    new = color.freechain;
+    color.freechain = color.freechain->next;
+  }
+
+  /* put index values in the new cell */
+  new->index = cindex;
+  new->pjcolor_index = pindex;
+
+  /* link the new cell into the chain */
+  if (color.indexchain == NULL)
+    new->next = new;
+  else {
+    new->next = color.indexchain->next;
+    color.indexchain->next = new;
+  }
+  /* leave head pointer at the new cell */
+  color.indexchain = new;
+}
+
+
+static
+int load_printer_color_DT (
+  long index,
+  int nearmatch,
+  enum device device) /* for Direct/TrueColor */
+{
+  int pjred, pjgreen, pjblue;
+  long compositeRGB;
+  long pindex;
+
+  if (lookup_color_index(index) >= 0)
+    return(1); /* "success" */
+  else {
+    select_printer_color(index, &pjred, &pjgreen, &pjblue, &compositeRGB,
+                               device);
+    if (color_already_in_printer(compositeRGB, &pindex)) {
+      add_index_to_chain(index, pindex);
+      return(1);  /* success */
+    } else if (program_new_printer_color(pjred, pjgreen, pjblue,
+                                        compositeRGB, &pindex)) {
+      add_index_to_chain(index, pindex);
+      return(1);  /* success */
+    } else if (nearmatch) {
+      add_index_to_chain(index, find_nearest_programmed_color(compositeRGB));
+      return(0);  /* failure, sorta... */
+    }
+  }
+  return(0); /* failure */
+}
+
+\f
+static
+int load_line_colors (
+  long *line,
+  int length, int nearmatch,
+  enum device device)
+{
+  int result = 1;  /* initialized to "success" */
+
+  for (; length>0; length--, line++) {
+    result &= Direct_or_TrueColor
+             ? load_printer_color_DT(*line, nearmatch, device)
+             : load_printer_color(*line, nearmatch, device);
+    if (!(nearmatch || result))
+      break;
+  }
+  return(result);
+}
+
+
+static
+void download_colors (
+  long *line,
+  int length,
+  enum device device)
+{
+  /* For the first attempt at loading the colors for a line only exact
+   * color matches are accepted.  If this fails, the closest colors are
+   * accepted on the second attempt.
+   *
+   * Note: The first "if" test below bypasses the initial color loading
+   * attempt for monochrome output (which will only come here for Direct
+   * or TrueColor mono).  This forces reset_color_mapping which is
+   * necessary to keep the color index chain down to a tolerable length.
+   */
+  if (!color.PaintJet || !load_line_colors(line, length, FALSE, device)) {
+    reset_color_mapping();
+    if (!load_line_colors(line, length, TRUE, device) &&
+                                       !color_warning_given) {
+      fprintf(stderr,(catgets(nlmsg_fd,NL_SETN,9,
+                       "%s: Warning: Cannot print all image colors.\n")),
+               progname);
+      color_warning_given = TRUE;
+    }
+  }
+}
+
+\f
+static
+void validate_visual(void)
+{
+  int depth = xwd_header.pixmap_depth;
+  char *errmsg = catgets(nlmsg_fd,NL_SETN,25,
+                               "%d bit deep %s bitmap not supported.\n");
+
+  switch (xwd_header.visual_class) {
+  case GrayScale:
+    if (depth > 8)  fatal_err(errmsg, depth, "GrayScale");    break;
+  case StaticGray:
+    if (depth > 8)  fatal_err(errmsg, depth, "StaticGray");    break;
+  case PseudoColor:
+    if (depth > 8)  fatal_err(errmsg, depth, "PseudoColor");    break;
+  case StaticColor:
+    if (depth > 8)  fatal_err(errmsg, depth, "StaticColor");    break;
+  case DirectColor:
+  case TrueColor:
+    if (depth != 12 && depth != 24)
+       fatal_err(errmsg, depth, (xwd_header.visual_class == DirectColor)
+                               ? "DirectColor" : "TrueColor");
+    break;
+  default:
+    fatal_err((catgets(nlmsg_fd,NL_SETN,26,
+                      "visual class #%d not supported.\n")),
+             (int)xwd_header.visual_class);
+  }
+}
+
+static
+void read_xwd_data (FILE *in)
+{
+#   define WINDOW_NAME_ALLOC   32
+    unsigned long swaptest = 1;
+    int window_name_size;
+    int image_size;
+    int n;
+    char window_name [WINDOW_NAME_ALLOC];
+
+    /* Read in XWDFileHeader structure */
+    if (fread((char*) &xwd_header, 1, XWDHEADERSIZE, in) != XWDHEADERSIZE)
+       fatal_err((catgets(nlmsg_fd,NL_SETN,10,
+                               "Could not read xwd file's header.")));
+
+    if (*(char *) &swaptest)
+        _swaplong((char *) &xwd_header, XWDHEADERSIZE);
+
+    validate_visual();
+
+    /* Skip over window name */
+    window_name_size = xwd_header.header_size - XWDHEADERSIZE;
+    while (window_name_size > 0) {
+       n = window_name_size > WINDOW_NAME_ALLOC
+           ? WINDOW_NAME_ALLOC : window_name_size;
+       if (fread(window_name, 1, n, in) != n)
+           fatal_err((catgets(nlmsg_fd,NL_SETN,11,
+                               "Could not read xwd file's window name.")));
+       window_name_size -= n;
+    }
+
+    /* Allocate space for xwd color structures */
+    if (!(xwd_colors = (XColor*) malloc(sizeof(XColor) * xwd_header.ncolors)))
+       fatal_err((catgets(nlmsg_fd,NL_SETN,12,
+                       "Could not allocate memory for xwdfile color table.")));
+
+    /* Read in xwd color structures */
+    for (n = 0; n < xwd_header.ncolors; n++)
+       if (fread(&xwd_colors[n], 1, XCOLORSIZE, in) != XCOLORSIZE)
+           fatal_err((catgets(nlmsg_fd,NL_SETN,13,
+                               "Could not read xwd file's color table.")));
+
+    if (*(char *) &swaptest) {
+        for (n = 0; n < xwd_header.ncolors; n++) {
+            _swaplong((char *) &xwd_colors[n].pixel, sizeof(long));
+            _swapshort((char *) &xwd_colors[n].red, 3 * sizeof(short));
+        }
+     }
+
+    /* Allocate space for xwd image */
+    if (xwd_header.pixmap_format == ZPixmap)
+       image_size = 1;
+    else if (xwd_header.pixmap_format == XYPixmap)
+       image_size = xwd_header.pixmap_depth;
+    else
+       fatal_err((catgets(nlmsg_fd,NL_SETN,14,
+                       "Image in xwd file is not in Z or XY pixmap format.")));
+    image_size *= xwd_header.bytes_per_line * xwd_header.pixmap_height;
+    if (!(xwd_image = malloc(image_size)))
+       fatal_err((catgets(nlmsg_fd,NL_SETN,15,
+                       "Could not allocate memory for xwd file's image.")));
+
+    /* Read in xwd image */
+    if (fread(xwd_image, 1, image_size, in) != image_size)
+       fatal_err((catgets(nlmsg_fd,NL_SETN,16,
+                       "Could not read xwd file's image.")));
+
+}
+
+\f
+static
+void write_image_prefix (
+  FILE *out,
+  int scale, int density,
+  const char *header,
+  enum device device,
+  int position_on_page, int initial_formfeed,
+  enum orientation orient,
+  float gamma,
+  int render,
+  int slide)
+{
+  if (initial_formfeed)
+    fprintf(out,"\014");
+
+  /* Write out header & positioning commands */
+  if (header) {
+    if (position_on_page)
+      fprintf(out,"\033&a%dH\033&a%dV",
+             /* headerloc x & y are written in decipoints */
+             (int) headerloc.x / 10, (int) headerloc.y / 10);
+    fprintf(out,"%s\n", header);
+  }
+
+  /* Prepare printer for raster graphics: */
+
+  /* Write image positioning commands */
+  if (position_on_page)
+    fprintf(out,"\033&a%dH\033&a%dV",
+           /* imageloc x & y are written in decipoints */
+           (int) imageloc.x / 10, (int) imageloc.y / 10);
+  
+  /* If doing transparencies, tell the printer before raster graphics */
+  if (slide && device != LJET)
+     fprintf(out, "\033&k3W");
+
+  /* Set printer resolution */
+  fprintf(out,"\033*t%dR", density);
+
+  /*
+   * do device dependent escape sequences
+   */
+  if (device == PJET) {
+    /* Enable all four "planes" for PaintJet */
+    fprintf(out,"\033*r4U");
+
+    /* Set picture width for PaintJet */
+    fprintf(out,"\033*r%dS",
+           (int) (((orient == PORTRAIT) ? limit.width : limit.height)
+                  * scale));
+  }
+
+  /* Enable various options for PaintJet XL */
+  if (device == PJETXL) {
+    double dotsize;
+    int n;
+
+    /* Speed up printing by telling that there
+     * will be no negative positioning
+     */
+    fprintf(out, "\033&a1N");
+
+    if (gamma > 0.009)
+       fprintf(out, "\033*t%.2fI", gamma);
+
+    if (render > 0)
+       fprintf(out, "\033*t%dJ", render);
+
+    if (Direct_or_TrueColor)
+       /* Enable direct by pixel for PaintJet XL */
+       fwrite("\033*v6W\000\003\010\010\010\010", 1, 11, out);
+    else {
+       /* Enable index by pixel for PaintJet XL */
+       fwrite("\033*v6W\000\001\010\010\010\010", 1, 11, out);
+
+       /* Program the palette */
+       for (n = 0; n < xwd_header.ncolors; n++) {
+          fprintf(out,"\033*v%dA", (xwd_colors[n].red >> 8));
+          fprintf(out,"\033*v%dB", (xwd_colors[n].green >> 8));
+          fprintf(out,"\033*v%dC", (xwd_colors[n].blue >> 8));
+          fprintf(out,"\033*v%dI", n);
+       }
+    }
+
+    /****************************************
+     *                                      *
+     * PaintJet XL will do its own scaling  *
+     *                                      *
+     * Set picture width for PaintJet XL    *
+     ****************************************/
+    fprintf(out,"\033*r%dS",
+           (int) ((orient == PORTRAIT) ? xwd_header.pixmap_width
+                  : xwd_header.pixmap_height));
+    fprintf(out,"\033*r%dT",
+           (int) ((orient == PORTRAIT) ? xwd_header.pixmap_height
+                  : xwd_header.pixmap_width));
+
+    dotsize = dot_centipoints(scale, density);
+
+    fprintf(out,"\033*t%dH",
+               (int)(((orient == PORTRAIT) ? xwd_header.pixmap_width
+                                        : xwd_header.pixmap_height)
+                        * dotsize / 10));
+
+    fprintf(out,"\033*t%dV",
+               (int)(((orient == PORTRAIT) ? xwd_header.pixmap_height
+                                        : xwd_header.pixmap_width)
+                        * dotsize / 10));
+  }
+
+  /* Switch to raster graphics mode */
+  if (device != PJETXL)
+     fprintf(out,"\033*r1A");
+  else
+     fprintf(out,"\033*r3A");
+
+}
+
+\f
+static
+void write_image_suffix (
+  FILE *out,
+  const char *trailer,
+  int position_on_page,
+  int slide, int render,
+  enum device device)
+{
+  /* Exit raster graphics mode */
+  if (device == PJETXL)
+     fprintf(out,"\033*rC");
+  else
+     fprintf(out,"\033*rB");
+
+  /* If doing transparencies, tell it to stop */
+  if (slide && device != LJET)
+     fprintf(out, "\033&k1W");
+
+  if (device == PJETXL) {
+     /* If selected a rendering algorithm, tell it to stop */
+     if (render)
+        fprintf(out, "\033*t3J");
+     fprintf(out, "\033&a0N");
+  }
+
+  /* Write out trailer & positioning commands */
+  if (trailer) {
+    if (position_on_page)
+      fprintf(out,"\033&a%dH\033&a%dV",
+             /* trailerloc x & y are written in decipoints */
+             (int) trailerloc.x / 10, (int) trailerloc.y / 10);
+    fprintf(out,"%s\n", trailer);
+  }
+}
+
+\f
+static
+unsigned long Z_image_pixel (int x, int y)
+{
+  int pixel_bytes, offset;
+  unsigned char *image;
+  unsigned long pixel;
+
+  pixel_bytes = xwd_header.bits_per_pixel >> 3;
+  offset = ((xwd_header.bits_per_pixel == 4) ? (x / 2)
+            : ((xwd_header.bits_per_pixel == 1) ? (x / 8)
+               : (x * pixel_bytes)))
+           + (y * xwd_header.bytes_per_line);
+
+  image = (unsigned char *) &xwd_image[offset];
+
+  switch (pixel_bytes) {
+  case 0:  /* pixel per nibble or bit per pixel packing */
+    if (xwd_header.bits_per_pixel == 1) {
+      if (xwd_header.byte_order == MSBFirst)
+       pixel = *image >> (7 - (x % 8));
+      else
+       pixel = *image >> (x % 8);
+    } else {  /* xwd_header.bits_per_pixel == 4 */
+      if (xwd_header.byte_order == MSBFirst)
+       pixel = (x & 1) ? *image : (*image >> 4);
+      else
+       pixel = (x & 1) ? (*image >> 4) : *image;
+    }
+    break;
+  case 1:
+    pixel = *image;
+    break;
+  case 2:
+    pixel = (xwd_header.byte_order == MSBFirst)
+            ? ((unsigned long)*image << 8 | *(image + 1))
+            : (*image | (unsigned long)*(image + 1) << 8);
+    break;
+  case 3:
+    pixel = (xwd_header.byte_order == MSBFirst)
+            ? ((unsigned long)*image << 16 |
+               (unsigned long)*(image + 1) << 8 |
+               (unsigned long)*(image + 2))
+            : (*image |
+               (unsigned long)*(image + 1) << 8 |
+               (unsigned long)*(image + 2) << 16);
+    break;
+  case 4:
+    pixel = (xwd_header.byte_order == MSBFirst)
+            ? ((unsigned long)*image << 24 |
+               (unsigned long)*(image+1) << 16 |
+               (unsigned long)*(image+2) << 8 |
+               *(image+3))
+            : (*image |
+               (unsigned long)*(image+1) << 8 |
+               (unsigned long)*(image+2) << 16 |
+               (unsigned long)*(image+3) << 24);
+    break;
+  default:
+    pixel = 0;
+    break;
+  }
+  return (pixel & Z_pixel_mask);
+}
+
+\f
+static
+unsigned long XY_image_pixel (int x, int y)
+{
+  int plane_start, line_start, bytes_per_bitmap_unit, bitmap_unit_start,
+      byte_within_bitmap_unit, offset, byte_mask;
+
+  plane_start = (xwd_header.pixmap_depth - 1) * xwd_header.pixmap_height
+               * xwd_header.bytes_per_line;
+  line_start = xwd_header.bytes_per_line * y;
+  bytes_per_bitmap_unit = xwd_header.bitmap_unit >> 3;
+  bitmap_unit_start = (x / xwd_header.bitmap_unit) * bytes_per_bitmap_unit;
+  byte_within_bitmap_unit = (xwd_header.byte_order == MSBFirst)
+    ? (x % xwd_header.bitmap_unit) >> 3
+    :  bytes_per_bitmap_unit - ((x % xwd_header.bitmap_unit) >> 3) - 1;
+
+  offset = plane_start + line_start + bitmap_unit_start
+          + byte_within_bitmap_unit;
+
+  byte_mask = (xwd_header.bitmap_bit_order == MSBFirst)
+      ? 0x80 >> (x % 8) : 0x01 << (x % 8);
+
+  return(xwd_image[offset] & byte_mask ? 1 : 0);
+}
+
+\f
+static
+void direct_by_pixel(
+  FILE *out,
+  long *line,
+  int length,
+  enum device device)
+{
+   int red, green, blue;
+   long compositeRGB;
+
+   fprintf(out, "\033*b%dW", length * 3);
+   for (; length>0; length--, line++) {
+      select_printer_color(*line, &red, &green, &blue, &compositeRGB, device);
+      fprintf(out, "%c%c%c", (char) red, (char) green, (char) blue);
+   }
+}
+
+\f
+static
+void index_by_pixel(
+  FILE *out,
+  long *line,
+  int length)
+{
+   register int n;
+   long *lp;
+   char *line_pixels;
+   register char *lc;
+  
+  if (!(line_pixels = malloc(length)))
+    fatal_err((catgets(nlmsg_fd,NL_SETN,17,
+                       "Could not allocate raster line memory.")));
+
+   for (n=0, lc=line_pixels, lp=line;  n<length;  n++)
+      *lc++ = (char) *lp++;
+
+   fprintf(out, "\033*b%dW", length);
+   fwrite(line_pixels, 1, length, out);
+
+   free(line_pixels);
+}
+
+\f
+static
+void write_raster_line (
+  FILE *out,
+  int scale,
+  enum device device,
+  long *line,
+  int length)
+{
+  int planes = (device == PJET) ? 4 : 1;
+  int raster_bytes = (length * scale + 7) / 8;
+  register int bytebits, n, p, e, bit;
+  long *lp;
+  char *line_colors, *raster_line;
+  register char *lc, *rl, byte = 0;
+  
+  if (device == PJETXL) {
+     if (Direct_or_TrueColor)
+        direct_by_pixel(out, line, length, device);
+     else
+        index_by_pixel(out, line, length);
+     return;
+  }
+
+  if (!(line_colors = malloc(length))
+      || !(raster_line = malloc(raster_bytes * planes)))
+    fatal_err((catgets(nlmsg_fd,NL_SETN,17,
+                       "Could not allocate raster line memory.")));
+
+  if (device == PJET || Direct_or_TrueColor)
+    download_colors(line, length, device);
+
+  /* Map the line's colors into output color index numbers */
+  if (Direct_or_TrueColor)
+    for (n=0, lc=line_colors, lp=line;  n<length;  n++)
+      *lc++ = (char) lookup_color_index(*lp++);
+  else
+    for (n=0, lc=line_colors, lp=line;  n<length;  n++)
+      *lc++ = (char) colormap[*lp++];
+
+  for (p=0;  p<planes;  p++) {
+    bytebits = 0;
+    n = length;
+    lc = line_colors;
+    rl = &raster_line[raster_bytes * p];
+    while (n-- > 0) {
+      bit = (*lc++ >> p) & 0x01;
+      e = scale;
+      while (e--) {
+       byte = (byte << 1) | bit;
+       bytebits++;
+       if (bytebits == 8) {
+         *rl++ = byte;
+         bytebits = 0;
+       }
+      }
+    }
+    if (bytebits)
+      *rl = byte << (8 - bytebits);
+  }
+
+  e = scale;
+  while (e--) {
+    for (p=0;  p<planes;  p++) {
+      fprintf(out,"\033*b%d%c", raster_bytes, (p+1 == planes) ? 'W' : 'V');
+      fwrite(&raster_line[raster_bytes * p], 1, raster_bytes, out);
+    }
+  }
+
+  free(line_colors);
+  free(raster_line);
+}
+
+\f
+static
+void write_portrait_Z_image (
+  FILE *out,
+  int scale,
+  enum device device)
+{
+  int x, y;
+  int width = limit.width;
+  int height = limit.height;
+  long *line, *lp;
+
+  if (!(line = (long *) malloc(width * sizeof(long))))
+    fatal_err((catgets(nlmsg_fd,NL_SETN,18,
+                       "Could not allocate memory for image line buffer.")));
+
+  for (y=0;  y<height;  y++) {
+
+    for (x=0, lp=line;  x<width;  x++)
+      *lp++ = Z_image_pixel(x,y);
+
+    write_raster_line(out, scale, device, line, width);
+  }
+}
+
+
+static
+void write_landscape_Z_image (
+  FILE *out,
+  int scale,
+  enum device device)
+{
+  int x, y;
+  int width = limit.height;
+  int height = limit.width;
+  long *line, *lp;
+
+  if (!(line = (long *) malloc(width * sizeof(long))))
+    fatal_err((catgets(nlmsg_fd,NL_SETN,19,
+                       "Could not allocate memory for image line buffer.")));
+
+  for (x=0;  x<height;  x++) {
+
+    for (y=width-1, lp=line;  y>=0;  y--)
+      *lp++ = Z_image_pixel(x,y);
+
+    write_raster_line(out, scale, device, line, width);
+  }
+}
+
+\f
+static
+void write_portrait_XY_image (
+  FILE *out,
+  int scale,
+  enum device device)
+{
+  int x, y;
+  int width = limit.width;
+  int height = limit.height;
+  long *line, *lp;
+
+  if (!(line = (long *) malloc(width * sizeof(long))))
+    fatal_err((catgets(nlmsg_fd,NL_SETN,20,
+                       "Could not allocate memory for image line buffer.")));
+
+  for (y=0;  y<height;  y++) {
+
+    for (x=0, lp=line;  x<width;  x++)
+      *lp++ = XY_image_pixel(x,y);
+
+    write_raster_line(out, scale, device, line, width);
+  }
+}
+
+
+static
+void write_landscape_XY_image (
+  FILE *out,
+  int scale,
+  enum device device)
+{
+  int x, y;
+  int width = limit.height;
+  int height = limit.width;
+  long *line, *lp;
+
+  if (!(line = (long *) malloc(width * sizeof(long))))
+    fatal_err((catgets(nlmsg_fd,NL_SETN,21,
+                       "Could not allocate memory for image line buffer.")));
+
+  for (x=0;  x<height;  x++) {
+
+    for (y=width-1, lp=line;  y>=0;  y--)
+      *lp++ = XY_image_pixel(x,y);
+
+    write_raster_line(out, scale, device, line, width);
+  }
+}
+
+\f
+static
+void write_Z_image (
+  FILE *out,
+  int scale,
+  enum orientation orient,
+  enum device device)
+{
+  if (orient == PORTRAIT) {
+    write_portrait_Z_image(out, scale, device);
+  } else
+    write_landscape_Z_image(out, scale, device);
+}
+
+
+static
+void write_XY_image (
+  FILE *out,
+  int scale,
+  enum orientation orient,
+  enum device device)
+{
+  if (xwd_header.pixmap_depth > 1)
+    fatal_err((catgets(nlmsg_fd,NL_SETN,22,
+               "XY format image, multiplane images must be Z format.")));
+
+  if (orient == PORTRAIT) {
+    write_portrait_XY_image(out, scale, device);
+  } else
+    write_landscape_XY_image(out, scale, device);
+}
+
+
+static
+void write_image (
+  FILE *out,
+  int scale,
+  enum orientation orient,
+  enum device device)
+{
+  switch (xwd_header.pixmap_format) {
+  case XYPixmap:
+    write_XY_image(out, scale, orient, device);  break;
+  case  ZPixmap:
+    write_Z_image(out, scale, orient, device);   break;
+  default: 
+    fatal_err((catgets(nlmsg_fd,NL_SETN,23, "image not in XY or Z format.")));
+  }
+}
+
+\f
+void x2jet(
+  FILE *in, FILE *out,
+  int scale, int density,
+  int width, int height, int left, int top,  /* in 300ths of an inch */
+  const char *header, const char *trailer,
+  enum orientation orient,
+  int invert, int initial_formfeed, int position_on_page, int slide,
+  enum device device,
+  unsigned int cutoff,
+  float gamma,
+  int render)
+{
+  int paintjet = FALSE;
+
+  true_scale = scale;
+
+  if (device != LJET)
+     paintjet = TRUE;
+
+  read_xwd_data(in);
+
+  Z_pixel_mask = ~(0xFFFFFFFFL << xwd_header.pixmap_depth);
+
+  prepare_color_mapping(invert, paintjet, cutoff, out);
+
+  scale_and_orient_image(&scale, &density, width, height, left, top,
+                        header, trailer,
+                        &orient, position_on_page, device);
+
+  write_image_prefix(out, scale, density, header, device, position_on_page,
+                    initial_formfeed, orient, gamma, render, slide);
+  
+  write_image(out, scale, orient, device);
+
+  write_image_suffix(out, trailer, position_on_page, slide, render, device);
+
+  fclose(out);
+}
+
+static
+void fatal_err (const char *s, ...)
+{
+    va_list    ap;
+
+    fprintf(stderr, "%s: ", progname);
+    va_start(ap, s);
+    vfprintf(stderr, s, ap);
+    va_end(ap);
+    fputc('\n', stderr);
+    exit(EXIT_FAILURE);
+}
+
diff --git a/xpr/x2pmp.c b/xpr/x2pmp.c
new file mode 100644 (file)
index 0000000..0af1761
--- /dev/null
@@ -0,0 +1,365 @@
+/*
+ *     $XConsortium: x2pmp.c,v 1.13 91/07/25 17:56:32 rws Exp $
+ */
+
+/* x2pmp.c: Translate xwd window dump format into PMP format for the
+ * IBM 3812 PagePrinter.
+ */
+#include <stdio.h>
+#include <math.h>
+#include <X11/Xlib.h>
+#include <X11/XWDFile.h>
+#include <X11/Xfuncs.h>
+#include <errno.h>
+
+#include "pmp.h"
+#include "xpr.h"
+
+#define max_(a, b) ((a) > (b) ? (a) : (b))
+#define min_(a, b) ((a) < (b) ? (a) : (b))
+#define abs_(a)    ((a) < 0 ? -(a) : (a))
+
+
+/* Local prototypes */
+static unsigned char *magnification_table(int scale);
+static int bits_set(int n);
+static void leave(const char *s);
+static void p_move_abs(FILE *p, int x, int y);
+static void p_save_cursor(FILE *p, int reg);
+static void p_restore_cursor(FILE *p, int reg);
+static void p_set_orientation(FILE *p, enum orientation orient);
+static void p_bitmap(
+  FILE *p,
+  unsigned int h, int w,
+  unsigned long buflen,
+  unsigned char *buf);
+
+static int plane = 0;
+#define FONT_HEIGHT 40
+#define FONT_HEIGHT_PIXELS (FONT_HEIGHT*75/PPI)
+#define FONT_WIDTH 24
+
+void x2pmp(FILE *in, FILE *out,
+  int scale,
+  int p_width, int p_length, int x_pos, int y_pos, /* in pels (units of PPI) */
+  char *head, char *foot,
+  enum orientation orient,
+  int invert)
+{
+    unsigned char *buffer, *win_name;
+    unsigned int win_name_size, width, height, ncolors;
+    unsigned int buffer_size, one_plane_size, byte_width, fixed_width;
+    int no_of_bits;
+    unsigned long swaptest = 1;
+    XWDFileHeader header;
+
+    /* Read header from file */
+    if (fread((char *)&header, sizeof(header), 1, in) != 1) {
+      if (feof(in)) 
+       return;
+      else
+       leave("fread");
+    }
+    if (*(char *) &swaptest)
+      _swaplong((char *) &header, sizeof(header));
+
+    if (header.file_version != XWD_FILE_VERSION) {
+       fprintf(stderr,"%s: file format version %d, not %d\n", progname,
+               (int)header.file_version, XWD_FILE_VERSION);
+    }
+
+    win_name_size = abs_(header.header_size - sizeof(header));
+    if ((win_name = (unsigned char *)
+        calloc(win_name_size, (unsigned) sizeof(char))) == NULL)
+      leave("Can't calloc window name storage.");
+
+    /* Read window name from file */
+    if (fread((char *) win_name, sizeof(char), (int) win_name_size, in) !=
+       win_name_size)
+      leave("Unable to read window name from dump file.");
+    DEBUG(>= 1)
+      fprintf(stderr,"win_name =%s\n", win_name);
+
+    width = header.pixmap_width;
+    height = header.pixmap_height;
+    fixed_width = 8 * (byte_width = header.bytes_per_line);
+    one_plane_size = byte_width * height;
+    buffer_size = one_plane_size *
+      ((header.pixmap_format == ZPixmap)? header.pixmap_depth: 1);
+    
+    /* Determine orientation and scale if not specified */
+    if (orient == UNSPECIFIED)
+      orient = (fixed_width <= height)? PORTRAIT: LANDSCAPE;
+    if (scale <= 0) {
+        int real_height = height;
+       if (head) real_height += FONT_HEIGHT_PIXELS << 1;
+       if (foot) real_height += FONT_HEIGHT_PIXELS << 1;
+       switch(orient) {
+       default:
+       case PORTRAIT:
+       case UPSIDE_DOWN:
+           scale = min_((p_width - 2*x_pos) / fixed_width,
+                        (p_length - 2*y_pos) / real_height);
+           break;
+       case LANDSCAPE:
+       case LANDSCAPE_LEFT:
+           scale = min_((p_length - 2*y_pos) / fixed_width,
+                        (p_width - 2*x_pos) / real_height);
+           break;
+       }
+       if (scale <= 0)
+         leave("PixMap doesn't fit on page.");
+       else DEBUG(>1)
+         fprintf(stderr, "scaling by %d to yield %d x %d image\n",
+                 scale, fixed_width*scale, height*scale);
+    }
+
+    ncolors = header.ncolors;
+    if (ncolors) {
+       int i;
+       XColor *colors = (XColor *)malloc((unsigned) (header.ncolors * sizeof(XColor)));
+
+       if (fread((char *)colors, sizeof(XColor), ncolors, in) != ncolors)
+         leave("Unable to read colormap from dump file.");
+
+       if (*(char *) &swaptest) {
+           for (i = 0; i < ncolors; i++) {
+               _swaplong((char *) &colors[i].pixel, (long)sizeof(long));
+               _swapshort((char *) &colors[i].red, (long) (3 * sizeof(short)));
+           }
+       }
+       if (ncolors == 2 && INTENSITY(&colors[0]) > INTENSITY(&colors[1]))
+           invert = !invert;
+       free( colors );
+    }
+
+    invert = !invert;          /* 3812 puts ink (i.e. black) on 1-bits */
+
+    if ((buffer = (unsigned char *) calloc(buffer_size, 1)) == NULL)
+      leave("Can't calloc data buffer.");
+    bzero((char *) buffer, (int) buffer_size);
+
+    /* Read bitmap from file */
+    if (fread((char *) buffer, sizeof(char), (int) buffer_size, in)
+       != buffer_size)
+      leave("Unable to read pixmap from dump file.");
+
+    if (header.bitmap_bit_order == LSBFirst)
+    {
+       unsigned char bitswap[256], *bp;
+       int c;
+       for(c = 256; c--;) {
+           bitswap[c] = ((c & 01) << 7) + ((c & 02) << 5) + ((c & 04) << 3) +
+             ((c & 010) << 1) + ((c & 020) >> 1) + ((c & 040) >> 3) +
+               ((c & 0100) >> 5) + ((c & 0200) >> 7);
+           if (invert)
+             bitswap[c] = ~bitswap[c];
+       }
+       /* Here's where we do the bitswapping. */
+       for(bp = buffer+buffer_size; bp-- > buffer;)
+         *bp = bitswap[*bp];
+    }
+    else if (invert) {
+        unsigned char *bp;
+       for(bp = buffer+buffer_size; bp-- > buffer;)
+         *bp = ~*bp;
+    }
+
+    /* we don't want the last bits up to the byte/word alignment set */
+    if ((no_of_bits = fixed_width - width)) {
+       int i, j, mask = ~bits_set(no_of_bits % 8);
+       for(i = 0; i < height; i++) {
+           unsigned char *s = buffer + (i+1) * byte_width ;
+
+           for(j = no_of_bits / 8; j--;)
+             *--s = 0;
+           *--s &= mask;
+       }
+    }
+
+    DEBUG(>= 1)
+      fprintf(stderr,"read %d bytes for a %d (%d bytes) x %d image\n",
+             buffer_size, (int) width, byte_width, (int) height);
+    /* Scale the bitmap */
+    if (scale > 1) {
+       unsigned char *tbl = magnification_table(scale);
+       unsigned char *scale_buf;
+       int i, j, k;
+       
+       if ((scale_buf = (unsigned char *)
+            calloc((unsigned) (buffer_size *= scale*scale), sizeof(char)))
+           == NULL)
+         leave("Can't calloc scaled buffer.");
+       for(i = 0; i < height; i++) {
+           unsigned char *src, *ss;
+           src = buffer + i * byte_width ;
+           ss = scale_buf + i * scale * scale * byte_width;
+           for(j = 0; j < byte_width; j++) {
+               unsigned char *dst = ss+j*scale;
+               unsigned char *expansion = tbl+scale*src[j];
+               for(k = 0; k < scale; k++, dst += byte_width*scale) {
+                   bcopy((char *) expansion, (char *) dst, scale);
+               }
+           }
+       }
+       free((char *) buffer);
+       free((char *) tbl);
+       buffer = scale_buf;
+       byte_width *= scale;
+       width *= scale;
+       fixed_width *= scale;
+       height *= scale;
+       one_plane_size *= scale*scale;
+    }
+    DEBUG(==3) {
+       int i, j, k;
+       unsigned char *s;
+
+       fprintf(stderr, "dumping %d x %d grid\n", fixed_width, height);
+       for(i = 0; i < height; i++) {
+           s = buffer + i * byte_width ;
+           for(j = 0; j < byte_width; j++)
+             for(k = 8; k--;)
+               (void) putc((s[j] & 1<<k)? '*': '-', stderr);
+           (void) putc('\n', stderr);
+       }
+    }
+    p_set_orientation(out, orient);
+    p_restore_cursor(out, 0);
+    p_save_cursor(out, 3);
+    if (head != NULL) {
+       p_move_abs( out, x_pos + (width - strlen(foot)*FONT_WIDTH) >> 1,
+                        y_pos - FONT_HEIGHT );
+       fprintf(out, "%s\n", head);
+    }
+    if (foot != NULL) {
+       p_move_abs( out, x_pos + (width - strlen(foot)*FONT_WIDTH) >> 1,
+                        y_pos + height + (FONT_HEIGHT << 1) );
+       fprintf(out, "%s\n", foot);
+    }
+    p_move_abs(out, x_pos, y_pos);
+    p_bitmap(out, height, fixed_width, (unsigned long) one_plane_size,
+            buffer + plane * one_plane_size);
+    free((char *) win_name);
+    free((char *) buffer);
+}
+
+static
+unsigned char *magnification_table(int scale)
+{
+    unsigned char *tbl;
+    int c;
+
+    if ((tbl = (unsigned char *)
+        calloc((unsigned) (scale*256), sizeof(char))) == NULL)
+      leave("Can't calloc magnification table.");
+    bzero((char *) tbl, scale*256);
+    for(c = 256; c--;) {
+       int b = c, bit;
+       unsigned char *entry = tbl+c*scale;
+
+       while (b) {
+           int i, last, mask;
+           bit = 1;
+           mask = b;
+           while (! (mask & 1)) {
+               bit++;
+               mask = mask >> 1;
+           }
+           last = scale*(bit-1);
+           for(i = scale*bit; i-- > last ;)
+             entry[(scale - 1) - i / 8] |= 1 << (i % 8);
+           b &= ~(1 << bit-1);
+       }
+    }
+    return tbl;
+}
+
+/* returns 2^n-1, i.e. a number with bits n-1 through 0 set.
+ * (zero for n == 0) */
+static
+int bits_set(int n)
+{
+    int ans = 0;
+    while(n--)
+      ans |= 1 << n;
+    return ans;
+}
+
+static
+void leave(const char *s)
+{
+    fprintf(stderr, "\n%s: ", progname);
+    if (errno != 0)
+      perror(s);
+    else
+      fprintf(stderr, "%s", s);
+    fprintf(stderr, "\n");
+    exit(EXIT_FAILURE);
+}
+
+/* move to coordinates x, y (in pels) */
+static
+void p_move_abs(FILE *p, int x, int y)
+{
+    if (x >= 0)  {
+       PMP(p, 3);
+       (void) putc('\340', p);
+       p_wput(x, p);
+    }
+    if (y >= 0)  {
+       PMP(p, 3);
+       (void) putc('\341', p);
+       p_wput(y, p);
+    }
+}
+
+/* save current cursor position into (printer) register reg */
+static
+void p_save_cursor(FILE *p, int reg)
+{
+    PMP(p, 1);
+    (void) putc(reg + '\200', p);
+}
+
+/* restore current cursor position from (printer) register reg */
+static
+void p_restore_cursor(FILE *p, int reg)
+{
+    PMP(p, 1);
+    (void) putc(reg + '\220', p);
+}
+
+/* set the page orientation to orient (see pmp.h) */
+static
+void p_set_orientation(FILE *p, enum orientation orient)
+{
+    PMP(p, 2);
+    fprintf(p, "\322%c", (int) orient);
+}
+
+/* generate bitmap */
+static
+void p_bitmap(
+  FILE *p,
+  unsigned int h, int w,
+  unsigned long buflen,
+  unsigned char *buf)
+{
+    PMP(p, 9);
+    (void) fwrite("\365\0", 1, 2, p);
+    puthl2(h, p);
+    puthl2(w, p);
+    puthl3(buflen, p);
+    
+    while(buflen) {
+       int len;
+       
+       len = min(buflen, MAX_VECTOR_LEN);
+       PMP(p, len);
+       (void) fwrite((char *) buf, 1, len, p);
+       buf += len;
+       buflen -= len;
+    }
+    (void) fflush(p);
+}
diff --git a/xpr/xdpr.man b/xpr/xdpr.man
new file mode 100644 (file)
index 0000000..68a4eee
--- /dev/null
@@ -0,0 +1,136 @@
+.\" $XConsortium: xdpr.man,v 1.15 94/04/17 20:44:04 gildea Exp $
+.TH XDPR 1 "Release 6" "X Version 11"
+.SH NAME
+xdpr \- dump an X window directly to a printer
+.SH SYNOPSIS
+.B xdpr
+[
+.I filename
+]
+[
+.B \-display
+.I host:display
+]
+[
+.B \-P\fIprinter\fP
+]
+[
+.B \-device
+.I devtype
+]
+[
+.I option
+\&.\|.\|.
+]
+
+.SH DESCRIPTION
+.I Xdpr
+uses the commands 
+.I xwd,
+.I xpr, 
+and
+.I lpr
+or
+.I lp
+to dump an X window, process it for a particular printer type, and
+print it out on the printer of your choice.  This is the easiest way
+to get a printout of a window.  \fIXdpr\fP by default will print the
+largest possible representation of the window on the output page.
+.PP
+The options for \fIxdpr\fP are the same as those for \fIxpr\fP,
+\fIxwd\fP, and \fIlpr\fP or \fIlp\fP.
+The most commonly-used options are described
+below; see the manual pages for these commands for
+more detailed descriptions of the many options available.
+.SH OPTIONS
+.TP
+.I filename
+Specifies a file containing a window dump (created by \fIxwd\fP) to be
+printed instead of selecting an X window.
+.TP
+.B \-P\fIprinter\fP
+Specifies a printer to send the output to.  If a printer name is not
+specified here, \fIxdpr\fP (really, \fIlpr\fP or \fIlp\fP)
+will send your output to the
+printer specified by the \fIPRINTER\fP environment variable. 
+Be sure that type of the printer matches the type specified
+with the \fI\-device\fP option.
+.TP
+.B \-display \fIhost:display\fP[\fI.screen\fP]
+Normally,
+.I xdpr
+gets the host and display number to use from the environment
+variable ``DISPLAY.''
+One can, however, specify them explicitly; see \fIX\fP(1).
+.TP
+.B \-device \fIdevtype\fP
+Specifies the device on which the file will be printed.  Currently supported:
+.RS 12
+.PD 0
+.TP
+.B la100
+Digital LA100
+.TP
+.B ljet
+HP LaserJet series and other monochrome PCL devices
+such as ThinkJet, QuietJet, RuggedWriter, \s-1HP\s+12560 series,
+and HP 2930 series printers
+.TP
+.B ln03
+Digital LN03
+.TP
+.B pjet
+HP PaintJet (color mode)
+.TP
+.B pjetxl
+HP HP PaintJet XL Color Graphics Printer (color mode)
+.TP
+.B pp
+IBM PP3812
+.TP
+.B ps
+PostScript printer
+.PD
+.RE
+.IP
+The default is PostScript.
+\fB\-device lw\fP (LaserWriter) is equivalent to \fB\-device ps\fP and is
+provided only for backwards compatibility.
+.TP
+.B \-help
+This option displays the list of options known to
+.I xdpr.
+.PP
+Any other arguments 
+will be passed to the 
+.I xwd,
+.I xpr,
+and
+.I lpr
+or
+.I lp
+commands as appropriate for each.
+.SH SEE ALSO
+.IR xwd (1),
+.IR xpr (1),
+.IR lpr (1),
+.IR lp (1),
+.IR xwud (1),
+.IR X (1)
+.SH ENVIRONMENT
+.TP 10
+DISPLAY
+which display to use by default.
+.TP 10
+PRINTER
+which printer to use by default.
+.SH COPYRIGHT
+Copyright X Consortium
+.br
+See \fIX(1)\fP for a full statement of rights and permissions.
+.SH AUTHORS
+Paul Boutin, MIT Project Athena
+.br
+Michael R. Gretzinger, MIT Project Athena
+.br
+Jim Gettys, MIT Project Athena
diff --git a/xpr/xdpr.script b/xpr/xdpr.script
new file mode 100644 (file)
index 0000000..3ca4eb2
--- /dev/null
@@ -0,0 +1,166 @@
+#! /bin/sh
+# Copyright 1985,1988 Massacusetts Institute of Technology.
+# $XConsortium: xdpr.script /main/10 1995/12/08 11:10:59 swick $
+# origin: William Kucharski, Solbourne Computer, Inc. 3/24/90
+#         translated from csh script xdpr.script "paul 4/12/88"
+
+# initialize variables
+
+display="$DISPLAY"
+header=
+bsdlprv=
+lprv=
+out=
+svlprv=
+trailer=
+xprv=
+xwdv=
+
+usage="Usage: xdpr [filename] [-out filename ] \
+[-display host:display] [[-Pprinter] | [-dprinter]] [-device devtype] \
+[{-root | -id <id> | -name <name>}] [-nobdrs] [-xy] \
+[-scale scale] [-height inches] [-width inches] [-left inches] \
+[-top inches] [-split n] [-header string] [-trailer string] \
+[-landscape] [-portrait] [-rv] [-compact] [-noff] [-frame] \
+[-plane number] [-gray number] [-psfig] [-density dpi] \
+[-cutoff level] [-noposition] [-gamma correction] [-render algorithm] \
+[-slide] [-add value] [-help]"
+
+# Guess if we are BSD or System V
+
+if [ -x /usr/ucb/lpr -o -x /usr/bin/lpr -o -x /bin/lpr -o -x /usr/bsd/lpr ]
+then
+       LP=lpr
+       BSD=1
+elif [ -x /usr/bin/lp -o -x /bin/lp ]
+then
+       LP=lp
+       BSD=0
+else
+       LP=lpr
+       BSD=1
+fi
+
+# parse arguments...
+
+while [ $1 ]; do
+       case "$1" in
+
+# ...arguments interpreted by xdpr itself...
+
+       -help)
+               echo $usage;
+               exit 0;;
+
+# ...arguments to xwd...
+
+       -nobdrs|-root|-xy|-frame)
+               xwdv="$xwdv $1";;
+       -display)
+               display=$2
+               xwdv="$xwdv $1 $2";
+               shift;;
+       -id|-name)
+               xwdv="$xwdv $1 $2";
+               shift;;
+       -out|-add)
+               out=true
+               xwdv="$xwdv $1 $2";
+               shift;;
+
+# ...arguments to xpr...
+
+       -scale|-height|-width|-left|-top|-split|-device)
+               xprv="$xprv $1 $2";
+               shift;;
+       -plane|-gray|-density|-cutoff|-gamma|-render)
+               xprv="$xprv $1 $2";
+               shift;;
+       -header)
+               shift;
+               header="$1";;
+       -trailer)
+               shift;
+               trailer="$1";;
+       -landscape|-portrait|-rv|-compact|-noff|-psfig|-noposition|-slide)
+               xprv="$xprv $1";;
+
+# ...arguments to lp[r]...
+
+       -P*|-#?*|-C?*|-J?*|-h|-m)
+               bsdlprv="$lprv $1";;
+
+       -d*|-H*|-q*|-n*|-o*|-w)
+               svlprv="$svlprv $1";;
+
+# ...disallow other arguments; print usage message
+
+       -*)
+               echo "xdpr: Unknown option $1";
+               echo $usage;
+               exit 1;;
+
+# ...input filename...
+
+       *)
+               if [ ! "$infile" ]; then
+                       infile=true
+                       xprv="$xprv $1"
+               else
+                       echo "xdpr: Invalid argument "$1""
+                       echo $usage                     
+                       exit 1
+               fi
+       esac
+       shift
+done
+
+# quit if there is no DISPLAY specified
+
+if [ ! "$display" ]; then
+       echo "xdpr: DISPLAY variable must be set or a display specified."
+       exit
+fi
+
+# Command lines:
+
+# Set up lp[r] options...
+
+if [ $BSD -eq 0 ]
+then
+       lprv=$svlprv
+else
+       lprv=$bsdlprv
+fi
+
+# disallow concurrent input and  -out arguments
+if [ "$out" -a "$infile" ]; then
+       echo "xdpr: -out <filename> cannot be used if an input file is also specified."
+       exit 0
+fi
+
+# dump only
+if [ "$out" ]; then
+       if [ "$xprv" -o "$lprv" ]; then
+               echo "xdpr: The following arguments will be ignored:"
+               echo $xprv $lprv
+       fi
+       xwd $xwdv
+       exit 0
+fi
+
+# print only 
+if [ "$infile" ]; then
+       if [ "$xwdv" ]; then
+               echo "xdpr: The following arguments will be ignored:"
+               echo $xwdv
+       fi
+       xpr -header "$header" -trailer "$trailer" $xprv | $LP $lprv
+       exit 0
+fi
+
+# dump & print (default)
+xwd $xwdv | xpr -header "$header" -trailer "$trailer" $xprv | $LP $lprv
+exit 0 
+
+# EOF
diff --git a/xpr/xpr.c b/xpr/xpr.c
new file mode 100644 (file)
index 0000000..9f7f160
--- /dev/null
+++ b/xpr/xpr.c
@@ -0,0 +1,2008 @@
+/* $XConsortium: xpr.c,v 1.59 94/10/14 21:22:08 kaleb Exp $ */
+/*
+
+Copyright (c) 1985  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+*/
+
+/*
+ * XPR - process xwd(1) files for various printers
+ *
+ * Author: Michael R. Gretzinger, MIT Project Athena
+ *
+ * Modified by Marvin Solomon, Univeristy of Wisconsin, to handle Apple
+ * Laserwriter (PostScript) devices (-device ps).
+ * Also accepts the -compact flag that produces more compact output
+ * by using run-length encoding on white (1) pixels.
+ * This version does not (yet) support the following options
+ *   -append -dump -noff -nosixopt -split
+ * 
+ * Changes
+ * Copyright 1986 by Marvin Solomon and the University of Wisconsin
+ * 
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting
+ * documentation, and that the names of Marvin Solomon and
+ * the University of Wisconsin not be used in
+ * advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ * Neither Marvin Solomon nor the University of Wisconsin
+ * makes any representations about the suitability of
+ * this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ * 
+ * Modified by Bob Scheifler for 2x2 grayscale, then ...
+ * Modified by Angela Bock and E. Mike Durbin, Rich Inc., to produce output
+ * using 2x2, 3x3, or 4x4 grayscales. This version modifies the grayscale
+ * conversion option of -gray to accept an input of  2, 3, or 4 to signify
+ * the gray level desired.  The output is produced, using 5, 10, or 17-level
+ * gray scales, respectively.
+ *
+ * Modifications by Larry Rupp, Hewlett-Packard Company, to support HP
+ * LaserJet, PaintJet, and other PCL printers.  Added "ljet" and "pjet"
+ * to devices recognized.  Also added -density, -cutoff, and -noposition
+ * command line options.
+ *
+ */
+
+#include <X11/Xos.h>
+#include <X11/Xfuncs.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <stdio.h>
+#ifndef WIN32
+#include <pwd.h>
+#endif
+#include "lncmd.h"
+#include "xpr.h"
+#include <X11/XWDFile.h>
+#include <X11/Xmu/SysUtil.h>
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#ifdef NLS16
+#ifndef NLS
+#define        NLS
+#endif
+#endif
+
+#ifndef NLS
+#define catgets(i, sn,mn,s) (s)
+#else /* NLS */
+#define NL_SETN 1      /* set number */
+#include <nl_types.h>
+
+nl_catd nlmsg_fd;
+#endif /* NLS */
+
+int debug = 0;
+
+#define W_MAX 2400
+#define H_MAX 3150
+#define W_MARGIN 75
+#define H_MARGIN 37
+#define W_PAGE 2550
+#define H_PAGE 3225
+
+#ifdef NOINLINE
+#define min(x,y) (((x)<(y))?(x):(y))
+#endif /* NOINLINE */
+
+#define F_PORTRAIT 1
+#define F_LANDSCAPE 2
+#define F_DUMP 4
+#define F_NOSIXOPT 8
+#define F_APPEND 16
+#define F_NOFF 32
+#define F_REPORT 64
+#define F_COMPACT 128
+#define F_INVERT 256
+#define F_GRAY 512
+#define F_NPOSITION 1024
+#define F_SLIDE 2048
+
+#define DEFAULT_CUTOFF ((unsigned int) (0xFFFF * 0.50))
+
+static char *infilename = NULL;
+char *progname   = NULL;
+
+typedef struct _grayRec {
+    int level;
+    int sizeX, sizeY;          /* 2x2, 3x3, 4x4 */
+    unsigned long *grayscales; /* pointer to the encoded pixels */
+} GrayRec, *GrayPtr;
+
+static unsigned long grayscale2x2[] =
+       {0, 1, 9, 11, 15};
+static unsigned long grayscale3x3[] =
+       {0, 16, 68, 81, 325, 341, 349, 381, 383, 511};
+static unsigned long grayscale4x4[] =
+       {0, 64, 4160, 4161, 20545, 21057, 23105,
+        23113, 23145, 24169, 24171, 56939, 55275, 55279,
+        57327, 65519, 65535};
+
+static GrayRec gray2x2 = {sizeof(grayscale2x2)/sizeof(long), 2, 2, grayscale2x2};
+static GrayRec gray3x3 = {sizeof(grayscale3x3)/sizeof(long), 3, 3, grayscale3x3};
+static GrayRec gray4x4 = {sizeof(grayscale4x4)/sizeof(long), 4, 4, grayscale4x4};
+
+/* mapping tables to map a byte in to the hex representation of its
+ * bit-reversal
+ */
+static const
+char hex1[]="084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\
+084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\
+084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\
+084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f";
+
+static const
+char hex2[]="000000000000000088888888888888884444444444444444cccccccccccccccc\
+2222222222222222aaaaaaaaaaaaaaaa6666666666666666eeeeeeeeeeeeeeee\
+111111111111111199999999999999995555555555555555dddddddddddddddd\
+3333333333333333bbbbbbbbbbbbbbbb7777777777777777ffffffffffffffff";
+
+
+/* Local prototypes */
+static void usage(void);
+static
+void parse_args(
+  int argc,
+  char **argv,
+  int *scale,
+  int *width,
+  int *height,
+  int *left,
+  int *top,
+  enum device *device,
+  int *flags,
+  int *split,
+  char **header,
+  char **trailer,
+  int *plane,
+  GrayPtr *gray,
+  int *density,
+  unsigned int *cutoff,
+  float *gamma,
+  int *render);
+static
+void setup_layout(
+  enum device device,
+  int win_width,
+  int win_height,
+  int flags,
+  int width,
+  int height,
+  char *header,
+  char *trailer,
+  int *scale,
+  enum orientation *orientation);
+static
+char *convert_data(
+    XWDFileHeader *win,
+    char *data,
+    int plane,
+    GrayPtr gray,
+    XColor *colors,
+    int flags);
+static
+void dump_sixmap(
+  register unsigned char (*sixmap)[],
+  int iw,
+  int ih);
+static
+void build_sixmap(
+  int ih,
+  int iw,
+  unsigned char (*sixmap)[],
+  int hpad,
+  XWDFileHeader *win,
+  const char *data);
+static
+void ln03_setup(
+  int iw,
+  int ih,
+  enum orientation orientation,
+  int scale,
+  int left,
+  int top,
+  int *left_margin,
+  int *top_margin,
+  int flags,
+  const char *header,
+  const char *trailer);
+static void ln03_finish(void);
+static void la100_setup(int iw, int ih, int scale);
+static void la100_finish(void);
+static void dump_prolog(int flags);
+static int points(int n);
+static char *escape(const char *s);
+static
+void ps_setup(
+  int iw,
+  int ih,
+  enum orientation orientation,
+  int scale,
+  int left,
+  int top,
+  int flags,
+  const char *header,
+  const char *trailer,
+  const char *name);
+static void ps_finish(void);
+static
+void ln03_output_sixels(
+  unsigned char (*sixmap)[],
+  int iw,
+  int ih,
+  int nosixopt,
+  int split,
+  int scale,
+  int top_margin,
+  int left_margin);
+static void la100_output_sixels(
+  unsigned char (*sixmap)[],
+  int iw,
+  int ih,
+  int nosixopt);
+static void ps_output_bits(
+  int iw,
+  int ih,
+  int flags,
+  enum orientation orientation,
+  XWDFileHeader *win,
+  const char *data);
+static int ps_putbuf(
+  register unsigned char *s,
+  register int n,      
+  register int ocount, 
+  int compact);
+static void ps_bitrot(
+  unsigned char *s,
+  register int n,
+  int col,
+  register int owidth,
+  char *obuf);
+static void fullread (
+  int file,
+  char *data,
+  int nbytes);  
+  
+int main(int argc, char **argv)
+{
+    unsigned long swaptest = 1;
+    XWDFileHeader win;
+    register unsigned char (*sixmap)[];
+    register int i;
+    register int iw;
+    register int ih;
+    register int sixel_count;
+    char *w_name;
+    int scale, width, height, flags, split;
+    int left, top;
+    int top_margin, left_margin;
+    int hpad;
+    char *header, *trailer;
+    int plane;
+    int density, render;
+    unsigned int cutoff;
+    float gamma;
+    GrayPtr gray;
+    char *data;
+    long size;
+    enum orientation orientation;
+    enum device device;
+    XColor *colors = (XColor *)NULL;
+    
+    if (!(progname = argv[0]))
+      progname = "xpr";
+#ifdef NLS
+    nlmsg_fd = catopen("xpr", 0);
+#endif
+    parse_args (argc, argv, &scale, &width, &height, &left, &top, &device, 
+               &flags, &split, &header, &trailer, &plane, &gray,
+               &density, &cutoff, &gamma, &render);
+    
+    if (device == PP) {
+       x2pmp(stdin, stdout, scale,
+             width >= 0? inch2pel((float)width/300.0): X_MAX_PELS,
+             height >= 0? inch2pel((float)height/300.0): Y_MAX_PELS,
+             left >= 0? inch2pel((float)left/300.0): inch2pel(0.60),
+             top >= 0? inch2pel((float)top/300.0): inch2pel(0.70),
+             header, trailer,
+             (flags & F_PORTRAIT)? PORTRAIT:
+               ((flags & F_LANDSCAPE)? LANDSCAPE: UNSPECIFIED),
+             (flags & F_INVERT));
+       exit(0);
+    } else if ((device == LJET) || (device == PJET) || (device == PJETXL)) {
+        x2jet(stdin, stdout, scale, density, width, height, left, top,
+             header, trailer,
+             (flags & F_PORTRAIT)? PORTRAIT:
+             ((flags & F_LANDSCAPE)? LANDSCAPE: UNSPECIFIED),
+             (flags & F_INVERT),
+             ((flags & F_APPEND) && !(flags & F_NOFF)),
+             !(flags & F_NPOSITION),
+             (flags & F_SLIDE),
+             device, cutoff, gamma, render);
+       exit(0);
+    }
+
+    /* read in window header */
+    fullread(0, (char *)&win, sizeof win);
+    if (*(char *) &swaptest)
+       _swaplong((char *) &win, (long)sizeof(win));
+
+    if (win.file_version != XWD_FILE_VERSION) {
+       fprintf(stderr,"xpr: file format version missmatch.\n");
+       exit(1);
+    }
+    if (win.header_size < sizeof(win)) {
+       fprintf(stderr,"xpr: header size is too small.\n");
+       exit(1);
+    }
+
+    w_name = malloc((unsigned)(win.header_size - sizeof win));
+    fullread(0, w_name, (int) (win.header_size - sizeof win));
+    
+    if(win.ncolors) {
+       XWDColor xwdcolor;
+       colors = (XColor *)malloc((unsigned) (win.ncolors * sizeof(XColor)));
+       for (i = 0; i < win.ncolors; i++) {
+           fullread(0, (char*)&xwdcolor, (int) sizeof xwdcolor);
+           colors[i].pixel = xwdcolor.pixel;
+           colors[i].red = xwdcolor.red;
+           colors[i].green = xwdcolor.green;
+           colors[i].blue = xwdcolor.blue;
+           colors[i].flags = xwdcolor.flags;
+       }
+       if (*(char *) &swaptest) {
+           for (i = 0; i < win.ncolors; i++) {
+               _swaplong((char *) &colors[i].pixel, (long)sizeof(long));
+               _swapshort((char *) &colors[i].red, (long) (3 * sizeof(short)));
+           }
+       }
+       if ((win.ncolors == 2) &&
+           (INTENSITY(&colors[0]) > INTENSITY(&colors[1])))
+           flags ^= F_INVERT;
+    }
+    if (plane >= (long)win.pixmap_depth) {
+       fprintf(stderr,"xpr: plane number exceeds image depth\n");
+       exit(1);
+    }
+    size = win.bytes_per_line * win.pixmap_height;
+    if (win.pixmap_format == XYPixmap)
+       size *= win.pixmap_depth;
+    data = malloc((unsigned)size);
+    fullread(0, data, (int)size);
+    if ((win.pixmap_depth > 1) || (win.byte_order != win.bitmap_bit_order)) {
+       data = convert_data(&win, data, plane, gray, colors, flags);
+       size = win.bytes_per_line * win.pixmap_height;
+    }
+    if (win.bitmap_bit_order == MSBFirst) {
+       _swapbits((unsigned char *)data, size);
+       win.bitmap_bit_order = LSBFirst;
+    }
+    if (flags & F_INVERT)
+       _invbits((unsigned char *)data, size);
+
+    /* calculate orientation and scale */
+    setup_layout(device, (int) win.pixmap_width, (int) win.pixmap_height,
+                flags, width, height, header, trailer, &scale, &orientation);
+
+    if (device == PS) {
+       iw = win.pixmap_width;
+       ih = win.pixmap_height;
+       sixmap = NULL;
+    } else {
+       /* calculate w and h cell count */
+       iw = win.pixmap_width;
+       ih = (win.pixmap_height + 5) / 6;
+       hpad = (ih * 6) - win.pixmap_height;
+
+       /* build pixcells from input file */
+       sixel_count = iw * ih;
+       sixmap = (unsigned char (*)[])malloc((unsigned)sixel_count);
+       build_sixmap(iw, ih, sixmap, hpad, &win, data);
+    }
+
+    /* output commands and sixel graphics */
+    if (device == LN03) {
+/*     ln03_grind_fonts(sixmap, iw, ih, scale, &pixmap); */
+       ln03_setup(iw, ih, orientation, scale, left, top,
+                  &left_margin, &top_margin, flags, header, trailer);
+       ln03_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT), split, 
+                          scale, top_margin, left_margin);
+       ln03_finish();
+    } else if (device == LA100) {
+       la100_setup(iw, ih, scale);
+       la100_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT));
+       la100_finish();
+    } else if (device == PS) {
+       ps_setup(iw, ih, orientation, scale, left, top,
+                  flags, header, trailer, w_name);
+       ps_output_bits(iw, ih, flags, orientation, &win, data);
+       ps_finish();
+    } else {
+       fprintf(stderr, "xpr: device not supported\n");
+    }
+    
+    /* print some statistics */
+    if (flags & F_REPORT) {
+       fprintf(stderr, "Name: %s\n", w_name);
+       fprintf(stderr, "Width: %d, Height: %d\n", (int)win.pixmap_width, 
+               (int)win.pixmap_height);
+       fprintf(stderr, "Orientation: %s, Scale: %d\n", 
+               (orientation==PORTRAIT) ? "Portrait" : "Landscape", scale);
+    }
+    if (((device == LN03) || (device == LA100)) && (flags & F_DUMP))
+       dump_sixmap(sixmap, iw, ih);
+    exit(EXIT_SUCCESS);
+}
+
+static
+void usage(void)
+{
+    fprintf(stderr, "usage: %s [options] [file]\n", progname);
+    fprintf(stderr, "    -append <file>  -noff  -output <file>\n");
+    fprintf(stderr, "    -compact\n");
+    fprintf(stderr, "    -device {ln03 | la100 | ps | lw | pp | ljet | pjet | pjetxl}\n");
+    fprintf(stderr, "    -dump\n");
+    fprintf(stderr, "    -gamma <correction>\n");
+    fprintf(stderr, "    -gray {2 | 3 | 4}\n");
+    fprintf(stderr, "    -height <inches>  -width <inches>\n");
+    fprintf(stderr, "    -header <string>  -trailer <string>\n");
+    fprintf(stderr, "    -landscape  -portrait\n");
+    fprintf(stderr, "    -left <inches>  -top <inches>\n");
+    fprintf(stderr, "    -noposition\n");
+    fprintf(stderr, "    -nosixopt\n");
+    fprintf(stderr, "    -plane <n>\n");
+    fprintf(stderr, "    -psfig\n");
+    fprintf(stderr, "    -render <type>\n");
+    fprintf(stderr, "    -report\n");
+    fprintf(stderr, "    -rv\n");
+    fprintf(stderr, "    -scale <scale>\n");
+    fprintf(stderr, "    -slide\n");
+    fprintf(stderr, "    -split <n-pages>\n");
+    exit(EXIT_FAILURE);
+}
+
+static
+void parse_args(
+  int argc,
+  char **argv,
+  int *scale,
+  int *width,
+  int *height,
+  int *left,
+  int *top,
+  enum device *device,
+  int *flags,
+  int *split,
+  char **header,
+  char **trailer,
+  int *plane,
+  GrayPtr *gray,
+  int *density,
+  unsigned int *cutoff,
+  float *gamma,
+  int *render)
+{
+    register char *output_filename;
+    register int f;
+    register int len;
+    register int pos;
+
+    output_filename = NULL;
+    *device = PS;      /* default */
+    *flags = 0;
+    *scale = 0;
+    *split = 1;
+    *width = -1;
+    *height = -1;
+    *top = -1;
+    *left = -1;
+    *header = NULL;
+    *trailer = NULL;
+    *plane = -1;
+    *gray = (GrayPtr)NULL;
+    *density = 0;
+    *cutoff = DEFAULT_CUTOFF;
+    *gamma = -1.0;
+    *render = 0;
+
+    for (argc--, argv++; argc > 0; argc--, argv++) {
+       if (argv[0][0] != '-') {
+           infilename = *argv;
+           continue;
+       }
+       len = strlen(*argv);
+       switch (argv[0][1]) {
+       case 'a':               /* -append <filename> */
+           if (!bcmp(*argv, "-append", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               output_filename = *argv;
+               *flags |= F_APPEND;
+           } else
+               usage();
+           break;
+
+       case 'c':               /* -compact | -cutoff <intensity> */
+           if (len <= 2 )
+               usage();
+           if (!bcmp(*argv, "-compact", len)) {
+               *flags |= F_COMPACT;
+           } else if (!bcmp(*argv, "-cutoff", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *cutoff = min((atof(*argv) / 100.0 * 0xFFFF), 0xFFFF);
+           } else
+               usage();
+           break;
+
+       case 'd':       /* -density <num> | -device <dev> | -dump */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-dump", len)) {
+               *flags |= F_DUMP;
+           } else if (len <= 3) {
+               usage();
+           } else if (!bcmp(*argv, "-density", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *density = atoi(*argv);
+           } else if (!bcmp(*argv, "-device", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               len = strlen(*argv);
+               if (len < 2)
+                   usage();
+               if (!bcmp(*argv, "ln03", len)) {
+                   *device = LN03;
+               } else if (!bcmp(*argv, "la100", len)) {
+                   *device = LA100;
+               } else if (!bcmp(*argv, "ps", len)) {
+                   *device = PS;
+               } else if (!bcmp(*argv, "lw", len)) {
+                   *device = PS;
+               } else if (!bcmp(*argv, "pp", len)) {
+                   *device = PP;
+               } else if (!bcmp(*argv, "ljet", len)) {
+                   *device = LJET;
+               } else if (!bcmp(*argv, "pjet", len)) {
+                   *device = PJET;
+               } else if (!bcmp(*argv, "pjetxl", len)) {
+                   *device = PJETXL;
+               } else
+                   usage();
+           } else
+               usage();
+           break;
+
+       case 'g':               /* -gamma <float> | -gray <num> */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-gamma", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *gamma = atof(*argv);
+           } else if (!bcmp(*argv, "-gray", len) ||
+               !bcmp(*argv, "-grey", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               switch (atoi(*argv)) {
+               case 2:
+                   *gray = &gray2x2;
+                   break;
+               case 3:
+                   *gray = &gray3x3;
+                   break;
+               case 4:
+                   *gray = &gray4x4;
+                   break;
+               default:
+                   usage();
+               }
+               *flags |= F_GRAY;
+           } else
+               usage();
+           break;
+
+       case 'h':               /* -height <inches> | -header <string> */
+           if (len <= 3)
+               usage();
+           if (!bcmp(*argv, "-height", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *height = (int)(300.0 * atof(*argv));
+           } else if (!bcmp(*argv, "-header", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *header = *argv;
+           } else
+               usage();
+           break;
+
+       case 'l':               /* -landscape | -left <inches> */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-landscape", len)) {
+               *flags |= F_LANDSCAPE;
+           } else if (!bcmp(*argv, "-left", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *left = (int)(300.0 * atof(*argv));
+           } else
+               usage();
+           break;
+
+       case 'n':               /* -nosixopt | -noff | -noposition */
+           if (len <= 3)
+               usage();
+           if (!bcmp(*argv, "-nosixopt", len)) {
+               *flags |= F_NOSIXOPT;
+           } else if (!bcmp(*argv, "-noff", len)) {
+               *flags |= F_NOFF;
+           } else if (!bcmp(*argv, "-noposition", len)) {
+               *flags |= F_NPOSITION;
+           } else
+               usage();
+           break;
+
+       case 'o':               /* -output <filename> */
+           if (!bcmp(*argv, "-output", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               output_filename = *argv;
+           } else
+               usage();
+           break;
+
+       case 'p':               /* -portrait | -plane <n> */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-portrait", len)) {
+               *flags |= F_PORTRAIT;
+           } else if (!bcmp(*argv, "-plane", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *plane = atoi(*argv);
+           } else if (!bcmp(*argv, "-psfig", len)) {
+               *flags |= F_NPOSITION;
+           } else
+               usage();
+           break;
+
+       case 'r':               /* -render <type> | -report | -rv */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-rv", len)) {
+               *flags |= F_INVERT;
+           } else if (len <= 3) {
+               usage();
+           } else if (!bcmp(*argv, "-render", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *render = atoi(*argv);
+           } else if (!bcmp(*argv, "-report", len)) {
+               *flags |= F_REPORT;
+           } else
+               usage();
+           break;
+
+       case 's':       /* -scale <scale> | -slide | -split <n-pages> */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-scale", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *scale = atoi(*argv);
+           } else if (!bcmp(*argv, "-slide", len)) {
+               *flags |= F_SLIDE;
+           } else if (!bcmp(*argv, "-split", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *split = atoi(*argv);
+           } else
+               usage();
+           break;
+
+       case 't':               /* -top <inches> | -trailer <string> */
+           if (len <= 2)
+               usage();
+           if (!bcmp(*argv, "-top", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *top = (int)(300.0 * atof(*argv));
+           } else if (!bcmp(*argv, "-trailer", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *trailer = *argv;
+           } else
+               usage();
+           break;
+
+       case 'w':               /* -width <inches> */
+           if (!bcmp(*argv, "-width", len)) {
+               argc--; argv++;
+               if (argc == 0) usage();
+               *width = (int)(300.0 * atof(*argv));
+           } else
+               usage();
+           break;
+
+       default:
+           usage();
+           break;
+       }
+    }
+
+    if (infilename) {
+       f = open(infilename, O_RDONLY|O_BINARY, 0);
+       if (f < 0) {
+           fprintf(stderr, "xpr: error opening \"%s\" for input\n",
+                   infilename);
+           perror("");
+           exit(1);
+       }
+       dup2(f, 0);
+       close(f);
+    } else
+       infilename = "stdin";
+
+    if (output_filename != NULL) {
+       if (!(*flags & F_APPEND)) {
+           f = open(output_filename, O_CREAT|O_WRONLY|O_TRUNC, 0664);
+       } else {
+           f = open(output_filename, O_WRONLY, 0);
+       }
+       if (f < 0) {
+           fprintf(stderr, "xpr: error opening \"%s\" for output\n", 
+                   output_filename);
+           perror("xpr");
+           exit(1);
+       }
+       if (*flags & F_APPEND) {
+           pos = lseek(f, 0, 2);          /* get eof position */
+           if ((*flags & F_NOFF) &&
+               !(*device == LJET || *device == PJET || *device == PJETXL))
+               pos -= 3; /* set position before trailing */
+                         /*     formfeed and reset */
+           lseek(f, pos, 0);              /* set pointer */
+       }
+       dup2(f, 1);
+       close(f);
+    }
+}
+
+static
+void setup_layout(
+  enum device device,
+  int win_width,
+  int win_height,
+  int flags,
+  int width,
+  int height,
+  char *header,
+  char *trailer,
+  int *scale,
+  enum orientation *orientation)
+{
+    register int w_scale;
+    register int h_scale;
+    register int iscale = *scale;
+    register int w_max;
+    register int h_max;
+
+    if (header != NULL) win_height += 75;
+    if (trailer != NULL) win_height += 75;
+
+    /* check maximum width and height; set orientation and scale*/
+    if (device == LN03 || device == PS) {
+       if ((win_width < win_height || (flags & F_PORTRAIT)) && 
+           !(flags & F_LANDSCAPE)) {
+           *orientation = PORTRAIT;
+           w_max = (width > 0)? width : W_MAX;
+           h_max = (height > 0)? height : H_MAX;
+           w_scale = w_max / win_width;
+           h_scale = h_max / win_height;
+           *scale = min(w_scale, h_scale);
+       } else {
+           *orientation = LANDSCAPE;
+           w_max = (width > 0)? width : H_MAX;
+           h_max = (height > 0)? height : W_MAX;
+           w_scale = w_max / win_width;
+           h_scale = h_max / win_height;
+           *scale = min(w_scale, h_scale);
+       }
+    } else {                   /* device == LA100 */
+       *orientation = PORTRAIT;
+       *scale = W_MAX / win_width;
+    }
+    if (*scale == 0) *scale = 1;
+    if (*scale > 6) *scale = 6;
+    if (iscale > 0 && iscale < *scale) *scale = iscale;
+}
+
+static
+char *convert_data(
+    XWDFileHeader *win,
+    char *data,
+    int plane,
+    GrayPtr gray,
+    XColor *colors,
+    int flags)
+{
+    XImage in_image_struct, out_image_struct;
+    register XImage *in_image, *out_image;
+    register int x, y;
+
+    if ((win->pixmap_format == XYPixmap) && (plane >= 0)) {
+       data += win->bytes_per_line * win->pixmap_height *
+               (win->pixmap_depth - (plane + 1));
+       win->pixmap_format = XYBitmap;
+       win->pixmap_depth = 1;
+       return data;
+    }
+
+    /* initialize the input image */
+
+    in_image = &in_image_struct;
+    in_image->byte_order = win->byte_order;
+    in_image->bitmap_unit = win->bitmap_unit;
+    in_image->bitmap_bit_order = win->bitmap_bit_order;
+    in_image->depth = win->pixmap_depth;
+    in_image->bits_per_pixel = win->bits_per_pixel;
+    in_image->format = win->pixmap_format,
+    in_image->xoffset = win->xoffset,
+    in_image->data = data;
+    in_image->width = win->pixmap_width;
+    in_image->height = win->pixmap_height;
+    in_image->bitmap_pad = win->bitmap_pad;
+    in_image->bytes_per_line = win->bytes_per_line;
+    in_image->red_mask = win->red_mask;
+    in_image->green_mask = win->green_mask;
+    in_image->blue_mask = win->blue_mask;
+    in_image->obdata = NULL;
+    if (!XInitImage(in_image)) {
+       fprintf(stderr,"xpr: bad input image header data.\n");
+       exit(1);
+    }
+    if ((flags & F_GRAY) && (in_image->depth > 1) && (plane < 0)) {
+       win->pixmap_width *= gray->sizeX;
+       win->pixmap_height *= gray->sizeY;
+    }
+    win->xoffset = 0;
+    win->pixmap_format = XYBitmap;
+    win->byte_order = LSBFirst;
+    win->bitmap_unit = 8;
+    win->bitmap_bit_order = LSBFirst;
+    win->bitmap_pad = 8;
+    win->pixmap_depth = 1;
+    win->bits_per_pixel = 1;
+    win->bytes_per_line = (win->pixmap_width + 7) >> 3;
+
+    out_image = &out_image_struct;
+    out_image->byte_order = win->byte_order;
+    out_image->bitmap_unit = win->bitmap_unit;
+    out_image->bitmap_bit_order = win->bitmap_bit_order;
+    out_image->depth = win->pixmap_depth;
+    out_image->bits_per_pixel = win->bits_per_pixel;
+    out_image->format = win->pixmap_format;
+    out_image->xoffset = win->xoffset,
+    out_image->width = win->pixmap_width;
+    out_image->height = win->pixmap_height;
+    out_image->bitmap_pad = win->bitmap_pad;
+    out_image->bytes_per_line = win->bytes_per_line;
+    out_image->red_mask = 0;
+    out_image->green_mask = 0;
+    out_image->blue_mask = 0;
+    out_image->obdata = NULL;
+    out_image->data = malloc((unsigned)out_image->bytes_per_line *
+                                     out_image->height);
+    if (!XInitImage(out_image)) {
+       fprintf(stderr,"xpr: bad output image header data.\n");
+       exit(1);
+    }
+
+    if ((in_image->depth > 1) && (plane > 0)) {
+       for (y = 0; y < in_image->height; y++)
+           for (x = 0; x < in_image->width; x++)
+               XPutPixel(out_image, x, y,
+                         (XGetPixel(in_image, x, y) >> plane) & 1);
+    } else if (plane == 0) {
+       for (y = 0; y < in_image->height; y++)
+           for (x = 0; x < in_image->width; x++)
+               XPutPixel(out_image, x, y, XGetPixel(in_image, x, y));
+    } else if ((in_image->depth > 1) &&
+              ((win->visual_class == TrueColor) ||
+               (win->visual_class == DirectColor))) {
+       XColor color;
+       int direct = 0;
+       unsigned long rmask, gmask, bmask;
+       int rshift = 0, gshift = 0, bshift = 0;
+
+       rmask = win->red_mask;
+       while (!(rmask & 1)) {
+           rmask >>= 1;
+           rshift++;
+       }
+       gmask = win->green_mask;
+       while (!(gmask & 1)) {
+           gmask >>= 1;
+           gshift++;
+       }
+       bmask = win->blue_mask;
+       while (!(bmask & 1)) {
+           bmask >>= 1;
+           bshift++;
+       }
+       if ((win->ncolors == 0) || (win->visual_class == DirectColor))
+           direct = 1;
+       if (flags & F_GRAY) {
+           register int ox, oy;
+           int ix, iy;
+           unsigned long bits;
+           for (y = 0, oy = 0; y < in_image->height; y++, oy += gray->sizeY)
+               for (x = 0, ox = 0; x < in_image->width; x++, ox += gray->sizeX)
+               {
+                   color.pixel = XGetPixel(in_image, x, y);
+                   color.red = (color.pixel >> rshift) & rmask;
+                   color.green = (color.pixel >> gshift) & gmask;
+                   color.blue = (color.pixel >> bshift) & bmask;
+                   if (!direct) {
+                       color.red = colors[color.red].red;
+                       color.green = colors[color.green].green;
+                       color.blue = colors[color.blue].blue;
+                   }
+                   bits = gray->grayscales[(int)(gray->level *
+                                                 INTENSITY(&color)) /
+                                           (INTENSITYPER(100) + 1)];
+                   for (iy = 0; iy < gray->sizeY; iy++)
+                       for (ix = 0; ix < gray->sizeX; ix++, bits >>= 1)
+                           XPutPixel(out_image, ox + ix, oy + iy, bits);
+               }
+       } else {
+           for (y = 0; y < in_image->height; y++)
+               for (x = 0; x < in_image->width; x++) {
+                   color.pixel = XGetPixel(in_image, x, y);
+                   color.red = (color.pixel >> rshift) & rmask;
+                   color.green = (color.pixel >> gshift) & gmask;
+                   color.blue = (color.pixel >> bshift) & bmask;
+                   if (!direct) {
+                       color.red = colors[color.red].red;
+                       color.green = colors[color.green].green;
+                       color.blue = colors[color.blue].blue;
+                   }
+                   XPutPixel(out_image, x, y,
+                             INTENSITY(&color) > HALFINTENSITY);
+               }
+       }
+    } else if (flags & F_GRAY) {
+       register int ox, oy;
+       int ix, iy;
+       unsigned long bits;
+
+       if (win->ncolors == 0) {
+           fprintf(stderr, "no colors in data, can't remap\n");
+           exit(1);
+       }
+       for (x = 0; x < win->ncolors; x++) {
+           register XColor *color = &colors[x];
+
+           color->pixel = gray->grayscales[(gray->level * INTENSITY(color)) /
+                                           (INTENSITYPER(100) + 1)];
+       }
+       for (y = 0, oy = 0; y < in_image->height; y++, oy += gray->sizeY)
+           for (x = 0, ox = 0; x < in_image->width; x++, ox += gray->sizeX) {
+               bits = colors[XGetPixel(in_image, x, y)].pixel;
+               for (iy = 0; iy < gray->sizeY; iy++)
+                   for (ix = 0; ix < gray->sizeX; ix++, bits >>= 1)
+                       XPutPixel(out_image, ox + ix, oy + iy, bits);
+           }
+    } else {
+       if (win->ncolors == 0) {
+           fprintf(stderr, "no colors in data, can't remap\n");
+           exit(1);
+       }
+       for (x = 0; x < win->ncolors; x++) {
+           register XColor *color = &colors[x];
+           color->pixel = (INTENSITY(color) > HALFINTENSITY);
+       }
+       for (y = 0; y < in_image->height; y++)
+           for (x = 0; x < in_image->width; x++)
+               XPutPixel(out_image, x, y,
+                         colors[XGetPixel(in_image, x, y)].pixel);
+    }
+    free(data);
+    return (out_image->data);
+}
+
+static
+void dump_sixmap(
+  register unsigned char (*sixmap)[],
+  int iw,
+  int ih)
+{
+    register int i, j;
+    register unsigned char *c;
+
+    c = (unsigned char *)sixmap;
+    fprintf(stderr, "Sixmap:\n");
+    for (i = 0; i < ih; i++) {
+       for (j = 0; j < iw; j++) {
+           fprintf(stderr, "%02X ", *c++);
+       }
+       fprintf(stderr, "\n\n");
+    }
+}
+
+static
+void build_sixmap(
+  int ih,
+  int iw,
+  unsigned char (*sixmap)[],
+  int hpad,
+  XWDFileHeader *win,
+  const char *data)
+{
+    int iwb = win->bytes_per_line;
+    unsigned char *line[6];
+    register unsigned char *c;
+    register int i, j;
+#ifdef NOINLINE
+    register int w;
+#endif
+    register int sixel;
+    unsigned char *buffer = (unsigned char *)data;
+
+    c = (unsigned char *)sixmap;
+
+
+    while (--ih >= 0) {
+        for (i = 0; i <= 5; i++) {
+           line[i] = buffer;
+           buffer += iwb;
+        }
+       if ((ih == 0) && (hpad > 0)) {
+           unsigned char *ffbuf;
+
+           ffbuf = (unsigned char *)malloc((unsigned)iwb);
+           for (j = 0; j < iwb; j++)
+               ffbuf[j] = 0xFF;
+           for (; --hpad >= 0; i--)
+               line[i] = ffbuf;
+       }
+
+#ifndef NOINLINE
+       for (i = 0; i < iw; i++) {
+           sixel =  extzv(line[0], i, 1);
+           sixel |= extzv(line[1], i, 1) << 1;
+           sixel |= extzv(line[2], i, 1) << 2;
+           sixel |= extzv(line[3], i, 1) << 3;
+           sixel |= extzv(line[4], i, 1) << 4;
+           sixel |= extzv(line[5], i, 1) << 5;
+           *c++ = sixel;
+       }
+#else
+       for (i = 0, w = iw; w > 0; i++) {
+           for (j = 0; j <= 7; j++) {
+               sixel =  ((line[0][i] >> j) & 1);
+               sixel |= ((line[1][i] >> j) & 1) << 1;
+               sixel |= ((line[2][i] >> j) & 1) << 2;
+               sixel |= ((line[3][i] >> j) & 1) << 3;
+               sixel |= ((line[4][i] >> j) & 1) << 4;
+               sixel |= ((line[5][i] >> j) & 1) << 5;
+               *c++ = sixel;
+               if (--w == 0) break;
+           }
+       }
+#endif
+    }
+}
+
+/*
+ln03_grind_fonts(sixmap, iw, ih, scale, pixmap)
+unsigned char (*sixmap)[];
+int iw;
+int ih;
+int scale;
+struct pixmap (**pixmap)[];
+{
+}
+*/
+
+static
+void ln03_setup(
+  int iw,
+  int ih,
+  enum orientation orientation,
+  int scale,
+  int left,
+  int top,
+  int *left_margin,
+  int *top_margin,
+  int flags,
+  const char *header,
+  const char *trailer)
+{
+    register int i;
+    register int lm, tm, xm;
+    char buf[256];
+    register char *bp = buf;
+       
+    if (!(flags & F_APPEND)) {
+       sprintf(bp, LN_STR); bp += 4;
+       sprintf(bp, LN_SSU, 7); bp += 5;
+       sprintf(bp, LN_PUM_SET); bp += sizeof LN_PUM_SET - 1;
+    }
+
+    if (orientation == PORTRAIT) {
+       lm = (left > 0)? left : (((W_MAX - scale * iw) / 2) + W_MARGIN);
+       tm = (top > 0)? top : (((H_MAX - scale * ih * 6) / 2) + H_MARGIN);
+       sprintf(bp, LN_PFS, "?20"); bp += 7;
+       sprintf(bp, LN_DECOPM_SET); bp += sizeof LN_DECOPM_SET - 1;
+       sprintf(bp, LN_DECSLRM, lm, W_PAGE - lm); bp += strlen(bp);
+    } else {
+       lm = (left > 0)? left : (((H_MAX - scale * iw) / 2) + H_MARGIN);
+       tm = (top > 0)? top : (((W_MAX - scale * ih * 6) / 2) + W_MARGIN);
+       sprintf(bp, LN_PFS, "?21"); bp += 7;
+       sprintf(bp, LN_DECOPM_SET); bp += sizeof LN_DECOPM_SET - 1;
+       sprintf(bp, LN_DECSLRM, lm, H_PAGE - lm); bp += strlen(bp);
+    }
+
+    if (header != NULL) {
+       sprintf(bp, LN_VPA, tm - 100); bp += strlen(bp);
+       i = strlen(header);
+       xm = (((scale * iw) - (i * 30)) / 2) + lm;
+       sprintf(bp, LN_HPA, xm); bp += strlen(bp);
+       sprintf(bp, LN_SGR, 3); bp += strlen(bp);
+       bcopy(header, bp, i);
+       bp += i;
+    }
+    if (trailer != NULL) {
+       sprintf(bp, LN_VPA, tm + (scale * ih * 6) + 75); bp += strlen(bp);
+       i = strlen(trailer);
+       xm = (((scale * iw) - (i * 30)) / 2) + lm;
+       sprintf(bp, LN_HPA, xm); bp += strlen(bp);
+       sprintf(bp, LN_SGR, 3); bp += strlen(bp);
+       bcopy(trailer, bp, i);
+       bp += i;
+    }
+
+    sprintf(bp, LN_HPA, lm); bp += strlen(bp);
+    sprintf(bp, LN_VPA, tm); bp += strlen(bp);
+    sprintf(bp, LN_SIXEL_GRAPHICS, 9, 0, scale); bp += strlen(bp);
+    sprintf(bp, "\"1;1"); bp += 4; /* Pixel aspect ratio */
+    write(1, buf, bp-buf);
+    *top_margin = tm;
+    *left_margin = lm;
+}
+
+static
+void ln03_finish(void)
+{
+    char buf[256];
+    register char *bp = buf;
+
+    sprintf(bp, LN_DECOPM_RESET); bp += sizeof LN_DECOPM_SET - 1;
+    sprintf(bp, LN_LNM); bp += 5;
+    sprintf(bp, LN_PUM); bp += 5;
+    sprintf(bp, LN_PFS, "?20"); bp += 7; 
+    sprintf(bp, LN_SGR, 0); bp += strlen(bp);   
+    sprintf(bp, LN_HPA, 1); bp += strlen(bp);
+    sprintf(bp, LN_VPA, 1); bp += strlen(bp);
+
+
+    write(1, buf, bp-buf);    
+}
+
+/*ARGSUSED*/
+static
+void la100_setup(int iw, int ih, int scale)
+{
+    char buf[256];
+    register char *bp;
+    int lm, tm;
+
+    bp = buf;
+    lm = ((80 - (int)((double)iw / 6.6)) / 2) - 1;
+    if (lm < 1) lm = 1;
+    tm = ((66 - (int)((double)ih / 2)) / 2) - 1;
+    if (tm < 1) tm = 1;
+    sprintf(bp, "\033[%d;%ds", lm, 81-lm); bp += strlen(bp);
+    sprintf(bp, "\033[?7l"); bp += 5;
+    sprintf(bp, "\033[%dd", tm); bp += strlen(bp);
+    sprintf(bp, "\033[%d`", lm); bp += strlen(bp);
+    sprintf(bp, "\033P0q"); bp += 4;
+    write(1, buf, bp-buf);
+}
+
+#define LA100_RESET "\033[1;80s\033[?7h"
+
+static
+void la100_finish(void)
+{
+    write(1, LA100_RESET, sizeof LA100_RESET - 1);
+}
+
+#define COMMENTVERSION "PS-Adobe-1.0"
+
+#ifdef XPROLOG
+/* for debugging, get the prolog from a file */
+static
+void dump_prolog(int flags)
+{
+    char *fname=(flags & F_COMPACT) ? "prolog.compact" : "prolog";
+    FILE *fi = fopen(fname,"r");
+    char buf[1024];
+
+    if (fi==NULL) {
+       perror(fname);
+       exit(1);
+    }
+    while (fgets(buf,1024,fi)) fputs(buf,stdout);
+    fclose(fi);
+}
+
+#else /* XPROLOG */
+/* postscript "programs" to unpack and print the bitmaps being sent */
+
+static const
+char *ps_prolog_compact[] = {
+    "%%Pages: 1",
+    "%%EndProlog",
+    "%%Page: 1 1",
+    "",
+    "/bitgen",
+    "  {",
+    "          /nextpos 0 def",
+    "          currentfile bufspace readhexstring pop % get a chunk of input",
+    "          % interpret each byte of the input",
+    "          {",
+    "                  flag { % if the previous byte was FF",
+    "                          /len exch def % this byte is a count",
+    "                          result",
+    "                          nextpos",
+    "                          FFstring 0 len getinterval % grap a chunk of FF's",
+    "                                  putinterval % and stuff them into the result",
+    "                          /nextpos nextpos len add def",
+    "                          /flag false def",
+    "                  }{ % otherwise",
+    "                          dup 255 eq { % if this byte is FF",
+    "                                  /flag true def % just set the flag",
+    "                                  pop % and toss the FF",
+    "                          }{ % otherwise",
+    "                                  % move this byte to the result",
+    "                                  result nextpos",
+    "                                          3 -1 roll % roll the current byte back to the top",
+    "                                          put",
+    "                                  /nextpos nextpos 1 add def",
+    "                          } ifelse",
+    "                  } ifelse",
+    "          } forall",
+    "          % trim unused space from end of result",
+    "          result 0 nextpos getinterval",
+    "  } def",
+    "",
+    "",
+    "/bitdump % stk: width, height, iscale",
+    "  % dump a bit image with lower left corner at current origin,",
+    "  % scaling by iscale (iscale=1 means 1/300 inch per pixel)",
+    "  {",
+    "          % read arguments",
+    "          /iscale exch def",
+    "          /height exch def",
+    "          /width exch def",
+    "",
+    "          % scale appropriately",
+    "          width iscale mul height iscale mul scale",
+    "",
+    "          % data structures:",
+    "",
+    "          % allocate space for one line of input",
+    "          /bufspace 36 string def",
+    "",
+    "          % string of FF's",
+    "          /FFstring 256 string def",
+    "          % for all i FFstring[i]=255",
+    "          0 1 255 { FFstring exch 255 put } for",
+    "",
+    "          % 'escape' flag",
+    "          /flag false def",
+    "",
+    "          % space for a chunk of generated bits",
+    "          /result 4590 string def",
+    "",
+    "          % read and dump the image",
+    "          width height 1 [width 0 0 height neg 0 height]",
+    "                  { bitgen }",
+    "                  image",
+    "  } def",
+    NULL
+};
+
+static const 
+char *ps_prolog[] = {
+    "%%Pages: 1",
+    "%%EndProlog",
+    "%%Page: 1 1",
+    "",
+    "/bitdump % stk: width, height, iscale",
+    "% dump a bit image with lower left corner at current origin,",
+    "% scaling by iscale (iscale=1 means 1/300 inch per pixel)",
+    "{",
+    "  % read arguments",
+    "  /iscale exch def",
+    "  /height exch def",
+    "  /width exch def",
+    "",
+    "  % scale appropriately",
+    "  width iscale mul height iscale mul scale",
+    "",
+    "  % allocate space for one scanline of input",
+    "  /picstr % picstr holds one scan line",
+    "          width 7 add 8 idiv % width of image in bytes = ceiling(width/8)",
+    "          string",
+    "          def",
+    "",
+    "  % read and dump the image",
+    "  width height 1 [width 0 0 height neg 0 height]",
+    "  { currentfile picstr readhexstring pop }",
+    "  image",
+    "} def",
+    NULL
+};
+
+static
+void dump_prolog(int flags) {
+    const char **p = (flags & F_COMPACT) ? ps_prolog_compact : ps_prolog;
+    while (*p)
+        printf("%s\n", *p++);
+}
+#endif /* XPROLOG */
+
+#define PAPER_WIDTH 85*30 /* 8.5 inches */
+#define PAPER_LENGTH 11*300 /* 11 inches */
+
+static
+int points(int n)
+{
+    /* scale n from pixels (1/300 inch) to points (1/72 inch) */
+    n *= 72;
+    return n/300;
+}
+
+static
+char *escape(const char *s)
+{
+    /* make a version of s in which control characters are deleted and
+     * special characters are escaped.
+     */
+    static char buf[200];
+    char *p = buf;
+
+    for (;*s;s++) {
+       if (*s < ' ' || *s > 0176) continue;
+       if (*s==')' || *s=='(' || *s == '\\') {
+           sprintf(p,"\\%03o",*s);
+           p += 4;
+       }
+       else *p++ = *s;
+    }
+    *p = 0;
+    return buf;
+}
+
+static
+void ps_setup(
+  int iw,
+  int ih,
+  enum orientation orientation,
+  int scale,
+  int left,
+  int top,
+  int flags,
+  const char *header,
+  const char *trailer,
+  const char *name)
+{
+    char    hostname[256];
+#ifdef WIN32
+    char *username;
+#else
+    struct passwd  *pswd;
+#endif
+    long    clock;
+    int lm, bm; /* left (bottom) margin */
+
+    /* calculate margins */
+    if (orientation==PORTRAIT) {
+       lm = (left > 0)? left : ((PAPER_WIDTH - scale * iw) / 2);
+       bm = (top > 0)? (PAPER_LENGTH - top - scale * ih)
+               : ((PAPER_LENGTH - scale * ih) / 2);
+    } else { /* orientation == LANDSCAPE */
+       lm = (top > 0)? (PAPER_WIDTH - top - scale * ih)
+               : ((PAPER_WIDTH - scale * ih) / 2);
+       bm = (left > 0)? (PAPER_LENGTH - left - scale * iw)
+               : ((PAPER_LENGTH - scale * iw) / 2);
+    }
+    printf ("%%!%s\n", COMMENTVERSION);
+    printf ("%%%%BoundingBox: %d %d %d %d\n",
+           (flags & F_NPOSITION) ? points(lm) : 0,
+           (flags & F_NPOSITION) ? points(bm) : 0,
+           points(iw * scale), points(ih * scale));
+    (void) XmuGetHostname (hostname, sizeof hostname);
+#ifdef WIN32
+    username = getenv("USERNAME");
+    printf ("%%%%Creator: %s:%s\n", hostname,
+           username ? username : "unknown");
+#else
+    pswd = getpwuid (getuid ());
+    printf ("%%%%Creator: %s:%s (%s)\n", hostname,
+           pswd->pw_name, pswd->pw_gecos);
+#endif
+    printf ("%%%%Title: %s (%s)\n", infilename,name);
+    printf ("%%%%CreationDate: %s",
+               (time (&clock), ctime (&clock)));
+    printf ("%%%%EndComments\n");
+
+    dump_prolog(flags);
+
+    if (orientation==PORTRAIT) {
+       if (header || trailer) {
+           printf("gsave\n");
+           printf("/Times-Roman findfont 15 scalefont setfont\n");
+           /* origin at bottom left corner of image */
+           printf("%d %d translate\n",points(lm),points(bm));
+           if (header) {
+               char *label = escape(header);
+               printf("%d (%s) stringwidth pop sub 2 div %d moveto\n",
+                   points(iw*scale), label, points(ih*scale) + 10);
+               printf("(%s) show\n",label);
+           }
+           if (trailer) {
+               char *label = escape(trailer);
+               printf("%d (%s) stringwidth pop sub 2 div -20 moveto\n",
+                   points(iw*scale), label);
+               printf("(%s) show\n",label);
+           }
+           printf("grestore\n");
+       }
+       /* set resolution to device units (300/inch) */
+       printf("72 300 div dup scale\n");
+       /* move to lower left corner of image */
+       if (!(flags & F_NPOSITION))
+           printf("%d %d translate\n",lm,bm);
+       /* dump the bitmap */
+       printf("%d %d %d bitdump\n",iw,ih,scale);
+    } else { /* orientation == LANDSCAPE */
+       if (header || trailer) {
+           printf("gsave\n");
+           printf("/Times-Roman findfont 15 scalefont setfont\n");
+           /* origin at top left corner of image */
+           printf("%d %d translate\n",points(lm),points(bm + scale * iw));
+           /* rotate to print the titles */
+           printf("-90 rotate\n");
+           if (header) {
+               char *label = escape(header);
+               printf("%d (%s) stringwidth pop sub 2 div %d moveto\n",
+                   points(iw*scale), label, points(ih*scale) + 10);
+               printf("(%s) show\n",label);
+           }
+           if (trailer) {
+               char *label = escape(trailer);
+               printf("%d (%s) stringwidth pop sub 2 div -20 moveto\n",
+                   points(iw*scale), label);
+               printf("(%s) show\n",label);
+           }
+           printf("grestore\n");
+       }
+       /* set resolution to device units (300/inch) */
+       printf("72 300 div dup scale\n");
+       /* move to lower left corner of image */
+       if (!(flags & F_NPOSITION))
+           printf("%d %d translate\n",lm,bm);
+       /* dump the bitmap */
+       printf("%d %d %d bitdump\n",ih,iw,scale);
+    }
+}
+
+static const
+char *ps_epilog[] = {
+       "",
+       "showpage",
+       "%%Trailer",
+    NULL
+};
+
+static
+void ps_finish(void)
+{
+       char **p = (char **)ps_epilog;
+
+       while (*p) printf("%s\n",*p++);
+}
+
+static
+void ln03_output_sixels(
+  unsigned char (*sixmap)[],
+  int iw,
+  int ih,
+  int nosixopt,
+  int split,
+  int scale,
+  int top_margin,
+  int left_margin)
+{
+    unsigned char *buf;
+    register unsigned char *bp;
+    int i;
+    int j;
+    register int k;
+    register unsigned char *c;
+    register int lastc;
+    register int count;
+    char snum[6];
+    register char *snp;
+
+    bp = (unsigned char *)malloc((unsigned)(iw*ih+512));
+    buf = bp;
+    count = 0;
+    lastc = -1;
+    c = (unsigned char *)sixmap;
+    split = ih / split;                /* number of lines per page */
+
+    iw--;                      /* optimization */
+    for (i = 0; i < ih; i++) {
+       for (j = 0; j <= iw; j++) {
+           if (!nosixopt) {
+               if (*c == lastc && j < iw) {
+                   count++;
+                   c++;
+                   continue;
+               }
+               if (count >= 3) {
+                   bp--;
+                   count++;
+                   *bp++ = '!';
+                   snp = snum;
+                   while (count > 0) {
+                       k = count / 10;
+                       *snp++ = count - (k * 10) + '0';
+                       count = k;
+                   }
+                   while (--snp >= snum) *bp++ = *snp;
+                   *bp++ = (~lastc & 0x3F) + 0x3F;
+               } else if (count > 0) {
+                   lastc = (~lastc & 0x3F) + 0x3F;
+                   do {
+                       *bp++ = lastc;
+                   } while (--count > 0);
+               }
+           }
+           lastc = *c++;
+           *bp++ = (~lastc & 0x3F) + 0x3F;
+       }
+       *bp++ = '-';            /* New line */
+       lastc = -1;
+       if ((i % split) == 0 && i != 0) {
+           sprintf((char *)bp, LN_ST); bp += sizeof LN_ST - 1;
+           *bp++ = '\f';
+           sprintf((char *)bp, LN_VPA, top_margin + (i * 6 * scale));
+           bp += strlen((char *)bp);
+           sprintf((char *)bp, LN_HPA, left_margin);
+           bp += strlen((char *)bp);
+           sprintf((char *)bp, LN_SIXEL_GRAPHICS, 9, 0, scale);
+           bp += strlen((char *)bp);
+           sprintf((char *)bp, "\"1;1"); bp += 4;
+       }
+    }
+
+    sprintf((char *)bp, LN_ST); bp += sizeof LN_ST - 1;
+    write(1, (char *)buf, bp-buf);
+}
+
+/*ARGSUSED*/
+static
+void la100_output_sixels(
+  unsigned char (*sixmap)[],
+  int iw,
+  int ih,
+  int nosixopt)
+{
+    unsigned char *buf;
+    register unsigned char *bp;
+    int i;
+    register int j, k;
+    register unsigned char *c;
+    register int lastc;
+    register int count;
+    char snum[6];
+
+    bp = (unsigned char *)malloc((unsigned)(iw*ih+512));
+    buf = bp;
+    count = 0;
+    lastc = -1;
+    c = (unsigned char *)sixmap;
+
+    for (i = 0; i < ih; i++) {
+       for (j = 0; j < iw; j++) {
+           if (*c == lastc && (j+1) < iw) {
+               count++;
+               c++;
+               continue;
+           }
+           if (count >= 2) {
+               bp -= 2;
+               count = 2 * (count + 1);
+               *bp++ = '!';
+               k = 0;
+               while (count > 0) {
+                   snum[k++] = (count % 10) + '0';
+                   count /= 10;
+               }
+               while (--k >= 0) *bp++ = snum[k];
+               *bp++ = (~lastc & 0x3F) + 0x3F;
+               count = 0;
+           } else if (count > 0) {
+               lastc = (~lastc & 0x3F) + 0x3F;
+               do {
+                   *bp++ = lastc;
+                   *bp++ = lastc;
+               } while (--count > 0);
+           }
+           lastc = (~*c & 0x3F) + 0x3F;
+           *bp++ = lastc;
+           *bp++ = lastc;
+           lastc = *c++;
+       }
+       *bp++ = '-';            /* New line */
+       lastc = -1;
+    }
+
+    sprintf((char *)bp, LN_ST); bp += sizeof LN_ST - 1;
+    *bp++ = '\f';
+    write(1, (char *)buf, bp-buf);
+}
+
+#define LINELEN 72 /* number of CHARS (bytes*2) per line of bitmap output */
+
+static
+void ps_output_bits(
+  int iw,
+  int ih,
+  int flags,
+  enum orientation orientation,
+  XWDFileHeader *win,
+  const char *data)
+{
+    unsigned long swaptest = 1;
+    int iwb = win->bytes_per_line;
+    register int i;
+    int bytes;
+    unsigned char *buffer = (unsigned char *)data;
+    register int ocount=0;
+    static char hex[] = "0123456789abcdef";
+
+    if (orientation == LANDSCAPE) {
+       /* read in and rotate the entire image */
+       /* The Postscript language has a rotate operator, but using it
+        * seem to make printing (at least on the Apple Laserwriter
+        * take about 10 times as long (40 minutes for a 1024x864 full-screen
+        * dump)!  Therefore, we rotate the image here.
+        */
+       int ocol = ih;
+       int owidth = (ih+31)/32; /* width of rotated image, in bytes */
+       int oheight = (iw+31)/32; /* height of rotated image, in scanlines */
+       register char *p, *q;
+       char *obuf;
+       unsigned char *ibuf;
+       owidth *= 4;
+       oheight *= 32;
+
+       /* Allocate buffer for the entire rotated image (output).
+        * Owidth and Oheight are rounded up to a multiple of 32 bits,
+        * to avoid special cases at the boundaries
+        */
+       obuf = malloc((unsigned)(owidth*oheight));
+       if (obuf==NULL) {
+           fprintf(stderr,"xpr: cannot allocate %d bytes\n",owidth*oheight);
+           exit(1);
+       }
+       bzero(obuf,owidth*oheight);
+
+       ibuf = (unsigned char *)malloc((unsigned)(iwb + 3));
+       for (i=0;i<ih;i++) {
+           bcopy((char *)buffer, (char *)ibuf, iwb);
+           buffer += iwb;
+           if (!(*(char *) &swaptest))
+               _swaplong((char *)ibuf,(long)iwb);
+           ps_bitrot(ibuf,iw,--ocol,owidth,obuf);
+       }
+       if (!(*(char *) &swaptest))
+           _swaplong(obuf,(long)(iw*owidth));
+       q = &obuf[iw*owidth];
+       bytes = (ih+7)/8;
+       for (p=obuf;p<q;p+=owidth)
+           ocount = ps_putbuf((unsigned char *)p,bytes,ocount,flags&F_COMPACT);
+    }
+    else {
+       for (i=0;i<ih;i++) {
+           ocount = ps_putbuf(buffer,(iw+7)/8,ocount,flags&F_COMPACT);
+           buffer += iwb;
+       }
+    }
+    if (flags & F_COMPACT) {
+       if (ocount) {
+           /* pad to an integral number of lines */
+           while (ocount++ < LINELEN)
+               /* for debugging, pad with a "random" value */
+               putchar(hex[ocount&15]);
+           putchar('\n');
+       }
+    }
+}
+
+static const
+unsigned char _reverse_byte[0x100] = {
+       0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+       0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+       0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+       0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+       0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+       0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+       0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+       0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+       0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+       0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+       0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+       0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+       0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+       0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+       0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+       0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+       0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+       0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+       0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+       0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+       0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+       0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+       0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+       0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+       0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+       0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+       0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+       0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+       0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+       0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+       0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+       0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
+};
+
+void _invbits (
+  register unsigned char *b,
+  register long n)
+{
+       do {
+               *b = ~*b;
+               b++;
+           } while (--n > 0);
+       
+}
+
+/* copied from lib/X/XPutImage.c */
+
+void _swapbits (
+  register unsigned char *b,
+  register long n)
+{
+       do {
+               *b = _reverse_byte[*b];
+               b++;
+           } while (--n > 0);
+       
+}
+
+void _swapshort (
+  register char *bp,
+  register long n)
+{
+       register char c;
+       register char *ep = bp + n;
+       do {
+               c = *bp;
+               *bp = *(bp + 1);
+               bp++;
+               *bp = c;
+               bp++;
+       }
+       while (bp < ep);
+}
+
+void _swaplong (
+     register char *bp,
+     register long n)
+{
+       register char c;
+       register char *ep = bp + n;
+       register char *sp;
+       do {
+               sp = bp + 3;
+               c = *sp;
+               *sp = *bp;
+               *bp++ = c;
+               sp = bp + 1;
+               c = *sp;
+               *sp = *bp;
+               *bp++ = c;
+               bp += 2;
+       }
+       while (bp < ep);
+}
+
+/* Dump some bytes in hex, with bits in each byte reversed
+ * Ocount is number of chacters that have been written to the current
+ * output line.  It's new value is returned as the result of the function.
+ * Ocount is ignored (and the return value is meaningless) if compact==0.
+ */
+static
+int ps_putbuf(
+  register unsigned char *s,   /* buffer to dump */
+  register int n,              /* number of BITS to dump */
+  register int ocount,         /* position on output line for next char */
+  int compact)                 /* if non-zero, do compaction (see below) */
+{
+    register int ffcount = 0;
+    static char hex[] = "0123456789abcdef";
+#define PUT(c) { putchar(c); if (++ocount>=LINELEN) \
+       { putchar('\n'); ocount=0; }}
+
+    if (compact) {
+       /* The following loop puts out the bits of the image in hex,
+        * compressing runs of white space (represented by one bits)
+        * according the the following simple algorithm:  A run of n
+        * 'ff' bytes (i.e., bytes with value 255--all ones), where
+        * 1<=n<=255, is represented by a single 'ff' byte followed by a
+        * byte containing n.
+        * On a typical dump of a full screen pretty much covered by
+        * black-on-white text windows, this compression decreased the
+        * size of the file from 223 Kbytes to 63 Kbytes.
+        * Of course, another factor of two could be saved by sending
+        * the bytes 'as is' rather than in hex, using some sort of
+        * escape convention to avoid problems with control characters.
+        * Another popular encoding is to pack three bytes into 4 'sixels'
+        * as in the LN03, etc, but I'm too lazy to write the necessary
+        * PostScript code to unpack fancier representations.
+        */
+       while (n--) {
+           if (*s == 0xff) {
+               if (++ffcount == 255) {
+                   PUT('f'); PUT('f');
+                   PUT('f'); PUT('f');
+                   ffcount = 0;
+               }
+           }
+           else {
+               if (ffcount) {
+                   PUT('f'); PUT('f');
+                   PUT(hex[ffcount >> 4]);
+                   PUT(hex[ffcount & 0xf]);
+                   ffcount = 0;
+               }
+               PUT(hex1[*s]);
+               PUT(hex2[*s]);
+           }
+           s++;
+       }
+       if (ffcount) {
+           PUT('f'); PUT('f');
+               PUT(hex[ffcount >> 4]);
+           PUT(hex[ffcount & 0xf]);
+           ffcount = 0;
+       }
+    }
+    else { /* no compaction: just dump the image in hex (bits reversed) */
+       while (n--) {
+           putchar(hex1[*s]);
+           putchar(hex2[*s++]);
+       }
+       putchar('\n');
+    }
+    return ocount;
+}
+
+static
+void ps_bitrot(
+  unsigned char *s,
+  register int n,
+  int col,
+  register int owidth,
+  char *obuf)
+/* s points to a chunk of memory and n is its width in bits.
+ * The algorithm is, roughly,
+ *    for (i=0;i<n;i++) {
+ *        OR the ith bit of s into the ith row of the
+ *        (col)th column of obuf
+ *    }
+ * Assume VAX bit and byte ordering for s:
+ *     The ith bit of s is s[j]&(1<<k) where i=8*j+k.
+ *     It can also be retrieved as t[j]&(1<<k), where t=(int*)s and i=32*j+k.
+ * Also assume VAX bit and byte ordering for each row of obuf.
+ * Ps_putbuf() takes care of converting to Motorola 68000 byte and bit
+ * ordering.  The following code is very carefully tuned to yield a very
+ * tight loop on the VAX, since it easily dominates the entire running
+ * time of this program.  In particular, iwordp is declared last, since
+ * there aren't enough registers, and iwordp is referenced only once
+ * every 32 times through the loop.
+ */
+{
+    register int mask = 1<<(col%32);
+    register int iword; /* current input word (*iwordp) */
+    register int b = 0; /* number of bits in iword left to examine */
+    register char *opos = obuf + (col/32)*4;
+       /* pointer to word of obuf to receive next output bit */
+    register int *iwordp = (int *) s; /* pointer to next word of s */
+
+    while (--n>=0) {
+       if (--b < 0) {
+           iword = *iwordp++;
+           b = 31;
+       }
+       if (iword & 1) {
+           *(int *)opos |= mask;
+       }
+       opos += owidth;
+       iword >>= 1;
+    }
+}
+
+/* fullread() is the same as read(), except that it guarantees to 
+   read all the bytes requested. */
+
+static
+void fullread (
+  int file,
+  char *data,
+  int nbytes)
+{
+    int bytes_read;
+    while ((bytes_read = read(file, data, nbytes)) != nbytes) {
+       if (bytes_read < 0) {
+           perror ("error while reading standard input");
+           return;
+           }
+       else if (bytes_read == 0) {
+           fprintf (stderr, "xpr: premature end of file\n");
+           return;
+           }
+       nbytes -= bytes_read;
+       data += bytes_read;
+       }
+}
diff --git a/xpr/xpr.h b/xpr/xpr.h
new file mode 100644 (file)
index 0000000..d7c3182
--- /dev/null
+++ b/xpr/xpr.h
@@ -0,0 +1,64 @@
+
+#ifndef XPR_H
+#define XPR_H 1
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* 3812 PagePrinter macros */
+#define PPI                 240
+#define inch2pel(inches)    ((int) ((inches) * PPI))
+#define DEFAULT_WIDTH       8.5
+#define X_MAX_PELS          inch2pel(DEFAULT_WIDTH)
+#define DEFAULT_LENGTH      11
+#define Y_MAX_PELS          inch2pel(DEFAULT_LENGTH)
+
+#define INTENSITY(color) (30L*(int)(color)->red + \
+                          59L*(int)(color)->green + \
+                          11L*(int)(color)->blue)
+
+#define INTENSITYPER(per) (((1<<16)-1)*((long)(per)))
+#define HALFINTENSITY INTENSITYPER(50)
+
+enum orientation {
+    UNSPECIFIED    = -1,
+    PORTRAIT       = 0,
+    LANDSCAPE      = 1,
+    UPSIDE_DOWN    = 2,
+    LANDSCAPE_LEFT = 3
+  };
+
+enum device {LN01, LN03, LA100, PS, PP, LJET, PJET, PJETXL};
+
+/* Global variables */
+extern char *progname;
+extern int debug;
+
+/* Global prototypes */
+/* x2jet.c */
+void x2jet(
+  FILE *in, FILE *out,
+  int scale, int density,
+  int width, int height, int left, int top,  /* in 300ths of an inch */
+  const char *header, const char *trailer,
+  enum orientation orient,
+  int invert, int initial_formfeed, int position_on_page, int slide,
+  enum device device,
+  unsigned int cutoff,
+  float gamma,
+  int render);
+/* x2pmp.c */
+void x2pmp(FILE *in, FILE *out,
+  int scale,
+  int p_width, int p_length, int x_pos, int y_pos, /* in pels (units of PPI) */
+  char *head, char *foot,
+  enum orientation orient,
+  int invert);
+/* xpr.c */
+void _invbits(register unsigned char *b,   register long n);
+void _swapbits(register unsigned char *b,  register long n);
+void _swapshort(register char *bp, register long n);
+void _swaplong(register char *bp,  register long n);
+
+#endif /* !XPR_H */
diff --git a/xpr/xpr.man b/xpr/xpr.man
new file mode 100644 (file)
index 0000000..63693e4
--- /dev/null
@@ -0,0 +1,338 @@
+.\" $XConsortium: xpr.man,v 1.22 94/04/17 20:44:06 gildea Exp $
+.TH XPR 1 "Release 6" "X Version 11"
+.SH NAME
+xpr \- print an X window dump
+.SH SYNOPSIS
+.B xpr
+[
+.B \-device
+.I devtype
+] [
+.B \-scale
+.I scale
+] [
+.B \-height
+.I inches
+] [
+.B \-width
+.I inches
+] [
+.B \-left
+.I inches
+] [
+.B \-top
+.I inches
+] [
+.B \-header
+.I string
+] [
+.B \-trailer
+.I string
+] [
+.B \-landscape
+] [
+.B \-portrait
+] [
+.B \-plane
+.I number
+] [
+.B \-gray
+] [
+.B \-rv
+] [
+.B \-compact
+] [
+.B \-output
+.I filename
+] [
+.B \-append
+.I filename
+] [
+.B \-noff
+] [
+.B \-split
+.I n
+] [
+.B \-psfig
+] [
+.B \-density
+.I dpi
+] [
+.B \-cutoff
+.I level
+] [
+.B \-noposition
+] [
+.B \-gamma
+.I correction
+] [
+.B \-render
+.I algorithm
+] [
+.B \-slide
+] [
+.I filename
+]
+.SH DESCRIPTION
+
+.I xpr
+takes as input a window dump file produced by
+.IR xwd(1)
+and formats it for output on PostScript printers, the Digital LN03 or LA100,
+the IBM PP3812 page printer, the HP LaserJet (or other PCL printers),
+or the HP PaintJet.  If no file
+argument is given, the standard input is used.  By default, \fIxpr\fP
+prints the largest possible representation of the window on the
+output page.  Options allow the user to add headers and trailers,
+specify margins, adjust the scale and orientation, and append
+multiple window dumps to a single output file.  Output is to
+standard output unless 
+.B \-output
+is specified.
+.sp 1
+.ne 8
+.B Command Options
+.sp 1
+.IP "\fB\-device\fP \fIdevtype\fP"
+Specifies the device on which the file will be printed.  Currently supported:
+.RS 12
+.PD 0
+.TP
+.B la100
+Digital LA100
+.TP
+.B ljet
+\s-1HP\s+1 LaserJet series and other monochrome PCL devices
+such as ThinkJet, QuietJet, RuggedWriter, \s-1HP\s+12560 series,
+and \s-1HP\s+12930 series printers
+.TP
+.B ln03
+Digital LN03
+.TP
+.B pjet
+HP PaintJet (color mode)
+.TP
+.B pjetxl
+HP HP PaintJet XL Color Graphics Printer (color mode)
+.TP
+.B pp
+IBM PP3812
+.TP
+.B ps
+PostScript printer
+.PD
+.RE
+.IP
+The default is PostScript.
+\fB-device lw\fP (LaserWriter) is equivalent to -device ps and is
+provided only for backwards compatibility.
+.IP "\fB\-scale\fP \fIscale\fP"
+Affects the size of the window on the page.  The PostScript, LN03, and HP
+printers are able to
+translate each bit in a window pixel map into a grid of a specified size.
+For example each bit might translate into a 3x3 grid.  This would be
+specified by \fB\-scale\fP \fI3\fP.  By default a window is printed 
+with the largest scale that will fit onto the page for the specified
+orientation.
+.IP "\fB\-height\fP \fIinches\fP"
+Specifies the maximum height of the page.
+.IP "\fB\-width\fP \fIinches\fP"
+Specifies the maximum width of the page.
+.IP "\fB\-left\fP \fIinches\fP"
+Specifies the left margin in inches.  Fractions
+are allowed.  By default the window is centered in the page.
+.IP "\fB\-top\fP \fIinches\fP"
+Specifies the top margin for the picture in inches.  Fractions are
+allowed.
+.IP "\fB\-header\fP \fIstring\fP"
+Specifies a header string to be printed above the window.
+.IP "\fB\-trailer\fP \fIstring\fP"
+Specifies a trailer string to be printed below the window.
+.IP "\fB\-landscape\fP"
+Forces the window to printed in landscape mode.  By default
+a window is printed such that its longest side follows the long side of
+the paper.
+.IP "\fB\-plane\fP \fInumber\fP"
+Specifies which bit plane to use in an image.  The default is to use the
+entire image and map values into black and white based on color intensities.
+.IP "\fB\-gray\fP \fI 2 | 3 | 4\fP"
+Uses a simple 2x2, 3x3, or 4x4 gray scale conversion on a color image,
+rather than mapping to strictly black and white.  This doubles,
+triples, or quadruples the effective width and height of the image.
+.IP "\fB\-portrait\fP"
+Forces the window to be printed in portrait mode.  By default
+a window is printed such that its longest side follows the long side of
+the paper.
+.IP "\fB\-rv\fP"
+Forces the window to be printed in reverse video.
+.IP "\fB\-compact\fP"
+Uses simple run-length encoding for compact representation of windows
+with lots of white pixels.
+.IP "\fB\-output\fP \fIfilename\fP"
+Specifies an output file name.  If this option is not specified, standard
+output is used.
+.IP "\fB\-append\fP \fIfilename\fP"
+Specifies a filename previously produced by \fIxpr\fP to which the window
+is to be appended.
+.IP "\fB\-noff\fP"
+When specified in conjunction with \fB\-append\fP, the window will appear
+on the same page as the previous window.
+.IP "\fB\-split\fP \fIn\fP"
+This option allows the user to split a window onto several pages.  
+This might be necessary for very large windows that would otherwise
+cause the printer to overload and print the page in an obscure manner.
+.IP "\fB\-psfig\fP"
+Suppress translation of the PostScript picture to the center of the page.
+.IP "\fB\-density\fP \fIdpi\fP"
+Indicates what dot-per-inch density should be used by the HP printer.
+.IP "\fB\-cutoff\fP \fIlevel\fP"
+Changes the intensity level where colors are mapped to either black or
+white for monochrome output on a LaserJet printer.
+The \fIlevel\fP is expressed as percentage of
+full brightness.  Fractions are allowed.
+.IP "\fB\-noposition\fP"
+This option causes header, trailer, and image positioning command
+generation to be bypassed for LaserJet, PaintJet and
+PaintJet XL printers.
+.IP "\fB\-gamma\fP \fIcorrection\fP"
+This changes the intensity of the colors printed by
+PaintJet XL printer. The \fIcorrection\fP is
+a floating point value in the range 0.00 to 3.00.
+Consult the operator's manual to determine the correct value for
+the specific printer.
+.IP "\fB\-render\fP \fIalgorithm\fP"
+This allows PaintJet XL printer to render the
+image with the best quality versus performance tradeoff.
+Consult the operator's manual to determine which \fIalgorithm\fPs
+are available.
+.IP "\fB\-slide\fP"
+This option allows overhead transparencies to be printed
+using the PaintJet and PaintJet XL printers.
+
+.SH SEE ALSO
+xwd(1), xwud(1), X(1)
+.SH LIMITATIONS
+
+The current version of \fIxpr\fP can generally print out on the LN03
+most X windows that are not larger than two-thirds of the screen.
+For example, it will be able to print out a large Emacs window, but
+it will usually fail when trying to print out the entire screen.  The
+LN03 has memory limitations that can cause it to incorrectly print
+very large or complex windows.  The two most common errors
+encountered are ``band too complex'' and ``page memory exceeded.''
+In the first case, a window may have a particular six pixel row that
+contains too many changes (from black to white to black).  This will
+cause the printer to drop part of the line and possibly parts of the
+rest of the page.  The printer will flash the number `1' on its front
+panel when this problem occurs.  A possible solution to this problem
+is to increase the scale of the picture, or to split the picture onto
+two or more pages.  The second problem, ``page memory exceeded,''
+will occur if the picture contains too much black, or if the picture
+contains complex half-tones such as the background color of a
+display.  When this problem occurs the printer will automatically
+split the picture into two or more pages.  It may flash the number
+`5' on its from panel.  There is no easy solution to this problem.
+It will probably be necessary to either cut and paste, or to rework the
+application to produce a less complex picture.
+
+There are several limitations on the LA100 support:
+the picture will always be printed in
+portrait mode, there is no scaling,
+and the aspect ratio will be slightly off.
+
+Support for PostScript output currently cannot handle the \fB-append\fP,
+\fB-noff\fP or \fB-split\fP options.
+
+The \fB-compact\fP option is
+.I only
+supported for PostScript output.
+It compresses white space but not black space, so it is not useful for
+reverse-video windows.
+
+For color images, should map directly to PostScript image support.
+
+.SH "HP PRINTERS"
+
+If no \fB\-density\fP is specified on the command line 300 dots per inch
+will be assumed for \fIljet\fP and 90 dots per inch for \fIpjet\fP.
+Allowable \fIdensity\fP values for a LaserJet printer are 300, 150, 100,
+and 75 dots per inch.  Consult the operator's manual to determine densities
+supported by other printers.
+
+If no \fB\-scale\fP is specified the image will be expanded to fit the
+printable page area.
+
+The default printable page area is 8x10.5 inches. Other paper sizes can
+be accommodated using the \fB\-height\fP and \fB\-width\fP options.
+
+Note that a 1024x768 image fits the default printable area when processed
+at 100 dpi with scale=1, the same image can also be printed using 300 dpi
+with scale=3 but will require considerably more data be transferred to the
+printer.
+
+\fIxpr\fP may be tailored for use with monochrome PCL printers other than
+the LaserJet.  To print on a ThinkJet (\s-1HP\s+12225A) \fIxpr\fP could be
+invoked as:
+.sp
+.RS 4
+xpr -density 96 -width 6.667 \fIfilename\fP
+.RE
+.sp
+or for black-and-white output to a PaintJet:
+.sp
+.RS 4
+xpr -density 180 \fIfilename\fP
+.RE
+
+The monochrome intensity of a pixel is computed as 0.30*R + 0.59*G
++ 0.11*B.
+If a pixel's computed intensity is less than the \fB\-cutoff\fP
+level it will print as white.  This maps light-on-dark display images
+to black-on-white hardcopy.  The default cutoff intensity is 50% of full
+brightness.  Example: specifying \fB\-cutoff 87.5\fP moves the
+white/black intensity point to 87.5% of full brightness.
+
+A LaserJet printer must be configured with sufficient memory to handle the
+image.  For a full page at 300 dots per inch approximately 2MB of printer
+memory is required.
+
+Color images are produced on the PaintJet
+at 90 dots per inch.  The
+PaintJet is limited to sixteen colors from its 330 color palette on each
+horizontal print line.  \fIxpr\fP will issue a warning message if more than
+sixteen colors are encountered on a line.  \fIxpr\fP will program the
+PaintJet for the first sixteen colors encountered on each line and use the
+nearest matching programmed value for other colors present on the line.
+
+Specifying the \fB\-rv\fP, reverse video, option for the PaintJet will
+cause black and white to be interchanged on the output image.  No other
+colors are changed.
+
+Multiplane images must be recorded by \fIxwd\fP in \fIZPixmap\fP format.
+Single plane (monochrome) images may be in either \fIXYPixmap\fP or
+\fIZPixmap\fP format.
+
+Some PCL printers do not recognize image positioning commands.  Output for
+these printers will not be centered on the page and header and trailer
+strings may not appear where expected.
+
+The \fB\-gamma\fP and \fB-render\fP options are supported only on
+the PaintJet XL printers.
+
+The \fB\-slide\fP option is not supported for LaserJet printers.
+
+The \fB\-split\fP option is not supported for HP printers.
+
+The \fB\-gray\fP option is not supported for HP or IBM printers.
+.br
+Copyright 1986, Marvin Solomon and the University of Wisconsin.
+.br
+Copyright 1988, Hewlett Packard Company.
+.br
+See \fIX(1)\fP for a full statement of rights and permissions.
+.SH AUTHORS
+Michael R. Gretzinger, MIT Project Athena, 
+Jose Capo, MIT Project Athena (PP3812 support),
+Marvin Solomon, University of Wisconsin,
+Bob Scheifler, MIT, Angela Bock and E. Mike Durbin, Rich Inc. (grayscale),
+Larry Rupp, HP (HP printer support).
diff --git a/xvidtune/COPYING b/xvidtune/COPYING
new file mode 100644 (file)
index 0000000..4ea858b
--- /dev/null
@@ -0,0 +1,25 @@
+Copyright (c) 1995  Kaleb S. KEITHLEY
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
+OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Kaleb S. KEITHLEY
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+from Kaleb S. KEITHLEY.
diff --git a/xvidtune/ChangeLog b/xvidtune/ChangeLog
new file mode 100644 (file)
index 0000000..3bc1587
--- /dev/null
@@ -0,0 +1,415 @@
+commit b1fac8775467a1d43a4a5881f2366ec4f86e799b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 23:09:42 2010 -0800
+
+    xvidtune 1.0.2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit f60fe08ccc19444f2c303bd7e5bab1faf669bce3
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 23:07:34 2010 -0800
+
+    Minor man page fixes
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 809f0ff36dabc2dcf47fd96ff2135e93a14af176
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 23:01:42 2010 -0800
+
+    Fix wording of message indicating modes cannot be set
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit a1449405df76225e608384d770f44b68f8f918fa
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:54:38 2010 -0800
+
+    Replace remaining sprintf calls with snprintf
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit c55a10661a790fe834fc3dfd70c8e722e54c526c
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:44:25 2010 -0800
+
+    Use automake silencer on man page generation too
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 4b073704dd69e47f68f61dba1b389f29379709f6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:44:04 2010 -0800
+
+    Move CWARNFLAGS addition from configure.ac to Makefile.am
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit cb9c3a5ddad517f9386b195b7d710e6207618aeb
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:42:54 2010 -0800
+
+    Raise xorg-macros requirement to 1.4
+    
+    Needed since the changes in e0da3e548b7c5f3289fd43dd63f8c8e29285b55c
+    depend on the INSTALL file delivered in xorg-macros 1.4
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit fed4d1968a30356c42a07b48f9a1059e2b576c74
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 15 22:41:52 2010 -0800
+
+    Fill in COPYING with notices from sources
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit cf9e789281484747d5c5a61d74eee2e4a6b4947d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sat Dec 19 20:48:48 2009 -0500
+
+    configure.ac: use backticks rather than $() for cmd subs
+    
+    Use "$PKG_CONFIG" rather than hard coded "pkg-config"
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 66be761ba70c0e9e053f8c9e48168ebefeaf7a8d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Nov 26 09:19:55 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit e0da3e548b7c5f3289fd43dd63f8c8e29285b55c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:09 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit 5ed4c98a422a1e1df47768e2d44aab6a3b81a687
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 78b9b9614df9bc6c42a26f019c3ce8956ee5486d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:39 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 24781b9cf48865d2fb10112dda87c6d2437fd20d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:16 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit 5a92ce4dd41bd71032e9b44a20e3a58ffdd73af9
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Oct 1 14:54:31 2009 -0700
+
+    Add README with pointers to mailing lists, bugzilla, & git
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 19f177db7c50aac512761ddbd79c0344d7dc04de
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Sat Sep 26 09:55:44 2009 -0700
+
+    Add xmu & x11 to PKG_CHECK_MODULES
+    
+    http://bugs.freedesktop.org/show_bug.cgi?id=24166
+    Reported by: Bernhard Rosenkraenzer <bero@arklinux.org>
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 5dc3873019dfc20f923f18ab73248d7b7ecefce2
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Mon Jan 26 19:26:46 2009 -0200
+
+    Correct make distcheck and sparse warnings.
+    
+      Also apply "by hand" the sed -e 's/__VENDOR__/The X.Org Foundation'
+    (or any other value used in the previous --with-vendor=... configure
+    option) and use a static app-defaults file, matching pattern of
+    changes in other xorg/app programs.
+
+commit 540ce8c77fe520e6d46571cbc329db6b3784010f
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Sat Nov 8 15:33:08 2008 -0800
+
+    Fixed compilation on case-insensitive file systems
+
+commit e120d48bc3f72d5df39218c238323e48f4d80bc4
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Wed Aug 20 10:32:53 2008 -0400
+
+    xaw8 is gone, use xaw7
+
+commit 03c62eb709d18c4c0031389c4200b018b6ee352c
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed May 21 14:12:12 2008 -0400
+
+    Fix a buffer overrun on the heap.
+
+commit 716e7a755d854ec914c202f16a62625dd1bd56d9
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Tue Jan 22 15:27:12 2008 -0800
+
+    Change xvidtune_CFLAGS to AM_CFLAGS to make automake-1.10 happier
+    
+    Makefile.am:28: compiling `xvidtune.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
+
+commit fb92c5943d19bc7cf555ebceb41c5dcdbe812265
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Tue Jan 22 15:25:07 2008 -0800
+
+    Bug 14190: Remove extra debugging echo from configure.ac
+    
+    <http://bugs.freedesktop.org/show_bug.cgi?id=14190>
+
+commit 94aa75677d20b62363e8aa00c7a2f04e6a83d24c
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 16:37:32 2007 -0500
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit f51c09047e186eb4d557304208bf0ea58a3254fc
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:51:54 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 840e90ae56bdfa821ee2b6e53d625e36d63323c5
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Aug 23 19:25:15 2007 -0400
+
+    Rename .cvsignore to .gitignore
+
+commit 962ea36b940056427379e9c12a56c59e1d43c962
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:29:54 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit fcaf3ee10090fa2f8cac9e313cec26f57a7d22a2
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:22:47 2005 +0000
+
+    Stub COPYING files
+
+commit 71a8f9056e9d1b9875d07de9b6906aa962425752
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:12 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit 1943921e9ccf275b582776dd735da4d4b8a401cd
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 7 16:18:02 2005 +0000
+
+    Change to use the app-defaults default dir configured in libXt.
+
+commit 8e5ab86825f40de99b9ebde1a8726a4ae988fc57
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:26 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 288d2214f1ddbe65740127d07dc5d2130337d1c7
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 17:08:50 2005 +0000
+
+    Add m4 magic to allow AS_HELP_STRING to work with older versions of
+        autoconf 2.57.
+
+commit 62ac03d689b5f500400bb9408dc3d8b96b9fb8d6
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:28 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit f77c11cead7e6872ec4fcbc42ef2d303be9e5f40
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:01:48 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit 902ea7375a3b1cdb42b3db441da6ad3effd2940a
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Mon Nov 21 10:35:09 2005 +0000
+
+    Another pass at .cvsignores for apps.
+
+commit 2feeb356ca1217e2ee5a5dcd03d87463f3dd67b5
+Author: Eric Anholt <anholt@freebsd.org>
+Date:   Sun Nov 20 22:08:56 2005 +0000
+
+    Add/improve .cvsignore files for apps.
+
+commit bb0d7bfe8145f6a112c66491954ca055414e149f
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:47:58 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit 2e0cbc53793c5defec0e76ec10e694a8b82a8d4e
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 14:44:03 2005 +0000
+
+    Substitute __VENDOR__ with $(VENDORNAME) in disclaimer in XVidtune
+        app-defaults file
+    Add --with-vendor-name option to set $(VENDORNAME). Set default
+        $(VENDORNAME) to "The X.Org Foundation".
+
+commit f5813be966f1ba771a57ff435aafb49b859ceae2
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Tue Oct 18 00:32:54 2005 +0000
+
+    Change default install dir for app-default files from
+        $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match
+        the monolith & allow localization
+
+commit 12b577c0a7fde27115a3e3f75c55b249fda17e4f
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Oct 17 23:56:25 2005 +0000
+
+    Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+        work better with BSD make
+
+commit 3be95f39d8c3a14a25ce63a837dacbac583b263c
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Oct 14 01:38:30 2005 +0000
+
+    Use sed to fill in variables in man page
+
+commit f1c3f49e3d485176406c189bab2d63ff4e783ea8
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Aug 1 20:25:32 2005 +0000
+
+    Install man pages to section 1 instead of section m (Patch from Donnie
+        Berkholz)
+
+commit f5392e64e1e83e7a0a7153445da09f808499a512
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:38 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit 95f3ea2eb32fca87da7e2e251a2944de9712a501
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sat Jul 23 17:10:13 2005 +0000
+
+    Fix remaining DEP_{CFLAGS,LIBS} references
+
+commit fd1e75a518952bd6a5a432a037650474b45d6f15
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Jul 20 19:32:04 2005 +0000
+
+    Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+        configure cache, you cache it, and the cached value is probably wrong.
+
+commit da2f699f9f2e51eb57508230be679a6ed7fa6644
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Sat Jul 16 23:29:38 2005 +0000
+
+    x11perf/Makefile.am: xinit/Makefile.am: xvidtune/Makefile.am:
+    - Replace $< with portable macro xinit/Makefile.am: xinit/configure.ac:
+        xvidtune/Makefile.am: xvidtune/configure.ac:
+    - Use more portable cpp invocations for pre-processing files
+        xfs/configure.ac:
+    - Add XTRANS_CONNECTION_FLAGS so xtrans transport type defines are set
+        correctly
+
+commit 0fd158e44f7d1c5ad386cd7a19d72b4ba4511e14
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Fri Jul 1 20:09:09 2005 +0000
+
+    xtrap.pc.in: s/Xfixes/XTrap/ xi.pc.in: s/Xt/Xi/ Xv/src/Makefile.am: remove
+        whitespace after backslash modularizeapp.sh: s/destkop/desktop/
+        modular/symlink.sh: Add bitmaps for xeyes, system.xsm for xsm, and
+        Xvidtune.cpp for xvidtune. Also comment out non-existing mga_bios.h
+    Check in buildsystems for xsetroot, xsm, xstdcmap, xtrap, and xvinfo
+
+commit f1dee76b843f9d02c3e46071d97706ad630d1287
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 19:55:08 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit 1fe2219b8aae2ba087303e34460f92ceb077c2f2
+Author: Egbert Eich <eich@suse.de>
+Date:   Tue Mar 23 13:54:01 2004 +0000
+
+    file Xvidtune.cpp was initially added on branch XORG-RELEASE-1-TM.
+
+commit 969efb17084d34e27ecdb4a23a0b1e2af02bce42
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:35:52 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 975c2ec449215ec549a663fc0c55cfcb45b78609
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:13:20 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 35f321520eb3a9249a403d9167fa2832957ddfe2
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:36:32 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit 1a75c3cc3485b05cd3446ad508ca63bb8811e7b7
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:24:18 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit 2fa30b1def7a20aa24b0f3ca243ddb3845f980e8
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Tue Nov 25 19:29:23 2003 +0000
+
+    XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit 0f013a19b7553c5b92c627faba6897c20d386440
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:24 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit 1f183135044de12b715a955cc7f354bed929f221
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:49:24 2003 +0000
+
+    Initial revision
diff --git a/xvidtune/INSTALL b/xvidtune/INSTALL
new file mode 100644 (file)
index 0000000..8b82ade
--- /dev/null
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
similarity index 73%
rename from xmore/Makefile.am
rename to xvidtune/Makefile.am
index 53c3ca6..cc5c3a4 100644 (file)
@@ -1,3 +1,4 @@
+# $Id$
 # 
 #  Copyright 2005  Red Hat, Inc.
 # 
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-bin_PROGRAMS = xmore
+bin_PROGRAMS = xvidtune
 
-xmore_CFLAGS = $(XMORE_CFLAGS) -DXMORE
-xmore_LDADD = $(XMORE_LIBS)
+AM_CFLAGS = $(CWARNFLAGS) $(XVIDTUNE_CFLAGS)
+xvidtune_LDADD = $(XVIDTUNE_LIBS)
 
-xmore_SOURCES =        \
-        xmore.c \
-        xmore.h
+xvidtune_SOURCES =     \
+        xvidtune.c
 
-if XAW_USE_XPRINT
-xmore_CFLAGS += -DUSE_XPRINT
-
-xmore_SOURCES += \
-        print.c \
-        printdialog.c \
-        printdialog.h \
-        printdialogprivates.h \
-        print.h
-endif
-
-appman_PRE = \
-        xmore.man
-
-# App default files  (*.ad)
-
-appdefaultdir = @appdefaultdir@
-
-
-APPDEFAULTFILES = \
-        XMore
-
-SUFFIXES = .ad
-
-.ad:
-       cp $< $@
-
-appdefault_DATA = $(APPDEFAULTFILES)
-
-EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad)
-
-CLEANFILES = $(APPDEFAULTFILES)
-
-EXTRA_DIST += xmore.sgml
+# Man page
 
 appmandir = $(APP_MAN_DIR)
-
+appman_PRE = xvidtune.man
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 
-EXTRA_DIST += $(appman_PRE)
-CLEANFILES += $(appman_DATA)
-
 SED = sed
 
 # Strings to replace in man pages
@@ -89,7 +53,31 @@ MAN_SUBSTS = \
        -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
        -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
 
-SUFFIXES += .$(APP_MAN_SUFFIX) .man
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
 .man.$(APP_MAN_SUFFIX):
-       sed $(MAN_SUBSTS) < $< > $@
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+
+appdefaultdir = @appdefaultdir@
+
+dist_appdefault_DATA = app-defaults/Xvidtune
+
+EXTRA_DIST = $(appman_PRE)
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = Xvidtune $(appman_DATA)
+
+
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
similarity index 85%
rename from xgc/Makefile.in
rename to xvidtune/Makefile.in
index fe07316..6bdfe08 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,6 +15,7 @@
 
 @SET_MAKE@
 
+# $Id$
 # 
 #  Copyright 2005  Red Hat, Inc.
 # 
@@ -56,13 +57,13 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-bin_PROGRAMS = xgc$(EXEEXT)
+bin_PROGRAMS = xvidtune$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
-       ChangeLog INSTALL NEWS config.guess config.sub depcomp gram.c \
-       gram.h install-sh lex.c missing ylwrap
+       $(srcdir)/config.h.in $(top_srcdir)/configure COPYING \
+       ChangeLog INSTALL config.guess config.sub depcomp install-sh \
+       missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -76,13 +77,10 @@ CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \
        "$(DESTDIR)$(appdefaultdir)"
 PROGRAMS = $(bin_PROGRAMS)
-am_xgc_OBJECTS = choice.$(OBJEXT) dashlist.$(OBJEXT) getfile.$(OBJEXT) \
-       gram.$(OBJEXT) interpret.$(OBJEXT) lex.$(OBJEXT) \
-       main.$(OBJEXT) planemask.$(OBJEXT) record.$(OBJEXT) \
-       testfrac.$(OBJEXT) tests.$(OBJEXT) text.$(OBJEXT)
-xgc_OBJECTS = $(am_xgc_OBJECTS)
+am_xvidtune_OBJECTS = xvidtune.$(OBJEXT)
+xvidtune_OBJECTS = $(am_xvidtune_OBJECTS)
 am__DEPENDENCIES_1 =
-xgc_DEPENDENCIES = $(am__DEPENDENCIES_1)
+xvidtune_DEPENDENCIES = $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -100,22 +98,11 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_CCLD = $(am__v_CCLD_$(V))
 am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
 am__v_CCLD_0 = @echo "  CCLD  " $@;
-@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
-LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
-AM_V_LEX = $(am__v_LEX_$(V))
-am__v_LEX_ = $(am__v_LEX_$(AM_DEFAULT_VERBOSITY))
-am__v_LEX_0 = @echo "  LEX   " $@;
-YLWRAP = $(top_srcdir)/ylwrap
-@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
-AM_V_YACC = $(am__v_YACC_$(V))
-am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY))
-am__v_YACC_0 = @echo "  YACC  " $@;
 AM_V_GEN = $(am__v_GEN_$(V))
 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
 am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(xgc_SOURCES)
-DIST_SOURCES = $(xgc_SOURCES)
+SOURCES = $(xvidtune_SOURCES)
+DIST_SOURCES = $(xvidtune_SOURCES)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -150,13 +137,12 @@ am__remove_distdir = \
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
 ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
-APPDEFS_LIBS = @APPDEFS_LIBS@
 APP_MAN_DIR = @APP_MAN_DIR@
 APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
 AUTOCONF = @AUTOCONF@
@@ -184,14 +170,12 @@ FILE_MAN_DIR = @FILE_MAN_DIR@
 FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
 GREP = @GREP@
 INSTALL = @INSTALL@
+INSTALL_CMD = @INSTALL_CMD@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
-LEX = @LEX@
-LEXLIB = @LEXLIB@
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIB_MAN_DIR = @LIB_MAN_DIR@
@@ -208,6 +192,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
@@ -215,10 +200,8 @@ SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-XGC_CFLAGS = @XGC_CFLAGS@
-XGC_LIBS = @XGC_LIBS@
-YACC = @YACC@
-YFLAGS = @YFLAGS@
+XVIDTUNE_CFLAGS = @XVIDTUNE_CFLAGS@
+XVIDTUNE_LIBS = @XVIDTUNE_LIBS@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
@@ -239,7 +222,6 @@ build_vendor = @build_vendor@
 builddir = @builddir@
 datadir = @datadir@
 datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
@@ -271,43 +253,16 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_YFLAGS = -d
-AM_CFLAGS = $(CWARNFLAGS) $(XGC_CFLAGS) -D_BSD_SOURCE
-xgc_LDADD = $(XGC_LIBS) -lm
-xgc_SOURCES = \
-        choice.c \
-        constants.h \
-        dashlist.c \
-        getfile.c \
-       gram.y \
-        interpret.c \
-       lex.l \
-        main.c \
-        planemask.c \
-        record.c \
-        testfrac.c \
-        tests.c \
-        text.c \
-        xgc.h
-
-appman_PRE = \
-        xgc.man
-
-BUILT_SOURCES = gram.h gram.c lex.c
-MAINTAINERCLEANFILES = $(BUILT_SOURCES) ChangeLog
+AM_CFLAGS = $(CWARNFLAGS) $(XVIDTUNE_CFLAGS)
+xvidtune_LDADD = $(XVIDTUNE_LIBS)
+xvidtune_SOURCES = \
+        xvidtune.c
 
-# App default files
-DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
-dist_appdefault_DATA = \
-        app-defaults/Xgc \
-        app-defaults/Xgc-color
 
-EXTRA_DIST = tile Bugs Written/FilledRects Written/Interface \
-       Written/Jim Written/Notes Written/Notes2 Written/Outline \
-       Written/Widget $(appman_PRE) ChangeLog
+# Man page
 appmandir = $(APP_MAN_DIR)
+appman_PRE = xvidtune.man
 appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-CLEANFILES = $(appman_DATA)
 SED = sed
 
 # Strings to replace in man pages
@@ -327,26 +282,33 @@ MAN_SUBSTS = \
        -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
 
 SUFFIXES = .$(APP_MAN_SUFFIX) .man
-all: $(BUILT_SOURCES) config.h
+
+# App default files
+DISTCHECK_CONFIGURE_FLAGS = --with-appdefaultdir=\$${datadir}/X11/app-defaults
+dist_appdefault_DATA = app-defaults/Xvidtune
+EXTRA_DIST = $(appman_PRE)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+CLEANFILES = Xvidtune $(appman_DATA)
+all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .l .o .obj .y
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
 am--refresh:
        @:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
-             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu Makefile
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -420,9 +382,9 @@ uninstall-binPROGRAMS:
 
 clean-binPROGRAMS:
        -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-xgc$(EXEEXT): $(xgc_OBJECTS) $(xgc_DEPENDENCIES) 
-       @rm -f xgc$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(xgc_OBJECTS) $(xgc_LDADD) $(LIBS)
+xvidtune$(EXEEXT): $(xvidtune_OBJECTS) $(xvidtune_DEPENDENCIES) 
+       @rm -f xvidtune$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(xvidtune_OBJECTS) $(xvidtune_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -430,18 +392,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/choice.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dashlist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfile.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gram.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/planemask.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/record.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testfrac.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvidtune.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -458,12 +409,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.l.c:
-       $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
-
-.y.c:
-       $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
 install-appmanDATA: $(appman_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)"
@@ -593,7 +538,8 @@ distdir: $(DISTFILES)
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
        -test -n "$(am__skip_mode_fix)" \
-       || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -637,17 +583,17 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
-         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+         lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -707,15 +653,13 @@ distcleancheck: distclean
               $(distcleancheck_listfiles) ; \
               exit 1; } >&2
 check-am: all-am
-check: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
 all-am: Makefile $(PROGRAMS) $(DATA) config.h
 installdirs:
        for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appdefaultdir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
-install: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -741,10 +685,6 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-       -rm -f gram.c
-       -rm -f gram.h
-       -rm -f lex.c
-       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
        -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
@@ -819,7 +759,7 @@ ps-am:
 uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
-.MAKE: all check install install-am install-strip
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
        clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
@@ -840,17 +780,18 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
        uninstall-dist_appdefaultDATA
 
 
-gram.h: gram.c
-
 .man.$(APP_MAN_SUFFIX):
        $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
 
-.PHONY: ChangeLog
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
 
 ChangeLog:
        $(CHANGELOG_CMD)
 
-dist-hook: ChangeLog
+dist-hook: ChangeLog INSTALL
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
similarity index 71%
rename from bitmap/README
rename to xvidtune/README
index 4a06c80..5d1811e 100644 (file)
@@ -1,4 +1,5 @@
-bitmap, bmtoa, atobm - X bitmap (XBM) editor and converter utilities
+xvidtune is a client interface to the X server video mode
+extension (XFree86-VidModeExtension).
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
@@ -11,9 +12,9 @@ Please submit bug reports to the Xorg bugzilla:
 
 The master development code repository can be found at:
 
-        git://anongit.freedesktop.org/git/xorg/app/bitmap
+        git://anongit.freedesktop.org/git/xorg/app/xvidtune
 
-        http://cgit.freedesktop.org/xorg/app/bitmap
+        http://cgit.freedesktop.org/xorg/app/xvidtune
 
 For patch submission instructions, see:
 
similarity index 96%
rename from xgc/aclocal.m4
rename to xvidtune/aclocal.m4
index 684599f..17bcd27 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
-[m4_warning([this file was generated for autoconf 2.63.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
+[m4_warning([this file was generated for autoconf 2.65.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -34,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11], [],
+m4_if([$1], [1.11.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -1033,29 +1033,23 @@ dnl
 dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
 dnl 
 dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
 dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
 dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
 
 # XORG_MACROS_VERSION(required-version)
 # -------------------------------------
@@ -1073,7 +1067,7 @@ dnl of the copyright holder.
 # See the "minimum version" comment for each macro you use to see what 
 # version you require.
 m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.3.0])
+m4_define([vers_have], [1.4.1])
 m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
 m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
 m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1369,7 +1363,8 @@ main() {
     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 }],
                [MALLOC_ZERO_RETURNS_NULL=yes],
-               [MALLOC_ZERO_RETURNS_NULL=no])
+               [MALLOC_ZERO_RETURNS_NULL=no],
+               [MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
@@ -1527,8 +1522,26 @@ XORG_CWARNFLAGS
 XORG_STRICT_OPTION
 XORG_RELEASE_VERSION
 XORG_CHANGELOG
+XORG_INSTALL
 XORG_MANPAGE_SECTIONS
 ]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
 dnl Copyright 2005 Red Hat, Inc
 dnl
 dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -1598,14 +1611,13 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
 # Defines the variable CHANGELOG_CMD as the command to generate
 # ChangeLog from git.
 #
-# Arrange that distcleancheck ignores ChangeLog left over by distclean.
 #
 AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
 echo 'git directory not found: installing possibly empty changelog.' >&2)"
 AC_SUBST([CHANGELOG_CMD])
-AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
 ]) # XORG_CHANGELOG
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
diff --git a/xvidtune/app-defaults/Xvidtune b/xvidtune/app-defaults/Xvidtune
new file mode 100644 (file)
index 0000000..6ba9c5d
--- /dev/null
@@ -0,0 +1,183 @@
+! $XFree86: xc/programs/xvidtune/Xvidtune.ad,v 3.10 1995/07/19 12:46:12 dawes Exp $
+!
+*adInstalled: true
+*borderWidth: 0
+*Scrollbar.borderWidth: 1
+*Scrollbar.width: 250
+*Command.borderWidth: 1
+*HSyncStart-form.fromVert: HDisplay-form
+*HSyncEnd-form.fromVert: HSyncStart-form
+*HTotal-form.fromVert: HSyncEnd-form
+*VSyncStart-form.fromVert: VDisplay-form
+*VSyncEnd-form.fromVert: VSyncStart-form
+*VTotal-form.fromVert: VSyncEnd-form
+*Flags-form.fromVert: HTotal-form
+*Buttons-form.fromVert: Flags-form
+*Buttons2-form.fromVert: Buttons-form
+*Left-button.fromVert: HTotal-scrollbar
+*Right-button.fromVert: HTotal-scrollbar
+*Narrower-button.fromVert: HTotal-scrollbar
+*Wider-button.fromVert: HTotal-scrollbar
+*Up-button.fromVert: VTotal-scrollbar
+*Down-button.fromVert: VTotal-scrollbar
+*Shorter-button.fromVert: VTotal-scrollbar
+*Taller-button.fromVert: VTotal-scrollbar
+*HDisplay-text.fromHoriz: HDisplay-label
+*HSyncStart-text.fromHoriz: HSyncStart-label
+*HSyncStart-scrollbar.fromVert: HSyncStart-label
+*HSyncStart-scrollbar.orientation: horizontal
+*HSyncEnd-text.fromHoriz: HSyncEnd-label
+*HSyncEnd-scrollbar.fromVert: HSyncEnd-label
+*HSyncEnd-scrollbar.orientation: horizontal
+*Right-button.fromHoriz: Left-button
+*Wider-button.fromHoriz: Right-button
+*Narrower-button.fromHoriz: Wider-button
+*HTotal-text.fromHoriz: HTotal-label
+*HTotal-scrollbar.fromVert: HTotal-label
+*HTotal-scrollbar.orientation: horizontal
+*VDisplay-form.fromHoriz: HSyncStart-form
+*VTotal-form.fromHoriz: HSyncStart-form
+*VSyncStart-form.fromHoriz: HSyncStart-form
+*VSyncEnd-form.fromHoriz: HSyncStart-form
+*VDisplay-text.fromHoriz: VDisplay-label
+*VSyncStart-text.fromHoriz: VSyncStart-label
+*VSyncStart-scrollbar.fromVert: VSyncStart-label
+*VSyncStart-scrollbar.orientation: horizontal
+*VSyncStart-text.type: XawAsciiString
+*VSyncEnd-text.fromHoriz: VSyncEnd-label
+*VSyncEnd-scrollbar.fromVert: VSyncEnd-label
+*VSyncEnd-scrollbar.orientation: horizontal
+*VTotal-text.fromHoriz: VTotal-label
+*VTotal-scrollbar.fromVert: VTotal-label
+*VTotal-scrollbar.orientation: horizontal
+*PixelClock-form.fromHoriz: HTotal-form
+*PixelClock-form.fromVert: VTotal-form
+*HSyncRate-form.fromHoriz: HTotal-form
+*HSyncRate-form.fromVert: PixelClock-form
+*VSyncRate-form.fromHoriz: HTotal-form
+*VSyncRate-form.fromVert: HSyncRate-form
+*PixelClock-text.fromHoriz: PixelClock-label
+*HSyncRate-text.fromHoriz: HSyncRate-label
+*VSyncRate-text.fromHoriz: VSyncRate-label
+*PixelClock-label.label: Pixel Clock (MHz):
+*HSyncRate-label.label: Horizontal Sync (kHz):
+*VSyncRate-label.label: Vertical Sync (Hz):
+*Flags-text.fromHoriz: Flags-label
+*HDisplay-label.label: HDisplay:
+*HSyncStart-label.label: HSyncStart:
+*HSyncEnd-label.label: HSyncEnd:
+*HTotal-label.label: HTotal:
+*VDisplay-label.label: VDisplay:
+*VSyncStart-label.label: VSyncStart:
+*VSyncEnd-label.label: VSyncEnd:
+*VTotal-label.label: VTotal:
+*Down-button.fromHoriz: Up-button
+*Shorter-button.fromHoriz: Down-button
+*Taller-button.fromHoriz: Shorter-button
+*Flags-label.label: Flags (hex):
+*Flags-text.borderWidth: 1
+*Flags-text*editType: edit
+!Removed Edit capability -- Jon
+*Flags-text*sensitive: False
+*Apply-button.fromHoriz: Quit-button
+*AutoApply-toggle.fromHoriz: Apply-button
+*AutoApply-toggle.borderWidth: 1
+*Test-button.fromHoriz: AutoApply-toggle
+*Restore-button.fromHoriz: Test-button
+*Show-button.fromHoriz: Fetch-button
+*Next-button.fromHoriz: Show-button
+*Prev-button.fromHoriz: Next-button
+*Quit-button.label: Quit
+*Fetch-button.label: Fetch
+*Show-button.label: Show
+*Restore-button.label: Restore
+*Test-button.label: Test
+*Apply-button.label: Apply
+*AutoApply-toggle.label: Auto
+*Next-button.label: Next
+*Prev-button.label: Prev
+*Left-button.label: Left
+*Right-button.label: Right
+*Wider-button.label: Wider
+*Narrower-button.label: Narrower
+*Up-button.label: Up
+*Down-button.label: Down
+*Shorter-button.label: Shorter
+*Taller-button.label: Taller
+*Abort.label: Abort Test Now
+*WarnOK.label: OK
+*WarnCancel.label: Cancel
+*NoTuneOK.label: OK
+*Left.label: Left
+*Right.label: Right
+*Wider.label: Wider
+*Narrower.label: Narrower
+*Up.label: Up
+*Down.label: Down
+*Shorter.label: Shorter
+*Higher.label: Higher
+*AckError.label: Acknowledged
+*ErrorMessage.label: Sorry: You have requested a mode-line\n\
+ That is not possible, or not supported by your\n\
+ hardware configuration\n
+*testingMessage.label: Mode test current in progress\n\n     Please wait
+*WarnLabel.label: WARNING     WARNING    WARNING    WARNING    WARNING\
+    WARNING\n\n\
+THE INCORRECT USE OF THIS PROGRAM CAN DO PERMANENT DAMAGE TO YOUR MONITOR\n\
+AND/OR VIDEO CARD.  IF YOU ARE NOT SURE WHAT YOU ARE DOING, HIT CANCEL\n\
+NOW. OTHERWISE, HIT OK TO CONTINUE\n\
+\n\
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\n\
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n\
+IN NO EVENT SHALL Kaleb S. KEITHLEY (or his employer) OR\n\
+ The X.Org Foundation \
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n\
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n\
+DEALINGS IN THE SOFTWARE.\n\n
+*NoTuneLabel.label: Video modes are not tunable on this chip.\n
+
+       
+*S3-form.fromVert: Buttons2-form
+*EarlySc-toggle.fromHoriz: InvertVclk-toggle
+*Blank1-label.fromHoriz: EarlySc-toggle
+!*Blank1-text.fromHoriz: Blank1-label
+!*Blank2-label.fromHoriz: Blank1-text
+!*Blank2-text.fromHoriz: Blank2-label
+*InvertVclk-toggle.borderWidth: 1
+*EarlySc-toggle.borderWidth: 1
+*Blank1-text.borderWidth: 1
+*Blank2-text.borderWidth: 1
+*Blank1-text*editType: edit
+*Blank2-text*editType: edit
+*Blank1-text*width: 20
+*Blank2-text*width: 20
+*InvertVclk-toggle.label: InvertVCLK
+*EarlySc-toggle.label:EarlySC
+*Blank1-label.label: Blank Delay 1
+*Blank2-label.label: Blank Delay 2
+
+*Blank1Dec-button.fromHoriz: Blank1-label
+*Blank1-text.fromHoriz: Blank1Dec-button
+*Blank1Inc-button.fromHoriz: Blank1-text
+*Blank2-label.fromHoriz: Blank1Inc-button
+*Blank2Dec-button.fromHoriz: Blank2-label
+*Blank2-text.fromHoriz: Blank2Dec-button
+*Blank2Inc-button.fromHoriz: Blank2-text
+*Blank1Inc-button.label: +
+*Blank1Dec-button.label: -
+*Blank2Inc-button.label: +
+*Blank2Dec-button.label: -
+
+*translations: #override <Key>r: xvidtune-restore()\n\
+                         <Key>p: xvidtune-show()\n\
+                         <Key>j: xvidtune-moveleft()\n\
+                         <Key>k: xvidtune-moveright()\n\
+                         <Key>m: xvidtune-movedown()\n\
+                         <Key>i: xvidtune-moveup()\n\
+                         <Key>a: xvidtune-narrower()\n\
+                         <Key>s: xvidtune-wider()\n\
+                         <Key>x: xvidtune-shorter()\n\
+                         <Key>z: xvidtune-taller()\n\
+                         <Key>q: xvidtune-quit()
similarity index 94%
rename from xgc/config.guess
rename to xvidtune/config.guess
index da83314..dc84c68 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
-timestamp='2009-04-27'
+timestamp='2009-11-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-04-27'
 # the same distribution terms that you use for the rest of that program.
 
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -333,6 +333,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux${UNAME_RELEASE}
+       exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
        SUN_ARCH="i386"
@@ -656,7 +659,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -807,12 +810,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd | genuineintel)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -822,6 +825,9 @@ EOF
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
        exit ;;
+    8664:Windows_NT:*)
+       echo x86_64-pc-mks
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -851,6 +857,20 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +893,17 @@ EOF
     frv:Linux:*:*)
        echo frv-unknown-linux-gnu
        exit ;;
+    i*86:Linux:*:*)
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       exit ;;
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
@@ -882,78 +913,34 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    mips:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef mips
-       #undef mipsel
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mipsel
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-       ;;
-    mips64:Linux:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
        exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,8 +949,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -986,66 +976,6 @@ EOF
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    i*86:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us. cd to the root directory to prevent
-       # problems with other programs or directories called `ld' in the path.
-       # Set LC_ALL=C to ensure ld outputs messages in English.
-       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-                        | sed -ne '/supported targets:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported targets: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_targets" in
-         elf32-i386)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         a.out-i386-linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
-         "")
-               # Either a pre-BFD a.out linker (linux-gnuoldld) or
-               # one that does not give us useful --help.
-               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
-       esac
-       # Determine whether the default compiler is a.out or elf
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #ifdef __ELF__
-       # ifdef __GLIBC__
-       #  if __GLIBC__ >= 2
-       LIBC=gnu
-       #  else
-       LIBC=gnulibc1
-       #  endif
-       # else
-       LIBC=gnulibc1
-       # endif
-       #else
-       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-       LIBC=gnu
-       #else
-       LIBC=gnuaout
-       #endif
-       #endif
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^LIBC/{
-               s: ::g
-               p
-           }'`"
-       test x"${LIBC}" != x && {
-               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-               exit
-       }
-       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
@@ -1074,7 +1004,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1182,7 +1112,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1205,16 @@ EOF
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
        case $UNAME_PROCESSOR in
+           i386)
+               eval $set_cc_for_build
+               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                     grep IS_64BIT_ARCH >/dev/null
+                 then
+                     UNAME_PROCESSOR="x86_64"
+                 fi
+               fi ;;
            unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
similarity index 70%
rename from xman/config.h.in
rename to xvidtune/config.h.in
index 36bd8f8..7c9cfb1 100644 (file)
@@ -1,8 +1,5 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the "mkstemp" function. */
-#undef HAS_MKSTEMP
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Default local man page search path (default: none) */
-#undef LOCALMANPATH
-
-/* Define to path to man config file if you have one */
-#undef MANCONF
-
-/* Define to 1 if you have BSD format manpath.config */
-#undef MANCONFIGSTYLE_BSD
-
-/* Define to 1 if you have FreeBSD format manpath.config */
-#undef MANCONFIGSTYLE_FreeBSD
-
-/* Define to 1 if you have Linux format man.conf or man.config */
-#undef MANCONFIGSTYLE_Linux
-
-/* Define to 1 if you have OpenBSD format manpath.config */
-#undef MANCONFIGSTYLE_OpenBSD
-
 /* Name of package */
 #undef PACKAGE
 
@@ -63,6 +42,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
 
@@ -78,8 +60,5 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
-/* Default system man page search path (default: none) */
-#undef SYSMANPATH
-
 /* Version number of package */
 #undef VERSION
similarity index 98%
rename from xedit/config.sub
rename to xvidtune/config.sub
index c2d1257..2a55a50 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
-timestamp='2010-01-22'
+timestamp='2009-11-20'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -75,9 +75,8 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -381,8 +380,7 @@ case $basic_machine in
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tile-* | tilegx-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
        | tron-* \
        | ubicom32-* \
        | v850-* | v850e-* | vax-* \
@@ -1087,11 +1085,6 @@ case $basic_machine in
                basic_machine=tic6x-unknown
                os=-coff
                ;;
-        # This must be matched before tile*.
-        tilegx*)
-               basic_machine=tilegx-unknown
-               os=-linux-gnu
-               ;;
        tile*)
                basic_machine=tile-unknown
                os=-linux-gnu
@@ -1442,8 +1435,6 @@ case $os in
        -dicos*)
                os=-dicos
                ;;
-        -nacl*)
-               ;;
        -none)
                ;;
        *)
diff --git a/xvidtune/configure b/xvidtune/configure
new file mode 100755 (executable)
index 0000000..90049a4
--- /dev/null
@@ -0,0 +1,6700 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.65 for xvidtune 1.0.2.
+#
+# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+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
+
+# 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
+
+
+# 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.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  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
+  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
+
+if test "x$CONFIG_SHELL" = x; then
+  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
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  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
+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
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  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=.
+  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
+            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
+
+
+      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.
+       BASH_ENV=/dev/null
+       ENV=/dev/null
+       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+       export CONFIG_SHELL
+       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+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."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
+fi
+fi
+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
+
+## --------------------- ##
+## 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
+
+# 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"
+
+
+} # 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
+
+
+# as_fn_error 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=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+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_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/=
+  ' <$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" ||
+    { $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
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+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 2>/dev/null
+fi
+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'
+  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
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='xvidtune'
+PACKAGE_TARNAME='xvidtune'
+PACKAGE_VERSION='1.0.2'
+PACKAGE_STRING='xvidtune 1.0.2'
+PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_URL=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+appdefaultdir
+XVIDTUNE_LIBS
+XVIDTUNE_CFLAGS
+ADMIN_MAN_DIR
+DRIVER_MAN_DIR
+MISC_MAN_DIR
+FILE_MAN_DIR
+LIB_MAN_DIR
+APP_MAN_DIR
+ADMIN_MAN_SUFFIX
+DRIVER_MAN_SUFFIX
+MISC_MAN_SUFFIX
+FILE_MAN_SUFFIX
+LIB_MAN_SUFFIX
+APP_MAN_SUFFIX
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+INSTALL_CMD
+PKG_CONFIG
+CHANGELOG_CMD
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+CWARNFLAGS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+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_maintainer_mode
+enable_dependency_tracking
+enable_silent_rules
+enable_strict_compilation
+with_release_version
+with_appdefaultdir
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+XVIDTUNE_CFLAGS
+XVIDTUNE_LIBS'
+
+
+# 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
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)   ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    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"
+    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 ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    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"
+    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- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    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"
+    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_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"
+    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.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) 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.
+    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.
+    $as_echo "$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
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  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
+
+# 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
+  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'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $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
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+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 .` ||
+  as_fn_error "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  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 -- "$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
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  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" || as_fn_error "$ac_msg"
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # 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 xvidtune 1.0.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --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
+      --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
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+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/xvidtune]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of xvidtune 1.0.2:";;
+   esac
+  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]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+  --enable-strict-compilation
+                          Enable all warnings from compiler and make them
+                          errors (default: disabled)
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-release-version=STRING
+                          Use release version string in package name
+  --with-appdefaultdir=<pathname>
+                          specify directory for app-defaults files (default is
+                          autodetected)
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  PKG_CONFIG  path to pkg-config utility
+  XVIDTUNE_CFLAGS
+              C compiler flags for XVIDTUNE, overriding pkg-config
+  XVIDTUNE_LIBS
+              linker flags for XVIDTUNE, overriding pkg-config
+
+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 <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+_ACEOF
+ac_status=$?
+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" ||
+      { 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=/`$as_echo "$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|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+xvidtune configure 1.0.2
+generated by GNU Autoconf 2.65
+
+Copyright (C) 2009 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR
+# ------------------------------------
+# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
+$as_echo_n "checking whether $2 is declared... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $2
+  (void) $2;
+#endif
+
+  ;
+  return 0;
+}
+_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_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\""
+$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; } >/dev/null && {
+        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; test "x$as_lineno_stack" = x && { as_lineno=; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+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 xvidtune $as_me 1.0.2, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      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
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ 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
+# would cause problems or look ugly.
+# 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=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    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;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       $as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $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'; 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"
+_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 an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+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;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  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.  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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$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.
+       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=`$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.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  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
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+am__api_version='1.11'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
+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),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# 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.
+# 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 :
+  $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]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+           # 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
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           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
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $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.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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_STRIP="strip"
+    $as_echo "$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_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $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; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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=.
+    for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+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 test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$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
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xvidtune'
+ VERSION='1.0.2'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+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
+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 test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # 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+' '}$@"
+  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; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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 test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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;}
+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
+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 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=$?
+  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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+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.
+{ $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 | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+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_default") 2>&5
+  ac_status=$?
+  $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,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+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 | *.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;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  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
+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;}
+{ as_fn_set_status 77
+as_fn_error "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
+
+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; }
+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; }; 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
+# `rm'.
+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 | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) 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;}
+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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_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 test "${ac_cv_objext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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>&5
+  ac_status=$?
+  $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 | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$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;}
+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; }
+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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  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
+{ $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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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
+{ $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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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];
+
+/* 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 **, 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;
+}
+_ACEOF
+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 :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  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 :
+
+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
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+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 test "${ac_cv_prog_CPP+set}" = set; 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err 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 <ac_nonexistent.h>
+_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.$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 :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err 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 <ac_nonexistent.h>
+_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.$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 :
+
+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 test "${ac_cv_path_GREP+set}" = set; 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"
+      { 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
+  $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 test "${ac_cv_path_EGREP+set}" = set; 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"
+      { 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
+  $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 test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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
+
+# 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
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __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
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  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 void
+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;
+  float fnumber;
+
+  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);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  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[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+         || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+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
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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
+  test -z "$as_dir" && as_dir=.
+    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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               PKG_CONFIG=""
+       fi
+
+fi
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+
+if  test "x$GCC" = xyes ; then
+    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wbad-function-cast"
+    case `$CC -dumpversion` in
+    3.4.* | 4.*)
+       CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
+       ;;
+    esac
+else
+    ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+    if test "x$SUNCC" = "xyes"; then
+       CWARNFLAGS="-v"
+    fi
+fi
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
+
+
+
+
+
+
+
+# Check whether --enable-strict-compilation was given.
+if test "${enable_strict_compilation+set}" = set; then :
+  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
+else
+  STRICT_COMPILE=no
+fi
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+       ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
+  SUNCC="yes"
+else
+  SUNCC="no"
+fi
+
+       ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then :
+  INTELCC="yes"
+else
+  INTELCC="no"
+fi
+
+       if test "x$GCC" = xyes ; then
+               STRICT_CFLAGS="-pedantic -Werror"
+       elif test "x$SUNCC" = "xyes"; then
+               STRICT_CFLAGS="-errwarn"
+    elif test "x$INTELCC" = "xyes"; then
+               STRICT_CFLAGS="-Werror"
+       fi
+fi
+CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+
+
+
+
+# Check whether --with-release-version was given.
+if test "${with_release_version+set}" = set; then :
+  withval=$with_release_version; RELEASE_VERSION="$withval"
+else
+  RELEASE_VERSION=""
+fi
+
+       if test "x$RELEASE_VERSION" != "x"; then
+               PACKAGE="$PACKAGE-$RELEASE_VERSION"
+               PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: Building with package name set to $PACKAGE" >&5
+$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+       PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
+       if test "x$PVM" = "x"; then
+               PVM="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+       PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
+       if test "x$PVP" = "x"; then
+               PVP="0"
+       fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
+
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
+echo 'git directory not found: installing possibly empty changelog.' >&2)"
+
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
+
+
+
+
+if test x$APP_MAN_SUFFIX = x    ; then
+    APP_MAN_SUFFIX=1
+fi
+if test x$APP_MAN_DIR = x    ; then
+    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
+fi
+
+if test x$LIB_MAN_SUFFIX = x    ; then
+    LIB_MAN_SUFFIX=3
+fi
+if test x$LIB_MAN_DIR = x    ; then
+    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
+fi
+
+if test x$FILE_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       FILE_MAN_SUFFIX=4  ;;
+       *)              FILE_MAN_SUFFIX=5  ;;
+    esac
+fi
+if test x$FILE_MAN_DIR = x    ; then
+    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
+fi
+
+if test x$MISC_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       MISC_MAN_SUFFIX=5  ;;
+       *)              MISC_MAN_SUFFIX=7  ;;
+    esac
+fi
+if test x$MISC_MAN_DIR = x    ; then
+    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
+fi
+
+if test x$DRIVER_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       DRIVER_MAN_SUFFIX=7  ;;
+       *)              DRIVER_MAN_SUFFIX=4  ;;
+    esac
+fi
+if test x$DRIVER_MAN_DIR = x    ; then
+    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
+fi
+
+if test x$ADMIN_MAN_SUFFIX = x    ; then
+    case $host_os in
+       solaris*)       ADMIN_MAN_SUFFIX=1m ;;
+       *)              ADMIN_MAN_SUFFIX=8  ;;
+    esac
+fi
+if test x$ADMIN_MAN_DIR = x    ; then
+    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+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
+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 test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # 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+' '}$@"
+  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; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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 test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  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
+  test -z "$as_dir" && as_dir=.
+    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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+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
+  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"
+    $as_echo "$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  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;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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;}
+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
+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 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=$?
+  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
+
+{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  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
+{ $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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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
+{ $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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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];
+
+/* 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 **, 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;
+}
+_ACEOF
+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 :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  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 :
+
+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
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+
+# Checks for pkg-config packages
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XVIDTUNE" >&5
+$as_echo_n "checking for XVIDTUNE... " >&6; }
+
+if test -n "$XVIDTUNE_CFLAGS"; then
+    pkg_cv_XVIDTUNE_CFLAGS="$XVIDTUNE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xxf86vm xt xaw7 xmu x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xxf86vm xt xaw7 xmu x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XVIDTUNE_CFLAGS=`$PKG_CONFIG --cflags "xxf86vm xt xaw7 xmu x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$XVIDTUNE_LIBS"; then
+    pkg_cv_XVIDTUNE_LIBS="$XVIDTUNE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xxf86vm xt xaw7 xmu x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "xxf86vm xt xaw7 xmu x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_XVIDTUNE_LIBS=`$PKG_CONFIG --libs "xxf86vm xt xaw7 xmu x11" 2>/dev/null`
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               XVIDTUNE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xxf86vm xt xaw7 xmu x11" 2>&1`
+        else
+               XVIDTUNE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xxf86vm xt xaw7 xmu x11" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$XVIDTUNE_PKG_ERRORS" >&5
+
+       as_fn_error "Package requirements (xxf86vm xt xaw7 xmu x11) were not met:
+
+$XVIDTUNE_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables XVIDTUNE_CFLAGS
+and XVIDTUNE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables XVIDTUNE_CFLAGS
+and XVIDTUNE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+       XVIDTUNE_CFLAGS=$pkg_cv_XVIDTUNE_CFLAGS
+       XVIDTUNE_LIBS=$pkg_cv_XVIDTUNE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       :
+fi
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+
+# Check whether --with-appdefaultdir was given.
+if test "${with_appdefaultdir+set}" = set; then :
+  withval=$with_appdefaultdir; appdefaultdir="$withval"
+else
+  appdefaultdir="${xt_appdefaultdir}"
+fi
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    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;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (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 \.
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     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
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  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;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+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"`
+  # 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"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+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;}
+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.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+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 :
+  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
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+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
+
+# 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
+
+
+# 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.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  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
+  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 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=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&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
+
+
+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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+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 2>/dev/null
+fi
+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'
+  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='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+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 xvidtune $as_me 1.0.2, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_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"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$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 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --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
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+xvidtune config.status 1.0.2
+configured by $0, generated by GNU Autoconf 2.65,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2009 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'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+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=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -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 ;;
+  --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
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    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
+    as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $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.
+  -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+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
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_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
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  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"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+
+# 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
+
+
+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 2>/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 {' >"$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
+  . ./conf$$subs.sh ||
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  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
+    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
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = "\a"
+
+}
+{
+  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 < "$tmp/subs1.awk" > "$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
+# 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/
+s/:*$//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+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 >"$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_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; 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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = "\a"
+}
+/^[\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"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+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*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$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 `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      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 '`
+         $as_echo "$*" | 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;}
+    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" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_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"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$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|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_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=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+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;}
+_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' ;;
+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 || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+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
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$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"; } &&
+  { $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"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$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" \
+       || as_fn_error "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$_am_arg" : 'X\(//\)[^/]' \| \
+        X"$_am_arg" : 'X\(//\)$' \| \
+        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+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.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  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 || as_fn_exit $?
+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
+
similarity index 65%
rename from xditview/configure.ac
rename to xvidtune/configure.ac
index 186df29..474f19a 100644 (file)
@@ -22,28 +22,30 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
-AC_INIT(xditview,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xditview)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_INIT(xvidtune, [1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xvidtune)
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.4)
+XORG_DEFAULT_OPTIONS
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AC_PROG_INSTALL
 
-AC_CHECK_FUNC([mkstemp], 
-   AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the `mkstemp' function.]))
-
 # Checks for pkg-config packages
-XAW_CHECK_XPRINT_SUPPORT(XDITVIEW)
-AC_SUBST(XDITVIEW_CFLAGS)
-AC_SUBST(XDITVIEW_LIBS)
-
-PKG_CHECK_MODULES(APPDEFS, xt)
-appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
+PKG_CHECK_MODULES(XVIDTUNE, xxf86vm xt xaw7 xmu x11)
+xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
+AC_ARG_WITH(appdefaultdir,
+       AC_HELP_STRING([--with-appdefaultdir=<pathname>],
+         [specify directory for app-defaults files (default is autodetected)]),
+       [appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
+AC_SUBST(XVIDTUNE_CFLAGS)
+AC_SUBST(XVIDTUNE_LIBS)
 AC_SUBST(appdefaultdir)
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
 
 AC_OUTPUT([Makefile])
diff --git a/xvidtune/depcomp b/xvidtune/depcomp
new file mode 100755 (executable)
index 0000000..df8eea7
--- /dev/null
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
+
+# 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, 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 <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/xvidtune/install-sh b/xvidtune/install-sh
new file mode 100755 (executable)
index 0000000..6781b98
--- /dev/null
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last 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.
+  -s            $stripprog installed files.
+  -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
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+       shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+       shift;;
+
+    -o) chowncmd="$chownprog $2"
+       shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+       shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dst_arg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  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
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       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-writeable 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;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or 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.
+
+      case $dstdir in
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (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
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_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") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/xvidtune/missing b/xvidtune/missing
new file mode 100755 (executable)
index 0000000..28055d2
--- /dev/null
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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, 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 <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar*)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar*)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/xvidtune/xvidtune.c b/xvidtune/xvidtune.c
new file mode 100644 (file)
index 0000000..f50d08d
--- /dev/null
@@ -0,0 +1,1665 @@
+/* $XFree86: xc/programs/xvidtune/xvidtune.c,v 3.35tsi Exp $ */
+
+/*
+
+Copyright (c) 1995  Kaleb S. KEITHLEY
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES 
+OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Kaleb S. KEITHLEY 
+shall not be used in advertising or otherwise to promote the sale, use 
+or other dealings in this Software without prior written authorization
+from Kaleb S. KEITHLEY.
+
+*/
+
+#include <X11/Intrinsic.h>
+#include <X11/Shell.h>
+#include <X11/StringDefs.h>
+#include <X11/Xatom.h>
+#include <X11/Xaw/Form.h>
+#include <X11/Xaw/Scrollbar.h>
+#include <X11/Xaw/Label.h>
+#include <X11/Xaw/Command.h>
+#include <X11/Xaw/AsciiText.h>
+#include <X11/Xaw/Box.h>
+#include <X11/Xaw/Toggle.h>
+#include <X11/Xmu/StdSel.h>
+#include <X11/Xmd.h>
+#include <X11/extensions/xf86vmode.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+
+static int MajorVersion, MinorVersion;
+static int EventBase, ErrorBase;
+static int dot_clock, mode_flags;
+static unsigned long TestTimeout=5000;  /* Default test timeout */
+static XtSignalId sigId;
+
+/* Minimum extension version required */
+#define MINMAJOR 0
+#define MINMINOR 5
+
+/* Mode flags -- ignore flags not in V_FLAG_MASK */
+#define V_FLAG_MASK    0x1FF;
+#define V_PHSYNC       0x001 
+#define V_NHSYNC       0x002
+#define V_PVSYNC       0x004
+#define V_NVSYNC       0x008
+#define V_INTERLACE    0x010 
+#define V_DBLSCAN      0x020
+#define V_CSYNC                0x040
+#define V_PCSYNC       0x080
+#define V_NCSYNC       0x100
+
+typedef enum { HDisplay, HSyncStart, HSyncEnd, HTotal,
+       VDisplay, VSyncStart, VSyncEnd, VTotal, Flags, 
+       InvertVclk, BlankDelay1, BlankDelay2, EarlySc,
+       PixelClock, HSyncRate, VSyncRate, fields_num } fields;
+
+typedef struct {
+    fields     me;
+    fields     use;
+    int                val;
+    int                lastpercent;
+    int                range;
+    Widget     textwidget;
+    Widget     scrollwidget;
+} ScrollData;
+
+static struct _AppResources {
+    ScrollData field[fields_num];
+    Bool       ad_installed;
+    int                orig[fields_num];
+    int                old[fields_num];
+} AppRes = {
+    {
+       { HDisplay, },
+       { HSyncStart, HDisplay, },
+       { HSyncEnd, HDisplay, },
+       { HTotal, HDisplay, },
+       { VDisplay, },
+       { VSyncStart, VDisplay, },
+       { VSyncEnd, VDisplay, },
+       { VTotal, VDisplay, },
+       { Flags, },
+       { InvertVclk, },
+       { BlankDelay1, },
+       { BlankDelay2, },
+       { EarlySc, },
+       { PixelClock, },
+       { HSyncRate, },
+       { VSyncRate, },
+    },
+};
+
+static XtResource Resources[] = {
+    { "adInstalled", "AdInstalled", XtRBool, sizeof(Bool),
+       XtOffsetOf(struct _AppResources, ad_installed),
+       XtRImmediate, (XtPointer)FALSE },
+    { "hSyncStartRange", "SyncStartRange", XtRInt, sizeof(int),
+       XtOffsetOf(struct _AppResources, field[HSyncStart].range), 
+       XtRImmediate, (XtPointer)200 },
+    { "hSyncEndRange", "SyncEndRange", XtRInt, sizeof(int),
+       XtOffsetOf(struct _AppResources, field[HSyncEnd].range), 
+       XtRImmediate, (XtPointer)400 },
+    { "hTotalRange", "TotalRange", XtRInt, sizeof(int),
+       XtOffsetOf(struct _AppResources, field[HTotal].range), 
+       XtRImmediate, (XtPointer)400 },
+    { "vSyncStartRange", "SyncStartRange", XtRInt, sizeof(int),
+       XtOffsetOf(struct _AppResources, field[VSyncStart].range), 
+       XtRImmediate, (XtPointer)20 },
+    { "vSyncEndRange", "SyncEndRange", XtRInt, sizeof(int),
+       XtOffsetOf(struct _AppResources, field[VSyncEnd].range), 
+       XtRImmediate, (XtPointer)40 },
+    { "vTotalRange", "TotalRange", XtRInt, sizeof(int),
+       XtOffsetOf(struct _AppResources, field[VTotal].range), 
+       XtRImmediate, (XtPointer)80 },
+};
+
+static XtTranslations trans;
+
+static Atom wm_delete_window;
+static Widget invalid_mode_popup;
+static Widget testing_popup;
+static Widget Top;
+static Widget auto_apply_toggle;
+
+static Bool S3Specials = False;
+static char modebuf[160];
+
+static void UpdateSyncRates(Bool dolabels);
+
+static void
+CleanUp(Display *dpy)
+{
+    /* Make sure mode switching is not locked out at exit */
+    XF86VidModeLockModeSwitch(dpy, DefaultScreen(dpy), FALSE);
+    XFlush(dpy);
+}
+
+static void
+CatchSig(int signal)
+{
+    XtNoticeSignal(sigId);
+}
+
+static void
+CatchXtSig(XtPointer closure, XtSignalId *id)
+{
+    CleanUp(XtDisplay(Top));
+    exit(3);
+}
+
+static Bool
+GetModeLine (Display* dpy, int scrn)
+{
+    XF86VidModeModeLine mode_line;
+    fields i;
+
+    if (!XF86VidModeGetModeLine (dpy, scrn, &dot_clock, &mode_line))
+       return FALSE;
+
+    AppRes.field[HDisplay].val = mode_line.hdisplay;
+    AppRes.field[HSyncStart].val = mode_line.hsyncstart;
+    AppRes.field[HSyncEnd].val = mode_line.hsyncend;
+    AppRes.field[HTotal].val = mode_line.htotal;
+    AppRes.field[VDisplay].val = mode_line.vdisplay;
+    AppRes.field[VSyncStart].val = mode_line.vsyncstart;
+    AppRes.field[VSyncEnd].val = mode_line.vsyncend;
+    AppRes.field[VTotal].val = mode_line.vtotal;
+    mode_flags = mode_line.flags;
+    AppRes.field[Flags].val = mode_flags & V_FLAG_MASK;
+    AppRes.field[PixelClock].val = dot_clock;
+    UpdateSyncRates(FALSE);
+    if (mode_line.privsize && mode_line.private) {
+       S3Specials = True;
+       AppRes.field[InvertVclk].val = mode_line.private[1];
+       AppRes.field[BlankDelay1].val = mode_line.private[2] & 7;
+       AppRes.field[BlankDelay2].val = (mode_line.private[2] >> 4) & 7;
+       AppRes.field[EarlySc].val = mode_line.private[3];
+    }
+
+    for (i = HDisplay; i < fields_num; i++) 
+       AppRes.orig[i] = AppRes.field[i].val;
+    return TRUE;
+}
+
+static Bool
+GetMonitor (Display* dpy, int scrn)
+{
+    XF86VidModeMonitor monitor;
+    int i;
+
+    if (!XF86VidModeGetMonitor (dpy, scrn, &monitor))
+       return FALSE;
+
+    printf("Vendor: %s, Model: %s\n", monitor.vendor, monitor.model);
+    printf("Num hsync: %d, Num vsync: %d\n", monitor.nhsync, monitor.nvsync);
+    for (i = 0; i < monitor.nhsync; i++) {
+       printf("hsync range %d: %6.2f - %6.2f\n", i, monitor.hsync[i].lo,
+              monitor.hsync[i].hi);
+    }
+    for (i = 0; i < monitor.nvsync; i++) {
+       printf("vsync range %d: %6.2f - %6.2f\n", i, monitor.vsync[i].lo,
+              monitor.vsync[i].hi);
+    }
+    return TRUE;
+}
+
+static Bool
+ModeSettable(void)
+{
+    if (AppRes.field[HTotal].val == 0 || AppRes.field[VTotal].val == 0)
+       return FALSE;
+    return TRUE;
+}
+
+static int hitError = 0;
+static int (*xtErrorfunc)(Display *, XErrorEvent *);
+
+static int
+vidmodeError(Display *dis, XErrorEvent *err)
+{
+  if ((err->error_code >= ErrorBase &&
+      err->error_code < ErrorBase + XF86VidModeNumberErrors) ||
+      err->error_code == BadValue) {
+     hitError=1;
+  } else {
+     CleanUp(dis);
+     if (xtErrorfunc) 
+       (*xtErrorfunc)(dis, err);
+  }
+  return 0; /* ignored */
+}
+
+static void
+SetScrollbars (void)
+{
+    fields i;
+
+    for (i = HDisplay; i <= Flags; i++) {
+
+       ScrollData* sdp = &AppRes.field[i];
+
+       if (sdp->scrollwidget != (Widget) NULL) {
+           int base;
+           float percent;
+
+           base = AppRes.field[sdp->use].val;
+           percent = ((float)(sdp->val - base)) / ((float)sdp->range);
+           XawScrollbarSetThumb (sdp->scrollwidget, percent, 0.0);
+       }
+    }
+}
+
+static void
+QuitCB (Widget w, XtPointer client, XtPointer call)
+{
+    CleanUp(XtDisplay(w));
+#if XtSpecificationRelease < 6
+    exit (0);
+#else
+    XtAppSetExitFlag (XtWidgetToApplicationContext (w));
+#endif
+}
+
+static void
+popdownInvalid(Widget w, XtPointer client, XtPointer call)
+{
+   XtPopdown((Widget)client);
+}
+
+static void
+ApplyCB (Widget w, XtPointer client, XtPointer call)
+{
+    XF86VidModeModeLine mode_line;
+    INT32 S3private[4];
+    unsigned int i;
+    char* string;
+    Boolean state;
+
+    mode_line.hdisplay = AppRes.field[HDisplay].val;
+    mode_line.hsyncstart = AppRes.field[HSyncStart].val;
+    mode_line.hsyncend = AppRes.field[HSyncEnd].val;
+    mode_line.htotal = AppRes.field[HTotal].val;
+    mode_line.vdisplay = AppRes.field[VDisplay].val;
+    mode_line.vsyncstart = AppRes.field[VSyncStart].val;
+    mode_line.vsyncend = AppRes.field[VSyncEnd].val;
+    mode_line.vtotal = AppRes.field[VTotal].val;
+    /* Don't read flags from widget */
+#if 0
+    XtVaGetValues (AppRes.field[Flags].textwidget,
+               XtNstring, &string, NULL);
+    (void) sscanf (string, "%x", &i);
+#endif
+    mode_line.flags = mode_flags;
+    if (S3Specials) {
+       mode_line.privsize = 4;
+       mode_line.private = S3private;
+       mode_line.private[0] = (1 << 1) | (1 << 2) | (1 << 3);
+       XtVaGetValues(AppRes.field[InvertVclk].textwidget,
+                       XtNstate, &state, NULL);
+       AppRes.field[InvertVclk].val = state ? 1 : 0;
+       mode_line.private[1] = AppRes.field[InvertVclk].val;
+       XtVaGetValues (AppRes.field[BlankDelay1].textwidget,
+                       XtNstring, &string, NULL);
+       (void) sscanf (string, "%x", &i);
+       AppRes.field[BlankDelay1].val = i;
+       mode_line.private[2] = AppRes.field[BlankDelay1].val;
+       XtVaGetValues (AppRes.field[BlankDelay2].textwidget,
+                       XtNstring, &string, NULL);
+       (void) sscanf (string, "%x", &i);
+       AppRes.field[BlankDelay2].val = i;
+       mode_line.private[2] |= AppRes.field[BlankDelay2].val << 4;
+       XtVaGetValues(AppRes.field[EarlySc].textwidget,
+                       XtNstate, &state, NULL);
+       AppRes.field[EarlySc].val = state ? 1 : 0;
+       mode_line.private[3] = AppRes.field[EarlySc].val;
+    } else
+       mode_line.privsize = 0;
+    
+   hitError = 0;
+
+   XF86VidModeModModeLine (XtDisplay (w), DefaultScreen (XtDisplay (w)), 
+               &mode_line);
+   XSync(XtDisplay (w), False); /* process errors  */
+   if (hitError) {
+       XBell(XtDisplay (w), 80);
+       XtPopup(invalid_mode_popup, XtGrabExclusive /*XtGrabNone*/);
+   }
+}
+
+
+static void
+SetLabel(fields i)
+{
+   ScrollData* sdp = &AppRes.field[i];
+
+   if (sdp->textwidget != (Widget) NULL) {
+      char buf[10];
+      Boolean state;
+
+      /*
+       * Disable AutoApply so that the apply doesn't happen more than
+       * once as a consequence of callbacks being called because of the
+       * XtSetValues calls
+       */
+
+      XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+      if (state)
+        XtVaSetValues(auto_apply_toggle, XtNstate, 0, NULL);
+
+      if (i == Flags)
+        (void) snprintf (buf, sizeof(buf), "%04x", sdp->val);
+      else if (i >= PixelClock && i <= VSyncRate)
+        (void) snprintf (buf, sizeof(buf), "%6.2f", (float)sdp->val / 1000.0);
+      else if (i == BlankDelay1 || i == BlankDelay2) {
+        (void) snprintf (buf, sizeof(buf), "%d", sdp->val);
+      } else
+        (void) snprintf (buf, sizeof(buf), "%5d", sdp->val);
+        
+      sdp->lastpercent = -1;
+      if (i == Flags) {
+        XawTextBlock text;
+
+        text.firstPos = 0;
+        text.length = 4;
+        text.ptr = buf;
+        text.format = XawFmt8Bit;
+        XawTextReplace (sdp->textwidget, 0, 4, &text);
+      } else if (i == BlankDelay1 || i == BlankDelay2) {
+        XawTextBlock text;
+
+        text.firstPos = 0;
+        text.length = 1;
+        text.ptr = buf;
+        XawTextReplace (sdp->textwidget, 0, 1, &text);
+      } else if (i == InvertVclk || i == EarlySc) {
+       XtVaSetValues (sdp->textwidget, XtNstate, sdp->val, NULL);
+      } else
+       XtVaSetValues (sdp->textwidget, XtNlabel, buf, NULL);
+
+      if (state)
+        XtVaSetValues(auto_apply_toggle, XtNstate, 1, NULL);
+   }
+
+}
+
+static void
+UpdateSyncRates(Bool dolabels)
+{
+    if (!ModeSettable())
+       return;
+    
+    AppRes.field[HSyncRate].val = AppRes.field[PixelClock].val * 1000 /
+                                 AppRes.field[HTotal].val;
+    AppRes.field[VSyncRate].val = AppRes.field[HSyncRate].val * 1000 /
+                                 AppRes.field[VTotal].val;
+    if (mode_flags & V_INTERLACE)
+       AppRes.field[VSyncRate].val *= 2;
+    else if (mode_flags & V_DBLSCAN)
+       AppRes.field[VSyncRate].val /= 2;
+    if (dolabels) {
+       SetLabel(HSyncRate);
+       SetLabel(VSyncRate);
+    }
+}
+
+static void
+RestoreCB (Widget w, XtPointer client, XtPointer call)
+{
+    fields i;
+    Boolean state;
+
+    for (i = HDisplay; i < fields_num; i++) {
+       AppRes.field[i].val = AppRes.orig[i];
+       SetLabel(i);
+    }
+    SetScrollbars ();
+    XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+    if (state)
+        ApplyCB (w, client, call);
+}
+
+
+static void
+ApplyIfAutoCB (Widget w, XtPointer client, XtPointer call)
+{
+   Boolean state;
+
+   XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+   if (state)
+       ApplyCB (w, client, call);
+}
+
+
+static void
+FetchCB (Widget w, XtPointer client, XtPointer call)
+{
+    fields i;
+    (void) GetModeLine(XtDisplay (w), DefaultScreen (XtDisplay (w)));
+    SetScrollbars ();
+    for (i = HDisplay; i < fields_num; i++) {
+        SetLabel(i);
+    }   
+}
+
+static XtIntervalId TOid;
+
+static void
+TestTO (XtPointer client, XtIntervalId* id)
+{
+    fields i;
+    for (i = HDisplay; i < fields_num; i++)
+       AppRes.field[i].val = AppRes.orig[i];
+
+    ApplyCB ((Widget) client, NULL, NULL);
+
+    for (i = HDisplay; i < fields_num; i++)
+       AppRes.field[i].val = AppRes.old[i];
+    SetScrollbars ();
+
+    XtPopdown(testing_popup);
+}
+
+static void
+TestTOCB (Widget w, XtPointer client, XtPointer call)
+{
+  XtRemoveTimeOut(TOid);
+  TestTO(w, (XtIntervalId *) NULL);
+}
+
+static void
+TestCB (Widget w, XtPointer client, XtPointer call)
+{
+    fields i;
+    for (i = HDisplay; i < fields_num; i++)
+       AppRes.old[i] = AppRes.field[i].val;
+
+    XtPopup(testing_popup, XtGrabExclusive /*XtGrabNone*/);
+    XSync(XtDisplay(w), False);   
+    TOid = XtAppAddTimeOut (XtWidgetToApplicationContext (w),
+               TestTimeout, TestTO, (XtPointer) w);
+
+    ApplyCB (w, client, call);
+}
+
+static Boolean
+ConvertSelection(
+    Widget w,
+    Atom *selection, Atom *target, Atom *type,
+    XtPointer *value,
+    unsigned long *length,
+    int *format)
+{
+    if (XmuConvertStandardSelection(w, CurrentTime, selection, target, type,
+                                    (XPointer *) value, length, format))
+        return True;
+
+    if (*target == XA_STRING) {
+        *type = XA_STRING;
+        *value = modebuf;
+        *length = strlen(*value);
+        *format = 8;
+        return True;
+    }
+    return False;
+}
+
+static void
+ShowCB(Widget w, XtPointer client, XtPointer call)
+{
+    Time time;
+    char tmpbuf[16];
+
+    snprintf(tmpbuf, sizeof(tmpbuf), "\"%dx%d\"",
+          AppRes.field[HDisplay].val, AppRes.field[VDisplay].val);
+    snprintf(modebuf, sizeof(modebuf),
+          "%-11s   %6.2f   %4d %4d %4d %4d   %4d %4d %4d %4d",
+          tmpbuf, (float)dot_clock/1000.0,
+          AppRes.field[HDisplay].val,
+          AppRes.field[HSyncStart].val,
+          AppRes.field[HSyncEnd].val,
+          AppRes.field[HTotal].val,
+          AppRes.field[VDisplay].val,
+          AppRes.field[VSyncStart].val,
+          AppRes.field[VSyncEnd].val,
+          AppRes.field[VTotal].val);
+    /* Print out the flags (if any) */
+    if (mode_flags & V_PHSYNC)    strcat(modebuf, " +hsync");
+    if (mode_flags & V_NHSYNC)    strcat(modebuf, " -hsync");
+    if (mode_flags & V_PVSYNC)    strcat(modebuf, " +vsync");
+    if (mode_flags & V_NVSYNC)    strcat(modebuf, " -vsync");
+    if (mode_flags & V_INTERLACE) strcat(modebuf, " interlace");
+    if (mode_flags & V_CSYNC)     strcat(modebuf, " composite");
+    if (mode_flags & V_PCSYNC)    strcat(modebuf, " +csync");
+    if (mode_flags & V_NCSYNC)    strcat(modebuf, " -csync");
+    if (mode_flags & V_DBLSCAN)   strcat(modebuf, " doublescan");
+    printf("%s\n", modebuf);
+    time = XtLastTimestampProcessed(XtDisplay(w));
+    XtOwnSelection(w, XA_PRIMARY, time, ConvertSelection, NULL, NULL);
+    if (S3Specials) {
+       unsigned int i;
+       Boolean state;
+       char *string;
+
+       XtVaGetValues(AppRes.field[InvertVclk].textwidget,
+                       XtNstate, &state, NULL);
+       AppRes.field[InvertVclk].val = state ? 1 : 0;
+       XtVaGetValues (AppRes.field[BlankDelay1].textwidget,
+                       XtNstring, &string, NULL);
+       (void) sscanf (string, "%x", &i);
+       AppRes.field[BlankDelay1].val = i;
+       XtVaGetValues (AppRes.field[BlankDelay2].textwidget,
+                       XtNstring, &string, NULL);
+       (void) sscanf (string, "%x", &i);
+       AppRes.field[BlankDelay2].val = i;
+       XtVaGetValues(AppRes.field[EarlySc].textwidget,
+                       XtNstate, &state, NULL);
+       AppRes.field[EarlySc].val = state ? 1 : 0;
+       if (AppRes.field[InvertVclk].val != AppRes.orig[InvertVclk])
+           printf("InvertVCLK\t\"%dx%d\" %d\n", AppRes.field[HDisplay].val,
+               AppRes.field[VDisplay].val, AppRes.field[InvertVclk].val);
+       if (AppRes.field[EarlySc].val != AppRes.orig[EarlySc])
+           printf("EarlySC\t\t\"%dx%d\" %d\n", AppRes.field[HDisplay].val,
+               AppRes.field[VDisplay].val, AppRes.field[EarlySc].val);
+       if (AppRes.field[BlankDelay1].val != AppRes.orig[BlankDelay1]
+           || AppRes.field[BlankDelay2].val != AppRes.orig[BlankDelay2])
+           printf("BlankDelay\t\"%dx%d\" %d %d\n", AppRes.field[HDisplay].val,
+               AppRes.field[VDisplay].val, AppRes.field[BlankDelay1].val,
+               AppRes.field[BlankDelay2].val);
+    }
+    printf("\n");
+}
+
+static void
+AdjustCB(Widget w, XtPointer client, XtPointer call)
+{
+   int what = (long) client;
+   Boolean state;
+   
+   switch (what) {
+    case HSyncStart:
+      if (AppRes.field[HSyncEnd].val + 4 < AppRes.field[HTotal].val) {
+        AppRes.field[HSyncEnd].val += 4;
+        AppRes.field[HSyncStart].val += 4;
+        SetLabel(HSyncStart);   
+        SetLabel(HSyncEnd);             
+      } else
+       XBell(XtDisplay(w), 80);
+      break;
+    case -HSyncStart:
+      if (AppRes.field[HSyncStart].val - 4 > AppRes.field[HDisplay].val) {
+        AppRes.field[HSyncEnd].val -= 4;
+        AppRes.field[HSyncStart].val -= 4;
+        SetLabel(HSyncStart);   
+        SetLabel(HSyncEnd);                     
+      } else
+       XBell(XtDisplay(w), 80);
+      break;
+    case HTotal:
+      AppRes.field[HTotal].val += 4;
+      SetLabel(HTotal);               
+      UpdateSyncRates(TRUE);
+      break;      
+    case -HTotal:
+      if (AppRes.field[HTotal].val - 4 >  AppRes.field[HSyncEnd].val) {         
+       AppRes.field[HTotal].val -= 4;
+       SetLabel(HTotal);        
+       UpdateSyncRates(TRUE);
+      } else
+       XBell(XtDisplay(w), 80);
+      break;
+    case VSyncStart:
+      if (AppRes.field[VSyncEnd].val + 4 < AppRes.field[VTotal].val) {
+        AppRes.field[VSyncEnd].val += 4;
+        AppRes.field[VSyncStart].val += 4;
+        SetLabel(VSyncStart);   
+        SetLabel(VSyncEnd);     
+      } else
+       XBell(XtDisplay(w), 80);
+      break;
+    case -VSyncStart:
+      if (AppRes.field[VSyncStart].val - 4 > AppRes.field[VDisplay].val) {
+        AppRes.field[VSyncEnd].val -= 4;
+        AppRes.field[VSyncStart].val -= 4;
+        SetLabel(VSyncStart);   
+        SetLabel(VSyncEnd);             
+      } else
+       XBell(XtDisplay(w), 80);
+      break;
+    case VTotal:
+      AppRes.field[VTotal].val += 4;
+      SetLabel(VTotal);      
+      UpdateSyncRates(TRUE);
+      break;      
+    case -VTotal:
+      if (AppRes.field[VTotal].val - 4 >  AppRes.field[VSyncEnd].val) {         
+       AppRes.field[VTotal].val -= 4;
+       SetLabel(VTotal);
+       UpdateSyncRates(TRUE);
+      } else
+       XBell(XtDisplay(w), 80);
+      break;
+   }  
+   SetScrollbars ();
+   XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+   if (state)
+       ApplyCB (w, client, call);
+}
+
+
+#if 0
+static void
+EditCB (Widget w, XtPointer client, XtPointer call)
+{
+    int base, current, i, len;
+    int lower, upper;
+    float percent;
+    ScrollData* sdp = (ScrollData*) client;
+
+    len = strlen (sdp->string);
+
+    for (i = 0; i < len; i++) {
+       if (!(isdigit (sdp->string[i]) || isspace (sdp->string[i]))) {
+           XBell (XtDisplay(XtParent(w)), 100);
+           return;
+       }
+    }
+    switch (sdp->me) {
+    case HSyncStart: 
+       lower = atoi (AppRes.field[HDisplay].string);
+       upper = atoi (AppRes.field[HSyncEnd].string);
+       break;
+
+    case HSyncEnd:
+       lower = atoi (AppRes.field[HSyncStart].string);
+       upper = atoi (AppRes.field[HTotal].string);
+       break;
+
+    case HTotal:
+       lower = atoi (AppRes.field[HSyncEnd].string);
+       upper = atoi (AppRes.field[HDisplay].string) + 
+               AppRes.field[HTotal].range;
+       break;
+
+    case VSyncStart: 
+       lower = atoi (AppRes.field[VDisplay].string);
+       upper = atoi (AppRes.field[VSyncEnd].string);
+       break;
+
+    case VSyncEnd:
+       lower = atoi (AppRes.field[VSyncStart].string);
+       upper = atoi (AppRes.field[VTotal].string);
+       break;
+
+    case VTotal:
+       lower = atoi (AppRes.field[VSyncEnd].string);
+       upper = atoi (AppRes.field[VDisplay].string) + 
+               AppRes.field[VTotal].range;
+       break;
+    }
+    current = atoi (sdp->string);
+    if (current < lower || current > upper) {
+       XawTextBlock text;
+       char tmp[6];
+
+       if (current < lower) {
+           (void) snprintf (tmp, sizeof(tmp), "%5d", lower);
+           current = lower;
+       } else {
+           (void) snprintf (tmp, sizeof(tmp), "%5d", upper);
+           current = upper;
+       }
+       text.firstPos = 0;
+       text.length = strlen (tmp);
+       text.ptr = tmp;
+       text.format = XawFmt8Bit;
+       XawTextReplace (sdp->textwidget, 0, text.length, &text);
+    }
+    base = atoi (AppRes.field[sdp->use].string);
+    percent = ((float)(current - base)) / ((float)sdp->range);
+    XawScrollbarSetThumb (sdp->scrollwidget, percent, 0.0);
+}
+#endif
+
+static void
+FlagsEditCB (Widget w, XtPointer client, XtPointer call)
+{
+    int i, len;
+    char* string;
+    fields findex = (fields) (unsigned long) client;
+    ScrollData* sdp = &AppRes.field[findex];
+
+    XtVaGetValues (w, XtNstring, &string, NULL);
+    len = strlen (string);
+    if (len > 4) {
+       char buf[5];
+
+       XBell (XtDisplay(XtParent(w)), 100);
+       (void) strncpy (buf, string, 4);
+       buf[4] = '\0';
+       XtVaSetValues (sdp->textwidget, XtNstring, buf, NULL);
+       XawTextSetInsertionPoint (sdp->textwidget, 4);
+    }
+
+    for (i = 0; i < len; i++) {
+       if (!isxdigit (string[i])) {
+           XBell (XtDisplay(XtParent(w)), 100);
+       }
+    }
+}
+
+static void
+BlankEditCB (Widget w, XtPointer client, XtPointer call)
+{
+    int len;
+    char* string;
+    fields findex = (fields) (unsigned long) client;
+    ScrollData* sdp = &AppRes.field[findex];
+    char buf[2], old;
+    Boolean state;
+    Boolean noAuto = False;
+
+    XtVaGetValues (w, XtNstring, &string, NULL);
+    len = strlen (string);
+    if (len == 0) {
+       XBell (XtDisplay(XtParent(w)), 100);
+       strcpy(buf, "0");
+       XtVaSetValues (sdp->textwidget, XtNstring, buf, NULL);
+       XawTextSetInsertionPoint (sdp->textwidget, 1);
+        return;
+    }
+    if (len > 1) {
+       if (XawTextGetInsertionPoint(sdp->textwidget) < 1) {
+           buf[0] = string[0];
+           old = string[1];
+       } else {
+           buf[0] = string[1];
+           old = string[0];
+       }
+       if (buf[0] == '+' && old < '7')
+           buf[0] = old + 1;
+       else if (buf[0] == '-' && old > '0')
+           buf[0] = old - 1;
+       if (!isdigit(buf[0]) || buf[0] > '7') {
+           XBell (XtDisplay(XtParent(w)), 100);
+           buf[0] = old;
+           if (!isdigit(buf[0]) || buf[0] > '7')
+               buf[0] = '0';
+           noAuto = True;
+       }
+       buf[1] = '\0';
+       XtVaSetValues (sdp->textwidget, XtNstring, buf, NULL);
+       XawTextSetInsertionPoint (sdp->textwidget, 1);
+    }
+    XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+    if (state && !noAuto)
+       ApplyCB (sdp->textwidget, client, call);
+}
+
+static void
+ChangeBlankCB (Widget w, XtPointer client, XtPointer call)
+{
+    char* string;
+    char buf[2];
+    fields findex;
+    ScrollData* sdp;
+    Boolean state;
+    int what = (long) client;
+
+
+    if (what < 0)
+       findex = (fields)-what;
+    else
+       findex = (fields)what;
+    sdp = &AppRes.field[findex];
+
+    XtVaGetValues (sdp->textwidget, XtNstring, &string, NULL);
+    if (what > 0)
+       string[0]++;
+    else
+       string[0]--;
+
+    if (string[0] < '0' || string[0] > '7') {
+       XBell (XtDisplay(XtParent(w)), 100);
+       return;
+    }
+
+    buf[0] = string[0];
+    buf[1] = '\0';
+    XtVaSetValues (sdp->textwidget, XtNstring, buf, NULL);
+    XawTextSetInsertionPoint (sdp->textwidget, 1);
+
+    XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+    if (state)
+       ApplyCB (sdp->textwidget, client, call);
+}
+
+static int
+isValid(int val, int field)
+{
+   switch(field) {
+     case HSyncStart:
+       if (val+8 > AppRes.field[HSyncEnd].val)
+          val = AppRes.field[HSyncEnd].val - 8;
+        break;
+     case HSyncEnd:
+        if (val-8 < AppRes.field[HSyncStart].val)
+           val = AppRes.field[HSyncStart].val + 8;
+        if (val > AppRes.field[HTotal].val)
+           val = AppRes.field[HTotal].val;
+        break;
+     case HTotal:
+       if (val < AppRes.field[HSyncEnd].val)
+          val = AppRes.field[HSyncEnd].val;
+         break;
+     case VSyncStart:
+       if (val+8 > AppRes.field[VSyncEnd].val)
+          val = AppRes.field[VSyncEnd].val - 8;
+        break;
+     case VSyncEnd:
+        if (val-8 < AppRes.field[VSyncStart].val)
+           val = AppRes.field[VSyncStart].val + 8;
+        if (val > AppRes.field[VTotal].val)
+           val = AppRes.field[VTotal].val;
+        break;
+     case VTotal:
+       if (val < AppRes.field[VSyncEnd].val)
+          val = AppRes.field[VSyncEnd].val;
+        break;
+   }
+   return val;
+}
+
+static void
+ScrollCB (Widget w, XtPointer client, XtPointer call)
+{
+    float percent = *(float*) call;
+    int ipercent = percent * 100;
+    int fieldindex = (long) client;
+    ScrollData* sdp = &AppRes.field[fieldindex];
+
+
+    
+    if (ipercent != sdp->lastpercent) {
+        int tmp_val;
+       char buf[6];
+
+       tmp_val = AppRes.field[sdp->use].val;
+       tmp_val += (int) (((float)sdp->range) * percent);
+
+        sdp->val = isValid(tmp_val, fieldindex);
+        
+       sdp->lastpercent = ipercent;
+       (void) snprintf (buf, sizeof(buf), "%5d", sdp->val);
+       XtVaSetValues (sdp->textwidget, XtNlabel, buf, NULL);
+        if (sdp->val != tmp_val) {
+            int base;
+            float percent;
+
+            base = AppRes.field[sdp->use].val;
+            percent = ((float)(sdp->val - base)) / ((float)sdp->range);
+            /* This doesn't always work, why? */
+            XawScrollbarSetThumb (sdp->scrollwidget, percent, 0.0);
+       }
+       if (fieldindex == HTotal || fieldindex == VTotal)
+           UpdateSyncRates(TRUE);
+    }
+}
+
+static void
+SwitchCB (Widget w, XtPointer client, XtPointer call)
+{
+    XF86VidModeLockModeSwitch(XtDisplay(w), DefaultScreen (XtDisplay (w)),
+                             FALSE);
+    XF86VidModeSwitchMode(XtDisplay(w), DefaultScreen (XtDisplay (w)),
+                         (int)(long) client);
+    XF86VidModeLockModeSwitch(XtDisplay(w), DefaultScreen (XtDisplay (w)),
+                             TRUE);
+    FetchCB(w, NULL, NULL);
+}
+
+static void
+AddCallback (
+    Widget w,
+    String  callback_name,
+    XtCallbackProc callback,
+    XtPointer client_data)
+{
+    Widget src;
+
+    XtVaGetValues (w, XtNtextSource, &src, NULL);
+    XtAddCallback (src, callback_name, callback, client_data);
+}
+
+static void
+CreateTyp (
+    Widget form,
+    fields findex,
+    String w1name,
+    String w2name,
+    String w3name)
+{
+    Widget wids[3];
+    char buf[10];
+
+    wids[0] = XtCreateWidget (w1name, labelWidgetClass, form, NULL, 0);
+    if (findex >= PixelClock && findex <= VSyncRate)
+       (void) snprintf(buf, sizeof(buf), "%6.2f",
+                       (float)AppRes.field[findex].val / 1000.0);
+    else
+       (void) snprintf (buf, sizeof(buf), "%5d", AppRes.field[findex].val);
+    wids[1] = XtVaCreateWidget (w2name, labelWidgetClass,
+               form, XtNlabel, buf, NULL);
+    if (w3name != NULL) {
+       wids[2] = XtCreateWidget (w3name, scrollbarWidgetClass, form, NULL, 0);
+       XtAddCallback (wids[2], XtNjumpProc, ScrollCB, (XtPointer) findex);
+       XtManageChildren (wids, 3);
+    } else {
+       wids[2] = (Widget) NULL;
+       XtManageChildren (wids, 2);
+    }
+    AppRes.field[findex].textwidget = wids[1];
+    AppRes.field[findex].scrollwidget = wids[2];
+}
+
+
+static void
+AckWarn (Widget w, XtPointer client, XtPointer call)
+{
+    XtPopdown((Widget) client);
+    XtDestroyWidget((Widget) client);
+}
+
+static void
+AckNoTune (Widget w, XtPointer client, XtPointer call)
+{
+    CleanUp(XtDisplay(w));
+#if XtSpecificationRelease < 6
+    exit (0);
+#else
+    XtAppSetExitFlag (XtWidgetToApplicationContext (w));
+#endif
+}
+
+static void
+displayWarning(Widget top)
+{
+    Widget w, popup, popupBox;
+    int x, y;
+
+    x =  DisplayWidth(XtDisplay (top),DefaultScreen (XtDisplay (top))) / 3;
+    y =  DisplayHeight(XtDisplay (top),DefaultScreen (XtDisplay (top))) / 3;
+
+    popup = XtVaCreatePopupShell("Warning", 
+                           transientShellWidgetClass, top,
+                           XtNtitle, "WARNING",
+                           XtNx, x,
+                           XtNy, y,
+                           NULL);
+
+    popupBox = XtVaCreateManagedWidget(
+               "WarningBox",
+               boxWidgetClass,
+               popup,
+               NULL);
+
+    w = XtVaCreateManagedWidget( "WarnLabel",
+                                     labelWidgetClass,
+                                    popupBox,
+                                     NULL);
+
+    w = XtVaCreateManagedWidget( "WarnOK",
+                                     commandWidgetClass,
+                                    popupBox,
+                                     NULL);
+
+    XtAddCallback (w, XtNcallback, AckWarn, (XtPointer)popup);
+
+    w = XtVaCreateManagedWidget( "WarnCancel",
+                                     commandWidgetClass,
+                                    popupBox,
+                                     NULL);
+    XtAddCallback (w, XtNcallback, QuitCB, (XtPointer)NULL);
+
+    XtPopup(popup, XtGrabExclusive);
+    
+}
+
+static void
+displayNoTune(Widget top)
+{
+    Widget w, popup, popupBox;
+
+    popup = XtCreateWidget ("Notice", formWidgetClass, top, NULL, 0);
+    popupBox = XtVaCreateManagedWidget(
+               "WarningBox",
+               boxWidgetClass,
+               popup,
+               NULL);
+
+    w = XtVaCreateManagedWidget( "NoTuneLabel",
+                                     labelWidgetClass,
+                                    popupBox,
+                                     NULL);
+
+    w = XtVaCreateManagedWidget( "NoTuneOK",
+                                     commandWidgetClass,
+                                    popupBox,
+                                     NULL);
+
+    XtAddCallback (w, XtNcallback, AckNoTune, (XtPointer)popup);
+
+    XtManageChild (popup);
+}
+
+#if 0
+static void
+s3Special(Widget top)
+{
+    Widget w, popup, form, invert_vclk_toggle, wids[6];
+    char buf1[5] = {'\0',};
+    int x, y;
+
+    x =  DisplayWidth(XtDisplay (top),DefaultScreen (XtDisplay (top))) / 3;
+    y =  DisplayHeight(XtDisplay (top),DefaultScreen (XtDisplay (top))) / 3;
+
+    popup = XtVaCreatePopupShell("S3Adjust", 
+                           transientShellWidgetClass, top,
+                           XtNtitle, "S3Adjust",
+                           XtNx, x,
+                           XtNy, y,
+                           NULL);
+
+    form = XtVaCreateManagedWidget(
+               "S3Box",
+               formWidgetClass,
+               popup,
+               NULL);
+
+    w = XtVaCreateManagedWidget( "S3Title",
+                                     labelWidgetClass,
+                                    form,
+                                     NULL);
+
+    invert_vclk_toggle = XtVaCreateManagedWidget( "InvertVclk-toggle",
+                                     toggleWidgetClass,
+                                    form,
+                                     NULL);
+
+    wids[0] = XtCreateWidget ("Blank1-label", labelWidgetClass,
+               form, NULL, 0);
+    wids[1] = XtVaCreateWidget ("Blank1-text", asciiTextWidgetClass,
+               form, XtNstring, buf1, NULL);
+    AddCallback (wids[1], XtNcallback, FlagsEditCB, (XtPointer) NULL);
+
+    XtManageChildren (wids, 2);
+
+    XtPopup(popup, XtGrabNone);
+    
+}
+#endif
+
+
+
+static void
+CreateHierarchy(Widget top)
+{
+    char buf[5];
+    Widget form, forms[14], s3form;
+    Widget wids[10];
+    Widget boxW, popdownW, w;   
+    int i;
+    int x, y;
+    static String form_names[] = {
+       "HDisplay-form",
+       "HSyncStart-form",
+       "HSyncEnd-form",
+       "HTotal-form",
+       "VDisplay-form",
+       "VSyncStart-form",
+       "VSyncEnd-form",
+       "VTotal-form",
+       "Flags-form",
+       "Buttons-form",
+       "PixelClock-form",
+       "HSyncRate-form",
+       "VSyncRate-form",
+       "Buttons2-form",
+       };
+
+    form = XtCreateWidget ("form", formWidgetClass, top, NULL, 0);
+    for (i = 0; i < 14; i++)
+       forms[i] = XtCreateWidget (form_names[i], formWidgetClass, 
+               form, NULL, 0);
+
+    CreateTyp (forms[0], HDisplay, "HDisplay-label", "HDisplay-text", NULL);
+    CreateTyp (forms[1], HSyncStart, "HSyncStart-label",
+               "HSyncStart-text", "HSyncStart-scrollbar");
+    CreateTyp (forms[2], HSyncEnd, "HSyncEnd-label", "HSyncEnd-text", 
+               "HSyncEnd-scrollbar");
+    CreateTyp (forms[3], HTotal, "HTotal-label", "HTotal-text", 
+               "HTotal-scrollbar");
+
+    w = XtVaCreateManagedWidget(
+                                     "Left-button",
+                                     commandWidgetClass,
+                                     forms[3],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)HSyncStart);
+    w = XtVaCreateManagedWidget(
+                                     "Right-button",
+                                     commandWidgetClass,
+                                     forms[3],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)-HSyncStart);
+    w=  XtVaCreateManagedWidget(
+                                     "Wider-button",
+                                     commandWidgetClass,
+                                     forms[3],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)-HTotal);
+    w = XtVaCreateManagedWidget(
+                                     "Narrower-button",
+                                     commandWidgetClass,
+                                     forms[3],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)HTotal);
+    CreateTyp (forms[4], VDisplay, "VDisplay-label", "VDisplay-text", NULL);
+    CreateTyp (forms[5], VSyncStart, "VSyncStart-label",
+               "VSyncStart-text", "VSyncStart-scrollbar");
+    CreateTyp (forms[6], VSyncEnd, "VSyncEnd-label", "VSyncEnd-text", 
+               "VSyncEnd-scrollbar");
+    CreateTyp (forms[7], VTotal, "VTotal-label", "VTotal-text", 
+               "VTotal-scrollbar");
+    w = XtVaCreateManagedWidget(
+                                     "Up-button",
+                                     commandWidgetClass,
+                                     forms[7],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)VSyncStart);
+    w = XtVaCreateManagedWidget(
+                                     "Down-button",
+                                     commandWidgetClass,
+                                     forms[7],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)-VSyncStart);   
+    w=  XtVaCreateManagedWidget(
+                                     "Shorter-button",
+                                     commandWidgetClass,
+                                     forms[7],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)VTotal);   
+    w = XtVaCreateManagedWidget(
+                                     "Taller-button",
+                                     commandWidgetClass,
+                                     forms[7],
+                                     NULL);
+    XtAddCallback (w, XtNcallback, AdjustCB, (XtPointer)-VTotal);
+
+    (void) snprintf (buf, sizeof(buf), "%04x", AppRes.field[Flags].val);
+    wids[0] = XtCreateWidget ("Flags-label", labelWidgetClass,
+               forms[8], NULL, 0);
+    wids[1] = XtVaCreateWidget ("Flags-text", asciiTextWidgetClass,
+               forms[8], XtNstring, buf, XtNtranslations, trans, NULL);
+    AddCallback (wids[1], XtNcallback, FlagsEditCB, (XtPointer) Flags);
+    XtManageChildren (wids, 2);
+    AppRes.field[Flags].textwidget = wids[1];
+
+    wids[0] = XtCreateWidget ("Quit-button", commandWidgetClass, 
+               forms[9], NULL, 0);
+    XtAddCallback (wids[0], XtNcallback, QuitCB, NULL);
+
+    wids[1] = XtCreateWidget ("Apply-button", commandWidgetClass, 
+               forms[9], NULL, 0);
+    XtAddCallback (wids[1], XtNcallback, ApplyCB, NULL);
+
+    wids[2] = XtCreateWidget ("AutoApply-toggle", toggleWidgetClass, 
+               forms[9], NULL, 0);
+    auto_apply_toggle = wids[2];
+
+    wids[3] = XtCreateWidget ("Test-button", commandWidgetClass, 
+               forms[9], NULL, 0);
+    XtAddCallback (wids[3], XtNcallback, TestCB, NULL);
+
+    wids[4] = XtCreateWidget ("Restore-button", commandWidgetClass, 
+               forms[9], NULL, 0);
+    XtAddCallback (wids[4], XtNcallback, RestoreCB, NULL);
+
+    XtManageChildren (wids, 5);
+
+
+    CreateTyp (forms[10], PixelClock, "PixelClock-label", "PixelClock-text",
+              NULL);
+    CreateTyp (forms[11], HSyncRate, "HSyncRate-label", "HSyncRate-text",
+              NULL);
+    CreateTyp (forms[12], VSyncRate, "VSyncRate-label", "VSyncRate-text",
+              NULL);
+
+    wids[0] = XtCreateWidget ("Fetch-button", commandWidgetClass, 
+               forms[13], NULL, 0);
+    XtAddCallback (wids[0], XtNcallback, FetchCB, NULL);
+
+    wids[1] = XtCreateWidget ("Show-button", commandWidgetClass, 
+               forms[13], NULL, 0);
+    XtAddCallback (wids[1], XtNcallback, ShowCB, NULL);
+
+    wids[2] = XtCreateWidget ("Next-button", commandWidgetClass, 
+               forms[13], NULL, 0);
+    XtAddCallback (wids[2], XtNcallback, SwitchCB, (XtPointer)1);
+
+    wids[3] = XtCreateWidget ("Prev-button", commandWidgetClass, 
+               forms[13], NULL, 0);
+    XtAddCallback (wids[3], XtNcallback, SwitchCB, (XtPointer)-1);
+
+    XtManageChildren (wids, 4);
+
+    XtManageChildren (forms, 14);
+
+    if (S3Specials) {
+       char buf[2] = "0";
+       s3form = XtCreateWidget ("S3-form", formWidgetClass, 
+               form, NULL, 0);
+       wids[0] = XtVaCreateWidget("InvertVclk-toggle", toggleWidgetClass,
+                       s3form, XtNstate, AppRes.field[InvertVclk].val, NULL);
+       XtAddCallback (wids[0], XtNcallback, ApplyIfAutoCB, NULL);
+       AppRes.field[InvertVclk].textwidget = wids[0];
+       wids[1] = XtVaCreateWidget("EarlySc-toggle", toggleWidgetClass,
+                       s3form, XtNstate, AppRes.field[EarlySc].val, NULL);
+       XtAddCallback (wids[1], XtNcallback, ApplyIfAutoCB, NULL);
+       AppRes.field[EarlySc].textwidget = wids[1];
+       wids[2] = XtCreateWidget("Blank1-label", labelWidgetClass, s3form,
+                       NULL, 0);
+       wids[3] = XtVaCreateWidget("Blank1Dec-button", commandWidgetClass,
+                                  s3form, NULL);
+       XtAddCallback (wids[3], XtNcallback, ChangeBlankCB,
+                       (XtPointer)-BlankDelay1);
+       (void) snprintf (buf, sizeof(buf), "%d", AppRes.field[BlankDelay1].val);
+       wids[4] = XtVaCreateWidget("Blank1-text", asciiTextWidgetClass,
+                       s3form, XtNstring, buf, XtNtranslations, trans, NULL);
+       AddCallback(wids[4], XtNcallback, BlankEditCB, (XPointer) BlankDelay1);
+       AppRes.field[BlankDelay1].textwidget = wids[4];
+       wids[5] = XtVaCreateWidget("Blank1Inc-button", commandWidgetClass,
+                                  s3form, NULL);
+       XtAddCallback (wids[5], XtNcallback, ChangeBlankCB,
+                       (XtPointer)BlankDelay1);
+
+       wids[6] = XtCreateWidget("Blank2-label", labelWidgetClass, s3form,
+                       NULL, 0);
+       wids[7] = XtVaCreateWidget("Blank2Dec-button", commandWidgetClass,
+                                  s3form, NULL);
+       XtAddCallback (wids[7], XtNcallback, ChangeBlankCB,
+                       (XtPointer)-BlankDelay2);
+       (void) snprintf (buf, sizeof(buf), "%d", AppRes.field[BlankDelay2].val);
+       wids[8] = XtVaCreateWidget("Blank2-text", asciiTextWidgetClass,
+                       s3form, XtNstring, buf, XtNtranslations, trans, NULL);
+       AddCallback(wids[8], XtNcallback, BlankEditCB, (XPointer) BlankDelay2);
+       AppRes.field[BlankDelay2].textwidget = wids[8];
+       wids[9] = XtVaCreateWidget("Blank2Inc-button", commandWidgetClass,
+                                  s3form, NULL);
+       XtAddCallback (wids[9], XtNcallback, ChangeBlankCB,
+                       (XtPointer)BlankDelay2);
+       XtManageChildren (wids, 10);
+       XtManageChild(s3form);
+    }
+
+    XtManageChild (form);
+
+    SetScrollbars ();
+    x = DisplayWidth(XtDisplay (top),DefaultScreen (XtDisplay (top))) / 2;
+    y = DisplayHeight(XtDisplay (top),DefaultScreen (XtDisplay (top))) / 2;
+
+    invalid_mode_popup = XtVaCreatePopupShell("invalidMode", 
+                           transientShellWidgetClass, top,
+                           XtNtitle, "Invalid Mode requested",
+                           XtNx, x - 20,
+                           XtNy, y - 40,
+                           NULL);
+
+    testing_popup = XtVaCreatePopupShell("testing", 
+                           transientShellWidgetClass, top,
+                           XtNtitle, "Testing_1_2_3",
+                           XtNx, x - 20,
+                           XtNy, y - 40,
+                           NULL);
+    boxW = XtVaCreateManagedWidget(
+                                   "TestingBox",
+                                   boxWidgetClass,
+                                   testing_popup,
+                                   NULL);
+
+    w = XtVaCreateManagedWidget(
+                  "testingMessage",
+                   labelWidgetClass,
+                   boxW,
+                   NULL);
+
+    w = XtVaCreateManagedWidget(
+                               "Abort",
+                                commandWidgetClass,
+                                boxW,
+                                NULL);
+
+    XtAddCallback (w, XtNcallback, (XtCallbackProc) TestTOCB,
+                 (XtPointer) NULL);
+
+    boxW = XtVaCreateManagedWidget(
+                                   "invalidBox",
+                                   boxWidgetClass,
+                                   invalid_mode_popup,
+                                   NULL);
+        
+    (void) XtVaCreateManagedWidget(
+                  "ErrorMessage",
+                   labelWidgetClass,
+                   boxW,
+                   NULL);
+
+    popdownW = XtVaCreateManagedWidget(
+                                     "AckError",
+                                     commandWidgetClass,
+                                     boxW,
+                                     NULL);
+
+    XtAddCallback (popdownW, XtNcallback, (XtCallbackProc)popdownInvalid, 
+                  (XtPointer) invalid_mode_popup);
+}
+
+static void
+QuitAction (Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    if ((e->type == ClientMessage
+      && e->xclient.data.l[0] == (long) wm_delete_window)
+       || e->type == KeyPress)
+       QuitCB(w, NULL, NULL);
+}
+
+static void
+RestoreAction (Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    Boolean state;
+
+    RestoreCB(w, NULL, NULL);
+    XtVaGetValues(auto_apply_toggle, XtNstate, &state, NULL);
+    if (!state)
+       ApplyCB (w, NULL, NULL);
+}
+
+
+static void
+ShowAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    ShowCB(w, NULL, NULL);
+}
+
+static void
+MoveLeftAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)HSyncStart, NULL);
+}
+
+static void
+MoveRightAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)-HSyncStart, NULL);
+}
+
+static void
+NarrowerAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)HTotal, NULL);
+}
+
+static void
+WiderAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)-HTotal, NULL);
+}
+
+static void
+MoveUpAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)VSyncStart, NULL);
+}
+
+static void
+MoveDownAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)-VSyncStart, NULL);
+}
+
+static void
+TallerAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)-VTotal, NULL);
+}
+
+static void
+ShorterAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+    AdjustCB(w, (XtPointer)VTotal, NULL);
+}
+
+static void
+NextModeAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+       SwitchCB(w, (XPointer) 1, NULL);
+}
+
+static void
+PrevModeAction(Widget w, XEvent* e, String* vector, Cardinal* count)
+{
+       SwitchCB(w, (XPointer) -1, NULL);
+}
+
+
+
+static void
+usage(void)
+{
+    fprintf(stderr, "Usage: xvidtune [option]\n");
+    fprintf(stderr, "    where option is one of:\n");
+    fprintf(stderr, "        -show                             Print current modeline to stdout\n");
+    fprintf(stderr, "        -next                             Switch to next video mode\n");
+    fprintf(stderr, "        -prev                             Switch to previous video mode\n");
+    fprintf(stderr, "        -unlock                           Enable mode switch hot-keys\n");
+    fprintf(stderr, "        -timeout [seconds]                Set testmode timeout in seconds,\n");
+    exit(1);
+}
+
+
+int
+main (int argc, char** argv)
+{
+    Widget top;
+    XtAppContext app;
+    Display* dpy;
+    Bool modeSettable = TRUE;
+    
+    static XtActionsRec actions[] = { { "xvidtune-quit", QuitAction },
+                                     { "xvidtune-restore", RestoreAction },
+                                     { "xvidtune-show", ShowAction },
+                                     { "xvidtune-moveleft", MoveLeftAction },
+                                     { "xvidtune-moveright", MoveRightAction },
+                                     { "xvidtune-wider", WiderAction },
+                                     { "xvidtune-narrower", NarrowerAction },
+                                     { "xvidtune-moveup", MoveUpAction },
+                                     { "xvidtune-movedown", MoveDownAction },
+                                     { "xvidtune-taller", TallerAction },
+                                     { "xvidtune-shorter", ShorterAction },
+                                     { "xvidtune-nextmode", NextModeAction },
+                                     { "xvidtune-prevmode", PrevModeAction } };
+
+    Top = top = XtVaOpenApplication (&app, "Xvidtune", NULL, 0, &argc, argv,
+               NULL, applicationShellWidgetClass, 
+               XtNmappedWhenManaged, False, NULL);
+
+    XtGetApplicationResources (top, (XtPointer)&AppRes,
+               Resources, XtNumber(Resources),
+               NULL, 0);
+
+    if (!AppRes.ad_installed) {
+       fprintf(stderr, "Please install the program before using\n");
+       return 3;
+    }
+
+    if (!XF86VidModeQueryVersion(XtDisplay (top), &MajorVersion, &MinorVersion)) {
+       fprintf(stderr, "Unable to query video extension version\n");
+       return 2;
+    }
+
+    if (!XF86VidModeQueryExtension(XtDisplay (top), &EventBase, &ErrorBase)) {
+       fprintf(stderr, "Unable to query video extension information\n");
+       return 2;
+    }
+
+    /* Fail if the extension version in the server is too old */
+    if (MajorVersion < MINMAJOR || 
+       (MajorVersion == MINMAJOR && MinorVersion < MINMINOR)) {
+       fprintf(stderr,
+               "Xserver is running an old XFree86-VidModeExtension version"
+               " (%d.%d)\n", MajorVersion, MinorVersion);
+       fprintf(stderr, "Minimum required version is %d.%d\n",
+               MINMAJOR, MINMINOR);
+       exit(2);
+    }
+    /* This should probably be done differently */
+
+    if(  argc == 3  ) { /* this can only be the timeout case */
+        if(  (!strcmp(argv[1], "-timeout"))  ) {
+            TestTimeout = ((unsigned long) atol( argv[2] )) * 1000L;
+       } 
+       else
+           usage();
+    }
+
+    if (argc > 1) {
+       int i = 0;
+        
+       if (argc != 2)
+               usage();
+       if (!strcmp(argv[1], "-show")) {
+         if (!GetModeLine(XtDisplay (top), DefaultScreen (XtDisplay (top)))) {
+           fprintf(stderr, "Unable to get mode info\n");
+           CleanUp(XtDisplay (top));
+           return 2;
+         }
+         ShowCB(top, NULL, NULL);
+         return 0;
+       } else if (!strcmp(argv[1], "-next"))
+           i = 1;
+       else if (!strcmp(argv[1], "-prev"))
+           i = -1;
+       else if (!strcmp(argv[1], "-unlock")) {
+           CleanUp(XtDisplay (top));
+           XSync(XtDisplay (top), True);
+           return 0;
+       } else
+               usage();
+       if (i != 0) {
+           XF86VidModeSwitchMode(XtDisplay (top),
+                                 DefaultScreen (XtDisplay (top)), i);
+           XSync(XtDisplay (top), True);
+           return 0;
+       }
+    }
+    if (!GetMonitor(XtDisplay (top), DefaultScreen (XtDisplay (top)))) {
+       fprintf(stderr, "Unable to query monitor info\n");
+       return 2;
+    }
+
+    if (!XF86VidModeLockModeSwitch(XtDisplay (top),
+                                  DefaultScreen (XtDisplay (top)), TRUE)) {
+       fprintf(stderr, "Failed to disable mode-switch hot-keys\n");
+       return 2;
+    }
+
+    signal(SIGINT, CatchSig);
+    signal(SIGQUIT, CatchSig);
+    signal(SIGTERM, CatchSig);
+    signal(SIGHUP, CatchSig);
+    sigId = XtAppAddSignal(app, CatchXtSig, NULL);
+
+    if (!GetModeLine(XtDisplay (top), DefaultScreen (XtDisplay (top)))) {
+       fprintf(stderr, "Unable to get mode info\n");
+       CleanUp(XtDisplay (top));
+       return 2;
+    }
+
+    xtErrorfunc = XSetErrorHandler(vidmodeError); 
+
+    trans = XtParseTranslationTable ("\
+       <Key>0: insert-char()\n<Key>1: insert-char()\n\
+       <Key>2: insert-char()\n<Key>3: insert-char()\n\
+       <Key>4: insert-char()\n<Key>5: insert-char()\n\
+       <Key>6: insert-char()\n<Key>7: insert-char()\n\
+       <Key>8: insert-char()\n<Key>9: insert-char()\n\
+       <Key>a: insert-char()\n<Key>b: insert-char()\n\
+       <Key>c: insert-char()\n<Key>d: insert-char()\n\
+       <Key>e: insert-char()\n<Key>f: insert-char()\n\
+       <Key>+: insert-char()\n<Key>-: insert-char()\n\
+       <Key>r: xvidtune-restore()\n<Key>q: xvidtune-quit()\n\
+       <Key>BackSpace: delete-previous-character()\n\
+       <Key>Right: forward-character()\n<Key>KP_Right: forward-character()\n\
+       <Key>Left: backward-character()\n<Key>KP_Left: backward-character()\n\
+       <Key>Delete: delete-previous-character()\n\
+       <Key>KP_Delete: delete-previous-character()\n\
+       <EnterWindow>: enter-window()\n<LeaveWindow>: leave-window()\n\
+       <FocusIn>: focus-in()\n<FocusOut>: focus-out()\n\
+       <Btn1Down>: select-start()\n");
+
+    if (!ModeSettable()) {
+       printf("Video modes are not settable on this chip\n");
+       displayNoTune(top);
+       modeSettable = FALSE;
+    } else
+       CreateHierarchy (top);
+    
+
+    XtAppAddActions (app, actions, XtNumber(actions));
+
+    XtOverrideTranslations (top,
+               XtParseTranslationTable ("<Message>WM_PROTOCOLS: xvidtune-quit()"));
+
+    XtRealizeWidget (top);
+
+    dpy = XtDisplay(top);
+
+    wm_delete_window = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
+
+    (void) XSetWMProtocols (dpy, XtWindow (top), &wm_delete_window, 1);
+
+    XtMapWidget (top);
+
+    if (modeSettable)
+       displayWarning(top);
+
+    /* really we should run our own event dispatching here until the
+     * warning has been read...
+     */
+    XtAppMainLoop (app);
+
+    return 0;
+}
diff --git a/xvidtune/xvidtune.man b/xvidtune/xvidtune.man
new file mode 100644 (file)
index 0000000..1de7373
--- /dev/null
@@ -0,0 +1,178 @@
+.\" $XFree86: xc/programs/xvidtune/xvidtune.man,v $
+.\"
+.\" Copyright (c) 1995  Kaleb S. KEITHLEY
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining
+.\" a copy of this software and associated documentation files (the
+.\" "Software"), to deal in the Software without restriction, including
+.\" without limitation the rights to use, copy, modify, merge, publish,
+.\" distribute, sublicense, and/or sell copies of the Software, and to
+.\" permit persons to whom the Software is furnished to do so, subject to
+.\" the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\" 
+.\" Except as contained in this notice, the name of Kaleb S. KEITHLEY shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from Kaleb S. KEITHLEY.
+.\"
+.TH xvidtune __appmansuffix__ __vendorversion__
+.SH NAME
+xvidtune \- video mode tuner for __xservername__
+.SH SYNOPSIS
+.B xvidtune
+[
+.B -show
+|
+.B -prev
+|
+.B -next
+|
+.B -unlock
+] [
+.I \-toolkitoption
+\&.\|.\|. ]
+.SH DESCRIPTION
+Xvidtune is a client interface to the X server video mode
+extension (XFree86-VidModeExtension).
+.PP
+When given one of the non-toolkit options, xvidtune provides
+a command line interface to either print or switch the video mode.
+.PP
+Without any options (or with only toolkit options) it
+presents the user with various buttons and sliders that can be
+used to interactively adjust existing video modes.
+It will also print the settings in a format suitable for inclusion
+in an __xconfigfile__ file.
+.PP
+Normally the __xservername__ X servers only allow changes to be made with
+the XFree86-VidModeExtension from clients connected via a local
+connection type.
+.PP
+Note:  The original mode settings can be restored by pressing the `R' key,
+and this can be used to restore a stable screen in situations where the
+screen becomes unreadable.
+.PP
+The available buttons are:
+.PP
+.nf
+.B Left
+.B Right
+.B Up
+.B Down
+.fi
+.RS 10
+Adjust the video mode so that the display will be moved in the
+appropriate direction.
+.RE
+.PP
+.nf
+.B Wider
+.B Narrower
+.B Shorter
+.B Taller
+.fi
+.RS 10
+Adjust the video mode so that the display size is altered
+appropriately.
+.RE
+.TP 10
+.B Quit
+Exit the program.
+.TP 10
+.B Apply
+Adjust the current video mode to match the selected settings.
+.TP 10
+.B Auto
+Cause the Up/Down/Right/Left, Wider/Narrower/Shorter/Taller, Restore,
+and the special S3 buttons to be applied immediately.
+This button can be toggled.
+.TP 10
+.B Test
+Temporarily switch to the selected settings.
+.TP 10
+.B Restore
+Return the settings to their original values.
+.TP 10
+.B Fetch
+Query the server for its current settings.
+.TP 10
+.B Show
+Print the currently selected settings to stdout in __xconfigfile__
+"Modeline" format.  The primary selection is similarly set.
+.TP 10
+.B Next
+Switch the Xserver to the next video mode.
+.TP 10
+.B Prev
+Switch the Xserver to the previous video mode.
+.PP
+For some S3-based cards (964 and 968) the following are also available:
+.TP 10
+.B InvertVCLK
+Change the VCLK invert/non-invert state.
+.TP 10
+.B EarlySC
+Change the Early SC state.  This affects screen wrapping.
+.PP
+.nf
+.B BlankDelay1
+.B BlankDelay2
+.fi
+.RS 10
+Set the blank delay values.  This affects screen wrapping.  Acceptable
+values are in the range 0\-7.  The values may be incremented or decremented
+with the `+' and `-' buttons, or by pressing the `+' or `-' keys in the
+text field.
+.RE
+.PP
+For S3-864/868 based cards \fIInvertVCLK\fP and \fIBlankDelay1\fP may
+be useful.  For S3 Trio32/Trio64 cards only \fIInvertVCLK\fP is available.
+At the moment there are no default settings available for these chips 
+in the video mode extension and thus this feature is disabled in xvidtune.
+It can be enabled by setting any of the optional S3 commands in the
+screen section of __xconfigfile__, e.g. using
+.RS 10
+.B blank_delay \fI"\(**"\fP 0
+.RE
+.SH OPTIONS
+\fIxvidtune\fP accepts the standard X Toolkit command line options as well
+as the following:
+.TP 10
+.B \-show
+Print the current settings to stdout in __xconfigfile__
+"Modeline" format and exit.
+.TP 10
+.B \-prev
+Switch the Xserver to the previous video mode.
+.TP 10
+.B \-next
+Switch the Xserver to the next video mode.
+.TP 10
+.B \-unlock
+Normally, \fIxvidtune\fP will disable the switching of video modes
+via hot-keys while it is running.  If for some reason the program
+did not exit cleanly and they are still disabled, the program can
+be re-run with this option to re-enable the mode switching key
+combinations.
+.SH SEE ALSO
+.BR xrandr (__appmansuffix__),
+.BR __xservername__ (__appmansuffix__),
+.BR __xconfigfile__ (__filemansuffix__).
+.SH AUTHORS
+Kaleb S. Keithley, X Consortium.
+.br
+Additions and modifications by Jon Tombs, David Dawes, and Joe Moss.
+.SH BUGS
+X Error handling, i.e. when the server does not allow xvidtune
+clients to write new modes, could be better.
diff --git a/xwd/AUTHORS b/xwd/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/xwd/NEWS b/xwd/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)